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

Re: How to get a case insensetive grouping ??

Subject: Re: How to get a case insensetive grouping ??
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Thu, 28 Feb 2002 10:14:36 +0100
Re:  How to get a case insensetive grouping ??
Well, there is a general rule for using keys.

"The value used for looking up stuff via a key should be
fiddled with the same way as in the key definition"

Some examples:
Normalizing space:
 <xsl:key name="n-stuff" match="stuff"
   use="normalize-space(.)"/>
use
     select="key('n-stuff',normalize-space($val))"

Transforming characters:
 <xsl:key name="t-stuff" match="stuff"
   use="translate(.,$up,$lo)"/>
use
     select="key('t-stuff',translate($keyval,$up,$lo))"

A composite key value:
 <xsl:key name="l" match="locale"
   use="concat(country,'_',language)"/>
use
     select="key('l',concat($c,'_',$l))"

The rule is particularly important when using keys for Munchean
grouping, because the values for lookup come from the source
XML and cannot be supposed to be already in a proper form.

Unfortunately, this rule is not in any of the FAQs, and even
if it were, those in need to be reminded would hardly look for
it.

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.