This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: arguments for xsl:call-template
- From: Sabrina Fords <Sabrina dot Fords at Yakara dot com>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 7 Dec 2001 17:25:31 -0000
- Subject: RE: [xsl] arguments for xsl:call-template
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi All,
I'm using saxon:tokenize() extension function, and I want to
count how many tokens this function returns.
How do I do this? I know that the tokenize() function uses the
StringTokenizer() java method but I just don't know how I count the nodes
in my stylesheet.
Any help/advice would be very much appreciated.
Sabrina
My xsl is as follows
<xsl:transform
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
version="1.0">
<xsl:output method="text" version="1.1" encoding="utf-8" indent="no"
omit-xml-declaration="yes"/>
<xsl:template match="field/text()">
<cdrrecord>
<xsl:variable name="string" select="."/>
<xsl:for-each select="saxon:tokenize($string,',')">
<subfield>
<xsl:value-of select="."/>
<xsl:text>,</xsl:text>
</subfield>
</xsl:for-each>
<xsl:text>
</xsl:text>
</cdrrecord>
</xsl:template>
</xsl:transform>
e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not an intended recipient, please notify info@yakara.com
immediately. Please note that some of our communications may contain
confidential information which it could be a criminal offence for you to
disclose or use without authority. This email is not intended nor should it
be taken to create any legal relations contractual or otherwise.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list