title: xslt using variables for expression
body: <p>Here is my XSLT:</p>
  
  <pre><code>&lt;xsl:variable name="adlength" select="35"/&gt;
  &lt;xsl:for-each select="/*/locations/location"&gt;
  &lt;xsl:variable name="currentadlength" select="position()"/&gt;
  &lt;xsl:if test="$currentadlength &lt; $adlength"&gt;
  &lt;/xsl:if&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>My issue is with this line of code:</p>
  
  <pre><code>&lt;xsl:if test="$currentadlength &lt; $adlength"&gt;
  </code></pre>
  
  <p>What I need is to enter the <code>if</code> stage if the <code>currentadlength</code> is less than <code>adlength</code></p>