Home
Download
Wiki
Demo
Open Source Native XML Database
About Us
Who we are
Acknowledgements
Documentation
Quick Start
Function Library
Extension Modules
Main Documentation
Feature Sheet
XQuery Wikibook
Examples
XQuery Sandbox
XML Acronyms
Bibliographic
All Examples
Community
Mailing List/IRC
Development
Javadocs
ChangeLog
Bug Tracker
Subversion
Submit Patches
Administration
Admin
Server Status
Webstart Client
A RESTful browser for eXist Java-Based Function Modules
Modules
>
xpath-functions
>
root
http://www.w3.org/2005/xpath-functions
A module with the XQuery/XPath Core Library Functions
root
root($arg as node()?) node()?
Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.
If $arg is the empty sequence, the empty sequence is returned.
If $arg is a document node, $arg is returned.
The behavior of the zero argument version of the function is exactly the same as if the context item had been passed in $arg.
$arg
The input node
Returns the root node of the tree to which $arg belongs
root
root() node()
Returns the root of the tree to which the context item belongs.
Returns the root node of the tree to which the context node belongs
Return to list of all modules