This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
<test-case name="Serialization-009" xmlns="http://www.w3.org/2010/09/qt-fots-catalog"> <description> It is a serialization error [err:SEPM0016] if a parameter value is invalid for the given parameter. Wrong serialization parameter value for doctype-public. </description> <created by="Dennis Knochenwefel" on="2011-12-05"/> <dependency type="spec" value="XQ30+"/> <test><![CDATA[declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; declare option output:doctype-public "쎁"; <result>ok</result> ]]></test> <result> <any-of> <!-- the processor may use these parameters to control the way in which the serialization takes place. It is the responsibility of the host language to specify how invalid values should be handled at the level of that language. --> <assert-xml><![CDATA[<result>ok</result>]]></assert-xml> <!-- It is a serialization error [err:SEPM0016] if a parameter value is invalid for the given parameter. --> <assert-serialization-error code="SEPM0016"/> </any-of> </result> </test-case> This test uses assert-serialization-error to test for SEPM0016. Here is the definition of assert-serialization-error: "Asserts that the query can be executed without error, but serializing the result produces a serialization error. The result of the query must be serialized using the serialization options specified within the query (if any)." I think in this case, the test should also allow the error to be thrown during expression processing. From XQuery 3.0, 2.4.4: "A processor that is not performing serialization may report errors if any serialization parameters are incorrect, or may ignore such parameters." So I would like to add an alternate result: <error code="SEPM0016"/> And I would like to make the same type of fix to the following tests as well: Serialization-010 Serialization-011 Serialization-012 Serialization-015 Serialization-017 Serialization-018 Serialization-019 Serialization-020 Serialization-024 Serialization-025
I don't know what makes you think that serialization errors can't be reported "during evaluation". It only says that the query CAN BE executed without error (i.e. that there is no error if the result is not serialized), it doesn't say that the query IS executed without error. The use of assert-serialization-error tells the test driver that serialization must be attempted (because if it isn't, the error won't occur). Apart from that, the error can be detected in exactly the same way as <error code="xx">. So I can't see any possible value in adding an alternative result.
"Asserts that the query can be executed without error ..." I thought this means that it ensures the query can be executed without error. But this is apparently not the meaning you intended. Thanks for the clarification!