XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations 编辑
There are two types of elements discussed here: top-level elements and instructions. A top-level element must appear as the child of either <xsl:stylesheet>
or <xsl:transform>
. An instruction, on the other hand, is associated with a template. A stylesheet may include several templates. A third type of element, not discussed here, is the literal result element (LRE). An LRE also appears in a template. It consists of any non-instruction element that should be copied as-is to the result document, for example, an <hr>
element in an HTML conversion stylesheet.
On a related note, any attribute in an LRE and some attributes of a limited number of XSLT elements can also include what is known as an attribute value template. An attribute value template is a string that includes an embedded XPath expression which is used to specify the value of an attribute. At run-time the expression is evaluated and the result of the evaluation is substituted for the XPath expression. For example, assume that a variable "image-dir
" is defined as follows:
<xsl:variable name="image-dir">/images</xsl:variable>
The expression to be evaluated is placed inside curly brackets:
<img src="{$image-dir}/mygraphic.jpg"/>
This would result in the following:
<img src="/images/mygraphic.jpg"/>
The element annotations that follow include a description, a syntax listing, a list of required and optional attributes, a description of type and position, its source in the W3C Recommendation and an explanation of the degree of present Gecko support.
Use the {{ListSubpages}} macro once the BCD for<xsl:fallback>
, <xsl:import>
, <xsl:namespace-alias>
, <xsl:number>
, <xsl:output>
, <xsl:stylesheet>
, <xsl:text>
and <xsl:value-of>
is fully migrated.- <xsl:apply-imports>
- <xsl:apply-templates>
- <xsl:attribute-set>
- <xsl:attribute>
- <xsl:call-template>
- <xsl:choose>
- <xsl:comment>
- <xsl:copy-of>
- <xsl:copy>
- <xsl:decimal-format>
- <xsl:element>
- <xsl:fallback>
- <xsl:for-each>
- <xsl:if>
- <xsl:import>
- <xsl:include>
- <xsl:key>
- <xsl:message>
- <xsl:namespace-alias>
- <xsl:number>
- <xsl:otherwise>
- <xsl:output>
- <xsl:param>
- <xsl:preserve-space>
- <xsl:processing-instruction>
- <xsl:sort>
- <xsl:strip-space>
- <xsl:stylesheet>
- <xsl:template>
- <xsl:text>
- <xsl:transform>
- <xsl:value-of>
- <xsl:variable>
- <xsl:when>
- <xsl:with-param>
<xsl:apply-imports>
<xsl:apply-templates>
<xsl:attribute>
<xsl:attribute-set>
<xsl:call-template>
<xsl:choose>
<xsl:comment>
<xsl:copy>
<xsl:copy-of>
<xsl:decimal-format>
<xsl:element>
<xsl:fallback>
(not supported)<xsl:for-each>
<xsl:if>
<xsl:import>
(mostly supported)<xsl:include>
<xsl:key>
<xsl:message>
<xsl:namespace-alias>
(not supported)<xsl:number>
(partially supported)<xsl:otherwise>
<xsl:output>
(partially supported)<xsl:param>
<xsl:preserve-space>
<xsl:processing-instruction>
<xsl:sort>
<xsl:strip-space>
<xsl:stylesheet>
(partially supported)<xsl:template>
<xsl:text>
(partially supported)<xsl:transform>
<xsl:value-of>
(partially supported)<xsl:variable>
<xsl:when>
<xsl:with-param>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论