Is polyglot markup suitable for WYSIWYG tools? (Was: error code when insering a video using video tag)

"Martin J. Dürst", Tue, 08 Jan 2013 14:23:50 +0900:
> On 2013/01/07 7:47, Leif Halvard Silli wrote:
> 
>> PS: Do you know if the group that looks at making Amaya
>> HTML5-compatible is going to implement both a text/html mode and a
>> xhtml mode? Or if they perhaps are aiming for a polyglot mode?
>> (http://www.w3.org/TR/html-polyglot/)
> 
> Polyglot may make quite a bit of sense on output (although, as the 
> polyglot document describes, there are cases where a choice has to be 
> made). But it doesn't make much sense on input.

* Where does Polyglot Markup say so? (I don't think it says exactly 
what you say, so I'm curious what you interpret that way.)

* When is output and when is input? Especially since Amaya is a WYSIWYG 
tool. E.g. is the saving operation the output operation? Is the 
transformation from WYSIWYG interface to code that is the output? In a 
WYSIWYG tool - like Amaya, the author doesn't input code - it is the 
editor that outputs what the user entered via WYSIWYG the interface. So 
from that angle, polyglot mark seems excellent for WYSIWYG tools. Or do 
you suggest that polyglot markup should be an extra step, when the 
document is otherwise ready?

• In my view, it is simplest to author polyglot markup using a XML 
editor which adds the extra stuff that polyglot documents need: 
xml:lang="*", <meta charset="utf-8"/> and some more. Why is that? Well, 
otherwise, one would have to make the text/html editor output "/>" for 
void elements, and while possible to do, such a thing could seem weird. 
But Amaya is primarily an XHTML editor, not? And it has always, when 
producing XHTML documents, aimed at producing "Appendix C"-compatible - 
thus "polyglot", in a sense, documents. So from that angle it seems 
perfect to continue that tradition by having it produce polyglot 
XHTML5/HTML5 documents. Provided that Amaya is going to produce XHTML5 
documents, then why not polyglot markup? What are are the issues that 
doesn't make sense? 

>> PPS: Currently, the<?xml version="1.0" encoding="UTF-8"?>  declaration
>> is used as an XHTML mode trigger, it seems. This is bad, as it prevents
>> us from making polyglot HTML (as the XML declaration is invalid in
>> text/html). Plus that there is no need to declare the encoding for XML
>> as long as one uses UTF-8.
>> 
>> If the team decides to implement HTML5 as a polyglot mode, then
>> something that separates HTML and XHTML mode isn't really needed. But
>> if it *does* need a trigger at the beginning of the document for this,
>> then I suggest that they utilize the HTML5 doctype, like so:
>> 
>> a)<!doctype html>  is only text/html compatible and could thus
>>     trigger that mode. (It causes fatal XML error.)
>> b)<!DOCTYPE html>  is both text/html and XHTML-compatible, and
>>     could thus trigger XHTML mode.
> 
> But what about text/html documents that start with <!DOCTYPE html> ?

Right. On could add an additional requirement, namely that the XHTML 
namespace declaration is present on the <html> element. One could even 
require that the document is fully well formed.
-- 
leif halvard silli

Received on Tuesday, 8 January 2013 08:37:00 UTC