mlybarger@gmail.com wrote:
[color=blue]
> we currently have a heavy dataisland based site and would like to get
> it working on mozilla to take advantage of the js debuggers and other
> various tools.[/color]
[color=blue]
> i'd be interested in some general discussions about using data islands
> with xpath in mozilla as well as any articles on the topic.[/color]
IE is a HTML browser that supports and understands the content type
text/html which is the proper content type for HTML 4. But Microsoft has
extended HTML to have an <xml> element to indicate an XML data island
where the content (or the src) of the XML data island is not handled and
parsed by IE's HTML parser but by the MSXML XML parser. So with IE you
can serve up text/html with some XML data included or linked to and IE
will take care that the HTML is parsed by the HTML parser and the XML
data by an XML parser.
However other browsers (like Mozilla or Opera) do not support that <xml>
element as an extension to HTML and that approach of embedding XML data
in HTML and the two fold approach to parsing (HTML parser for the
text/html document, XML parser for embedded XML data), instead what
happens in those browsers if you serve them a text/html document with
some <xml> element with supposedly XML data content is that the
browser's HTML parser parses everything as HTML tag soup and the <xml>
element and any supposedly XML data elements inside are parsed by HTML
rules as unknown HTML elements.
Therefore in my view if you want a cross browser approach of using XML
data from a text/html document then do not use IE's XML data islands but
use script to load the XML data from an external file (respectively URL)
as that way you have the same parsing rules, HTML parser for your HTML
document, XML parser for the XML data.
See
<http://www.faqts.com/knowledge_base/view.phtml/aid/6826/fid/616>
--
Martin Honnen
http://JavaScript.FAQTs.com/