View Single Post
 
Old September 26th, 2006, 12:31 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Supplying a variable, or any other expression, as an argument to the document() function is perfectly OK. It's just like any other function. The one thing that needs a little care is that the treatment of relative URIs is different depending on whether you pass a string or a node. But you're not clear what's happening. I assume it's failing, because otherwise you wouldn't be writing here - but how is it failing? If it can't find the document, then you'll need to tell us more about where the document and the stylesheet are located.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference