Re: XSL file load
Martin Honnen <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
Seamus wrote:
> I am having issues loading an XSL file into my script (on FireFox). The
> stylesheet is below. I am trying to load via the syntax below. If I try to
> load via the loadXML extension that I wrote, all works well. If I try to
> load from the file...I get nothing in the resulting document.
> var xslDoc = document.implementation.createDocument("", "",
> null);
> // xslDoc.async = false;
> // xslDoc.loadXML(xslStr);
> xslDoc.load(xslSource);
> xslDoc.addEventListener("load", _Document_onload_XSLT(xslDoc),
> false);
You should add the event listener before you call load I think and of
course you need to make sure the event listener argument is a function
and not a function call so try
xslDoc.addEventListener(
"load",
function (evt) {
_Document_onload_XSLT(xslDoc);
},
false
);
xslDoc.load(xslSource);
--
Martin Honnen
http://JavaScript.FAQTs.com/