Greetings,
I am seeing different behavior between XQuery db:create() and the command CREATE DB when trying to create a database from a zip file, which is causing a problem. I want to import a zip file that contains XML and binary files (images, ets.) into a new BaseX database using db:create() in a web app.
The command "CREATE DB" works as expected. For example, after running this script all contents of the zip file, including XML and binary files, are stored in a new database named "test".
SET ADDRAW true SET ADDARCHIVES true SET ARCHIVENAME false CREATE DB test C:\path\to\file.zip
The XQuery function db:create() is not working correctly. The following query should be equivalent to the above command script, however binary files get placed in a new folder that is created in the folder where BaseX was launch, and the binary files cannot be accessed through BaseX. The binary files should be placed in a "raw" folder within the folder for the database within BaseX' s data directory the same as what CREATE DB produces.
db:create('test', ' C:\path\to\file.zip ', (), map{ 'addraw': 'true', 'addarchives': 'true', 'archivename': 'false' })
I've tried this in BaseX versions 9.0.2 and 9.2.4, both produce the same results.
Is there a way to resolve this problem?
Thanks, Vincent
Vincent M. Lizzi - Digital Production Manager Taylor & Francis Group 530 Walnut St., Suite 850, Philadelphia, PA 19106 E-Mail: vincent.lizzi@taylorandfrancis.commailto:vincent.lizzi@taylorandfrancis.com Phone: 215-606-4221 Web: http://www.tandfonline.com/
Taylor & Francis is a trading name of Informa UK Limited, registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
Hi Vincent,
Thanks for sharing your observation. Just recently, we have stumbled upon this bug by ourselves; it should be fixed with 9.3 [1].
Cheers, Christian
[1] https://github.com/BaseXdb/basex/issues/1717
Lizzi, Vincent Vincent.Lizzi@taylorandfrancis.com schrieb am So., 15. Sep. 2019, 21:47:
Greetings,
I am seeing different behavior between XQuery db:create() and the command CREATE DB when trying to create a database from a zip file, which is causing a problem. I want to import a zip file that contains XML and binary files (images, ets.) into a new BaseX database using db:create() in a web app.
The command “CREATE DB” works as expected. For example, after running this script all contents of the zip file, including XML and binary files, are stored in a new database named “test”.
SET ADDRAW true
SET ADDARCHIVES true
SET ARCHIVENAME false
CREATE DB test C:\path\to\file.zip
The XQuery function db:create() is not working correctly. The following query should be equivalent to the above command script, however binary files get placed in a new folder that is created in the folder where BaseX was launch, and the binary files cannot be accessed through BaseX. The binary files should be placed in a “raw” folder within the folder for the database within BaseX’ s data directory the same as what CREATE DB produces.
db:create('test', ' C:\path\to\file.zip ', (), map{
'addraw': 'true',
'addarchives': 'true',
'archivename': 'false'
})
I’ve tried this in BaseX versions 9.0.2 and 9.2.4, both produce the same results.
Is there a way to resolve this problem?
Thanks,
Vincent
Vincent M. Lizzi - Digital Production Manager
Taylor & Francis Group
530 Walnut St., Suite 850, Philadelphia, PA 19106
E-Mail: vincent.lizzi@taylorandfrancis.com
Phone: 215-606-4221
Web: http://www.tandfonline.com/
Taylor & Francis is a trading name of Informa UK Limited,
registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
Hi Christian,
It is good to hear that problem this is already known and will be fixed soon. As a possible workaround or now, is there a way to run a command script from XQuery that would enable using CREATE DB from XQuery?
Thanks! Vincent
From: Christian Grün christian.gruen@gmail.com Sent: Sunday, September 15, 2019 8:56 PM To: Lizzi, Vincent Vincent.Lizzi@taylorandfrancis.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Problem with db:create and addraw
Hi Vincent,
Thanks for sharing your observation. Just recently, we have stumbled upon this bug by ourselves; it should be fixed with 9.3 [1].
Cheers, Christian
[1] https://github.com/BaseXdb/basex/issues/1717https://github.com/BaseXdb/basex/issues/1717
Lizzi, Vincent <Vincent.Lizzi@taylorandfrancis.commailto:Vincent.Lizzi@taylorandfrancis.com> schrieb am So., 15. Sep. 2019, 21:47: Greetings,
I am seeing different behavior between XQuery db:create() and the command CREATE DB when trying to create a database from a zip file, which is causing a problem. I want to import a zip file that contains XML and binary files (images, ets.) into a new BaseX database using db:create() in a web app.
The command "CREATE DB" works as expected. For example, after running this script all contents of the zip file, including XML and binary files, are stored in a new database named "test".
SET ADDRAW true SET ADDARCHIVES true SET ARCHIVENAME false CREATE DB test C:\path\to\file.zip
The XQuery function db:create() is not working correctly. The following query should be equivalent to the above command script, however binary files get placed in a new folder that is created in the folder where BaseX was launch, and the binary files cannot be accessed through BaseX. The binary files should be placed in a "raw" folder within the folder for the database within BaseX' s data directory the same as what CREATE DB produces.
db:create('test', ' C:\path\to\file.zip ', (), map{ 'addraw': 'true', 'addarchives': 'true', 'archivename': 'false' })
I've tried this in BaseX versions 9.0.2 and 9.2.4, both produce the same results.
Is there a way to resolve this problem?
Thanks, Vincent
Vincent M. Lizzi - Digital Production Manager Taylor & Francis Group 530 Walnut St., Suite 850, Philadelphia, PA 19106 E-Mail: vincent.lizzi@taylorandfrancis.commailto:vincent.lizzi@taylorandfrancis.com Phone: 215-606-4221 Web: http://www.tandfonline.com/http://www.tandfonline.com/
Taylor & Francis is a trading name of Informa UK Limited, registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
Information Classification: General
Hi Vincent,
It is good to hear that problem this is already known and will be fixed soon. As a possible workaround or now, is there a way to run a command script from XQuery that would enable using CREATE DB from XQuery?
Currently no. We didn’t enable script execution from XQuery because it might introduce too many new and complex side effects. For now, you’ll have to create your database in a first step and add resources via db:store and db:add in a subsequent step.
BaseX 9.3 is expected to be released by end of September or mid-October.
Cheers, Christian
From: Christian Grün christian.gruen@gmail.com Sent: Sunday, September 15, 2019 8:56 PM To: Lizzi, Vincent Vincent.Lizzi@taylorandfrancis.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Problem with db:create and addraw
Hi Vincent,
Thanks for sharing your observation. Just recently, we have stumbled upon this bug by ourselves; it should be fixed with 9.3 [1].
Cheers,
Christian
[1] https://github.com/BaseXdb/basex/issues/1717
Lizzi, Vincent Vincent.Lizzi@taylorandfrancis.com schrieb am So., 15. Sep. 2019, 21:47:
Greetings,
I am seeing different behavior between XQuery db:create() and the command CREATE DB when trying to create a database from a zip file, which is causing a problem. I want to import a zip file that contains XML and binary files (images, ets.) into a new BaseX database using db:create() in a web app.
The command “CREATE DB” works as expected. For example, after running this script all contents of the zip file, including XML and binary files, are stored in a new database named “test”.
SET ADDRAW true
SET ADDARCHIVES true
SET ARCHIVENAME false
CREATE DB test C:\path\to\file.zip
The XQuery function db:create() is not working correctly. The following query should be equivalent to the above command script, however binary files get placed in a new folder that is created in the folder where BaseX was launch, and the binary files cannot be accessed through BaseX. The binary files should be placed in a “raw” folder within the folder for the database within BaseX’ s data directory the same as what CREATE DB produces.
db:create('test', ' C:\path\to\file.zip ', (), map{
'addraw': 'true',
'addarchives': 'true',
'archivename': 'false'
})
I’ve tried this in BaseX versions 9.0.2 and 9.2.4, both produce the same results.
Is there a way to resolve this problem?
Thanks,
Vincent
Vincent M. Lizzi - Digital Production Manager
Taylor & Francis Group
530 Walnut St., Suite 850, Philadelphia, PA 19106
E-Mail: vincent.lizzi@taylorandfrancis.com
Phone: 215-606-4221
Web: http://www.tandfonline.com/
Taylor & Francis is a trading name of Informa UK Limited,
registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
Information Classification: General
Hi Vincent,
The fix for adding binary resources via XQuery is available. I’d appreciate if you could give it a quick shot [1].
Thanks in advance, Christian
[1] http://files.basex.org/releases/latest/
On Mon, Sep 16, 2019 at 11:58 AM Christian Grün christian.gruen@gmail.com wrote:
Hi Vincent,
It is good to hear that problem this is already known and will be fixed soon. As a possible workaround or now, is there a way to run a command script from XQuery that would enable using CREATE DB from XQuery?
Currently no. We didn’t enable script execution from XQuery because it might introduce too many new and complex side effects. For now, you’ll have to create your database in a first step and add resources via db:store and db:add in a subsequent step.
BaseX 9.3 is expected to be released by end of September or mid-October.
Cheers, Christian
From: Christian Grün christian.gruen@gmail.com Sent: Sunday, September 15, 2019 8:56 PM To: Lizzi, Vincent Vincent.Lizzi@taylorandfrancis.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Problem with db:create and addraw
Hi Vincent,
Thanks for sharing your observation. Just recently, we have stumbled upon this bug by ourselves; it should be fixed with 9.3 [1].
Cheers,
Christian
[1] https://github.com/BaseXdb/basex/issues/1717
Lizzi, Vincent Vincent.Lizzi@taylorandfrancis.com schrieb am So., 15. Sep. 2019, 21:47:
Greetings,
I am seeing different behavior between XQuery db:create() and the command CREATE DB when trying to create a database from a zip file, which is causing a problem. I want to import a zip file that contains XML and binary files (images, ets.) into a new BaseX database using db:create() in a web app.
The command “CREATE DB” works as expected. For example, after running this script all contents of the zip file, including XML and binary files, are stored in a new database named “test”.
SET ADDRAW true
SET ADDARCHIVES true
SET ARCHIVENAME false
CREATE DB test C:\path\to\file.zip
The XQuery function db:create() is not working correctly. The following query should be equivalent to the above command script, however binary files get placed in a new folder that is created in the folder where BaseX was launch, and the binary files cannot be accessed through BaseX. The binary files should be placed in a “raw” folder within the folder for the database within BaseX’ s data directory the same as what CREATE DB produces.
db:create('test', ' C:\path\to\file.zip ', (), map{
'addraw': 'true',
'addarchives': 'true',
'archivename': 'false'
})
I’ve tried this in BaseX versions 9.0.2 and 9.2.4, both produce the same results.
Is there a way to resolve this problem?
Thanks,
Vincent
Vincent M. Lizzi - Digital Production Manager
Taylor & Francis Group
530 Walnut St., Suite 850, Philadelphia, PA 19106
E-Mail: vincent.lizzi@taylorandfrancis.com
Phone: 215-606-4221
Web: http://www.tandfonline.com/
Taylor & Francis is a trading name of Informa UK Limited,
registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
Information Classification: General
Hi Christian,
Testing again with the latest 9.3-SNAPSHOT, when using db:create() the raw files in the .zip archive are being placed in the correct location. Thank you for the speedy solution!
Vincent
Information Classification: General From: Christian Grün christian.gruen@gmail.com Sent: Tuesday, September 17, 2019 12:59 PM To: Lizzi, Vincent Vincent.Lizzi@taylorandfrancis.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Problem with db:create and addraw
Hi Vincent,
The fix for adding binary resources via XQuery is available. I'd appreciate if you could give it a quick shot [1].
Thanks in advance, Christian
[1] http://files.basex.org/releases/latest/http://files.basex.org/releases/latest/
On Mon, Sep 16, 2019 at 11:58 AM Christian Grün <christian.gruen@gmail.commailto:christian.gruen@gmail.com> wrote:
Hi Vincent,
It is good to hear that problem this is already known and will be fixed soon. As a possible workaround or now, is there a way to run a command script from XQuery that would enable using CREATE DB from XQuery?
Currently no. We didn't enable script execution from XQuery because it might introduce too many new and complex side effects. For now, you'll have to create your database in a first step and add resources via db:store and db:add in a subsequent step.
BaseX 9.3 is expected to be released by end of September or mid-October.
Cheers, Christian
From: Christian Grün <christian.gruen@gmail.commailto:christian.gruen@gmail.com> Sent: Sunday, September 15, 2019 8:56 PM To: Lizzi, Vincent <Vincent.Lizzi@taylorandfrancis.commailto:Vincent.Lizzi@taylorandfrancis.com> Cc: BaseX <basex-talk@mailman.uni-konstanz.demailto:basex-talk@mailman.uni-konstanz.de> Subject: Re: [basex-talk] Problem with db:create and addraw
Hi Vincent,
Thanks for sharing your observation. Just recently, we have stumbled upon this bug by ourselves; it should be fixed with 9.3 [1].
Cheers,
Christian
[1] https://github.com/BaseXdb/basex/issues/1717https://github.com/BaseXdb/basex/issues/1717
Lizzi, Vincent <Vincent.Lizzi@taylorandfrancis.commailto:Vincent.Lizzi@taylorandfrancis.com> schrieb am So., 15. Sep. 2019, 21:47:
Greetings,
I am seeing different behavior between XQuery db:create() and the command CREATE DB when trying to create a database from a zip file, which is causing a problem. I want to import a zip file that contains XML and binary files (images, ets.) into a new BaseX database using db:create() in a web app.
The command "CREATE DB" works as expected. For example, after running this script all contents of the zip file, including XML and binary files, are stored in a new database named "test".
SET ADDRAW true
SET ADDARCHIVES true
SET ARCHIVENAME false
CREATE DB test C:\path\to\file.zip
The XQuery function db:create() is not working correctly. The following query should be equivalent to the above command script, however binary files get placed in a new folder that is created in the folder where BaseX was launch, and the binary files cannot be accessed through BaseX. The binary files should be placed in a "raw" folder within the folder for the database within BaseX' s data directory the same as what CREATE DB produces.
db:create('test', ' C:\path\to\file.zip ', (), map{
'addraw': 'true',
'addarchives': 'true',
'archivename': 'false'
})
I've tried this in BaseX versions 9.0.2 and 9.2.4, both produce the same results.
Is there a way to resolve this problem?
Thanks,
Vincent
Vincent M. Lizzi - Digital Production Manager
Taylor & Francis Group
530 Walnut St., Suite 850, Philadelphia, PA 19106
E-Mail: vincent.lizzi@taylorandfrancis.commailto:vincent.lizzi@taylorandfrancis.com
Phone: 215-606-4221
Web: http://www.tandfonline.com/http://www.tandfonline.com/
Taylor & Francis is a trading name of Informa UK Limited,
registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
Information Classification: General
basex-talk@mailman.uni-konstanz.de