Hi everyone,
I have a question regarding the add command -- ADD (AS [name]) (TO [target]) [input]. It seems it is not possible to add a document to the database which you want to give a custom name (for whatever reason) that contains a space like so:
add as "test x.xml" "/path/to/test 1.xml"
Doing this will result in an error implying I do not use the right syntax. Apparently it is not allowed to use quotes (neither " nor ') around the name you want to give the document. I wonder why this is. Especially because BaseX will actually name the document 'test 1.xml' when the 'as [name]' is omitted; like so:
add "/path/to/test 1.xml"
I wonder if this is a minor bug in the syntax checking of this command, or that this is intended behavior. In case of the latter, I wonder if there is another way to specify names which contain spaces.
While we are at it (the add command): I was expecting the TO [target] part to refer to a database. For example, if I have two databases 'misc' and 'col', I would expect a command such as:
add to misc "/path/to/test.xml"
to add the document test.xml to the database misc. Instead, I first have to open the database misc, then add the document (without the 'to misc'-part), then close it again. Is this also intended? If so, please enlighten me as to what target exactly refers to (apparently no database/collection).
Thanks in advance for any responses.
-- Daniël
ps. I am on version 6.3.1