[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] document() function can't follow virtual directory path in MSXML3?


Subject: RE: [xsl] document() function can't follow virtual directory path in MSXML3?
From: "Jennifer Phillips" <Jennifer@xxxxxxxxxx>
Date: Mon, 18 Aug 2003 12:55:59 +0100

><xsl:if test="document('/virdir/home.xml')">
>I always get this:
>msxml3.dll error '80070003'
>The system cannot find the path specified.
>/index.asp, line 13

Thats what I would expect you to get.

>I know the path is valid, and I can use in my .asp with no problems.

Its valid for ASP yes, but its "/virdir/home.xml" is an HTTP path, not a
file system path which is what MSXML is expecting.

In the document call your making your saying give me home.xml in the
directory called virdir located in the root of the current drive.

What you need to do is find out the actual path your host uses to store the
files.  If in one of your ASP pages you add the statement

response.write(server.mappath("/virdir"))

Add the path it returns, into your document call IE  if server.mappath
returns "c:\somedir\virdir", put that in your document call.

If you do want to pass the current path to the stylesheet, its a little more
complex than just calling transformNode, if you look up the class
MSXML2.XSLTemplate.4.0  (Thats the MSXML4 version, think just remove the 4.0
for the MSXML3 version), that will show you how pass parameters (Or let me
know and I'll give you some code).

Jen



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread