This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Mozilla XML > October 2005 > Interesting setup and problem with the document() function





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Interesting setup and problem with the document() function
Rui Paiva

2005-10-20, 6:50 pm

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()
function.
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:
http://ruipaiva.dnip.net/pbnew/PictureLibrary.html

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
from.
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
start/pictures/........

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

Rui



Martin Honnen

2005-10-21, 6:38 pm



Rui Paiva wrote:


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


> 1. OnLoad of the page, I use the Javascript "new
> ActiveXObject('MSXML2.FreeThreadedDOMDocument');", followed by the load()
> method to load a XML file.


> Ok, the problem arrises when I try to expand the "br" node. IE throws an
> error saying he "cannot find the path specified".


Why do you want anyone in a Mozilla group to look into what you believe
is a bug with IE and MSXML? Take that to a proper newsgroup on
news.microsoft.com.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Rui Paiva

2005-10-21, 6:38 pm

Thanks Martin...

The idea was that someone might have come across something like this, since
most people try to write "cross browser" apps anyway...

And if it is a bug, most people will be happy to comment on it anyway....

Anybody else ?

Thanks

Rui


"Martin Honnen" <mahotrash@yahoo.de> wrote in message
news:djani0$hk81@ripley.aoltw.net...
>
>
> Rui Paiva wrote:
>
>
>
>
>
> Why do you want anyone in a Mozilla group to look into what you believe is
> a bug with IE and MSXML? Take that to a proper newsgroup on
> news.microsoft.com.
>
>
> --
>
> Martin Honnen
> http://JavaScript.FAQTs.com/



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews