xsl-list
[Top] [All Lists]

[xsl] Using xsl:sort causes transformer to fail

2007-01-20 08:29:30
Hi,
I have an xsl:sort expression that doesn't always work all the time. Not sure why. Here is a segment of my code:

------------------------
xsl:for-each select="$group/ITEM">
<xsl:sort select="*[name()=$group/ITEM/*[name()=$rowKey]]/@*[name() = $sortBy]" order="{$sortOrder}" data-type="number"/>

 <xsl:if test="*[name()=$group/ITEM/*[name()=$rowKey]]">
   <xsl:call-template name="processItem">
        <xsl:with-param name="columnNode"  select="$columnNode"/>
        <xsl:with-param name="dataGroup"   select="$group"/>
        <xsl:with-param name="rowKey"              select="*[name()=$rowKey]"/>
<xsl:with-param name="repeatName" select="attribute::SORTNAME"/> </xsl:call-template>
 </xsl:if>
</xsl:for-each>

----------------------------------
This is the code that is failing:
<xsl:sort select="*[name()=$group/ITEM/*[name()=$rowKey]]/@*[name() = $sortBy]" order="{$sortOrder}" data-type="number"/>

if, I remove the following from the xsl:sort,

*[name()=$group/ITEM/*[name()=$rowKey]]/

The xsl transformation works fine. However, I need the code above for the sort to work.

Any suggestions?
Thanks.



--~------------------------------------------------------------------
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>