title: correct definition of xls stylsheet
body: <p>I am trying to use a java code I modified from <a href="https://stackoverflow.com/questions/21413978/convert-an-xml-file-to-csv-file-using-java">here</a> to extract all the attributes in the "node" elements in the sample xml data below. The output is a blank csv with only the header I defined in the stylesheet. Since the code works I suspect the stylesheet is defined incorrectly but I don't how to fix it. How can I correct it? </p>
  
  <p>sample.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE network SYSTEM "http://www.matsim.org/files/dtd/network_v2.dtd"&gt;
  &lt;network&gt;
      &lt;nodes&gt;
          &lt;node id="1" x="-53196.450154726146" y="-3755010.0058102254" &gt;
          &lt;/node&gt;
          &lt;node id="10" x="-54879.37761845079" y="-3753903.660850382" &gt;
          &lt;/node&gt;
          &lt;node id="100" x="-46659.23389528884" y="-3749500.821686937" &gt;
          &lt;/node&gt;
          &lt;node id="101" x="-54624.44957950422" y="-3757195.8898357535" &gt;
          &lt;/node&gt;
      &lt;/nodes&gt;
  &lt;/network&gt;
  </code></pre>
  
  <p>style.xsl</p>
  
  <pre><code>?xml version="1.0"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" &gt;
  &lt;xsl:output method="text" omit-xml-declaration="yes" indent="no"/&gt;
      &lt;xsl:template match="/"&gt;
          id,x,y
          &lt;xsl:for-each select="//node"&gt;
              &lt;xsl:value-of select="node/@*"/&gt;
          &lt;/xsl:for-each&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>