- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 10 Jul 2008 20:42:21 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5854
Summary: xquery full text use case 13.2.3 solution is not correct
Product: XPath / XQuery / XSLT
Version: Working drafts
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Full Text 1.0 Use Cases
AssignedTo: pcase@crs.loc.gov
ReportedBy: zhen.liu@oracle.com
QAContact: public-qt-comments@w3.org
In
http://www.w3.org/TR/xpath-full-text-10-use-cases/#axes-queries-results-q3
The solution below
for $book in doc("http://bstore1.example.com/full-text.xml")
/books/book[@number="3"]
let $comp := $book[./content/part/component/
(subcomponent | subcomponent/subsubcomponent)/
componentTitle ftcontains "flow diagram.?"
with wildcards]
let $parentComp := $book[ancestor::books//../$comp
ftcontains "human computer interaction"]
where count($comp) > 0
return ($book/metadata/title, $book/content)
is NOT correct. The $comp variable reference in the middle of xpath step is not
correct. Also, the element tag shall be subComponent instead of subcomponent.
Here is the correct solution:
for $book in doc("xq-full-text.xml")
/books/book[@number="3"]
let $comp := $book[./content/part/component/
(subComponent |subComponent/subsubComponent)/
componentTitle ftcontains "flow diagram.?" with wildcards
]
let $parentComp := $comp/ancestor::node()[.//componentTitle
ftcontains "human computer interaction"]
where count($comp) > 0 and count($parentComp) > 0
return ($book/metadata/title, $book/content)
--
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 Thursday, 10 July 2008 20:42:56 UTC