error code when insering a video using video tag

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

error code when insering a video using video tag

HiddenId
Hi all,
I'm trying to insert a video in an HTML page.
I've tried a w3school code example :

<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>

See: http://www.w3schools.com/html/html_videos.asp

Unfortunatly, Amaya returns "an error code": invalid token
It seems it is the "s" of controls which generate the error.

Do you know what I should do to avoid this error ?

Antoine


Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Cristiano Guglielmetti-2
Probably you left the doctype default declaration of Amaya, which is XHTML.
When you create the new document you should declare it as HTML Transitional into New Document tab view. Indeed, if you have set it as HTML Transitional you will not have errors by Amaya:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  <title>New1</title>
  <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/">
</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>

Regards,
Cristiano


2013/1/4 HiddenId <[hidden email]>
Hi all,
I'm trying to insert a video in an HTML page.
I've tried a w3school code example :

<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>


Unfortunatly, Amaya returns "an error code": invalid token
It seems it is the "s" of controls which generate the error.

Do you know what I should do to avoid this error ?

Antoine



Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Leif Halvard Silli-4
Cristiano Guglielmetti, Fri, 4 Jan 2013 20:44:37 +0100:
> Probably you left the doctype default declaration of Amaya, which is XHTML.
> When you create the new document you should declare it as HTML
> Transitional into New Document tab view. Indeed, if you have set it
> as HTML Transitional you will not have errors by Amaya:

This seems to be incorrect — Amaya still reports that <video> is an
unknown/unsupported element even if the document is a a HTML4
transition kind of type.

Leif H Silli
Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Leif Halvard Silli-4
In reply to this post by HiddenId
HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):

> I'm trying to insert a video in an HTML page.
> I've tried a w3school code example :
>
> <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>

> Unfortunatly, Amaya returns "an error code": invalid token
> It seems it is the "s" of controls which generate the error.
>
> Do you know what I should do to avoid this error ?

Firstly, assuming that you work with an XHTML document, then, instead
of controls, you should write controls="" or controls="controls". Then
that particular error message will disappear. This is because XML
requires boolean attributes to be of the shape foo="foo" or foo="". By
contrast, HTML permits the author to type foo (the HTML browser will
still think of it as foo="", however).

Secondly, the empty <source/> elements must be equipped with a closing
"/", since that is the canonical form of empty elements in XHTML.

All in all, this would work:

<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>
--
leif halvard silli
Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

HiddenId
Hello All.
Thanks a lot for your returns.
I've still questions: is it better to stay in xhtml or move to html code type, regarding results described bellow ?
Antoine

Here is the code I'm testing, including changes you told me:

-------------------------------
23    <video width="320" height="240" controls="">
24        <source src="proj.mp4"  type="video/mp4" />
25        <source src="proj.ogg"  type="video/ogg" />
26        <source src="proj.webm" type="video/webm" />
27        <object data="proj.mp4" width="320" height="240">
28            <embed src="proj.swf" width="320" height="240">
29        </object>
30     </video>
31     <p><strong>Download Video:</strong>
32           Closed Format:<a href="proj.mp4">"mp4"</a>
33           Open Format:<a href="proj.ogg">"ogg"</a>
34    </p>
-----------------------------

Then here are results concerning error alerts send back by Amaya:

Test 1: keeping XHTML code type (transitional 1.0)
*****************************************
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Amaya returns following errors

*** Errors/warnings in test.html
  line 23, char 0: Invalid or unsupported XHTML element <video>
  line 24, char 0: Invalid or unsupported XHTML element <source>
  line 25, char 0: Invalid or unsupported XHTML element <source>
  line 26, char 0: Invalid or unsupported XHTML element <source>
  line 29, char 2: mismatched tag

Test 2: changing to HTML code type:
******************************
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">

Amaya does not return any error.
And Amaya modify the code, erasing the "layout" of the code (see bellow):

<video width=320 height=240 controls><source src=proj.mp4 type=video/mp4
  /><source src=proj.ogg type=video/ogg /><source src=proj.webm type=video/webm
  /><object data="proj.mp4" width="320" height="240">
    <embed src="proj.swf" width="320" height="240" /></object> </video>

  <p><strong>Download Video:</strong> Closed Format:<a
  href="proj.mp4">"mp4"</a> Open Format:<a href="proj.ogg">"ogg"</a> </p>

Conclusion:
**********
XHTML: still errors, and code is not changed by Amaya
HTML 4: no error, but code layout is modified

