<xsl:output> - XSLT: Extensible Stylesheet Language Transformations 编辑

XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes

The <xsl:output> element controls the characteristics of the output document. To function correctly in Netscape, this element, with the method attribute, must be used. As of 7.0, method="text" works as expected.

Syntax

<xsl:output
	method="xml" | "html" | "text"
	version=STRING
	encoding=STRING
	omit-xml-declaration="yes" | "no"
	standalone="yes" | "no"
	doctype-public=STRING
	doctype-system=STRING
	cdata-section-elements=LIST-OF-NAMES
	indent="yes" | "no"
	media-type=STRING  />

Required Attributes

None.

Optional Attributes

method
Specifies output format.
version
Specifies the value of the version attribute of the XML or HTML declaration in the output document. This attribute is only used when method="html" or method="xml".
encoding
Specifies the value of the encoding attribute in the output document.
omit-xml-declaration
Indicates whether or not to include an XML declaration in the output. Acceptable values are "yes" or "no".
standalone (Not supported.)
If present, indicates that a standalone declaration should occur in the output document and gives its value. Acceptable values are "yes" or "no".
doctype-public
Specifies the value of the PUBLIC attribute of the DOCTYPE declaration in the output document.
doctype-system
Specifies the value of the SYSTEM attribute of the DOCTYPE declaration in the output document.
cdata-section-elements
Lists elements whose text contents should be written as CDATA sections. Elements should be whitespace separated.
indent (Not supported.)
Specifies if the output should be indented to indicate its hierarchic structure.
media-type (Not supported.)
Specifies the output document MIME type.

Type

Top-level, must be the child <xsl:stylesheet> or <xsl:transform>.

Defined

XSLT, section 16.

Gecko support

Partial support. See comments above.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:91 次

字数:3542

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文