I have this situation:
<root>
//first block other tags
<data>something</data> //first
<data>something</data>
<data>something</data>
...others <data/>
<data>something</data> //last
//follows second block other tags
</root>
I need to apply-templates to all the tags before the first <data/> and apply-templates to all the other tags following last <data/>.
Have you any idea how to select this subsets?
To select all elements before the first data element, do this
To select all elements after the last data element, do this
Or, do select them both at the same time….
This assumes you are positioned on the root element, and that there is at least one data element present though.