Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a polyglot document?

In this answer to this question, Lachlan-Hunt writes the following:

With HTML5, you can choose to use HTML-only syntax, meaning that it is only compatible with being served and processed as text/html it is not well-formed XML. Or use XHTML-only syntax, meaning that is is well-formed XML, but uses XML features that are not compatible with HTML. Or, you can write a Polyglot document, which is conforming and compatible with both HTML and XHTML processing (In principle, this is conceptually similar to writing XHTML 1.0 that conforms with Appendix C guidelines).

What is a Polyglot document?

like image 383
Svish Avatar asked Jul 03 '09 13:07

Svish


People also ask

How do you use a polyglot?

Open up Polyglot. app and change the target language to one you prefer and configure keyboard shortcuts as you wish. Select word or sentence and just type the configured key combination. or, Select word or sentence and right-click then click Translate.

What is a polyglot wikipedia?

A polyglot is someone who speaks multiple languages. Polyglot may also refer to: Polyglot (book), a book that contains the same text in more than one language.


1 Answers

A polyglot program is a program that is valid in more than one language. See http://en.wikipedia.org/wiki/Polyglot_(computing).

A polyglot (person) is someone who is fluent in many languages.

So the polyglot document in this case is both valid HTML and XHTML.

Apparently the word derives from the Ancient Greek πολύγλωττος (poluglōttos, “'many-tongued, polyglot'”), from πολύς (polus, “many”) + γλῶττα (glōtta, “'tongue, language'”)

like image 169
Patrick McDonald Avatar answered Oct 04 '22 20:10

Patrick McDonald