[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] arbitrary sorting (part II)
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|