Then: what should I decide ?


De : Leif Halvard Silli <xn--mlform-iua@målform.no>
À : HiddenId <[hidden email]>
Cc : "[hidden email]" <[hidden email]>
Envoyé le : Samedi 5 janvier 2013 15h46
Objet : Re: error code when insering a video using video tag

HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):

> I'm trying to insert a video in an HTML page.
> I've tried a w3school code example :
>
> <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>

> Unfortunatly, Amaya returns "an error code": invalid token
> It seems it is the "s" of controls which generate the error.
>
> Do you know what I should do to avoid this error ?

Firstly, assuming that you work with an XHTML document, then, instead
of controls, you should write controls="" or controls="controls". Then
that particular error message will disappear. This is because XML
requires boolean attributes to be of the shape foo="foo" or foo="". By
contrast, HTML permits the author to type foo (the HTML browser will
still think of it as foo="", however).

Secondly, the empty <source/> elements must be equipped with a closing
"/", since that is the canonical form of empty elements in XHTML.

All in all, this would work:

<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>
--
leif halvard silli

Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Laurent Carcone-4
Hello,

Amaya doesn't support html5, it's why it raises an error on the element <video>.
Unfortunately, new developments on Amaya are stopped at W3C and Inria. I know there is a project outside W3C to work on the HTML5 support, I'll let you know if I have some update.
If you want to add a video in a html page using Amaya, you can use the elements embed or object.

Thanks,
Laurent

Le 05/01/13 17:15, HiddenId a écrit :
Hello All.
Thanks a lot for your returns.
I've still questions: is it better to stay in xhtml or move to html code type, regarding results described bellow ?
Antoine

Here is the code I'm testing, including changes you told me:

-------------------------------
23    <video width="320" height="240" controls="">
24        <source src="proj.mp4"  type="video/mp4" />
25        <source src="proj.ogg"  type="video/ogg" />
26        <source src="proj.webm" type="video/webm" />
27        <object data="proj.mp4" width="320" height="240">
28            <embed src="proj.swf" width="320" height="240">
29        </object>
30     </video>
31     <p><strong>Download Video:</strong>
32           Closed Format:<a href="proj.mp4">"mp4"</a>
33           Open Format:<a href="proj.ogg">"ogg"</a>
34    </p>
-----------------------------

Then here are results concerning error alerts send back by Amaya:

Test 1: keeping XHTML code type (transitional 1.0)
*****************************************
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Amaya returns following errors

*** Errors/warnings in test.html
  line 23, char 0: Invalid or unsupported XHTML element <video>
  line 24, char 0: Invalid or unsupported XHTML element <source>
  line 25, char 0: Invalid or unsupported XHTML element <source>
  line 26, char 0: Invalid or unsupported XHTML element <source>
  line 29, char 2: mismatched tag

Test 2: changing to HTML code type:
******************************
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">

Amaya does not return any error.
And Amaya modify the code, erasing the "layout" of the code (see bellow):

<video width=320 height=240 controls><source src=proj.mp4 type=video/mp4
  /><source src=proj.ogg type=video/ogg /><source src=proj.webm type=video/webm
  /><object data="proj.mp4" width="320" height="240">
    <embed src="proj.swf" width="320" height="240" /></object> </video>

  <p><strong>Download Video:</strong> Closed Format:<a
  href="proj.mp4">"mp4"</a> Open Format:<a href="proj.ogg">"ogg"</a> </p>

Conclusion:
**********
XHTML: still errors, and code is not changed by Amaya
HTML 4: no error, but code layout is modified

Then: what should I decide ?


De : Leif Halvard Silli [hidden email]
À : HiddenId [hidden email]
Cc : [hidden email] [hidden email]
Envoyé le : Samedi 5 janvier 2013 15h46
Objet : Re: error code when insering a video using video tag

HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):

> I'm trying to insert a video in an HTML page.
> I've tried a w3school code example :
>
> <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>

> Unfortunatly, Amaya returns "an error code": invalid token
> It seems it is the "s" of controls which generate the error.
>
> Do you know what I should do to avoid this error ?

Firstly, assuming that you work with an XHTML document, then, instead
of controls, you should write controls="" or controls="controls". Then
that particular error message will disappear. This is because XML
requires boolean attributes to be of the shape foo="foo" or foo="". By
contrast, HTML permits the author to type foo (the HTML browser will
still think of it as foo="", however).

