Re: Problem with document() Function

Jonas Sicking <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Message-ID <[email protected]>
Ntti wrote:
> Jonas Sicking schrieb:
> 
>> It does not matter if the uri is relative or absolute, what matters is
>> uri of the page trying to do the transform and the resolved uri of the
>> stylesheet document.
>>
>> I think you'll need to attach an example to show what you are doing.
>>
>> / Jonas
> 
> the resolved uri of the stylesheet document is
> chrome://metabook/content/ergebnisse.xsl  and the uri of the page
> trying to do the transform is actually the same.  the xul page and the
> javscript file are in the same directory.  chrome://metabook/content/
> 
> It is a mozilla extension which extracts data from web and creates xml
> files which should be transformed with the xsl file.
> 
> an example, what exactly do you want me to attach?  I can not attach
> the extension because it is my exam work and it is not finished.
> 
> But I became a tip how to avoid this problem, I could merge the
> documents to one( without xslt) and then apply the xslt sheet for this
> one document. I hope this would work. 

Ideal would be if you could attach a minimal example that fails. It 
doesn't have to be your whole exam work, just a small example that does 
the essential part of it.

Hmm.. I think I know what the problem is. When we're doing security 
checks for document() we do them against the uri of the source xml file. 
This works fine in most cases, but clearly not here.

Please file a bug on this.

What you could do to work around the problem is to create a new document 
and move the contents of your xml file into that new document (by 
calling .adoptNode and then .appendChild).

Hope that helps.

/ Jonas
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.