Re: [xsl] XSLT function for title capitalization?

Subject: Re: [xsl] XSLT function for title capitalization?
From: "Peter Flynn peter@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 9 Apr 2018 23:39:55 -0000
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