Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] dynamic sort using attributes

From: "L P" <listaction@--------->
To:
Date: 12/5/2006 5:52:00 AM
Folks,



I've tried searching the lists, but could not find a definitive /
clear answer to this question, so here it goes:

How can I sort an xml list based on attributes dynamically ( I do not
know which attribute before hand)?

 For instance, I have the following xml:
 <reminders>
   <reminder category="Test" nm="XXX" description="foobar"/>
 <reminder category="Test12" nm="yyy" description="barfoo"/>
  </reminders>


I would like to sort the xml file based on the attribute which will be
supplied as a parameter.

So, assume that i have an xsl:param with the value of the attribute
that I would like the results to be sorted by.
I know that this can be accomplished if I change the xml structure and
make the attributes child elements, but that is not an option for me.

Is there any work around that can accomplish this without changing the
XSL file (before complie time)?

Also, I'm targetting user agents such as IE / Firefox that support XSL 1.0.



Thanks in advance


transparent
Print
Mail
Digg
delicious
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