- 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
- error
http://www.zorba-xquery.com/modules/string
import module namespace string = "http://www.zorba-xquery.com/modules/string";
This module provides string related functions.
Matthias Brantner
xquery version "1.0" encoding "utf-8";
- the XQuery module can be found here.
string | http://www.zorba-xquery.com/modules/string |
ver | http://www.zorba-xquery.com/options/versioning |
![]() |
is-streamable
(
$s as xs:string
) as xs:boolean external This function checks whether a given string item is implemented by a streamable string. |
![]() |
materialize
(
$s as xs:string
) as xs:string external This function materializes a streamable string. |
declare function string:is-streamable (
$s as xs:string
) as xs:boolean external
This function checks whether a given string item is implemented by a streamable string. A streamable string is produced by some functions of a module (e.g. file:read-text()). It's an optimized implementation of an xs:string to handle arbitrary sized data. The drawback is that its value can only be consumed once. That is, only one function can access the value of a streamable string item.
- $s the string to check
- true if the given item is implemented using a streamable string or false otherwise.
declare function string:materialize (
$s as xs:string
) as xs:string external
This function materializes a streamable string. The drawback of a streamable string is that its value can only be consumed once. That is, only one function can access the value of a streamable string item. In order to remedy this situation, this function can be used to convert a streamable string into its non-streamable counterpart. As a result, the string returned by this function has the same value as its input but is materialized and, hence, can be consumed multiple times.
- $s the streamable string item to materialize
- a materialized string of its input or the input if the input item was not a streamable string.