Database Reference
In-Depth Information
The
xhtml
method makes sure that only the short form is used for elements that
are declared empty in the XHTML specification. For instance, a
br
element is
always returned as
<br/>
. In addition, if you omit the XHTML namespace from
your XML, you can have the XHTML serializer inject it for you by setting the
serialization option
enforce-xhtml=yes
.
If you specify the
text
method, only the atomized content of elements is
returned: for example,
<foo>this is content</foo>
will return
this is con
tent
. Namespaces, attributes, processing instructions, and comments are
ignored.
For JSON and JSONP serialization options, see
“JSON serialization” on page 121
.
media-type=...
Indicates the Internet media type of the output. This is used to set the HTTP
Content-Type
header if the query is running in an HTTP context.
encoding=...
Specifies the character encoding used for serialization. The default is the encod‐
ing set in the XQuery declaration at the top of the program. If that is not set, the
default is
UTF-8
.
indent=yes|no
Indicates whether the output should be indented.
omit-xml-declaration=yes|no
Specifies whether the XML declaration (
<?xml version="1.0"?>
) at the top of
the output should be omitted.
doctype-public=... doctype-system=...
When at least one of these is present, a
doctype
declaration is included at the top
of the output.
enforce-xhtml=yes|no
Forces
all
output to be in the XHTML (
http://www.w3.org/1999/xhtml
)
namespace.
Post-processing serialization options
eXist can do post-processing of the XQuery result by processing
xi:include
ele‐
ments and
<?xml-stylesheet?>
processing instructions referencing XSLT style‐
sheets. You can control this with the following options:
expand-xincludes=yes|no
Indicates whether the serializer should process any
xi:include
elements (see
“XInclude” on page 243
). The default is
yes
.
Search WWH ::
Custom Search