Re: Node set comnparison

Subject: Re: Node set comnparison
From: Nick Browne <NickBrowne@xxxxxxxxxxxxxxx>
Date: Thu, 16 Nov 2000 12:47:03 +0000
Jeni/Mike, thanks for that, I'm glad my understanding was correct. I had a
quick check with Oracle 2.0.2.9, Instand Saxon 5.3.2 & 5.5.1 and MSXML (prod
version). These were the results for just the first test :

a. test="$set1 &gt; $set2" (should give false)
                      Ora          Saxon 532   551        MSXML3
Without 'abc'   True        False           False      False
With 'abc'        True        True            True       False

Just in case I'm doing something really stupid in my test I have included it
below :

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>
<xsl:variable name="set1" select="/dummy/set1/value"/>
<xsl:variable name="set2" select="/dummy/set2/value"/>
<xsl:template match="/">
<HTML><BODY>
 <BR />a. Node set 1  >  Node set 2 =
  <xsl:choose>
   <xsl:when test="$set1 &gt; $set2">True</xsl:when>
   <xsl:otherwise>False</xsl:otherwise>
  </xsl:choose>
 <BR />b. Node set 2 > Node set 1 =
  <xsl:choose>
   <xsl:when test="$set2 &gt; $set1">True</xsl:when>
   <xsl:otherwise>False</xsl:otherwise>
  </xsl:choose>
</BODY></HTML>
</xsl:template>
</xsl:stylesheet>

I did notice that Saxon returns a string value of 'NaN' as '1' which might
explain the result.

Regards

Nick Browne
Slipstone Ltd



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


Current Thread