On Sun, 15 Apr 2001, Erik Arvidsson wrote:

> Both IE and Opera treats XML documents as HTML documents so therefore it is
> just a matter of executing the script. I added a html:button with an onclick
> handler (in IE the onclick can be added to any element because all elements
> are treated as html elements.)

Using the Microsoft Development Environment (the MSVC++ IDE) you can
browse the DOM, it's interesting to see all the extraneous garbage they
put in there... (What on earth does "XMLNS:XMV" mean on the <HTML> element
that they add???)


> In Opera I did not write a dom walking function but I just checked
> each node manual (this.parentNode etc).

I get "<content ...>", "<document ...>" and "<HTML ...>" if I stick an
HTML button in the <content> element and alert() the objects I get from
crawling parentNode up the tree. How did you get "HTMLcontentElement"?


> Moz:
>
> [object Document]
>  + [object Text] (This is probably the white space after the XML decl.)
>  + [object ProcessInstruction] (the xml-stylesheet pi)
>  + [object Text]    (empty text node)
>  + [object Element] (tagName => document)
>    + [object Text]    (empty text node)
>    + [object Element] (tagName => style)
>      + [object Text]    (content of style element)
>    + [object Text]    (empty text node)
>    + [object Element] (tagName => contents)
>      + [object Text]
>    + [object Text]    (empty text node after contents)

Yay!!! He shoots, he scores!!! Let's hear it for Mozilla! :-D


> Should the whitespaces really be this many? To me it seems like the
> empty whitespaces before and after the document element should not be
> there because you cannot have any text outside the root element and
> therefore empty text nodes should be ignored.

You need them to do "white-space: pre" and for the editor (to conserve
white-space when roundtripping). But yeah, we could maybe hide them. Is it
worth it?


> Conclusion. Only Mozilla seems to handle XML documents styled with css
> correct. Can anyone do these tests for Konqueror and/or Mac IE5?

I asked the lead developer of the MacIE team, and apparently you can't
execute scripts in an XML context in MacIE 5. I tried using "javascript:"
URLs but that told me that document.childNodes.length was 0...


I tested Amaya but they don't have JavaScript as far as I can tell, so
that fell flat on its face.


Can anyone test Konqueror? Anyone?

-- 
Ian Hickson                                     )\     _. - ._.)       fL
Netscape, Standards Compliance QA              /. `- '  (  `--'
+1 650 937 6593                                `- , ) -  > ) \
irc.mozilla.org:Hixie _________________________  (.' \) (.' -' __________

Reply via email to