The <xsl:document> Element: Generating Multiple Output Documents

The XSLT 1.1 working draft introduced a new element, <xsl:document>, to support multiple output documents, and it’s likely this element will be added to XSLT 2.0. It has the following attributes:

  • href(mandatory). Indicates where the new document should be placed. Set to an absolute or relative URI, without a fragment identifier.

  • method(optional). Sets the output method used to create the result document. Set to “xml”, “html”, “text”, or a QName that is not an NCName.

  • version(optional). Sets the version of the output document. Set to an NMTOKEN.

  • encoding(optional). Sets the encoding of the output document. Set to a string.

  • omit-xml-declaration(optional). Set to “yes” or “no” to omit ...

Get Inside XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.