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

View: New views
5 Messages — Rating Filter:   Alert me  

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

by Bugzilla from bugzilla@wiggum.w3.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6723

           Summary: [Ser] No rule about empty <p> elements in HTML
                    serialization
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Serialization
        AssignedTo: zongaro@...
        ReportedBy: mike@...
         QAContact: public-qt-comments@...


This is from a post today by Matthias Branter on the x-query.com talk list.

There appears to be no rule in the HTML serialization spec that says empty
<div>, <p>, or <script> elements should be serialized as <div></div>, <p></p>,
etc, rather than <p/> or <div/>.

There isn't even a fallback rule, as there was in XSLT 1.0, that says "do what
the HTML specification says."

Should tackle this either with a specific rule about serializing these empty
(but not EMPTY) elements, or with a general rule that says elements in no
namespace should be serialized in accordance with the rules of the HTML
specification whenever possible.


--
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.


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

by Bugzilla from bugzilla@wiggum.w3.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6723





--- Comment #1 from Henry Zongaro <zongaro@...>  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.


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

by Bugzilla from bugzilla@wiggum.w3.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6723





--- Comment #2 from Henry Zongaro <zongaro@...>  2009-08-25 17:26:20 ---
At their joint teleconference of 2009-08-25, the XQuery and XSL working groups
agreed to make the changes proposed by comment #1, with editorial correction of
typographical errors in the proposal.  As there were few members of the XSL WG
present for the call, I will raise this issue separately in an XSL WG call, to
ensure there are no objections to this decision.


--
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.


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

by Bugzilla from bugzilla@wiggum.w3.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6723





--- Comment #3 from Henry Zongaro <zongaro@...>  2009-11-12 19:31:36 ---
At its teleconference of 2009-11-12, the XSL WG ratified the decision described
in comment #2.  This will be Serialization erratum SE.E13.


--
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.


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

by Bugzilla from bugzilla@wiggum.w3.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6723


Henry Zongaro <zongaro@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #4 from Henry Zongaro <zongaro@...>  2009-11-12 19:37:04 ---
Michael, you were present at both calls where this was decided, so I assume the
decision is acceptable to you.  However, I will leave it to you to decide
whether to close the bug or check with Matthias Branter that the resolution is
acceptable to him.


--
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.