xsl-list
[Top] [All Lists]

Re: xsl:sort ... jeff comes before Jeff?

2002-10-16 10:14:19
On Wed, Oct 16, 2002 at 12:19:31PM -0400, Roger L. Costello wrote:
<xsl:variable name="names" select="/FitnessCenter/Member[1]/Name"/>
<xsl:for-each select="/FitnessCenter/Member[position() &gt; 1]">
             <xsl:variable name="names" select="concat($names, '/')"/>
              <xsl:variable name="names" select="concat($names, Name)"/>
 </xsl:for-each>
<xsl:value-of select="$names"/>

xalan and xt have no problems with it.

saxon generates two error messages - saying that name has been redclared.

Who's right?  /Roger

  Saxon is, that's explicitely forbidden.
xsltproc also raises a runtime error about it.

paphio:~ -> xsltproc tst.xsl tst.xsl 
runtime error: file tst.xsl line 6 element variable
xsl:variable : redefining names
no result for tst.xsl
paphio:~ -> 

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard(_at_)redhat(_dot_)com  | libxml Gnome XML XSLT toolkit  
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

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



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