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

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

Add a c:variant element to the c:package element to determine the variant to list in the index.

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