Subject:Any good way to handle repeating, paired tags using XSLT? Author:Eric Dean Date:04 Jun 2010 05:57 PM
I have a source XML document that has been provided to me and I have no control over it's format. It has header-level information as well as detail level information. At both the header and detail levels there are generic, paired tags used to contain data that doesn't have a place in the document.
The problem is that there can be dozens of these "ExtendedInfo" tags. Many I don't care about but others I need to use throughout the target document. They represent completely unrelated data that would not be logically grouped together and I would use the value of the <Name> tag to determine if/how to use the data in the output.
My initial thought was to parse them all up front using a for-each, store the ones I care about in variables and use those variables later. Seems that I can't do this, however, as the variables would be out of scope.
The only way I can see to do it would be to have a for-each everywhere that I need data from one of these nodes. This would be extremely inefficient, however, as I would have to go through them all, checking the value of the <Name> node many times, everywhere that I needed data from one of these tags in the target.
Hopefully my ignorance is just causing me to miss something obvious. I'd really appreciate any help.
Subject:Any good way to handle repeating, paired tags using XSLT? Author:Tony Lavinio Date:07 Jun 2010 10:18 AM
These boards are part of the Stylus Studio Developer Network. They are a service to users of Stylus Studio only.
* If your copy of Stylus Studio is registered under a different email address from the one you are using on this board, please include the version of Stylus Studio you are using with your question. The version number can be seen under Help>About next to the words "Framework version" and will look something like "1291a" or "1386a".
* For general XSLT-related questions, even those seen under Stylus Studio but obviously not related to Stylus Studio in particular, please post questions on the xsl-list mailing list.