1<?xml version='1.0'?> 2<xsl:stylesheet 3 version="1.0" 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 5 6 <xsl:template match="MEMORY_DUMP_REPORT"> 7 <html> 8 <head> 9 <title> BCUnit Memory Debugger Dumper - All Allocation/Deallocation Report. </title> 10 </head> 11 12 <body bgcolor="e0e0f0"> 13 <xsl:apply-templates/> 14 </body> 15 </html> 16 </xsl:template> 17 18 <xsl:template match="MD_HEADER"> 19 <div align="center"> 20 <h3> 21 <b> BCUnit - A Unit testing framework for C. </b> <br/> 22 <a href="https://github.com/BelledonneCommunications/bcunit/"> https://github.com/BelledonneCommunications/bcunit/ </a> 23 </h3> 24 </div> 25 </xsl:template> 26 27 <xsl:template match="MD_RUN_LISTING"> 28 <div align="center"> 29 <h2> 30 BCUnit Memory Debugger Report <br/> 31 Memory Allocation/Deallocation Records 32 </h2> 33 <hr align="center" width="100%" color="maroon" /> 34 </div> 35 <table cols="6" width="95%"> 36 <th width="10%" align="left">Pointer</th> 37 <th width="35%" align="left">Allocation File</th> 38 <th width="10%" align="left">Line #</th> 39 <th width="35%" align="left">Deallocation File</th> 40 <th width="10%" align="left">Line #</th> 41 <th width="10%" align="left">Data Size</th> 42 <xsl:apply-templates/> 43 </table> 44 </xsl:template> 45 46 <xsl:template match="MD_RUN_RECORD"> 47 <xsl:param name="ptr" select="MD_POINTER"/> 48 <xsl:for-each select="MD_EVENT_RECORD"> 49 <tr> 50 <td> <xsl:value-of select="$ptr"/> </td> 51 <td> <xsl:value-of select="MD_ALLOC_FILE"/> </td> 52 <td> <xsl:value-of select="MD_ALLOC_LINE"/> </td> 53 <td> <xsl:value-of select="MD_DEALLOC_FILE"/> </td> 54 <td> <xsl:value-of select="MD_DEALLOC_LINE"/> </td> 55 <td> <xsl:value-of select="MD_SIZE"/> </td> 56 </tr> 57 </xsl:for-each> 58 </xsl:template> 59 60 <xsl:template match="MD_SUMMARY"> 61 <p/> 62 <table width="90%" rows="2" align="center"> 63 <tr align="center" bgcolor="skyblue"> 64 <th colspan="5"> Cumulative Summary for Memory Debugger Dumper Run </th> 65 </tr> 66 <tr> 67 <td width="50%" bgcolor="ffffc0" align="center"> Valid Records </td> 68 <td bgcolor="#e0f0d0"> <xsl:value-of select="MD_SUMMARY_VALID_RECORDS" /> </td> 69 </tr> 70 71 <tr> 72 <td width="50%" bgcolor="ffffc0" align="center"> Invalid Records </td> 73 <td bgcolor="#e0f0d0"> <xsl:value-of select="MD_SUMMARY_INVALID_RECORDS" /> </td> 74 </tr> 75 76 <tr> 77 <td width="50%" bgcolor="ffffc0" align="center"> Total Number of Allocation/Deallocation Records </td> 78 <td bgcolor="#e0f0d0"> <xsl:value-of select="MD_SUMMARY_TOTAL_RECORDS" /> </td> 79 </tr> 80 81 </table> 82 </xsl:template> 83 84 <xsl:template match="MD_FOOTER"> 85 <p/> 86 <hr align="center" width="100%" color="maroon" /> 87 <h5 align="center"> <xsl:apply-templates/> </h5> 88 </xsl:template> 89 90</xsl:stylesheet> 91