Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari applet problem with object tag



email@hidden wrote:

><P><OBJECT codetype="application/java"
>        classid="java:Bubbles.class"
>        width="500" height="500">
>Java applet that draws animated bubbles.
></OBJECT>
>--------
>
>This lets us know what the standard is. Unfortunately, it doesn't work
>with Safari.

I suggest trying that example without the ".class" suffix on classid's value.
I only suggest this because of these observations:

1) A subsequent example in the HTML 4 spec has this rewritten markup:
  <OBJECT codetype="application/java"
        classid="AudioItem"
        width="15" height="15">
  <PARAM name="snd" value="Hello.au|Welcome.au">
  Java applet that plays a welcoming sound.
  </OBJECT>

which omits the ".class" suffix.  Other examples of Java applets using
<OBJECT> tags also show no ".class" suffix used with the classid attribute
(Sec. 13.3.3).  Indeed, "Bubbles.class" is the ONLY example that does.

2) The original post said this worked in Safari:
    <object
        classid="java:TrivialAppletArch14"
        type="application/x-java-applet"
        archive="TrivialApplet14.jar"
        width ="200" height ="200">
    </object>

which is around the same complexity as the spec's examples, and it omits
the ".class" suffix, though it does use the archive attribute.

The <APPLET> tag traditionally uses the ".class" suffix, and my experience
in Safari and a few other browsers is that ".class" is required for that
tag.  However, given the examples in the HTML 4 spec, and the case of a
working <OBJECT> applet in Safari, omitting ".class" is a decent gamble.

Whether ".class" should be included or omitted in order to conform to the
spec is hard to say.


Further on the subject of examples in the spec, I noticed they all use this
attribute:
  codetype="application/java"

or this one:
  codetype="application/java-archive"

which differs from the original post's:
  type="application/x-java-applet"

This may or may not be significant.  It's a gamble.


Further on the original post, I noticed these attributes:
  codebase ="pox"
  archive = "BugView.jar"

have spaces between the attribute-name, the '=', and the value.  I checked
this in the actual HTML, and there are spaces there, too.  The <APPLET> tag
which works has the same spaces, though, so maybe it's insignificant.  Also
a gamble.


>My conclusion is that Safari does not support HTML4, and never has.

Agreed:
  "Safari and the Web Kit implement *A LARGE SUBSET* of the HTML 4.01
   Specification defined by the World Wide Web Consortium (W3C)."
      (emphasis mine)

<http://developer.apple.com/documentation/AppleApplications/Reference/SafariHTML
Ref/Articles/StandardHTMLTags.html>

The <OBJECT> tag is listed as supported, as is <APPLET> which is
deprecated.  The problem thus seems to be a bug, as distinct from an
intentional omission from the supported subset.  It doesn't make it work
any better, or fix it any sooner, but it does suggest that a bug-report is
unlikely to be closed as "Works according to spec".


>Until 5 years after Apple fixes this bug (see
>http://www.alleged.org.uk/pdc/2003/safari.html ),
>there won't be a standard way that works to include applets in a web page.

Deprecated doesn't mean obsolete.  One could use the deprecated <APPLET>
tag to embed applets:
  <http://www.w3.org/TR/html4/conform.html#deprecated>
   "User agents should continue to support deprecated elements for
    reasons of backward compatibility."

One would then have to reference the Transitional DTD, not the Strict one.


>The / would be the XML syntax. The initial poster wrote about HTML4
>strict, which is not XHTML. So he should not include the /.

Understood.  I was actually wondering if Safari's parser might be parsing
under XML or XHTML rules, though it would still be wrong if it were.
Besides, it was just a wild guess.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.