This works: Session$Create(DB_Name, "<Line_1 line='1'>Content 1</Line_1>")
Fine.
So you distinguish a XML-DOCUMENT from a XML-FILE and that was something I didn't know.
I guess so. Do we use these two terms in our documentation? Or did you want to point out that you used “document” and “files” for describing the same thing in our conversation?
Are there more places in the server protocol where this difference is relevant?
Could you please make a note of this in the documentation for the server protocol?
We’ll be glad to improve the documentation. I’m not sure which of the formulations were misleading to you, so feel free to share them with us.
I already have this function which checks if input is already a raw vector or if the input can be transformed into a vector.
Is "raw vector" a byte array or something else? What does is.VALID do?
Feature request: Could you implement the same functionality in the server protocol?
I’m hesitant to change the server protocol at this stage, as almost all other client bindings are based on the current definitions, and would possibly need to be updated. But maybe you need to get more specific in your wording (or it’s my task to spend more time and find out what you mean):
The "protocol" is the set of rules that are implemented by the various bindings to communicate with the server. If you say we should implement the functionality in the protocol, would you like to see new rules added? Or would you expect the server-side implementation of the protocol rules to check if the input for a CREATE command can be interpreted as file reference?
I think we shouldn’t resolve client file references on the server, as clients and servers usually reside on different machines. You can provide file paths with CREATE DB, but the only reason is that this command was initially designed to work with the standalone version of BaseX. We even had thoughts on rejecting local file references if they are passed on by a client..