Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Number formatting with

From: Ragnar Schierholz <raschi@---------->
To:
Date: 6/29/2000 11:58:00 AM
Hi!
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 
anymore.
The code I'm using looks like this:

<xsl:template match="option" mode="HTML">
<xsl:variable name="rowIndex"><xsl:value-of 
select="count(preceding-sibling::option)"/></xs:variable>
        <TR>
                <TD>
                        <xsl:number value="number($rowIndex+1)" 
format="a"/>
                </TD>
                <TD>
                        further row content
                </TD>
        </TR>
</xsl:template>

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,
                Ragnar
Attachment:
smime.p7s

Description: S/MIME Cryptographic Signature


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent