Re: Using Javascript to pass a parameter to the <xsl:sort> element
"news.mozilla.org" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
1359734
Maria Amuchastegui wrote:
> I am trying to use Javascript to pass a parameter to the <xsl:sort> element.
> The parameter seems to be getting passed but the data is not sorting. I read
> "The XSLT/JavaScript Interface in Gecko" but the code does not seem to work.
> Any suggestions on how to get it to work?
>
> <xsl:sort select="*[name() = $sortKey]" order="{$sortOrder}"/>
order is not an expression in XSLT 1.0.
<xsl:sort
select = string-expression
lang = { nmtoken }
data-type = { "text" | "number" | qname-but-not-ncname }
order = { "ascending" | "descending" }
case-order = { "upper-first" | "lower-first" } />