O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing XPointers

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:

xlink:href="someDocument.xml#xpointer(id('someID'))" 

Tip

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required