title: How to create html table from XML element attributes and XML tags using xslt
body: <p>I'm really new to xslt so I would be very thankful if someone can help me... 
  I have a XML like this: </p>
  
  <pre><code>        &lt;dummy&gt;
          &lt;element name="O"&gt;
              &lt;description/&gt;
          &lt;/element&gt;
          &lt;element name="L"&gt;
              &lt;description&gt;abstract for L&lt;/description&gt;
          &lt;/element&gt;
          &lt;element name="Sd"&gt;
              &lt;description&gt;Description for Sd&lt;/description&gt;
          &lt;/element&gt;
          &lt;element name="Dh"&gt;
              &lt;description/&gt;
          &lt;/element&gt;
          &lt;element name="P"&gt;
              &lt;description/&gt;
          &lt;/element&gt;
          &lt;element name="S"&gt;
              &lt;description&gt;Some description for S&lt;/description&gt;
          &lt;/element&gt;
          &lt;element name="A"&gt;
              &lt;description/&gt;
          &lt;/element&gt;
          &lt;L&gt;2010&lt;/L&gt;
          &lt;A&gt;58.78&lt;/A&gt;
          &lt;O&gt;O&lt;/O&gt;
          &lt;Sd&gt;1101&lt;/Sd&gt;
          &lt;S&gt;0.00&lt;/S&gt;
          &lt;A&gt;368.38&lt;/A&gt;
          &lt;L&gt;2009&lt;/L&gt;
          &lt;Sd&gt;1103&lt;/Sd&gt;
      &lt;/dummy&gt;
  </code></pre>
  
  <p>I have to had a final html table like this ( using xslt "1.0"):</p>
  
  <pre><code>            &lt;tr&gt;
      &lt;td&gt;
          I have to select only non element tags one by one, and then replace the tag with the 
          description of the same element name (in case that decription does not exists then display only element name). 
      &lt;/td&gt;
      &lt;td&gt;
          Value of non element tag
      &lt;/td&gt;
      &lt;/tr&gt;
  
  
  4 example ( upper xml) 
      [in something like for-each]:  take  &lt;L&gt; 2010 &lt;/L&gt;  
  </code></pre>
  
  <p>then search for element name = "L" ( if description exists = true take 
  description else "L") and
          display   abstract for L    2010  </p>
  
  <p>So the final output 4 given xml should be:</p>
  
  <pre><code>    &lt;tr&gt;&lt;td&gt; abstract for L  &lt;/td&gt; &lt;td&gt; 2010 &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt; A  &lt;/td&gt; &lt;td&gt; 58.78 &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt; O  &lt;/td&gt; &lt;td&gt; O &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt; Description for Sd &lt;/td&gt; &lt;td&gt; 1101 &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt; Some description for S  &lt;/td&gt; &lt;td&gt; 0.00 &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt; A  &lt;/td&gt; &lt;td&gt; 368.38 &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt; abstract for L  &lt;/td&gt; &lt;td&gt; 2009&lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt; Description for Sd &lt;/td&gt; &lt;td&gt; 1103 &lt;/td&gt; &lt;/tr&gt;
  </code></pre>
  
  <p>The xslt must be written in xslt = "1.0"</p>