This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Making a string lowercase


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]