[whatwg] Empty elements
Jukka K. Korpela
jkorpela at cs.tut.fi
Sun Aug 28 10:45:50 PDT 2011
28.8.2011 17:52, Aryeh Gregor wrote:
> "Void" is correct:
I see. What a pointless and confusing change (from HTML tradition and
SGML usage). "Empty" is descriptive (an element that has no content, or
has empty content), whereas "void" suggests associations like "null and
void" or "void pointer". This is about elements that are very real and
meaningful, instead of being "void" in any normal meaning - they just
express everything they can express by their name and attributes
>> The interesting question is: Where do the normative rules say that
>> self-closing syntax must not be used for other than empty elements?
OK, that's rather clear, I just didn't find it - I was looking for
something more prominent.
> Documents served with a text/html MIME type must obey the HTML syntax
> rules, not XHTML. I couldn't find where the spec says this
> normatively, but there's an informative note at the top of the HTML
> syntax and XHTML syntax sections.
So does this mean that the rules are, after all, different for HTML
serialization than for XHTML serialization?
> If you're serving a document with an XML MIME type,<foo></foo> is
> equivalent to <foo /> for any value of foo. The validator won't
> distinguish and neither will UAs, so use whichever you please.
> They're entirely different with an HTML MIME type, and that cannot be
> changed at this point due to compatibility.
Is there any way to tell validator.nu or the W3C Validator in HTML5 mode
to apply XHTML rules when submitting a document via a text field or via
file upload? Is there any requirement on such a distinction?
When validating via URL, the W3C Validator (in HTML5 mode) indeed
accepts <p /> when Content-Type: application/xhtml+xml. However,
IO Error: Non-HTML Content-Type: application/xhtml+xml.
This is getting rather confusing...
More information about the whatwg