Re: How to tell Firefox NOT to do DOM-Tree creation

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
ExtDev wrote:
> So after unregistering, the xml documents are loaded but not shown in
> the browser or are not loaded at all?

XHR will load them.  Trying to load them in a browser window will put up 
a helper app dialog, unless another handler is installed.

> Unfortunately I cant find any example how (and with what parameters)
> to call UnregisterTypes() from an extension.

The code in nsContentDLF is an example, no?  It should be pretty 
straightforward to translate to JS.

> Is there a similar way to suppress only the internal XSLT handling?

Not that I know of.

> Now I need the XSL file. Do I have to parse the XML file and find and
> follow (request) the link to the XSL file myself or is there a more
> simple way to get the XSLT instructions?

If you want to get at the XSL PI in the XML file, yes...  You might be 
able to use nsISAXXMLReader to parse without building a DOM.  Not sure 
whether you could just tell the parser to stop after finding your PI if 
you're doing that.

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.