W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2015

[Bug 8697] Validation of schema extensions in HTML documents

From: <bugzilla@jessica.w3.org>
Date: Wed, 26 Aug 2015 08:44:01 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-8697-169-PuyeN1rxr6@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=8697

--- Comment #3 from Michael[tm] Smith <mike@w3.org> ---
(In reply to Dr. Martin W. Baker from comment #2)
> The X of XHTML surely means extensible.
> 
> The standard means of making xml formatted documents extensible is to add a
> namespace.
> 
> W3C introduced a namespace for xhtml  namely http://www.w3.org/1999/xhtml
> and this was included once upon a time in the <html> tag.
> 
> If we were checking solely as HTML your comment would be valid.  It seems
> inappropriate if checking against XHTML.

Per the HTML spec, arbitrary elements from arbitrary namespaces are not valid
in an HTML document regardless if you conceptually think of that document as an
"XHTML" document.

You're free to create documents that extend the HTML language with an kind f
arbitrary elements and attributes you want, but if you do, one consequence is
that per the HTML spec, they will no longer be HTML documents that conform to
the HTML spec, and the checker will point that out.

You can use the "Message Filtering" feature in the checker to persistently
filter out any checker messages you don't want to see.

But as I alluded to in my earlier comment, if you're serving your documents
with a text/html media type (rather than an XML media type) then you are asking
for them to actually be parsed as text/html and not with an XML parser.

And in that case your elements do not actually end up in the DOM in other
namespaces. Instead they end up in the DOM as elements with only a local name
that has prefix and colon in it.

So if you want to actually put the elements into a namespace, the documents
should be served with an XML media type, not a text/html media type.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 26 August 2015 08:44:08 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 26 August 2015 08:44:09 UTC