- From: <bugzilla@jessica.w3.org>
- Date: Tue, 08 Feb 2011 10:25:31 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12009 Summary: [XQFTTS] FTNot-q6 Product: XPath / XQuery / XSLT Version: Proposed Recommendation Platform: PC OS/Version: Windows NT Status: NEW Severity: normal Priority: P2 Component: Full Text 1.0 AssignedTo: jim.melton@acm.org ReportedBy: tim@cbcl.co.uk QAContact: public-qt-comments@w3.org 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>. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Tuesday, 8 February 2011 10:25:33 UTC