How do i select all text nodes using XSL?
- by user323719
I want to get the generate-id(.) of all the text nodes after node and before node . I am looking for some generic XSL and not tightly coupled to the sample input pattern mentioned below. For any input pattern i want to get the ids of all the text nodes between node and .
Sample input for better understanding:
<a>
<b>
<c>
This is first text node
</c>
</b>
<d>
<e>
This is my second text node
</e>
<f>
This is my <m/>third text node
</f>
<g>
One more text node
</g>
<h>
<i>
This is my fourth text node
</i>
</h>
<j>
This is my fifth <n/>text node
</j>
<k>
<l>
This is my sixth text node
</l>
</k>
</d>
</a>
Expected output:
Generate id of the text nodes with values "third text node ", "One more text node", "This is my fourth text node", "This is my fifth" which lie inbetween nodes <m/> and <n/>
Please give your ideas.