-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAVRStudioConversionLog.xslt
127 lines (125 loc) · 4.52 KB
/
AVRStudioConversionLog.xslt
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl='urn:schemas-microsoft-com:xslt'>
<xsl:template match="/">
<html>
<head>
<title>AVR Studio 5.0 Project Conversion Log</title>
<style type="text/css">
body
{
font-size:8pt;
font-family:Verdana;
}
.success { background-color:#00CC00; color:#00CC00; margin-right:5px; }
.failure { background-color:#CC0000; color:#CC0000; margin-right:5px; }
.Info { background-color:#FFFFFF; }
.Warning { background-color:#AAAA00; }
.Error { background-color:#AA0000; }
.projectCount { font-size:12pt; }
.header { font-size:15pt; }
.subheader { font-weight:bold; font-size:10pt; margin-top:15px; margin-bottom:15px;}
.project { font-size: 10pt; margin:20px; }
.GeneralFailureInformation { font-size: 10pt; margin:20px; }
</style>
<script type="text/javascript">
function toggleVisibility(id)
{
var element = document.getElementById(id);
var link = document.getElementById('link_' + id);
link.innerHTML = element.style.display == "none" ? "Hide Logs" : "Show Logs";
element.style.display = element.style.display == "none" ? "block" : "none";
}
</script>
</head>
<body>
<div class="header">AVR Studio 5.0 Project Conversion Log</div>
<xsl:if test="count(//GeneralFailureInformation) = 0">
<br />
<span class="projectCount"> <xsl:value-of select="count(//Project)" /> </span> project(s) chosen for conversion.
</xsl:if>
<br />
<span class="projectCount"> <xsl:value-of select="count(//Project[@status='Success'])" /> </span> project(s) successfully converted.
<br />
<span class="projectCount"> <xsl:value-of select="count(//Project[@status='SuccessWithErrors'])" /> </span> project(s) converted with errors.
<br />
<br />
<xsl:apply-templates select="//GeneralFailureInformation" />
<br />
<xsl:apply-templates select="//Project" />
</body>
</html>
</xsl:template>
<xsl:template match="Project">
<div class="project">
<span>
<xsl:attribute name="class"><xsl:value-of select="@status" /></xsl:attribute>
<xsl:text>|</xsl:text>
</span>
<xsl:value-of select="@name" /> <br />
<a href="javascript:">
<xsl:attribute name="id">link_<xsl:value-of select="@id" />
</xsl:attribute>
<xsl:attribute name="onclick">
toggleVisibility('<xsl:value-of select="@id" />');
</xsl:attribute>
Show Logs
</a>
<div style="display:none;clear:both;margin-top:10px;">
<xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute>
<table>
<xsl:for-each select="LogEntry">
<tr style="font-family:Verdana;font-size:8pt;">
<xsl:attribute name="class"><xsl:value-of select="Type" /></xsl:attribute>
<td>
<xsl:value-of select="Message" />
</td>
<td>
<xsl:value-of select="DateTime" />
</td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
</xsl:template>
<xsl:template match="GeneralFailureInformation">
<div class="GeneralFailureInformation">
<span>
<xsl:attribute name="class">
<xsl:value-of select="@status" />
</xsl:attribute>
<xsl:text>|</xsl:text>
</span>
<xsl:value-of select="@name" />
<br />
<a href="javascript:">
<xsl:attribute name="id">link_<xsl:value-of select="@id" />
</xsl:attribute>
<xsl:attribute name="onclick">
toggleVisibility('<xsl:value-of select="@id" />');
</xsl:attribute>
Show Logs
</a>
<div style="display:none;clear:both;margin-top:10px;">
<xsl:attribute name="id">
<xsl:value-of select="@id" />
</xsl:attribute>
<table>
<xsl:for-each select="LogEntry">
<tr style="font-family:Verdana;font-size:8pt;">
<xsl:attribute name="class">
<xsl:value-of select="Type" />
</xsl:attribute>
<td>
<xsl:value-of select="Message" />
</td>
<td>
<xsl:value-of select="DateTime" />
</td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
</xsl:template>
</xsl:stylesheet>