Subject: arbitrary sorting (part II) From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 12 Jul 2000 19:32:07 +0200 (MET DST) |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: arbitrary sorting, David Carlisle | Thread | Re: arbitrary sorting (part II), SoftLiban DACCACHE W |
Re: MSXML 3.0 XSLT. Does it work?, sotiris | Date | Xalan problem, Daniel Malone |
Month |