Click to See Complete Forum and Search --> : W3C Validator


zyex
10-06-2003, 10:49 AM
Hi,

I am currently trying to get a website to be fully compliant with the W3C validator.

I have managed to get it down to 11 errors from hundreds, but no matter what I do its still giving the same errors.

The results can be seen at http://validator.w3.org/check?uri=http%3A%2F%2Fwww.chamberelancs.co.uk%2Findex.cfm

The errors are for the Flash content on the page...the validator doesnt seem to like the <embed> tag...

I have tried changing the DOCTYPE but it still isn't having any of it.

Macromedia.com only has two errors and it contains flash content. How have they got around this problem? I have used the same DOCTYPE tags as in their homepage and still I get the same errors.

The page that I am trying to validate is http://www.chamberelancs.co.uk/index.cfm

Thanks in advance to anyone who can help.

AdamGundry
10-06-2003, 11:26 AM
The validator doesn't like the <embed> tag because it is invalid proprietary code. You should use the standards-compliant <object> tag instead, which is what Macromedia's site uses.

Adam

zyex
10-06-2003, 11:31 AM
Here is my code:

**************************************************
<object id="main_event-object" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="458" height="164">
<param name="movie" value="swf/main_event/UniqueHealth.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<embed
id ="main_event-embed"
src="swf/main_event/UniqueHealth.swf"
width="458" height="164"
quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash"
menu="false">
</embed>
<noembed>
This page requires a web browser that can display Macromedia Flash content.<br>
Please visit the <a title="Macromedia Flash Plugin Download Page" href="http://www.macromedia.com/go/getflashplayer">Macromedia Flash Player Site</a> to download the plugin.
</noembed>
</object>

**************************************************

and here is Macromedias code

**************************************************

<object id="globalnav-object" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="756" height="88">
<param name="movie" value="/swf/globalnav/globalnav_en_us.swf?fpReqMinor=79" />
<param name="FlashVars" value="loc=en_US" />
<param name="bgcolor" value="#c6cfd0" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="salign" value="tl" />
<param name="scale" value="noscale" />
<embed
id="globalnav-embed"
src="/swf/globalnav/globalnav_en_us.swf?fpReqMinor=79"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
flashvars="loc=en_US"
bgcolor="#c6cfd0"
menu="false"
quality="high"
salign="tl"
scale="noscale"
width="756"
height="88">
</embed>
</object>

**************************************************

They also use the <embed> tag within the object tag.....

so that cant be the problem or macromedias site would throw up the same errors...

AdamGundry
10-06-2003, 11:38 AM
Macromedia are cheating. The code their server is supplying to the validator appears to be different to that supplied to a browser - probably done by server-side code to ensure users get the most appropriate version.

Regardless of what they do, you cannot use <embed> or <noembed> in a compliant HTML 4.01 or XHTML 1.x page.

Adam

zyex
10-06-2003, 11:43 AM
So there is no way to make a page compliant with W3C if it contains flash content?

Is there anywhere official that has any documentation on this subject?

If you cannot make a page compliant with the W3C because it uses the latest web technologies (flash isnt so new anymore) then why should designers and developers be compliant with the W3C.

pyro
10-06-2003, 11:48 AM
Yes, you can embed flash content on your page, and still have a page that will validate XHTML 1.1 (I do so on my site). Take a look at http://www.alistapart.com/stories/flashsatay/ to find out how.

AdamGundry
10-06-2003, 11:51 AM
Nice article, Pyro. Like I said, you can use Flash content, but you need to use the correct tag - <object> in this case.

Adam

pyro
10-06-2003, 12:21 PM
Yep, it made my day when I was looking through the ALA archives and found that article, as until that point, I had been rather disapointed by what I thought was an inability to validate flash content. Happily, I was wrong...

zyex
10-06-2003, 12:22 PM
Thanks Pyro. - The site is now W3C compliant.

Also, Adam thanks for your help

pyro
10-06-2003, 12:28 PM
Sure thing... :)