title: how to add condition which check xml data with lookup table
body: <p>I want to ask. there is posible to add condition which will be checking xml data with lookup table, and if  we didnt't have value in lookup table add const 8 to output?
  xslt Code:</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  &lt;xsl:key name="Department" match="Department" use="../Collection"/&gt;
      &lt;xsl:template match="/"&gt;
      &lt;document&gt;
          &lt;xsl:apply-templates/&gt;
      &lt;/document&gt;
  &lt;/xsl:template&gt;
   &lt;xsl:template match="line"&gt;
       &lt;xsl:variable name="inputDep" select="field[@id='3']"/&gt;
  &lt;Department&gt;
      &lt;xsl:for-each select="document('lookup.xml')"&gt;
          &lt;xsl:for-each select="key('Deparment',$inputDep)"&gt;
              &lt;xsl:value-of select="."/&gt;
          &lt;/xsl:for-each&gt;
      &lt;/xsl:for-each&gt;
  &lt;/Department&gt;
  
   &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>lookup table:</p>
  
  <pre><code>&lt;document&gt;
      &lt;line-item&gt;
          &lt;Collection&gt;1&lt;/Collection&gt;
          &lt;Department&gt;3&lt;/Department&gt;
      &lt;/line-item&gt;
      &lt;line-item&gt;
          &lt;Collection&gt;2&lt;/Collection&gt;
          &lt;Department&gt;1&lt;/Department&gt;
      &lt;/line-item&gt;
      &lt;line-item&gt;
          &lt;Collection&gt;3&lt;/Collection&gt;
          &lt;Department&gt;2&lt;/Department&gt;
      &lt;/line-item&gt;
  &lt;/document&gt;
  </code></pre>
  
  <p>xml file:</p>
  
  <pre><code>&lt;document&gt;
      &lt;line id="0"&gt;
          &lt;field id="3"&gt;&lt;![CDATA[1]]&gt;&lt;/field&gt;
      &lt;/line&gt;
      &lt;line id="1"&gt;
          &lt;field id="3"/&gt;
      &lt;/line&gt;
      &lt;line id="2"&gt;
          &lt;field id="3"/&gt;&lt;![CDATA[4]]&gt;&lt;/field&gt;
      &lt;/line&gt;
  &lt;/document&gt;
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>&lt;Department&gt;3&lt;Department&gt;
  &lt;Department&gt;8&lt;Department&gt;
  &lt;Department&gt;8&lt;Department&gt;
  </code></pre>