The Data Extraction and Node Collection Methods

Previous hours have demonstrated several of the XSL methods available for node selection, but there are others that haven't been mentioned. There are two different categories that these methods can be placed in. One group is used to extract information from the nodes, and the other group creates a collection of nodes. The data extraction methods are shown in Table 18.1, and the node collection methods are shown in Table 18.2.

Table 18.1. XSL Data Extraction Methods
MethodPurpose
absoluteChildNumberReturns thenumber of the node relative to its siblings.
ancestorChildNumberReturns the number of the nearest ancestor of a node.
childNumberReturns the number of the node relative to siblings with the same ...

Get Sams Teach Yourself XML in 24 Hours 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.