Secondly, the empty <source/> elements must be equipped with a closing
"/", since that is the canonical form of empty elements in XHTML.

All in all, this would work:

<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>
--
leif halvard silli


Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

HiddenId
Hi Laurent.
Thanks a lot,
> If you want to add a video in a html page using Amaya, you can use the elements embed or object.
Ok, so, .... one more question: if we want to add a video in an XHTML page using Amaya, can we use the elements embed or object also without any error return ? I imagine so, no ?
Antoine


De : laurent carcone <[hidden email]>
À : HiddenId <[hidden email]>
Cc : "[hidden email]" <[hidden email]>
Envoyé le : Samedi 5 janvier 2013 17h57
Objet : Re: error code when insering a video using video tag

Hello,

Amaya doesn't support html5, it's why it raises an error on the element <video>.
Unfortunately, new developments on Amaya are stopped at W3C and Inria. I know there is a project outside W3C to work on the HTML5 support, I'll let you know if I have some update.
If you want to add a video in a html page using Amaya, you can use the elements embed or object.

Thanks,
Laurent

Le 05/01/13 17:15, HiddenId a écrit :
Hello All.
Thanks a lot for your returns.
I've still questions: is it better to stay in xhtml or move to html code type, regarding results described bellow ?
Antoine

Here is the code I'm testing, including changes you told me:

-------------------------------
23    <video width="320" height="240" controls="">
24        <source src="proj.mp4"  type="video/mp4" />
25        <source src="proj.ogg"  type="video/ogg" />
26        <source src="proj.webm" type="video/webm" />
27        <object data="proj.mp4" width="320" height="240">
28            <embed src="proj.swf" width="320" height="240">
29        </object>
30     </video>
31     <p><strong>Download Video:</strong>
32           Closed Format:<a href="proj.mp4">"mp4"</a>
33           Open Format:<a href="proj.ogg">"ogg"</a>
34    </p>
-----------------------------

Then here are results concerning error alerts send back by Amaya:

Test 1: keeping XHTML code type (transitional 1.0)
*****************************************
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Amaya returns following errors

*** Errors/warnings in test.html
  line 23, char 0: Invalid or unsupported XHTML element <video>
  line 24, char 0: Invalid or unsupported XHTML element <source>
  line 25, char 0: Invalid or unsupported XHTML element <source>
  line 26, char 0: Invalid or unsupported XHTML element <source>
  line 29, char 2: mismatched tag

Test 2: changing to HTML code type:
******************************
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">

Amaya does not return any error.
And Amaya modify the code, erasing the "layout" of the code (see bellow):

<video width=320 height=240 controls><source src=proj.mp4 type=video/mp4
  /><source src=proj.ogg type=video/ogg /><source src=proj.webm type=video/webm
  /><object data="proj.mp4" width="320" height="240">
    <embed src="proj.swf" width="320" height="240" /></object> </video>

  <p><strong>Download Video:</strong> Closed Format:<a
  href="proj.mp4">"mp4"</a> Open Format:<a href="proj.ogg">"ogg"</a> </p>

Conclusion:
**********
XHTML: still errors, and code is not changed by Amaya
HTML 4: no error, but code layout is modified

Then: what should I decide ?


De : Leif Halvard Silli [hidden email]
À : HiddenId [hidden email]
Cc : [hidden email] [hidden email]
Envoyé le : Samedi 5 janvier 2013 15h46
Objet : Re: error code when insering a video using video tag

HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):

> I'm trying to insert a video in an HTML page.
> I've tried a w3school code example :
>
> <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>

> Unfortunatly, Amaya returns "an error code": invalid token
> It seems it is the "s" of controls which generate the error.
>
> Do you know what I should do to avoid this error ?

Firstly, assuming that you work with an XHTML document, then, instead
of controls, you should write controls="" or controls="controls". Then
that particular error message will disappear. This is because XML
requires boolean attributes to be of the shape foo="foo" or foo="". By
contrast, HTML permits the author to type foo (the HTML browser will
still think of it as foo="", however).

Secondly, the empty <source/> elements must be equipped with a closing
"/", since that is the canonical form of empty elements in XHTML.

All in all, this would work:

<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>
--
leif halvard silli




Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Leif Halvard Silli-4
In reply to this post by Laurent Carcone-4
The most annoying thing with Amaya - and the the most important
prevention against using it for HTML5 work — is that it deletes
elements that it doesn’t know.

