<xsl:template> - XSLT: Extensible Stylesheet Language Transformations 编辑
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes
The <xsl:template>
element defines an output producing template. This element must have either the match attribute or the name attribute set.
Syntax
<xsl:template match=PATTERN name=NAME mode=NAME priority=NUMBER> <xsl:param> [optional] TEMPLATE </xsl:template>
Required Attributes
None.
Optional Attributes
match
- Specifies a pattern that determines the elements for which this template should be used. It is a required attribute if there is no
name
attribute.
name
- Specifies a name for this template, by which it can be invoked through the
<xsl:call-template>
element.
mode
- Specifies a particular mode for this template, which can be matched by an attribute of the
<xsl:apply-templates>
element. This is useful for processing the same information in multiple ways.
priority
- Specifies a numeric priority for this template. This can be any number other than
Infinity
. The processor uses this number when more than one template matches the same node.
Type
Top-level, must be the child of <xsl:stylesheet>
or <xsl:transform>
.
Defined
XSLT, section 5.3.
Gecko support
Supported.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论