Loading TOC...

xdmp.quote

xdmp.quote(
   $arg as ValueIterator,
   [$options as Object?]
) as String

Summary

Returns the unevaluated serialized representation of the input parameter as a string.

Parameters
$arg Input to be quoted.
$options The options node for this quote operation. The default value is null.

The xdmp.quote options include:

outputEncoding

Specifies the encoding to use for this quote operation. This is only used to escape characters that cannot be represented.

outputSgmlCharacterEntities

Specifies if character entities should be output upon serialization of the XML. Valid values are normal, none, math, and pub. By default (that is, if this option is not specified), no SGML entities are serialized on output, unless the App Server is configured to output SGML character entities.

method

Valid values are xml, html, xhtml, and text. This is like the corresponding part of the XSLT xsl:output instruction. and the MarkLogic XQuery xdmp:output prolog statement.

cdataSectionElements

A single QName or array of QNames to output as CDATA sections. This is like the corresponding part of both the XSLT xsl:output instruction and the MarkLogic XQuery xdmp:output prolog statement.

encoding

The encoding. This is like the corresponding part of the XSLT xsl:output instruction.

useCharacterMaps

One or more of the following values, as a string or an array of strings. Valid values are xdmp:sgml-entities-normal, xdmp:sgml-entities-math, and xdmp:sgml-entities-pub. This is like the corresponding part of the XSLT xsl:output instruction and the MarkLogic XQuery prolog statement.

mediaType

A mimetype representing a media type. For example, text/plain or application/xml (or other valid mimetypes). This is like the corresponding part of the XSLT xsl:output instruction and the MarkLogic XQuery xdmp:output prolog statement.

byteOrderMark

Valid values are yes or no. This is like the corresponding part of the XSLT xsl:output instruction.

indent

Specifies if typed XML (that is, XML for which there is an in-scope schema) should be pretty-printed (indented). Valid values are yes or no. This is like the corresponding part of the XSLT xsl:output instruction.

indentUntyped

Specifies if untyped XML (that is, XML for which there is no in-scope schema) should be pretty-printed (indented). Valid values are yes or no. This is like the corresponding part of the XSLT xsl:output instruction.

indentTabs

Specifies if tab characters should be used instead of 8 consecutive spaces when indenting. Valid values are yes or no.

includeContentType

Include the content-type declaration when serializing the node. Valid values are yes or no.

escapeUriAttributes

Valid values are yes or no. This is like the corresponding part of the XSLT xsl:output instruction.

doctypePublic

A public identifier, which is the public identifier to use on the emitted DOCTYPE. This is like the corresponding part of the XSLT xsl:output instruction.

doctypeSystem

A system identifier, which is the system identifier to use on the emitted DOCTYPE. This is like the corresponding part of the XSLT xsl:output instruction.

omitXmlDeclaration

Valid values are yes or no. This is like the corresponding part of the XSLT xsl:output instruction.

standalone

Valid values are yes or no. This is like the corresponding part of the XSLT xsl:output instruction.

normalizationForm

Valid values are NFC, NFD, and NFKD. This is like the corresponding part of the XSLT xsl:output instruction.

defaultAttributes

Specifies whether attributes defaulted with a schema should be included in the serialization. Valid values are yes or no. This is like the corresponding part of the XSLT xsl:output instruction.

Example

var arg = fn.head(xdmp.unquote("<a>aaa</a>")).root;
var res = [];
res.push(arg);
res.push(xdmp.quote(arg));
res;

=> ["<a>aaa</a>", "<a>aaa</a>"]

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy