XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Polyglot XHTML5 Validator?

I like the idea of polyglot XHTML, that is XHTML which is both valid
XHTML and valid HTML depending only on the mimetype,
http://www.w3.org/TR/html-polyglot/.

But it must be possible to validate this wonderful polyglot XHTML.

At the moment both the W3C Markup Validator and Validator.nu validate
if a document is either valid HTML5 or valid XHTML5.

Even if we validate our polyglot document twice, first with one
mimetype, then with the other, we cannot be sure that we have a
polyglot document.

In polyglot XHTML there are a few things we must do to make sure that
the DOM representation is exactly the same in HTML and XML. A few of
these things are not validated just by adding two different
validations together.

E.g.: In polyglot markup a tbody, thead or tfoot element must be used
when we make tables. The reason is that the HTML parser adds the
element automatically if it is missing but not the XML parser. If we
forget to use it explicitly the document is still a valid HTML5 and
valid XHTML5 but we don't have polyglot markup but end up with
different DOM representations.

The best solution would be something like the following:

When a document is validated as HTML5 or XHTM5 the document should at
the same be validated as a polyglot document. If we validate with
mime-type "text/html" the Validator should report: "We congratulate
you twice: Your document is not only valid HTML5 - It is also valid
polyglot XHTML5". And likewise when we serve the document with
"application/xhtml+xml: "Congratulation: Your document is not only
valid XHTML5, it is also valid polyglot XHTML5".

As I see it, the above is a prerequisite for widespread use of polyglot markup.


Cheers
Jesper Tverskov
http://www.xmlplease.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS