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

RE: String Case Conversion: Title Case

Subject: RE: String Case Conversion: Title Case
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 7 Oct 2009 08:43:06 +0100
RE:  String Case Conversion: Title Case
> I have used upper-case and lower-case methods in xslt2.0. But 
> I like to know, how to convert Title-Case/Upper-Lower Case. 
> Could any one share with me the logic for this.
> 

There is no function for creating title-case in the standard function
library because it was considered too culturally sensitive. Conventions for
capitalizing titles vary greatly from one country to another, and even among
different publishers within the same country (compare British with US
newspapers, for example). Simply forcing any letter to lower-case if it is
preceded by another letter and to upper-case otherwise does not give
acceptable results in any country, but if that's what you want to do, it's
easy enough to write your own function. You can test whether a character is
a letter using the regex construct \p{L}.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.