- All Modules
- All Functions
-
www.w3.org
- 2005
- XDM
- store
- introspection
- reflection
- external
-
xqdoc
-
project_xqdoc
-
xqdoc
(E)
- xqdoc2xhtml
-
project_xqdoc
- data processing
- expath.org
- www.functx.com
- debugger
- error
- www.zorba-xquery.com
http://www.zorba-xquery.com/modules/uri
import module namespace uri = "http://www.zorba-xquery.com/modules/uri";
This module provides string related functions.
Matthias Brantner
xquery version "1.0" encoding "utf-8";
The latest version of this module is 1.0. For more information about module versioning in Zorba please check out this resource.
- the XQuery module can be found here.
uri | http://www.zorba-xquery.com/modules/uri |
ver | http://www.zorba-xquery.com/options/versioning |
zerr | http://www.zorba-xquery.com/errors |
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. |
|
![]() |
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. |
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.
- $s the string to decode
- the percent decoded string
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.
- $s the string to decode
- $decode-plus whether '+' chars will be replaced with spaces
- the percent decoded string
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.
- $s the string to decode
- $decode-plus whether '+' chars will be replaced with spaces
- $charset the source charset of the string after percent decoding
- the percent decoded string
- zerr:ZXQP0006 if the given charset is unknown or not supported
- zerr:ZOSE0006 if there is an error transcoding the string