Number formatting with <xsl:number />

Subject: Number formatting with <xsl:number />
From: Ragnar Schierholz <raschi@xxxxxxxxxx>
Date: Thu, 29 Jun 2000 16:57:30 -0500
I'm using Xeena 1.1 to create HTML files from XML files.
I'm dealing with a list of <option> elements which should be displayed in 
a table, each row one element. To make it a little more readable, I would 
have to have an index (formatted as a), b), c) ...) for each row. To 
obtain the current index I count the preceding-sibling::option axis. This 
all works pretty well, just when I want to convert the numerical index 
into the corresponding letter, the XSL engine can't parse the stylesheet 
The code I'm using looks like this:

<xsl:template match="option" mode="HTML">
<xsl:variable name="rowIndex"><xsl:value-of 
                        <xsl:number value="number($rowIndex+1)" 
                        further row content

The error message is pretty meaningless:
XSL Error: SAX Exception, Location file: option.xsl, line 15, offset 62 
(which is actually the closing angle bracket of the <xsl:number/> tag)

If I replace the 
        <xsl:number value="number($rowIndex+1)" format="a"/>
tag with 
        <xsl:value-of select="number($rowIndex+1)"/>
I get the index I want, just as number and not as a letter. Since I 
already use numbers for a different level of nested list, this would cause 
confusion and I don't want to get into hierarchical numbering, because 
this would make the column pretty wide (besides I would also want to do 
that with <xsl:number> and not manually).
What do I do wrong? Or doesn't the XSLT engine in built-in Xeena support 
<xsl:number>? I thought that was a mandatory element...

Any ideas?

Thanx in advance,

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Current Thread