source: BOOK/stylesheets/clfs-profile.xsl@ d4c109d

Last change on this file since d4c109d was 6d86eb1, checked in by Joe Ciccone <jciccone@…>, 14 years ago

First only output the contents section on the last build in the series. Second apply a variant to the index of the page to show up as a secondary. As well as put the word size on the secondary index. Separating the 2 with a comma if needed.

  • Property mode set to 100644
File size: 54.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:c="http://schema.cross-lfs.org/book"
4 version="1.0">
5
6 <!-- Declare our output type -->
7 <xsl:output method="xml"
8 indent="no"
9 omit-xml-declaration="no"
10 encoding="utf-8"
11 doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
12 doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" />
13
14 <xsl:param name="clfs.arch" select="''" />
15 <xsl:param name="clfs.multilib" select="''" />
16
17 <!-- Apply the other templates -->
18 <xsl:template match="@*|node()" priority="-1">
19 <xsl:copy>
20 <xsl:apply-templates select="@*|node()" />
21 </xsl:copy>
22 </xsl:template>
23
24 <!-- Build the package xml -->
25 <xsl:template match="//c:package">
26 <xsl:param name="id" select="@id" />
27 <xsl:param name="multibuild" select="@c:multibuild" />
28 <xsl:call-template name="package-iterator">
29 <xsl:with-param name="id" select="$id" />
30 <xsl:with-param name="multibuild" select="$multibuild" />
31 <xsl:with-param name="bits" select="$clfs.multilib" />
32 </xsl:call-template>
33 </xsl:template>
34
35 <xsl:template name="package-iterator">
36 <xsl:param name="id" /> <!-- Base ID of the resulting package -->
37 <xsl:param name="multibuild" /> <!-- Do we need to install for each bitsize? -->
38 <xsl:param name="bits" /> <!-- Which bit sizes to create a package for -->
39
40 <xsl:variable name="currentbits" select="substring-before(concat($bits, ','), ',')" />
41 <xsl:variable name="remainingbits" select="substring-after($bits, ',')" />
42
43 <xsl:if test="not(boolean($remainingbits) and $multibuild = 'false')">
44 <xsl:call-template name="package-stub">
45 <xsl:with-param name="id" select="$id" />
46 <xsl:with-param name="idsuffix">
47 <xsl:if test="$remainingbits">
48 <xsl:value-of select="concat('-', $currentbits)" />
49 </xsl:if>
50 </xsl:with-param>
51 <xsl:with-param name="bits" select="substring-before(concat($bits, ','), ',')" />
52 <xsl:with-param name="multibuild" select="$multibuild" />
53 <xsl:with-param name="lastinseries">
54 <xsl:choose>
55 <xsl:when test="$remainingbits">
56 <xsl:text>false</xsl:text>
57 </xsl:when>
58 <xsl:otherwise>
59 <xsl:text>true</xsl:text>
60 </xsl:otherwise>
61 </xsl:choose>
62 </xsl:with-param>
63 </xsl:call-template>
64 </xsl:if>
65
66 <xsl:if test="$remainingbits">
67 <xsl:text>
68
69 </xsl:text>
70 <xsl:call-template name="package-iterator">
71 <xsl:with-param name="id" select="$id" />
72 <xsl:with-param name="multibuild" select="$multibuild" />
73 <xsl:with-param name="bits" select="$remainingbits" />
74 </xsl:call-template>
75 </xsl:if>
76
77 </xsl:template>
78
79 <xsl:template name="package-stub">
80 <xsl:param name="id" /> <!-- Base ID of the resulting package -->
81 <xsl:param name="idsuffix" /> <!-- Suffix to attach to the end of the ID for this perticular instance -->
82 <xsl:param name="bits" /> <!-- Which bit sizes to create a package for -->
83 <xsl:param name="multibuild" /> <!-- Are there multiple instances of this package? -->
84 <xsl:param name="lastinseries" /> <!-- Is this the past package in the multilib series? -->
85
86 <!-- Translate the package into a sect1 -->
87 <xsl:element name="sect1">
88
89 <!-- Set the ID of the target Sect1 -->
90 <xsl:attribute name="id">
91 <xsl:value-of select="concat($id, $idsuffix)" />
92 </xsl:attribute>
93
94 <!-- New Line -->
95 <xsl:text>
96</xsl:text>
97
98 <!-- Set the Target Filename -->
99 <xsl:processing-instruction name="dbhtml">
100 <xsl:text>filename=&quot;</xsl:text>
101 <xsl:value-of select="concat($id, $idsuffix)" />
102 <xsl:text>.html&quot;</xsl:text>
103 </xsl:processing-instruction>
104
105 <!-- New Line x2 -->
106 <xsl:text>
107
108</xsl:text>
109
110 <!-- Determine if the title is going to have a suffix or not -->
111 <xsl:variable name="titlesuffix">
112 <xsl:if test="contains($clfs.multilib, ',') and ($multibuild = 'true')">
113 <xsl:choose>
114 <xsl:when test="$bits = '32'">
115 <xsl:text>32Bit</xsl:text>
116 </xsl:when>
117 <xsl:when test="$bits = 'n32'">
118 <xsl:text>N32</xsl:text>
119 </xsl:when>
120 <xsl:when test="$bits = '64'">
121 <xsl:text>64Bit</xsl:text>
122 </xsl:when>
123 </xsl:choose>
124 </xsl:if>
125 </xsl:variable>
126
127 <!-- title: Write out a new title tag -->
128 <xsl:element name="title">
129 <xsl:value-of select="c:title" />
130 <xsl:text>-</xsl:text>
131 <xsl:value-of select="c:version" />
132 <xsl:if test="string-length($titlesuffix) > 0">
133 <xsl:text> - </xsl:text>
134 <xsl:value-of select="$titlesuffix"/>
135 </xsl:if>
136 </xsl:element><!-- title -->
137
138 <!-- New Line x2 -->
139 <xsl:text>
140
141</xsl:text>
142
143 <!-- indexterm: Add the Intex Entry for this package -->
144 <xsl:element name="indexterm">
145 <xsl:attribute name="zone">
146 <xsl:value-of select="concat($id, $idsuffix)" />
147 </xsl:attribute>
148 <xsl:text>
149 </xsl:text>
150 <xsl:element name="primary">
151 <xsl:attribute name="sortas">
152 <xsl:text>a-</xsl:text>
153 <xsl:value-of select="c:title" />
154 </xsl:attribute>
155 <xsl:value-of select="c:title" />
156 </xsl:element>
157 <xsl:if test="(string-length($titlesuffix) &gt; 0 and $lastinseries = 'false') or c:variant">
158 <xsl:text>
159 </xsl:text>
160 <xsl:element name="secondary">
161 <xsl:if test="c:variant">
162 <xsl:value-of select="c:variant" />
163 </xsl:if>
164 <xsl:if test="string-length($titlesuffix) &gt; 0 and $lastinseries = 'false'">
165 <xsl:if test="c:variant">
166 <xsl:text>, </xsl:text>
167 </xsl:if>
168 <xsl:value-of select="$titlesuffix" />
169 </xsl:if>
170 </xsl:element>
171 </xsl:if>
172 <xsl:text>
173</xsl:text>
174 </xsl:element><!-- indexterm -->
175
176 <!-- New Line x2 -->
177 <xsl:text>
178
179</xsl:text>
180
181 <!-- sect2[role="installation"]: Add the sect2 for the package header -->
182 <xsl:element name="sect2">
183 <xsl:attribute name="role">
184 <xsl:text>package</xsl:text>
185 </xsl:attribute>
186 <xsl:text>
187 </xsl:text>
188 <xsl:element name="title" />
189 <xsl:text>
190
191 </xsl:text>
192 <xsl:element name="para">
193 <xsl:choose>
194 <xsl:when test="$bits = '32'">
195 <xsl:apply-templates select="c:description/@*|c:description/node()" mode="filter-bits-32" />
196 </xsl:when>
197 <xsl:when test="$bits = 'n32'">
198 <xsl:apply-templates select="c:description/@*|c:description/node()" mode="filter-bits-n32" />
199 </xsl:when>
200 <xsl:when test="$bits = '64'">
201 <xsl:apply-templates select="c:description/@*|c:description/node()" mode="filter-bits-64" />
202 </xsl:when>
203 </xsl:choose>
204 </xsl:element>
205 <xsl:text>
206
207</xsl:text>
208 </xsl:element>
209
210 <!-- New Line x2 -->
211 <xsl:text>
212
213</xsl:text>
214
215 <!-- c:install -> sect2: For each c:install build a sect2 section -->
216 <xsl:for-each select="c:install">
217 <xsl:element name="sect2">
218 <xsl:text>
219 </xsl:text>
220 <xsl:element name="title">
221 <xsl:attribute name="role">
222 <xsl:text>installation</xsl:text>
223 </xsl:attribute>
224 <xsl:text>Installation of </xsl:text>
225 <xsl:value-of select="../c:title" />
226 </xsl:element>
227 <xsl:text>
228
229</xsl:text>
230 <xsl:choose>
231 <xsl:when test="$bits = '32'">
232 <xsl:apply-templates select="@*|node()" mode="filter-bits-32" />
233 </xsl:when>
234 <xsl:when test="$bits = 'n32'">
235 <xsl:apply-templates select="@*|node()" mode="filter-bits-n32" />
236 </xsl:when>
237 <xsl:when test="$bits = '64'">
238 <xsl:apply-templates select="@*|node()" mode="filter-bits-64" />
239 </xsl:when>
240 </xsl:choose>
241 <xsl:text>
242</xsl:text>
243 </xsl:element>
244 </xsl:for-each><!-- c:install -> sect2 -->
245
246 <!-- c:config -> sect2: For each c:config build a sect2 section -->
247 <xsl:for-each select="c:config">
248 <xsl:element name="sect2">
249 <xsl:attribute name="id">
250 <xsl:value-of select="$id"/>
251 <xsl:text>-conf</xsl:text>
252 </xsl:attribute>
253 <xsl:text>
254 </xsl:text>
255 <xsl:element name="title">
256 <xsl:attribute name="role">
257 <xsl:text>configuration</xsl:text>
258 </xsl:attribute>
259 <xsl:text>Configuring </xsl:text>
260 <xsl:value-of select="../c:title" />
261 </xsl:element>
262 <xsl:text>
263
264</xsl:text>
265 <xsl:choose>
266 <xsl:when test="$bits = '32'">
267 <xsl:apply-templates select="@*|node()" mode="filter-bits-32" />
268 </xsl:when>
269 <xsl:when test="$bits = 'n32'">
270 <xsl:apply-templates select="@*|node()" mode="filter-bits-n32" />
271 </xsl:when>
272 <xsl:when test="$bits = '64'">
273 <xsl:apply-templates select="@*|node()" mode="filter-bits-64" />
274 </xsl:when>
275 </xsl:choose>
276 <xsl:text>
277</xsl:text>
278 </xsl:element>
279 </xsl:for-each><!-- c:config -> sect2 -->
280
281 <!-- c:contents -> sect2: Build or reference the contents sect2 -->
282 <xsl:for-each select="c:contents">
283
284 <xsl:text>&#xa;&#xa;</xsl:text>
285
286 <xsl:element name="sect2">
287 <xsl:attribute name="role">
288 <xsl:text>content</xsl:text>
289 </xsl:attribute>
290 <xsl:choose>
291 <xsl:when test="string-length(@c:ref) > 0 or $lastinseries = 'false'">
292 <!-- Insert an xref to the actual contents list -->
293 <xsl:text>&#xa; </xsl:text>
294 <xsl:element name="title" />
295 <xsl:text>&#xa;&#xa; </xsl:text>
296 <xsl:element name="para">
297 <xsl:text>Details on this package are located in </xsl:text>
298 <xsl:element name="xref">
299 <xsl:attribute name="linkend">
300 <xsl:choose>
301 <xsl:when test="string-length(@c:ref) > 0">
302 <xsl:value-of select="@c:ref" />
303 </xsl:when>
304 <xsl:otherwise>
305 <xsl:value-of select="$id" />
306 </xsl:otherwise>
307 </xsl:choose>
308 <xsl:text>-contents</xsl:text>
309 </xsl:attribute>
310 <xsl:attribute name="role">
311 <xsl:text>.</xsl:text>
312 </xsl:attribute>
313 </xsl:element>
314 </xsl:element>
315 </xsl:when>
316 <xsl:otherwise>
317 <!-- This page gets the contents list -->
318 <xsl:attribute name="id">
319 <xsl:value-of select="$id" />
320 <xsl:text>-contents</xsl:text>
321 </xsl:attribute>
322 <xsl:text>&#xa; </xsl:text>
323 <xsl:element name="title">
324 <xsl:text>Contents of </xsl:text>
325 <xsl:value-of select="../c:title" />
326 </xsl:element>
327 <xsl:text>&#xa;&#xa;</xsl:text>
328 <!-- Begin the Summary List -->
329 <xsl:element name="segmentedlist">
330 <xsl:if test="count(c:program) &gt; 0">
331 <xsl:text>&#xa; </xsl:text>
332 <xsl:element name="segtitle">
333 <xsl:text>Installed Programs</xsl:text>
334 </xsl:element>
335 </xsl:if>
336 <xsl:if test="count(c:library) &gt; 0">
337 <xsl:text>&#xa; </xsl:text>
338 <xsl:element name="segtitle">
339 <xsl:text>Installed Libraries</xsl:text>
340 </xsl:element>
341 </xsl:if>
342 <xsl:if test="count(c:directory) &gt; 0">
343 <xsl:text>&#xa; </xsl:text>
344 <xsl:element name="segtitle">
345 <xsl:text>Installed Directories</xsl:text>
346 </xsl:element>
347 </xsl:if>
348 <xsl:text>&#xa;&#xa; </xsl:text>
349 <xsl:element name="seglistitem">
350
351 <!-- Begin the seg list for Programs -->
352 <xsl:if test="count(c:program) &gt; 0">
353 <xsl:text>&#xa; </xsl:text>
354 <xsl:element name="seg">
355 <xsl:for-each select="c:program">
356 <xsl:value-of select="c:name" />
357 <xsl:if test="count(../c:program) &gt; 1">
358 <xsl:choose>
359 <xsl:when test="position() &lt; (last() - 1)">
360 <xsl:text>, </xsl:text>
361 </xsl:when>
362 <xsl:when test="position() = last() - 1">
363 <xsl:text> and </xsl:text>
364 </xsl:when>
365 </xsl:choose>
366 </xsl:if>
367 </xsl:for-each>
368 </xsl:element>
369 </xsl:if>
370 <!-- End the seg list for Programs -->
371
372 <!-- Begin the seg list for Libraries -->
373 <xsl:if test="count(c:library) &gt; 0">
374 <xsl:text>&#xa; </xsl:text>
375 <xsl:element name="seg">
376 <xsl:for-each select="c:library">
377 <xsl:value-of select="c:name" />
378 <xsl:if test="count(../c:library) &gt; 1">
379 <xsl:choose>
380 <xsl:when test="position() &lt; (last() - 1)">
381 <xsl:text>, </xsl:text>
382 </xsl:when>
383 <xsl:when test="position() = last() - 1">
384 <xsl:text> and </xsl:text>
385 </xsl:when>
386 </xsl:choose>
387 </xsl:if>
388 </xsl:for-each>
389 </xsl:element>
390 </xsl:if>
391 <!-- End the seg list for Libraries -->
392
393 <!-- Begin the seg list for Directories -->
394 <xsl:if test="count(c:directory) &gt; 0">
395 <xsl:text>&#xa; </xsl:text>
396 <xsl:element name="seg">
397 <xsl:for-each select="c:directory">
398 <xsl:value-of select="c:name" />
399 <xsl:if test="count(../c:directory) &gt; 1">
400 <xsl:if test="position() &lt; (last() - 1)">
401 <xsl:text>, </xsl:text>
402 </xsl:if>
403 <xsl:if test="position() = last() - 1">
404 <xsl:text> and </xsl:text>
405 </xsl:if>
406 </xsl:if>
407 </xsl:for-each>
408 </xsl:element>
409 </xsl:if>
410 <!-- End the seg list for Directories -->
411
412 <xsl:text>&#xa; </xsl:text>
413 </xsl:element>
414 <xsl:text>&#xa;</xsl:text>
415 </xsl:element>
416 <xsl:text>&#xa;&#xa;</xsl:text>
417 <!-- End of the Summary List -->
418
419 <!-- Begin Short Desc List -->
420 <xsl:element name="variablelist">
421
422 <!-- Render As -->
423 <xsl:text>&#xa; </xsl:text>
424 <xsl:element name="bridgehead">
425 <xsl:attribute name="renderas">
426 <xsl:text>sect3</xsl:text>
427 </xsl:attribute>
428 <xsl:text>Short Descriptions</xsl:text>
429 </xsl:element>
430
431 <!-- Processing Instructions -->
432 <xsl:text>&#xa; </xsl:text>
433 <xsl:processing-instruction name="dbfo">
434 <xsl:text>list-presentation="list"</xsl:text>
435 </xsl:processing-instruction>
436 <xsl:text>&#xa; </xsl:text>
437 <xsl:processing-instruction name="dbhtml">
438 <xsl:text>list-presentation="table"</xsl:text>
439 </xsl:processing-instruction>
440
441 <!-- Begin the Short Desc For-Each for Programs -->
442 <xsl:for-each select="c:program">
443 <xsl:text>&#xa;&#xa; </xsl:text>
444 <xsl:element name="varlistentry">
445 <xsl:attribute name="id">
446 <xsl:value-of select="c:name" />
447 </xsl:attribute>
448
449 <!-- Term -->
450 <xsl:text>&#xa; </xsl:text>
451 <xsl:element name="term">
452 <xsl:element name="command">
453 <xsl:value-of select="c:name" />
454 </xsl:element>
455 </xsl:element>
456 <!-- End Term -->
457
458 <!-- List Item -->
459 <xsl:text>&#xa; </xsl:text>
460 <xsl:element name="listitem">
461
462 <xsl:text>&#xa; </xsl:text>
463 <xsl:element name="para">
464 <xsl:apply-templates select="c:description/@*|c:description/node()" />
465 </xsl:element>
466
467 <xsl:text>&#xa; </xsl:text>
468 <xsl:element name="indexterm">
469 <xsl:attribute name="zone">
470 <xsl:value-of select="$id" />
471 <xsl:text> </xsl:text>
472 <xsl:value-of select="c:name" />
473 </xsl:attribute>
474 <xsl:text>&#xa; </xsl:text>
475 <xsl:element name="primary">
476 <xsl:attribute name="sortas">
477 <xsl:text>b-</xsl:text>
478 <xsl:value-of select="c:name" />
479 </xsl:attribute>
480 <xsl:value-of select="c:name" />
481 </xsl:element>
482 <xsl:text>&#xa; </xsl:text>
483 </xsl:element>
484
485 <xsl:text>&#xa; </xsl:text>
486 </xsl:element><!-- listitem -->
487 <!-- End List Item -->
488
489 <xsl:text>&#xa; </xsl:text>
490 </xsl:element><!-- varlistentry -->
491 </xsl:for-each>
492 <!-- End the Short Desc For-Each for Programs -->
493
494 <!-- Begin the Short Desc For-Each for Libraries -->
495 <xsl:for-each select="c:library">
496 <xsl:text>&#xa;&#xa; </xsl:text>
497 <xsl:element name="varlistentry">
498 <xsl:attribute name="id">
499 <xsl:value-of select="c:name" />
500 </xsl:attribute>
501
502 <!-- Term -->
503 <xsl:text>&#xa; </xsl:text>
504 <xsl:element name="term">
505 <xsl:element name="filename">
506 <xsl:attribute name="class">
507 <xsl:text>libraryfile</xsl:text>
508 </xsl:attribute>
509 <xsl:value-of select="c:name" />
510 </xsl:element>
511 </xsl:element>
512 <!-- End Term -->
513
514 <!-- List Item -->
515 <xsl:text>&#xa; </xsl:text>
516 <xsl:element name="listitem">
517
518 <xsl:text>&#xa; </xsl:text>
519 <xsl:element name="para">
520 <xsl:apply-templates select="c:description/@*|c:description/node()" />
521 </xsl:element>
522
523 <xsl:text>&#xa; </xsl:text>
524 <xsl:element name="indexterm">
525 <xsl:attribute name="zone">
526 <xsl:value-of select="$id" />
527 <xsl:text> </xsl:text>
528 <xsl:value-of select="c:name" />
529 </xsl:attribute>
530 <xsl:text>&#xa; </xsl:text>
531 <xsl:element name="primary">
532 <xsl:attribute name="sortas">
533 <xsl:text>c-</xsl:text>
534 <xsl:value-of select="c:name" />
535 </xsl:attribute>
536 <xsl:value-of select="c:name" />
537 </xsl:element>
538 <xsl:text>&#xa; </xsl:text>
539 </xsl:element>
540
541 <xsl:text>&#xa; </xsl:text>
542 </xsl:element><!-- listitem -->
543 <!-- End List Item -->
544
545 <xsl:text>&#xa; </xsl:text>
546 </xsl:element><!-- varlistentry -->
547 </xsl:for-each>
548 <!-- End the Short Desc For-Each for Libraries -->
549
550 <!-- Begin the Short Desc For-Each for Directories -->
551 <xsl:for-each select="c:directory">
552 <xsl:text>&#xa;&#xa; </xsl:text>
553 <xsl:element name="varlistentry">
554 <xsl:attribute name="id">
555 <xsl:text>dir</xsl:text>
556 <xsl:value-of select="translate(c:name, '/', '-')" />
557 </xsl:attribute>
558
559 <!-- Term -->
560 <xsl:text>&#xa; </xsl:text>
561 <xsl:element name="term">
562 <xsl:element name="filename">
563 <xsl:attribute name="class">
564 <xsl:text>directory</xsl:text>
565 </xsl:attribute>
566 <xsl:value-of select="c:name" />
567 </xsl:element>
568 </xsl:element>
569 <!-- End Term -->
570
571 <!-- List Item -->
572 <xsl:text>&#xa; </xsl:text>
573 <xsl:element name="listitem">
574
575 <xsl:text>&#xa; </xsl:text>
576 <xsl:element name="para">
577 <xsl:apply-templates select="c:description/@*|c:description/node()" />
578 </xsl:element>
579
580 <xsl:text>&#xa; </xsl:text>
581 <xsl:element name="indexterm">
582 <xsl:attribute name="zone">
583 <xsl:value-of select="$id" />
584 <xsl:text> dir</xsl:text>
585 <xsl:value-of select="translate(c:name, '/', '-')" />
586 </xsl:attribute>
587 <xsl:text>&#xa; </xsl:text>
588 <xsl:element name="primary">
589 <xsl:attribute name="sortas">
590 <xsl:text>e-</xsl:text>
591 <xsl:value-of select="c:name" />
592 </xsl:attribute>
593 <xsl:value-of select="c:name" />
594 </xsl:element>
595 <xsl:text>&#xa; </xsl:text>
596 </xsl:element>
597
598 <xsl:text>&#xa; </xsl:text>
599 </xsl:element><!-- listitem -->
600 <!-- End List Item -->
601
602 <xsl:text>&#xa; </xsl:text>
603 </xsl:element><!-- varlistentry -->
604 </xsl:for-each>
605 <!-- End the Short Desc For-Each for Directories -->
606
607 <xsl:text>&#xa;&#xa;</xsl:text>
608 </xsl:element><!-- variablelist -->
609 <!-- End Short Desc List -->
610 </xsl:otherwise>
611 </xsl:choose>
612
613 <xsl:text>&#xa;&#xa;</xsl:text>
614 </xsl:element><!-- sect2 -->
615 </xsl:for-each><!-- c:contents -> sect2 -->
616
617 <xsl:text>&#xa;&#xa;</xsl:text>
618
619 </xsl:element><!-- Sect1 -->
620
621 </xsl:template><!-- package-stub -->
622
623 <!-- Apply the profile to the 32bit package -->
624
625 <xsl:template match="c:para" mode="filter-bits-32">
626 <xsl:variable name="ismultilib">
627 <xsl:choose>
628 <xsl:when test="contains($clfs.multilib, ',')">
629 <xsl:text>true</xsl:text>
630 </xsl:when>
631 <xsl:otherwise>
632 <xsl:text>false</xsl:text>
633 </xsl:otherwise>
634 </xsl:choose>
635 </xsl:variable>
636 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
637 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
638 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
639 <xsl:element name="para">
640 <xsl:apply-templates select="node()" mode="filter-bits-32" />
641 </xsl:element>
642 </xsl:if>
643 </xsl:if>
644 </xsl:if>
645 </xsl:template>
646
647 <xsl:template match="c:note" mode="filter-bits-32">
648 <xsl:variable name="ismultilib">
649 <xsl:choose>
650 <xsl:when test="contains($clfs.multilib, ',')">
651 <xsl:text>true</xsl:text>
652 </xsl:when>
653 <xsl:otherwise>
654 <xsl:text>false</xsl:text>
655 </xsl:otherwise>
656 </xsl:choose>
657 </xsl:variable>
658 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
659 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
660 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
661 <xsl:element name="note">
662 <xsl:apply-templates select="node()" mode="filter-bits-32" />
663 </xsl:element>
664 </xsl:if>
665 </xsl:if>
666 </xsl:if>
667 </xsl:template>
668
669 <xsl:template match="c:warning" mode="filter-bits-32">
670 <xsl:variable name="ismultilib">
671 <xsl:choose>
672 <xsl:when test="contains($clfs.multilib, ',')">
673 <xsl:text>true</xsl:text>
674 </xsl:when>
675 <xsl:otherwise>
676 <xsl:text>false</xsl:text>
677 </xsl:otherwise>
678 </xsl:choose>
679 </xsl:variable>
680 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
681 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
682 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
683 <xsl:element name="warning">
684 <xsl:apply-templates select="node()" mode="filter-bits-32" />
685 </xsl:element>
686 </xsl:if>
687 </xsl:if>
688 </xsl:if>
689 </xsl:template>
690
691 <xsl:template match="c:install/c:command" mode="filter-bits-32">
692 <xsl:variable name="ismultilib">
693 <xsl:choose>
694 <xsl:when test="contains($clfs.multilib, ',')">
695 <xsl:text>true</xsl:text>
696 </xsl:when>
697 <xsl:otherwise>
698 <xsl:text>false</xsl:text>
699 </xsl:otherwise>
700 </xsl:choose>
701 </xsl:variable>
702 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
703 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
704 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
705 <xsl:element name="screen">
706 <xsl:if test="@c:nodump = 'true'">
707 <xsl:attribute name="role">
708 <xsl:text>nodump</xsl:text>
709 </xsl:attribute>
710 </xsl:if>
711 <xsl:element name="userinput">
712 <xsl:apply-templates select="node()" mode="filter-bits-32" />
713 </xsl:element>
714 </xsl:element>
715 </xsl:if>
716 </xsl:if>
717 </xsl:if>
718 </xsl:template>
719
720 <xsl:template match="c:literal" mode="filter-bits-32">
721 <xsl:variable name="ismultilib">
722 <xsl:choose>
723 <xsl:when test="contains($clfs.multilib, ',')">
724 <xsl:text>true</xsl:text>
725 </xsl:when>
726 <xsl:otherwise>
727 <xsl:text>false</xsl:text>
728 </xsl:otherwise>
729 </xsl:choose>
730 </xsl:variable>
731 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
732 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
733 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
734 <xsl:element name="literal">
735 <xsl:apply-templates select="node()" mode="filter-bits-32" />
736 </xsl:element>
737 </xsl:if>
738 </xsl:if>
739 </xsl:if>
740 </xsl:template>
741
742 <xsl:template match="c:replaceable" mode="filter-bits-32">
743 <xsl:variable name="ismultilib">
744 <xsl:choose>
745 <xsl:when test="contains($clfs.multilib, ',')">
746 <xsl:text>true</xsl:text>
747 </xsl:when>
748 <xsl:otherwise>
749 <xsl:text>false</xsl:text>
750 </xsl:otherwise>
751 </xsl:choose>
752 </xsl:variable>
753 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
754 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
755 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
756 <xsl:element name="replaceable">
757 <xsl:apply-templates select="node()" mode="filter-bits-32" />
758 </xsl:element>
759 </xsl:if>
760 </xsl:if>
761 </xsl:if>
762 </xsl:template>
763
764 <xsl:template match="c:application" mode="filter-bits-32">
765 <xsl:variable name="ismultilib">
766 <xsl:choose>
767 <xsl:when test="contains($clfs.multilib, ',')">
768 <xsl:text>true</xsl:text>
769 </xsl:when>
770 <xsl:otherwise>
771 <xsl:text>false</xsl:text>
772 </xsl:otherwise>
773 </xsl:choose>
774 </xsl:variable>
775 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
776 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
777 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
778 <xsl:element name="application">
779 <xsl:apply-templates select="node()" mode="filter-bits-32" />
780 </xsl:element>
781 </xsl:if>
782 </xsl:if>
783 </xsl:if>
784 </xsl:template>
785
786 <xsl:template match="c:dirname" mode="filter-bits-32">
787 <xsl:variable name="ismultilib">
788 <xsl:choose>
789 <xsl:when test="contains($clfs.multilib, ',')">
790 <xsl:text>true</xsl:text>
791 </xsl:when>
792 <xsl:otherwise>
793 <xsl:text>false</xsl:text>
794 </xsl:otherwise>
795 </xsl:choose>
796 </xsl:variable>
797 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
798 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
799 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
800 <xsl:element name="filename">
801 <xsl:attribute name="class">
802 <xsl:text>directory</xsl:text>
803 </xsl:attribute>
804 <xsl:apply-templates select="node()" mode="filter-bits-32" />
805 </xsl:element>
806 </xsl:if>
807 </xsl:if>
808 </xsl:if>
809 </xsl:template>
810
811 <xsl:template match="c:filename" mode="filter-bits-32">
812 <xsl:variable name="ismultilib">
813 <xsl:choose>
814 <xsl:when test="contains($clfs.multilib, ',')">
815 <xsl:text>true</xsl:text>
816 </xsl:when>
817 <xsl:otherwise>
818 <xsl:text>false</xsl:text>
819 </xsl:otherwise>
820 </xsl:choose>
821 </xsl:variable>
822 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
823 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
824 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
825 <xsl:element name="filename">
826 <xsl:apply-templates select="node()" mode="filter-bits-32" />
827 </xsl:element>
828 </xsl:if>
829 </xsl:if>
830 </xsl:if>
831 </xsl:template>
832
833 <xsl:template match="c:command" mode="filter-bits-32">
834 <xsl:variable name="ismultilib">
835 <xsl:choose>
836 <xsl:when test="contains($clfs.multilib, ',')">
837 <xsl:text>true</xsl:text>
838 </xsl:when>
839 <xsl:otherwise>
840 <xsl:text>false</xsl:text>
841 </xsl:otherwise>
842 </xsl:choose>
843 </xsl:variable>
844 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
845 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
846 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
847 <xsl:element name="command">
848 <xsl:apply-templates select="node()" mode="filter-bits-32" />
849 </xsl:element>
850 </xsl:if>
851 </xsl:if>
852 </xsl:if>
853 </xsl:template>
854
855 <xsl:template match="@c:arch" mode="filter-bits-32" />
856 <xsl:template match="@c:bits" mode="filter-bits-32" />
857 <xsl:template match="@c:multilib" mode="filter-bits-32" />
858
859 <!-- Apply the profile to the n32 package -->
860
861 <xsl:template match="c:para" mode="filter-bits-n32">
862 <xsl:variable name="ismultilib">
863 <xsl:choose>
864 <xsl:when test="contains($clfs.multilib, ',')">
865 <xsl:text>true</xsl:text>
866 </xsl:when>
867 <xsl:otherwise>
868 <xsl:text>false</xsl:text>
869 </xsl:otherwise>
870 </xsl:choose>
871 </xsl:variable>
872 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
873 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
874 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
875 <xsl:element name="para">
876 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
877 </xsl:element>
878 </xsl:if>
879 </xsl:if>
880 </xsl:if>
881 </xsl:template>
882
883 <xsl:template match="c:note" mode="filter-bits-n32">
884 <xsl:variable name="ismultilib">
885 <xsl:choose>
886 <xsl:when test="contains($clfs.multilib, ',')">
887 <xsl:text>true</xsl:text>
888 </xsl:when>
889 <xsl:otherwise>
890 <xsl:text>false</xsl:text>
891 </xsl:otherwise>
892 </xsl:choose>
893 </xsl:variable>
894 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
895 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
896 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
897 <xsl:element name="note">
898 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
899 </xsl:element>
900 </xsl:if>
901 </xsl:if>
902 </xsl:if>
903 </xsl:template>
904
905 <xsl:template match="c:warning" mode="filter-bits-n32">
906 <xsl:variable name="ismultilib">
907 <xsl:choose>
908 <xsl:when test="contains($clfs.multilib, ',')">
909 <xsl:text>true</xsl:text>
910 </xsl:when>
911 <xsl:otherwise>
912 <xsl:text>false</xsl:text>
913 </xsl:otherwise>
914 </xsl:choose>
915 </xsl:variable>
916 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
917 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
918 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
919 <xsl:element name="warning">
920 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
921 </xsl:element>
922 </xsl:if>
923 </xsl:if>
924 </xsl:if>
925 </xsl:template>
926
927 <xsl:template match="c:install/c:command" mode="filter-bits-n32">
928 <xsl:variable name="ismultilib">
929 <xsl:choose>
930 <xsl:when test="contains($clfs.multilib, ',')">
931 <xsl:text>true</xsl:text>
932 </xsl:when>
933 <xsl:otherwise>
934 <xsl:text>false</xsl:text>
935 </xsl:otherwise>
936 </xsl:choose>
937 </xsl:variable>
938 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
939 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
940 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
941 <xsl:element name="screen">
942 <xsl:if test="@c:nodump = 'true'">
943 <xsl:attribute name="role">
944 <xsl:text>nodump</xsl:text>
945 </xsl:attribute>
946 </xsl:if>
947 <xsl:element name="userinput">
948 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
949 </xsl:element>
950 </xsl:element>
951 </xsl:if>
952 </xsl:if>
953 </xsl:if>
954 </xsl:template>
955
956 <xsl:template match="c:literal" mode="filter-bits-n32">
957 <xsl:variable name="ismultilib">
958 <xsl:choose>
959 <xsl:when test="contains($clfs.multilib, ',')">
960 <xsl:text>true</xsl:text>
961 </xsl:when>
962 <xsl:otherwise>
963 <xsl:text>false</xsl:text>
964 </xsl:otherwise>
965 </xsl:choose>
966 </xsl:variable>
967 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
968 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
969 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
970 <xsl:element name="literal">
971 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
972 </xsl:element>
973 </xsl:if>
974 </xsl:if>
975 </xsl:if>
976 </xsl:template>
977
978 <xsl:template match="c:replaceable" mode="filter-bits-n32">
979 <xsl:variable name="ismultilib">
980 <xsl:choose>
981 <xsl:when test="contains($clfs.multilib, ',')">
982 <xsl:text>true</xsl:text>
983 </xsl:when>
984 <xsl:otherwise>
985 <xsl:text>false</xsl:text>
986 </xsl:otherwise>
987 </xsl:choose>
988 </xsl:variable>
989 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
990 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
991 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
992 <xsl:element name="replaceable">
993 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
994 </xsl:element>
995 </xsl:if>
996 </xsl:if>
997 </xsl:if>
998 </xsl:template>
999
1000 <xsl:template match="c:application" mode="filter-bits-n32">
1001 <xsl:variable name="ismultilib">
1002 <xsl:choose>
1003 <xsl:when test="contains($clfs.multilib, ',')">
1004 <xsl:text>true</xsl:text>
1005 </xsl:when>
1006 <xsl:otherwise>
1007 <xsl:text>false</xsl:text>
1008 </xsl:otherwise>
1009 </xsl:choose>
1010 </xsl:variable>
1011 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1012 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1013 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
1014 <xsl:element name="application">
1015 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
1016 </xsl:element>
1017 </xsl:if>
1018 </xsl:if>
1019 </xsl:if>
1020 </xsl:template>
1021
1022 <xsl:template match="c:dirname" mode="filter-bits-n32">
1023 <xsl:variable name="ismultilib">
1024 <xsl:choose>
1025 <xsl:when test="contains($clfs.multilib, ',')">
1026 <xsl:text>true</xsl:text>
1027 </xsl:when>
1028 <xsl:otherwise>
1029 <xsl:text>false</xsl:text>
1030 </xsl:otherwise>
1031 </xsl:choose>
1032 </xsl:variable>
1033 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1034 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1035 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
1036 <xsl:element name="filename">
1037 <xsl:attribute name="class">
1038 <xsl:text>directory</xsl:text>
1039 </xsl:attribute>
1040 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
1041 </xsl:element>
1042 </xsl:if>
1043 </xsl:if>
1044 </xsl:if>
1045 </xsl:template>
1046
1047 <xsl:template match="c:filename" mode="filter-bits-n32">
1048 <xsl:variable name="ismultilib">
1049 <xsl:choose>
1050 <xsl:when test="contains($clfs.multilib, ',')">
1051 <xsl:text>true</xsl:text>
1052 </xsl:when>
1053 <xsl:otherwise>
1054 <xsl:text>false</xsl:text>
1055 </xsl:otherwise>
1056 </xsl:choose>
1057 </xsl:variable>
1058 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1059 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1060 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
1061 <xsl:element name="filename">
1062 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
1063 </xsl:element>
1064 </xsl:if>
1065 </xsl:if>
1066 </xsl:if>
1067 </xsl:template>
1068
1069 <xsl:template match="c:command" mode="filter-bits-n32">
1070 <xsl:variable name="ismultilib">
1071 <xsl:choose>
1072 <xsl:when test="contains($clfs.multilib, ',')">
1073 <xsl:text>true</xsl:text>
1074 </xsl:when>
1075 <xsl:otherwise>
1076 <xsl:text>false</xsl:text>
1077 </xsl:otherwise>
1078 </xsl:choose>
1079 </xsl:variable>
1080 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1081 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1082 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
1083 <xsl:element name="command">
1084 <xsl:apply-templates select="node()" mode="filter-bits-n32" />
1085 </xsl:element>
1086 </xsl:if>
1087 </xsl:if>
1088 </xsl:if>
1089 </xsl:template>
1090
1091 <xsl:template match="@c:arch" mode="filter-bits-n32" />
1092 <xsl:template match="@c:bits" mode="filter-bits-n32" />
1093 <xsl:template match="@c:multilib" mode="filter-bits-n32" />
1094
1095 <!-- Apply the profile to the 64bit package -->
1096
1097 <xsl:template match="c:para" mode="filter-bits-64">
1098 <xsl:variable name="ismultilib">
1099 <xsl:choose>
1100 <xsl:when test="contains($clfs.multilib, ',')">
1101 <xsl:text>true</xsl:text>
1102 </xsl:when>
1103 <xsl:otherwise>
1104 <xsl:text>false</xsl:text>
1105 </xsl:otherwise>
1106 </xsl:choose>
1107 </xsl:variable>
1108 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1109 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1110 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1111 <xsl:element name="para">
1112 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1113 </xsl:element>
1114 </xsl:if>
1115 </xsl:if>
1116 </xsl:if>
1117 </xsl:template>
1118
1119 <xsl:template match="c:note" mode="filter-bits-64">
1120 <xsl:variable name="ismultilib">
1121 <xsl:choose>
1122 <xsl:when test="contains($clfs.multilib, ',')">
1123 <xsl:text>true</xsl:text>
1124 </xsl:when>
1125 <xsl:otherwise>
1126 <xsl:text>false</xsl:text>
1127 </xsl:otherwise>
1128 </xsl:choose>
1129 </xsl:variable>
1130 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1131 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1132 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1133 <xsl:element name="note">
1134 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1135 </xsl:element>
1136 </xsl:if>
1137 </xsl:if>
1138 </xsl:if>
1139 </xsl:template>
1140
1141 <xsl:template match="c:warning" mode="filter-bits-64">
1142 <xsl:variable name="ismultilib">
1143 <xsl:choose>
1144 <xsl:when test="contains($clfs.multilib, ',')">
1145 <xsl:text>true</xsl:text>
1146 </xsl:when>
1147 <xsl:otherwise>
1148 <xsl:text>false</xsl:text>
1149 </xsl:otherwise>
1150 </xsl:choose>
1151 </xsl:variable>
1152 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1153 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1154 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1155 <xsl:element name="warning">
1156 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1157 </xsl:element>
1158 </xsl:if>
1159 </xsl:if>
1160 </xsl:if>
1161 </xsl:template>
1162
1163 <xsl:template match="c:install/c:command" mode="filter-bits-64">
1164 <xsl:variable name="ismultilib">
1165 <xsl:choose>
1166 <xsl:when test="contains($clfs.multilib, ',')">
1167 <xsl:text>true</xsl:text>
1168 </xsl:when>
1169 <xsl:otherwise>
1170 <xsl:text>false</xsl:text>
1171 </xsl:otherwise>
1172 </xsl:choose>
1173 </xsl:variable>
1174 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1175 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1176 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1177 <xsl:element name="screen">
1178 <xsl:if test="@c:nodump = 'true'">
1179 <xsl:attribute name="role">
1180 <xsl:text>nodump</xsl:text>
1181 </xsl:attribute>
1182 </xsl:if>
1183 <xsl:element name="userinput">
1184 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1185 </xsl:element>
1186 </xsl:element>
1187 </xsl:if>
1188 </xsl:if>
1189 </xsl:if>
1190 </xsl:template>
1191
1192 <xsl:template match="c:literal" mode="filter-bits-64">
1193 <xsl:variable name="ismultilib">
1194 <xsl:choose>
1195 <xsl:when test="contains($clfs.multilib, ',')">
1196 <xsl:text>true</xsl:text>
1197 </xsl:when>
1198 <xsl:otherwise>
1199 <xsl:text>false</xsl:text>
1200 </xsl:otherwise>
1201 </xsl:choose>
1202 </xsl:variable>
1203 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1204 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1205 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1206 <xsl:element name="literal">
1207 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1208 </xsl:element>
1209 </xsl:if>
1210 </xsl:if>
1211 </xsl:if>
1212 </xsl:template>
1213
1214 <xsl:template match="c:replaceable" mode="filter-bits-64">
1215 <xsl:variable name="ismultilib">
1216 <xsl:choose>
1217 <xsl:when test="contains($clfs.multilib, ',')">
1218 <xsl:text>true</xsl:text>
1219 </xsl:when>
1220 <xsl:otherwise>
1221 <xsl:text>false</xsl:text>
1222 </xsl:otherwise>
1223 </xsl:choose>
1224 </xsl:variable>
1225 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1226 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1227 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1228 <xsl:element name="replaceable">
1229 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1230 </xsl:element>
1231 </xsl:if>
1232 </xsl:if>
1233 </xsl:if>
1234 </xsl:template>
1235
1236 <xsl:template match="c:application" mode="filter-bits-64">
1237 <xsl:variable name="ismultilib">
1238 <xsl:choose>
1239 <xsl:when test="contains($clfs.multilib, ',')">
1240 <xsl:text>true</xsl:text>
1241 </xsl:when>
1242 <xsl:otherwise>
1243 <xsl:text>false</xsl:text>
1244 </xsl:otherwise>
1245 </xsl:choose>
1246 </xsl:variable>
1247 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1248 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1249 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1250 <xsl:element name="application">
1251 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1252 </xsl:element>
1253 </xsl:if>
1254 </xsl:if>
1255 </xsl:if>
1256 </xsl:template>
1257
1258 <xsl:template match="c:dirname" mode="filter-bits-64">
1259 <xsl:variable name="ismultilib">
1260 <xsl:choose>
1261 <xsl:when test="contains($clfs.multilib, ',')">
1262 <xsl:text>true</xsl:text>
1263 </xsl:when>
1264 <xsl:otherwise>
1265 <xsl:text>false</xsl:text>
1266 </xsl:otherwise>
1267 </xsl:choose>
1268 </xsl:variable>
1269 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1270 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1271 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1272 <xsl:element name="filename">
1273 <xsl:attribute name="class">
1274 <xsl:text>directory</xsl:text>
1275 </xsl:attribute>
1276 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1277 </xsl:element>
1278 </xsl:if>
1279 </xsl:if>
1280 </xsl:if>
1281 </xsl:template>
1282
1283 <xsl:template match="c:filename" mode="filter-bits-64">
1284 <xsl:variable name="ismultilib">
1285 <xsl:choose>
1286 <xsl:when test="contains($clfs.multilib, ',')">
1287 <xsl:text>true</xsl:text>
1288 </xsl:when>
1289 <xsl:otherwise>
1290 <xsl:text>false</xsl:text>
1291 </xsl:otherwise>
1292 </xsl:choose>
1293 </xsl:variable>
1294 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1295 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1296 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1297 <xsl:element name="filename">
1298 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1299 </xsl:element>
1300 </xsl:if>
1301 </xsl:if>
1302 </xsl:if>
1303 </xsl:template>
1304
1305 <xsl:template match="c:command" mode="filter-bits-64">
1306 <xsl:variable name="ismultilib">
1307 <xsl:choose>
1308 <xsl:when test="contains($clfs.multilib, ',')">
1309 <xsl:text>true</xsl:text>
1310 </xsl:when>
1311 <xsl:otherwise>
1312 <xsl:text>false</xsl:text>
1313 </xsl:otherwise>
1314 </xsl:choose>
1315 </xsl:variable>
1316 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1317 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1318 <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
1319 <xsl:element name="command">
1320 <xsl:apply-templates select="node()" mode="filter-bits-64" />
1321 </xsl:element>
1322 </xsl:if>
1323 </xsl:if>
1324 </xsl:if>
1325 </xsl:template>
1326
1327 <xsl:template match="@c:arch" mode="filter-bits-64" />
1328 <xsl:template match="@c:bits" mode="filter-bits-64" />
1329 <xsl:template match="@c:multilib" mode="filter-bits-64" />
1330
1331 <!-- Templates for the Inline Elements outside of the build filter -->
1332
1333 <xsl:template match="c:literal">
1334 <xsl:element name="literal">
1335 <xsl:apply-templates select="node()" />
1336 </xsl:element>
1337 </xsl:template>
1338
1339 <xsl:template match="c:replaceable">
1340 <xsl:element name="replaceable">
1341 <xsl:apply-templates select="node()" />
1342 </xsl:element>
1343 </xsl:template>
1344
1345 <xsl:template match="c:application">
1346 <xsl:element name="application">
1347 <xsl:apply-templates select="node()" />
1348 </xsl:element>
1349 </xsl:template>
1350
1351 <xsl:template match="c:dirname">
1352 <xsl:element name="filename">
1353 <xsl:attribute name="class">
1354 <xsl:text>directory</xsl:text>
1355 </xsl:attribute>
1356 <xsl:apply-templates select="node()" />
1357 </xsl:element>
1358 </xsl:template>
1359
1360 <xsl:template match="c:filename">
1361 <xsl:element name="filename">
1362 <xsl:apply-templates select="node()" />
1363 </xsl:element>
1364 </xsl:template>
1365
1366 <xsl:template match="c:command">
1367 <xsl:element name="command">
1368 <xsl:apply-templates select="node()" />
1369 </xsl:element>
1370 </xsl:template>
1371
1372 <!-- Apply the profile filter to the entire document -->
1373 <xsl:template match="//*[@c:arch]|//*[@c:multilib]">
1374 <xsl:variable name="ismultilib">
1375 <xsl:choose>
1376 <xsl:when test="contains($clfs.multilib, ',')">
1377 <xsl:text>true</xsl:text>
1378 </xsl:when>
1379 <xsl:otherwise>
1380 <xsl:text>false</xsl:text>
1381 </xsl:otherwise>
1382 </xsl:choose>
1383 </xsl:variable>
1384 <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
1385 <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
1386 <xsl:copy>
1387 <xsl:apply-templates select="@*|node()" />
1388 </xsl:copy>
1389 </xsl:if>
1390 </xsl:if>
1391 </xsl:template>
1392
1393 <!-- Remove the profileing attributes for the remaining objects -->
1394 <xsl:template match="@c:arch" />
1395 <xsl:template match="@c:bits" />
1396 <xsl:template match="@c:multilib" />
1397
1398</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.