You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

log.xsl 1.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:HTML="http://www.w3.org/Profiles/XHTML-transitional">
  2. <xsl:template match="/">
  3. <html>
  4. <body>
  5. <xsl:apply-templates/>
  6. </body>
  7. </html>
  8. </xsl:template>
  9. <xsl:template match="*">
  10. <xsl:apply-templates/>
  11. </xsl:template>
  12. <xsl:template match="build">
  13. <center>
  14. <table width="100%" bgcolor="#CCCCCC"><tr>
  15. <xsl:if test=".[@error]">
  16. <td align="left" width="30%"><b>Build Failed</b></td>
  17. <td align="center" width="40%"><b><xsl:value-of select="@error"/></b></td>
  18. </xsl:if>
  19. <xsl:if test=".[not(@error)]">
  20. <td><b>Build Complete</b></td>
  21. </xsl:if>
  22. <td align="right" width="30%"><b>Total Time: <xsl:value-of select="@time"/></b></td>
  23. </tr></table>
  24. <br/>
  25. <table >
  26. <xsl:apply-templates/>
  27. </table>
  28. </center>
  29. </xsl:template>
  30. <xsl:template match="message[@priority!='debug']">
  31. <tr valign="top">
  32. <td><b><pre><xsl:value-of select="../@location"/></pre></b></td>
  33. <td><b><pre><xsl:value-of select="../@name"/></pre></b></td>
  34. <td>
  35. <xsl:attribute name="STYLE">color:
  36. <xsl:choose>
  37. <xsl:when test="@priority[.='error']">red</xsl:when>
  38. <xsl:when test="@priority[.='warn']">brown</xsl:when>
  39. <xsl:when test="@priority[.='info']">gray</xsl:when>
  40. <xsl:when test="@priority[.='debug']">gray</xsl:when>
  41. </xsl:choose>
  42. </xsl:attribute>
  43. <pre><xsl:value-of select="text()"/></pre>
  44. </td>
  45. </tr>
  46. </xsl:template>
  47. </xsl:stylesheet>