Page 1 of 1

Trouble with XQuery run in EMC xDB

Posted: Tue Sep 18, 2012 6:18 pm
by cdavisafc
I'm struggling with something that should be very simple. Running xDB 10.1 and oXygen 12.2.

The following XQuery executes fine when run within a transformation scenario configured to xDB.

let $foo := doc("/mylib/mydoc.xml")
return $foo

Returns the contents of that document that is stored in xdb.

The following XQuery, while running fine within the xdb admin tool and also from the command line, returns an empty sequence when run from the transformation scenario:

let $foo := doc("http://rss.cnn.com/rss/cnn_topstories.rss")
return $foo

Has anyone else had any issues with this?

Re: Trouble with XQuery run in EMC xDB

Posted: Wed Sep 19, 2012 4:30 pm
by adrian
Hi,

I've tested and the xDB XQuery transformation doesn't seem to report any error if the resource is inaccessible, it simply returns an empty sequence.

Make sure that the resource ("http://rss.cnn.com/rss/cnn_topstories.rss") is accessible from Oxygen. Try to open it in Oxygen with File > Open URL, paste the URL there.

If you are behind an HTTP proxy server, make sure Oxygen is configured properly. Check the proxy settings in Options > Preferences, HTTP(S)/(S)FTP/Proxy Configuration.

If that still fails, try the same XQuery with the Saxon XQuery transformation engine. Does that work?

Regards,
Adrian

Re: Trouble with XQuery run in EMC xDB

Posted: Fri Sep 21, 2012 8:24 pm
by cdavisafc
Aha! Adrian, you actually figured this out before.

I was just writing to say that I could access the URL with file->open URL and Saxon did fine and was going to refer you to another forum post that I thought might be related and found that you had, in fact, solved that problem. As it happens, it is the same solution here.

I copied the 5 jars from the xdb lib directory into a different directory and configured the data source to get the jars there and, bingo, it works!

Thanks for the help!

Cornelia