[xsl] getting string-length of tokenized string

Subject: [xsl] getting string-length of tokenized string
From: Mario Madunic <hajduk@xxxxxxxx>
Date: Tue, 28 Aug 2007 07:30:10 -0700
I'm trying to get the length of the current node in a tokenized string. What I'm
attempting to do is capitalize each first letter and lowercase the rest of the
string. I have no problem getting the length of the first via

<!-- where the var is coming from -->
<xsl:variable name="l_TempVar" select="tokenize($l_TempDateline, ' ')" />

<xsl:sequence select="concat(upper-case(substring($l_TempVar[1], 1, 1)),
lower-case(substring($l_TempVar[1], 2, string-length($l_TempVar[1]))))" />

but am having problems getting the length of any of the following items in the
tokenized var.

<xsl:sequence select="concat(' ', upper-case(substring($l_TempVar[.], 1, 1)),
lower-case(substring($l_TempVar[.], 2, string-length(.))))" />

this complains that I'm calling in all the nodes in the tokenized string.

Any insight will be appreciated.

Marijan (Mario) Madunic

Current Thread