#noteToSelf.

Leif H Silli


laurent carcone, Sat, 05 Jan 2013 17:57:41 +0100:

> Hello,
>
> Amaya doesn't support html5, it's why it raises an error on the
> element <video>.
> Unfortunately, new developments on Amaya are stopped at W3C and
> Inria. I know there is a project outside W3C to work on the HTML5
> support, I'll let you know if I have some update.
> If you want to add a video in a html page using Amaya, you can use
> the elements embed or object.
>
> Thanks,
> Laurent
>
> Le 05/01/13 17:15, HiddenId a écrit :
>> Hello All.
>> Thanks a lot for your returns.
>> I've still questions: is it better to stay in xhtml or move to html
>> code type, regarding results described bellow ?
>> Antoine
>>
>> Here is the code I'm testing, including changes you told me:
>>
>> -------------------------------
>> 23    <video width="320" height="240" controls="">
>> 24        <source src="proj.mp4"  type="video/mp4" />
>> 25        <source src="proj.ogg"  type="video/ogg" />
>> 26        <source src="proj.webm" type="video/webm" />
>> 27        <object data="proj.mp4" width="320" height="240">
>> 28            <embed src="proj.swf" width="320" height="240">
>> 29        </object>
>> 30     </video>
>> 31     <p><strong>Download Video:</strong>
>> 32           Closed Format:<a href="proj.mp4">"mp4"</a>
>> 33           Open Format:<a href="proj.ogg">"ogg"</a>
>> 34    </p>
>> -----------------------------
>>
>> Then here are results concerning error alerts send back by Amaya:
>>
>> Test 1: keeping XHTML code type (transitional 1.0)
>> *****************************************
>>      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>
>> Amaya returns following errors
>>
>> *** Errors/warnings in test.html
>>   line 23, char 0: Invalid or unsupported XHTML element <video>
>>   line 24, char 0: Invalid or unsupported XHTML element <source>
>>   line 25, char 0: Invalid or unsupported XHTML element <source>
>>   line 26, char 0: Invalid or unsupported XHTML element <source>
>>   line 29, char 2: mismatched tag
>>
>> Test 2: changing to HTML code type:
>> ******************************
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>       "http://www.w3.org/TR/html4/loose.dtd">
>>
>> Amaya does not return any error.
>> And Amaya modify the code, erasing the "layout" of the code (see bellow):
>>
>> <video width=320 height=240 controls><source src=proj.mp4 type=video/mp4
>>   /><source src=proj.ogg type=video/ogg /><source src=proj.webm
>> type=video/webm
>>   /><object data="proj.mp4" width="320" height="240">
>>     <embed src="proj.swf" width="320" height="240" /></object> </video>
>>
>>   <p><strong>Download Video:</strong> Closed Format:<a
>>   href="proj.mp4">"mp4"</a> Open Format:<a href="proj.ogg">"ogg"</a> </p>
>>
>> Conclusion:
>> **********
>> XHTML: still errors, and code is not changed by Amaya
>> HTML 4: no error, but code layout is modified
>>
>> Then: what should I decide ?
>>
>>
>> De : Leif Halvard Silli <xn--mlform-iua@målform.no>
>> À : HiddenId <[hidden email]>
>> Cc : "[hidden email]" <[hidden email]>
>> Envoyé le : Samedi 5 janvier 2013 15h46
>> Objet : Re: error code when insering a video using video tag
>>
>> HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):
>>
>>> I'm trying to insert a video in an HTML page.
>>> I've tried a w3school code example :
>>>
>>> <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>
>>
>>> Unfortunatly, Amaya returns "an error code": invalid token
>>> It seems it is the "s" of controls which generate the error.
>>>
>>> Do you know what I should do to avoid this error ?
>>
>> Firstly, assuming that you work with an XHTML document, then, instead
>> of controls, you should write controls="" or controls="controls". Then
>> that particular error message will disappear. This is because XML
>> requires boolean attributes to be of the shape foo="foo" or foo="". By
>> contrast, HTML permits the author to type foo (the HTML browser will
>> still think of it as foo="", however).
>>
>> Secondly, the empty <source/> elements must be equipped with a closing
>> "/", since that is the canonical form of empty elements in XHTML.
>>
>> All in all, this would work:
>>
>> <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>
>> --
>> leif halvard silli
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

