<?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>4728</bug_id>
          
          <creation_ts>2007-06-23 10:14:37 +0000</creation_ts>
          <short_desc>[FT] editorial: 4.3.1.1 Semantics of FTContainsExpr</short_desc>
          <delta_ts>2008-02-16 11:02:58 +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>Full Text 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Mary Holstege">holstege</assigned_to>
          
          
          <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>15556</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2007-06-23 10:14:37 +0000</bug_when>
    <thetext>4.3.1.1 Semantics of FTContainsExpr

[1]
&quot;EvaluationContext&quot;
    Change to &quot;SearchContext&quot;?

[2]
&quot;1. The sequence of items returned by EvalationContext&quot;
    s/Evalation/Evaluation/

[3]
&quot;3. The sequence of nodes returned by IgnoreExpr,&quot;
    According to 3.7, IgnoreExpr has to be evaluated separately for each
    item in the search context, so there can&apos;t be a single sequence of
    nodes that works for all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16949</commentid>
    <comment_count>1</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2007-10-01 19:05:53 +0000</bug_when>
    <thetext>Item [1] fixed as proposed, which obviates the need to change item [2]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17156</commentid>
    <comment_count>2</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2007-10-11 23:37:11 +0000</bug_when>
    <thetext>I don&apos;t believe it is possible to construct an example where it makes a 
difference whether you apply the unioned list of ignored nodes in one go or
piecemeal.  If you have a counter-example, please provide it.  

Given this belief, I propose modifying bullet 3 to say:

The union of the sequences of nodes returned by IgnoreExpr for each search item, if that expression is present, or the empty sequence otherwise; and

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17459</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2007-10-27 01:30:57 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I don&apos;t believe it is possible to construct an example where it makes a 
&gt; difference whether you apply the unioned list of ignored nodes in one go or
&gt; piecemeal.  If you have a counter-example, please provide it.

let $x =
    &lt;example&gt;
        &lt;div&gt;
            a
            &lt;div&gt;
                b
            &lt;/div&gt;
            c
        &lt;/div&gt;
    &lt;/example&gt;
return $x//div ftcontains &quot;b&quot; without content .//div

The search context consists of two &lt;div&gt;s, outer and inner.
For the outer, the ignore option excludes the inner
  (and thus, ftcontains does not see the &quot;b&quot;).
For the inner, the ignore option excludes nothing
  (and thus, ftcontains sees the &quot;b&quot;, and returns true).

Whereas...
The union of the exclusions is the inner &lt;div&gt;.
If we were to exclude that union from every item in the search context,
then when working with the inner div, we would exclude itself,
and not see the &quot;b&quot;, and return false.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17593</commentid>
    <comment_count>4</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2007-11-05 17:14:34 +0000</bug_when>
    <thetext>As we discussed, I think at this point it would be best to remove the 
2nd-orderness of the &quot;without content&quot; modifier, which is in keeping with what the semantics says, modify the sentence as suggested, and make the corresponding
adjustments to section 3.  Sample queries:

Then this query would be an error (no context item):

let $x =
    &lt;example&gt;
        &lt;div&gt;
            a
            &lt;div&gt;
                b
            &lt;/div&gt;
            c
        &lt;/div&gt;
    &lt;/example&gt;
return $x//div ftcontains &quot;b&quot; without content .//div


This query would return false, because we&apos;re excluding all the divs:

let $x =
    &lt;example&gt;
        &lt;div&gt;
            a
            &lt;div&gt;
                b
            &lt;/div&gt;
            c
        &lt;/div&gt;
    &lt;/example&gt;
return $x//div ftcontains &quot;b&quot; without content $x//div

To get the alternative interpretation (removing just the divs under the
search item), we could write:

let $x =
    &lt;example&gt;
        &lt;div&gt;
            a
            &lt;div&gt;
                b
            &lt;/div&gt;
            c
        &lt;/div&gt;
    &lt;/example&gt;
return fn:exists($x//div[. ftcontains &quot;b&quot; without content .//div])

I propose that we lose the second-orderness of the ignored nodes expression.
Then this query would be an error (no context item):

let $x =
    &lt;example&gt;
        &lt;div&gt;
            a
            &lt;div&gt;
                b
            &lt;/div&gt;
            c
        &lt;/div&gt;
    &lt;/example&gt;
return $x//div ftcontains &quot;b&quot; without content .//div


This query would return false, because we&apos;re excluding all the divs:

let $x =
    &lt;example&gt;
        &lt;div&gt;
            a
            &lt;div&gt;
                b
            &lt;/div&gt;
            c
        &lt;/div&gt;
    &lt;/example&gt;
return $x//div ftcontains &quot;b&quot; without content $x//div

To get the alternative interpretation (removing just the divs under the
search item), we could write:

let $x =
    &lt;example&gt;
        &lt;div&gt;
            a
            &lt;div&gt;
                b
            &lt;/div&gt;
            c
        &lt;/div&gt;
    &lt;/example&gt;
return fn:exists($x//div[. ftcontains &quot;b&quot; without content .//div])

I believe these makes the ftcontains expressions easier to understand, because
the &quot;without content&quot; expression then follows the same rules as other expressions in XQuery.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18500</commentid>
    <comment_count>5</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2008-01-24 15:05:31 +0000</bug_when>
    <thetext>Resolved to accept the change in semantics for [2] and make the relevant changes to the spec.  Implemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18508</commentid>
    <comment_count>6</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2008-01-24 16:08:41 +0000</bug_when>
    <thetext>Also implemented changes for point [3] by aligning the semantics as 
described in comment 4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19101</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2008-02-16 11:02:58 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Resolved to accept the change in semantics for [2] and make the relevant
&gt; changes to the spec.  Implemented.

[2] was just a typo-fix, not a change in semantics. So I think you meant [3]. But then comments #5 and #6 are both talking about [3]. Ah well, it&apos;s probably not important.

Anyhow, closing this issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>