The <serialization> element

The serialization input element of the configuration file contains default serialization properties. These are used as defaults for serialization properties that are not present in an xsl:output declaration in an XSLT stylesheet. They currently have no effect on serialization of secondary result documents, or on serialization of XQuery results. The values are used only at stylesheet compile time. When a stylesheet is loaded from a Stylesheet Export File, the serialization properties of the run-time configuration have no effect.

Attribute

Applies to

Values

Effect

allow-duplicate-names

HE PE EE

yes|no

Used only for JSON output. Determines whether duplicate keys with the same string value are allowed in a JSON map; if not an error is raised.

byte-order-mark

HE PE EE

yes|no

Indicates whether serialized output should include a byte order mark.

cdata-section-elements

HE PE EE

A space-separated list of QNames

A list of element names whose content is to be serialized using CDATA sections.

doctype-public

HE PE EE

xs:string

The public identifier to be used in the DOCTYPE declaration.

doctype-system

HE PE EE

xs:anyURI

The system identifier (URI) to be used in the DOCTYPE declaration.

encoding

HE PE EE

xs:string

The output encoding, for example utf-8 or us-ascii.

escape-solidus

PE EE

yes|no

Used only for JSON output. Determines whether or not the solidus character ("/") is escaped with a backslash (as "\/").

escape-uri-attributes

HE PE EE

yes|no

Defines whether URI-valued attributes in HTML/XHTML (for example href) are to be %HH-encoded.

html-version

HE PE EE

xs:decimal

When the output method is HTML or XHTML, then if this attribute takes decimal value 5.0, then the output produced is HTML 5.0 or XHTML 5.0 respectively.

include-content-type

HE PE EE

yes|no

Defines whether a <meta> element should be added to the HTML <head> element to identify the media type of the output.

indent

HE PE EE

yes|no

Defines whether indentation is to be added to the output.

item-separator

HE PE EE

xs:string

Defines separator to be used between items in serialized output.

json-node-output-method

HE PE EE

xs:QName

Used only for JSON output. Defines the serialization method for nodes, for example 'xml' or 'html' or 'text'.

media-type

HE PE EE

xs:string

Defines the media type (MIME type) of the output.

method

HE PE EE

xs:QName

Defines the serialization method, for example 'xml' or 'html' or 'text'.

normalization-form

HE PE EE

xs:string

Defines whether Unicode normalization should be applied during serialization, and if so, which Unicode normalization form should be used.

omit-xml-declaration

HE PE EE

yes|no

Defines whether the XML declaration should be omitted from XML output.

standalone

HE PE EE

yes|no|omit

Defines whether the XML declaration in XML output should have a 'standalone' attribute.

suppress-indentation

HE PE EE

A space-separated list of QNames

Defines a list of element names whose content should not be indented even when indent='yes' is specified.

undeclare-prefixes

HE PE EE

yes|no

Defines whether namespaces present on a parent element but not on its children should be undeclared using XML Namespaces 1.1 syntax.

use-character-maps

HE PE EE

A space-separated list of QNames

Defines a list of the names of character maps which will be applied to transform individual characters during serialization.

version

HE PE EE

xs:string

Defines the version of XML or HTML to be used for the output.

additional attributes

PE EE

Various

Additional attributes in the Saxon namespace http://saxon.sf.net/ can also be supplied. For details of the available parameters see Additional serialization parameters.