Serialization parameters
Saxon provides a number of additional serialization parameters, with 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), as parameters in the fn:serialize() function, or as extra parameters on the Query or Transform command line. They can also be specified in the query or transformation API.
|
|
Available with the XML, HTML, and XHTML output methods, to control the order in which attributes appear within an element start tag (in the absence of the property the order of attributes is unpredictable). Attributes whose names are listed in this property appear first, in the order they are listed; other attributes follow, sorted first by namespace URI and then by local-name. |
|
|
Allows greater control over how non-ASCII characters will be represented on output. When the output method is XML, two values are supported: When the output method is HTML, the value may hold two strings, separated by a
semicolon. The first string defines how non-ASCII characters within the
character encoding will be represented, the values being |
|
|
When the output method is XML with |
|
|
When the output method is XML, HTML, or XHTML with |
|
|
Default value 80. With the XML output method, attributes are output on a new line if they would otherwise extend beyond this column position. With the HTML output method, text lines are split at this line length when possible. In releases 9.2 and earlier, the HTML output method attempted to split lines that exceeded 120 characters in length. |
|
|
Default value x10. Defines the string that is used by the text output method to represent a newline. The Windows line ending x0Cx0A (CRLF) may sometimes be preferred to the default of a single newline character. |
|
|
XSLT only. Used to direct the output to another stylesheet. The value is the URL
of a stylesheet that should be used to process the output stream. In this case
the output stream must always be pure XML, and attributes that control the
format of the output (e.g. This serialization property is available only on xsl:output declarations. It cannot be supplied as an attribute to xsl:result-document or in any of the various APIs that control serialization. Supplying a zero-length string is equivalent to omitting the attribute, except that it can be used to override a previous setting. |
|
|
Relevant only when using the text output method. If set to This enables non-XML characters, notably binary zero, to be output. For example, given
outputs the Unicode character with codepoint zero ("NUL"), while
outputs the value of the |
|
|
Affects the handling of result documents that contain multiple top-level elements or top-level text nodes. The W3C specifications allow such a result document, even though it is not a well-formed XML document. It is, however, a well-formed external general parsed entity, which means it can be incorporated into a well-formed XML document by means of an entity reference. The default is Note also that namespace undeclarations of the form |
|
|
Relevant only when output is sent to a user-written For this to work, the code must be compiled with tracing enabled. This can be
achieved by setting the option |
|
|
When the output method is XML with |