Error in the text for the server protocol?
Thursday, 16 April 2020 · 1 message
BE
Ben Engbers16 Apr 2020 22:53 #
Hi Michael,
I only noticed today that in the server procol
(https://docs.basex.org/wiki/Server_Protocol) there are 2 different instructions for adding a new resource.
On page 3:
ADD \09 {name} {path} {input}
On page 6:
void add(String path, InputStream input)
I has been pure luck that I mixed both instructions. I have implemented ADD as \09 {path} {input} and that works perfectly.
Session$Add("Test.xml", "<Line_1 line='1'>Content 1</Line_1>") adds resource Test.xml with the xml as content.
Meanwhile it is very easy for me to change the instructions that are send to the server so I tried to add {name} to the ADD command. That results in errors.
My guess is that you should use either {name} or {path} and that ADD only works on the database in use. Is that correct?
Cheers,
Ben
Written for BaseX 9.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery