diff options
author | Florian Dieminger <me@fiji-flo.de> | 2021-02-11 18:29:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 18:29:51 +0100 |
commit | 2bc5610921312613f8623f7ed347aa576689b2b6 (patch) | |
tree | f17a7a00e232c97d1335ff3cb24dbcfafacfe141 /files/zh-cn/web/xslt/element/index.html | |
parent | 964decad361766e85d928a56f0ab80af0e75c172 (diff) | |
parent | fc56124ac4eda6b3f0349c8a16fa750f27b4c7d6 (diff) | |
download | translated-content-2bc5610921312613f8623f7ed347aa576689b2b6.tar.gz translated-content-2bc5610921312613f8623f7ed347aa576689b2b6.tar.bz2 translated-content-2bc5610921312613f8623f7ed347aa576689b2b6.zip |
Merge pull request #32 from fiji-flo/unslugging-zh-cn
Unslugging zh cn
Diffstat (limited to 'files/zh-cn/web/xslt/element/index.html')
-rw-r--r-- | files/zh-cn/web/xslt/element/index.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/files/zh-cn/web/xslt/element/index.html b/files/zh-cn/web/xslt/element/index.html new file mode 100644 index 0000000000..84959686d4 --- /dev/null +++ b/files/zh-cn/web/xslt/element/index.html @@ -0,0 +1,54 @@ +--- +title: Elements +slug: Web/XSLT/Element +tags: + - XSLT_Reference +translation_of: Web/XSLT/Element +original_slug: Web/XSLT/Elements +--- +<p>{{ XsltRef() }} There are two types of elements discussed here: top-level elements and instructions. A top-level element must appear as the child of either <code><xsl:stylesheet></code> or <code><xsl:transform></code>. 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 <code><hr></code> element in an HTML conversion stylesheet.</p> +<p>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 simply 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 "<code>image-dir</code>" is defined as follows:</p> +<pre><xsl:variable name="image-dir">/images</xsl:variable></pre> +<p>The expression to be evaluated is placed inside curly brackets:</p> +<pre><img src="{$image-dir}/mygraphic.jpg"/></pre> +<p>This would result in the following:</p> +<pre><img src="/images/mygraphic.jpg"/></pre> +<p>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.</p> +<ul> + <li><a href="/cn/XSLT/apply-imports" title="cn/XSLT/apply-imports">xsl:apply-imports</a></li> + <li><a href="/cn/XSLT/apply-templates" title="cn/XSLT/apply-templates">xsl:apply-templates</a></li> + <li><a href="/cn/XSLT/attribute" title="cn/XSLT/attribute">xsl:attribute</a></li> + <li><a href="/cn/XSLT/attribute-set" title="cn/XSLT/attribute-set">xsl:attribute-set</a></li> + <li><a href="/cn/XSLT/call-template" title="cn/XSLT/call-template">xsl:call-template</a></li> + <li><a href="/cn/XSLT/choose" title="cn/XSLT/choose">xsl:choose</a></li> + <li><a href="/cn/XSLT/comment" title="cn/XSLT/comment">xsl:comment</a></li> + <li><a href="/cn/XSLT/copy" title="cn/XSLT/copy">xsl:copy</a></li> + <li><a href="/cn/XSLT/copy-of" title="cn/XSLT/copy-of">xsl:copy-of</a></li> + <li><a href="/cn/XSLT/decimal-format" title="cn/XSLT/decimal-format">xsl:decimal-format</a></li> + <li><a href="/cn/XSLT/element" title="cn/XSLT/element">xsl:element</a></li> + <li><a href="/cn/XSLT/fallback" title="cn/XSLT/fallback">xsl:fallback</a> <em>(not supported)</em></li> + <li><a href="/cn/XSLT/for-each" title="cn/XSLT/for-each">xsl:for-each</a></li> + <li><a href="/cn/XSLT/if" title="cn/XSLT/if">xsl:if</a></li> + <li><a href="/cn/XSLT/import" title="cn/XSLT/import">xsl:import</a> <em>(mostly supported)</em></li> + <li><a href="/cn/XSLT/include" title="cn/XSLT/include">xsl:include</a></li> + <li><a href="/cn/XSLT/key" title="cn/XSLT/key">xsl:key</a></li> + <li><a href="/cn/XSLT/message" title="cn/XSLT/message">xsl:message</a></li> + <li><a href="/cn/XSLT/namespace-alias" title="cn/XSLT/namespace-alias">xsl:namespace-alias</a> <em>(not supported)</em></li> + <li><a href="/cn/XSLT/number" title="cn/XSLT/number">xsl:number</a> <em>(partially supported)</em></li> + <li><a href="/cn/XSLT/otherwise" title="cn/XSLT/otherwise">xsl:otherwise</a></li> + <li><a href="/cn/XSLT/output" title="cn/XSLT/output">xsl:output</a> <em>(partially supported)</em></li> + <li><a href="/cn/XSLT/param" title="cn/XSLT/param">xsl:param</a></li> + <li><a href="/cn/XSLT/preserve-space" title="cn/XSLT/preserve-space">xsl:preserve-space</a></li> + <li><a href="/cn/XSLT/processing-instruction" title="cn/XSLT/processing-instruction">xsl:processing-instruction</a></li> + <li><a href="/cn/XSLT/sort" title="cn/XSLT/sort">xsl:sort</a></li> + <li><a href="/cn/XSLT/strip-space" title="cn/XSLT/strip-space">xsl:strip-space</a></li> + <li><a href="/cn/XSLT/stylesheet" title="cn/XSLT/stylesheet">xsl:stylesheet</a> <em>(partially supported)</em></li> + <li><a href="/cn/XSLT/template" title="cn/XSLT/template">xsl:template</a></li> + <li><a href="/cn/XSLT/text" title="cn/XSLT/text">xsl:text</a> <em>(partially supported)</em></li> + <li><a href="/cn/XSLT/transform" title="cn/XSLT/transform">xsl:transform</a></li> + <li><a href="/cn/XSLT/value-of" title="cn/XSLT/value-of">xsl:value-of</a> <em>(partially supported)</em></li> + <li><a href="/cn/XSLT/variable" title="cn/XSLT/variable">xsl:variable</a></li> + <li><a href="/cn/XSLT/when" title="cn/XSLT/when">xsl:when</a></li> + <li><a href="/cn/XSLT/with-param" title="cn/XSLT/with-param">xsl:with-param</a></li> +</ul> +<p>{{ languages( { "en": "en/XSLT/Elements", "fr": "fr/XSLT/\u00c9l\u00e9ments", "ja": "ja/XSLT/Elements", "pl": "pl/XSLT/Elementy" } ) }}</p> |