RE: Clean data using XSLT

Subject: RE: Clean data using XSLT
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 7 Aug 2000 20:44:58 +0100
> 
> This gives me the following input:
> 103) 2109 B'way (appears 1 times)
> 103) 2109 Bdwy (appears 1 times)
> 103) 2109 Broadway (appears 2 times)
> 104) 5 Bleecker Street (appears 2 times)
> 104) 5 Bleeker Street (appears 1 times)
> 
> I would like to have the data also sorted by the number of 
> times this version of
>  the address appears in the data, so my output would be:
> 103) 2109 Broadway (appears 2 times)
> 103) 2109 B'way (appears 1 times)
> 103) 2109 Bdwy (appears 1 times)
> 104) 5 Bleecker Street (appears 2 times)
> 104) 5 Bleeker Street (appears 1 times)
> 
> Can someone tell me how to do this?
> I am using the July version of the MSXML parser.

Although it's non-standard, by far the easiest way is to use 2 passes. This
needs the ability to convert a result tree freagment to a node-set so it can
be sorted again. Wrap the <xsl:for-each> within an <xsl:variable>, this
variable will be the root of the sorted results, process the children of
this root using a second sorted xsl:for-each.

Mike Kay 


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


Current Thread