- From: <bugzilla@wiggum.w3.org>
- Date: Mon, 21 Jul 2008 21:12:19 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5886
Summary: distance formal semantics is inconsistent with example
Product: XPath / XQuery / XSLT
Version: Candidate Recommendation
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Full Text 1.0
AssignedTo: jim.melton@acm.org
ReportedBy: zhen.liu@oracle.com
QAContact: public-qt-comments@w3.org
in http://www.w3.org/TR/xpath-full-text-10/#ftdistance, we have 2nd example:
The following expression returns false:
/books/book ftcontains "web" ftand "site" ftand
"usability" distance at most 2 words
The search context does contain the phrase "The usability of a Web site", in
which the tokens "usability" and "Web" have a distance of 2 words, and the
tokens "Web" and "site" have a distance of 0 words, both of which satisfy the
constraint distance at most 2 words. However, the problem is that "usability"
and "site" have a distance of 3 words, which does not satisfy the constraint,
and so the distance selection yields no matches, and the expression as a whole
yields false. (The phrase "Improving Web Site Usability" would satisfy the
given full-text selection, but it occurs in an attribute value, and so is not
subject to tokenization.)
This means the distance is applied to every pair of matching tokens.
However, in http://www.w3.org/TR/xpath-full-text-10/#tq-ft-fs-FTDistance, the
formal semantic xquery defintion, it applies distance predicate on matching
token sorted by their token postion.
Therefore, they are not compared in pairwise manner. For the above example,
only "usability" and "web" are compared ; "web" and "site" are compared, but
"usability" and "site" are NOT compared, then the expression in the example
shall return true instead of false.
--
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 Monday, 21 July 2008 21:12:55 UTC