Re: Permission denied to call method XMLDocument.load

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Liberty Development
Message-ID <[email protected]>

Daniel Frechette wrote:

> Here is a new version of my viewer. With this new version I no longer get 
> the "Permission denied" message; however, I still cannot get a valid result. 
> The code hangs when it reaches "xslDoc.load(xslFile)". You can try it 
> yourself at http://treknowledge.com/dmsxpert/foxyXSLTViewer.htm.

>     function ApplyStylesheet(xmlFile, xslFile) {
>          var html = null;
>          try {
>               var xmlDoc = document.implementation.createDocument("", 
> "test", null);
>               xmlDoc.load(xmlFile);

You need to set up an onload handler to wait till the document is loaded 
before you try to transform it.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
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.