Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Newbie: Sort Xml to Xml

From: "Dave F." <df@--.--.-->
To: NULL
Date: 5/17/2009 4:00:00 AM
Hi

I'm just starting out with XSL so please bear with me.

I have an XML file in the following format:

<PileCoords>
<Pile>
<PileNo>22</PileNo>
<Eastings>57.7981568796959</Eastings>
<Northings>166.059281023945</Northings>
</Pile>
<Pile>
<PileNo>21</PileNo>
<Eastings>57.7981568796959</Eastings>
<Northings>161.461817940551</Northings>
</Pile>
<Pile>
<PileNo>194</PileNo>
<Eastings>68.6908869290537</Eastings>
<Northings>167.952353915529</Northings>
</Pile>
<Pile>
<PileNo>4</PileNo>
<Eastings>83.9813040551062</Eastings>
<Northings>167.952353915529</Northings>
</Pile>
</PileCoords>

I would like to sort it by the PileNo element & keep it in XML format.
I've seen many examples where it's transformed to another format but 
very few to keep it as XML.

In this example: http://www.zvon.org/xxl/XSL-Ref/Tutorials/Sorting/so5.html
The element is explicitly defined in the template. Is this essential?
It would work in this case where I know all the elements names (eg 
PileNo, Eastings Northings etc) but what if they'd varied in number & names?

Is there a way to say 'copy all the elements under Pile regardless of 
what they're called'?

I hope I've used clear terminology.

Any help to find a solution would be greatly appreciated.

Thanks
Dave F.










transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent