File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes how to capitalize first letter of string from value-of...? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to capitalize first letter of string from value-of...?" Watch "how to capitalize first letter of string from value-of...?" New topic
Author

how to capitalize first letter of string from value-of...?

Holmes Wong
Ranch Hand

Joined: Feb 18, 2002
Posts: 163
Hi,
I am wondering how to capitalize the first letter of the string
I get from the following xsl expression:

Could not figure it out by searching books....
thanks,
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Well that would be a complex thing, but it could be done.
Using substring functions, get the first letter into a variable - firstLetter.
Similarly, get the rest of the string into another variable - restOfTheString
Then, use translate to translate the firstLetter to capital.
Concat the firstLetter to the restOfTheString.
Any better approaches....feel free
Regards.
- madhav


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to capitalize first letter of string from value-of...?