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 21968 - [SER30] Empty elements with HTML 4.0 serialization
Summary: [SER30] Empty elements with HTML 4.0 serialization
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Serialization 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Henry Zongaro
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-08 14:01 UTC by O'Neil Delpratt
Modified: 2013-05-15 15:32 UTC (History)
0 users

See Also:


Attachments

Description O'Neil Delpratt 2013-05-08 14:01:52 UTC
In spec at section 7.1 it states:

"For HTML 4.0, the element types that have an empty content model are area, base, basefont, br, col, embed, frame, hr, img, input, isindex, link, meta and param."

What namespace does this apply to? Test case Serialization-html-3 assumes that this includes the XHTML namespace, but the spec does not make this clear. This was not the case in XSLT 2.0/XQuery 1.0.
Comment 1 Henry Zongaro 2013-05-10 16:00:46 UTC
O'Neil, the first paragraph of section 7.1 states, in part

<<the HTML output method will not output an element differently from the XML output method unless the element is to be serialized as an HTML element.  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, or

. the value of the requested HTML version is 5.0 or greater, and the element node is in the XHTML namespace.>>

The intention was that, if the value of the version parameter is 4.0, only elements that have a null namespace URI are recognized as empty elements.  In the case of Serialization-html-3, the expected serialized result, which I've copied below, reflects that.  For instance, the br element node is expected to be serialized as <br/> rather than as <br>.

<serialization-matches><![CDATA[<html xmlns="http://www.w3.org/1999/xhtml"><body/><area/><base/><br/><col/><embed/><frame/><hr/><img/><input/><isindex/><link/><meta/><param/></body/></html>]]></serialization-matches>


I am, of course, speaking for myself only, not on behalf of the XQuery and XSLT working groups.
Comment 2 Henry Zongaro 2013-05-15 13:38:06 UTC
At their joint teleconference call of 14 May, 2013,[1] the XSLT and XQuery Working Groups agreed with the reasoning outlined in comment #1, and decided the bug should be closed as invalid.  It was also decided that the serialization test in question should updated to allow for additional permissible serialized results for elements that are empty but not serialized as HTML elements - e.g., <br/> and <br></br> are both permissible.

O'Neil, as you were present I will assume that you are in agreement with the decision and close the bug.

[1] https://lists.w3.org/Archives/Member/w3c-xsl-query/2013May/0024.html (Member-only link)
Comment 3 O'Neil Delpratt 2013-05-15 15:32:00 UTC
Yes I agree with the resolution. I have also added an alternative result to the test case