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

Module Description
Before using any of the functions below please remember to import the module namespace:
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.

Author:

Matthias Brantner

XQuery version and encoding for this module:

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

Zorba version for this module:

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

Module Resources
Namespaces
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
Function Summary
Streamable content ( $uri as xs:string ) as xs:string
Tries to fetch the resource referred to by the given URI.
Streamable content ( $uri as xs:string, $entity-kind as xs:string ) as xs:string
Tries to fetch the resource referred to by the given URI.
Streamable External 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.
Streamable 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.
Streamable External 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.
Functions
Streamable content back to 'Function Summary'
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.

Parameters:
Returns:
Errors:
See:

Streamable content back to 'Function Summary'
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.

Parameters:
Returns:
Errors:
See:

Streamable External content back to 'Function Summary'
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.

Parameters:
Returns:
Errors:
See:

Streamable content-binary back to 'Function Summary'
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.

Parameters:
Returns:
Errors:

Streamable External content-binary back to 'Function Summary'
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.

Parameters:
Returns:
Errors:

blog comments powered by Disqus