RE: Why I want to change the value of a variable.

Subject: RE: Why I want to change the value of a variable.
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 26 Oct 1999 13:26:35 +0100
> I have a list of people in a XML format:
> 
> and I would like to transform it in html:
> 
> <CENTER>- A -</CENTER><BR>
> Gweltaz Ar Fur<BR>
> <CENTER>- B -</CENTER><BR>nobody<BR>
> <CENTER>- C -</CENTER><BR>nobody<BR>
> <CENTER>- D -</CENTER><BR>
> Marc Duchmol<BR>
> Chris Dupont<BR>
> Maria Dupuis<BR>
> Yves Durant<BR>
> <CENTER>- E -</CENTER><BR>nobody<BR>
> <CENTER>- F -</CENTER><BR>nobody<BR>

Right: so it's the problem of doing sorting and then grouping. This isn't
easy in XSL: there are examples of how to achieve it on some of the tutorial
sites, but they may be quite inefficient.

If you want an easier way and don't mind departing from standard XSLT, SAXON
has some suitable extensions. It has a saxon:group construct designed to
solve the problem directly, and it also has a saxon:assign construct
allowing you to modify variables and therefore to implement the algorithm
you described.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread