This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This test expects the output "<foo/>". As far as I can see from reading the spec, the correct output is "<foo></foo>". Specifically: 1. An element node is serialized as an HTML element if... the expanded QName of the element has a null namespace URI, regardless of the value of the requested HTML version 2. If the element is to be serialized as an HTML element, but the local part of the expanded QName is not recognized as the name of an HTML element, the element MUST be output in the same way as a non-empty, inline element such as span. 3. a serializer MUST serialize an HTML element that has no children, but whose content model is not empty, using a pair of adjacent start and end element tags
Also affects Serialization-html-24
Michael, I agree with your analysis and conclusion regarding the expected output for Serialization-html-23 and Serialization-html-24. My apologies for the test case errors.
Test cases fixed as suggested.
These two test cases both use an output declaration specifying method HTML. If I'm reading our specs correctly, in section 2.2.4 Serialization, XQuery says: "When the application requests serialization of the output, the processor may use these parameters to control the way in which the serialization takes place." I believe that an XQuery implementation can ignore the output declaration of method HTML and instead use the default XML method. I believe that <foo/> should then be an accepted result for these test cases.
These tests are marked with <dependency type="feature" value="serialization" satisfied="true"/> which signifies that they are intended to be run only by processors that respect the serialization options in the query prolog.
The dependency you provide is part of test cases Serialization-html-22 and Serialization-html-25, but not the two test cases between them. In 5.2.6 Serialization Feature, XQuery says: "[Definition: The Serialization Feature provides means for serializing the result of a query as specified in 2.2.4 Serialization.] A conforming XQuery implementation that provides the Serialization Feature MUST conform to 2.2.4 Serialization." As I said before, 2.2.4 says, "... the processor may use these parameters to control the way in which the serialization takes place."
I think it's an oversight that the serialization dependency doesn't apply to these two tests. And I think the QT3 dependency named "serialization" should mean "performs serialization as defined by the serialization parameters in the query". That's clearly the design intent of these tests. (The serialization feature as defined in the spec, which allows you to serialize any way you fancy, is completely untestable.)
1. I have updated these two tests to state their dependency on "serialization" 2. I have updated the documentation to indicate that the dependency on "serialization" means: Requires the query to support serialization: specifically, to recognize the serialization parameters defined in the query and to perform serialization using the values of those parameters as defined in the Serialization 3.0 specification (this is a stronger requirement than merely providing the XQuery 3.0 serialization feature). The tests are written on the assumption that this is what the processor will do, so the best course seems to be to make that assumption explicit. Otherwise, serialization would become untestable.