Re: [basex-talk] How to export a database containing xi:include to multiple files
Hi Marco, It didn’t go unanswered. Here’s Alex’s reply: https://mailman.uni-konstanz.de/pipermail/basex-talk/2018-May/013147.html Although his answer doesn’t address the issue of recreating xi:include elements from elements with an xml:base attribute. Gerrit On 27.06.2018 17:34, Marco Randazzo wrote: Hi, I’m posting again the same question I did some time ago, unfortunately unanswered L I used baseX GUI (9.0.1) to create a database similar to the following test file: http://www.w3.org/2001/XInclude";> The Result displayed in the baseX gui is correct: http://www.w3.org/2001/XInclude";> Now, after editing the values, I would like to export the contents of the database to MULTIPLE xml files, recreating the same files and the original folders (I see this information is not lost, it is stored in the value of xml:base) However, using the export function available in the baseX GUI, I am able to obtain only a SINGLE file containing the Result shown above, where the two files have been merged in a single file. What can I do? Thank you, Cheers, Marco Randazzo -- Gerrit Imsieke Geschäftsführer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsi...@le-tex.de, http://www.le-tex.de Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Geschäftsführer / Managing Directors: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt
[basex-talk] How to export a database containing xi:include to multiple files
Hi, I'm posting again the same question I did some time ago, unfortunately unanswered :( I used baseX GUI (9.0.1) to create a database similar to the following test file: http://www.w3.org/2001/XInclude";> The Result displayed in the baseX gui is correct: http://www.w3.org/2001/XInclude";> Now, after editing the values, I would like to export the contents of the database to MULTIPLE xml files, recreating the same files and the original folders (I see this information is not lost, it is stored in the value of xml:base) However, using the export function available in the baseX GUI, I am able to obtain only a SINGLE file containing the Result shown above, where the two files have been merged in a single file. What can I do? Thank you, Cheers, Marco Randazzo
Re: [basex-talk] How to export a database containing xi:include to multiple files
> On 5. May 2018, at 20:09, Marco Randazzo wrote: > > Hello, > I used baseX gui to create a database from the following test file: > > http://www.w3.org/2001/XInclude";> > > > > > The Result of the baseX gui is correct: > > http://www.w3.org/2001/XInclude";> > > > > > Now, after editing the values, I would like to export the contents of the > database to xml files, recreating the same folders and files (I see this > information stored in the value of xml:base) > However, using the export function available in the GUI, I am able only to > obtain a single file containing the Result shown above. What should I do? > Thank you > Cheers > Marco Randazzo Hi Marco, the export function in the GUI will, as you have noticed, dump the content of the database as XML to a file. To recreate the file hierarchy with the changed XML data a little bit of XQuery is needed. A small example (just to sketch the idea): ```xquery let $xml := http://www.w3.org/2001/XInclude";> for $data in $xml/data let $fpath := $data/@xml:base/data() return file:write($fpath, $data) ``` Cheers, Alex
[basex-talk] How to export a database containing xi:include to multiple files
Hello, I used baseX gui to create a database from the following test file: http://www.w3.org/2001/XInclude";> The Result of the baseX gui is correct: http://www.w3.org/2001/XInclude";> Now, after editing the values, I would like to export the contents of the database to xml files, recreating the same folders and files (I see this information stored in the value of xml:base) However, using the export function available in the GUI, I am able only to obtain a single file containing the Result shown above. What should I do? Thank you Cheers Marco Randazzo