xsl-list
[Top] [All Lists]

[xsl] xslt sort dilemna

2008-09-09 14:14:43
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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>