Subject: Converting a string to Uppercase or Lowercase without using translate() ?
From: "Gareth Howells" <subscriptions@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Nov 2007 18:59:34 -0000 (UTC)
|
Hello everyone,
I'm trying to convert a string to uppercase before using it in a select
statement using XSLT 1.0, and for now I'm using translate() as follows:
<xsl:variable name="pClubCaps" select="translate($pClub,
'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSSTUVWXYZ')" />
where $pClub is a parameter passed to the stylesheet from a JSP page. Of
course, converting to lowercase would simply require the second and third
parameters of translate() to be switched.
I was wondering if there's a nicer way of converting strings to upper or
lower case, rather than using translate()?
Thanks
Gareth
|