Re: Getting variable yet most immediate parentNode
I added the .// in my proposed solution because I inversed your logic (i.e., I started the match from the parent of the answer nodes and applied the answer nodes from there with .//). But, like you said yourself already, the source you showed, both in XSLT and in XML contained errors and that may have made me make the wrong assumptions about what structure is and what structure is not possible (or effective).
But I saw that Wendell's solution "up the tree" works just fine, which is nice to hear :)
About understanding what you are after: I've looked through the thread but still haven't seen a clean output that you have now (so we can mimic your current stylesheet) and the output that you are after, so it is just guessing at what you really want with your code. Or have you found the correct solution already?
Cheers, -- Abel Braaksma
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format