Subject: Re: arbitrary sorting (part II) From: Walid.Daccache@xxxxxxxxxxxxxxxx (SoftLiban DACCACHE Walid) Date: Thu, 13 Jul 2000 08:34:29 +0300 |
Hey Oliver, It is a good Idea. I was just wondering if you can sort ascending and descending or just one way. Oliver Becker wrote: > Hey, after submitting my mail I got an idea - and - it works!! :-)) > > For those of you who are interested: > > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:m ="urn:non-null-namespace"> > > <m:month name="Jan" value="1" /> > <m:month name="Feb" value="2" /> > <m:month name="Mar" value="3" /> > <m:month name="Apr" value="4" /> > <m:month name="May" value="5" /> > <m:month name="Jun" value="6" /> > <m:month name="Jul" value="7" /> > <m:month name="Aug" value="8" /> > <m:month name="Sep" value="9" /> > <m:month name="Oct" value="10" /> > <m:month name="Nov" value="11" /> > <m:month name="Dec" value="12" /> > > <xsl:template match="report-list"> > <xsl:apply-templates> > <xsl:sort select="document('')//m:month[@name=current()/@month]/@value" > data-type="number" /> > </xsl:apply-templates> > </xsl:template> > > </xsl:stylesheet> > > BTW: My test suite yields: > - XT and LotusXSL/Xalan 1.0.1 ok > - Saxon 5.3.2 failed (Mike K., are you listening?) > - Oracle 2.0.2.8 XSLException > (XSL-1008: Namespace prefix 'm' used but not declared.) > > Best regards, > Oliver > > /-------------------------------------------------------------------\ > | ob|do Dipl.Inf. Oliver Becker | > | --+-- E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx | > | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | > \-------------------------------------------------------------------/ > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
arbitrary sorting (part II), Oliver Becker | Thread | Re: arbitrary sorting (part II), Richard Light |
XSLT regression tests., Paul Tchistopolskii | Date | "Simple" matrix transformation, Eric E. Cohen |
Month |