|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT sort
yes, thats what i wanted. Now I tried a solution like this on a document
with 8000 lines:
<xsl:key name="name-key" match="Person" use="@enamn" /> <xsl:template match="Katalog">
<xsl:copy>
<xsl:variable name="unique-names"
select="Person[generate-id()=
generate-id(key('name-key',@enamn))]/@enamn" />
<xsl:for-each select="$unique-names">
<xsl:sort select="." order="ascending" />
<xsl:apply-templates select="key('name-key',.)" />
</xsl:for-each>
</xsl:copy>
</xsl:template><xsl:template match="Person"> <xsl:copy-of select="."/> </xsl:template> But I didnt get any better performance. My document is like this: <Katalog> <Person fnamn="Orvar" enamn="Olsson" tfn="026-789536"> <Adress adress="Norrav. 34" postnr="50623" postort="Soderhamn">japp</Adress> <Cv>Har arbetat som konsult hos microsoft sedan barnsben</Cv><Info alder="24"/> </Person> <Person fnamn="Orvar" enamn="Orre" tfn="026-782576"> <Adress adress="Sodrav. 34" postnr="50323" postort="Gavle"/> <Cv>Har arbetat som stadare hos ericsson</Cv><Info alder="24"/> </Person> <Person fnamn="Per" enamn="Olsson" tfn="026-789536"> <Adress adress="Norrav. 34" postnr="50623" postort="Soderhamn"/> <Cv>Sommarjobbat hos prv</Cv><Info alder="24"/> </Person> . . . </Katalog> And I have a lot of elements with the same "enamn" attribute. Is It possible to solve it any other way to get better performance? /Tomas At 22:32 2004-05-20 +0200, you wrote: > -----Original Message----- > From: Tomas Olsson [mailto:tomas.olsson@xxxxxxxxxxxxxxxxxxxxxxxx] >
|
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
|

Cart








