This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5845 - xquery full text use case 13.2.2 solution is not correct
Summary: xquery full text use case 13.2.2 solution is not correct
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Full Text 1.0 Use Cases (show other bugs)
Version: Working drafts
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Pat Case
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 00:27 UTC by zhen hua liu
Modified: 2011-01-07 00:08 UTC (History)
1 user (show)

See Also:


Attachments

Description zhen hua liu 2008-07-09 00:27:58 UTC
The current solution shown below  binds $para to <book> element instead of <p> element. This is not correct as the output $para[1] and $para[2] expects the $para binds to <p> element.


for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $para := $book[.//chapter/p ftcontains "usability" 
   ftand "test" with stemming]
where count($para) > 0   
return ($book/metadata/title, $para/step[1], $para/step[2])


The correct solution should be

for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $para := $book//chapter/p[ .  ftcontains "usability" 
   ftand "test" with stemming]
where count($para) > 0   
return ($book/metadata/title, $para/step[1], $para/step[2])
Comment 1 Pat Case 2008-07-14 18:21:20 UTC
Zhen,

I handled this as editorial.

I corrected the let statement in the XQuery Solution to read let $para := $book//chapter/p[.  ftcontains "usability" ftand "test" with stemming]

The correction will appear internally after the next use cases build. I will send the FTTF an alert when it is ready. 

Please review and if you agree with the change, close the bug.

Pat