I've used one XML database eXist-db to do some XQuery testing. I have an xml collection called "media_data_101109.xml", and I've put it in direcotry
/db/wb/portfolio/media_data_101109.xml
Then I went to the eXist Sandbox, which is a GUI for doing XQuery, and type in the following XQuery:
let $mediaNodes := doc('db/wb/portfolio/media_data_101109.xml')
return $mediaNodes//media[contains(@product,"wb")]
but it failed to retrieve any results back.
However, if I prepend the server name in front of the URI string like:
let $mediaNodes := doc('http://localhost:8080/exist/rest/db/portfolio/media_data_101109.xml')
Then it worked fine (though a bit slow).
As I remembered, the first XQuery worked perfectly fine in the past, but since yesterday, it failed to retrieve any thing unless I specify the server name in the URI string.
Could anybody give me some idea on where things might went wrong here? I thought there might be some problems with my port settings? So the eXist-db might not be normally rnning?Thanks in advance.
doc('/db/wb/portfolio/media_data_101109.xml')- Daniel Haley