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.
The count function returns the number of nodes in the argument node-set.
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).
An example of id function usage.
Functions name, local-name, and namespace-uri() are used to get informations about element and attribute names and namespaces.