I’m parsing a huge word file with Test descriptions, and have a problem of scope of nodes. Word basically creates a list of paragraphs and I want to group them into a parent node. So for each node ‘A’ I want to group all the following nodes up to the next node ‘A’ into ‘A’.
How can this be done with XSL?
Example: I’ve gotten to :
<A/> <ab/> <ac/> <A/> <ab/> <ac/>
But need:
<A> <ab/> <ac/> </A> <A> <ab/> <ac/> </A>
Thank you!
If you mean to match all the nodes following
<A>, but come before the next<A>, I think you can use something like this:For your input:
I get (I left the ‘range’ attribute in to make the calculations visible):