title: Getting rid of empty lines after deleting nodes using XSLT
body: <p>I am using XSLT to make a very simple transformation in a XML document. I just want to delete all the element nodes with a particular name.
  It happens that in my source document all these nodes are located at the end of the document, but after the transformation, although the nodes have disappeared as I intended, there are lots of empty lines in their place.</p>
  
  <p>This is strictly a cosmetic issue since I accomplished what I wanted with the transformation, but out of curiosity: how can I get rid of these empty lines ?
  This is the XSL file I used for the transformation (the element I wanted to remove is named "relations"): </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
    &lt;xsl:output method="xml" /&gt;
  
    &lt;xsl:template match="*"&gt;
      &lt;xsl:copy&gt;
        &lt;xsl:copy-of select="@*" /&gt;
        &lt;xsl:apply-templates/&gt;
      &lt;/xsl:copy&gt;
    &lt;/xsl:template&gt;
  
    &lt;xsl:template match="relation"/&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>