[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Running XQuery using doc() and collection()

Wei, Alice J. ajwei at indiana.edu
Thu Jan 24 14:51:18 PST 2008


  Running XQuery using doc() and collection()
Hi, XQueryers:

  One of the members on this list have helped me with the following code:

let $addresses := (doc("1.xml") | doc("3.xml") |doc("4.xml") | doc("2.xml"))//bibl/p/address
let $sorted_result:= for $ad in distinct-values($addresses)
order by $ad ascending
return $ad
for $sorted_results at $count in $sorted_result
let $nodes := $addresses[.=$sorted_results]
where distinct-values($nodes)
return
<address>
<statistics>Showing Result: {$count} / {count($sorted_result)}
</statistics>
{$nodes}
</address>

  I have set these files up on another server so now all the files have http://chausie.slis.indiana.edu:8080/exist/rest//db/foo/ in front of it all the the files within the doc() . The problem is that this is running at the speed of 10 seconds for 800KB of data parsing.

I have now switched the first statement from

let $addresses := (doc("1.xml") | doc("3.xml") |doc("4.xml") | doc("2.xml"))//bibl/p/address

to

let $addresses := (fn:collection("xmldb:exist://chausie.slis.indiana.edu:8080//db/resuml")//bibl/p/address)

Now I have now got this error which I have not seen before:

Description: Exception thrown by URIResolver.

Is there a little structural use between collection() and doc()? What should I do to get rid of the error?

Thanks to those who can help.

======================================================
Alice Wei
MIS 2008
School of Library and Information Science
Indiana University Bloomington
http://x-query.com/mailman/listinfo/talk



Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.