ssteenkiste / nettiers

Automatically exported from code.google.com/p/nettiers
1 stars 0 forks source link

Messages in report summary are listed in their own lists, not as elements of a single list #422

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate a nettiers project
2. View report.html
3. Scroll to "messages" section

What is the expected output? What do you see instead?

I expect to see the output in a single <UL> but each one is indented (tested in 
IE7 and Firefox 12.) 

Eventually, if you have enough messages, the entire remainder of the report is 
shifted off the right hand side of the screen

What version of .netTiers and CodeSmith are you using?
Codesmith 5.2.2 rev 11561, .netTiers v2.3.0.851

Please provide any additional information below.
The error is because each message is rendered in HTML as:

<li>
  <span class="message1">Message Text</span>
  <ul />
</li>

The <ul /> is improperly(?) being rendered by the browsers as <ul>, so each 
successive message is being indented.

By changing the the @Message handler of the XSL file 
(VisualStudio\reportHTML.xsl) by adding the ***'d lines below:

<xsl:template match="Message">
  <li>
    <span class="message{@level}"><xsl:value-of select="@message" /></span>
*** <xsl:if test="*">
      <ul>
        <xsl:apply-templates select="File" />
      </ul>
*** </xsl:if>
  <xsl:if test="@executionTime">[<xsl:value-of select="@executionTime" /></span>]<br /></xsl:if>
  </li>
</xsl:template>

This will change the output html to exclude the <ul /> completely if there are 
no child elements attached to the message.  The report will now render properly.

Original issue reported on code.google.com by mikiur...@gmail.com on 17 May 2012 at 8:53