RE: [xsl] XSLT 2.0 Grouping in XSLT 1.0 (was TEI > XML)

Subject: RE: [xsl] XSLT 2.0 Grouping in XSLT 1.0 (was TEI > XML)
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 13 Apr 2005 09:47:50 +0100
> 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
et])][1]) - or in English, the identity of the first preceding bullet whose
first preceding element is not a bullet.

Michael Kay

Current Thread