[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Side-effects, state, internal references
Sorry for such a late followup to this thread. One problem I am having caused by not being able to use "global" state in XSL (although using it a little guiltily in msxsl) is not related to output element counting but something even simplier: We have an XML tree which we need to make available to "legacy" systems, which want to import it into Excel, etc in comma delimited format. Using XSL to produce this is fine except for coping with "repeating groups" where the "child" lines need to have information from the parent. Eg, an employee may have multiple deductions. For ease of procesing in the Excel environment, the imported file looks something like E,10156,"W Smith", ... ["E" is a rec type, 10156 is emp#] D,10156,101.45,"Health insurance",.. [D = deduction D,10156,98.55,"Union dues",... 10156 is emp# E,10233,"F Jones",... D,...etc With XSL we *can* go up the XML tree to get the employee element and get the emp#, but having to do this on every sub-element is expensive, whereas setting a "current global employee #" and using it when outputting the child records is simple and fast. Kent Fitch Ph: +61 2 6276 6711 ITS CSIRO Canberra Australia kent.fitch@xxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|