Re: HTML5 recommendation section 10.3.3 Flow content

On Tue, 21 Jun 2016 16:16:52 +0200, Dr. Olaf Hoffmann  
<Dr.O.Hoffmann@gmx.de> wrote:

> I use only the XML variant of HTML5 - and this only in EPUB 3 (this  
> defines,
> that XHTML documents in EPUB-3-archives are the XML variant of HTML5).
> For other applications I use XHTML versions with an indication of the  
> version
> to get some defined meaning of the documents.
> Therefore I do not care much about HTML5 tag soup parsers.

Very well.

> However, wasn't it mentioned, that those tag soup parsers do not care  
> about
> namespaces at all and that the tag soup variant of HTML5 has no namespace
> functionality?

You can't specify a namespace, but the parser will create elements in some  
namespace.

> This seems to imply that those CSS rules/suggestions apply only to the  
> XML
> variant of HTML5 anyway.

No, it doesn't.

> But if HTML5 does not define such elements, I think, they cannot belong  
> to the
> XHTML namespace, because no other XHTML variant seems to define them  
> either.

An element does not need to be defined by a specification in order to  
exist in a document. Just take this document:

<foo xmlns="bar"/>

This will create a "foo" element in the "bar" namespace if parsed with a  
namespace-aware XML parser, but there is no spec that defines such an  
element.

Similarly, you can change the "bar" above to the XHTML namespace, and you  
will get a "foo" element in the XHTML namespace, despite there still being  
no spec that defines such an element.

And finally, if you parse that document with an HTML parser, you will also  
get a "foo" element in the XHTML namespace (as a child of a "body"...).

> But this might be just another problem of a language variant without  
> version
> indication and without a scheme like a DTD to indicate al least, which
> elements and attributes can appear.

You can get into the exact same situation if you pretend that only the  
XHTML 1.0 spec is relevant. This has nothing to do with spec versioning or  
schemas.

-- 
Simon Pieters
Opera Software

Received on Tuesday, 21 June 2016 14:55:49 UTC