Name

xsl:stylesheet

Synopsis

<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  id = "ID"
  extension-element-prefixes = "prefix1 prefix2..."
  exclude-result-prefixes = "prefix1 prefix2..."
  version = "1.0">
  <! --  (xsl:import*, top-level-elements)  -- >
</xsl:stylesheet>

The xsl:stylesheet element is the root element for XSLT documents.

Attributes

xmlns:xsl, technically optional but de facto required

A standard namespace declaration that maps the prefix xsl to the namespace URI http://www.w3.org/1999/XSL/Transform. The prefix can be changed if necessary.

id, optional

Any XML name that’s unique within this document’s ID type attributes.

extension-element-prefixes, optional

A whitespace-separated list of namespace prefixes used by this document’s extension elements.

exclude-result-prefixes, optional

A whitespace-separated list of namespace prefixes whose declarations should not be copied into the output document.

version, required

Currently, always the value 1.0. However, XSLT 2.0 may be released in the lifetime of this edition with a concurrent updating of this number.

Contents

Any xsl:import elements, followed by any other top-level elements in any order.

Get XML in a Nutshell, 3rd Edition 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.