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

resolve-QName

resolve-QName

The resolve-QName function in XQuery takes a QName string and resolves it to an
xs:QName
value using the in-scope namespaces of a supplied element node. It essentially maps a QName in string form to an actual QName based on the element's namespace context.

Syntax

fn:resolve-QName(qname, element)
The following table describes the argument for this command:
Argument
Required/Optional
Description
qname
Required
A string representing the QName to be resolved, which might include a prefix. For example,
"ex:tag"
.
element
Required
The element node providing the namespace context for resolving prefixes in the QName string.

Return Value

  • Returns an
    xs:QName
    resolved by associating the prefix of the
    $qname
    with the namespace URI in scope on the
    $element
    .
  • If the prefix in
    $qname
    is not bound in the
    $element
    's scope, or if the local part is not a valid NCName, an error occurs.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:resolve-QName("ex:foo", <a xmlns:ex="http://example.com"/>)
QName("{http://example.com}foo")
fn:resolve-QName("bar", <a xmlns="http://default.com"/> )
QName("{http://default.com}bar")
fn:resolve-QName("ns:tag", <a/>)
Error

Additional information

  • The function is namespace-aware, resolving prefixes to URIs using the element's in-scope namespaces.
  • The input string must be a valid QName in lexical form, either unprefixed or prefixed correctly.
  • It is useful when you need to turn string names into QName values with the correct namespace bindings.

0 COMMENTS

We’d like to hear from you!