O'Reilly logo

Special Edition Using XSLT by Michael Floyd

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

XPath Core Function Library

Node-Set Functions

last()

According to the XPath specification, the last() function is a node-set function that returns the size for the current (context) node. In reality, this function selects the last child node of the context node.

Arguments: None

Return Type: Number

Example:

child::para[position()=last()] 
position()

The position function is a node-set function that returns the position for the current (context) node.

Arguments: None

Return Type: Number

Example:

child::para[position()=last()] 
count(node-set)

Takes a node set and returns the number of nodes in the set.

Arguments: node-set

Return Type: Number

Example:

child::para[count()] 
id(string)

Selects one or more element instances based on its ID ...

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