[Bug 3419] AllMatches model fails to represent correct semantics of FTUnaryNot


           Summary: AllMatches model fails to represent correct semantics of
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
               URL: http://www.w3.org/TR/xquery-full-text/#tq-ft-fs-
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P1
         Component: Full Text
        AssignedTo: jim.melton@acm.org
        ReportedBy: joaquin.delgado@oracle.com
         QAContact: public-qt-comments@w3.org

In section 3.1.5 (FTUnaryNot) the following example is given

/book[. ftcontains ! "usability"]

which following the evaluation efectively returns the empty sequence because
all book elements contains "usability". However if one were to write

/book[. ftcontains ! "XSLT"]

The expected results is all book elements because the expression (! "XSLT")
evaluates TRUE for all books which do not contain the word "XSLT". However in
the semantics defined with the AllMatches model in
http://www.w3.org/TR/xquery-full-text/#tq-ft-fs-FTUnaryNot this fails. 

Esencially the evaluation of FTWords returns no match (no stringInclude) and
therefore the negation of an empty match is empty as well, thus the evaluation
returs FALSE when it should return TRUE for all books. That is because we do
not handle the concept of complement (e.g. *) that represents the rest of the
world that is not a match.

This problem can be avoided if we only support AND NOT instead of UnaryNot or
introduce the representation of complement in cases where there is negation of
an empty match.

-- Joaquin

Received on Friday, 30 June 2006 22:18:31 UTC