title: XSL: select element value using XPath selector
body: <p>I've the following XML scheme and I want to select the <code>Table&gt;Row&gt;Field with name = Amount</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Document&gt;
    &lt;PermitDocument code="01312" id="1"&gt;
      &lt;Field name="DocumentType"&gt;Certificate&lt;/Field&gt;
      ...
      ...
      &lt;Table name="Products"&gt;
        &lt;Row&gt;
          &lt;Field name="Amount"&gt;1000&lt;/Field&gt;
          ...
          ...
        &lt;/Row&gt;
        &lt;Row&gt;
          &lt;Field name="Amount"&gt;3000&lt;/Field&gt;
          ...
          ...
        &lt;/Row&gt;
      &lt;/Table&gt;
    &lt;/PermitDocument&gt;
  &lt;/Document&gt;
  </code></pre>
  
  <p>I've the following code for transformation but nothing happens</p>
  
  <pre><code>&lt;xsl:for-each select="Document/PermitDocument/Table[@name='Products']/Row"&gt;
      &lt;xsl:value-of select="Field[@name='Amount']" /&gt;
      ...
      ...
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>C# code </p>
  
  <pre><code>XslTransform xs = new XslTransform();
  
  try
  {
    xs.Load("BCIS.xsl");
  }
  catch (XsltException e)
  {
    Console.WriteLine(e.StackTrace);
    Console.ReadLine();
  }
  
  xs.Transform("BCIS.xml", "BCIS.html");
  </code></pre>
  
  <p>What is wrong with the syntax I used to achieve the goal?</p>
  
  <p>Sultan</p>