[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|