item-at
Returns an item from the sequence of nodes/rows supplied as argument, at the position supplied by the position argument. The first item is at position 1.
Languages
Built-in, C++, C#, Java, XQuery, XSLT 2.0, XSLT 3.0.
Parameters
Name | Description |
---|---|
nodes/rows | This input must receive a connection from a mapping item that provides a sequence of zero or more values. For example, the connection may originate from a source XML item, a CSV field, a database record, and so on. |
position | This integer specifies which item from the sequence of items is to be returned. |
Example
The following mock-up mapping generates a sequence of 10 values. The sequence is processed by the item-at function and the result is written to a target XML file.
Because the position argument is set to 3, only the third value from the sequence is passed on to the target. Consequently, the mapping output is as follows (excluding the XML and schema declarations):
<items> |