Re: Getting variable yet most immediate parentNode
The things I wrote were just from what was immediately obvious for me from just looking at your code. The suggestions I made (apart from the XSLT 2.0 shortcut) are viable, regardless your problem statement. And if the rest of your real stylesheet is having "matching templates" already, all the better! Just follow that same path for this part of the application and don't get entangled in xsl:if and xsl:choose with node tests... it will muddle your sight.
I'm sorry I currently can't be of more constructive help about your real problem, maybe a little later.
Cheers, -- Abel Braaksma --
I think you've missed my reasoning. What appears to be redundant is really a way to produce a questionaire flexibly. Let's say a section is mostly true/false questions but the last question is A-B-C. Well, in my structure I can define 'true/false' at the "section" level and then, for the particular question that doesn't fit, override it with "A-B-C". Those that are true false will ask from above, whereas those that have peculiar options can be defined specifically.
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