Re: [basex-talk] BaseX and MySQL

2014-11-19 Thread Lizzi, Vincent
Hans, I had to do this a few days ago, so it’s fresh in my mind. Download Connector/J from the MySQL website and place .jar file in the basex/lib folder. Restart BaseX (if you’re using the server version) so it picks up the new .jar. Queries can then be run like: let $c := sql:connect('jdbc:my

[basex-talk] BaseX and MySQL

2014-11-19 Thread Hans-Juergen Rennau
Dear BaseX team, can you point me to some information about which steps I must take in order to start accessing MySQL databases via the sql module?  Thank you for help,Hans-Juergen

Re: [basex-talk] QueryProcessor's result has 'restructured ns declarations'

2014-11-19 Thread Christian Grün
It may be easier to stick with the built-in serializer of BaseX (it's faster anyway): Old: > java.io.ByteArrayOutputStream out = new > java.io.ByteArrayOutputStream(); > javax.xml.transform.Transformer transformer = > > javax.xml.transform.TransformerFactory.newInstance().

Re: [basex-talk] QueryProcessor's result has 'restructured ns declarations'

2014-11-19 Thread Erdal Karaca
BTW: I am using BaseX 7.7 2014-11-19 21:49 GMT+01:00 Erdal Karaca : > Hi Christian, > I have extracted an SSCCE: > > public static void main(String[] args) throws Exception { > String origXML = " xmlns:z='z'>"; > Context dbCtx = new Context(); > > // create DB >

Re: [basex-talk] QueryProcessor's result has 'restructured ns declarations'

2014-11-19 Thread Erdal Karaca
Hi Christian, I have extracted an SSCCE: public static void main(String[] args) throws Exception { String origXML = ""; Context dbCtx = new Context(); // create DB { CreateDB cmd = new CreateDB("test-db", origXML); cmd.execute(dbCtx);

Re: [basex-talk] SAXSerializer does not transmit namespace declarations as attributes

2014-11-19 Thread Christian Grün
Hi Erdal, I remember that the SAXSerializer class was written by one of our users [1]. Maybe you are interested in having a closer look at the code? Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/io/serial/SAXSerializer.java On Wed, Nov 19, 2014

[basex-talk] SAXSerializer does not transmit namespace declarations as attributes

2014-11-19 Thread Erdal Karaca
Hi all, I am using the SAXSerializer to generate SAX events from an org.basex.query.value.item.Item instance. The Item instance represents the database doc's root in this specific case: It seems that when the following method is called: org.xml.sax.ContentHandler.startElement(String, String,

Re: [basex-talk] QueryProcessor's result has 'restructured ns declarations'

2014-11-19 Thread Christian Grün
Hi Erdal, Sorry, I need more information in order to reproduce this. Could you provide us with an SSCCE? Christian On Wed, Nov 19, 2014 at 8:37 PM, Erdal Karaca wrote: > Hi all, > I have this file (simplified): > > > > > > > > I have created a new database from that file (using Java

[basex-talk] QueryProcessor's result has 'restructured ns declarations'

2014-11-19 Thread Erdal Karaca
Hi all, I have this file (simplified): I have created a new database from that file (using Java API) and checked in the GUI that the file's contents are as "expected" by querying the root of the database. Now, when using the QueryProcessor API to query the root of the database, I will