This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Should fn:put() allow serialization parameters? Serialization parameters make sense when writing to text-based systems, but fn:put() can also write to binary stores. If we allow serialization parameters, what should a binary store do with them? Ignore the serialization parameters? Raise an error?
XSLT has always had this problem: the output of the stylesheet may or may not be serialized. The rules are clear: if the processor is not serializing, it ignores the serialization parameters, except that it is permitted (but not required) to report errors if they are incorrect. I think that fn:put() should allow serialization parameters to be specified.
Ideally, we would add multiple functions to address different use cases. fn:put() would be used for updates, we would have other methods for file systems, and perhaps others for Internet resources. This is worth taking up in future versions of XQuery, but for now we defer this to expath.org. See, for instance, http://expath.org/spec/file.