Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document() error?

Status
Not open for further replies.

bont

Programmer
Sep 7, 2000
200
US
I have a case when I use the document() function to open an external XMl.

When I use a static name such as this:
Code:
document('DVD_Cat_5.xml')
it works great.

if I use a dynamic name, such as this:
Code:
document(.)
it errors with:
Code:
msxml3.dll error '800c0006' 
The system cannot locate the object specified. 
/multimedia/movies/index_all.asp, line 27

I have verified that the xslt is indeed passing the valid value, with no additional white spaces. What I am guessing is that it is having some problem finding the file. Please help.
 
Does it work with a variable? ie:
Code:
<xsl:variable name="url" select="DVD_Cat_5.xml"/>

document($url)
 
Why not use:
Code:
<xsl:variable name="url" select="."/>

document($url)
 
Because it is not that simple. The entire concept was to use an XML file as a control source. In this case I think I am one step ahead.

I have modified my ASP to add a param with the document name, if the key value is NOT "all" or null.

Then in my first template, if the param has length, I call document($paramname)
else
document(.)

Truthfully, I would like to know why document works with "." when the control file is static and I am using the load() function, but when I switch to dynamic and have to use the loadXML() function, it fails to find the file. I believe it lies beneath in how the server finds the file. I probably wouldn't have this problem if I could specify a direct path to the file, but I cannot since it is not my own server, by one that can have many virtual paths.
 
that, i beleive, is a question for Microsoft to answer.


I cannot find any definitive source discussing this.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top