Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

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

collection

collection

The collection function in XQuery returns a sequence of nodes from a collection identified by a URI. It is used to access sets of XML documents or items stored in a collection, typically in an XQuery or XML database environment.

Syntax

fn:collection(arg)
The following table describes the argument for this command:
Argument
Required/Optional
Description
arg
Optional
The URI identifying the collection to retrieve. If omitted or empty, the default collection for the static context is returned.

Return Value

  • Returns a sequence of nodes/items from the specified collection.
  • Returns an empty sequence if the collection is empty or the URI does not identify any collection.
  • Returns the default collection if no argument is provided.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:collection("http://example.com/myCollection")
Sequence of nodes from the collection
fn:collection()
Sequence of nodes from default collection
fn:collection("")
Empty sequence
fn:collection("nonexistent")
Empty sequence

Additional information

  • The exact behavior depends on the XQuery processor and environment. For example, XML database.
  • The collection URI is often implementation-specific.
  • Useful for querying multiple XML documents as a single data source.

0 COMMENTS

We’d like to hear from you!