[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT 2.0 Grouping in XSLT 1.0 (was TEI > XML)
> Is there a way of reproducing the results one gets in XSLT 2.0 (using > the various grouping elements and attributes) in XSLT 1.0 > (where these > commands are not available). It can be done, but it's pretty tough, and I don't have the mental energy for it this morning. It needs a recursive scan along the sibling axis. Try a search for "XSLT positional grouping". Alternatively, you can sometimes turn these positional grouping problems into conventional value-based grouping problems by devising a suitable key. For example, to group adjacent bullet elements, the key might be something like generate-id(preceding-sibling::bullet[not(preceding-sibling::*[1][self::bull et])][1]) - or in English, the identity of the first preceding bullet whose first preceding element is not a bullet. Michael Kay http://www.saxonica.com/
|
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
|