<s1 title="Attribute Value Templates">

<p>Because calculating attributes is very common, the XSLT standard
adds a special syntax for attribute value templates.
A stylesheet can uses an attribute value template to calculate
the template value for the element directly.  Curly brackets introduce
a value-of expression, e.g. "{@class}".  The following stylesheet
is a direct translation of the previous example.</p>

<example title='default.xsl'>
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

&lt;xsl:template match="box">
  &lt;table class="{@class}">
    &lt;tr>
      &lt;td>
        &lt;xsl:apply-templates/>
      &lt;/td>
    &lt;/tr>
  &lt;/table>
&lt;/xsl:template>

&lt;/xsl:stylesheet>
</example>

<p>The example XTP and its generated HTML is identical to the previous example
since attribute value templates are just a syntactic shortcut.</p>

<example title='hello.xtp'>
<example>
&lt;example>
This is an example.
&lt;/example>
</example>
<results>
&lt;table class="example">
&lt;tr>
  &lt;td>This is an example&lt;/td>
&lt;/tr>
&lt;/table>
</results>
</example>

<s2 title="Summary">

<ul>
<li><var/"{...}"/> interpolates an attribute's value.
</ul>

</s2>
</s1>
