source: BLFS/xsl/scripts.xsl@ 3aa1acd

2.4 ablfs-more legacy trunk
Last change on this file since 3aa1acd was 8dc4646, checked in by Pierre Labastie <pierre@…>, 8 years ago

Merge new_features: Allows to retrieve package from SRC_ARCHIVE, in case it is not already there

and is in archive. This should not happen in normal operation, but may happen
in func_install_blfs

  • Property mode set to 100644
File size: 20.6 KB
Line 
1<?xml version="1.0"?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:exsl="http://exslt.org/common"
5 extension-element-prefixes="exsl"
6 version="1.0">
7
8<!-- $Id$ -->
9
10<!-- XSLT stylesheet to create shell scripts from "linear build" BLFS books. -->
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 systemd
17 </xsl:when>
18 <xsl:otherwise>
19 sysv
20 </xsl:otherwise>
21 </xsl:choose>
22 </xsl:variable>
23
24 <!-- Build as user (y) or as root (n)? -->
25 <xsl:param name="sudo" select="'y'"/>
26
27 <xsl:template match="/">
28 <xsl:apply-templates select="//sect1"/>
29 </xsl:template>
30
31<!--=================== Master chunks code ======================-->
32
33 <xsl:template match="sect1">
34
35 <xsl:if test="@id != 'bootscripts' and @id != 'systemd-units'">
36 <!-- The file names -->
37 <xsl:variable name="filename" select="@id"/>
38
39 <!-- The build order -->
40 <xsl:variable name="position" select="position()"/>
41 <xsl:variable name="order">
42 <xsl:choose>
43 <xsl:when test="string-length($position) = 1">
44 <xsl:text>00</xsl:text>
45 <xsl:value-of select="$position"/>
46 </xsl:when>
47 <xsl:when test="string-length($position) = 2">
48 <xsl:text>0</xsl:text>
49 <xsl:value-of select="$position"/>
50 </xsl:when>
51 <xsl:otherwise>
52 <xsl:value-of select="$position"/>
53 </xsl:otherwise>
54 </xsl:choose>
55 </xsl:variable>
56
57 <!-- Depuration code -->
58 <xsl:message>
59 <xsl:text>SCRIPT is </xsl:text>
60 <xsl:value-of select="concat($order,'-z-',$filename)"/>
61 <xsl:text>&#xA; FTPDIR is </xsl:text>
62 <xsl:value-of select="$filename"/>
63 <xsl:text>&#xA;&#xA;</xsl:text>
64 </xsl:message>
65
66 <!-- Creating the scripts -->
67 <exsl:document href="{$order}-z-{$filename}" method="text">
68 <xsl:text>#!/bin/bash&#xA;set -e&#xA;&#xA;</xsl:text>
69 <xsl:choose>
70 <!-- Package page -->
71 <xsl:when test="sect2[@role='package']">
72 <!-- We build in a subdirectory -->
73 <xsl:text>PKG_DIR=</xsl:text>
74 <xsl:value-of select="$filename"/>
75 <xsl:text>
76SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}
77BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}}
78mkdir -p $SRC_DIR
79mkdir -p $BUILD_DIR
80
81</xsl:text>
82 <!-- Download code and build commands -->
83 <xsl:apply-templates select="sect2"/>
84 <!-- Clean-up -->
85 <xsl:text>cd $BUILD_DIR
86[[ -n "$KEEP_FILES" ]] || </xsl:text>
87 <!-- In some case, some files in the build tree are owned
88 by root -->
89 <xsl:if test="$sudo='y'">
90 <xsl:text>sudo </xsl:text>
91 </xsl:if>
92 <xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
93 </xsl:when>
94 <!-- Non-package page -->
95 <xsl:otherwise>
96 <xsl:apply-templates select=".//screen"/>
97 </xsl:otherwise>
98 </xsl:choose>
99 <xsl:text>exit</xsl:text>
100 </exsl:document>
101 </xsl:if>
102 </xsl:template>
103
104<!--======================= Sub-sections code =======================-->
105
106 <xsl:template match="sect2">
107 <xsl:choose>
108 <xsl:when test="@role = 'package'">
109 <xsl:text>cd $SRC_DIR
110</xsl:text>
111 <!-- Download information is in bridgehead tags -->
112 <xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
113 <xsl:text>&#xA;</xsl:text>
114 </xsl:when>
115 <xsl:when test="@role = 'qt4-prefix' or @role = 'qt5-prefix'">
116 <xsl:apply-templates select=".//screen"/>
117 </xsl:when>
118 <xsl:when test="@role = 'installation'">
119 <xsl:text>
120cd $BUILD_DIR
121find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text>
122 <xsl:if test="$sudo='y'">
123 <xsl:text>sudo </xsl:text>
124 </xsl:if>
125 <xsl:text>rm -rf
126case $PACKAGE in
127 *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma)
128 tar -xvf $SRC_DIR/$PACKAGE &gt; unpacked
129 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
130 ;;
131 *.tar.lz)
132 bsdtar -xvf $SRC_DIR/$PACKAGE 2&gt; unpacked
133 UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
134 ;;
135 *.zip)
136 zipinfo -1 $SRC_DIR/$PACKAGE &gt; unpacked
137 UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
138 if test $(wc -w &lt;&lt;&lt; $UNPACKDIR) -eq 1; then
139 unzip $SRC_DIR/$PACKAGE
140 else
141 UNPACKDIR=${PACKAGE%.zip}
142 unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE
143 fi
144 ;;
145 *)
146 UNPACKDIR=$PKG_DIR-build
147 mkdir $UNPACKDIR
148 cp $PACKAGE $UNPACKDIR
149 ;;
150esac
151cd $UNPACKDIR&#xA;
152</xsl:text>
153 <xsl:apply-templates select=".//screen | .//para/command"/>
154 <xsl:if test="$sudo = 'y'">
155 <xsl:text>sudo /sbin/</xsl:text>
156 </xsl:if>
157 <xsl:text>ldconfig&#xA;&#xA;</xsl:text>
158 </xsl:when>
159 <xsl:when test="@role = 'configuration'">
160 <xsl:apply-templates select=".//screen" mode="config"/>
161 </xsl:when>
162 </xsl:choose>
163 </xsl:template>
164
165<!--==================== Download code =======================-->
166
167 <!-- template for extracting the filename from an url in the form:
168 proto://internet.name/dir1/.../dirn/filename?condition.
169 Needed, because substring-after(...,'/') returns only the
170 substring after the first '/'. -->
171 <xsl:template name="package_name">
172 <xsl:param name="url" select="foo"/>
173 <xsl:param name="sub-url" select="substring-after($url,'/')"/>
174 <xsl:choose>
175 <xsl:when test="contains($sub-url,'/')">
176 <xsl:call-template name="package_name">
177 <xsl:with-param name="url" select="$sub-url"/>
178 </xsl:call-template>
179 </xsl:when>
180 <xsl:otherwise>
181 <xsl:choose>
182 <xsl:when test="contains($sub-url,'?')">
183 <xsl:value-of select="substring-before($sub-url,'?')"/>
184 </xsl:when>
185 <xsl:otherwise>
186 <xsl:value-of select="$sub-url"/>
187 </xsl:otherwise>
188 </xsl:choose>
189 </xsl:otherwise>
190 </xsl:choose>
191 </xsl:template>
192
193 <!-- Generates the code to download a package, an additional package or
194 a patch. -->
195 <xsl:template name="download-file">
196 <xsl:param name="httpurl" select="''"/>
197 <xsl:param name="ftpurl" select="''"/>
198 <xsl:param name="md5" select="''"/>
199 <xsl:param name="varname" select="''"/>
200 <xsl:variable name="package">
201 <xsl:call-template name="package_name">
202 <xsl:with-param name="url">
203 <xsl:choose>
204 <xsl:when test="string-length($httpurl) &gt; 10">
205 <xsl:value-of select="$httpurl"/>
206 </xsl:when>
207 <xsl:otherwise>
208 <xsl:value-of select="$ftpurl"/>
209 </xsl:otherwise>
210 </xsl:choose>
211 </xsl:with-param>
212 </xsl:call-template>
213 </xsl:variable>
214 <xsl:variable name="first_letter"
215 select="translate(substring($package,1,1),
216 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
217 'abcdefghijklmnopqrstuvwxyz')"/>
218 <xsl:text>&#xA;</xsl:text>
219 <xsl:value-of select="$varname"/>
220 <xsl:text>=</xsl:text>
221 <xsl:value-of select="$package"/>
222 <xsl:text>&#xA;if [[ ! -f $</xsl:text>
223 <xsl:value-of select="$varname"/>
224 <xsl:text> ]] ; then
225 if [[ -f $SRC_ARCHIVE/$</xsl:text>
226 <xsl:value-of select="$varname"/>
227 <xsl:text> ]] ; then&#xA;</xsl:text>
228 <xsl:text> cp $SRC_ARCHIVE/$</xsl:text>
229 <xsl:value-of select="$varname"/>
230 <xsl:text> $</xsl:text>
231 <xsl:value-of select="$varname"/>
232 <xsl:text>
233 else&#xA;</xsl:text>
234 <!-- Download from upstream http -->
235 <xsl:if test="string-length($httpurl) &gt; 10">
236 <xsl:text> wget -T 30 -t 5 </xsl:text>
237 <xsl:value-of select="$httpurl"/>
238 <xsl:text> ||&#xA;</xsl:text>
239 </xsl:if>
240 <!-- Download from upstream ftp -->
241 <xsl:if test="string-length($ftpurl) &gt; 10">
242 <xsl:text> wget -T 30 -t 5 </xsl:text>
243 <xsl:value-of select="$ftpurl"/>
244 <xsl:text> ||&#xA;</xsl:text>
245 </xsl:if>
246 <!-- The FTP_SERVER mirror as a last resort -->
247 <xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
248 <xsl:value-of select="$first_letter"/>
249 <xsl:text>/$</xsl:text>
250 <xsl:value-of select="$varname"/>
251 <xsl:text><!--
252 cp $</xsl:text>
253 <xsl:value-of select="$varname"/>
254 <xsl:text> $SRC_ARCHIVE-->
255 fi
256fi
257</xsl:text>
258 <xsl:if test="string-length($md5) &gt; 10">
259 <xsl:text>echo "</xsl:text>
260 <xsl:value-of select="$md5"/>
261 <xsl:text>&#x20;&#x20;$</xsl:text>
262 <xsl:value-of select="$varname"/>
263 <xsl:text>" | md5sum -c -
264</xsl:text>
265 </xsl:if>
266<!-- link additional packages into $BUILD_DIR, because they are supposed to
267 be there-->
268 <xsl:if test="string($varname) != 'PACKAGE'">
269 <xsl:text>[[ "$SRC_DIR" != "$BUILD_DIR" ]] &amp;&amp; ln -sf $SRC_DIR/$</xsl:text>
270 <xsl:value-of select="$varname"/>
271 <xsl:text> $BUILD_DIR
272</xsl:text>
273 </xsl:if>
274 </xsl:template>
275
276 <!-- Extract the MD5 sum information -->
277 <xsl:template match="para" mode="md5">
278 <xsl:choose>
279 <xsl:when test="contains(substring-after(string(),'sum: '),'&#xA;')">
280 <xsl:value-of select="substring-before(substring-after(string(),'sum: '),'&#xA;')"/>
281 </xsl:when>
282 <xsl:otherwise>
283 <xsl:value-of select="substring-after(string(),'sum: ')"/>
284 </xsl:otherwise>
285 </xsl:choose>
286 </xsl:template>
287
288 <!-- We have several templates itemizedlist, depending on whether we
289 expect the package information, or additional package(s) or patch(es)
290 information. Select the appropriate mode here. -->
291 <xsl:template match="bridgehead">
292 <xsl:choose>
293 <!-- Special case for Openjdk -->
294 <xsl:when test="contains(string(),'Source Package Information')">
295 <xsl:apply-templates
296 select="following-sibling::itemizedlist[1]//simplelist">
297 <xsl:with-param name="varname" select="'PACKAGE'"/>
298 </xsl:apply-templates>
299 <xsl:apply-templates select="following-sibling::itemizedlist
300 [preceding-sibling::bridgehead[1]=current()
301 and position() &gt;1]//simplelist">
302 <xsl:with-param name="varname" select="'PACKAGE1'"/>
303 </xsl:apply-templates>
304 </xsl:when>
305 <!-- Package information -->
306 <xsl:when test="contains(string(),'Package Information')">
307 <xsl:apply-templates select="following-sibling::itemizedlist
308 [preceding-sibling::bridgehead[1]=current()]"
309 mode="package"/>
310 </xsl:when>
311 <!-- Additional package information -->
312 <!-- special case for llvm -->
313 <xsl:when test="contains(string(),'Optional Download')">
314 <xsl:apply-templates select="following-sibling::itemizedlist"
315 mode="additional"/>
316 </xsl:when>
317 <!-- All other additional packages have "Additional" -->
318 <xsl:when test="contains(string(),'Additional')">
319 <xsl:apply-templates select="following-sibling::itemizedlist"
320 mode="additional"/>
321 </xsl:when>
322 <!-- Do not do anything if the dev has created another type of
323 bridgehead. -->
324 <xsl:otherwise/>
325 </xsl:choose>
326 </xsl:template>
327
328 <!-- Call the download code template with appropriate parameters -->
329 <xsl:template match="itemizedlist" mode="package">
330 <xsl:call-template name="download-file">
331 <xsl:with-param name="httpurl">
332 <xsl:value-of select="./listitem[1]/para/ulink/@url"/>
333 </xsl:with-param>
334 <xsl:with-param name="ftpurl">
335 <xsl:value-of select="./listitem/para[contains(string(),'FTP')]/ulink/@url"/>
336 </xsl:with-param>
337 <xsl:with-param name="md5">
338 <xsl:apply-templates select="./listitem/para[contains(string(),'MD5')]"
339 mode="md5"/>
340 </xsl:with-param>
341 <xsl:with-param name="varname" select="'PACKAGE'"/>
342 </xsl:call-template>
343 </xsl:template>
344
345 <xsl:template match="itemizedlist" mode="additional">
346 <!-- The normal layout is "one listitem"<->"one url", but some devs
347 find amusing to have FTP and/or MD5sum listitems, or to
348 enclose the download information inside a simplelist tag... -->
349 <xsl:for-each select="listitem[.//ulink]">
350 <xsl:choose>
351 <!-- hopefully, there was a HTTP line before -->
352 <xsl:when test="contains(string(./para),'FTP')"/>
353 <xsl:when test=".//simplelist">
354 <xsl:apply-templates select=".//simplelist">
355 <xsl:with-param name="varname" select="'PACKAGE1'"/>
356 </xsl:apply-templates>
357 </xsl:when>
358 <xsl:otherwise>
359 <xsl:call-template name="download-file">
360 <xsl:with-param name="httpurl">
361 <xsl:value-of select="./para/ulink/@url"/>
362 </xsl:with-param>
363 <xsl:with-param name="ftpurl">
364 <xsl:value-of
365 select="following-sibling::listitem[1]/
366 para[contains(string(),'FTP')]/ulink/@url"/>
367 </xsl:with-param>
368 <xsl:with-param name="md5">
369 <xsl:apply-templates
370 select="following-sibling::listitem[position()&lt;3]/
371 para[contains(string(),'MD5')]"
372 mode="md5"/>
373 </xsl:with-param>
374 <xsl:with-param name="varname">
375 <xsl:choose>
376 <xsl:when test="contains(./para/ulink/@url,'.patch')">
377 <xsl:text>PATCH</xsl:text>
378 </xsl:when>
379 <xsl:otherwise>
380 <xsl:text>PACKAGE1</xsl:text>
381 </xsl:otherwise>
382 </xsl:choose>
383 </xsl:with-param>
384 </xsl:call-template>
385 </xsl:otherwise>
386 </xsl:choose>
387 </xsl:for-each>
388 </xsl:template>
389
390 <!-- the simplelist case. Hopefully, the layout is one member for
391 url, one for md5 and others for various information, that we do not
392 use -->
393 <xsl:template match="simplelist">
394 <xsl:param name="varname" select="'PACKAGE1'"/>
395 <xsl:call-template name="download-file">
396 <xsl:with-param name="httpurl" select=".//ulink/@url"/>
397 <xsl:with-param name="md5">
398 <xsl:value-of select="substring-after(member[contains(string(),'MD5')],'sum: ')"/>
399 </xsl:with-param>
400 <xsl:with-param name="varname" select="$varname"/>
401 </xsl:call-template>
402 </xsl:template>
403<!--======================== Commands code ==========================-->
404
405 <xsl:template match="screen">
406 <xsl:if test="child::* = userinput and not(@role = 'nodump')">
407 <xsl:choose>
408 <xsl:when test="@role = 'root'">
409 <xsl:if test="$sudo = 'y'">
410 <xsl:text>sudo -E sh &lt;&lt; ROOT_EOF&#xA;</xsl:text>
411 </xsl:if>
412 <xsl:apply-templates mode="root"/>
413 <xsl:if test="$sudo = 'y'">
414 <xsl:text>&#xA;ROOT_EOF</xsl:text>
415 </xsl:if>
416 </xsl:when>
417 <xsl:otherwise>
418 <xsl:apply-templates select="userinput"/>
419 </xsl:otherwise>
420 </xsl:choose>
421 <xsl:text>&#xA;</xsl:text>
422 </xsl:if>
423 </xsl:template>
424
425 <xsl:template name="set-bootpkg-dir">
426 <xsl:param name="bootpkg" select="'bootscripts'"/>
427 <xsl:param name="url" select="''"/>
428 <xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text>
429 <xsl:copy-of select="$bootpkg"/>
430 <xsl:text> ]] &amp;&amp; mkdir $SRC_DIR/blfs-</xsl:text>
431 <xsl:copy-of select="$bootpkg"/>
432 <xsl:text>
433pushd $SRC_DIR/blfs-</xsl:text>
434 <xsl:copy-of select="$bootpkg"/>
435 <xsl:text>
436URL=</xsl:text>
437 <xsl:value-of select="$url"/>
438 <xsl:text>
439BOOTPACKG=$(basename $URL)
440if [[ ! -f $BOOTPACKG ]] ; then
441 if [[ -f $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG ]] ; then
442 cp $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG $BOOTPACKG
443 elif [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
444 cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
445 else
446 wget -T 30 -t 5 $URL
447 cp $BOOTPACKG $SRC_ARCHIVE
448 fi
449 rm -f unpacked
450fi
451
452if [[ -e unpacked ]] ; then
453 BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
454 if ! [[ -d $BOOTUNPACKDIR ]]; then
455 rm unpacked
456 tar -xvf $BOOTPACKG > unpacked
457 BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
458 fi
459else
460 tar -xvf $BOOTPACKG > unpacked
461 BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
462fi
463cd $BOOTUNPACKDIR
464</xsl:text>
465 </xsl:template>
466
467 <xsl:template match="screen" mode="config">
468 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
469 <xsl:call-template name="set-bootpkg-dir">
470 <xsl:with-param name="bootpkg" select="'bootscripts'"/>
471 <xsl:with-param name="url"
472 select="id('bootscripts')//itemizedlist//ulink/@url"/>
473 </xsl:call-template>
474 </xsl:if>
475 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']">
476 <xsl:call-template name="set-bootpkg-dir">
477 <xsl:with-param name="bootpkg" select="'systemd-units'"/>
478 <xsl:with-param name="url"
479 select="id('systemd-units')//itemizedlist//ulink/@url"/>
480 </xsl:call-template>
481 </xsl:if>
482 <xsl:apply-templates select='.'/>
483 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or
484 @linkend='systemd-units']">
485 <xsl:text>
486popd</xsl:text>
487 </xsl:if>
488 <xsl:text>&#xA;</xsl:text>
489 </xsl:template>
490
491 <xsl:template match="para/command">
492 <xsl:variable name="ns" select="normalize-space(string())"/>
493 <xsl:if test="(contains($ns,'test') or
494 contains($ns,'check'))">
495 <xsl:text>#</xsl:text>
496 <xsl:value-of select="substring-before($ns,'make ')"/>
497 <xsl:text>make </xsl:text>
498 <xsl:if test="not(contains($ns,'-k'))">
499 <xsl:text>-k </xsl:text>
500 </xsl:if>
501 <xsl:value-of select="substring-after($ns,'make ')"/>
502 <xsl:text> || true&#xA;</xsl:text>
503 </xsl:if>
504 </xsl:template>
505
506 <xsl:template match="userinput">
507 <xsl:apply-templates/>
508 </xsl:template>
509
510 <xsl:template match="text()" mode="root">
511 <xsl:call-template name="output-root">
512 <xsl:with-param name="out-string" select="string()"/>
513 </xsl:call-template>
514 </xsl:template>
515
516 <xsl:template name="output-root">
517 <xsl:param name="out-string" select="''"/>
518 <xsl:choose>
519 <xsl:when test="contains($out-string,'make ')">
520 <xsl:call-template name="output-root">
521 <xsl:with-param name="out-string"
522 select="substring-before($out-string,'make ')"/>
523 </xsl:call-template>
524 <xsl:text>make -j1 </xsl:text>
525 <xsl:call-template name="output-root">
526 <xsl:with-param name="out-string"
527 select="substring-after($out-string,'make ')"/>
528 </xsl:call-template>
529 </xsl:when>
530 <xsl:when test="contains($out-string,'$') and $sudo = 'y'">
531 <xsl:call-template name="output-root">
532 <xsl:with-param name="out-string"
533 select="substring-before($out-string,'$')"/>
534 </xsl:call-template>
535 <xsl:text>\$</xsl:text>
536 <xsl:call-template name="output-root">
537 <xsl:with-param name="out-string"
538 select="substring-after($out-string,'$')"/>
539 </xsl:call-template>
540 </xsl:when>
541 <xsl:when test="contains($out-string,'`') and $sudo = 'y'">
542 <xsl:call-template name="output-root">
543 <xsl:with-param name="out-string"
544 select="substring-before($out-string,'`')"/>
545 </xsl:call-template>
546 <xsl:text>\`</xsl:text>
547 <xsl:call-template name="output-root">
548 <xsl:with-param name="out-string"
549 select="substring-after($out-string,'`')"/>
550 </xsl:call-template>
551 </xsl:when>
552 <xsl:when test="contains($out-string,'\') and $sudo = 'y'">
553 <xsl:call-template name="output-root">
554 <xsl:with-param name="out-string"
555 select="substring-before($out-string,'\')"/>
556 </xsl:call-template>
557 <xsl:text>\\</xsl:text>
558 <xsl:call-template name="output-root">
559 <xsl:with-param name="out-string"
560 select="substring-after($out-string,'\')"/>
561 </xsl:call-template>
562 </xsl:when>
563 <xsl:otherwise>
564 <xsl:value-of select="$out-string"/>
565 </xsl:otherwise>
566 </xsl:choose>
567 </xsl:template>
568
569 <xsl:template match="replaceable">
570 <xsl:text>**EDITME</xsl:text>
571 <xsl:apply-templates/>
572 <xsl:text>EDITME**</xsl:text>
573 </xsl:template>
574
575 <xsl:template match="replaceable" mode="root">
576 <xsl:text>**EDITME</xsl:text>
577 <xsl:apply-templates/>
578 <xsl:text>EDITME**</xsl:text>
579 </xsl:template>
580
581</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.