XQuery Function Documentation

Search and Browse

http://exist-db.org/xquery/contentextraction

java:org.exist.contentextraction.xquery.ContentExtractionModule

Module for processing content and returning metadata and content

contentextraction:get-metadata

contentextraction:get-metadata($binary as xs:base64Binary) as document-node()

extracts the metadata

Parameters:
$binary The binary data to extract from
Returns:
document-node() : Extracted metadata

contentextraction:get-metadata-and-content

contentextraction:get-metadata-and-content($binary as xs:base64Binary) as document-node()

extracts the metadata and contents

Parameters:
$binary The binary data to extract from
Returns:
document-node() : Extracted content and metadata

contentextraction:stream-content

contentextraction:stream-content($binary as xs:base64Binary, $paths as xs:string*, $callback as function(*), $namespaces as element()?, $userData as item()*) as empty-sequence()

extracts the metadata

Parameters:
$binary The binary data to extract from
$paths* A sequence of (simple) node paths which should be passed to the callback function
$callback The callback function. Expected signature: callback($node as node(), $userData as item()*, $retValue as item()*),where $node is the currently processed node, $userData contains the data supplied in the $userData parameter of stream-content, and $retValue is the return value of the previous call to the callback function. The last two parameters are used for passing information between the calling function and subsequent invocations of the callback function.
$namespaces? Prefix/namespace mappings to be used for matching the paths. Pass an XML fragment with the following structure: <namespaces><namespace prefix="prefix" uri="uri"/></namespaces>.
$userData* Additional data which will be passed to the callback function.
Returns:
empty-sequence() : Returns empty sequence