This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Absolute paths in document() function under MSXML3 SP1




> From: Richard Mitchell [mailto:Richard.Mitchell@vbnonline.com]
> > Hey guys, 
> > 
> > I have a situation where I generate a string that is an 
> > absolute URL. I'm
> > using this string to load an external XML document for 
> > processing using
> > document().
> > 
> > When I'm developing my XSL, I use Stylus Studio. I ran my XSL 
> > transform
> > through their processor and MSXML and in both instances, 
> the transform
> > worked fine, exactly as I had expected. However, when I went 
> > to use the
> > transform from an ASP page, I ran off of the same system I 
> > develop from, I
> > got the following error:
> > 
> > Error Type:
> > msxml3.dll (0x80004005)
> > Error while parsing "http://adam/component/FlashDataNav.xml";. 
> > No data is
> > available for the requested resource. 
> > /config.asp, line 104
> > 
> > {line 104 is the transform() line)
> > 
> > No the only problem with that is 
> > http://adam/component/FlashDataNav.xml
> > loads quite nicely from IE so the file exists and its valid XML. 
> > 
> > I'm using an MSXML2.IXSLProcessor to do the transformation.
> > 
> 
> Probably what is happening is that IE is requesting the file
> using http from the server but your asp is running the processor
> directly and tries to load the .asp from the root of your local
> hard disk. Also it won't actually run the asp file as you'll need
> to tear it off with some other component and point the document()
> at that with a disk reference. If you have the file you're loading
> as a xsl:parameter you can change it when running on the server
> for the asp page.

No that's not it. The file that is being loaded by document() is a static
XML file. There is no ASP to execute. In fact, I'd almost prefer it to
retrieve the file from the local disk and not via HTTP for speed and
security reasons.

I tracked down a similar error from The MSDN Knowledge base article :
PRB: Load Method Fails When Loading XML File Over HTTP
(http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q281142)
which gives a hint that the cause comes from the need for ServerXMLHTTP. I
tried adding the setting to my FreeThreadedDomDocument suggested by the
article. Unfortunately its still busted.

I've also tried loading "/component/FlasDataNav.xml" but i can't seem to
load that either. (my XML and XSL files both have uri bases at adam/config)





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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]