http://www.zorba-xquery.com/modules/uri ZC

Module Description
Before using any of the functions below please remember to import the module namespace:
import module namespace uri = "http://www.zorba-xquery.com/modules/uri";

This module provides string related functions.

Author:

Matthias Brantner

XQuery version and encoding for this module:

xquery version "1.0" encoding "utf-8";

Zorba version for this module:

The latest version of this module is 1.0. For more information about module versioning in Zorba please check out this resource.

Module Resources
Namespaces
uri http://www.zorba-xquery.com/modules/uri
ver http://www.zorba-xquery.com/options/versioning
zerr http://www.zorba-xquery.com/errors
Function Summary
decode ( $u as xs:string ) as xs:string
Percent-decodes (aka URL decoding) the given string.
decode ( $u as xs:string, $decode-plus as xs:boolean ) as xs:string
Percent-decodes (aka URL decoding) the given string.
External decode ( $s as xs:string, $decode-plus as xs:boolean, $charset as xs:string ) as xs:string external
Percent-decodes (aka URL decoding) the given string.
Functions
decode back to 'Function Summary'
declare function uri:decode (
            $u as xs:string 
 ) as xs:string

Percent-decodes (aka URL decoding) the given string. All percent encoded octets will be translated into their decoded UTF-8 representation. Please note that the percent encoding guarantees that a string consists of ASCII characters only. Passing a string that contains non-ASCII characters results in undefined behavior.

Parameters:
Returns:

decode back to 'Function Summary'
declare function uri:decode (
            $u as xs:string, 
            $decode-plus as xs:boolean 
 ) as xs:string

Percent-decodes (aka URL decoding) the given string. All percent encoded octets will be translated into their decoded UTF-8 representation. If $decode-plus is specified all occurrences of the char '+' will be replaced with a space ' ' before the percent decoding happens. Please note that the percent encoding guarantees that a string consists of ASCII characters only. Passing a string that contains non-ASCII characters results in undefined behavior.

Parameters:
Returns:

External decode back to 'Function Summary'
declare function uri:decode (
            $s as xs:string, 
            $decode-plus as xs:boolean, 
            $charset as xs:string 
 ) as xs:string external

Percent-decodes (aka URL decoding) the given string. All percent encoded octets will be translated into their decoded UTF-8 representation. If $decode-plus is specified all occurrences of the char '+' will be replaced with a space ' ' before the percent decoding happens. The $charset parameter specifies the source charset after precent decoding. It is used to convert the decoded string into UTF-8. Please note that the percent encoding guarantees that a string consists of ASCII characters only. Passing a string that contains non-ASCII characters results in undefined behavior.

Parameters:
Returns:
Errors:

blog comments powered by Disqus