This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Please declare and use one (global perhaps) variable, or add a comment that doc("http://bstore1.example.com/bib.xml") doc("http://bstore1.example.com/bib/bib.xml") are really not different due to a typo.
Although you opened this issue against the "XQuery 3.0 Use Cases" component, the URL you provided points into the XQuery *1.0* Use Cases. The problem you found does not occur in the 3.0 version, so I've changed the component to "XQuery 1.0 Use Cases".
That's what happens when one sees Latest version: http://www.w3.org/TR/xquery-use-cases/ at the top of the page. Sorry.