Subject: Re: [xsl] String length question From: Anton Triest <anton@xxxxxxxx> Date: Fri, 22 Oct 2004 01:25:31 +0200 |
Hi Marcio,I want to now the sum of the lengths of attribute descriptions in the xml below
<folder description="Ngin Mart"> <folder description="Clientes"/> <folder description="Desempenho"/> <folder description="MyReports"> </folder>
I have tried this:
<xsl:template match="folder mode="left_menu"> <xsl:variable name="sizeTotal" select = 'string-length(descendant::folder/@description)'/> <table border="0" cellspacing="0" cellpadding="0" width="{count(folder)*$sizeTotal}"> <tr> <xsl:apply-templates select="folder" mode="left_menu"/> </tr> </table> </xsl:template>
The variable "sizeTotal" will be the width of the table.
But dont work.
<xsl:template match="folder" mode="left_menu"> <xsl:variable name="all-descriptions"> <xsl:copy-of select="descendant::folder/@description"/> </xsl:variable> <xsl:variable name="sizeTotal" select="string-length($all-descriptions)"/> ... </xsl:template>
HTH, Anton
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] String length question, Márcio Ferreira | Thread | [xsl] disable-output-escaping in xs, Stefan Borchert |
Re: [xsl] Identity Transform Groupi, Anton Triest | Date | [xsl] disable-output-escaping in xs, Stefan Borchert |
Month |