unzip

Sunday, 13 January 2013 · 8 messages · last reply 14 Jan 2013
JH
Jason Harrop13 Jan 2013 09:27 #
Hello eXist and MarkLogic both have mechanisms for unzipping a resource when it is loaded into the database. In eXist, you can use a trigger and its unzip module. For MarkLogic, you can use its Office OpenXML Extract pipeline. See http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ What's the easiest way to do this sort of thing in basex? thanks .. Jason
JE
Jens Erat13 Jan 2013 10:45 #
Hi Jason, there are two possibilities: - Have a look at our [archive module]. You can use it to decompress the archive after loading it into BaseX. Currently, there is no hook for decompressing files automatically. - Use [ADDARCHIVES] option to unzip while inserting a document, this should be quit similar to what you can achieve using eXist / MarkLogic. Regards from Lake Constance, Germany, Jens Erat [archive module]: http://docs.basex.org/wiki/Archive_Module [ADDARCHIVE]: http://docs.basex.org/wiki/Options#ADDARCHIVES
-- Jens Erat [phone]: tel:+49-151-56961126 [mail]: mailto:email at jenserat.de [jabber]: xmpp:jabber at jenserat.de [web]: http://www.jenserat.de PGP: 350E D9B6 9ADC 2DED F5F2 8549 CBC2 613C D745 722B
Quoted text · Jason Harrop · 18 lines
Am 13.01.2013 um 09:27 schrieb Jason Harrop <jharrop at gmail.com>: > Hello > > eXist and MarkLogic both have mechanisms for unzipping a resource when > it is loaded into the database. > > In eXist, you can use a trigger and its unzip module. > > For MarkLogic, you can use its Office OpenXML Extract pipeline. See > http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ > > What's the easiest way to do this sort of thing in basex? > > thanks .. Jason > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
AG
Arve Gengelbachin reply to Jason Harrop, 13 Jan 2013, 09:2713 Jan 2013 10:51 #
Hi Jason, for manually unzipping inside an xquery have a look at the [Archive Module]. If you create a database from an archive there is a flag: For creation by command/scripts have ADDARCHIVES set to true (which is default; cf. [Create Options]). And in the GUI, there is a checkbox “Parse files in archives”. These create a collection of documents from the zip. hope this helps Arve [Archive Module] http://docs.basex.org/wiki/Archive_Module [Create Options] http://docs.basex.org/wiki/Options#Create_Options
Quoted text · Jason Harrop · 18 lines
Am 13.01.2013 um 09:27 schrieb Jason Harrop: > Hello > > eXist and MarkLogic both have mechanisms for unzipping a resource when > it is loaded into the database. > > In eXist, you can use a trigger and its unzip module. > > For MarkLogic, you can use its Office OpenXML Extract pipeline. See > http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ > > What's the easiest way to do this sort of thing in basex? > > thanks .. Jason > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
-- Arve Gengelbach, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
JH
Jason Harrop13 Jan 2013 12:33 #
Hello Jens and Arve Thank you for your suggestions. Trying things out, I found that when I use the basexclient to CREATE DATABASE, and then ADD a docx, it is automatically unzipped. I then tried the webdav interface. I used BitKinex to copy a docx into the same database. It didn't get unzipped that way. Is there a reason for that, and a way to change that behaviour? thanks .. Jason
Quoted text · Arve Gengelbach · 44 lines
On Sun, Jan 13, 2013 at 8:51 PM, Arve Gengelbach <ag at basex.org> wrote: > Hi Jason, > > for manually unzipping inside an xquery have a look at the [Archive Module]. > > If you create a database from an archive there is a flag: > For creation by command/scripts have ADDARCHIVES set to true (which is default; cf. [Create Options]). > And in the GUI, there is a checkbox “Parse files in archives”. > These create a collection of documents from the zip. > > hope this helps > Arve > > [Archive Module] http://docs.basex.org/wiki/Archive_Module > [Create Options] http://docs.basex.org/wiki/Options#Create_Options > > > Am 13.01.2013 um 09:27 schrieb Jason Harrop: > >> Hello >> >> eXist and MarkLogic both have mechanisms for unzipping a resource when >> it is loaded into the database. >> >> In eXist, you can use a trigger and its unzip module. >> >> For MarkLogic, you can use its Office OpenXML Extract pipeline. See >> http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ >> >> What's the easiest way to do this sort of thing in basex? >> >> thanks .. Jason >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > -- > Arve Gengelbach, BaseX GmbH, http://basex.org > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >
JH
Jason Harrop14 Jan 2013 00:06 #
Another thing I just noticed, when a docx added via the basexclient is automatically unzipped, the _rels dir is silently dropped / not unzipped.
Quoted text · Jason Harrop · 59 lines
On Sun, Jan 13, 2013 at 10:33 PM, Jason Harrop <jharrop at gmail.com> wrote: > Hello Jens and Arve > > Thank you for your suggestions. > > Trying things out, I found that when I use the basexclient to CREATE > DATABASE, and then ADD a docx, it is automatically unzipped. > > I then tried the webdav interface. I used BitKinex to copy a docx > into the same database. It didn't get unzipped that way. Is there a > reason for that, and a way to change that behaviour? > > thanks .. Jason > > > On Sun, Jan 13, 2013 at 8:51 PM, Arve Gengelbach <ag at basex.org> wrote: >> Hi Jason, >> >> for manually unzipping inside an xquery have a look at the [Archive Module]. >> >> If you create a database from an archive there is a flag: >> For creation by command/scripts have ADDARCHIVES set to true (which is default; cf. [Create Options]). >> And in the GUI, there is a checkbox “Parse files in archives”. >> These create a collection of documents from the zip. >> >> hope this helps >> Arve >> >> [Archive Module] http://docs.basex.org/wiki/Archive_Module >> [Create Options] http://docs.basex.org/wiki/Options#Create_Options >> >> >> Am 13.01.2013 um 09:27 schrieb Jason Harrop: >> >>> Hello >>> >>> eXist and MarkLogic both have mechanisms for unzipping a resource when >>> it is loaded into the database. >>> >>> In eXist, you can use a trigger and its unzip module. >>> >>> For MarkLogic, you can use its Office OpenXML Extract pipeline. See >>> http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ >>> >>> What's the easiest way to do this sort of thing in basex? >>> >>> thanks .. Jason >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> -- >> Arve Gengelbach, BaseX GmbH, http://basex.org >> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz >> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: >> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle >> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >>
CG
Christian Grün14 Jan 2013 13:12 #
Hi Jason, I assume that your _rels directory does not contain any .xml files. One solution could be to set the CREATEFILTER option [1] to any other file extensions that may be required here. Hope this helps, Christian [1] http://docs.basex.org/wiki/Options#CREATEFILTER
Quoted text · Jason Harrop · 68 lines
On Mon, Jan 14, 2013 at 12:06 AM, Jason Harrop <jharrop at gmail.com> wrote: > Another thing I just noticed, when a docx added via the basexclient is > automatically unzipped, > the _rels dir is silently dropped / not unzipped. > > On Sun, Jan 13, 2013 at 10:33 PM, Jason Harrop <jharrop at gmail.com> wrote: >> Hello Jens and Arve >> >> Thank you for your suggestions. >> >> Trying things out, I found that when I use the basexclient to CREATE >> DATABASE, and then ADD a docx, it is automatically unzipped. >> >> I then tried the webdav interface. I used BitKinex to copy a docx >> into the same database. It didn't get unzipped that way. Is there a >> reason for that, and a way to change that behaviour? >> >> thanks .. Jason >> >> >> On Sun, Jan 13, 2013 at 8:51 PM, Arve Gengelbach <ag at basex.org> wrote: >>> Hi Jason, >>> >>> for manually unzipping inside an xquery have a look at the [Archive Module]. >>> >>> If you create a database from an archive there is a flag: >>> For creation by command/scripts have ADDARCHIVES set to true (which is default; cf. [Create Options]). >>> And in the GUI, there is a checkbox “Parse files in archives”. >>> These create a collection of documents from the zip. >>> >>> hope this helps >>> Arve >>> >>> [Archive Module] http://docs.basex.org/wiki/Archive_Module >>> [Create Options] http://docs.basex.org/wiki/Options#Create_Options >>> >>> >>> Am 13.01.2013 um 09:27 schrieb Jason Harrop: >>> >>>> Hello >>>> >>>> eXist and MarkLogic both have mechanisms for unzipping a resource when >>>> it is loaded into the database. >>>> >>>> In eXist, you can use a trigger and its unzip module. >>>> >>>> For MarkLogic, you can use its Office OpenXML Extract pipeline. See >>>> http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ >>>> >>>> What's the easiest way to do this sort of thing in basex? >>>> >>>> thanks .. Jason >>>> _______________________________________________ >>>> BaseX-Talk mailing list >>>> BaseX-Talk at mailman.uni-konstanz.de >>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >>> -- >>> Arve Gengelbach, BaseX GmbH, http://basex.org >>> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz >>> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: >>> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle >>> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >>> > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
JH
Jason Harrop14 Jan 2013 20:39 #
Actually, it does, the filename is ".rels" as in: _rels/.rels The other _rels directories are for example: word/_rels/document.xml.rels
Quoted text · Christian Grün · 83 lines
On Mon, Jan 14, 2013 at 11:12 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Jason, > > I assume that your _rels directory does not contain any .xml files. > One solution could be to set the CREATEFILTER option [1] to any other > file extensions that may be required here. > > Hope this helps, > Christian > > [1] http://docs.basex.org/wiki/Options#CREATEFILTER > > ___________________________ > > On Mon, Jan 14, 2013 at 12:06 AM, Jason Harrop <jharrop at gmail.com> wrote: >> Another thing I just noticed, when a docx added via the basexclient is >> automatically unzipped, >> the _rels dir is silently dropped / not unzipped. >> >> On Sun, Jan 13, 2013 at 10:33 PM, Jason Harrop <jharrop at gmail.com> wrote: >>> Hello Jens and Arve >>> >>> Thank you for your suggestions. >>> >>> Trying things out, I found that when I use the basexclient to CREATE >>> DATABASE, and then ADD a docx, it is automatically unzipped. >>> >>> I then tried the webdav interface. I used BitKinex to copy a docx >>> into the same database. It didn't get unzipped that way. Is there a >>> reason for that, and a way to change that behaviour? >>> >>> thanks .. Jason >>> >>> >>> On Sun, Jan 13, 2013 at 8:51 PM, Arve Gengelbach <ag at basex.org> wrote: >>>> Hi Jason, >>>> >>>> for manually unzipping inside an xquery have a look at the [Archive Module]. >>>> >>>> If you create a database from an archive there is a flag: >>>> For creation by command/scripts have ADDARCHIVES set to true (which is default; cf. [Create Options]). >>>> And in the GUI, there is a checkbox “Parse files in archives”. >>>> These create a collection of documents from the zip. >>>> >>>> hope this helps >>>> Arve >>>> >>>> [Archive Module] http://docs.basex.org/wiki/Archive_Module >>>> [Create Options] http://docs.basex.org/wiki/Options#Create_Options >>>> >>>> >>>> Am 13.01.2013 um 09:27 schrieb Jason Harrop: >>>> >>>>> Hello >>>>> >>>>> eXist and MarkLogic both have mechanisms for unzipping a resource when >>>>> it is loaded into the database. >>>>> >>>>> In eXist, you can use a trigger and its unzip module. >>>>> >>>>> For MarkLogic, you can use its Office OpenXML Extract pipeline. See >>>>> http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ >>>>> >>>>> What's the easiest way to do this sort of thing in basex? >>>>> >>>>> thanks .. Jason >>>>> _______________________________________________ >>>>> BaseX-Talk mailing list >>>>> BaseX-Talk at mailman.uni-konstanz.de >>>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>>> >>>> -- >>>> Arve Gengelbach, BaseX GmbH, http://basex.org >>>> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz >>>> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: >>>> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle >>>> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >>>> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
CG
Christian Grün14 Jan 2013 23:44 #
Quoted text · Jason Harrop · 1 line
> _rels/.rels
..ok, so *.xml,*.rels could be the right value for CREATEFILTER; did you try this already?
Quoted text · Jason Harrop · 93 lines
> The other _rels directories are for example: > > word/_rels/document.xml.rels > > > > On Mon, Jan 14, 2013 at 11:12 PM, Christian Grün > <christian.gruen at gmail.com> wrote: >> Hi Jason, >> >> I assume that your _rels directory does not contain any .xml files. >> One solution could be to set the CREATEFILTER option [1] to any other >> file extensions that may be required here. >> >> Hope this helps, >> Christian >> >> [1] http://docs.basex.org/wiki/Options#CREATEFILTER >> >> ___________________________ >> >> On Mon, Jan 14, 2013 at 12:06 AM, Jason Harrop <jharrop at gmail.com> wrote: >>> Another thing I just noticed, when a docx added via the basexclient is >>> automatically unzipped, >>> the _rels dir is silently dropped / not unzipped. >>> >>> On Sun, Jan 13, 2013 at 10:33 PM, Jason Harrop <jharrop at gmail.com> wrote: >>>> Hello Jens and Arve >>>> >>>> Thank you for your suggestions. >>>> >>>> Trying things out, I found that when I use the basexclient to CREATE >>>> DATABASE, and then ADD a docx, it is automatically unzipped. >>>> >>>> I then tried the webdav interface. I used BitKinex to copy a docx >>>> into the same database. It didn't get unzipped that way. Is there a >>>> reason for that, and a way to change that behaviour? >>>> >>>> thanks .. Jason >>>> >>>> >>>> On Sun, Jan 13, 2013 at 8:51 PM, Arve Gengelbach <ag at basex.org> wrote: >>>>> Hi Jason, >>>>> >>>>> for manually unzipping inside an xquery have a look at the [Archive Module]. >>>>> >>>>> If you create a database from an archive there is a flag: >>>>> For creation by command/scripts have ADDARCHIVES set to true (which is default; cf. [Create Options]). >>>>> And in the GUI, there is a checkbox “Parse files in archives”. >>>>> These create a collection of documents from the zip. >>>>> >>>>> hope this helps >>>>> Arve >>>>> >>>>> [Archive Module] http://docs.basex.org/wiki/Archive_Module >>>>> [Create Options] http://docs.basex.org/wiki/Options#Create_Options >>>>> >>>>> >>>>> Am 13.01.2013 um 09:27 schrieb Jason Harrop: >>>>> >>>>>> Hello >>>>>> >>>>>> eXist and MarkLogic both have mechanisms for unzipping a resource when >>>>>> it is loaded into the database. >>>>>> >>>>>> In eXist, you can use a trigger and its unzip module. >>>>>> >>>>>> For MarkLogic, you can use its Office OpenXML Extract pipeline. See >>>>>> http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/ >>>>>> >>>>>> What's the easiest way to do this sort of thing in basex? >>>>>> >>>>>> thanks .. Jason >>>>>> _______________________________________________ >>>>>> BaseX-Talk mailing list >>>>>> BaseX-Talk at mailman.uni-konstanz.de >>>>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>>>> >>>>> -- >>>>> Arve Gengelbach, BaseX GmbH, http://basex.org >>>>> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz >>>>> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: >>>>> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle >>>>> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >>>>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

⚡Generated with XQuery