This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: String comparisons fail unexpectedly: how can 'USA' not be 'USA'?


>ouch......

Thanks for your sympathy! In the end, I have had to use this:

  <xsl:variable name="current" select="."/>
          <xsl:for-each select="$contacts/TR">
		<xsl:variable name="corp" 
              select="./TD[5]/FONT/text()"/>
            <xsl:variable name="cty" 
              select="./TD[3]/FONT/text()"/>
<xsl:apply-templates 
 
select="$current/Corporation[@code=$corp]/Access[contains(Billcodes/Billcode
/@Country, $cty)]/Panels">
...

which is horrid.

Is there a way of using keys instead? I haven't had much luck with keys even
though previously they've been fine. For example, the Corporation/@code
doesn't have any problem with leading space so I tried this:

<xsl:key name="cc" match="Corporation" use="@code"/>   #before the first
template

and replace the apply-templates above with

xsl:apply-templates 
 
select="key('cc',$corp)/Access[contains(Billcodes/Billcode/@Country,
$cty)]/Panels"/>

and it broke, ie, no templates were applied past this one. what's going
wrong? 

Thanks for your help,
TOm

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]