This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Our implementation disagrees with the expected (empty sequence) result for test FTNot-q6. (: FTNot-q6: violates negation restriction 2: FTST0002 possible :) (: insert-start :) declare variable $input-context external; (: insert-end :) (: nothing :) $input-context/books/book[para contains text "software" ftand ("coder" ftand ftn ot "ninja" window 5 words)]/title Consider the paragraph: <para>Amazingly enough, many people believe that nunchuks are not useful to software development! They prefer usability studies to the swift application of physical means of persuasion. Hah! The ninja coder knows otherwise. </para> and the predicate para contains text "software" ftand ("coder" ftand ftnot "ninja" window 5 words Indexing word positions at 1, 'ninja' is at position 29 (a StringExclude) and 'coder' is at 30 (a StringInclude). Using the function fts:ApplyFTWordWindow at http://www.w3.org/TR/xpath-full-text-10/#tq-ft-fs-FTWindow n = 5 minpos = 30 maxpos = 30 windowStartPos ranges from 26 to 30 (inclusive) When windowStartPos is 30, windowEndPos is 34. Thus: for $stringExclude in $match/fts:stringExclude where $stringExclude/fts:tokenInfo/@startPos >= $windowStartPos and $stringExclude/fts:tokenInfo/@endPos <= $windowEndPos return $stringExclude returns the empty sequence, because $stringExclude/fts:tokenInfo/@startPos = 29 which is less than the windowStartPos, thus there exists a window starting at the word 'coder' which doesn't include 'ninja'. The match contains no stringExcludes so gives the query a result of <title>Ninja Coder</title>.
FTNot-unconstrained-q6 appears to contain an identical query and so has an identical problem.
FTNot-q6-unconstrained-window also appears to contain an identical query and so has an identical problem.
(personal response:) I agree with your analysis in comment #0.
At their joint meeting on February 22nd, the WGs agreed that the test-case was broken, and directed me to fix it. I have now committed revised versions of: ExpectedTestResults/Expressions/Operators/CompExpr/FTContainsExpr/FTSelection/FTOperators/FTUnaryNot/FTNot-q6.txt ExpectedTestResults/Expressions/Operators/CompExpr/FTContainsExpr/FTSelection/FTOperators/FTUnaryNot/FTNot-unconstrained-q6.txt Both now contain: <title>Ninja Coder</title> as you advised. The test-case FTNot-q6-unconstrained-window (which you mentioned in comment 2) re-uses FTNot-q6.txt for its expected result, so it's handled by the above change. I'm marking this bug resolved-fixed. Please mark it closed if you agree with this resolution.
Confirmed fixed. Thanks.