468,107 Members | 1,329 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

dataislands in mozilla

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.

there have been various issues along the way. the current issue is with
using document.selectNodes( xpathString ). mozilla doesn't seem to
define this natively, and i can't seem to find a general workable
solution to handle data islands. I found this posting

http://teamcon.com/pub/concepts/mozi...electnodes.htm

which seemed to provide some of the selectNodes functionality, but
doesn't seem to work with just a dataisland. i'm not sure if it's the
namespaces or what not that's tripping it up, but some where along the
way, i'm getting a "NS_ERROR_DOM_TYPE_ERR", with a message of "The
expression cannot be converted to return the specified type."

I really think that moving to Sarissa would be more of an undertaking
_right now_ than to patch the current system. Plus, for us performance
is key, and I'm curious about introducing the weight of the Sarissa
library.

i'd be interested in some general discussions about using data islands
with xpath in mozilla as well as any articles on the topic.

thanks.

Jul 23 '05 #1
2 1176


ml*******@gmail.com wrote:
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. i'd be interested in some general discussions about using data islands
with xpath in mozilla as well as any articles on the topic.


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/
Jul 23 '05 #2
Martin Honnen wrote:
[...] 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.
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>


IE does not really support XHTML, but would it be not possible to extend
XHTML in an IE-compatible way that those data islands validate? If yes,
Gecko-based UAs could then use their XML parsing prototypes to parse the
island's data.
PointedEars
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jakub Fast | last post: by
2 posts views Thread by Peter | last post: by
10 posts views Thread by News | last post: by
20 posts views Thread by Thorsten Kampe | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.