O'Reilly logo

XSLT, 2nd Edition by Doug Tidwell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

[2.0] <xsl:result-document>

Creates a final result tree. Typically a result tree is written to a file, although an XSLT 2.0 processor is not required to be able to do so. The <xsl:result-document> instruction is useful for generating multiple files from a single stylesheet. It also makes it possible to generate the name of the output file at runtime.

Category

Instruction.

Required Attributes

None.

Optional Attributes

format

Refers to an output specification defined on a named <xsl:output> element. You can define properties such as an output method or a character encoding, then reuse those output specifications by referencing the name attribute of the appropriate <xsl:output> element.

href

Defines the URI of this result document. Typically this is used to define a filename for the result document, although an XSLT processor is free to use this URI any way it chooses.

[2.0 – Schema] type

Defines the datatype of the document element. The datatype can be any of the built-in datatypes, or it can be a datatype defined in a schema if you have a schema-aware XSLT 2.0 processor.

The type and validation attributes are mutually exclusive.

[2.0 – Schema] validation

Defines how the new document element will be validated. The validation attribute has four values: strict, lax, preserve, or strip.

validation="strict" means that the XSLT processor looks in all the declared schemas for an element declaration (<xs:element>) with the same name as the document element. It is a fatal error if the processor can’t ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required