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

Re: Selecting case insensitively

Subject: Re: Selecting case insensitively
From: Michal_Mart@xxxxxxxxxxx
Date: Tue, 15 Aug 2000 15:44:47 -0400
Re: Selecting case insensitively

Hi,
I tried to get "insensitively" unique records from a list and I failed,  what am
I missing?
Based on the FAQ http://www.dpawson.freeserve.co.uk/xsl/N2696.html#N8679 and
Jeni's http://sources.redhat.com/ml/xsl-list/2000-08/msg00787.html I wrote the
following:

********* xml file ****************
<location>
   <state>xxxx</state>
 </location>

 <location>
    <state>yyyy</state>
 </location>

  <location>
    <state>xxxx</state>
 </location>

  <location>
    <state>xxXx</state>
 </location>
********* end xml file ***********

********* xsl file ****************
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

<xsl:template match="/">

     <xsl:variable name="unique-list"

select="Test/location/state[not(translate(.,$lowercase,$uppercase)=translate(following::state,$lowercase,$uppercase))]"


/>

     <xsl:for-each select="$unique-list">
     <xsl:value-of select="." /><BR/>
     </xsl:for-each>

</xsl:template>
********* end xsl file ***********

********* result file    ***********
xxxx<BR />yyyy<BR />xxXx<BR />
********* end result file  *******

I expected to get xxxx<BR />yyyy<BR /> as a result.

Thank you for your time and any help you provide.

Best,
Michal



 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.