polyglot

For topics about current BETA or future releases, including feature requests.
Post Reply
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

polyglot

Post by roedygr »

I saw a note saying the beta contained new features for polyglots.

I expected this to mean either:

<span lang="de"> would engage a German dictionary. It does not.

Napol&eacute;on would look up Napoléon in the spell check dictionary. It does not.

What is the new feature?
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: polyglot

Post by Albert Wiersch »

roedygr wrote:<span lang="de"> would engage a German dictionary. It does not.
I'd like to implement this, but currently CSE HTML Validator does not support changing dictionaries
roedygr wrote:What is the new feature?
This is some basic information from the documentation:
The common way to serve HTML is with the MIME type 'text/html', but XHTML5 must be served with the MIME type 'application/xhtml+xml'. This creates problems for older browsers like IE8, so developers may not want to serve documents with 'application/xhtml+xml' to the general public. Fortunately IE9 added support for 'application/xhtml+xml', but that still leaves a lot of older browsers, like IE8 and below, that don't support 'application/xhtml+xml'.

'Polyglot' documents can be served with either 'text/html' or 'application/xhtml+xml', without any changes to the document itself (only the MIME type differs). This is because polyglot XHTML5 documents follow the rules for both HTML5 and XHTML5 documents and thus can be parsed by both HTML and XML parsers. Polyglot documents also result in the same DOM, whether parsed by an HTML parser or by an XML parser. This ensures that CSS and JavaScript work the same, regardless of the parser.
Here is a good article:
Benefits of polyglot XHTML5

And a specification:
http://dev.w3.org/html5/html-xhtml-author-guide/
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply