Hi, to every Sedna XML user out there :)

I've been using Sedna database and the Sedna XML:DB API by Charles Foster by
sometime now and I like them very much,
but the other day something very strange happened...I was running senda
3.2.64 and decided to upgrade to 3.2.91 and after the update the following
happened:

I have a set of XQuery expressions that rely on a XQuery Module that I
created and on external variables passed using the XML:DB API
The module is defined as normal:
*module namespace mdr = "http://mdr.di.fct.unl.pt";*

All xquery expressions import the module and I load the queries using my
application, and execute them with parameters
which are passed using the *declareVariable(java.lang.String qname,
java.lang.Object initialValue)* in XML:DB API

These queries worked great till i updated to Sedna 3.2.91 (I downgraded
again to 3.2.64 but the problem still remained, which is very weird also)

Now I get error saying that "import declarations cannot be in the second
part of the prolog". I knew this could not be happening because my query did
not have anything but the import and the xquery expression... Trying to
debug the XML:DB API behavior (version 1.2 by the way) which is hard because
the source code is not included and class names are obfuscated... I found
that the problem is that when using XML:DB API to declare variables....
basically it creates N (1 for each variable) strings with the following
syntax:
"declare $varName as TYPE" (in my case, xs:string, with the value of the
variable) the problem is that these strings are placed at the beggining of
the query and
before my "import module" instruction, which causes Sedna database to refuse
the query with the error

So, my question is....

Using the XML:DB API, how can I have a query that imports a module and uses
variables?

The weirdest thing to me is that this situation worked up until yesterday
(and I believe I haven't changed my code) only when I upgraded sedna the
problem appeared,
but after a downgrade the problem remains and i have tracked it down to the
XML:DB API Adding the variable declaration BEFORE the module import.

What Am I doing wrong?

Anyway, I would like to thank the Modis Team for the great XML Database and
Charles Foster for the great API :)

-- 
Pedro Pereira
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to