Subject: RE: Capitalizing content of a variable
From: "Nitin Dutt Mathur" <nitin@xxxxxxxxxxxx>
Date: Thu, 9 Aug 2001 11:38:58 +0530
|
Hello Goetz and Micheal,
That ok we can use translate function to change the value of a variable but
my exact problem is more complex. The contents of variable which I want to
capitalize are not know in advance (They are know only at runtime).
Precisely, suppose the xml is
<component ..>
<xsl:variable name="foo">
<!-- do dome processing to get the value of variable-->
</xsl:variable>
<!-- At this point I want to have the capitalize value of the contents of
foo variable (may be in same variable or in some other variable. -->
</component>
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.
Nitin
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Goetz Bock
> Sent: Wednesday, August 08, 2001 7:50 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: Capitalizing content of a variable
>
>
>
> > > I want to capitalize the content of a string variable. For
> > > instance I have a variable foo with value abcdef, now I want
> > > to have another variable newfoo with the value Abcdef.
> > translate($x, 'abcdef...', "ABCDEF...")
> The original poster just wanted to capitalize the first letter, so (s)he
> hast to use substring to get the right char ...
> --
> Goetz Bock IT Consultant
> Dipl.-Inf. Univ.
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|