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 22350 - Serialization-html-23
Summary: Serialization-html-23
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate 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: 2013-06-13 14:06 UTC by Michael Kay
Modified: 2013-06-21 15:13 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael Kay 2013-06-13 14:06:40 UTC
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
Comment 1 Michael Kay 2013-06-13 14:21:02 UTC
Also affects Serialization-html-24
Comment 2 Henry Zongaro 2013-06-13 15:04:16 UTC
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.
Comment 3 Michael Kay 2013-06-13 15:32:45 UTC
Test cases fixed as suggested.
Comment 4 Andrew Eisenberg 2013-06-17 20:55:52 UTC
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.
Comment 5 Michael Kay 2013-06-17 21:02:47 UTC
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.
Comment 6 Andrew Eisenberg 2013-06-17 21:34:10 UTC
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."
Comment 7 Michael Kay 2013-06-17 22:51:40 UTC
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.)
Comment 8 Michael Kay 2013-06-21 15:13:53 UTC
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.