[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How would you add depth to this flat XML source?
I am trying to convert a flat XML document with this structure: <firstitem>Item 1</firstitem> <item>Second Text</item> <item>blah blah</item> <item>tee hee</item> <firstitem>List 2, Item 1</firstitem> <item>more text</item> <firstitem>more lists</firstitem> <item>test</item> into something like this (indenting is purely decorative): <list> <item>Item 1</item> <item>Second Text</item> <item>blah blah</item> <item>tee hee</item> </list> <list> <item>List 2, Item 1</item> <item>more text</item> </list> <list> <item>more lists</item> <item>test</item> </list> It seems to me that I can process each <firstitem> element and then apply templates to all of the following-siblings that have their first <firstitem> preceding-sibling equal to the current <firstitem>. But, a) I can't seem to get the syntax right for this solution, b) this seems like an odd way to solve the problem, and c) somebody probably knows an easier way. Thanks in advance for any suggestions... ---------- Eric Bosch Clinical DataFax Systems Inc. Voice: 905.522.3282.x223 Fax: 905.522.7284 Email: eric@xxxxxxxxxxx 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
|