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.) In Opera I did not write a dom walking
function but I just checked each node manual (this.parentNode etc) I did the
same for Moz as for Opera and that explains why I forgot the PI :-)
After checking the children of the document ( : Document)
IE does not include the PI and the document ( : Document) only has one
childNode. (So same as previous post.)
Opera does not have a real DOM. Only elements are available.
document.childNodes is undefined and the parentNode of [object
HTMLdocumentElement] is undefined. (So same as previous post.)
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)
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.
Conclusion. Only Mozilla seems to handle XML documents styled with css
correct. Can anyone do these tests for Konqueror and/or Mac IE5?
erik arvidsson
webfx.eae.net
"Ian Hickson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> No PI node for the xml-stylesheet link? That's odd. Did you check all the
> children of the Document object?
>
>
> I'm curious: how did you do this in all the browsers? I know Mozilla
> supports <html:script> (and <xul:script>, for that matter, and even
> <xbl:script> if you try hard enough!) to execute scripts, but how did you
> walk the DOM in Opera and IE? I'd be very interested to look at how you
> did it. Thanks!
>
> --
> Ian Hickson )\ _. - ._.) fL
> Netscape, Standards Compliance QA /. `- ' ( `--'
> +1 650 937 6593 `- , ) - > ) \
> irc.mozilla.org:Hixie _________________________ (.' \) (.' -' __________