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

XQuery and databases - XQuery 2.0

Wolfgang wolfgang at exist-db.org
Mon Jun 8 18:29:28 PDT 2009


  XQuery and databases - XQuery 2.0
Hi,

> how can I use a xml-file stored in a database ?
> I tried with eXist but i did not work:

please ask product specific questions on the corresponding mailing 
lists. How you access a stored document depends on the database product 
you use. There's no general answer to this.

> let $path :='http://localhost:8080/exist/rest/db/my.xml'
> ...doc(path )...
> 
> -> FileNotFoundException: http://localhost:8080/exist/rest/db/Abteilung_DocIDinRepo.xml
> (I tried several other paths and combinations)

Just use a relative URI: doc("/db/my.xml"). The xquery is running on the 
server. It knows and has access to all documents stored there. There's 
no need to use an HTTP URI here.

> 2)Is there (or will there be) possibility to make a database-connection just with XQuery ? So that I can give host, port, login, passwort, etc and XQuery is able to connect to the database ?
> Am I correct, that at the moment it is only possible if you use XQuery executed from java (or an other programming language, that is able to create a connection) ? 

Mmmmh, the query engine is running on top of the database, so it has a 
connection to that server. I guess what you are asking for is a way to 
access resources stored on a different server than the one which is 
running the query? You can retrieve external documents via an HTTP URL, 
just as you tried above. However, eXist will retrieve those documents 
and parse them locally. You loose the benefits of indexes and the like. 
If you are asking for distributed search: we (eXist) do not provide such 
a feature right now, though some work is underway. You may have a look 
at some of the commercial xmldbs if you need this.

Wolfgang


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.