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

iri-to-uri

iri-to-uri

The iri-to-uri function in XQuery converts an Internationalized Resource Identifier (IRI) to a Uniform Resource Identifier (URI) by escaping characters that are not allowed in URIs according to RFC 3986. This process includes percent-encoding characters outside the ASCII range and certain reserved characters.

Syntax

fn:iri-to-uri(iri)
The following table describes the argument for this command:
Argument
Required/Optional
Description
iri
Required
The IRI string to be converted to a URI.

Return Value

  • Returns a string representing the corresponding URI after encoding the IRI.
  • Converts Unicode and other characters as needed into percent-encoded sequences.
  • Always returns an
    xs:string
    .

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:iri-to-uri("http://example.com/ümlaut")
"http://example.com/%C3%BCmlaut"
fn:iri-to-uri("https://example.com/space here")
"https://example.com/space%20here"
fn:iri-to-uri("foo://bar.com/παράδειγμα")
"foo://bar.com/%CF%80%CE%B1%CF%81%CE%AC%CE%B4%CE%B5%CE%B9%CE%B3%CE%BC%CE%B1"

Additional information

  • Primarily used to make IRIs safe for use where URIs are required.
  • Escapes characters outside the ASCII range and reserved characters as per URI syntax rules.
  • Does not take empty or non-string inputs.

0 COMMENTS

We’d like to hear from you!