[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Polyglot XHTML5 Validator?

  • From: Jesper Tverskov <jesper.tverskov@gmail.com>
  • To: xml-dev@lists.xml.org
  • Date: Sat, 21 May 2011 10:03:44 +0200

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.