Re: Using Javascript to pass a parameter to the <xsl:sort> element

"Maria Amuchastegui" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization epost
Message-ID <[email protected]>
If I hard code the attributes in the <xsl:sort> element, then the data does 
sort:

<xsl:sort select="location" order="descending"/>

But I want to pass the sort parameters as variables,  something like this:

<xsl:sort select="$sortKey" order="$sortOrder"/>


"news.mozilla.org" <[email protected]> wrote in message 
news:[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" } />
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.