[whatwg] Empty elements
Jukka K. Korpela
jkorpela at cs.tut.fi
Mon Aug 29 03:02:49 PDT 2011
29.8.2011 12:24, Simon Pieters wrote:
> <p></p> is an empty element since it has no content, but p is not a void
> element.
All previous HTML and XML specs have used the term "empty element" tp
denote an element for which the syntax allows no content. So what's the
compelling reason for changing that?
> Maybe void isn't a great term, but empty isn't either.
In which way is "void" better than "empty"?
>> 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?
>
> In http://validator.nu/ you can choose "XML" or "HTML" under Parser.
Oh I see. Still, I'm still confused. Having selected "Preset" as
"HTML5", I can choose between different parsers, like HTML 4.01
Transitional and HTML 4.01 Strict. I would have expected a simple menu
with two options "HTML" and "XML", maybe with the latter divided into
with/without external entities.
>> Is there any requirement on such a distinction?
>
> About what?
About a validator - as HTML5 sets requirements on them, it would appear
to be natural to require that they allow a document to be validated
either as HTML-serialized or as XML-serialized.
>> When validating via URL, the W3C Validator (in HTML5 mode) indeed
>> accepts <p /> when Content-Type: application/xhtml+xml. However,
>> validator.nu responds:
>> IO Error: Non-HTML Content-Type: application/xhtml+xml.
>>
>> This is getting rather confusing...
>
> I guess you chose the "HTML5" parser in validator.nu,
Yes, that's what I must've done. I wonder how one is supposed to guess
that "HTML5" here means HTML serialization - isn't HTML5 defined to be
something that has two serializations? And I'm used to seeing "IO Error"
as relating to failures in data transfer, like broken Internet
connection or disk failure, not to higher-level protocols.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
More information about the whatwg
mailing list