XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (227 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
5.43Mb size Format: txt, pdf, ePub

xsl:result-document

The

instruction is used to create a new result tree, and optionally to specify how the result tree should be serialized. The facility allows a transformation to produce multiple result documents, so you can write a stylesheet that splits a large XML file into smaller XML files, or into multiple HTML files, perhaps connected to each other by hyperlinks.

Changes in 2.0

This instruction is new in XSLT 2.0. Many XSLT 1.0 processors provided a similar capability as a proprietary extension, but there are likely to be differences in the detail. The abandoned working draft of XSLT 1.1 used the name

for a similar instruction, and it was implemented under this name in some products.

Format

  format? = { 
qname
 }

  href? = { 
uri-reference
 }

  validation? = “strict” | “lax” | “preserve” | “strip”

  type? = qname

  method? = { “xml” | “html” | “xhtml” | “text” | qname-but-not-ncname }

  byte-order-mark? = { “yes” | “no” }

  cdata-section-elements? = { qnames }

  doctype-public? = { string }

  doctype-system? = { string }

  encoding? = { string }

  escape-uri-attributes? = { “yes” | “no” }

  include-content-type? = { “yes” | “no” }

  indent? = { “yes” | “no” }

  media-type? = { string }

  normalization-form? = {“NFC”|“NFD”|“NFKC”|“NFKD”|“fully-normalized”|nmtoken}

  omit-xml-declaration? = { “yes” | “no” }

  standalone? = { “yes” | “no” | “omit” }

  undeclare-prefixes? = { “yes” | “no” }

  use-character-maps? = qnames

  output-version? = { nmtoken }

>

  


Position


is an instruction, which means it may occur anywhere in a sequence constructor.

Attributes

Name
Value
Meaning
format
optional
Attribute value template returning a lexical QName
Defines the required output format.
href
optional
Attribute value template returning a relative or absolute URI
Defines the location where the output document will be written after serialization.
validation
optional
strict
,
lax
,
preserve
, or
strip
Defines the validation to be applied to the result tree.
type
optional
Lexical QName
Defines the schema type against which the document element should be validated.
method
optional
Attribute value template returning
xml
,
html
,
xhtml
,
text
, or a prefixed lexical QName
Defines the serialization method to be used.

Other books

Dirty by HJ Bellus
Touching Smoke by Phoenix, Airicka
Give Me Strength by McCarthy, Kate
Taming Texanna by Alyssa Bailey
The Last Plague by Rich Hawkins
Illusionarium by Heather Dixon
Colony One by E. M. Peters