Re: [Jmol-developers] vs

Wed, 14 Sep 2005 10:37:20 -0700


Miguel wrote:

Q: What is the current status of use of Jmol.js in terms of XHTML
compliance?
Can we, for example, use

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

now and have compliant code using Jmol.js?


I don't really understand what this means.

For IE + Mozilla family + (recent) Safari the html code that is generated
uses <object>.

I believe that on these browsers the code that is generated is compliant.

However, be advised that:
 - I have never run a 'compliance checker'
 - I am not a web designer with lots of HTML experience

So, if there are problems with the html code that is generated please do
not hesitate to point them out to me.


I'd be happy to do more with this. (checking, I mean). I think I know how now, and as of yesterday I understand what that gobblygook means. I'm interested in making sure Jmol.js does conform (except for "mayscript", I guess) at least to XHTML 1.0 transitional. If we wanted it to conform to STRICT, then we would have to FORCE the object tag and have some sort of Jmol.js option for doing that. Like,

 jmolSetAppletType("object")

or

 jmolSetXHTML("strict")

or something like that. (Oooh, that wouldn't be so bad.... I kind of like that.)



Q: Are we aiming for -strict on this? yes? no? ultimately?


I am not sure exactly what this implies, but I think that the answer is:

  For modern browsers, Jmol.js should generate strictly compliant HTML
  For older browsers, Jmol.js should generate HTML that works.


Strict means something very specific in this context. No applet tags, no <input> tags directly within <FORM> tags, no NAME attribute for FORM, that sort of thing. Best not to get involved unless you have to.


At some point ... perhaps soon ... Jmol.js will explicitly drop support
for older browsers (e.g. Netscape 4.7)

about time.



What I'm thinking is that <applet mayscript="mayscript"> is NOT allowed in
xhtml1-transitional, even though <applet> is.


Jmol.js no longer generates <applet> tags for modern browsers.

I wasn't sure if your browser checks went so far as to guarantee that. OK, that's excellent. Again, a VERY STRONG selling point for using Jmol.js.



Q: So if I include a transitional DOCTYPE, and Jmol.js throws in an
<applet
mayscript> tag for some browser on the fly, is that a problem?


I don't think so ... I think that backwards compatibility is a feature,
not a bug.

As long as the browser check works, shouldn't be a problem.



Will I lose my scripting?


I do not understand this question.


Neither do I. What was I asking? Ah, ok, say you declare in the DOCTYPE that this is going to be HTML 1.0 strict. Then for whatever reason Jmol.js dumps in an applet because something failed a browser check. THAT might be a problem. But I suspect it's a nonissue. Let's see, the logic is:

  isIEWin = (os == "win" && browser == "msie" && browserVersion >= 5.5);
  useIEObject = isIEWin;
  useHtml4Object =
   (os != "mac" && browser == "mozilla" && browserVersion >= 5) ||
   (os == "win" && browser == "opera" && browserVersion >= 8) ||
   (os == "mac" && browser == "safari" && browserVersion >= 412.2);

Well, I don't know... Surely there are other "modern" browsers out there that might read that "DOCTYPE XHTML 1.0 Strict" pretty strictly and just throw out an applet as junk. Maybe not this year....


Q: What happens when you include a transitional DOCTYPE, then introduce
nonvalidating code? Does it work anyway?


I don't really understand what this means.


Jan explained it to me. The answer is that the browser uses its "conforming" processor instead of its "quirks" processor, and all you can do is cross your fingers and hope it flies.


Bob

--

Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr

"Imagination is more important than knowledge."  - Albert Einstein


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to