Subject: Re: [xsl] xslt sort dilemna From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 09 Sep 2008 14:57:53 -0400 |
<xsl:for-each select="//ret|$file2//ret"> <xsl:sort select="filing" order="ascending" data-type="text"/> <xsl:sort select="State" order="ascending" data-type="number"/>
<xsl:variable name="merged-set" select="//ret|$file2//ret"/> <xsl:for-each select="$merged-set"> <xsl:sort ...
Cheers, Wendell
I have 2 xml that I am merging, something like this:
<xsl:for-each select="//ret|$file2//ret">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:apply-templates>
<xsl:sort select="filing" order="ascending" data-type="text"/>
<xsl:sort select="State" order="ascending" data-type="number"/>
</xsl:apply-templates>
</xsl:element>
</xsl:for-each>
Couple of questions: 1. Above xsl:for-each merges 2 xml documents. Now I want to apply sort on the merged output. I tried putting sort inside apply-templates as well as moving inside for-each. It doesn't seem to work. I am trying to sort on 2 elements. Is there a way I can sort on merged output.
2. Also, when I put sort in for-each it sort only one document at a time, but second sort on "State" doesn't work.
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xslt sort dilemna, Mohit Anchlia | Thread | Re: [xsl] xslt sort dilemna, Mohit Anchlia |
Re: [xsl] accessing attributes, Wendell Piez | Date | Re: [xsl] accessing attributes, Tom Wright |
Month |