Subject: RE: [xsl] String Case Conversion: Title Case From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 07 Oct 2009 11:44:48 -0400 |
> 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}.
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] String Case Conversion: T, Michael Kay | Thread | RE: [xsl] String Case Conversion: T, Mario Madunic |
Re: [xsl] Different results on diff, Joelle Tegwen | Date | Re: [xsl] Different results on diff, Joelle Tegwen |
Month |