Michael,
I am using Orbeon Forms (version 3.8.0). Out of the box it comes with eXist (version 1.2.6). I'm trying out wether it is possible to use another xml-database as backend, in particularly Sedna and BaseX. Orbeon comes with a so-called xmldb-processor. That processor leans heavily on eXist, making it impossible to use it with Sedna or BaseX. So, I'm writing my own xmldb-processor. I'm bound to the version of the xmldb-api that comes with eXist. Even if I use another database as backend, Orbeon will use eXist for storing some data. I'm not sure what version of the xmldb-api eXist uses. The only thing I know for sure is that they don't use the latest version. You can browse the code at http://xmldb-org.cvs.sourceforge.net/viewvc/xmldb-org/xapi/src/.
To use BaseX as backend I have changed three classes in the basex-api. I have attached the source-code of those classes and the xmldb-api that comes with eXist 1.2.6.
I made the following changes:
BXDatabase - I added the method getNames()
BXQueryService - I added an import of org.xmldb.api.base.CompiledExpression; - I added an import of org.xmldb.api.modules.XQueryService; - I added XQueryService to the implements-clause of the class - I changed the value of the constant XQUERY from "XQueryQueryService" to "XQueryService" - I added the method compile(): it throws XMLDBException - I added the method execute(): it throws XMLDBException - I added the method setXPathCompatibility(); it does nothing - I added the method setModuleLoadPath(); it does nothing - I added the method declareVariable(): it throws XMLDBException
BXXMLResource - I added an import of org.xml.sax.SAXNotRecognizedException; - I added an import of org.xml.sax.SAXNotSupportedException; - I added the method setSAXFeature(): it throws SAXNotSupportedException - I added the method getSAXFeature(): it throws SAXNotSupportedException
Regards, Frans
Op 30 mrt 2011, om 00:44 heeft Michael Seiferle het volgende geschreven:
Dear Greg, dear Frans,
you might as well be interested in using our own API - the examples [1] are straight forward, many of our users feel it's comfortable to use. I do not know what you are working on and whether you rely on xmldb-api a lot, it might be worth a quick look anyway.
But back to your issue: Seems you are right, it really looks like the String[] getNames() method was introduced to replace String getName(). I will see if this can easily be fixed, I am not really into xmldb-api, but if the getName[s]() method is the only difference between our version and the latest version from 11/11/2011 [2] this should not be too hard.
Thanks for reporting and sorry for the inconvenience.
Kind Regards Michael
[1] http://docs.basex.org/wiki/Code_Examples (QueryExample, RunCommands) [1.1] http://docs.basex.org/wiki/XMLDBQuery has an example for xmldb usage [2] http://sourceforge.net/projects/xmldb-org/files/xapi/api/
Am 29.03.2011 um 23:37 schrieb Meredith Gregory:
Dear Frans,
Thanks for the quick response! i was groveling through the code and coming to the same conclusion.
Best wishes,
--greg