String-length

Subject: String-length
From: Thomas Karlsen <ThomasK@xxxxxxxxxxxxxxx>
Date: Mon, 13 Dec 1999 12:22:18 +0100
Im trying to hold track over how many char. i'm sending to the output.

xml:
<section>
 <para>this is a test</para>
 <para>this is a test</para>
 <para>this is a test</para>
 <para>this is a test</para>
</section>

xsl:
<template match="section">
 <apply-templates />
</template>

<template match="para">
 This para contains: <xsl:value-of select="string-length()"/>
 Total from para number 1 to <xsl:value-of select="position()"/>:
<xsl:value-of select="string-length(preceding-sibling::para)"/>
 <apply-templates />
</template>

My question is how can I add the string-values for the para's that is
already traversed?
The preceding-sibling function only gives me the value of the first para in
the node-set.

Please help

__ Thomas Karlsen | System Developer
__ Cell Network ASA | New Media Science | Sørkedalsveien 10A, N-0304 Oslo,
Norway
    Tel: +47 23196600 | Fax: +47 23196601 | Mob: +47 91514293


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread