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

Re: Node set comnparison

Subject: Re: Node set comnparison
From: Nick Browne <NickBrowne@xxxxxxxxxxxxxxx>
Date: Thu, 16 Nov 2000 12:47:03 +0000
Re: Node set comnparison
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

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.