[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hi,
i am using the current version of Apache xalan/Xerces and i am facing a problem with re-sorting an XML file.
The file is sorted by 'InternalId' but is has to be sorted by the 'name' attribute. I tried to order all 'category' elements including their child nodes without loosing any attribute or sub elements with different statements like:
<xsl:copy-of select = "category/@name" />
<tef>
<taxonomy name="web_taxonomy" className="Generic" internalId="0b0164e08000367e" taxonomyVersion="1.0">
<category name="040 Services" className="Generic" internalId="0b0164e080003694">
<details title="Service">
<description/>
</details>
<category name="020 Products" className="Generic" internalId="0b0164e080003695">
<details title="Produkte">
<description/>
</details>
</category>
<category name="010 Library" className="Generic" internalId="0b0164e080003696">
<details title="Bibliothek">
<description/>
</details>
</category>
</category>
<-- snip -->
Thx a lot, i appreciate your help!
Dennis
[xsl] re-sorting an XML tree
Subject: [xsl] re-sorting an XML tree From: Dennis Holdorf <fhwf@xxxxxx> Date: Mon, 26 Sep 2005 00:49:30 +0200 |
Hi,
i am using the current version of Apache xalan/Xerces and i am facing a problem with re-sorting an XML file.
The file is sorted by 'InternalId' but is has to be sorted by the 'name' attribute. I tried to order all 'category' elements including their child nodes without loosing any attribute or sub elements with different statements like:
<xsl:copy-of select = "category/@name" />
...but i just can't get it to work right. (he hole file even has a lot more nested nodes) I do get an XML file as follows out of a system (i am unable to influence):
<tef>
<taxonomy name="web_taxonomy" className="Generic" internalId="0b0164e08000367e" taxonomyVersion="1.0">
<category name="040 Services" className="Generic" internalId="0b0164e080003694">
<details title="Service">
<description/>
</details>
<category name="020 Products" className="Generic" internalId="0b0164e080003695">
<details title="Produkte">
<description/>
</details>
</category>
<category name="010 Library" className="Generic" internalId="0b0164e080003696">
<details title="Bibliothek">
<description/>
</details>
</category>
</category>
<-- snip -->
Thx a lot, i appreciate your help!
Dennis
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] First UnderstandingSaxon.NET , M. David Peterson | Thread | [xsl] Recursion (I think), Nicholas Orr |
RE: [xsl] XSLT2: A sequence of more, Michael Kay | Date | [xsl] Recursion (I think), Nicholas Orr |
Month |
Keywords