Discussion Locked

Convert text case with XSL

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Has the conversion of text case been a nuisance for you in your interaction with legacy systems?

5 replies

by grantwparks

I've subscribed to this newletter and continued to hope for the best, but y'all are so far behind. It's time for me to call it as I see it.

by Mark W. Kaelin

Grantwparks, would you please elaborate for us? I take it this tip didn't help you - that you consider it to rudimentary for your skills? What topics would you like to see this TechMail address concerning XML?

by sholmes

There's a whole world out there for whom A-Z doesn't cut it.

A better solution is to have a locale aware case class based on Unicode that's called externally from the stylesheet to perform the transformation.

Tut, tut! Global indeed!!

by Mark W. Kaelin

I also received a similar comment in an e-mail:

"Your tip about converting text case with XSL works fine if the document will only ever contain American English text. However, any use of other languages will probably being this scheme crashing down. Not only will languages that use non-roman alphabets break completely, but even European languages contain numerous accented characters in the higher reaches of the ASCII code that will not work with this tip. In the future, please try and present solutions that will work with most problems of a similar nature, rather than just a small subset."

Brian?s response deflects some of these comments:
"The "tip" does apply to any language that supports upper and lower case character sets that can be represented in XML. The example within the tip doesn't necessarily apply to all languages - but the concept presented definitely does. It's simply a matter of arranging the $uppercase and $lowercase variables with the characters that make up theparticular language."

Keep in mind that these TechMail tips have a limited word count.

This discussion is closed to new replies.