[xsl] Re: xsl-list Digest 21 Oct 2005 05:10:01 -0000 Issue 575

Subject: [xsl] Re: xsl-list Digest 21 Oct 2005 05:10:01 -0000 Issue 575
From: Rui Paiva <rmpaiva@xxxxxxxxx>
Date: Fri, 21 Oct 2005 19:16:19 +0200
Hi everyone,

here's an interesting bug (I think) that needs some looking into.

I am writing a rather complex app, using a mixture of Javascript, XSLT and
CSS. My objective is to write a completely client side app, with a "stupid"
file server on the server side, thus the complex architecture.

Here's the technical explanation of what I am doing:

1. OnLoad of the page, I use the Javascript "new
ActiveXObject('MSXML2.FreeThreadedDOMDocument');", followed by the load()
method to load a xml file.
2. I also load a XSLT file using "new ActiveXObject("Msxml2.XSLTemplate");",
create a processor an apply the transform using Javascript again.
3. The XML file loaded in step (1) contains several nodes with
"relativePath/filenames.xml". The transform of step (2) loads some of these
files, merging them with the initial one, using the xpath:document()
4. I present the result using another XSL transformation, but it's not
relevant for the problem. It displays a navigation tree.
5. When I click on a node (trying to expand it), I apply the same
transformation of step (2), to merge some more xml files into the initial
one. This allows me to load and merge the xml files as needed, without the
hassle of programming the actual loads and merges via Javascript.

Please check the left side of the following page:

Ok, the problem arrises when I try to expand the "br" node. IE throws an
error saying he "cannot find the path specified".
This is probably due to a relative path problem.

My problem is that, since I use Javascript to apply transformations, and
XSLT to load files, I cannot spot where the relative path problem is coming
When I examine the resulting DOM for each step of the transformation, all
the relative paths are correct for the next files to load. (I can put that
DOM into a popup window if it helps anyone to diagnose the problem (and any
other you might need) .

Structure of the site:
starting path: start/PictureLibrary.html file.
the xsl file that merges the xml's is start/xslt/FileListProcessing.xsl
the first xml file is under directory start/pictures/2005-07-21 Brazil.xml
all the other xml files to be merged are under several sub-directories of

As proof that the relative paths are correct, I changed the javascript to
run over firefox too, and it's working fine there...

Anybody has any idea why the transform is working the first time, but not
the following ones under IE ?

Anybody understood what I am talking about at all ? ;)

Thanks for your help...


Current Thread