title: xslt test on a parameter of a tag
body: <p>I would like to create a template in xslt with a condition on the parameter of the tag I am matching.</p>
  
  <p>for exemple:
  If I have the tags <code>&lt;par class="class1"&gt;</code> and <code>&lt;par class="class2"&gt;</code></p>
  
  <p>I would like to create a template like this :</p>
  
  <pre><code>&lt;xsl:template match="par"&gt;
   &lt;xsl:if test="class=class1"&gt;
    &lt;fo:block
      space-before="3pt"
      space-after="3pt"&gt;
  
      &lt;xsl:apply-templates /&gt;
  
    &lt;/fo:block&gt;
   &lt;/xsl:if&gt;
   &lt;xsl:otherwise&gt;
    &lt;fo:block
      space-before="10pt"
      space-after="10pt"&gt;
  
      &lt;xsl:apply-templates /&gt;
  
    &lt;/fo:block&gt;
   &lt;/xsl:otherwise&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>But it doesn't work. How can I test on the parameter of the tag ?</p>
  
  <p>thanks in advance.</p>