Please enable JavaScript to view this site.

Altova MapForce 2020 Enterprise Edition

The last and position functions take no argument. The last function returns the position of the last node in the context nodeset. The position function returns the position of the current node in the nodeset being processed.

 

The context nodeset at the nodes where the functions are directed, is the nodeset to which the functions will apply. In the screenshot below, the nodeset of Language elements is the context nodeset for the last and position functions.

FXxpath10last

In the example above, the last function returns the position of the last node of the context nodeset (the nodeset of Language elements) as the value of the number attribute. This value is also the size of the nodeset since it indicates the number of nodes in the nodeset.

 

The position function returns the position of the Language node being currently processed. For each Language element node, its position within the nodeset of Langauge elements is output to the language/@position attribute node.

 

We would advise you to use the position and count functions from the core library.

© 2020 Altova GmbH