W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2009

[Bug 6723] [Ser] No rule about empty <p> elements in HTML serialization

From: <bugzilla@wiggum.w3.org>
Date: Thu, 20 Aug 2009 15:01:37 +0000
To: public-qt-comments@w3.org
Message-Id: <E1Me98z-0005h0-8G@wiggum.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6723





--- Comment #1 from Henry Zongaro <zongaro@ca.ibm.com>  2009-08-20 15:01:36 ---
A few general comments:  I agree that the Serialization recommendation needs to
be at least slightly more prescriptive about the requirements it places on a
serializer with respect to the HTML output method.  We took care to ensure that
a serializer was not required to serialize valid HTML if presented with a
result tree that could not be serialized as valid HTML - but in doing so, we
forgot to say that if it was possible to serialize the result as valid HTML,
the serializer should do so.

Having said that, I want to point out that the second item of section 4 of the
Serialization recommendation[1] states that the markup generation phase of
serialization produces start and end element tags for the XML, HTML and XHTML
output methods, but it only produces empty element tags for the HTML output
method.  That should make it clear that a P element or a DIV element with empty
content should be serialized as <P></P> and <DIV></DIV> respectively (or <P>
and <DIV>, if the context allows the end tag to be omitted), and never as <P/>
or <DIV/>.

However, it's probably a bit hard to spot there.  I would like to propose the
following changes:

At the end of the third paragraph of section 7 of the Serialization
recommendation,[2] add the following sentence:  "If the result tree is valid
HTML, the serializer MUST serialize the result in a way that conforms with the
version HTML specified by the version serialization parameter."

After the second paragraph of section 7.1,[3] add the following note:  "Note: 
The markup generation phase of serialization only creates start tags and end
tags for the HTML output method, never XML-style empty element tags.  As such,
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, or as a solitary start tag if the permitted by the context."

[1] http://www.w3.org/TR/2007/REC-xslt-xquery-serialization-20070123/#serphases
[2]
http://www.w3.org/TR/2007/REC-xslt-xquery-serialization-20070123/#html-output


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 20 August 2009 15:01:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:40 UTC