/
issues.xsl
205 lines (205 loc) · 6.25 KB
/
issues.xsl
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<?xml version="1.0" encoding="UTF-8"?>
<!-- define nbsp char entity for output -->
<!DOCTYPE menu [
<!ENTITY nbsp " ">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output media-type="text/html" encoding="UTF-8"/>
<xsl:template match="/">
<html>
<head>
<title>Proposed Xerces2 Requirements - <xsl:value-of select="/requirementCatalog/@date"/>
</title>
</head>
<body bgcolor="#FFFFFF">
<h1>Proposed Xerces2 Requirements</h1>
<h4>Date: <xsl:value-of select="/requirementCatalog/@date"/>
<br/>
Editors: <a href="mailto:estaub@mediaone.net">Ed Staub</a> <a href="mailto:twleung@sauria.com">Ted Leung</a>
</h4>
<hr/>
<h2>Schema</h2>
<p>Proposed requirements are organized into categories. Some requirements
occur in more than one category in the future.</p>
<p>Each requirement has a number. Underneath the number is a "hardness"
and "status".</p>
<dl>
<dt>Possible "hardness" values are:</dt>
<dd>
<b>hard</b> - Xerces2 must and shall meet this requirement<br/>
<b>soft</b> - Xerces2 should meet this requirement, but it may be dropped
because of conflicting requirements or time pressures</dd>
<dt>
<br/>
Possible "status" values are:</dt>
<dd>
<span style="background-color:aquamarine"><b>approved</b> - there appears to be a clear consensus</span><br/>
<b>tooQuiet</b> - there may be a consensus, but there hasn't been enough
input to be sure <br/>
<b>hardnessConflict</b> - there is conflict over whether this is a hard or
soft requirement<b>
<br/>
vetoConflict</b> - there is a conflict over whether this proposed requirement
is a requirement at all<br/>
<span style="background-color:silver"><b>rejected</b> - the proposed requirement appears to be dead</span><br/>
<b>unevaluated</b> - editor hasn't finished reviewing input
</dd>
</dl>
<hr/>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="requirementCatalog">
<xsl:call-template name="indexByNumber"/>
<xsl:apply-templates select="categories" mode="toc"/>
<xsl:apply-templates select="categories"/>
</xsl:template>
<!-- Table of contents -->
<xsl:template match="categories" mode="toc">
<h2>Requirement Categories</h2>
<xsl:for-each select="cat">
<a>
<xsl:attribute name="href">#cat.{.}</xsl:attribute>
<xsl:value-of select="."/>
</a>
<br/>
</xsl:for-each>
<hr/>
</xsl:template>
<xsl:template name="indexByNumber">
<h2>Requirements by Number</h2>
<xsl:for-each select="/requirementCatalog/requirements/req">
<a href="#req.{@id}">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="@status='rejected'">background-color:silver</xsl:when>
<xsl:when test="@status='approved'">background-color:aquamarine</xsl:when>
<xsl:otherwise>background-color:snow</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="@id"/>
</a>
<xsl:value-of select="substring(def,1,120)"/>
<xsl:if test="string-length(def)>120">...</xsl:if>
<br/>
<xsl:if test="@id mod 5 = 0">
<br/>
</xsl:if>
</xsl:for-each>
<hr/>
</xsl:template>
<xsl:template match="categories">
<h2>Requirements by Category</h2>
<xsl:for-each select="cat">
<h3>
<a>
<xsl:attribute name="name">#cat.{.}</xsl:attribute>
</a>
<xsl:value-of select="."/>
</h3>
<table width="95%" border="1">
<xsl:for-each select="/requirementCatalog/requirements/req[@cat=current()]">
<xsl:apply-templates select="."/>
</xsl:for-each>
</table>
</xsl:for-each>
</xsl:template>
<xsl:template match="req">
<xsl:variable name="reqId" select="@id"/>
<tr>
<xsl:attribute name="bgcolor">
<xsl:choose>
<xsl:when test="@status='rejected'">silver</xsl:when>
<xsl:when test="@status='approved'">aquamarine</xsl:when>
<xsl:otherwise>snow</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td valign="top">
<p>
<a>
<xsl:attribute name="name">req.<xsl:value-of select="$reqId"/></xsl:attribute>
</a>
<b>
<!-- <xsl:value-of select="@id"/>.</b> -->
<xsl:value-of select="$reqId"/>.</b>
<br/>
<xsl:value-of select="@strength"/>
<br/>
<xsl:value-of select="@status"/>
</p>
</td>
<td valign="top">
<p>
<b>
<xsl:copy-of select="def"/>
</b>
</p>
<blockquote>
<xsl:if test="seeAlso">
<p><xsl:apply-templates select="seeAlso"/></p>
</xsl:if>
<xsl:apply-templates select="voteSet"/>
<xsl:apply-templates select="edReqNote"/>
<xsl:if test="refs/ref">
<b><i>References</i></b>
<br/>
</xsl:if>
<xsl:apply-templates select="refs/ref"/>
</blockquote>
</td>
</tr>
</xsl:template>
<xsl:template match="voteSet">
<b>
<i>Voted</i>
</b> on from <xsl:value-of select="@opened"/> to <xsl:value-of select="@closed"/>. Votes:
<ul>
<xsl:apply-templates select="vote"/>
</ul>
</xsl:template>
<xsl:template match="vote">
<li>
<a href="mailto:{@email}">
<xsl:value-of select="@voter"/>
</a>: <xsl:value-of select="@vote"/>
<xsl:apply-templates select="voteComment"/>
</li>
</xsl:template>
<xsl:template match="voteComment">
<blockquote>
<xsl:copy-of select="."/>
</blockquote>
</xsl:template>
<xsl:template match="seeAlso">
<xsl:if test="@type">
<xsl:value-of select="concat(@type,':')"/>
</xsl:if>
<xsl:if test="not(@type)">
See also:
</xsl:if>
<a href="#req.{@id}">
<xsl:value-of select="@id"/>
</a>
</xsl:template>
<xsl:template match="edReqNote">
<blockquote>
<i>Ed:</i>
<xsl:value-of select="."/>
</blockquote>
</xsl:template>
<xsl:template match="ref">
<p>
<xsl:if test="string(.)">"<xsl:copy-of select="."/>"<br/>
</xsl:if>
<xsl:apply-templates select="/requirementCatalog/mailHeaderSets/mailHeaderSet[@id=current()/@set]/li[a/@name=current()/@id]"/>
</p>
</xsl:template>
<xsl:template match="li">
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="br">
<br/>
</xsl:template>
<xsl:template match="mailHeaderSets"/>
</xsl:stylesheet>