HiddenId
Thank you Leif (I don't know if Leif is your surname or name, sorry for that), for this additional information.
Antoine


De : Leif Halvard Silli <xn--mlform-iua@målform.no>
À : laurent carcone <[hidden email]>
Cc : HiddenId <[hidden email]>; "[hidden email]" <[hidden email]>
Envoyé le : Samedi 5 janvier 2013 19h35
Objet : Re: error code when insering a video using video tag

The most annoying thing with Amaya - and the the most important
prevention against using it for HTML5 work — is that it deletes
elements that it doesn’t know.

#noteToSelf.

Leif H Silli


laurent carcone, Sat, 05 Jan 2013 17:57:41 +0100:

> Hello,
>
> Amaya doesn't support html5, it's why it raises an error on the
> element <video>.
> Unfortunately, new developments on Amaya are stopped at W3C and
> Inria. I know there is a project outside W3C to work on the HTML5
> support, I'll let you know if I have some update.
> If you want to add a video in a html page using Amaya, you can use
> the elements embed or object.
>
> Thanks,
> Laurent
>
> Le 05/01/13 17:15, HiddenId a écrit :
>> Hello All.
>> Thanks a lot for your returns.
>> I've still questions: is it better to stay in xhtml or move to html
>> code type, regarding results described bellow ?
>> Antoine
>>
>> Here is the code I'm testing, including changes you told me:
>>
>> -------------------------------
>> 23    <video width="320" height="240" controls="">
>> 24        <source src="proj.mp4"  type="video/mp4" />
>> 25        <source src="proj.ogg"  type="video/ogg" />
>> 26        <source src="proj.webm" type="video/webm" />
>> 27        <object data="proj.mp4" width="320" height="240">
>> 28            <embed src="proj.swf" width="320" height="240">
>> 29        </object>
>> 30     </video>
>> 31     <p><strong>Download Video:</strong>
>> 32           Closed Format:<a href="proj.mp4">"mp4"</a>
>> 33           Open Format:<a href="proj.ogg">"ogg"</a>
>> 34    </p>
>> -----------------------------
>>
>> Then here are results concerning error alerts send back by Amaya:
>>
>> Test 1: keeping XHTML code type (transitional 1.0)
>> *****************************************
>>      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>
>> Amaya returns following errors
>>
>> *** Errors/warnings in test.html
>>   line 23, char 0: Invalid or unsupported XHTML element <video>
>>   line 24, char 0: Invalid or unsupported XHTML element <source>
>>   line 25, char 0: Invalid or unsupported XHTML element <source>
>>   line 26, char 0: Invalid or unsupported XHTML element <source>
>>   line 29, char 2: mismatched tag
>>
>> Test 2: changing to HTML code type:
>> ******************************
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>       "http://www.w3.org/TR/html4/loose.dtd">
>>
>> Amaya does not return any error.
>> And Amaya modify the code, erasing the "layout" of the code (see bellow):
>>
>> <video width=320 height=240 controls><source src=proj.mp4 type=video/mp4
>>   /><source src=proj.ogg type=video/ogg /><source src=proj.webm
>> type=video/webm
>>   /><object data="proj.mp4" width="320" height="240">
>>     <embed src="proj.swf" width="320" height="240" /></object> </video>
>>
>>   <p><strong>Download Video:</strong> Closed Format:<a
>>   href="proj.mp4">"mp4"</a> Open Format:<a href="proj.ogg">"ogg"</a> </p>
>>
>> Conclusion:
>> **********
>> XHTML: still errors, and code is not changed by Amaya
>> HTML 4: no error, but code layout is modified
>>
>> Then: what should I decide ?
>>
>>
>> De : Leif Halvard Silli <xn--mlform-iua@målform.no>
>> À : HiddenId <[hidden email]>
>> Cc : "[hidden email]" <[hidden email]>
>> Envoyé le : Samedi 5 janvier 2013 15h46
>> Objet : Re: error code when insering a video using video tag
>>
>> HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):
>>
>>> I'm trying to insert a video in an HTML page.
>>> I've tried a w3school code example :
>>>
>>> <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>
>>
>>> Unfortunatly, Amaya returns "an error code": invalid token
>>> It seems it is the "s" of controls which generate the error.
>>>
>>> Do you know what I should do to avoid this error ?
>>
>> Firstly, assuming that you work with an XHTML document, then, instead
>> of controls, you should write controls="" or controls="controls". Then
>> that particular error message will disappear. This is because XML
>> requires boolean attributes to be of the shape foo="foo" or foo="". By
>> contrast, HTML permits the author to type foo (the HTML browser will
>> still think of it as foo="", however).
>>
>> Secondly, the empty <source/> elements must be equipped with a closing
>> "/", since that is the canonical form of empty elements in XHTML.
>>
>> All in all, this would work:
>>
>> <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>
>> --
>> leif halvard silli
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Cristiano Guglielmetti-2
In reply to this post by Leif Halvard Silli-4
With Amaya 11.4.4 under Win7 with this code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  <title>Nuovo</title>
  <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/">
