[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: Problems with sort.
Subject: Re: Problems with sort. From: "Scott Boag/CAM/Lotus" <Scott_Boag@xxxxxxxxx> Date: Mon, 12 Jun 2000 17:13:09 -0400 |
"Brian Burridge" <brian_burridge@xxxxxxxxxxxxx> wrote: > > > <xsl:sort select="*[name()=/PAGE/@sort]" data-type="{$sortType}"/> > > > > That one's correct. Which XSLT processor are you using? > I'm using Lotus XSL. I haven't been keeping up with this thread, but the fragment should work in LotusXSL/Xalan. If I do: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version ="1.0"> <xsl:template match="a"> <out> <xsl:variable name="sortType" select="'text'"/> <xsl:for-each select="c"> <xsl:sort select="*[name()=/PAGE/@sort]" data-type=" {$sortType}"/> </xsl:for-each> </out> </xsl:template> </xsl:stylesheet> It seems fine. Notice the quote around the value in the variable, since the value needs to be a string... an rather odd case where a string can hold a qname. Or: <xsl:variable name="sortType">text'</xsl:variable> Seems fine also. Or: <xsl:variable name="sortType" select="foo"/> where foo holds a "text" or "number", seems to be fine also. However, note that LotusXSL/Xalan ONLY recognizes "text" or "number" at this time, and will throw the error you're giving if you pass it a qname. This should be considered a bug. -scott XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Problems with sort., Brian Burridge | Thread | Re: Problems with sort., Brian Burridge |
RE: differentiation between text() , Z. Uzmi | Date | Unique set values, Carlos Sanchez |
Month |
Keywords