RE: RE: doc-available vs. exists(document)
> Now that I have my transformation working, I got to wondering why > doc-available() and document() work a bit differently on their inputs. > > If document() can find the file, why doesn't doc-available() > use the same rules? I would think that I would check > document availability, then use the same value to actually > open the document. > > There must have been a reason for the difference. Is there > an (easy) explanation for this? When the time came to design XQuery, it was felt that document() packaged too much functionality into one function, and that it would be better to split it into three logically separate and simpler operations: doc(), base-uri(), and resolve-uri(). The doc-available() function was then invented, and was aligned with doc() rather than document(). Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay
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