</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)


With this code

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>Nuovo1</title>
  <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/" />
</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

*** Errors/warnings in C:\Users\Cristiano\Documents\Nuovo1.html
  line 13, char 40: not well-formed (invalid token)




2013/1/5 Leif Halvard Silli <[hidden email]>
Cristiano Guglielmetti, Fri, 4 Jan 2013 20:44:37 +0100:
> Probably you left the doctype default declaration of Amaya, which is XHTML.
> When you create the new document you should declare it as HTML
> Transitional into New Document tab view. Indeed, if you have set it
> as HTML Transitional you will not have errors by Amaya:

This seems to be incorrect — Amaya still reports that <video> is an
unknown/unsupported element even if the document is a a HTML4
transition kind of type.

Leif H Silli

Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Leif Halvard Silli-4
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"
>       "http://www.w3.org/TR/html4/loose.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
>   <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
>   <title>Nuovo</title>
>   <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/">
> </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.
--
leif halvard silli
Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Laurent Carcone
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"
>>        "http://www.w3.org/TR/html4/loose.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml">
>> <head>
>>    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
>>    <title>Nuovo</title>
>>    <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/">
>> </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.


Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Leif Halvard Silli-4
I’m not sure it adds them in the DOM tree: My impression is that they
are not possible to style, in Amaya.

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.

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

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"
>>>        "http://www.w3.org/TR/html4/loose.dtd">
>>> <html xmlns="http://www.w3.org/1999/xhtml">
>>> <head>
>>>    <meta http-equiv="content-type" content="text/html;
>>> charset=iso-8859-1">
>>>    <title>Nuovo</title>
>>>    <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/">
>>> </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.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Laurent Carcone
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.

Thanks,
Laurent

>
> 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"
>>>>         "http://www.w3.org/TR/html4/loose.dtd">
>>>> <html xmlns="http://www.w3.org/1999/xhtml">
>>>> <head>
>>>>     <meta http-equiv="content-type" content="text/html;
>>>> charset=iso-8859-1">
>>>>     <title>Nuovo</title>
>>>>     <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/">
>>>> </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.


Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Leif Halvard Silli-4
Laurent Carcone, Sun, 06 Jan 2013 22:46:58 +0100:
> 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.

OK.

>> 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.

*Removing* things is nevertheless destructive - it seems like a bad
decision to make it do that without *always* warning first.

>> 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.

What I meant was that Amaya doesn't restore the doctype despite that
the doctype is unknown to it. By contrast, for the XHTML mode, then
Amaya will - when you leave the source editor, restore the DOCTYPE if
it feels for it.

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/)

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.

Leif H Silli

> Thanks,
> Laurent
>>
>> 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"
>>>>>         "http://www.w3.org/TR/html4/loose.dtd">
>>>>> <html xmlns="http://www.w3.org/1999/xhtml">
>>>>> <head>
>>>>>     <meta http-equiv="content-type" content="text/html;
>>>>> charset=iso-8859-1">
>>>>>     <title>Nuovo</title>
>>>>>     <meta name="generator" content="Amaya, see
>>>>> http://www.w3.org/Amaya/">
>>>>> </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.
>
Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

HiddenId
In reply to this post by Laurent Carcone-4
Hi Laurent,

> If you want to add a video in a html page using Amaya, you can use the elements embed or object.

I see easily where I can get the "OBJECT" tag in Amaya ( top menu -> insert -> insert object ), but I do not manage to find the way to get "EMBED" tag from any menu in Amaya. It seems it is not possible. Am I correct ?

Antoine



De : laurent carcone <[hidden email]>
À : HiddenId <[hidden email]>
Cc : "[hidden email]" <[hidden email]>
Envoyé le : Samedi 5 janvier 2013 17h57
Objet : Re: error code when insering a video using video tag

