This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I did not find any hint in the XQFO specification why the "unspecified" option was added for the "duplicates" option in map:merge. I did not find a similar solution for any other function, and I assume that most users of XQuery prefer to have results they can rely on, no matter which implementation they use. Would it hurt anyone to simply drop this value?
One member of the WG persuaded his colleagues that there were many situations where the user would know that duplicates would never be encountered, and therefore didn't care how they were handled, and therefore wanted the implementation to use whatever approach would be most efficient; and that different implementation strategies might lead to a different answer to what the most efficient choice would be.
Digging deeper into my memory of this, I think we were particularly concerned that an implementation that evaluated all the input maps in parallel should not be required to retain information about the ordering of the input maps purely in order to decide which duplicate to retain, when the user might not care.
Thanks for the clarification, Michael. Just a guess: It could be helpful for the user of this function to name the value "ignore" (or "use-any"? "use-one"? because "unspecified" hides the fact that only one value will be retained), and to add a little note that this option may improve parallelized execution in some implementations.
The WG agreed to rename the option "use-any" and to add a justificatory note.
The changes have been applied and the only test case I could find has been updated.