<?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>29740</bug_id>
          
          <creation_ts>2016-07-19 14:32:47 +0000</creation_ts>
          <short_desc>[FO31] serialize-xml-139,140</short_desc>
          <delta_ts>2016-09-07 09:08:08 +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>Candidate Recommendation</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="Tim Mills">tim</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>andrew_coleman</cc>
    
    <cc>mike</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>126979</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-07-19 14:32:47 +0000</bug_when>
    <thetext>These tests use odd maps for in use-character-maps, namely

 map { QName(&quot;http://example.org&quot;,&quot;xyz&quot;) : &quot;abc&quot; } 

and 

 map {
                     &apos;x&apos; : xs:untypedAtomic(&apos;j&apos;),
                     &apos;m&apos; : &lt;e&gt;so&lt;/e&gt;,
                     &apos;l&apos; : &apos;n&apos;
                  }

Neither of these match the required type 

   map(xs:string, xs:string)?

Why is the expected result not XPTY0004?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126984</commentid>
    <comment_count>1</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2016-07-19 15:51:26 +0000</bug_when>
    <thetext>I have assigned this bug to Josh to resolve.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127080</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-07-29 10:22:18 +0000</bug_when>
    <thetext>We say two things about the character map in fn:serialize:

(a) the required type is map{xs:string, xs:string}

(b) the option parameter conventions apply recursively to this map.

The tests are trying to test for (b), but the bug suggests that they fail on condition (a), and I agree. I don&apos;t think that (b) overrides (a).

This leaves the question as to whether statement (b) has any remaining meaning. If all the entries are (string, string) pairs, then there&apos;s very little in the option parameter conventions that&apos;s actually applicable.

It also raises the question of what should happen if any of the keys in the map is a string of length other than 1. One interpretation would be that OPC rule 4 kicks in &quot;It is not an error if the options map contains options with names other than those described in this specification.&quot;, since the &quot;names&quot; for which the specification defines a meaning are all single-character strings. That seems unhelpful; I would prefer the interpretation:

&lt;quote&gt;
If the value [of use-character-maps] is of the correct type [map(xs:string, xs:string)?], but does not satisfy the rules for that parameter defined in [XSLT and XQuery Serialization 3.1], then a dynamic error [err:SEPM0016]SER31 is raised.
&lt;/quote&gt; 

So my vote is for deleting the Note that says the option parameter conventions apply recursively, and for raising XPTY0004 for these two tests.

Promoting this to a spec bug against F+O.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127109</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-08-09 13:19:38 +0000</bug_when>
    <thetext>In the meantime, I&apos;ve added XPTY0004 as possible results for these two tests (without removing the existing assertion).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127312</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-06 19:48:49 +0000</bug_when>
    <thetext>The WG agreed that the sentence stating that the option parameter conventions applied to the use-character-maps map should be deleted.

The change has been applied; I have also made it explicit what happens when you supply a character map containing a key that is not a string of length one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127328</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-09-07 09:07:46 +0000</bug_when>
    <thetext>I&apos;ve updated the test suite accordingly.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>