Re: problem self-referencing using document('') to reference parameters

Jonas Sicking <[email protected]> Wed, 25 Apr 2007 15:21:53 -0700
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Message-ID <[email protected]>
[email protected] wrote:
>> I think this is a bug, I have filed
>> <https://bugzilla.mozilla.org/show_bug.cgi?id=378610> about that.
> 
> Thanks Martin. Please let me know if there is a workaround.

There's good and bad news.

The bad news is that even though there is a bug there, it's not the bug 
you think it is. What we IMHO ideally should return for document('') in 
that case is the page that is executing the javascript. The long 
description is in the bug, the short story is simply that the URI '' 
should be resolved against where it appears, and it appears in your page.

The good news is that there is most likely another way of doing what 
you're trying to do. Exactly why do you want to refer to the xslt 
document itself? One way of doing so would be to use .setParameter to 
pass the DOM of the stylesheet as a parameter and then refer to the 
stylesheet through that parameter.

Best Regards,
Jonas Sicking