MarkLogic Server 11.0 Product Documentation
fn:unparsed-text-availablefn:unparsed-text-available(
$href as xs:string,
[$encoding as xs:string]
) as xs:boolean
Summary
Returns true if a call to unparsed-text would succeed with identical
arguments.
Parameters |
href |
The $href is a string containing a URI reference. It must identify a resource
that can be read as text. If the URI is a relative URI then it is resolved
relative to the base URI from the static context.
|
encoding |
If $encoding parameter is present and the URI points to a "text" file, the
encoding is ignored since all the files are in UTF-8 in the database. However,
if the URI points to a binary file, then an attempt will be made to convert
it to the specified encoding and if the conversion succeeds it returns true.
If the conversion fails, an exception is returned. The $encoding parameter
must be passed when the URI resolves to a binary resource.
|
Example
fn:unparsed-text-available("http://marklogic.com/test.xml","UTF-8");
=> true if the document is available as unparsed text
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.