This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
A minor issue: The error codes for the map:merge function have been adopted from the JSON function errors. As custom codes exist for other functions, such as e.g. the array functions (FOAY....), wouldn’t it make sense to use custom codes for map functions as well (FOMA0001, etc.), or to give the existing code a more general name?
Decided not to change the error codes (there's no fundamental principle behind these codes that we are violating), but to update the non-normative error descriptions.
Action A-657-04 opened to track this.
I have updated the non-normative error descriptions in appendix A.2 as follows: <error class="JS" code="0001" label="JSON syntax error." type="dynamic"> <p diff="add" at="A">Raised by functions such as <code>fn:json-doc</code>, <code>fn:parse-json</code> <phrase diff="add" at="D">or <code>fn:json-to-xml</code></phrase> if the string supplied as input does not conform to the JSON grammar (optionally with implementation-defined extensions).</p></error> <error class="JS" code="0003" label="JSON duplicate keys." type="dynamic"><p diff="add" at="A">Raised by functions such as <code>map:merge</code>, <code>fn:json-doc</code>, <code>fn:parse-json</code> <phrase diff="add" at="D">or <code>fn:json-to-xml</code></phrase> if the input contains duplicate keys, when the chosen policy is to reject duplicates.</p></error> <error class="JS" code="0004" label="JSON: not schema-aware." type="dynamic"><p diff="add" at="D">Raised by <code>fn:json-to-xml</code> if validation is requested when the processor does not support schema validation or typed nodes.</p></error> <error class="JS" code="0005" label="Invalid options." type="dynamic"><p diff="add" at="D">Raised by functions such as <code>map:merge</code>, <code>fn:parse-json</code>, and <code>fn:xml-to-json</code> if the <code>$options</code> map contains an invalid entry.</p></error> <error class="JS" code="0006" label="Invalid XML representation of JSON." type="dynamic"><p diff="add" at="D">Raised by <code>fn:xml-to-json</code> if the XML input does not conform to the rules for the XML representation of JSON.</p></error> <error class="JS" code="0007" label="Bad JSON escape sequence." type="dynamic"><p diff="add" at="D">Raised by <code>fn:xml-to-json</code> if the XML input uses the attribute<code>escaped="true"</code> or <code>escaped-key="true"</code>, and the corresponding string or key contains an invalid JSON escape sequence.</p></error>