SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    Non-Member
    Join Date
    Jan 2006
    Location
    Chicago, Illinois
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validating This Flash Code

    How can I get this to validate xhtml 1.0 transitonal? I have read the alistpart flash embed tutorials and couldnt get it to work + validate. Can anyone give some pointers? Thanks.

    HTML Code:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="380" height="50" id="ledscroller">
    	<param name="allowScriptAccess" value="sameDomain" />
    	<param name="movie" value="newledscroller.swf" />
    	<param name="quality" value="high" />
    	<param name="bgcolor" value="#000000" />
    	<embed src="newledscroller.swf" quality="high" bgcolor="#000000" width="380" height="50" name="ledscroller" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    HTML Code:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="380" height="50" id="ledscroller"/>
    should fix your issue. Tags without child nodes and no text content need to have a '/' at the end.

  3. #3
    Non-Member
    Join Date
    Jan 2006
    Location
    Chicago, Illinois
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, thats all of the code. It didn't all paste before.

  4. #4
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    <embed> tag is considered to be browser specific and not part of the xhtml transitional standard (nor the HTML standard actually). What you can try is:

    HTML Code:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="380" height="50" id="ledscroller" data="newledscroller.swf" type="application/x-shockwave-flash">
    and put all other embed attributes in param tags as you have currently. Then just get rid of the embed tag.

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chris_fuel
    should fix your issue. Tags without child nodes and no text content need to have a '/' at the end.
    No, they don't. You could equally well just use the end tag. In fact, if you serve your markup as text/html you must have the end tag and not the empty element-syntax.

    You could use:
    HTML Code:
    <object type="application/x-shockwave-flash" data="newledscroller.swf">
     <param name="movie" value="newledscroller.swf" />
     <!-- you could place alternate content here -->
    </object>
    Simon Pieters

  6. #6
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan
    No, they don't. You could equally well just use the end tag. In fact, if you serve your markup as text/html you must have the end tag and not the empty element-syntax.
    I'm not sure what you're saying, but please read the whole thread and notice my answer changed. The original post had different context and was edited later.

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chris_fuel
    I'm not sure what you're saying, [...]
    I'm saying that en empty element can be written in two ways in XML; either with a start tag followed by and end tag, or an empty element tag.
    Code:
    <foo></foo>
    <foo/>
    You don't need to use the empty element syntax for empty elements.

    If you serve XHTML as text/html then you need to adhere to appendix C of XHTML 1.0, which forbids the empty element syntax for non-EMPTY element types.
    Simon Pieters

  8. #8
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you serve XHTML as text/html then you need to adhere to appendix C of XHTML 1.0, which forbids the empty element syntax for non-EMPTY element types.
    That's more of the DTD than anything else. Empty tags have to be declared as:

    <!ELEMENT br EMPTY>

    if you have

    <!ELEMENT foobar (#PCDATA)>

    Then no, given the DTD you can't do it, nothing really to do with XHTML's appendix.

  9. #9
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, DTDs are irrelevant here. And yes, you really need to follow appendix C if you serve XHTML as text/html.
    Quote Originally Posted by XHTML 1.0
    5. Compatibility Issues
    This section is normative.
    [...]
    XHTML Documents which follow the guidelines set forth in Appendix C, "HTML Compatibility Guidelines" may be labeled with the Internet Media Type "text/html" [RFC2854], as they are compatible with most HTML browsers.
    Simon Pieters


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •