source: BLFS/xsl/make_book.xsl@ 2b67b9b

ablfs-more legacy trunk
Last change on this file since 2b67b9b was 2140f22, checked in by Pierre Labastie <pierre@…>, 7 years ago

New management of dependencies:

  • Even if only required or recommended deps only are requested and built, account for optional deps to build the pacakge order
  • build "runtime" deps after the pacakge dependening on them, but before any other package
  • using the "first" role in the book, implement pass1 pacakges when there are circular dependencies
  • Documentation has still to be written
  • There must be bugs, thank you for testing...
  • Property mode set to 100644
File size: 23.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<!-- $Id$ -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="1.0">
7
8 <xsl:param name="list" select="''"/>
9 <xsl:param name="MTA" select="'sendmail'"/>
10 <xsl:param name="lfsbook" select="'lfs-full.xml'"/>
11
12<!-- Check whether the book is sysv or systemd -->
13 <xsl:variable name="rev">
14 <xsl:choose>
15 <xsl:when test="//bookinfo/title/phrase[@revision='systemd']">
16 <xsl:text>systemd</xsl:text>
17 </xsl:when>
18 <xsl:otherwise>
19 <xsl:text>sysv</xsl:text>
20 </xsl:otherwise>
21 </xsl:choose>
22 </xsl:variable>
23
24 <xsl:output
25 method="xml"
26 encoding="ISO-8859-1"
27 doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
28
29 <xsl:include href="lfs_make_book.xsl"/>
30
31 <xsl:template match="/">
32 <book>
33 <xsl:copy-of select="/book/bookinfo"/>
34 <preface>
35 <?dbhtml filename="preface.html"?>
36 <title>Preface</title>
37 <xsl:choose>
38 <xsl:when test="$rev='sysv'">
39 <xsl:copy-of select="id('bootscripts')"/>
40 </xsl:when>
41 <xsl:otherwise>
42 <xsl:copy-of select="id('systemd-units')"/>
43 </xsl:otherwise>
44 </xsl:choose>
45 </preface>
46 <chapter>
47 <?dbhtml filename="chapter.html"?>
48 <title>Installing packages in dependency build order</title>
49 <xsl:call-template name="apply-list">
50 <xsl:with-param name="list" select="normalize-space($list)"/>
51 </xsl:call-template>
52 </chapter>
53 <xsl:copy-of select="id('CC')"/>
54 <xsl:copy-of select="id('MIT')"/>
55 <index/>
56 </book>
57 </xsl:template>
58
59<!-- apply-templates for each item in the list.
60 Normally, those items are id of nodes.
61 Those nodes can be sect1 (normal case),
62 sect2 (python modules or DBus bindings)
63 bridgehead (perl modules)
64 para (dependency of perl modules).
65 The templates after this one treat each of those cases.
66 However, some items are xorg package names, and not id.
67 We need special instructions in that case.
68 The difficulty is that some of those names *are* id's,
69 because they are referenced in the index.
70 Hopefully, none of those id's are sect{1,2}, bridgehead or para...-->
71 <xsl:template name="apply-list">
72 <xsl:param name="list" select="''"/>
73 <xsl:if test="string-length($list) &gt; 0">
74 <xsl:choose>
75 <xsl:when test="contains($list,' ')">
76 <xsl:call-template name="apply-list">
77 <xsl:with-param name="list"
78 select="substring-before($list,' ')"/>
79 </xsl:call-template>
80 <xsl:call-template name="apply-list">
81 <xsl:with-param name="list"
82 select="substring-after($list,' ')"/>
83 </xsl:call-template>
84 </xsl:when>
85 <xsl:when test="contains($list,'groupxx')"/>
86 <xsl:otherwise>
87 <xsl:variable name="is-lfs">
88 <xsl:call-template name="detect-lfs">
89 <xsl:with-param name="package" select="$list"/>
90 <xsl:with-param name="lfsbook" select="$lfsbook"/>
91 </xsl:call-template>
92 </xsl:variable>
93 <xsl:choose>
94 <xsl:when test="$is-lfs='true'">
95 <xsl:message>
96 <xsl:value-of select="$list"/>
97 <xsl:text> is an lfs package</xsl:text>
98 </xsl:message>
99 <xsl:call-template name="process-lfs">
100 <xsl:with-param name="package" select="$list"/>
101 <xsl:with-param name="lfsbook" select="$lfsbook"/>
102 </xsl:call-template>
103 </xsl:when>
104 <xsl:when test="contains(concat($list,' '),'-pass1 ')">
105<!-- Let's do it only for sect1, hopefully -->
106 <xsl:variable
107 name="real-id"
108 select="substring-before(concat($list,' '),'-pass1 ')"/>
109 <xsl:if test="id($real-id)[self::sect1]">
110 <xsl:apply-templates select="id($real-id)" mode="pass1"/>
111 </xsl:if>
112 </xsl:when>
113 <xsl:when test="not(id($list)[self::sect1 or self::sect2 or self::para or self::bridgehead])">
114 <xsl:apply-templates
115 select="//sect1[contains(@id,'xorg7')
116 and contains(string(.//userinput),
117 concat($list,'-'))]"
118 mode="xorg">
119 <xsl:with-param name="package" select="$list"/>
120 </xsl:apply-templates>
121 </xsl:when>
122 <xsl:otherwise>
123 <xsl:apply-templates select="id($list)"/>
124 </xsl:otherwise>
125 </xsl:choose>
126 </xsl:otherwise>
127 </xsl:choose>
128 </xsl:if>
129 </xsl:template>
130
131<!-- The normal case : just copy to the book. Exceptions are if there
132 is a xref, so use a special "mode" template -->
133 <xsl:template match="sect1">
134 <xsl:apply-templates select="." mode="sect1"/>
135 </xsl:template>
136
137 <xsl:template match="*" mode="pass1">
138 <xsl:choose>
139 <xsl:when test="self::xref">
140 <xsl:choose>
141 <xsl:when test="contains(concat(' ',normalize-space($list),' '),
142 concat(' ',@linkend,' '))">
143 <xsl:choose>
144 <xsl:when test="@linkend='x-window-system' or @linkend='xorg7'">
145 <xref linkend="xorg7-server"/>
146 </xsl:when>
147 <xsl:when test="@linkend='server-mail'">
148 <xref linkend="{$MTA}"/>
149 </xsl:when>
150 <xsl:otherwise>
151 <xsl:copy-of select="."/>
152 </xsl:otherwise>
153 </xsl:choose>
154 </xsl:when>
155 <xsl:otherwise>
156 <xsl:choose>
157 <xsl:when test="@linkend='bootscripts' or
158 @linkend='systemd-units'">
159 <xsl:copy-of select="."/>
160 </xsl:when>
161 <xsl:otherwise>
162 <xsl:value-of select="@linkend"/> (in full book)
163 </xsl:otherwise>
164 </xsl:choose>
165 </xsl:otherwise>
166 </xsl:choose>
167 </xsl:when>
168 <xsl:when test="@id">
169 <xsl:element name="{name()}">
170 <xsl:for-each select="attribute::*">
171 <xsl:attribute name="{name()}">
172 <xsl:value-of select="."/>
173 <xsl:if test="name() = 'id'">-pass1</xsl:if>
174 </xsl:attribute>
175 </xsl:for-each>
176 <xsl:apply-templates mode="pass1"/>
177 </xsl:element>
178 </xsl:when>
179 <xsl:when test=".//xref | .//@id">
180 <xsl:element name="{name()}">
181 <xsl:for-each select="attribute::*">
182 <xsl:attribute name="{name()}">
183 <xsl:value-of select="."/>
184 </xsl:attribute>
185 </xsl:for-each>
186 <xsl:apply-templates mode="pass1"/>
187 </xsl:element>
188 </xsl:when>
189 <xsl:otherwise>
190 <xsl:copy-of select="."/>
191 </xsl:otherwise>
192 </xsl:choose>
193 </xsl:template>
194
195 <xsl:template match="processing-instruction()" mode="pass1">
196 <xsl:variable name="pi-full" select="string()"/>
197 <xsl:variable name="pi-value"
198 select="substring-after($pi-full,'filename=')"/>
199 <xsl:variable name="filename"
200 select="substring-before(substring($pi-value,2),'.html')"/>
201 <xsl:processing-instruction name="dbhtml">filename="<xsl:copy-of
202 select="$filename"/>-pass1.html"</xsl:processing-instruction>
203 </xsl:template>
204
205 <xsl:template match="processing-instruction()" mode="sect1">
206 <xsl:copy-of select="."/>
207 </xsl:template>
208
209<!-- Any node which has no xref descendant is copied verbatim. If there
210 is an xref descendant, output the node and recurse. -->
211 <xsl:template match="*" mode="sect1">
212 <xsl:choose>
213 <xsl:when test="self::xref">
214 <xsl:choose>
215 <xsl:when test="contains(concat(' ',normalize-space($list),' '),
216 concat(' ',@linkend,' '))">
217 <xsl:choose>
218 <xsl:when test="@linkend='x-window-system' or @linkend='xorg7'">
219 <xref linkend="xorg7-server"/>
220 </xsl:when>
221 <xsl:when test="@linkend='server-mail'">
222 <xref linkend="{$MTA}"/>
223 </xsl:when>
224 <xsl:otherwise>
225 <xsl:copy-of select="."/>
226 </xsl:otherwise>
227 </xsl:choose>
228 </xsl:when>
229 <xsl:otherwise>
230 <xsl:choose>
231 <xsl:when test="@linkend='bootscripts' or
232 @linkend='systemd-units'">
233 <xsl:copy-of select="."/>
234 </xsl:when>
235 <xsl:otherwise>
236 <xsl:value-of select="@linkend"/> (in full book)
237 </xsl:otherwise>
238 </xsl:choose>
239 </xsl:otherwise>
240 </xsl:choose>
241 </xsl:when>
242 <xsl:when test=".//xref">
243 <xsl:element name="{name()}">
244 <xsl:for-each select="attribute::*">
245 <xsl:attribute name="{name()}">
246 <xsl:value-of select="."/>
247 </xsl:attribute>
248 </xsl:for-each>
249 <xsl:apply-templates mode="sect1"/>
250 </xsl:element>
251 </xsl:when>
252 <xsl:otherwise>
253 <xsl:copy-of select="."/>
254 </xsl:otherwise>
255 </xsl:choose>
256 </xsl:template>
257
258<!-- Python modules and DBus bindings -->
259 <xsl:template match="sect2">
260 <xsl:apply-templates select='.' mode="sect2"/>
261 </xsl:template>
262
263 <xsl:template match="*" mode="sect2">
264 <xsl:choose>
265 <xsl:when test="self::sect2">
266 <xsl:element name="sect1">
267 <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
268 <xsl:attribute name="xreflabel"><xsl:value-of select="@xreflabel"/></xsl:attribute>
269 <xsl:processing-instruction name="dbhtml">filename="<xsl:value-of
270 select="@id"/>.html"</xsl:processing-instruction>
271 <xsl:apply-templates mode="sect2"/>
272 </xsl:element>
273 </xsl:when>
274 <xsl:when test="self::sect3">
275 <xsl:element name="sect2">
276 <xsl:attribute name="role">
277 <xsl:value-of select="@role"/>
278 </xsl:attribute>
279 <xsl:apply-templates mode="sect2"/>
280 </xsl:element>
281 </xsl:when>
282 <xsl:when test="self::bridgehead">
283 <xsl:element name="bridgehead">
284 <xsl:attribute name="renderas">
285 <xsl:if test="@renderas='sect4'">sect3</xsl:if>
286 <xsl:if test="@renderas='sect5'">sect4</xsl:if>
287 </xsl:attribute>
288 <xsl:value-of select='.'/>
289 </xsl:element>
290 </xsl:when>
291 <xsl:when test="self::xref">
292 <xsl:choose>
293 <xsl:when test="contains(concat(' ',normalize-space($list),' '),
294 concat(' ',@linkend,' '))">
295 <xsl:choose>
296 <xsl:when test="@linkend='x-window-system' or @linkend='xorg7'">
297 <xref linkend="xorg7-server"/>
298 </xsl:when>
299 <xsl:when test="@linkend='server-mail'">
300 <xref linkend="{$MTA}"/>
301 </xsl:when>
302 <xsl:otherwise>
303 <xsl:copy-of select="."/>
304 </xsl:otherwise>
305 </xsl:choose>
306 </xsl:when>
307 <xsl:otherwise>
308 <xsl:value-of select="@linkend"/> (in full book)
309 </xsl:otherwise>
310 </xsl:choose>
311 </xsl:when>
312 <xsl:when test=".//xref">
313 <xsl:element name="{name()}">
314 <xsl:for-each select="attribute::*">
315 <xsl:attribute name="{name()}">
316 <xsl:value-of select="."/>
317 </xsl:attribute>
318 </xsl:for-each>
319 <xsl:apply-templates mode="sect2"/>
320 </xsl:element>
321 </xsl:when>
322 <xsl:otherwise>
323 <xsl:copy-of select="."/>
324 </xsl:otherwise>
325 </xsl:choose>
326 </xsl:template>
327
328<!-- Perl modules : transform them to minimal sect1. Use a template
329 for installation instructions -->
330 <xsl:template match="bridgehead">
331 <xsl:if test="ancestor::sect1[@id='perl-modules']">
332 <xsl:element name="sect1">
333 <xsl:attribute name="id"><xsl:value-of select="./@id"/></xsl:attribute>
334 <xsl:attribute name="xreflabel"><xsl:value-of select="./@xreflabel"/></xsl:attribute>
335 <xsl:processing-instruction name="dbhtml">
336 filename="<xsl:value-of select="@id"/>.html"</xsl:processing-instruction>
337 <title><xsl:value-of select="./@xreflabel"/></title>
338 <sect2 role="package">
339 <title>Introduction to <xsl:value-of select="@id"/></title>
340 <bridgehead renderas="sect3">Package Information</bridgehead>
341 <itemizedlist spacing="compact">
342 <listitem>
343 <para>Download (HTTP): <xsl:copy-of select="./following-sibling::itemizedlist[1]/listitem/para/ulink"/></para>
344 </listitem>
345 <listitem>
346 <para>Download (FTP): <ulink url=" "/></para>
347 </listitem>
348 </itemizedlist>
349 </sect2>
350 <xsl:choose>
351 <xsl:when test="following-sibling::itemizedlist[1]//xref[@linkend='perl-standard-install'] | following-sibling::itemizedlist[1]/preceding-sibling::para//xref[@linkend='perl-standard-install']">
352 <xsl:apply-templates mode="perl-install" select="id('perl-standard-install')"/>
353 </xsl:when>
354 <xsl:otherwise>
355 <sect2 role="installation">
356 <title>Installation of <xsl:value-of select="@xreflabel"/></title>
357 <para>Run the following commands:</para>
358 <for-each select="following-sibling::bridgehead/preceding-sibling::screen[not(@role)]">
359 <xsl:copy-of select="."/>
360 </for-each>
361 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
362 <for-each select="following-sibling::bridgehead/preceding-sibling::screen[@role='root']">
363 <xsl:copy-of select="."/>
364 </for-each>
365 </sect2>
366 </xsl:otherwise>
367 </xsl:choose>
368 </xsl:element>
369 </xsl:if>
370 </xsl:template>
371
372<!-- The case of depdendencies of perl modules. Same treatment
373 as for perl modules. Just easier because always perl standard -->
374 <xsl:template match="para">
375 <xsl:element name="sect1">
376 <xsl:attribute name="id"><xsl:value-of select="./@id"/></xsl:attribute>
377 <xsl:attribute name="xreflabel"><xsl:value-of select="./@xreflabel"/></xsl:attribute>
378 <xsl:processing-instruction name="dbhtml">filename="<xsl:value-of
379 select="@id"/>.html"</xsl:processing-instruction>
380 <title><xsl:value-of select="./@xreflabel"/></title>
381 <sect2 role="package">
382 <title>Introduction to <xsl:value-of select="@id"/></title>
383 <bridgehead renderas="sect3">Package Information</bridgehead>
384 <itemizedlist spacing="compact">
385 <listitem>
386 <para>Download (HTTP): <xsl:copy-of select="./ulink"/></para>
387 </listitem>
388 <listitem>
389 <para>Download (FTP): <ulink url=" "/></para>
390 </listitem>
391 </itemizedlist>
392 </sect2>
393 <xsl:apply-templates mode="perl-install" select="id('perl-standard-install')"/>
394 </xsl:element>
395 </xsl:template>
396
397<!-- copy of the perl standard installation instructions:
398 suppress id (otherwise not unique) and note (which we
399 do not want to apply -->
400 <xsl:template match="sect2" mode="perl-install">
401 <sect2 role="installation">
402 <xsl:for-each select="./*">
403 <xsl:if test="not(self::note)">
404 <xsl:copy-of select="."/>
405 </xsl:if>
406 </xsl:for-each>
407 </sect2>
408 </xsl:template>
409
410<!-- we have got an xorg package. We are at the installation page
411 but now we need to make an autonomous page from the global
412 one -->
413 <xsl:template match="sect1" mode="xorg">
414 <xsl:param name="package"/>
415 <xsl:variable name="tarball">
416 <xsl:call-template name="tarball">
417 <xsl:with-param name="package" select="concat(' ',$package,'-')"/>
418 <xsl:with-param name="cat-md5"
419 select="string(.//userinput[starts-with(string(),'cat ')])"/>
420 </xsl:call-template>
421 </xsl:variable>
422 <xsl:variable name="md5sum">
423 <xsl:call-template name="md5sum">
424 <xsl:with-param name="package" select="concat(' ',$package,'-')"/>
425 <xsl:with-param name="cat-md5"
426 select=".//userinput[starts-with(string(),'cat ')]"/>
427 </xsl:call-template>
428 </xsl:variable>
429 <xsl:variable name="download-dir">
430 <xsl:call-template name="download-dir">
431 <xsl:with-param name="package" select="concat(' ',$package,'-')"/>
432 <xsl:with-param name="cat-md5"
433 select=".//userinput[starts-with(string(),'cat ')]"/>
434 </xsl:call-template>
435 </xsl:variable>
436 <xsl:variable name="install-instructions">
437 <xsl:call-template name="inst-instr">
438 <xsl:with-param name="inst-instr"
439 select=".//userinput[starts-with(string(),'for ')]"/>
440 </xsl:call-template>
441 </xsl:variable>
442 <xsl:element name="sect1">
443 <xsl:attribute name="id"><xsl:value-of select="$package"/></xsl:attribute>
444 <xsl:processing-instruction name="dbhtml">
445 filename="<xsl:value-of select='$package'/>.html"
446 </xsl:processing-instruction>
447 <title><xsl:value-of select="$package"/></title>
448 <sect2 role="package">
449 <title>Introduction to <xsl:value-of select="$package"/></title>
450 <bridgehead renderas="sect3">Package Information</bridgehead>
451 <itemizedlist spacing="compact">
452 <listitem>
453 <para>Download (HTTP): <xsl:element name="ulink">
454 <xsl:attribute name="url">
455 <xsl:value-of
456 select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/>
457 <xsl:value-of select="$download-dir"/>
458 <xsl:value-of select="$tarball"/>
459 </xsl:attribute>
460 </xsl:element>
461 </para>
462 </listitem>
463 <listitem>
464 <para>Download (FTP): <xsl:element name="ulink">
465 <xsl:attribute name="url">
466 <xsl:value-of
467 select=".//para[contains(string(),'(FTP)')]/ulink/@url"/>
468 <xsl:value-of select="$download-dir"/>
469 <xsl:value-of select="$tarball"/>
470 </xsl:attribute>
471 </xsl:element>
472 </para>
473 </listitem>
474 <listitem>
475 <para>
476 Download MD5 sum: <xsl:value-of select="$md5sum"/>
477 </para>
478 </listitem>
479 </itemizedlist>
480 <!-- If there is an additional download, we need to output that -->
481 <xsl:if test=".//bridgehead[contains(string(),'Additional')]">
482 <xsl:copy-of
483 select=".//bridgehead[contains(string(),'Additional')]"/>
484 <xsl:copy-of
485 select=".//bridgehead[contains(string(),'Additional')]
486 /following-sibling::itemizedlist[1]"/>
487 </xsl:if>
488 </sect2>
489 <sect2 role="installation">
490 <title>Installation of <xsl:value-of select="$package"/></title>
491
492 <para>
493 Install <application><xsl:value-of select="$package"/></application>
494 by running the following commands:
495 </para>
496
497 <screen><userinput>packagedir=<xsl:value-of
498 select="substring-before($tarball,'.tar.bz2')"/>
499 <xsl:text>&#xA;</xsl:text>
500 <xsl:value-of select="substring-before($install-instructions,
501 'as_root')"/>
502 </userinput></screen>
503
504 <para>
505 Now as the <systemitem class="username">root</systemitem> user:
506 </para>
507 <screen role='root'>
508 <userinput><xsl:value-of select="substring-after(
509 $install-instructions,
510 'as_root')"/>
511 </userinput>
512 </screen>
513 </sect2>
514 </xsl:element><!-- sect1 -->
515
516 </xsl:template>
517
518<!-- get the tarball name from the text that comes from the .md5 file -->
519 <xsl:template name="tarball">
520 <xsl:param name="package"/>
521 <xsl:param name="cat-md5"/>
522<!-- DEBUG
523<xsl:message><xsl:text>Entering "tarball" template:
524 package is: </xsl:text>
525<xsl:value-of select="$package"/><xsl:text>
526 cat-md5 is: </xsl:text>
527<xsl:value-of select="$cat-md5"/>
528</xsl:message>
529END DEBUG -->
530 <xsl:choose>
531 <xsl:when test="contains(substring-before($cat-md5,$package),'&#xA;')">
532 <xsl:call-template name="tarball">
533 <xsl:with-param name="package" select="$package"/>
534 <xsl:with-param name="cat-md5"
535 select="substring-after($cat-md5,'&#xA;')"/>
536 </xsl:call-template>
537 </xsl:when>
538 <xsl:when test="contains(substring-before($cat-md5,$package),' ')">
539 <xsl:call-template name="tarball">
540 <xsl:with-param name="package" select="$package"/>
541 <xsl:with-param name="cat-md5"
542 select="substring-after($cat-md5,' ')"/>
543 </xsl:call-template>
544 </xsl:when>
545 <xsl:otherwise>
546 <xsl:copy-of select="substring-after(
547 substring-before($cat-md5,'&#xA;'),' ')"/>
548 </xsl:otherwise>
549 </xsl:choose>
550 </xsl:template>
551<!-- get the download dirname from the text that comes from the .md5 file -->
552 <xsl:template name="download-dir">
553 <xsl:param name="package"/>
554 <xsl:param name="cat-md5"/>
555 <xsl:choose>
556 <xsl:when test="not(@id='xorg7-legacy')">
557 <xsl:copy-of select="''"/>
558 </xsl:when>
559 <xsl:when test="contains(substring-before($cat-md5,$package),'&#xA;')">
560 <xsl:call-template name="download-dir">
561 <xsl:with-param name="package" select="$package"/>
562 <xsl:with-param name="cat-md5"
563 select="substring-after($cat-md5,'&#xA;')"/>
564 </xsl:call-template>
565 </xsl:when>
566 <xsl:when test="contains(substring-before($cat-md5,$package),' ')">
567 <xsl:call-template name="download-dir">
568 <xsl:with-param name="package" select="$package"/>
569 <xsl:with-param name="cat-md5"
570 select="substring-after($cat-md5,' ')"/>
571 </xsl:call-template>
572 </xsl:when>
573 <xsl:otherwise>
574 <xsl:copy-of select="substring-before($cat-md5,' ')"/>
575 </xsl:otherwise>
576 </xsl:choose>
577 </xsl:template>
578<!-- same for md5sum -->
579 <xsl:template name="md5sum">
580 <xsl:param name="package"/>
581 <xsl:param name="cat-md5"/>
582 <xsl:choose>
583 <xsl:when test="contains(substring-before($cat-md5,$package),'&#xA;')">
584 <xsl:call-template name="md5sum">
585 <xsl:with-param name="package" select="$package"/>
586 <xsl:with-param name="cat-md5"
587 select="substring-after($cat-md5,'&#xA;')"/>
588 </xsl:call-template>
589 </xsl:when>
590 <xsl:otherwise>
591 <xsl:copy-of select="substring-before($cat-md5,' ')"/>
592 </xsl:otherwise>
593 </xsl:choose>
594 </xsl:template>
595
596 <xsl:template name="inst-instr">
597 <xsl:param name="inst-instr"/>
598 <xsl:choose>
599 <xsl:when test="contains($inst-instr,'pushd')">
600 <xsl:call-template name="inst-instr">
601 <xsl:with-param name="inst-instr"
602 select="substring-after(
603 substring-after($inst-instr,'pushd'),
604 '&#xA;')"/>
605 </xsl:call-template>
606 </xsl:when>
607 <xsl:otherwise>
608 <xsl:copy-of select="substring-before($inst-instr,'popd')"/>
609 </xsl:otherwise>
610 </xsl:choose>
611 </xsl:template>
612</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.