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

Re: upper case

Subject: Re: upper case
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 21 Aug 2001 13:11:23 -0400
xml uppercase
John,

At 09:01 AM 8/21/01, you wrote:
<xsl:value-of
select="translate($string,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRST
UVWXYZ')"/>

is this the only way to make a string upper case?

No, but it's the canonical way.


 is it not very
inefficient?

Inefficient how? With respect to the implementation, that depends on the processor. With respect to the notation, it's inefficient in comparison to Perl, but efficient in comparison to (say) assembler code. XSLT/XPath syntax is not optimized for string handling.


Experienced XSLTers will commonly declare variables and do something like

<xsl:value-of select="translate($string, $lowercase, $uppercase)"/>

to alleviate a legibility/maintenance burden.

my xml needs to support other languages, do i need to worry about letters
with accents? do they have uppercase versions too?

Generally, yes. There was a thread on this stuff just recently: see http://www.biglist.com/lists/xsl-list/archives/200108/msg00561.html. Internationalization/localization issues are complex and not to be comprehended in a short post or even a long one.


Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



Current Thread
  • upper case
    • john wa - Tue, 21 Aug 2001 09:10:56 -0400 (EDT)
      • Goetz Bock - Tue, 21 Aug 2001 09:40:31 -0400 (EDT)
      • Wendell Piez - Tue, 21 Aug 2001 13:43:58 -0400 (EDT) <=

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.