Like XPath, XPointer is not in itself an XML vocabulary. Rather, it’s meant to be used within the markup in XML documents — most often in XLink or XLink-like situations requiring a URI. This chapter covers the details of coding the various XPointer forms. There are two approaches to defining XPointers as described in the XPointer Framework. Shorthand pointers use a very brief syntax, while scheme-based XPointers use a more complex syntax composed of pointer parts.
In XHTML hyperlinking, as
you know, you can locate a subresource
using a combination of a named anchor (the
sort of tag) and a normal anchor (
Notwithstanding the limitations of XHTML subresource hyperlinking,
the XPointer spec’s authors recognized its principal
value: simplicity. Thus, they carried it forward into XPointer,
enhanced slightly for the new standard’s use with
XML documents of any vocabulary. This form of an XPointer is called a
shorthand pointer; it includes neither scheme nor XPath expression,
just the “name” of the target
In an XPointer, as in an XHTML fragment identifier, the pound
#, is not itself part of the
XPointer or other fragment identifier. It merely serves to delimit
the fragment from the full URI preceding it. Section 8.3 at the end of this chapter
addresses this issue more fully.
The value of
name is the value
of an ID-type attribute assigned to some element in ...