This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Properties.xslt
132 lines (126 loc) · 3 KB
/
Properties.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
128
129
130
131
132
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<style>
table.properties{
border-collapse:collapse;
}
table.properties * {
font-family: Tahoma;
font-size: 10pt;
color:black;
}
table.properties th {
font-weight: bold;
background-color: silver;
}
table.properties td, table.properties th {
border: 1px solid black;
padding: 2 2 2 2;
}
table.properties ul{
margin-bottom: 0;
margin-top: 0;
margin-left: 20px;
padding:0px;
}
</style>
</head>
<body>
<h2>Properties</h2>
<table class="properties">
<thead>
<tr>
<th>
Group
</th>
<th>
Property
</th>
<th>
Type
</th>
<th>
Values
</th>
<th>
Default
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="/Content/Object/Group">
<xsl:sort select="Name" order="ascending"/>
<xsl:apply-templates select="." />
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="Group">
<xsl:for-each select="Childs|Children">
<xsl:apply-templates>
<xsl:with-param name="group" select="../Name" />
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="Prop">
<xsl:param name="group"/>
<tr>
<td>
<xsl:if test="Metadata/Value[@name = 'FlagScope'] = 'Runtime'">
<xsl:text>(Runtime)</xsl:text>
</xsl:if>
<xsl:if test="not (Metadata/Value[@name = 'FlagScope'] = 'Runtime')">
<xsl:value-of select="$group"/>
</xsl:if>
</td>
<td>
<xsl:value-of select="Name"/>
</td>
<td>
<xsl:value-of select="Type"/>
</td>
<td>
<xsl:if test="Type = 'Combo'">
<xsl:apply-templates select="Values" />
</xsl:if>
<xsl:if test="Type != 'Combo'">
<xsl:text>-</xsl:text>
</xsl:if>
</td>
<td>
<xsl:if test="Default">
<xsl:value-of select="Default"/>
</xsl:if>
<xsl:if test="not(Default)">
<xsl:text> </xsl:text>
</xsl:if>
</td>
<td>
<xsl:if test="Description">
<xsl:value-of select="Description" />
</xsl:if>
<xsl:if test="not(Description)">
<xsl:text> </xsl:text>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template match="Values">
<ul>
<xsl:for-each select="Value">
<li>
<xsl:value-of select="@desc"/>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>