- All Modules
- All Functions
-
www.w3.org
- 2005
- XDM
- store
- introspection
- reflection
- external
-
xqdoc
-
xqdoc
(E)
-
project_xqdoc
- xqdoc2xhtml
-
xqdoc
(E)
- data processing
- expath.org
- www.functx.com
- debugger
- error
- jsoniq.org
- www.zorba-xquery.com
http://www.zorba-xquery.com/modules/fetch
import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch";
This module provides functions to fetch the content of a resource identified by a URI. For example, it fetches the content of file or http resources.
In order to retrieve such content, the functions use the URI resolution and URL resolver process as documented at URI Resolvers.
Matthias Brantner
xquery version "3.0" encoding "utf-8";
The latest version of this module is 2.0. For more information about module versioning in Zorba please check out this resource.
- the XQuery module can be found here.
an | http://www.zorba-xquery.com/annotations |
fetch | http://www.zorba-xquery.com/modules/fetch |
ver | http://www.zorba-xquery.com/options/versioning |
zerr | http://www.zorba-xquery.com/errors |
![]() |
content
(
$uri as xs:string
) as xs:string Tries to fetch the resource referred to by the given URI. |
![]() |
content
(
$uri as xs:string,
$entity-kind as xs:string
) as xs:string Tries to fetch the resource referred to by the given URI. |
![]() ![]() |
content
(
$uri as xs:string,
$entity-kind as xs:string,
$encoding as xs:string
) as xs:string Tries to fetch the resource referred to by the given URI. |
![]() |
content-binary
(
$uri as xs:string
) as xs:base64Binary Tries to fetch the resource referred to by the given URI and returning it as base64Binary. |
![]() ![]() |
content-binary
(
$uri as xs:string,
$entity-kind as xs:string
) as xs:base64Binary Tries to fetch the resource referred to by the given URI and returning it as base64Binary. |
declare function fetch:content ( $uri as xs:string ) as xs:string
Tries to fetch the resource referred to by the given URI.
It queries all URI mappers and resolvers with kind EntityData::SOME_CONTENT.
The content is assumed to be UTF-8 encoded.
- $uri the resource to fetch.
- the resource referred to by the given URI as streamble string.
- zerr:ZXQP0025 if the URI could not be resolved or did not resolve to a StreamResource.
declare function fetch:content ( $uri as xs:string, $entity-kind as xs:string ) as xs:string
Tries to fetch the resource referred to by the given URI.
It queries all URI mappers and resolvers with kind the specified entity kind.
The content is assumed to be UTF-8 encoded.
- $uri the resource to fetch.
- $entity-kind the kind of resource to fetch.
- the resource referred to by the given URI as streamble string.
- zerr:ZXQP0025 if the URI could not be resolved or did not resolve to a StreamResource.
declare function fetch:content ( $uri as xs:string, $entity-kind as xs:string, $encoding as xs:string ) as xs:string
Tries to fetch the resource referred to by the given URI.
It queries all URI mappers and resolvers with kind the specified entity kind.
- $uri the resource to fetch.
- $entity-kind the kind of resource to fetch.
- $encoding the encoding of the content
- the resource referred to by the given URI as streamble string.
- zerr:ZXQP0025 if the URI could not be resolved or did not resolve to a StreamResource.
- zerr:ZXQP0006 if the given encoding is invalid or not supported.
declare function fetch:content-binary ( $uri as xs:string ) as xs:base64Binary
Tries to fetch the resource referred to by the given URI and returning it as base64Binary.
It queries all URI mappers and resolvers with kind EntityData::SOME_CONTENT.
- $uri the resource to fetch.
- the resource referred to by the given URI as streamble base64Binary.
- zerr:ZXQP0025 if the URI could not be resolved or did not resolve to a StreamResource.
declare function fetch:content-binary ( $uri as xs:string, $entity-kind as xs:string ) as xs:base64Binary
Tries to fetch the resource referred to by the given URI and returning it as base64Binary.
It queries all URI mappers and resolvers with kind the specified entity kind.
- $uri the resource to fetch.
- $entity-kind the kind of resource to fetch.
- the resource referred to by the given URI as streamble base64Binary.
- zerr:ZXQP0025 if the URI could not be resolved or did not resolve to a StreamResource.