When we start to write XPointers, we need to remember that an XPointer typically includes a URI. So, we might have code such as the following:
To avoid syntax errors, remember to use one form of quote marks (either paired single quotes or paired double quotes) to mark out the limits of an attribute value. Use the other kind of quote marks to delimit within an XPointer, as when using single quotes within the id() function in the preceding code.
Because the XPointer can also be the value of an XML attribute, we also need to consider that aspect. Thus, we need to ensure that an XPointer satisfies any syntactic considerations for Uniform Resource Identifiers (URIs) and ...