xsl-list
[Top] [All Lists]

RE: [xsl] RE: doc-available vs. exists(document)

2009-06-17 08:36:19
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 



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>