xsl-list
[Top] [All Lists]

RE: [xsl] problem with boolean AND expression [false AND false ->true] in xslt2.0

2009-12-10 06:51:25

Check your spelling of "entry" vs "Entry". XML is case-sensitive.

To avoid such errors, consider using schema-awareness, which will check the
names appearing in path expressions against the names that are valid
according to the schema.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay  

-----Original Message-----
From: Robby Pelssers [mailto:robby(_dot_)pelssers(_at_)ciber(_dot_)com] 
Sent: 10 December 2009 11:32
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] problem with boolean AND expression [false AND 
false ->true] in xslt2.0

Hi all,

I have the weirdest problem with the result of a AND 
expression of 2 booleans.  I'm using Saxon8.7 FYI.
    <xsl:variable name="symbolAndParameterAreEqual"
select="deep-equal($previousRow/Entry[1], 
$currentRow/Entry[1]) and deep-equal($previousRow/Entry[2], 
$currentRow/Entry[2])"
as="xs:boolean"/>    
 
    <xsl:comment>
    symbol matches precedingrow = <xsl:value-of 
select="deep-equal($previousRow/entry[1], $currentRow/entry[1])"/>  
    parameter matches precedingrow = <xsl:value-of 
select="deep-equal($previousRow/entry[2], $currentRow/entry[2])"/>
    both are equal = <xsl:value-of
select="$symbolAndParameterAreEqual"/>
    </xsl:comment>

Results in
<!--
    symbol matches precedingrow = false  
    parameter matches precedingrow = false
    both are equal = true
-->

The deep-equal function always returns the good result but when
combining the two Boolean results in an AND expression they always
return True.

Anyone who can shed any light onto this problem?

Kind regards,
Robby Pelssers
http://robbypelssers.blogspot.com/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>