title: Is this XSLT code absurd or not?
body: <p>I'm trying to modify a xsl sheet written by someone else. but for now I'm just trying to understand...
  I'm really surprised to read this :</p>
  
  <pre><code>&lt;xsl:template match="par"&gt;
  
      [...]
  
      &lt;xsl:variable name="pos"&gt;&lt;xsl:value-of select="position()"/&gt;&lt;/xsl:variable&gt;
      &lt;xsl:variable name="page"&gt;&lt;xsl:value-of select="../par[position()=$pos]/@page"/&gt;&lt;/xsl:variable&gt;
  
      [...]
  
      &lt;xsl:if test="$page!=''"&gt;
      &lt;xsl:if test="$page!=@page"&gt;
          &lt;div style="text-align:right;page-break-before:always"&gt;
          &lt;font color="#000000" style="font-style:normal;text-decoration:none;font-weight:normal"&gt;
                  - &lt;xsl:value-of select="$page"/&gt; -
              &lt;br/&gt;
           &lt;/font&gt;
          &lt;/div&gt;
      &lt;/xsl:if&gt;
      &lt;/xsl:if&gt;
  
      [...]
  
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>am I stupid or is this code stupid?</p>
  
  <p>And if it's me, can someone explain me <strong><em>How in this case could $page and @page be different?</em></strong></p>
  
  <p>thanks</p>