File: tcov.xsl

package info (click to toggle)
eclipse-titan 6.1.0-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 79,084 kB
  • ctags: 29,092
  • sloc: cpp: 210,764; ansic: 44,862; yacc: 21,034; sh: 12,594; makefile: 12,225; lex: 8,972; xml: 5,348; java: 4,849; perl: 3,780; python: 2,834; php: 175
file content (94 lines) | stat: -rw-r--r-- 2,640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0"?>
<!--
 Copyright (c) 2000-2016 Ericsson Telecom AB
 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Eclipse Public License v1.0
 which accompanies this distribution, and is available at
 http://www.eclipse.org/legal/epl-v10.html

 Contributors:
  Balasko, Jeno
  Kovacs, Ferenc
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html" />
<xsl:template match="titan_coverage">
  <html>
  <head>
  <title>RAW Coverage Data</title>
  <style type="text/css">
  body, td {
    font-family: Verdana, Cursor;
    font-size: 12px;
    font-weight: normal;
  }
  table {
    border-spacing: 4px 4px;
  }
  table td {
    padding: 4px 2px 4px 2px;
    text-align: center;
  }
  table th {
    background-color: #c0c0c0;
  }
  </style>
  </head>
  <body>
  <h1>RAW Coverage Data</h1>
  <xsl:apply-templates select="version" />
  <xsl:apply-templates select="component" />
  <xsl:apply-templates select="files" />
  </body>
  </html>
</xsl:template>

<xsl:template match="version">
  <h2>Version Information</h2>
  Version Major: <xsl:value-of select="@major" /><br />
  Version Minor: <xsl:value-of select="@minor" />
</xsl:template>

<xsl:template match="component">
  <h2>Component Information</h2>
  Component Name: <xsl:value-of select="@name" /><br />
  Component Id: <xsl:value-of select="@name" />
</xsl:template>

<xsl:template match="files">
  <h2>Coverage Functions Information</h2>
  <table border="1" width="60%">
  <th>Path</th><th>Line #</th><th>Count</th>
  <xsl:for-each select="file">
    <xsl:variable name="file" select="position()" />
    <xsl:for-each select="functions">
      <xsl:for-each select="function">
        <tr>
          <td><xsl:value-of select="../../@path" /></td>
          <td><xsl:value-of select="@name" /></td>
          <td><xsl:value-of select="@count" /></td>
        </tr>
      </xsl:for-each>
    </xsl:for-each>
  </xsl:for-each>
  </table>
  <h2>Coverage Lines Information</h2>
  <table border="1" width="60%">
  <th>Path</th><th>Line #</th><th>Count</th>
  <xsl:for-each select="file">
    <xsl:variable name="file" select="position()" />
    <xsl:for-each select="lines">
      <xsl:for-each select="line">
        <tr>
          <td><xsl:value-of select="../../@path" /></td>
          <td><xsl:value-of select="@no" /></td>
          <td><xsl:value-of select="@count" /></td>
        </tr>
      </xsl:for-each>
    </xsl:for-each>
  </xsl:for-each>
  </table>
</xsl:template>

</xsl:stylesheet>