Small clean of subtitles applet code.
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / unittests / valgrind.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:check="http://check.sourceforge.net/ns">
6
7 <xsl:template match="/">
8   <h2>Executed Test Programs</h2>
9   <xsl:for-each select="valgrindresults/valgrindoutput">
10         <xsl:sort select="args/argv/exe"/>
11         <a href="#{generate-id()}"><xsl:value-of select="args/argv/exe"/></a><br/>
12   </xsl:for-each>
13
14   <h2>Errors</h2>
15   <xsl:for-each select="valgrindresults/valgrindoutput">
16         <xsl:sort select="args/argv/exe"/>
17         <a name="{generate-id()}"/>
18         <table border="1">
19         <tr bgcolor="#9acd32">
20                 <th align="left"><xsl:value-of select="args/argv/exe"/></th>
21         </tr>
22         <xsl:for-each select="error">
23                 <tr>
24                 <td><a href="#{generate-id()}">
25                         <xsl:choose>
26                                 <xsl:when test="kind='InvalidRead'">
27                                         <span style="color:#ff0000"><xsl:value-of select="what"/></span>
28                                 </xsl:when>
29                                 <xsl:when test="kind='InvalidWrite'">
30                                         <span style="color:#ff0000"><xsl:value-of select="what"/></span>
31                                 </xsl:when>
32                                 <xsl:when test="kind='InvalidFree'">
33                                         <span style="color:#ff0000"><xsl:value-of select="what"/></span>
34                                 </xsl:when>
35                                 <xsl:otherwise>
36                                         <xsl:value-of select="xwhat"/>
37                                 </xsl:otherwise>
38                         </xsl:choose>
39                 </a></td>
40                 </tr>
41         </xsl:for-each>
42         </table>
43         <p/>
44   </xsl:for-each>
45   <h2>Stack frames</h2>
46   <xsl:for-each select="valgrindresults/valgrindoutput/error">
47     <a name="{generate-id()}"/>
48     <b>call stack (<xsl:value-of select="../args/argv/exe"/>): <span style="color:#ff0000"><xsl:value-of select="what"/></span></b>
49     <table border="1" >
50     <tr bgcolor="#9acd32">
51       <th align="left">function</th>
52       <th align="left">file</th>
53       <th align="left">line</th>
54       <th align="left">directory</th>
55     </tr>
56     <xsl:for-each select="stack[1]/frame">
57       <tr>
58         <td><xsl:value-of select="fn"/></td>
59         <td><xsl:value-of select="file"/></td>
60         <td><xsl:value-of select="line"/></td>
61         <td><xsl:value-of select="dir"/></td>
62       </tr>
63     </xsl:for-each>
64     <xsl:apply-templates select="auxwhat"/>
65     <xsl:for-each select="stack[2]/frame">
66       <tr>
67         <td><xsl:value-of select="fn"/></td>
68         <td><xsl:value-of select="file"/></td>
69         <td><xsl:value-of select="line"/></td>
70         <td><xsl:value-of select="dir"/></td>
71       </tr>      
72     </xsl:for-each>
73     </table>
74     <p/>
75   </xsl:for-each>
76 </xsl:template>
77 <xsl:template match="auxwhat">
78 <span style="color:#ff0000"><xsl:value-of select="."/> (call stack):</span>
79 </xsl:template>
80 </xsl:stylesheet>