This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
String comparisons fail unexpectedly: how can 'USA' not be 'USA'?
- From: TSchutzerWeissmann at uk dot imshealth dot com
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 27 Feb 2002 12:26:56 -0000
- Subject: [xsl] String comparisons fail unexpectedly: how can 'USA' not be 'USA'?
- Reply-to: xsl-list at lists dot mulberrytech dot com
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