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 12322 - [Polyglot] "Required Elements" - clarify use of <colgroup> and more.
Summary: [Polyglot] "Required Elements" - clarify use of <colgroup> and more.
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML/XHTML Compatibility Authoring Guide (ed: Eliot Graff) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Eliot Graff
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/html-xhtml-au...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 01:25 UTC by Leif Halvard Silli
Modified: 2011-08-04 05:07 UTC (History)
5 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2011-03-17 01:25:37 UTC
The Polyglot Markup spec can easily be read to say that <colgroup> is obligatory in any table:

]] Polyglot markup explicitly uses a colgroup element surrounding groups of col elements within a table element. HTML parsers insert the colgroup element, but XML parsers do not, thus creating different DOMs. [[

At least, I did. I even created this Live DOM viewer test to show that it is not the case: http://tinyurl.com/colgroup

What you wanted to say was that <colgroup> is an obligatory wrapper aroun any <col>. The confusing wordings are "uses", "explicit" and "insert".  Perhaps the word "code" could been used somewhere? The wording should also imply clear that it can be more than one colgroup in the same table.

I suggest this:

]] In the code of polyglot markup, a col element always has to occur wrapped inside a colgroup element. In HTML, if in the code a group of one or more adjacent col elements are not explicitly wrapped inside a colgroup element, then the parser will create a new colgroup element and wrap around them. XML parsers will not do the same thing, thus creating different DOMs.[[

In the same go, place also fix the text about <tbody>. You should say that authors must use either tbody, thead or tfoot. I suggest this:

]] In the code of polyglot markup, a tr element always has to occur wrapped inside a tbody, thead or tfoot element. In HTML, if in the code a group of one or more adjacent tr elements are not explictly wrapped inside a tbody, thead or tfoot element, then the parser will create a new tbody element and wrap around them. XML parsers will not do the same thing, thus creating different DOMs.[[

Another thing: the minimal document example, you have this <html> start tag:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

Please EITHER clarify that you mean a minimal ENGLISH document. OR replace lang="en" xml:lang="en" with empty attributes (which per HTML5 and XML means that no language has been set):

<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">

(We discussed another place that ther should always be a lang/xml:lang attribute, so it is OK for me to include the lang/xml:lang attributes.)
Comment 1 Eliot Graff 2011-03-18 22:57:22 UTC
This is a great catch!

I've changed the paragraphs in Section 6.1 to the following:

]]
Whenever it uses a tr element, polyglot markup always wraps the tr element inside a tbody, thead, or tfoot element. In HTML, if a group of one or more adjacent tr elements are not explictly wrapped inside a tbody, thead, or tfoot element, the HTML parser creates and wraps a new tbody element around the tr elements. XML parsers do not crete the tbody element, thus offering the potential for creating different DOMs. 
[[

and 

]]
Whenever it uses col elements within a table element, polyglot markup explicitly uses a colgroup element surrounding groups of the col elements. In HTML, if a group of one or more adjacent col elements are not explicitly wrapped inside a colgroup element, the HTML parser creates and wraps a new colgroup element around the col elements. XML parsers do not create the colgroup element, thus offering the potential for creating different DOMs. 
[[

Thanks,

Eliot
Comment 2 Leif Halvard Silli 2011-03-18 23:22:54 UTC
Perfect! Except that you wrote "crete" instead of "create" in first paragraph. So, I guess I must open this bug again, because otherwise you would of course never fix it. ;-)
Comment 3 Eliot Graff 2011-03-18 23:27:22 UTC
Ah, you know my work habits! ;-)

Fixed. Thanks.

E
Comment 4 Leif Halvard Silli 2011-03-18 23:34:17 UTC
Super.
Comment 5 Michael[tm] Smith 2011-08-04 05:07:24 UTC
mass-move component to LC1
Comment 6 Michael[tm] Smith 2011-08-04 05:07:43 UTC
mass-move component to LC1