Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

root

root

Returns the root of the tree that contains the argument.

Syntax

fn:root(
arg
)
The following table describes the argument:
Argument
Required/
Optional
Description
arg
Required
The node whose root node will be returned.

Return Value

The
fn:root
function returns a document node if the
$arg
node is part of a document. However, it returns an element if the
$arg
node is not part of a document.
If
$arg
is the empty sequence, the empty sequence is returned.
If the function is called without an argument, the context item is used as the default argument. If the context item is undefined or is not a node, an error occurs.

Example

Assume that you have the following variable definition:
let $in-xml := <a><x>123</x></a>
The expression
root($in-xml/x)
returns the following result:
<a> <x>123</x> </a>

0 COMMENTS

We’d like to hear from you!