Re: Using Javascript to pass a parameter to the <xsl:sort> element
Emmanouil Batsis <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Maria Amuchastegui wrote: > If I change the setParameter statements to this: > > xsltProcessor.setParameter(null, "'sortKey'", column); > xsltProcessor.setParameter(null, "'sortOrder'", order); > > And I change the <xsl:sort> element to this: > > <xsl:sort select="$sortKey" order="$sortOrder"/> > > Then nothing happens. Aaah, right. As the other fellow who answered your original post says, you cannot use expressions as values for attributes of xsl:sort. You need to restructure your code to conditionally call the right templates or something based on the variable value. Cheers, Manso