W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2008

[Bug 5843] New: xquery full text usecase 16.2.9 Q9 solution not correct

From: <bugzilla@wiggum.w3.org>
Date: Tue, 08 Jul 2008 20:20:21 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-5843-523@http.www.w3.org/Bugs/Public/>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5843

           Summary: xquery full text usecase 16.2.9 Q9 solution 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


http://www.w3.org/TR/xpath-full-text-10-use-cases/#xquery-xpath-composability-queries-results-q9
current solution is
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
for $cont := $book/content[. ftcontains ("successfully" 
   ftand "completing" ftand "tasks") with stemming
   window (count(./contents/part/chapter) * 3) 
   words] 
where count($cont)>0
return ($book/metadata/title, $cont)

the correct solution is
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book/content[. ftcontains ("successfully" 
   ftand "completing" ftand "tasks") with stemming
   window (count(./part/chapter) * 3) 
   words] 
where count($cont)>0
return ($book/metadata/title, $cont)

second 'for clause' shall be 'let clause'. ./contents path shall be eliminated
because there is NO contents element.


-- 
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 July 2008 20:20:55 GMT

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