Re: Node set comnparison
Jeni/Mike, thanks for that, I'm glad my understanding was correct. I had a quick check with Oracle 188.8.131.52, Instand Saxon 5.3.2 & 5.5.1 and MSXML (prod version). These were the results for just the first test : a. test="$set1 > $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 > $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 > $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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format