saxon6:output

The saxon6:output element (in namespace xmlns:saxon="http://icl.com/saxon") is a synonym for xsl:result-document, provided to enable the popular DocBook 1.0 stylesheets to run using Saxon-PE/EE 9.9 and later.

Category: instruction
Content: sequence-constructor
Permitted parent elements: any XSLT element whose content model is sequence-constructor; any literal result element

Attributes

format?

{ eqname }

If present, it gives the name of an xsl:output element that describes the serialization format for this output document; if absent, the unnamed xsl:output declaration is used.

href?

{ uri }

The URI for the result document. If this is a relative URI, it is interpreted relative to the base output URI. The base output URI is the systemID of the result object supplied as the destination for the transformation, or if you are using the command line, the value of the -o flag. If the href attribute is omitted, the document is written to the location identified by the base output URI: this will only work if all the output produced by the stylesheet is within the scope of an xsl:result-document instruction.

If the base output URI is not known, and the supplied href is not absolute, then this results in a failure.

This base output URI must be a writable location. Usually it will therefore be a URI that uses the "file:" scheme. However, Saxon attempts to open a connection whatever URI scheme is used, and it should therefore work with any URI where the Java VM has the capability to open a writable connection. Users have reported success in using "ftp:" and "mailto:" URIs.

If the configuration property ALLOW_EXTERNAL_FUNCTIONS is set, then for security reasons use of the xsl:result-document instruction with the href attribute is disallowed.

validation?

"strict" | "lax" | "preserve" | "strip"

Requires Saxon-PE or Saxon-EE.

type?

eqname

Determines what happens to any type annotations on element or attribute nodes. Requires Saxon-PE or Saxon-EE.

method?

{ "xml" | "html" | "xhtml" | "text" | "json" | "adaptive" | eqname }

Serialization attribute, see Details for more information.

allow-duplicate-names?

{ boolean }

Serialization attribute, see Details for more information.

build-tree?

{ boolean }

Serialization attribute, see Details for more information.

byte-order-mark?

{ boolean }

Serialization attribute, see Details for more information.

cdata-section-elements?

{ eqnames }

Serialization attribute, see Details for more information.

doctype-public?

{ string }

Serialization attribute, see Details for more information.

doctype-system?

{ string }

Serialization attribute, see Details for more information.

encoding?

{ string }

Serialization attribute, see Details for more information.

escape-uri-attributes?

{ boolean }

Serialization attribute, see Details for more information.

html-version?

{ decimal }

Serialization attribute, see Details for more information.

include-content-type?

{ boolean }

Serialization attribute, see Details for more information.

indent?

{ boolean }

Serialization attribute, see Details for more information.

item-separator?

{ string }

Not available in XSLT.

json-node-output-method?

{ "xml" | "html" | "xhtml" | "text" | eqname }

Serialization attribute, see Details for more information.

media-type?

{ string }

Serialization attribute, see Details for more information.

normalization-form?

{ "NFC" | "NFD" | "NFKC" | "NFKD" | "fully-normalized" | "none" | nmtoken }

Serialization attribute, see Details for more information.

omit-xml-declaration?

{ boolean }

Serialization attribute, see Details for more information.

parameter-document?

{ uri }

New in XSLT 3.0. Not implemented in Saxon 9.7. Allows serialization to be configured in an external document.

standalone?

{ boolean | "omit" }

Serialization attribute, see Details for more information.

suppress-indentation?

{ eqnames }

Serialization attribute, see Details for more information.

undeclare-prefixes?

{ boolean }

Serialization attribute, see Details for more information.

use-character-maps?

eqnames

Serialization attribute, see Details for more information.

output-version?

{ nmtoken }

Overrides the version attribute specified on the output definition. Serialization attribute, see Details for more information.

saxon:asynchronous?

boolean

The default for Saxon-EE is yes, which causes the instruction to be evaluated in a separate thread, if there is a spare thread available (the maximum number of threads used is configurable using the property RESULT_DOCUMENT_THREADS). Use no to suppress multi-threading. Asynchronous processing of xsl:result-document is automatically suppressed if tracing (using a TraceListener) is enabled. For details see saxon:asynchronous and notes below.

Details

The instruction is a synonym for xsl:result-document. Historically, support for multiple output documents was first introduced as a Saxon extension to XSLT 1.0 in the form of the saxon:output instruction. Other vendors followed suit, and the idea was eventually standardized in XSLT 2.0 under the name xsl:result-document. The DocBook 1.0 stylesheets, however, remain in widespread use, and include calls on saxon:output. It is often difficult for users to move forwards because they have written their own DocBook customization layers; as a result, many users have been locked into Saxon 6.5.5 which is now obsolete and no longer maintained.

Saxon 9.9 reintroduces saxon6:output (in the original Saxon 6.5.5 namespace, which differs from the usual Saxon namespace, so here we use a different prefix) so that the DocBook 1.0 stylesheets can now be executed with a modern Saxon release. Note that the specification is not identical with the Saxon 6.5.5 original, but it serves the purpose in supporting DocBook. The main difference is that in Saxon 6.5.5, the attribute saxon:output/@href was interpreted as a filename (not a URI) relative to the current working directory.

See also

xsl:result-document