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]

RE: Capitalizing content of a variable


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@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Goetz Bock
> Sent: Wednesday, August 08, 2001 7:50 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: Re: [xsl] 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


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