[xsl] can't get xsl:sort to work

Subject: [xsl] can't get xsl:sort to work
From: UlyLee <ulyleeka@xxxxxxxxx>
Date: Mon, 19 Sep 2005 03:58:08 -0700 (PDT)

i'm working on an xml file that needs to convert into
a table (html format). and i have this xsl coding:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
<xsl:output method="html" version="1.0"
encoding="UTF-8" indent="yes"/>

<xsl:template match="/">
<table cellspacing="10">
<tr align="left">
<th>Col. 1</th>
<th>Col. 2</th>
<th>Col. 3</th>
<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">


i'm using version 2.0 coz i need to output multiple
files. 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. what's wrong with my xsl file.


Yahoo! Mail - PC Magazine Editors' Choice 2005 

Current Thread