Hello,

Amaya doesn't support html5, it's why it raises an error on the element <video>.
Unfortunately, new developments on Amaya are stopped at W3C and Inria. I know there is a project outside W3C to work on the HTML5 support, I'll let you know if I have some update.
If you want to add a video in a html page using Amaya, you can use the elements embed or object.

Thanks,
Laurent

Le 05/01/13 17:15, HiddenId a écrit :
Hello All.
Thanks a lot for your returns.
I've still questions: is it better to stay in xhtml or move to html code type, regarding results described bellow ?
Antoine

Here is the code I'm testing, including changes you told me:

-------------------------------
23    <video width="320" height="240" controls="">
24        <source src="proj.mp4"  type="video/mp4" />
25        <source src="proj.ogg"  type="video/ogg" />
26        <source src="proj.webm" type="video/webm" />
27        <object data="proj.mp4" width="320" height="240">
28            <embed src="proj.swf" width="320" height="240">
29        </object>
30     </video>
31     <p><strong>Download Video:</strong>
32           Closed Format:<a href="proj.mp4">"mp4"</a>
33           Open Format:<a href="proj.ogg">"ogg"</a>
34    </p>
-----------------------------

Then here are results concerning error alerts send back by Amaya:

Test 1: keeping XHTML code type (transitional 1.0)
*****************************************
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Amaya returns following errors

*** Errors/warnings in test.html
  line 23, char 0: Invalid or unsupported XHTML element <video>
  line 24, char 0: Invalid or unsupported XHTML element <source>
  line 25, char 0: Invalid or unsupported XHTML element <source>
  line 26, char 0: Invalid or unsupported XHTML element <source>
  line 29, char 2: mismatched tag

Test 2: changing to HTML code type:
******************************
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">

Amaya does not return any error.
And Amaya modify the code, erasing the "layout" of the code (see bellow):

<video width=320 height=240 controls><source src=proj.mp4 type=video/mp4
  /><source src=proj.ogg type=video/ogg /><source src=proj.webm type=video/webm
  /><object data="proj.mp4" width="320" height="240">
    <embed src="proj.swf" width="320" height="240" /></object> </video>

  <p><strong>Download Video:</strong> Closed Format:<a
  href="proj.mp4">"mp4"</a> Open Format:<a href="proj.ogg">"ogg"</a> </p>

Conclusion:
**********
XHTML: still errors, and code is not changed by Amaya
HTML 4: no error, but code layout is modified

Then: what should I decide ?


De : Leif Halvard Silli [hidden email]
À : HiddenId [hidden email]
Cc : [hidden email] [hidden email]
Envoyé le : Samedi 5 janvier 2013 15h46
Objet : Re: error code when insering a video using video tag

HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):

> I'm trying to insert a video in an HTML page.
> I've tried a w3school code example :
>
> <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>

> Unfortunatly, Amaya returns "an error code": invalid token
> It seems it is the "s" of controls which generate the error.
>
> Do you know what I should do to avoid this error ?

Firstly, assuming that you work with an XHTML document, then, instead
of controls, you should write controls="" or controls="controls". Then
that particular error message will disappear. This is because XML
requires boolean attributes to be of the shape foo="foo" or foo="". By
contrast, HTML permits the author to type foo (the HTML browser will
still think of it as foo="", however).

Secondly, the empty <source/> elements must be equipped with a closing
"/", since that is the canonical form of empty elements in XHTML.

All in all, this would work:

<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>
--
leif halvard silli




Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Martin J. Dürst
In reply to this post by Leif Halvard Silli-4
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.

> 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> ?

Regards,   Martin.

Reply | Threaded
Open this post in threaded view
|

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

Leif Halvard Silli-4
"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
Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Laurent Carcone-2
In reply to this post by Leif Halvard Silli-4
Le 06/01/2013 23:47, Leif Halvard Silli a écrit :

> Laurent Carcone, Sun, 06 Jan 2013 22:46:58 +0100:
>> 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.
> OK.
>
>>> 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.
> *Removing* things is nevertheless destructive - it seems like a bad
> decision to make it do that without *always* warning first.
>

Users are always warned when the input document is not well-formed or
when some element/attributes are invalid or not supported.
As I said, the reason was to not let Amaya generate invalid documents.

Thanks,
Laurent

Reply | Threaded
Open this post in threaded view
|

Re: error code when insering a video using video tag

