cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya A. Kriveshko" <i...@infoinsomniax.com>
Subject Re: dynamic xsl:sort
Date Thu, 24 Aug 2000 19:58:15 GMT
What the FAQ says about it is bullshit! (sorry)

The following works quite nicely for me!

<xsl:sort select="*[$sortby=name()]"/>

And there is no need to use multiple stylesheets in this case.
---
Ilya.

P.S.:

Joshua's example would read:

<table>
 <xsl:for-each select="*">
  <xsl:sort select="*[name()=$sort]"/> <!-- HERE -->
   <tr>
    <xsl:for-each select="*">
     <td><xsl:value-of select="."/></td>
    </xsl:for-each>
   </tr>
  </xsl:for-each>
 </table>



Joshua Spoerri wrote:

> http://www.laidback.org/dpawson/xsl/N6461.html#N14975 says:
>
>         Expressions in the style sheet have to be there in the source code.
>         There is no way to supply them by parameters, to construct them at
>         run-time, or to read them from the source document. The only way out
>         is to generate the style sheet.
>
> sorry; by "intermediate sheet" i meant "generated sheet".
> this is gross though. any idea why this limitation exists?
>
> On Thu, Aug 24, 2000 at 02:44:32PM -0400, Matthew Cordes wrote:
> > Nope that won't work.  Try the xsl faq here: http://www.dpawson.co.uk/.
> >
> > On Thu, Aug 24, 2000 at 08:13:36AM -0400, Joshua Spoerri wrote:
> > > please don't tell me i have to use an intermediate sheet to do this.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message