polyglot

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

polyglot

Post by roedygr » Sat Oct 20, 2012 7:02 am

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
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: polyglot

Post by Albert Wiersch » Mon Oct 22, 2012 8:55 am

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/
Image
Albert Wiersch

Post Reply