RE: document() function can't follow virtual directory
Hi > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Brook Ellingwood > Sent: Thursday, August 14, 2003 6:38 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: document() function can't follow virtual > directory path in MSXML3? > > > Hi, > > I'm wondering if anyone has seen this behavior in MSXML3 and > if they might know whether there's a workaround. > > I'm storing my XML in a folder outside the www root to meet > the host's security requirements. I follow a virtual > directory path to access it. This works fine, except when I > try to call an XML doc via the document() function, like so: > > <xsl:if test="document('/virdir/home.xml')"> > <font color="white">foo</font> > </xsl:if> If you are runing the transformation in the server then that path will be translated to "C:\virdir\home.xml", that path, given the error you reported, doesn't exist. The '/virdir/' path exists only on the client, i. e., when called by a web browser. In the server you have to use it's full path or a relative path (like: ../../somedir/home.xml) (...) Regards, Americo Albuquerque XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format