This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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])
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