RE: newbie question: how do i capitalize text?

Subject: RE: newbie question: how do i capitalize text?
From: "Duane Nickull" <duane@xxxxxxxxxxxxx>
Date: Fri, 21 Jan 2000 09:10:59 -0800
Title: newbie question: how do i capitalize text?
Joni:
 
Becuase XML is case sensetive,  a transformation of case is semantically equivalent to transforming to a new string.  As far as I know,  there is no XSL functionality to easily convert from one to the other. 
 
Becuase I can see you are wanting an HTML output,  I would presume the end user of your data is using a browser.
Accordingly, I would suggest that your best (and probably the most elegant solution) would be to employ a third party scripting language like _javascript_.   I believe the function is String.toUpperCase()
 
Use the following wrapper for any _javascript_ within an XSL stylesheet: 
 
<xsl:comment>
<![CDATA[  
 
your code here
 
]]>
</xsl:comment>
 
Duane Nickull

[Duane Nickull]  -----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Joni Fazo
Sent: Thursday, January 20, 2000 5:37 PM
To: 'XSL-List@xxxxxxxxxxxxxxxx'
Subject: newbie question: how do i capitalize text?

Hello,

Is it possible to capitalize some text that my xsl file selects from xml?

If I have some XML like:
<DOCUMENT>
        <GREETING>Hello World!</GREETING>
</DOCUMENT>


and some XSL like:
<html>
<b><xsl:value-of select="GREETING"/></b>
</html>

Is there any way to capitalize the result of <xsl:value-of select="GREETING"/> so I get "HELLO WORLD!" instead of "Hello World!"?

Thanks,
Joni

Current Thread