In Practice

XPath is a powerful language for traversing tree structures. As a part of this, it needs a basic data processing capability in the form of numerical and Boolean expressions, and the function library, to express complex predicate requirements. However, those capabilities are not really powerful enough for most “real” data processing needs. You cannot find the largest or smallest number in a node set, only the sum of the numbers in a node set. You cannot compute sines and cosines or square roots, and you cannot find all <point x="..." y="..." /> elements corresponding to points within a complex shape.

If possible, use XPath only to find the data you wish to process from your input document, and be sure the application using XPath is ...

Get Special Edition Using XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.