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

Re: XSLT function for title capitalization?

Subject: Re: XSLT function for title capitalization?
From: "Peter Flynn peter@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 9 Apr 2018 23:39:55 -0000
Re:  XSLT function for title capitalization?
On 09/04/18 22:04, John Lumley john@xxxxxxxxxxxx wrote:
> The simplest would be to tokenise to words and then apply-templates with
> three cases:
> 
> 1. [1] B capitalize($word)
> 2. $word = (bof,'and'... /etc.) - $word/
> 3. capitalize($word)

Plus exceptions. O'Reilly does NOT become O'reilly. McMahon does not
become Mcmahon, etc etc.

If you have to do it, you have to do it, but I agree with Michael, it's
incredibly ugly, and (fortunately) restricted mainly to the USA these
days, from what I see printed and published this side of the pond. And
USA publishers are *very* conservative.

Best is to store them all with sentence capitalisation (that is, init
cap on first word and proper nouns only), and have a word-capitalisation
routine to output them that way when needed.

///Peter

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.