title: xsl:for-each select=: two conditions
body: <p>in xsl we can write two condition in cycle "for each". for example instead of </p>
  
  <pre><code>&lt;xsl:when test="/document/line[
                     (substring(field[@id='0'], 1,3)='MAR')
                  ] and 
                  /document/line[
                     contains(substring(field[@id='0'],123,4),'0010')
                  ]"&gt;
  </code></pre>
  
  <p>we can write it:     </p>
  
  <pre><code>&lt;xsl:for-each select="/document/line[
                           contains(substring(field[@id='0'], 1,3),'MAR')
                        ] and 
                        /document/line[
                           contains(substring(field[@id='0'],123,4),'0010')
                        ]"&gt;
  </code></pre>
  
  <p>Best regards</p>
  
  <p><strong>Update from comments</strong></p>
  
  <pre><code>&lt;xsl:for-each select="/document/line[
                           contains(substring(field[@id='0'], 1,3),'MAR') 
                           and contains(substring(field[@id='0'],123,4),'0010')
                        ]"&gt;
  </code></pre>