title: Displaying line breaks in XML using ASP.NET with XSLT
body: <p>I have a problem with my XML that I am trying to display on my ASP.NET page that I could do with some help with.
  What I would like to do is display it on a multi-line so I have an XML file that looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;?xml-stylesheet type="text/xsl" href="News.xslt" ?&gt;
  &lt;newslist&gt;
    &lt;news&gt;
      &lt;date&gt;20th June 2010&lt;/date&gt;
      &lt;detail&gt;Detail line 1.
              Detail Line 2&lt;/detail&gt;
    &lt;/news&gt;
    &lt;news&gt;
      &lt;date&gt;18th June 2010&lt;/date&gt;
      &lt;detail&gt;Some more details&lt;/detail&gt;
    &lt;/news&gt;
  &lt;/newslist&gt;
  </code></pre>
  
  <p>And I have an XSLT file that looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" &gt;
  
    &lt;xsl:template match="/"&gt;
      &lt;HTML&gt;
        &lt;BODY&gt;
          &lt;xsl:for-each select="newslist/news"&gt;
            &lt;xsl:sort select="date" order="descending"/&gt;
            &lt;br /&gt;
            &lt;h3&gt;&lt;xsl:value-of select="date" /&gt;&lt;/h3&gt;
            &lt;ul&gt;
              &lt;p&gt;&lt;xsl:value-of select="detail" /&gt;&lt;/p&gt;
            &lt;/ul&gt;
          &lt;/xsl:for-each&gt;
        &lt;/BODY&gt;
      &lt;/HTML&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>When it displays the first detail line everything is on the same line.  I've done some digging about and I have tried the following:</p>
  
  <ol>
  <li>xml:space="preserve" in the XSLT file</li>
  <li> in the XML file</li>
  <li><code>&lt;br /&gt;</code></li>
  <li>I've even tried leaving it as it is.</li>
  </ol>
  
  <p>I am using Microsoft Visual Web Developer 2010.  The control I am using is the XML control under the standard tab, and the language I am using is C#, if that helps any.</p>
  
  <p>If this has already been answered and I haven't found it yet can you please point me at it.</p>
  
  <p>Thanks for your help.</p>