开发者

xhtml validating problem - omittag and system identifier

I try to val开发者_运维百科idate my code, but i get a few error, and i need help with this:

I get a few error for this:

  1. end tag for "param" omitted, but OMITTAG NO was specified
  2. cannot generate system identifier for general entity "color"
  3. general entity "color" not defined and no default entity

4 reference not terminated by REFC delimiter

>     > <object
>     > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>     > codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
>     > id="flaMovie" width="400"
>     > height="235">
>     >             <param name="movie" value="swf/test_movie_purple.swf">
>     >             <param name="FlashVars" value="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>">
>     >             <param name="quality" value="medium">
>     >             <param name="wmode" value="transparent">
>     >             <embed src="swf/test_movie_purple.swf"
>     > flashvars="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>" wmode="transparent"
>     > width="400" height="235"
>     > type="application/x-shockwave-flash"></embed></object>

Could anyone help me fix this? Im goin' to crazy..


end tag for "param" omitted

In HTML-compatible-XHTML, elements that are always empty, like <img> and <param> must use the self-closing syntax:

<param name="movie" value="swf/test_movie_purple.swf" />

(note the /. Same for all other param​s.)

cannot generate system identifier for general entity "color" [and the other errors]

You forget to encode the & character before color=... in the URL. It should be &amp;color=....

Additionally, the old-school <embed> element is undefined in both HTML4 and XHTML1, so it won't validate anyway. See this question for some discussion on Flash embedding methods.


Well, for the color, your trying to have the HTML validator validate PHP, that's never going to work. Try to validate the compiled version of the code (after PHP executes and fills in your variables).

For the param closing tag, make sure your params are coded like this: <param ... />

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