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

String comparisons fail unexpectedly: how can 'USA' no

Subject: String comparisons fail unexpectedly: how can 'USA' not be 'USA'?
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
Date: Wed, 27 Feb 2002 12:26:56 -0000
usa.no
Dear list,

this is very frustrating! I want to pull out lots of records from a data
source using a list. The data source has records that look like this:
<Billcode corp="EvilEmpire" country="USA">

and the list is an html table with rows like this:

<tr><td>EvilEmpire</td><td>USA</td></tr>

Initially I tried using a key with use="concat(@corp,'::',@country)" but no
joy, after a lot of trying things out very patiently or not so patiently I
tried this:

<xsl:value-of select="Billcode[2]/@country"/>
<xsl:value-of select="'USA'=Billcode[2]/@country"/>

and got, to my surprise, "USAfalse".

There must be something important I don't know about string comparisons!

I've tried wrapping things in string( )s but to no avail. 
Any help much appreciated,

Tom SW

 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.