[xsl] XSL Sort problem

Subject: [xsl] XSL Sort problem
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxx>
Date: Tue, 14 Oct 2003 10:30:55 -0700
Hello, I can not seem to get a sort to work.

The source document is an XML REF:
<xsl:variable name="rateit_lu" select="document('rateit_lookup.xml')/A"/>

The XML source (simple) looks like this:
<A>
 <AXRATE item="Untouched Lead" value="0"/>
 <AXRATE item="No Contact - sent props" value="1"/>
 <AXRATE item="Confirmed receipt of proposal" value="2"/>
 <AXRATE item="Spoke with person who makes descisions - Client has our
props" value="3"/>
 <AXRATE item="Waiting on final decision" value="4"/>
 <AXRATE item="Waiting on client to fax in order" value="5"/>
 <AXRATE item="Sold!" value="6"/>
</A>

My apply-templates looks like this (i've tried the following):
  <xsl:apply-templates select="$rateit_lu//AXRATE"
mode="get_RateIT_Selection">
    <xsl:with-param name="rate">0</xsl:with-param>
    <xsl:sort select="$rateit_lu//AXRATE/@item" />
  </xsl:apply-templates>

  <xsl:apply-templates select="$rateit_lu//AXRATE"
mode="get_RateIT_Selection">
    <xsl:with-param name="rate">0</xsl:with-param>
    <xsl:sort select="@item" />
  </xsl:apply-templates>

Ultimately, I need to sort by @value where value is a number ranging from -3
to 6
  <xsl:apply-templates select="$rateit_lu//AXRATE"
mode="get_RateIT_Selection">
    <xsl:with-param name="rate">0</xsl:with-param>
    <xsl:sort select="$rateit_lu//AXRATE/@value" />
  </xsl:apply-templates>

  <xsl:apply-templates select="$rateit_lu//AXRATE"
mode="get_RateIT_Selection">
    <xsl:with-param name="rate">0</xsl:with-param>
    <xsl:sort select="@value" />
  </xsl:apply-templates>


None of these work at all.  What do you suppose the problem is?

Karl



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread