W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2009

[Bug 8407] [XQFTTS] MildNot test cases

From: <bugzilla@wiggum.w3.org>
Date: Wed, 09 Dec 2009 20:35:56 +0000
To: public-qt-comments@w3.org
Message-Id: <E1NITGO-0001Sa-LX@wiggum.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=8407


Pat Case <pcase@crs.loc.gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pcase@crs.loc.gov
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Pat Case <pcase@crs.loc.gov>  2009-12-09 20:35:56 ---
Hi Peter,

Again, thanks for your help. 

Again, please mark the bug closed or let us know that you remain unsatisfied.

--Responses follow inline:

- FTMildNot-q2/FTMildNot-unconstrained-q2:
$input-context/books/book[para contains text "usability studies" not in
"usability"]/title

(against ftbookexample)

The expected result is "Ninja Coder", but I think that the correct result
should be empty. "usability studies" is indeed found in the "ninja coder" book,
but one of the matches of "usability" is found inside "usability studies",
therefore fulfilling the FTMildNot requirement for removing this match from the
result.
(I reported this problem in a private mail to Jim Melton before, the answer
might have been lost)

--No change. We believe your evaluation is correct for "usability" not in
"usability studies", but not for this example "usability studies" not in
"usability".  In the latter, "usability studies" must be a part of the match
for "usabiity" to exclude the match. That can never be, so Ninja Coder is
returned. The MildNot only excludes matches where the first operand is a subset
of the second. 

- FTMildNot-bad3: The intent of the query seems to generate a StringExclude by
using a FTTimes, triggering an error in FTMildNot. 

If I understand the semantics of FTTimes and FTUnaryNot correctly, in this
specific case no StringExclude will be generated:
- The FTTimes is applied on the Matches for "ninja", within the search context
of $input-context/books/book/para there is only a single Match with a single
StringInclude (in the "para" element in the "Ninja Coder" book)

- According to the FTTimes semantics (4.2.6.10 FTTimes),
fts:FormRange((M(S("Ninja"))), 1, 1, $allMatches/@stokenNum) is invoked,

- In FormRange, fts:FormCombinationsAtLeast() is invoked for $times values of 1
and 2, the result of the latter is then negated using FTUnaryNot

- The invocation (denoted as $am1) with $times eq 1 yields M(S("Ninja"))
- The invocation (denoted as $am2) with $times eq 2 yields (), since the number
of elements in the match sequence is smaller than $times (and the for clause in
FormCombinationsAtLeast will therefore not produce anything)

- FTUnaryNot is applied on $am2 (with the an () value), resulting in an
AllMatch containing a match without any StringExcludes or StringIncludes (see 
UnaryNotHelper: if (fn:empty($matches)) then <fts:match/>

--Agreed. Thinking the test case was supposed to illustrate this statement in
section 3.5.3 [Mild-Not Selection]:
     Operands of a mild-not selection may not contain a full-text
     selection that evaluates to an AllMatches that contains a
     StringExclude. Such full-text selections are not-selection and
     FTWords with a cardinality constraint using 'at most', 'from ... to',
     and 'exactly' occurrences ranges. If such an expression is
     encountered, an error [err:FTDY0017] is raised.
--We replaced the test suite query with:
(: FTMildNot-bad3: mild not with bad argument :)

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

$input-context/books/book[para contains text "blues" occurs exactly 1 times not
in "oxford blues""]/title


Pat Case, Library of Congress, for the Full Text Task Force


-- 
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 Wednesday, 9 December 2009 20:36:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:59 GMT