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

base-uri

base-uri

The base-uri function in XQuery returns the base URI of the given node. The base URI is typically the URI against which relative URIs in the document should be resolved.

Syntax

fn:base-uri(arg)
The following table describes the argument for this command:
Argument
Required/Optional
Description
arg
Optional
The node for which to retrieve the base URI. If omitted or empty, the context item is used.

Return Value

  • Returns the base URI of the specified node as an
    xs:anyURI
    .
  • Returns an empty sequence if the base URI is not available.
  • Returns an error if no context item is available and no argument is provided.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:base-uri()
(when context item is a node with base URI)
"http://example.com/doc.xml"
fn:base-uri(/root)
"http://example.com/doc.xml"
fn:base-uri(())
()
fn:base-uri()
(with no context item)
Error

Additional information

  • If the input node has no base URI, the function returns an empty sequence.
  • The function can be called without arguments if a context node exists.
  • Useful for resolving relative references in XML documents.

0 COMMENTS

We’d like to hear from you!