This is actually not an XSLT, but an XPath question.
In XPath 1.0, there is nothing like the list data type. A node -set is a collection, and it has no order.
In XPath 2.0, there is a sequence data type. Any items in the sequence are ordered. This has nothing to do with the order of the document. In addition, the same element (or node) may appear more than once in a sequence.
So, in XSLT 2.0, the XPath 2.0 sequence concatenation operator is simply used:
//*[@id='parentTransition'] , //*[@id='childTransition']
and this evaluates the sequence of all elements in the document with the id attribute 'parentTransition' , followed by all elements of the document with the id attribute 'childTransition'
In XSLT, it is still possible to access and process nodes in a different document order : for example, using the <xsl:sort> command - however, the set of nodes that are processed as a result of <xsl:apply-templates> or <xsl:for-each> is node-list is not a node-set.
Another example of evaluating nodes that are not in the order of a document is the position() function in <xsl:apply-templates> or <xsl:for-each> , which has a child element <xsl:sort> or inside a location step predicate (from XPath expression) that uses the inverse axis (for example, ancesstor:: or preceeding::
source share