Web Development

General discussion


Convert text case with XSL

By Mark W. Kaelin Editor ·
Has the conversion of text case been a nuisance for you in your interaction with legacy systems?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Alias ka reply In reply to Convert text case with XS ...

I felt it is good because i came to know about translation function.

Collapse -

This is pathetic

by grantwparks In reply to Convert text case with XS ...

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.

Collapse -

Pathetic? Please Elaborate

by Mark W. Kaelin Editor In reply to This is pathetic

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?

Collapse -

US centric and therefore flawed

by sholmes In reply to Convert text case with XS ...

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!!

Collapse -

Global Concerns and an Answer

by Mark W. Kaelin Editor In reply to US centric and therefore ...

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.

Related Discussions

Related Forums