This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26824 - The definition of assert-serialization-error
Summary: The definition of assert-serialization-error
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-16 21:43 UTC by Josh Spiegel
Modified: 2014-11-19 17:19 UTC (History)
1 user (show)

See Also:


Attachments

Description Josh Spiegel 2014-09-16 21:43:34 UTC
In catalog-schema.xsd, for “assert-serialization-error” it says:

Asserts that the query can be executed without error, but serializing the result produces a serialization error. The expression result is serialized using the default serialization parameters method="xml" indent="no" omit-xml-declaration="yes”.

But there are a number of tests in OptionDecl.serialization.xml that seem to expect different serialization parameters.  For example, Serialization-032:

   <test-case name="Serialization-032">
      ...
      <test><![CDATA[
         declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
         declare option output:method "xml";
         declare option output:standalone "no";
         declare option output:omit-xml-declaration "yes";
		 <a/>
      ]]></test>
      <result>
        <assert-serialization-error code="SEPM0009" />
      </result>
   </test-case>

This test seems to expect that the serialization parameters from the prolog of the query will be used. (SEPM009 results if the omit-xml-declaration parameter has the value yes, and the standalone parameter has a value other than omit)

It appears that either the definition of assert-serialization-error is wrong or the tests are wrong.
Comment 1 Michael Kay 2014-11-04 21:18:58 UTC
I think the description in the catalog is wrong. The serialization should use the serialization parameters in the query prolog if present. That seems to be the only thing that makes sense; we want to test serialization errors that can't occur if the default serialization options are used.
Comment 2 Josh Spiegel 2014-11-19 17:19:13 UTC
Fixed as suggested in Comment 1.