title: Use xml comment to generate formatted html output
body: <p>I'm trying to generate a nicely formatted html document from the comments that I have in an xml file. At present I have an xml file that is used to generate an html list of the xml tables. In order for me to add comments about the tables I am manually adding the comments into the output html file.</p>
  
  <p>I would like If possible to put the html code in the xml file as a comment and have xslt use the comment to create the correctly formatted document.</p>
  
  <p>Here is the part of the xml file that is commented. Here there is html new line syntax that I would like xslt to read as html. I'm thinking there must be a better way to use raw xml to create this but, I don't want the comments to be read in the xml file so don't want it as a table entry.</p>
  
  <pre><code>    &lt;table name="ers_benchmark_defn" xmlns=""&gt;
      &lt;!-- This table contains mapping between hierarchy nodes and their respective benchmarks.  The columns should be populated as follows:&lt;br&gt;
               &lt;ul&gt;
               &lt;li&gt;HIERARCHY_NODE&lt;br&gt;
               This column contains the name of the hierarchy node in the ERS Risk Hierarchy.&lt;/ul&gt;
               &lt;ul&gt;
               &lt;li&gt;BENCHMARK&lt;br&gt;
               The column can be populated with either;&lt;br&gt;
               a Calypso portfolio name,&lt;br&gt;
               an ERS Risk Hierarchy name, or&lt;br&gt;
               an ERS Risk Hierarchy node name.&lt;br&gt;&lt;br&gt;
               In the latter case, the column should be populated with the hierarchy node name and the hierarchy to which it belongs, separated by a percentage symbol, %.&lt;/ul&gt;
               &lt;ul&gt;
               &lt;li&gt;BENCHMARK_TYPE&lt;br&gt;
               If the value in the benchmark column is an ERS hierarchy or hierarchy node name, this column should be populated with the value HIERARCHY.  Otherwise, when using a Calypso portfolio name, it should not be populated.&lt;/ul&gt;
               &lt;ul&gt;
               &lt;li&gt;SCALING_FACTOR&lt;br&gt;
               This column should be populated with the scaling factor by which the benchmark results should be multiplied.  To use MTM scaling, leave this column unpopulated.&lt;/ul&gt;
               See the ERS 10.2 Release notes for further information.&lt;br&gt;&lt;br&gt; --&gt;
      &lt;column name="hierarchy_node" nullable="false" type="string" scale="255"/&gt;
      &lt;column name="benchmark" nullable="false" type="string" scale="255"/&gt;
      &lt;column name="benchmark_type" nullable="true" type="string" scale="32"/&gt;
      &lt;column name="scaling_factor" nullable="true" type="float"/&gt;
  </code></pre>
  
  <p>This is the part of the xsl file that I have made to use the comment, however it does not interpret the html.</p>
  
  <pre><code>&lt;tr class="info" width="100%"&gt;
          &lt;td colspan="4"&gt;&lt;xsl:value-of select="comment()"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p>The required output looks like this when manually formatted:</p>
  
  <pre><code>  &lt;p&gt;
       &lt;table border="1" cellpadding="2" cellspacing="0"&gt;
          &lt;tr class="title"&gt;
             &lt;th colspan="4"&gt;&lt;a name="ers_benchmark_defn"&gt;&lt;/a&gt;ers_benchmark_defn
             &lt;/th&gt;
          &lt;/tr&gt;
          &lt;tr class="info" width=100%&gt;
               &lt;th colspan=4 align=left&gt;This table contains mapping between hierarchy nodes and their respective benchmarks.  The columns should be populated as follows:&lt;br&gt;
               &lt;ul&gt;
               &lt;li&gt;HIERARCHY_NODE&lt;br&gt;
               This column contains the name of the hierarchy node in the ERS Risk Hierarchy.&lt;/ul&gt;
               &lt;ul&gt;
               &lt;li&gt;BENCHMARK&lt;br&gt;
               The column can be populated with either;&lt;br&gt;
               a Calypso portfolio name,&lt;br&gt;
               an ERS Risk Hierarchy name, or&lt;br&gt;
               an ERS Risk Hierarchy node name.&lt;br&gt;&lt;br&gt;
               In the latter case, the column should be populated with the hierarchy node name and the hierarchy to which it belongs, separated by a percentage symbol, %.&lt;/ul&gt;
               &lt;ul&gt;
               &lt;li&gt;BENCHMARK_TYPE&lt;br&gt;
               If the value in the benchmark column is an ERS hierarchy or hierarchy node name, this column should be populated with the value HIERARCHY.  Otherwise, when using a Calypso portfolio name, it should not be populated.&lt;/ul&gt;
               &lt;ul&gt;
               &lt;li&gt;SCALING_FACTOR&lt;br&gt;
               This column should be populated with the scaling factor by which the benchmark results should be multiplied.  To use MTM scaling, leave this column unpopulated.&lt;/ul&gt;
               See the ERS 10.2 Release notes for further information.&lt;br&gt;&lt;br&gt;&lt;/th&gt;
          &lt;/tr&gt;
          &lt;tr class="header"&gt;
             &lt;th&gt;column name&lt;/th&gt;
             &lt;th&gt;nullable&lt;/th&gt;
             &lt;th&gt;type&lt;/th&gt;
  </code></pre>
  
  <p>These are extracts of the full code but I think this should be enough for someone to help me.</p>
  
  <p>Thank you!</p>