📄 short-attribute.xtp
字号:
<s1 title="Attribute Value Templates"><p>Because calculating attributes is very common, the XSLT standardadds a special syntax for attribute value templates.A stylesheet can uses an attribute value template to calculatethe template value for the element directly. Curly brackets introducea value-of expression, e.g. "{@class}". The following stylesheetis a direct translation of the previous example.</p><example title='default.xsl'><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="box"> <table class="{@class}"> <tr> <td> <xsl:apply-templates/> </td> </tr> </table></xsl:template></xsl:stylesheet></example><p>The example XTP and its generated HTML is identical to the previous examplesince attribute value templates are just a syntactic shortcut.</p><example title='hello.xtp'><example><example>This is an example.</example></example><results><table class="example"><tr> <td>This is an example</td></tr></table></results></example><s2 title="Summary"><ul><li><var/"{...}"/> interpolates an attribute's value.</ul></s2></s1>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -