Re: XSLT processing model in Mozilla
Jonas Sicking <[email protected]> Sat, 28 Jul 2007 19:46:38 -0700
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Message-ID | <[email protected]> |
John J. Barton wrote: > Jonas Sicking wrote: >> Since you're not providing a testcase, I'm left with guessing what's >> going on. > There here: > http://fireclipse.svn.sourceforge.net/viewvc/*checkout*/fireclipse/trunk/FireclipseTests/WebContent/testXSLT.xml > > http://fireclipse.svn.sourceforge.net/viewvc/*checkout*/fireclipse/trunk/FireclipseTests/WebContent/testXSLT.xsl Note that scripts like these are not run in the stylesheet, but rather they are run while the result page is created. And of course only if the result page contains those elements. >> What it might be is that you're managing to attach eventlisteners to >> the source XML file, i.e. the one before transformation takes place. I >> do think we might (arguably errorously) be firing events at that >> document. > > I am trying to attach to the *window* before the transformation. The > last point that I can trace is the load of the .xsl file. Note that scripts in the .xsl file are not run before the transformation. They are run during the transformation when those result elements are created. > At that point > my additions to the window object are still there. The next time I have > control is in the transformed code top-level script. Then my additions > are gone. (We already decided there were no events raised by the XSLT > engine I think). I'm really confused as to what you're actually trying to do. Are you trying to fix the problem that firebug doesn't work well with XSLT pages? >> However I think we're not firing them at the result document, which >> probably is where firebug is attaching its listeners. > > In my test the listeners that succeed are in the .xsl file. The > window.addEventListener() calls are in the XSLT result and were are not > in the xml file. The listeners that fail are attached in a > nsiWebProgressListener on a window with a .xml uri before the > transformation. > > Now "source document" and "result document" sounds interesting. From my > point of view there is only a window, its primary document. Can I see > the source document or result document in javascript code? You can't get to the source document from within a webpage. You might be able to get to it from chrome, I don't know. You can try. The result document is what you get when you use 'document' in javascript in the result page. What exactly are you trying to accomplish? What have you tried? What happened when you tried that? I feel like you're trying a lot of things without really knowing what you're testing, so you're drawing wrong conclusions. / Joans