Laurent Carcone-2
In reply to this post by HiddenId
Hi Antoine,

The <embed> element was deprecated in HTML4 (and in XHTML) in favor of <object>, it's why it is not allowed in the menu (it is deprecated not invalid so Amaya doesn't report an error when it is found in an input document).

Thanks,
Laurent


Le 07/01/2013 14:50, HiddenId a écrit :
Hi Laurent,

> If you want to add a video in a html page using Amaya, you can use the elements embed or object.

I see easily where I can get the "OBJECT" tag in Amaya ( top menu -> insert -> insert object ), but I do not manage to find the way to get "EMBED" tag from any menu in Amaya. It seems it is not possible. Am I correct ?

Antoine



De : laurent carcone [hidden email]
À : HiddenId [hidden email]
Cc : [hidden email] [hidden email]
Envoyé le : Samedi 5 janvier 2013 17h57
Objet : Re: error code when insering a video using video tag

Hello,

Amaya doesn't support html5, it's why it raises an error on the element <video>.
Unfortunately, new developments on Amaya are stopped at W3C and Inria. I know there is a project outside W3C to work on the HTML5 support, I'll let you know if I have some update.
If you want to add a video in a html page using Amaya, you can use the elements embed or object.

Thanks,
Laurent

Le 05/01/13 17:15, HiddenId a écrit :
Hello All.
Thanks a lot for your returns.
I've still questions: is it better to stay in xhtml or move to html code type, regarding results described bellow ?
Antoine

Here is the code I'm testing, including changes you told me:

-------------------------------
23    <video width="320" height="240" controls="">
24        <source src="proj.mp4"  type="video/mp4" />
25        <source src="proj.ogg"  type="video/ogg" />
26        <source src="proj.webm" type="video/webm" />
27        <object data="proj.mp4" width="320" height="240">
28            <embed src="proj.swf" width="320" height="240">
29        </object>
30     </video>
31     <p><strong>Download Video:</strong>
32           Closed Format:<a href="proj.mp4">"mp4"</a>
33           Open Format:<a href="proj.ogg">"ogg"</a>
34    </p>
-----------------------------

Then here are results concerning error alerts send back by Amaya:

Test 1: keeping XHTML code type (transitional 1.0)
*****************************************
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Amaya returns following errors

*** Errors/warnings in test.html
  line 23, char 0: Invalid or unsupported XHTML element <video>
  line 24, char 0: Invalid or unsupported XHTML element <source>
  line 25, char 0: Invalid or unsupported XHTML element <source>
  line 26, char 0: Invalid or unsupported XHTML element <source>
  line 29, char 2: mismatched tag

Test 2: changing to HTML code type:
******************************
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">

Amaya does not return any error.
And Amaya modify the code, erasing the "layout" of the code (see bellow):

<video width=320 height=240 controls><source src=proj.mp4 type=video/mp4
  /><source src=proj.ogg type=video/ogg /><source src=proj.webm type=video/webm
  /><object data="proj.mp4" width="320" height="240">
    <embed src="proj.swf" width="320" height="240" /></object> </video>

  <p><strong>Download Video:</strong> Closed Format:<a
  href="proj.mp4">"mp4"</a> Open Format:<a href="proj.ogg">"ogg"</a> </p>

Conclusion:
**********
XHTML: still errors, and code is not changed by Amaya
HTML 4: no error, but code layout is modified

Then: what should I decide ?


De : Leif Halvard Silli [hidden email]
À : HiddenId [hidden email]
Cc : [hidden email] [hidden email]
Envoyé le : Samedi 5 janvier 2013 15h46
Objet : Re: error code when insering a video using video tag

HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):

> I'm trying to insert a video in an HTML page.
> I've tried a w3school code example :
>
> <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>

> Unfortunatly, Amaya returns "an error code": invalid token
> It seems it is the "s" of controls which generate the error.
>
> Do you know what I should do to avoid this error ?

Firstly, assuming that you work with an XHTML document, then, instead
of controls, you should write controls="" or controls="controls". Then
that particular error message will disappear. This is because XML
requires boolean attributes to be of the shape foo="foo" or foo="". By
contrast, HTML permits the author to type foo (the HTML browser will
still think of it as foo="", however).

Secondly, the empty <source/> elements must be equipped with a closing
"/", since that is the canonical form of empty elements in XHTML.

All in all, this would work:

<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>
--
leif halvard silli





12