Re: error code when insering a video using video tag
HiddenId <[email protected]> Sat, 5 Jan 2013 16:15:40 +0000 (GMT)
| Newsgroups | gmane.comp.web.amaya.general |
|---|---|
| Message-ID | <[email protected]> |
--1353131092-304131845-1357402540=:79835 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello All.=0AThanks a lot for your returns. =0A=0AI've still questions: is = it better to stay in xhtml or move to html code type, regarding results des= cribed bellow ?=0AAntoine=0A=0AHere is the code I'm testing, including chan= ges you told me:=0A=0A-------------------------------=0A=0A23 =A0=A0 <video= width=3D"320" height=3D"240" controls=3D"">=0A24 =A0=A0=A0=A0=A0=A0 <sourc= e src=3D"proj.mp4"=A0 type=3D"video/mp4" />=0A25 =A0=A0=A0=A0=A0=A0 <source= src=3D"proj.ogg"=A0 type=3D"video/ogg" />=0A26 =A0=A0=A0=A0=A0=A0 <source = src=3D"proj.webm" type=3D"video/webm" />=0A27 =A0=A0=A0=A0=A0=A0 <object da= ta=3D"proj.mp4" width=3D"320" height=3D"240">=0A28 =A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 <embed src=3D"proj.swf" width=3D"320" height=3D"240">=0A29 =A0=A0=A0= =A0=A0=A0 </object>=0A30 =A0=A0=A0 </video>=0A31 =A0=A0=A0 <p><strong>Downl= oad Video:</strong>=0A32 =A0=A0=A0=A0=A0=A0=A0=A0=A0 Closed Format:<a href= =3D"proj.mp4">"mp4"</a>=0A33 =A0=A0=A0=A0=A0=A0=A0=A0=A0 Open Format:<a hre= f=3D"proj.ogg">"ogg"</a>=0A34 =A0=A0 </p>=0A=0A----------------------------= -=0A=0AThen here are results concerning error alerts send back by Amaya:=0A= =0A=0ATest 1: keeping XHTML code type (transitional 1.0)=0A****************= *************************=0A=0A=A0=A0=A0=A0 <!DOCTYPE html PUBLIC "-//W3C//= DTD XHTML 1.0 Transitional//EN"=0A=A0=A0=A0=A0 =A0 =A0 =A0 "http://www.w3.o= rg/TR/xhtml1/DTD/xhtml1-transitional.dtd">=0A=0AAmaya returns following err= ors=0A=0A=0A*** Errors/warnings in test.html=0A=A0 line 23, char 0: Invalid= or unsupported XHTML element <video>=0A=A0 line 24, char 0: Invalid or uns= upported XHTML element <source>=0A=A0 line 25, char 0: Invalid or unsupport= ed XHTML element <source>=0A=A0 line 26, char 0: Invalid or unsupported XHT= ML element <source>=0A=A0 line 29, char 2: mismatched tag=0A=0A=0ATest 2: c= hanging to HTML code type:=0A******************************=0A=0A<!DOCTYPE = html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"=0A=A0=A0=A0=A0=A0 "htt= p://www.w3.org/TR/html4/loose.dtd">=0A=0AAmaya does not return any error.= =0AAnd Amaya modify the code, erasing the "layout" of the code (see bellow)= :=0A=0A<video width=3D320 height=3D240 controls><source src=3Dproj.mp4 type= =3Dvideo/mp4=0A=A0 /><source src=3Dproj.ogg type=3Dvideo/ogg /><source src= =3Dproj.webm type=3Dvideo/webm=0A=A0 /><object data=3D"proj.mp4" width=3D"3= 20" height=3D"240">=0A=A0=A0=A0 <embed src=3D"proj.swf" width=3D"320" heigh= t=3D"240" /></object> </video>=0A=0A=A0 <p><strong>Download Video:</strong>= Closed Format:<a=0A=A0 href=3D"proj.mp4">"mp4"</a> Open Format:<a href=3D"= proj.ogg">"ogg"</a> </p>=0A=0A=0AConclusion:=0A**********=0AXHTML: still er= rors, and code is not changed by Amaya=0AHTML 4: no error, but code layout = is modified=0A=0A=0AThen: what should I decide ?=0A=0A=0A=0A_______________= _________________=0A De=A0: Leif Halvard Silli <xn--mlform-iua@m=E5lform.no= >=0A=C0=A0: HiddenId <[email protected]> =0ACc=A0: "www-amaya@w3.= org" <[email protected]> =0AEnvoy=E9 le : Samedi 5 janvier 2013 15h46=0AObje= t=A0: Re: error code when insering a video using video tag=0A =0AHiddenId, = Fri, 4 Jan 2013 17:43:32 +0000 (GMT):=0A=0A> I'm trying to insert a video i= n an HTML page.=0A> I've tried a w3school code example :=0A> =0A> <video wi= dth=3D"320" height=3D"240" controls>=0A> =A0 <source src=3D"movie.mp4" type= =3D"video/mp4">=0A> =A0 <source src=3D"movie.ogg" type=3D"video/ogg">=0A> = =A0 <source src=3D"movie.webm" type=3D"video/webm">=0A> =A0 <object data=3D= "movie.mp4" width=3D"320" height=3D"240">=0A> =A0=A0=A0 <embed src=3D"movie= .swf" width=3D"320" height=3D"240">=0A> =A0 </object> =0A> </video> =0A=0A>= Unfortunatly, Amaya returns "an error code": invalid token=0A> It seems it= is the "s" of controls which generate the error.=0A> =0A> Do you know what= I should do to avoid this error ?=0A=0AFirstly, assuming that you work wit= h an XHTML document, then, instead =0Aof controls, you should write control= s=3D"" or controls=3D"controls". Then =0Athat particular error message will= disappear. This is because XML =0Arequires boolean attributes to be of the= shape foo=3D"foo" or foo=3D"". By =0Acontrast, HTML permits the author to = type foo (the HTML browser will =0Astill think of it as foo=3D"", however).= =0A=0ASecondly, the empty <source/> elements must be equipped with a closin= g =0A"/", since that is the canonical form of empty elements in XHTML. =0A= =0AAll in all, this would work:=0A=0A<video width=3D"320" height=3D"240" co= ntrols=3D"">=0A=A0 <source src=3D"movie.mp4" type=3D"video/mp4" />=0A=A0 <s= ource src=3D"movie.ogg" type=3D"video/ogg" />=0A=A0 <source src=3D"movie.we= bm" type=3D"video/webm" />=0A=A0 <object data=3D"movie.mp4" width=3D"320" h= eight=3D"240">=0A=A0=A0=A0 <embed src=3D"movie.swf" width=3D"320" height=3D= "240" />=0A=A0 </object> =0A</video>=0A-- =0Aleif halvard silli --1353131092-304131845-1357402540=:79835 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"color:#000; background-color:#fff; font-family:ti= mes new roman, new york, times, serif;font-size:12pt"><div><span>Hello All.= </span></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-famil= y: times new roman,new york,times,serif; background-color: transparent; fon= t-style: normal;"><span>Thanks a lot for your returns. <br></span></div><di= v style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times new rom= an,new york,times,serif; background-color: transparent; font-style: normal;= "><span>I've still questions: is it better to stay in xhtml or move to html= code type, regarding results described bellow ?</span></div><div style=3D"= color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york= ,times,serif; background-color: transparent; font-style: normal;"><span>Ant= oine</span></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-f= amily: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style=3D"color: rgb(0, 0,= 0); font-size: 16px; font-family: times new roman,new york,times,serif; ba= ckground-color: transparent; font-style: normal;">Here is the code I'm test= ing, including changes you told me:</div><div style=3D"color: rgb(0, 0, 0);= font-size: 16px; font-family: times new roman,new york,times,serif; backgr= ound-color: transparent; font-style: normal;"><br></div><div style=3D"color= : rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,time= s,serif; background-color: transparent; font-style: normal;">--------------= -----------------<br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16= px; font-family: times new roman,new york,times,serif; background-color: tr= ansparent; font-style: normal;">23 <video width=3D"320" hei= ght=3D"240" controls=3D""><br>24 &l= t;source src=3D"proj.mp4" type=3D"video/mp4" /><br>25 <source src=3D"proj.ogg" typ= e=3D"video/ogg" /><br>26 <source= src=3D"proj.webm" type=3D"video/webm" /><br>27 = <object data=3D"proj.mp4" width=3D"320" height=3D"240"><= br>28 <embe= d src=3D"proj.swf" width=3D"320" height=3D"240"><br>29  = ; </object><br>30 </video>= <br>31 <p><strong>Download Video:</strong= ><br>32 Closed Fo= rmat:<a href=3D"proj.mp4">"mp4"</a><br>33 &nb= sp; Open Format:<a href=3D"proj.ogg">"o= gg"</a><br>34 </p><br></div><div>-----------------= ------------</div><div><br></div><div style=3D"color: rgb(0, 0, 0); font-si= ze: 16px; font-family: times new roman,new york,times,serif; background-color: trans= parent; font-style: normal;">Then here are results concerning error alerts = send back by Amaya:<br></div><div style=3D"color: rgb(0, 0, 0); font-size: = 16px; font-family: times new roman,new york,times,serif; background-color: = transparent; font-style: normal;"><br></div><div style=3D"color: rgb(0, 0, = 0); font-size: 16px; font-family: times new roman,new york,times,serif; bac= kground-color: transparent; font-style: normal;">Test 1: keeping XHTML code= type (transitional 1.0)</div><div style=3D"color: rgb(0, 0, 0); font-size:= 16px; font-family: times new roman,new york,times,serif; background-color:= transparent; font-style: normal;">****************************************= *<br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family:= times new roman,new york,times,serif; background-color: transparent; font-= style: normal;"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br>  = ; "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&g= t;</div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: ti= mes new roman,new york,times,serif; background-color: transparent; font-sty= le: normal;"><br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; = font-family: times new roman,new york,times,serif; background-color: transp= arent; font-style: normal;">Amaya returns following errors<br></div><div st= yle=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,n= ew york,times,serif; background-color: transparent; font-style: normal;"><b= r></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: ti= mes new roman,new york,times,serif; background-color: transparent; font-sty= le: normal; margin-left: 40px;">*** Errors/warnings in test.html<br> = line 23, char 0: Invalid or unsupported XHTML element <video><br> line 24, char 0: Invalid or unsupported XHTML elem= ent <source><br> line 25, char 0: Invalid or unsupported XHTML = element <source><br> line 26, char 0: Invalid or unsupported XH= TML element <source><br> line 29, char 2: mismatched tag<br></d= iv><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times n= ew roman,new york,times,serif; background-color: transparent; font-style: n= ormal;"><br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-= family: times new roman,new york,times,serif; background-color: transparent= ; font-style: normal;">Test 2: changing to HTML code type:</div><div style= =3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new = york,times,serif; background-color: transparent; font-style: normal;">*****= *************************<br></div><div style=3D"color: rgb(0, 0, 0); font-= size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal; margin-left: 40px;"><= ;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<br> &nb= sp; "http://www.w3.org/TR/html4/loose.dtd"></div><div = style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman= ,new york,times,serif; background-color: transparent; font-style: normal;">= <br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: = times new roman,new york,times,serif; background-color: transparent; font-s= tyle: normal;">Amaya does not return any error.</div><div style=3D"color: r= gb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,s= erif; background-color: transparent; font-style: normal;">And Amaya modify = the code, erasing the "layout" of the code (see bellow):</div><div style=3D= "color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new yor= k,times,serif; background-color: transparent; font-style: normal;"><br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; fon= t-family: times new roman,new york,times,serif; background-color: transpare= nt; font-style: normal; margin-left: 40px;"><video width=3D320 height=3D= 240 controls><source src=3Dproj.mp4 type=3Dvideo/mp4<br> />&= lt;source src=3Dproj.ogg type=3Dvideo/ogg /><source src=3Dproj.webm t= ype=3Dvideo/webm<br> /><object data=3D"proj.mp4" width=3D"320" = height=3D"240"><br> <embed src=3D"proj.swf" width= =3D"320" height=3D"240" /></object> </video><br><br> &= lt;p><strong>Download Video:</strong> Closed Format:<a<br= > href=3D"proj.mp4">"mp4"</a> Open Format:<a href=3D"proj= .ogg">"ogg"</a> </p><br></div><div style=3D"color: rgb(0, 0,= 0); font-size: 16px; font-family: times new roman,new york,times,serif; ba= ckground-color: transparent; font-style: normal;"><br></div><div style=3D"c= olor: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color:= transparent; font-style: normal;">Conclusion:</div><div style=3D"color: rg= b(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,se= rif; background-color: transparent; font-style: normal;">**********</div><d= iv style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times new ro= man,new york,times,serif; background-color: transparent; font-style: normal= ; margin-left: 40px;">XHTML: still errors, and code is not changed by Amaya= </div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: time= s new roman,new york,times,serif; background-color: transparent; font-style= : normal; margin-left: 40px;">HTML 4: no error, but code layout is modified= <br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: = times new roman,new york,times,serif; background-color: transparent; font-s= tyle: normal;"><br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px= ; font-family: times new roman,new york,times,serif; background-color: trans= parent; font-style: normal; margin-left: 40px;">Then: what should I decide = ?<br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family:= times new roman,new york,times,serif; background-color: transparent; font-= style: normal;"><br></div> <div style=3D"font-family: times new roman, new= york, times, serif; font-size: 12pt;"> <div style=3D"font-family: times ne= w roman, new york, times, serif; font-size: 12pt;"> <div dir=3D"ltr"> <font= face=3D"Arial" size=3D"2"> <hr size=3D"1"> <b><span style=3D"font-weight:= bold;">De :</span></b> Leif Halvard Silli <xn--mlform-iua@m=E5lform= .no><br> <b><span style=3D"font-weight: bold;">=C0 :</span></b> Hid= denId <[email protected]> <br><b><span style=3D"font-weight= : bold;">Cc :</span></b> "[email protected]" <[email protected]> <= br> <b><span style=3D"font-weight: bold;">Envoy=E9 le :</span></b> Samedi 5= janvier 2013 15h46<br> <b><span style=3D"font-weight: bold;">Objet :</span></b> Re= : error code when insering a video using video tag<br> </font> </div> <br>H= iddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):<br><br>> I'm trying to in= sert a video in an HTML page.<br>> I've tried a w3school code example :<= br>> <br>> <video width=3D"320" height=3D"240" controls><br>>= ; <source src=3D"movie.mp4" type=3D"video/mp4"><br>> = <source src=3D"movie.ogg" type=3D"video/ogg"><br>> <sou= rce src=3D"movie.webm" type=3D"video/webm"><br>> <object da= ta=3D"movie.mp4" width=3D"320" height=3D"240"><br>>  = ; <embed src=3D"movie.swf" width=3D"320" height=3D"240"><br>> &nbs= p; </object> <br>> </video> <br><br>> Unfortunatly, Amaya= returns "an error code": invalid token<br>> It seems it is the "s" of c= ontrols which generate the error.<br>> <br>> Do you know what I shoul= d do to avoid this error ?<br><br>Firstly, assuming that you work with an XHTML document, the= n, instead <br>of controls, you should write controls=3D"" or controls=3D"c= ontrols". Then <br>that particular error message will disappear. This is be= cause XML <br>requires boolean attributes to be of the shape foo=3D"foo" or= foo=3D"". By <br>contrast, HTML permits the author to type foo (the HTML b= rowser will <br>still think of it as foo=3D"", however).<br><br>Secondly, t= he empty <source/> elements must be equipped with a closing <br>"/", = since that is the canonical form of empty elements in XHTML. <br><br>All in= all, this would work:<br><br><video width=3D"320" height=3D"240" contro= ls=3D""><br> <source src=3D"movie.mp4" type=3D"video/mp4" />= ;<br> <source src=3D"movie.ogg" type=3D"video/ogg" /><br> &nbs= p; <source src=3D"movie.webm" type=3D"video/webm" /><br> <o= bject data=3D"movie.mp4" width=3D"320" height=3D"240"><br> &= nbsp; <embed src=3D"movie.swf" width=3D"320" height=3D"240" /><br> </objec= t> <br></video><br>-- <br>leif halvard silli<br><br> </div> </div>= </div></body></html> --1353131092-304131845-1357402540=:79835--