Re: error code when insering a video using video tag

Le 06/01/13 21:01, Leif Halvard Silli a écrit :
> I’m not sure it adds them in the DOM tree: My impression is that they
> are not possible to style, in Amaya.

The saved file is generated from the internal tree (what I called dom 
tree), an element must have been added in it to be saved.

> Also, "less strict" doesn’t seem like the correct word — I’m not sure
> it can be justified that it delete anything when using the XHTML parser
> - that seems like a bug too.

I agree, maybe not the correct word. What I meant is that the xml parser 
we use in Amaya for xhtml documents checks that the document is 
well-formed and valid according to the xhtml dtd of the document. As 
Amaya is mainly an editor and we didn't want to generate invalid 
documents, invalid elements/attributes are deleted.

> Btw, for the HTML4 mode, it is even possible to change the DOCTYPE
> (manually, in the source view) to the HTML5 doctype - <!DOCTYPE html>.

Yes, the source view acts as a text editor.

> LH
> Laurent Carcone, Sun, 06 Jan 2013 14:03:43 +0100:
>> Indeed, the HTML4 parser used in Amaya is less strict than the XML
>> parser, it reports an error for the unknown elements (the red bottom
>> right corner button), but let these elements be added in the DOM tree
>> so that they can be generated at save (the missing quote marks is a
>> bug).
>> Thanks,
>> Laurent
>> Le 06/01/13 12:46, Leif Halvard Silli a écrit :
>>> Cristiano Guglielmetti, Sun, 6 Jan 2013 11:16:12 +0100:
>>>> With Amaya 11.4.4 under Win7 with this code:
>>>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>>>         "">
>>>> <html xmlns="">
>>>> <head>
>>>>     <meta http-equiv="content-type" content="text/html;
>>>> charset=iso-8859-1">
>>>>     <title>Nuovo</title>
>>>>     <meta name="generator" content="Amaya, see">
>>>> </head>
>>>> <body>
>>>> <video width="320" height="240" controls>
>>>>     <source src="movie.mp4" type="video/mp4">
>>>>     <source src="movie.ogg" type="video/ogg">
>>>>     <source src="movie.webm" type="video/webm">
>>>>     <object data="movie.mp4" width="320" height="240">
>>>>       <embed src="movie.swf" width="320" height="240">
>>>>     </object>
>>>> </video>
>>>> </body>
>>>> </html>
>>>> I get no errors by Amaya (also saving and reloading)
>>> Hm. You are right. However, a few things *do* happen:
>>> 1) Though you don't get errors, you do get warnings (the button in the
>>> bottom right corner becomes red)
>>> 2) For the new elements, then Amaya removes the quote marks once you
>>> save the document. (The quote marks stay intact as long as the source
>>> code view is open - and active, but if you move the cursor to the
>>> WYSIWYG window, then they are removed.)
>>> Btw, you can also use the HTML4 *strict* doctype — that will work as
>>> well, and is thus recommended since the strict doctype triggers
>>> no-quirks (or "standards") mode.

Received on Sunday, 6 January 2013 21:47:28 UTC