This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the following function (ApplyFTMildNot) all occurences of @queryPos, which is just the position of the token in the query, should be replaced by fts:tokenInfo/@startPos which corresponds to the match position because that is what is really being compared. However I would argue that comparing the starting position (verifying that all the matches "satisfies $pos1 ne $pos2") is not sufficient. Specially in cases where the word that matches in the first allmatches is not the first word of the phrase in the second allmatches or two phrases are the operands. For example: - FTSelection ("Ford" mildnot "Francis Ford Coppola") - FTSelection ("Ford Mustang" mildnot "Ford Mustang Special Edition") ----------------------------------------------------------------- declare function fts:ApplyFTMildNot ( $allMatches1 as element(fts:allMatches), $allMatches2 as element(fts:allMatches) ) as element(fts:allMatches) { if (fn:count($allMatches2//fts:stringExclude) gt 0) then fn:error("Invalid expression on the right-hand side of a not-in") else <fts:allMatches stokenNum="{$allMatches1/@stokenNum}"> { let $posSet2 := $allMatches2/fts:match/fts:stringInclude/@queryPos return $allMatches1/fts:match[ every $pos1 in ./fts:stringInclude/@queryPos, $pos2 in $posSet2 satisfies $pos1 ne $pos2] } </fts:allMatches> };
The resolution has been added to the Specs.