Subject: RE: Capitalizing content of a variable
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 9 Aug 2001 10:20:34 +0100
|
> Since at the time of transforming the contents of variable I
> don't know the
> exact contents hence I unable to figure out how to use
> translate function.
Sorry if I was assuming too much knowledge.
If the data is in a variable named foo, write
<xsl:value-of select="
concat(
translate(substring($foo,1,1), "abcdefg.... ", "ABCDEFG..."),
substring($foo, 2)
)"/>
It probably makes sense to put the lower-case and upper-case alphabets in
global variables.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|