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

RE: Capitalizing content of a variable

Subject: RE: Capitalizing content of a variable
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Thu, 09 Aug 2001 13:59:54 +0200
upcase xsl
Tony Graham <Tony.Graham@xxxxxxxxxxxxxxx> wrote:
> Joerg Pietschmann wrote at  9 Aug 2001 10:29:54 +0200:
>  > You may also include non-ASCII characters in the translation string, if
>  > necessary. The following can be used to upcase german umlauts:
>  >   <xsl:variable name="lower" select="'&#xE4;&#xF6;&#xFC;'"/>
>  >   <xsl:variable name="upper" select="'&#xC4;&#xD6;&#xDC;'"/>
> 
> Yes, but that's not going to work for &#xDF;, LATIN SMALL LETTER SHARP 
> S, which has an uppercase mapping to 'SS', is it?
> 
> The other classic case is 'i', which has an uppercase mapping to
> &#x130; in Turkish and Azeri only.
> 
We should be grateful that there are simple solutions at least for
*some* parts of the problem space. :-)

But as you brought up the point: AFAIK both "MASSE" and "MASZE" are
valid uppercase versions for "Ma&#xDF;e", because the former is
ambiguous, legal texts prefer the latter. So upcasing (<-- is this
already a legal word?) strings may depend on a wider context.
Fortunately, because &szlig; (=&#xDF;) must not be the first character
of a word, this is irrelevant for capitalisations. Furthermore,
translate() is not strictly intended to handle localised string
manipulations, the standard developers may claim abuse :-)

I have to say that it is surprisingly hard to get comprehensive,
precisely worded standards for localised, language dependend string
processing. The Unicode Standard goes a long way to provide definitions
of categories to think in, but such stuff as what is applicable
for a certain language such as character set, concepts of character
case, case transformations, collation rules and the like appears to
be spread across a lot of paper. My edition of the "Duden" has
rather ambiguous formulations, and it does not even mention the
DIN-Standards regulating these details for the german language. Apart
from this, swiss regulations differ in minor but important details,
most notably there is no &szlig; in swiss german, which makes your
first problem irrelevant to me.
If you have some good sources, I'd be quite interested in hearing about
them.

Regards
J.Pietschmann

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.