This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Making a string lowercase
- From: "Vasu Chakkera" <vasucv at hotmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 20 May 2002 09:59:41 +0000
- Subject: Re: [xsl] Making a string lowercase
- Reply-to: xsl-list at lists dot mulberrytech dot com
There are two ways of doing this.. either u use the translate function to do
some thing in the lines of
translate($myvariable,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqqrstuvwxyz')
or u may use the extension library along the lines of
the following code
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="java" >
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/colleges/college">
<h3>
<xsl:variable name="tmp" select="java:lang.String.new(.)"/>
<xsl:value-of select="java:toUpperCase($tmp)"/>
</h3>
</xsl:template>
</xsl:stylesheet>
for an xml
<colleges>
<college>fau</college>
<college>mu</college>
<college>svu</college>
</colleges>
you wud see the result in the caps..
HTH
>Joel Konkle-Parker schrieb:
>>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Is there a way to pull the value of a node from an XML file and
>>convert it to all-lowercase?
>>
>>- -joeljkp
>
>
>
>XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list