Ok I need to write a template that effectively walks a tree in stages.
I need to be able to give it a root node and say "do X to children 0 to 6." I also need to be able to tell it "do Y to children 8 to 12"
I'm brand new to XSLT so this is really throwing me.
I have an XML story structure with "parag" sub-elements that make up a story to be posted online.
I.E.
Story
|
parag, parag, parag
So the goal here is to have some parags on the same page but others on different pages. The XML sadly doesn't say this explicitly, instead it says parags 0-6 go on page 1, etc etc.
Can anyone give me a clue to how to approach this problem? Thanks
Thanks that helped a lot.
One more question:
Any idea how to do that with preceeding-sibling?
I'm using
select = "preceding-sibling::page"
to get an element from the previous sibling but I just want the immediate previous sibling not all of them which is what that line seems to provide.
I know that position() returns the "index" of my current node but how can I use that to compare where I am right now to my nearest previous sibling?
Thank you