diff options
author | Chris Larson <kergoth@openedhand.com> | 2006-08-07 06:53:34 +0000 |
---|---|---|
committer | Chris Larson <kergoth@openedhand.com> | 2006-08-07 06:53:34 +0000 |
commit | c7274f6f00ad79ab55e7833c1288247459f78bef (patch) | |
tree | 367345d11729abd5c55276c25d40c62f7b987504 /scripts/jhbuild/modulesets/moduleset.xsl | |
parent | a7d6fa4c495a4082cf5bdf3b0c49d5277ed0aa00 (diff) | |
download | poky-c7274f6f00ad79ab55e7833c1288247459f78bef.tar.gz |
Add the partial rewrite of my jhbuild -> oe metadata conversion tool, along with some modulesets for use with it. Will check in the missing piece of the tool shortly.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@589 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/jhbuild/modulesets/moduleset.xsl')
-rw-r--r-- | scripts/jhbuild/modulesets/moduleset.xsl | 283 |
1 files changed, 283 insertions, 0 deletions
diff --git a/scripts/jhbuild/modulesets/moduleset.xsl b/scripts/jhbuild/modulesets/moduleset.xsl new file mode 100644 index 0000000000..a057bfa692 --- /dev/null +++ b/scripts/jhbuild/modulesets/moduleset.xsl | |||
@@ -0,0 +1,283 @@ | |||
1 | <?xml version='1.0'?> <!--*- mode: nxml -*--> | ||
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
3 | version="1.0"> | ||
4 | |||
5 | <xsl:output method="html" encoding="ISO-8859-1" indent="yes" /> | ||
6 | <xsl:key name="module-id" match="moduleset/*" use="@id" /> | ||
7 | |||
8 | <xsl:template match="/"> | ||
9 | <html> | ||
10 | <head> | ||
11 | <title>Module Set</title> | ||
12 | <style type="text/css"> | ||
13 | <xsl:text> | ||
14 | div.cvsmodule, div.mozillamodule { | ||
15 | padding: 0.5em; | ||
16 | margin: 0.5em; | ||
17 | background: #87CEFA; | ||
18 | } | ||
19 | div.svnmodule { | ||
20 | padding: 0.5em; | ||
21 | margin: 0.5em; | ||
22 | background: #67AEDA; | ||
23 | } | ||
24 | div.metamodule { | ||
25 | padding: 0.5em; | ||
26 | margin: 0.5em; | ||
27 | background: #F08080; | ||
28 | } | ||
29 | div.tarball { | ||
30 | padding: 0.5em; | ||
31 | margin: 0.5em; | ||
32 | background: #EEDD82; | ||
33 | } | ||
34 | </xsl:text> | ||
35 | </style> | ||
36 | </head> | ||
37 | <body> | ||
38 | <xsl:apply-templates /> | ||
39 | </body> | ||
40 | </html> | ||
41 | </xsl:template> | ||
42 | |||
43 | <xsl:template match="moduleset"> | ||
44 | <h1>Module Set</h1> | ||
45 | <xsl:apply-templates /> | ||
46 | </xsl:template> | ||
47 | |||
48 | <xsl:template match="dependencies"> | ||
49 | <xsl:variable name="deps" select="dep/@package" /> | ||
50 | <xsl:for-each select="$deps"> | ||
51 | <a href="#{generate-id(key('module-id', .))}"> | ||
52 | <xsl:value-of select="." /> | ||
53 | </a> | ||
54 | <xsl:if test="not($deps[last()] = .)"> | ||
55 | <xsl:text>, </xsl:text> | ||
56 | </xsl:if> | ||
57 | </xsl:for-each> | ||
58 | </xsl:template> | ||
59 | |||
60 | <xsl:template match="cvsmodule"> | ||
61 | <div class="{name(.)}"> | ||
62 | <h2> | ||
63 | <xsl:value-of select="@id" /> | ||
64 | <a name="{generate-id(.)}" /> | ||
65 | </h2> | ||
66 | <table> | ||
67 | <tr> | ||
68 | <th align="left">Module:</th> | ||
69 | <td> | ||
70 | <xsl:choose> | ||
71 | <xsl:when test="@module"> | ||
72 | <xsl:value-of select="@module" /> | ||
73 | </xsl:when> | ||
74 | <xsl:otherwise> | ||
75 | <xsl:value-of select="@id" /> | ||
76 | </xsl:otherwise> | ||
77 | </xsl:choose> | ||
78 | <xsl:if test="@revision"> | ||
79 | <xsl:text> rv:</xsl:text> | ||
80 | <xsl:value-of select="@revision" /> | ||
81 | </xsl:if> | ||
82 | </td> | ||
83 | </tr> | ||
84 | <xsl:if test="@checkoutdir"> | ||
85 | <tr> | ||
86 | <th align="left">Checkout directory:</th> | ||
87 | <td><xsl:value-of select="@checkoutdir" /></td> | ||
88 | </tr> | ||
89 | </xsl:if> | ||
90 | <xsl:if test="@autogenargs"> | ||
91 | <tr> | ||
92 | <th align="left">Autogen args:</th> | ||
93 | <td><xsl:value-of select="@autogenargs" /></td> | ||
94 | </tr> | ||
95 | </xsl:if> | ||
96 | <xsl:if test="@cvsroot"> | ||
97 | <tr> | ||
98 | <th align="left">CVS Root:</th> | ||
99 | <td><xsl:value-of select="@cvsroot" /></td> | ||
100 | </tr> | ||
101 | </xsl:if> | ||
102 | <xsl:if test="dependencies"> | ||
103 | <tr> | ||
104 | <th align="left" valign="top">Dependencies:</th> | ||
105 | <td><xsl:apply-templates select="dependencies" /></td> | ||
106 | </tr> | ||
107 | </xsl:if> | ||
108 | </table> | ||
109 | </div> | ||
110 | </xsl:template> | ||
111 | |||
112 | <xsl:template match="svnmodule"> | ||
113 | <div class="{name(.)}"> | ||
114 | <h2> | ||
115 | <xsl:value-of select="@id" /> | ||
116 | <a name="{generate-id(.)}" /> | ||
117 | </h2> | ||
118 | <table> | ||
119 | <tr> | ||
120 | <th align="left">Module:</th> | ||
121 | <td> | ||
122 | <xsl:choose> | ||
123 | <xsl:when test="@module"> | ||
124 | <xsl:value-of select="@module" /> | ||
125 | </xsl:when> | ||
126 | <xsl:otherwise> | ||
127 | <xsl:value-of select="@id" /> | ||
128 | </xsl:otherwise> | ||
129 | </xsl:choose> | ||
130 | </td> | ||
131 | </tr> | ||
132 | <xsl:if test="@checkoutdir"> | ||
133 | <tr> | ||
134 | <th align="left">Checkout directory:</th> | ||
135 | <td><xsl:value-of select="@checkoutdir" /></td> | ||
136 | </tr> | ||
137 | </xsl:if> | ||
138 | <xsl:if test="@autogenargs"> | ||
139 | <tr> | ||
140 | <th align="left">Autogen args:</th> | ||
141 | <td><xsl:value-of select="@autogenargs" /></td> | ||
142 | </tr> | ||
143 | </xsl:if> | ||
144 | <xsl:if test="@svnroot"> | ||
145 | <tr> | ||
146 | <th align="left">SVN Repository:</th> | ||
147 | <td><xsl:value-of select="@svnroot" /><xsl:if test="@path"><xsl:value-of select="@path" /></xsl:if></td> | ||
148 | </tr> | ||
149 | </xsl:if> | ||
150 | <xsl:if test="dependencies"> | ||
151 | <tr> | ||
152 | <th align="left" valign="top">Dependencies:</th> | ||
153 | <td><xsl:apply-templates select="dependencies" /></td> | ||
154 | </tr> | ||
155 | </xsl:if> | ||
156 | </table> | ||
157 | </div> | ||
158 | </xsl:template> | ||
159 | |||
160 | <xsl:template match="metamodule"> | ||
161 | <div class="{name(.)}"> | ||
162 | <h2> | ||
163 | <xsl:value-of select="@id" /> | ||
164 | <a name="{generate-id(.)}" /> | ||
165 | </h2> | ||
166 | <table> | ||
167 | <xsl:if test="dependencies"> | ||
168 | <tr> | ||
169 | <th align="left" valign="top">Dependencies:</th> | ||
170 | <td><xsl:apply-templates select="dependencies" /></td> | ||
171 | </tr> | ||
172 | </xsl:if> | ||
173 | </table> | ||
174 | </div> | ||
175 | </xsl:template> | ||
176 | |||
177 | <xsl:template match="patches"> | ||
178 | <ul> | ||
179 | <xsl:for-each select="patch"> | ||
180 | <li><xsl:value-of select="." /></li> | ||
181 | </xsl:for-each> | ||
182 | </ul> | ||
183 | </xsl:template> | ||
184 | |||
185 | <xsl:template match="tarball"> | ||
186 | <div class="{name(.)}"> | ||
187 | <h2> | ||
188 | <xsl:value-of select="@id" /> | ||
189 | <a name="{generate-id(.)}" /> | ||
190 | </h2> | ||
191 | <table> | ||
192 | <tr> | ||
193 | <th align="left">Version:</th> | ||
194 | <td><xsl:value-of select="@version" /></td> | ||
195 | </tr> | ||
196 | <xsl:if test="@versioncheck"> | ||
197 | <tr> | ||
198 | <th align="left">Version check:</th> | ||
199 | <td><xsl:value-of select="@versioncheck" /></td> | ||
200 | </tr> | ||
201 | </xsl:if> | ||
202 | <tr> | ||
203 | <th align="left">Source:</th> | ||
204 | <td> | ||
205 | <a href="{source/@href}"> | ||
206 | <xsl:value-of select="source/@href" /> | ||
207 | </a> | ||
208 | <xsl:if test="source/@size"> | ||
209 | <xsl:text> (</xsl:text> | ||
210 | <xsl:value-of select="source/@size" /> | ||
211 | <xsl:text> bytes)</xsl:text> | ||
212 | </xsl:if> | ||
213 | </td> | ||
214 | </tr> | ||
215 | <xsl:if test="patches"> | ||
216 | <tr> | ||
217 | <th align="left" valign="top">Patches:</th> | ||
218 | <td><xsl:apply-templates select="patches" /></td> | ||
219 | </tr> | ||
220 | </xsl:if> | ||
221 | <xsl:if test="dependencies"> | ||
222 | <tr> | ||
223 | <th align="left" valign="top">Dependencies:</th> | ||
224 | <td><xsl:apply-templates select="dependencies" /></td> | ||
225 | </tr> | ||
226 | </xsl:if> | ||
227 | </table> | ||
228 | </div> | ||
229 | </xsl:template> | ||
230 | |||
231 | <xsl:template match="mozillamodule"> | ||
232 | <div class="{name(.)}"> | ||
233 | <h2> | ||
234 | <xsl:value-of select="@id" /> | ||
235 | <a name="{generate-id(.)}" /> | ||
236 | </h2> | ||
237 | <table> | ||
238 | <tr> | ||
239 | <th align="left">Module:</th> | ||
240 | <td> | ||
241 | <xsl:choose> | ||
242 | <xsl:when test="@module"> | ||
243 | <xsl:value-of select="@module" /> | ||
244 | </xsl:when> | ||
245 | <xsl:otherwise> | ||
246 | <xsl:value-of select="@id" /> | ||
247 | </xsl:otherwise> | ||
248 | </xsl:choose> | ||
249 | <xsl:if test="@revision"> | ||
250 | <xsl:text> rv:</xsl:text> | ||
251 | <xsl:value-of select="@revision" /> | ||
252 | </xsl:if> | ||
253 | </td> | ||
254 | </tr> | ||
255 | <xsl:if test="@checkoutdir"> | ||
256 | <tr> | ||
257 | <th align="left">Checkout directory:</th> | ||
258 | <td><xsl:value-of select="@checkoutdir" /></td> | ||
259 | </tr> | ||
260 | </xsl:if> | ||
261 | <xsl:if test="@autogenargs"> | ||
262 | <tr> | ||
263 | <th align="left">Autogen args:</th> | ||
264 | <td><xsl:value-of select="@autogenargs" /></td> | ||
265 | </tr> | ||
266 | </xsl:if> | ||
267 | <xsl:if test="@cvsroot"> | ||
268 | <tr> | ||
269 | <th align="left">CVS Root:</th> | ||
270 | <td><xsl:value-of select="@cvsroot" /></td> | ||
271 | </tr> | ||
272 | </xsl:if> | ||
273 | <xsl:if test="dependencies"> | ||
274 | <tr> | ||
275 | <th align="left" valign="top">Dependencies:</th> | ||
276 | <td><xsl:apply-templates select="dependencies" /></td> | ||
277 | </tr> | ||
278 | </xsl:if> | ||
279 | </table> | ||
280 | </div> | ||
281 | </xsl:template> | ||
282 | |||
283 | </xsl:stylesheet> | ||