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

XPointer Function Extensions to XPath

The function library defined in the XPath specification is available to XPointer processors. Several additional XPointer functions are also available.

Location Set Functions

XPointer adds point and range to the node of XPath, as explained earlier in the chapter. Because XPath lacks functions to operate on locations other than nodes, additional functions are required in XPointer to allow manipulation of non-node locations.

The range-to() Function

The range-to() function takes a single location-set argument and returns a range for each member of the location-set argument.

Suppose we had a document that included the fragment shown here:

 <paragraph id="para1" number="1"> <!-- Some content goes here --> </paragraph> ...

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