Project

Profile

Help

Possible bug Saxon EE 10.6 (bool in xpath value) » test.xsl

Vitaly Filatenko, 2021-12-20 16:31

 
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0">

<xsl:template match="/">
<WorkingFineCase>
<WorksFineBothLinuxAndWindows>
<xsl:value-of select="not(1 &gt; 2) = /root/BoolValue"/>
</WorksFineBothLinuxAndWindows>
<WorksFineBothLinuxAndWindows2>
<xsl:value-of select="not(1 &gt; 2) = boolean(/root/BoolValue)"/>
</WorksFineBothLinuxAndWindows2>
</WorkingFineCase>
<BrokenCase>
<ShouldBeTrueForBothWindowsAndLinuxButFalseInLinuxWRONG>
<xsl:value-of select="sum(/root/items/*[not(data &gt; 0) = /root/BoolValue]/Amount) != 0"/>
</ShouldBeTrueForBothWindowsAndLinuxButFalseInLinuxWRONG>
<TrueBothInWindowsAndLinux>
<xsl:value-of select="sum(/root/items/*[not(data &gt; 0) = boolean(/root/BoolValue)]/Amount) != 0"/>
</TrueBothInWindowsAndLinux>
</BrokenCase>
</xsl:template>
</xsl:stylesheet>
<!--sum(/Root/InvoiceSummary/Data/Costs/ExpensesDisbursements/*[not(TaxRate > 0) = /Root/InvoiceSummary/Data/IsTaxableMatter]/Amount) != 0-->
(2-2/2)