document finds a node-set in an external document, or multiple external documents, and returns the resulting node-set.
document(URI [,node-set] )
node-setargument's expression. If the
node-setargument is omitted, the entire fragment will be returned.
URIargument is a node-set, and the second argument is present, each node in the node-set will be evaluated as a separate URI, and the returned node-set will be as if the
documentfunction has been called multiple times (each time with the same second argument just as given in the function call) and the resulting node-sets had been concatenated into a single node-set.
document("")would return the root node of the current document.
This function is an XSLT-specific addition to XPath. It is not a part of the core XPath function library.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.