<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29928</bug_id>
          
          <creation_ts>2016-10-11 09:40:55 +0000</creation_ts>
          <short_desc>map:merge, error codes</short_desc>
          <delta_ts>2016-10-26 09:22:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 3.1</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>andrew_coleman</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127708</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2016-10-11 09:40:55 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127834</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-18 15:34:18 +0000</bug_when>
    <thetext>Decided not to change the error codes (there&apos;s no fundamental principle behind these codes that we are violating), but to update the non-normative error descriptions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127884</commentid>
    <comment_count>2</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2016-10-20 17:59:28 +0000</bug_when>
    <thetext>Action A-657-04 opened to track this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127951</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-25 11:30:42 +0000</bug_when>
    <thetext>I have updated the non-normative error descriptions in appendix A.2 as follows:

&lt;error class=&quot;JS&quot; code=&quot;0001&quot; label=&quot;JSON syntax error.&quot; type=&quot;dynamic&quot;&gt;
&lt;p diff=&quot;add&quot; at=&quot;A&quot;&gt;Raised by functions such as &lt;code&gt;fn:json-doc&lt;/code&gt;, &lt;code&gt;fn:parse-json&lt;/code&gt; &lt;phrase diff=&quot;add&quot; at=&quot;D&quot;&gt;or &lt;code&gt;fn:json-to-xml&lt;/code&gt;&lt;/phrase&gt; if the string supplied as input does not conform to the JSON grammar (optionally with implementation-defined extensions).&lt;/p&gt;&lt;/error&gt;
            
&lt;error class=&quot;JS&quot; code=&quot;0003&quot; label=&quot;JSON duplicate keys.&quot; type=&quot;dynamic&quot;&gt;&lt;p diff=&quot;add&quot; at=&quot;A&quot;&gt;Raised by functions such as &lt;code&gt;map:merge&lt;/code&gt;, &lt;code&gt;fn:json-doc&lt;/code&gt;, &lt;code&gt;fn:parse-json&lt;/code&gt; &lt;phrase diff=&quot;add&quot; at=&quot;D&quot;&gt;or &lt;code&gt;fn:json-to-xml&lt;/code&gt;&lt;/phrase&gt;  if the input contains duplicate keys, when the chosen policy is to reject duplicates.&lt;/p&gt;&lt;/error&gt;
            
&lt;error class=&quot;JS&quot; code=&quot;0004&quot; label=&quot;JSON: not schema-aware.&quot; type=&quot;dynamic&quot;&gt;&lt;p diff=&quot;add&quot; at=&quot;D&quot;&gt;Raised by &lt;code&gt;fn:json-to-xml&lt;/code&gt; if validation is requested when the processor does not support schema validation or typed nodes.&lt;/p&gt;&lt;/error&gt;
            
&lt;error class=&quot;JS&quot; code=&quot;0005&quot; label=&quot;Invalid options.&quot; type=&quot;dynamic&quot;&gt;&lt;p diff=&quot;add&quot; at=&quot;D&quot;&gt;Raised by functions such as &lt;code&gt;map:merge&lt;/code&gt;, &lt;code&gt;fn:parse-json&lt;/code&gt;, and &lt;code&gt;fn:xml-to-json&lt;/code&gt; if the &lt;code&gt;$options&lt;/code&gt; map contains an invalid entry.&lt;/p&gt;&lt;/error&gt;
            
&lt;error class=&quot;JS&quot; code=&quot;0006&quot; label=&quot;Invalid XML representation of JSON.&quot; type=&quot;dynamic&quot;&gt;&lt;p diff=&quot;add&quot; at=&quot;D&quot;&gt;Raised by &lt;code&gt;fn:xml-to-json&lt;/code&gt; if the XML input does not conform to the rules for the XML representation of JSON.&lt;/p&gt;&lt;/error&gt;
            
&lt;error class=&quot;JS&quot; code=&quot;0007&quot; label=&quot;Bad JSON escape sequence.&quot; type=&quot;dynamic&quot;&gt;&lt;p diff=&quot;add&quot; at=&quot;D&quot;&gt;Raised by &lt;code&gt;fn:xml-to-json&lt;/code&gt; if the XML input uses the attribute&lt;code&gt;escaped=&quot;true&quot;&lt;/code&gt; or &lt;code&gt;escaped-key=&quot;true&quot;&lt;/code&gt;, and the corresponding string or key contains an invalid JSON escape sequence.&lt;/p&gt;&lt;/error&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>