BaseX in Cocoon?
Monday, 24 January 2011 · 7 messages · last reply 26 Jan 2011
JW
Joachim Wackerow24 Jan 2011 12:52 #
Hello,
Does anybody has experience in using BaseX in the Cocoon framework?
Currently I'm using eXist with Cocoon (by the XML:DB protocol). I would be interested to use BaseX with Cocoon. Now I'm wondering if anybody tried this and can give me some hints.
Cheers,
Achim
--
GESIS - Leibniz Institute for the Social Sciences
Department: Monitoring Society and Social Change
Unit: Social Science Metadata Standards
Visiting address: B2 1, 68159 Mannheim, Germany
Postal address: P.O. Box 122155, 68072 Mannheim, Germany
Phone: +49 (0)621 1246 262
Fax: +49 (0)621 1246 100
E-mail: joachim.wackerow at gesis.org
www.gesis.org/en/institute/
J
Johannes.Lichtenberger24 Jan 2011 13:17 #
Quoted text · Joachim Wackerow · 8 lines
On 01/24/2011 12:52 PM, Joachim Wackerow wrote: > Hello, > > Does anybody has experience in using BaseX in the Cocoon framework? > > Currently I'm using eXist with Cocoon (by the XML:DB protocol). I would > be interested to use BaseX with Cocoon. Now I'm wondering if anybody > tried this and can give me some hints.
It shouldn't be too hard to implement a simple Generator. Should be more or less straight forward, wrapping the SAX output into the pipeline.
Maybe transformers are more difficult to write, but that depends on what exactly you try to do. Filtering with XPath/XQuery expressions should be straight forward, too. Transformation with XSLT would require an XSLT processor, since I think BaseX currently lacks support, but if I'm not wrong XSLT (2.0) will be implemented in the future!? In case of very big XML files and the limited ways of streaming XSLT I could think of an intermediate transformer which selects parts of the XML file/internal BaseX encoding and pipes the results to the XSLT transformer.
BTW: I'm not sure if Cocoon is still going to be actively developed. Seems the core developers currently haven't got enough spare time to really bring it forward (Cocoon 3).
regards,
Johannes
HV
Op 24 jan 2011, om 12:52 heeft Joachim Wackerow het volgende geschreven:
Quoted text · Joachim Wackerow · 1 line
> Hello,
Hi Joachim,
Quoted text · Joachim Wackerow · 3 lines
> Does anybody has experience in using BaseX in the Cocoon framework? > > Currently I'm using eXist with Cocoon (by the XML:DB protocol). I would be interested to use BaseX with Cocoon. Now I'm wondering if anybody tried this and can give me some hints.
I'm using the REST interface to communicate with BaseX from Cocoon. Using REST it makes it easy to switch XML databases, should the need arise (because of company policy for instance, not because BaseX is not capable enough or something like that). I'm using the RESTTransformer from the cocooncomponents project on Google code. So I can't comment on the Java language binding in BaseX, but I imagine it shouldn't be too hard to create a transformer using that, there are lots of examples on the wiki.
I started out with eXist but due to some technical difficulties I switched to BaseX. BaseX and me are working together for the first time and I am quite pleased with it. Very robust, very speedy. Nice GUI. Everything cool.
Huib Verweij.
JW
Johannes,
Thank you for your answer. This is helpful. I will further explore the simple Generator and probably also the filtering. I was hoping somebody did it already :) .
My project is using Cocoon 2.1 (maybe migrating to 2.2). I have also the impression that currently Cocoon 3 is no alternative.
Cheers,
Achim
Quoted text · Joachim Wackerow · 33 lines
On 24.01.2011 13:17, Johannes.Lichtenberger wrote: > On 01/24/2011 12:52 PM, Joachim Wackerow wrote: >> Hello, >> >> Does anybody has experience in using BaseX in the Cocoon framework? >> >> Currently I'm using eXist with Cocoon (by the XML:DB protocol). I would >> be interested to use BaseX with Cocoon. Now I'm wondering if anybody >> tried this and can give me some hints. > > It shouldn't be too hard to implement a simple Generator. Should be more > or less straight forward, wrapping the SAX output into the pipeline. > > Maybe transformers are more difficult to write, but that depends on what > exactly you try to do. Filtering with XPath/XQuery expressions should be > straight forward, too. Transformation with XSLT would require an XSLT > processor, since I think BaseX currently lacks support, but if I'm not > wrong XSLT (2.0) will be implemented in the future!? In case of very big > XML files and the limited ways of streaming XSLT I could think of an > intermediate transformer which selects parts of the XML file/internal > BaseX encoding and pipes the results to the XSLT transformer. > > BTW: I'm not sure if Cocoon is still going to be actively developed. > Seems the core developers currently haven't got enough spare time to > really bring it forward (Cocoon 3). > > regards, > Johannes > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
JW
Huib,
Thanks a lot. The approach with the REST interface is a helpful hint. I like the flexibility of that.
The RESTTransformer seems to be your contribution, right? Does it work with Cocoon 2.1 or 2.2?
Cheers,
Achim
Quoted text · Huib Verweij · 18 lines
On 24.01.2011 13:34, Huib Verweij wrote: > > Op 24 jan 2011, om 12:52 heeft Joachim Wackerow het volgende geschreven: > > >> Hello, > > Hi Joachim, > >> Does anybody has experience in using BaseX in the Cocoon framework? >> >> Currently I'm using eXist with Cocoon (by the XML:DB protocol). I would be interested to use BaseX with Cocoon. Now I'm wondering if anybody tried this and can give me some hints. > > I'm using the REST interface to communicate with BaseX from Cocoon. Using REST it makes it easy to switch XML databases, should the need arise (because of company policy for instance, not because BaseX is not capable enough or something like that). I'm using the RESTTransformer from the cocooncomponents project on Google code. So I can't comment on the Java language binding in BaseX, but I imagine it shouldn't be too hard to create a transformer using that, there are lots of examples on the wiki. > > I started out with eXist but due to some technical difficulties I switched to BaseX. BaseX and me are working together for the first time and I am quite pleased with it. Very robust, very speedy. Nice GUI. Everything cool. > > Huib Verweij.
HV
Huib Verweij26 Jan 2011 21:59 #
Joachim,
Op 25 jan 2011, om 18:26 heeft Joachim Wackerow het volgende geschreven:
Quoted text · Joachim Wackerow · 1 line
> Thanks a lot. The approach with the REST interface is a helpful hint. I like the flexibility of that.
I'll be looking into XQJ to make a transformer, hopefully soon, but don't hold your breath! I would also like to hear from you if you create one!
Quoted text · Joachim Wackerow · 2 lines
> > The RESTTransformer seems to be your contribution, right? Does it work with Cocoon 2.1 or 2.2?
Should work with both.
Regards,
Huib.
JW
Joachim Wackerow26 Jan 2011 22:03 #
Thanks Huib.
I'll keep you posted.
Achim
Quoted text · Huib Verweij · 17 lines
On 26.01.2011 21:59, Huib Verweij wrote: > Joachim, > > Op 25 jan 2011, om 18:26 heeft Joachim Wackerow het volgende geschreven: > >> Thanks a lot. The approach with the REST interface is a helpful hint. I like the flexibility of that. > > I'll be looking into XQJ to make a transformer, hopefully soon, but don't hold your breath! I would also like to hear from you if you create one! > >> >> The RESTTransformer seems to be your contribution, right? Does it work with Cocoon 2.1 or 2.2? > > Should work with both. > > Regards, > > Huib.
Written for BaseX 6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery