Node set functions

[Example 50] <C>

The position function returns a number equal to the context position and the last function returns a number equal to the context size from the expression evaluation context.This stylesheet demonstrates use of these functions in several contexts. This stylesheet compares sorted and unsorted xsl:for-each element.

[Example 51] <C>

The count function returns the number of nodes in the argument node-set.

[Example 52] <C>

The id function selects elements by their unique ID. This stylesheet shows simple examples of its use. Carefully study This stylesheet. Contents of title element is not displayed in [] as in DTD its attribute id is defined as CDATA, not ID. Several id's can be provided at once (This stylesheet).

[Example 68] <C>

An example of id function usage.

[Example 53] <C>

Functions name, local-name, and namespace-uri() are used to get informations about element and attribute names and namespaces.