xsl-list
[Top] [All Lists]

Re: can't get xsl:sort to work

2005-09-19 04:01:31
Tempore 12:58:08, die 09/19/2005 AD, hinc in 
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit UlyLee 
<ulyleeka(_at_)yahoo(_dot_)com>:

<xsl:for-each select="//complexarticle |
//simplearticle | //dummyarticle">
<xsl:sort select="@entry">
<tr valign="top">
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="@entry"/></td>
<td><xsl:variable name="x" select="count(.//xref)"/>
<xsl:for-each select=".//xref">
<xsl:value-of select="."/>
<xsl:if test="position() &lt; $x">
<br/>
</xsl:if>
</xsl:for-each>
</td>
</tr>
</xsl:sort>
</xsl:for-each>

but when i run the transformation (i'm using
xmlspy) i get and error "Expected select attribute or
non empty content not both" but i have a select
attribute.

The error message says it all.
You need:
<xsl:sort select="@entry"/>
you don't have to encapsulate the whole loop with this element;-)

regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Gaudiam omnibus traderat W3C, nec vana fides

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