[Bug 29030] New: serialize-xml-123 expects the wrong error code

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29030

            Bug ID: 29030
           Summary: serialize-xml-123 expects the wrong error code
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---
             Group: XSLXQuery_WG

<test-case name="serialize-xml-123"...>
  <description>serialize test - params supplied as map: error - character map
key must be a single character</description>
  <created by="Debbie Lockett, Saxonica" on="2015-05-19"/>
  ...
  <test><![CDATA[
    let $params := map {
      "use-character-maps" : map { "$$":"£" } 
    }
    return serialize(., $params)
  ]]></test>
  <result>
    <error code="SEPM0017"/>
  </result>
</test-case>

I agree that this test should fail for the same reason mentioned in the test
description.  However, I think the error code is wrong.  As far as I can see,
SEPM0017 is only mentioned in SER31 section 3.1  "Setting Serialization
Parameters by Means of a Data Model Instance" which defines how to extract
serialization parameters from an XML instance.  I think "by Means of a Data
Model Instance" is probably too vague now that parameters can be modeled as
maps (maybe this is where the confusion came from).  But in any case, SEPM0017
is raised when the expression mentioned in the section raises an error.

In FNO31 14.7.3 fn:serialize, there is a note that explains this case:

"If the supplied value is of the wrong type for the particular parameter, for
example if the value of indent is a string rather than a boolean, then as
defined by the ·option parameter conventions·, a type error [err:XPTY0004]XP30
is raised. If the value is of the correct type, 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."

In this case the value is of the correct type (map(*)).  In SER31 section 3, it
says:

"It is a serialization error [err:SEPM0016] if a parameter value is invalid for
the given parameter."

Since the key is not a single Unicode character, I think the expected result
should be SEPM0016.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 5 August 2015 19:40:47 UTC