[Bug 4728] [FT] editorial: 4.3.1.1 Semantics of FTContainsExpr

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4728





------- Comment #3 from jmdyck@ibiblio.org  2007-10-27 01:30 -------
(In reply to comment #2)
> I don'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.

let $x =
    <example>
        <div>
            a
            <div>
                b
            </div>
            c
        </div>
    </example>
return $x//div ftcontains "b" without content .//div

The search context consists of two <div>s, outer and inner.
For the outer, the ignore option excludes the inner
  (and thus, ftcontains does not see the "b").
For the inner, the ignore option excludes nothing
  (and thus, ftcontains sees the "b", and returns true).

Whereas...
The union of the exclusions is the inner <div>.
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 "b", and return false.

Received on Saturday, 27 October 2007 01:31:07 UTC