Toby White wrote:
> Bob Hanson wrote:
>
> No. Sorry. Reiterating my last email (which probably crossed paths
> with this one) the problem is that within the DOM model, you can't
> just pipe an arbitrary string to the browser in the hope that it's
> valid XHTML, and that the browser can do something with it. The
> browser will generate a DOM tree when it first parses the page
> (assuming the page is valid XML) which you can then dicky with
> to your heart's content, so long as you do it through the DOM
> interface - the browser won't parse isolated fragments of XHTML.
I think you are fundamentally mistaken about that -- see below. (But, really,
I'm SURE you know more about this than I.)
>
> To put it another way, the browser parses valid XML documents -
> you're passing it a fragment of an XML document, which is
> meaningless without the context of a full document which might
> have namespace, DTDs, so on and so forth. How is the browser
> to know what "<applet>" means?
I certainly do not intend to pass it an <applet> tag EVER. It knows OBJECT; I'm
happy with that.
Toby, what exactly are you meaning by "tag-soup" mode? I'm sure you
don't mean "quirks" mode, but I'm not sure what you do mean.
I do mean quirks mode, yes. If your web-server is serving
pages as text/html, then almost certainly your browser is
in quirks mode. To get it working in xhtml mode, you need
to be serving application/xml, application/xhtml+xml or
similar.
Well, unless document.compatMode is lying, I'm not in quirks mode. Is there
another way of telling? From what I read, the browsers are smarter than to rely
on server headers for this. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp
under "doctype switch"
No - the point is that Jmol.js is generating html as strings(*), which
are then piped out to the document. Whether this is done directly
by Jmol.js itself, or whether the functions return strings that
you then pipe by document.write or innerHTML is immaterial - this
is never going to work in XHTML mode - there is simply no way to get
the browser to render dynamically generated HTML from a string.
far as I can tell, it works....
I can't imagine what "XHTML mode" would be other than "strict standards
compliant mode" But I may have HTML 4.0 and XHTML confused here.
I think what is really happeing is that the browser is taking the strings and
piping them into its HTML/DOM interpreter. It can do this on the fly, as a page
loads or alternatively with element.innerHTML(). In both cases, a full DOM-based
system is constructed.
Can you point us to your modified Jmol.js that has JmolAppletNew() in it?
>
>
> My current version is at http://www.uszla.me.uk/jmol/Jmol.js
thanks. I look forward to seeing applications of this once you get it further
along. I'm really very interested in finding out how to test this "XHTML mode"
in IE or Firefox.
I think element.innerHTML() is just doing what you do, but using the browser's
own DOM tools rather than my having to code this myself, the way you are
suggesting doing. Other than that, it seems to me what you are doing with the
DOM tree stuff is ensuring that if it works at all, it is compliant. So there
might be some advantage there. But what would be the problem with letting the
browser do its work for me?
I look at my DOM Inspector after clicking that link and the object node and all
the params are "suddenly" there. I can't imagine that I could do all this dirty
work any better than element.innerHTML(). Why would I need to go to all that
trouble, if the browser will do it for me?
But you can have a look at the sort of thing I'm doing at
http://www.uszla.me.uk/example/4CDF.xhtml
"not found"
Bob Hanson
--
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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users