<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26832</bug_id>
          
          <creation_ts>2014-09-17 10:08:50 +0000</creation_ts>
          <short_desc>[XP31] 3.7.2 General Comparisons</short_desc>
          <delta_ts>2015-07-07 15:55:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XPath 3.1</component>
          <version>Working drafts</version>
          <rep_platform>SGI</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://www.w3.org/XML/Group/qtspecs/specifications/xquery-31/html/xpath-31.html#id-general-comparisons</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>josh.spiegel</cc>
    
    <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>111681</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2014-09-17 10:08:50 +0000</bug_when>
    <thetext>The problem here isn&apos;t specific to XPath 3.1, but it might be a good time to clear this issue up now...

In 3.7.2 General Comparisons, Step 4 says:

&quot;The result of the comparison is true if and only if there is a pair of atomic values, one in the first operand sequence and the other in the second operand sequence, that have the required magnitude relationship. Otherwise the result of the comparison is false... &quot;

This suggests that possible outcomes are only true or false.  However, the paragraph then goes on to mention one error condition.

So possible outcomes are:

true:  e.g. true() = true()
false: e.g. true() = false()
FORG0006: e.g. true() = xs:yearMonthDuration(&apos;P1999Y&apos;)
FORG0001: e.g. xs:yearMonthDuration(&apos;P1999Y&apos;) = xs:untypedAtomic(&apos;untyped&apos;)
XPTY0004: e.g. xs:yearMonthDuration(&apos;P1999Y&apos;) = xs:dateTime(&apos;2013-01-01T00:00:00Z&apos;)

(the last of which being determined statically).

The discrepancy between the two statements suggests that it might be permissible to ignore all errors and return only true or false.

A similar problem occurs in the test describing comparison when XPath 1.0 compatibility mode is false.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112033</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2014-09-23 17:25:56 +0000</bug_when>
    <thetext>I will change this to:

Otherwise the result of the comparison is false or an error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121770</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-06 08:31:06 +0000</bug_when>
    <thetext>The change promised in comment #1 does not appear in the current draft specification.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121854</commentid>
    <comment_count>3</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-07-07 15:55:00 +0000</bug_when>
    <thetext>Previously, it was only changed in XPath in the case where XPath compatibility mode is true.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>