大网数据广告活动
Web 标准与前端开发

<xsl:stylesheet>

· 52CE 我爱测

The `<xsl:stylesheet>` element (or the equivalent `<xsl:transform>` element) is the outermost element of a stylesheet.

The <xsl:stylesheet> element (or the equivalent <xsl:transform> element) is the outermost element of a stylesheet.

Namespace Declaration

A pseudo-attribute required to identify the document as an XSLT stylesheet. Typically this is xmlns:xsl="http://www.w3.org/1999/XSL/Transform".

Syntax

<xsl:stylesheet
  version="NUMBER"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  id="NAME"
  extension-element-prefixes="LIST-OF-NAMES"
  exclude-result-prefixes="LIST-OF-NAMES">
    ENTIRE STYLESHEET
</xsl:stylesheet>

Required Attributes

  • version
    • : Specifies the version of XSLT required by this stylesheet.

Optional Attributes

  • exclude-result-prefixes
    • : Specifies any namespace used in this document that should not be sent to the output document. The list is whitespace separated.
  • extension-element-prefixes
    • : Specifies a space-separated list of any namespace prefixes for extension elements in this document.
  • default-collation
    • : Specifies the default collation used by all XPath expressions appearing in attributes or text value templates that have the element as an ancestor, unless overridden by another default-collation attribute on an inner element. It also determines the collation used by certain XSLT constructs (such as <xsl:key> and <xsl:for-each-group>) within its scope.
  • default-mode
  • default-validation
    • : Defines the default value of the validation attribute of all relevant instructions appearing within its scope.
  • expand-text
    • : Determines whether descendant text nodes of the element are treated as text value templates.
  • id
    • : Specifies an id for this stylesheet. This is most often used when the stylesheet is embedded in another XML document.
  • input-type-annotations
    • : Specifies whether type annotations are stripped from the element so the same results are produced whether the source documents have been validated against a schema or not.
  • use-when
    • : Determines whether the element and all the nodes that have it as ancestor are excluded from the stylesheet.
  • xpath-default-namespace
    • : Specifies the namespace that will be used if the element name is unprefixed or an unprefixed type name within an XPath expression.

Type

Required outermost element of stylesheet.

Specifications

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。