# Additional serialization parameters

These extensions are not recognized in Saxon-HE

Saxon provides a number of additional serialization parameters, and several additional serialization methods: these have names in the Saxon namespace. These can be specified as attributes on the `xsl:output` and `xsl:result-document` elements (XSLT-only), in the Query prolog (XQuery only), or as extra parameters on the Query or Transform command line. They can also be specified in the query or transformation API.

For example, to request an indentation depth of one column, specify `!{http://saxon.sf.net/}indent-spaces=1` on the command line.

In XQuery, Saxon allows both standard serialization options and Saxon-specific serialization parameters to be specified by means of a `saxon:output` option declaration in the query prolog. For example:

                declare namespace saxon="http://saxon.sf.net/";
    declare option saxon:output "indent=yes";
    declare option saxon:output "saxon:indent-spaces=3";

The standard serialization parameters described in The W3C Serialization specification are all available, namely:

- byte-order-mark

- cdata-section-elements

- doctype-public

- doctype-system

- encoding

- escape-uri-attributes

- include-content-type

- indent

- media-type

- method

- normalization-form

- omit-xml-declaration

- standalone

- undeclare-prefixes

- use-character-maps (only useful in XSLT)

- version

Saxon interprets a zero-length value for `doctype-system` or `doctype-public` as meaning "absent". This is equivalent to omitting the value, except that in some interfaces it will override a value previously set within the query or stylesheet.

The Saxon-supplied serialization parameters are described on the following pages.

- The method attribute

- The saxon:base64Binary serialization method

- The saxon:hexBinary serialization method

- The saxon:ptree serialization method

- The saxon:character-representation attribute

- The saxon:double-space attribute

- The saxon:indent-spaces attribute

- The saxon:line-length attribute

- The saxon:next-in-chain attribute

- The saxon:recognize-binary attribute

- The saxon:require-well-formed attribute

- The saxon:supply-source-locator attribute

- The saxon:suppress-indentation attribute

- The saxon:xquery serialization method

- User-defined serialization attributes

Next