|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: For-each-group problem
(using Saxon 8 and XSLT 2) Sorry about the earlier xml sample I wasn't paying attention and it doesn't do justice to the content I'm working with. Thanks for the insights Andrew and Mukul Please take a second look at the content as you'll notice I need to grab all the following elements before the next instance of <li> and the same for <anotherhead>. I guess this is why I want to use for-each-group as it seems to be a good solution. So any ideas on how to best do this or a good sample of for-each-group would be greatly appreciated. Input <root> <body> <heading>content</heading> <p>content</p> <p>content</p> <li>content</li> <div> <p>content</p> <p>content</p> </div> <p>content</p> <li>content</li> <div> <p>content</p> <p>content</p> <p>content</p> <p>content</p> </div> <li>content</li> <div> <p>content</p> </div> <anotherhead>content</anotherhead> <div> <p>content</p> <p>content</p> <p>content</p> <p>content</p> </div> <p>content</p> <p>content</p> <p>content</p> <p>content</p> <anotherhead>content</anotherhead> <another> <p>content</p> <li>content<li> <div> <p>content</p> <p>content</p> <p>content</p> <p>content</p> </div> </another> <p>content</p> <footer>content</footer> </body> </root> --------------------- Output <root> <body> <heading>content</heading> <p>content</p> <p>content</p> <ul> <li> <p>content</p> <div> <p>content</p> <p>content</p> </div> <p>content</p> </li> <li> <p>content</p> <div> <p>content</p> <p>content</p> <p>content</p> </div> </li> <li> <p>content</p> <div> <p>content</p> </div> </li> </ul> <div> <anotherhead>content</anotherhead> <another> <p>content</p> <p>content</p> <p>content</p> <p>content</p> </another> <p>content</p> <p>content</p> <p>content</p> <p>content</p> </div> <div> <anotherhead>content</anotherhead> <another> <p>content</p> <ul> <li> <p>content</p> <div> <p>content</p> <p>content</p> <p>content</p> <p>content</p> </div> </li> </ul> </another> </div> <p>content</p> <footer>content</footer> </body> </root> Thanks Mario
|
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
|






