[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: replace -x to -X

Subject: Re: replace -x to -X
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 10 Jul 2006 17:14:20 +0100
renate welch
On 7/10/06, Renate <renaate@xxxxxxxxx> wrote:
I have a string $tmp_string.

for ex., JIMMY-DIMMy

And I need to change the following:
first letter is in uppercase
other letters are in lowercase
first letters after "-" sign also is in uppercase

the result will be:

I know how to make Jimmy-dimmy, but how to make Jimmy-Dimmy...???

If you are transforming to HTML then you might want to use CSS:

text-transform: capitalize

This will do what you're after.  If you want to do it in XSLT then I
you'll have to use a recursive solution in 1.0 or tokenize in 2.0 (or
1.0 + extensions) with translate and substring.


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.