Hi Andy,
I am looking at the new 7.3 XML format commands and some things that are not clear to me in the documentation. [...]
thanks for the hint. If you have some ideas how the documentation could be improved… your edits are more than welcome!
I want to use the client module http://docs.basex.org/wiki/Client_Module.
the following query should do what you need:
let $c := client:connect( ... ) return ( client:execute($c, 'set chop off'), client:execute($c, 'create db test http://files.basex.org/xml/xmark.xml'), client:execute($c, 'set chop on') )
Currently, the client module only allows single commands per client:execute call. These commands can even be represented as xml (in most cases, though, this won't make too much sense):
client:execute($c, '<info/>')
However, one reason we introduced the new XML command syntax is that we want to make our command interface more powerful. In future versions, we plan to..
– integrate the XML command into our existing REST API – represent "transactions" (several commands) that will be atomically executed – provide simple boolean operators to decide if a second command will be executed if the one fails. the syntax could be extended to conditional stuff (if/then/else) and other basic coding paradigms.
More ideas are welcome, Christian