source: BLFS/xsl/scripts.xsl@ f7d1386

2.4
Last change on this file since f7d1386 was 4954fdf, checked in by Pierre Labastie <pierre@…>, 7 years ago

Use BUILD_DIR and SRC_DIR in bootscripts/systemd-units download instructions

  • 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 $SRC_DIR/$PACKAGE $UNPACKDIR
149 cp $(find . -mindepth 1 -maxdepth 1 -type l) $UNPACKDIR
150 ;;
151esac
152cd $UNPACKDIR&#xA;
153</xsl:text>
154 <xsl:apply-templates select=".//screen | .//para/command"/>
155 <xsl:if test="$sudo = 'y'">
156 <xsl:text>sudo /sbin/</xsl:text>
157 </xsl:if>
158 <xsl:text>ldconfig&#xA;&#xA;</xsl:text>
159 </xsl:when>
160 <xsl:when test="@role = 'configuration'">
161 <xsl:apply-templates select=".//screen" mode="config"/>
162 </xsl:when>
163 </xsl:choose>
164 </xsl:template>
165
166<!--==================== Download code =======================-->
167
168 <!-- template for extracting the filename from an url in the form:
169 proto://internet.name/dir1/.../dirn/filename?condition.
170 Needed, because substring-after(...,'/') returns only the
171 substring after the first '/'. -->
172 <xsl:template name="package_name">
173 <xsl:param name="url" select="foo"/>
174 <xsl:param name="sub-url" select="substring-after($url,'/')"/>
175 <xsl:choose>
176 <xsl:when test="contains($sub-url,'/')">
177 <xsl:call-template name="package_name">
178 <xsl:with-param name="url" select="$sub-url"/>
179 </xsl:call-template>
180 </xsl:when>
181 <xsl:otherwise>
182 <xsl:choose>
183 <xsl:when test="contains($sub-url,'?')">
184 <xsl:value-of select="substring-before($sub-url,'?')"/>
185 </xsl:when>
186 <xsl:otherwise>
187 <xsl:value-of select="$sub-url"/>
188 </xsl:otherwise>
189 </xsl:choose>
190 </xsl:otherwise>
191 </xsl:choose>
192 </xsl:template>
193
194 <!-- Generates the code to download a package, an additional package or
195 a patch. -->
196 <xsl:template name="download-file">
197 <xsl:param name="httpurl" select="''"/>
198 <xsl:param name="ftpurl" select="''"/>
199 <xsl:param name="md5" select="''"/>
200 <xsl:param name="varname" select="''"/>
201 <xsl:variable name="package">
202 <xsl:call-template name="package_name">
203 <xsl:with-param name="url">
204 <xsl:choose>
205 <xsl:when test="string-length($httpurl) &gt; 10">
206 <xsl:value-of select="$httpurl"/>
207 </xsl:when>
208 <xsl:otherwise>
209 <xsl:value-of select="$ftpurl"/>
210 </xsl:otherwise>
211 </xsl:choose>
212 </xsl:with-param>
213 </xsl:call-template>
214 </xsl:variable>
215 <xsl:variable name="first_letter"
216 select="translate(substring($package,1,1),
217 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
218 'abcdefghijklmnopqrstuvwxyz')"/>
219 <xsl:text>&#xA;</xsl:text>
220 <xsl:value-of select="$varname"/>
221 <xsl:text>=</xsl:text>
222 <xsl:value-of select="$package"/>
223 <xsl:text>&#xA;if [[ ! -f $</xsl:text>
224 <xsl:value-of select="$varname"/>
225 <xsl:text> ]] ; then
226 if [[ -f $SRC_ARCHIVE/$</xsl:text>
227 <xsl:value-of select="$varname"/>
228 <xsl:text> ]] ; then&#xA;</xsl:text>
229 <xsl:text> cp $SRC_ARCHIVE/$</xsl:text>
230 <xsl:value-of select="$varname"/>
231 <xsl:text> $</xsl:text>
232 <xsl:value-of select="$varname"/>
233 <xsl:text>
234 else&#xA;</xsl:text>
235 <!-- Download from upstream http -->
236 <xsl:if test="string-length($httpurl) &gt; 10">
237 <xsl:text> wget -T 30 -t 5 </xsl:text>
238 <xsl:value-of select="$httpurl"/>
239 <xsl:text> ||&#xA;</xsl:text>
240 </xsl:if>
241 <!-- Download from upstream ftp -->
242 <xsl:if test="string-length($ftpurl) &gt; 10">
243 <xsl:text> wget -T 30 -t 5 </xsl:text>
244 <xsl:value-of select="$ftpurl"/>
245 <xsl:text> ||&#xA;</xsl:text>
246 </xsl:if>
247 <!-- The FTP_SERVER mirror as a last resort -->
248 <xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
249 <xsl:value-of select="$first_letter"/>
250 <xsl:text>/$</xsl:text>
251 <xsl:value-of select="$varname"/>
252 <xsl:text><!--
253 cp $</xsl:text>
254 <xsl:value-of select="$varname"/>
255 <xsl:text> $SRC_ARCHIVE-->
256 fi
257fi
258</xsl:text>
259 <xsl:if test="string-length($md5) &gt; 10">
260 <xsl:text>echo "</xsl:text>
261 <xsl:value-of select="$md5"/>
262 <xsl:text>&#x20;&#x20;$</xsl:text>
263 <xsl:value-of select="$varname"/>
264 <xsl:text>" | md5sum -c -
265</xsl:text>
266 </xsl:if>
267<!-- link additional packages into $BUILD_DIR, because they are supposed to
268 be there-->
269 <xsl:if test="string($varname) != 'PACKAGE'">
270 <xsl:text>[[ "$SRC_DIR" != "$BUILD_DIR" ]] &amp;&amp; ln -sf $SRC_DIR/$</xsl:text>
271 <xsl:value-of select="$varname"/>
272 <xsl:text> $BUILD_DIR
273</xsl:text>
274 </xsl:if>
275 </xsl:template>
276
277 <!-- Extract the MD5 sum information -->
278 <xsl:template match="para" mode="md5">
279 <xsl:choose>
280 <xsl:when test="contains(substring-after(string(),'sum: '),'&#xA;')">
281 <xsl:value-of select="substring-before(substring-after(string(),'sum: '),'&#xA;')"/>
282 </xsl:when>
283 <xsl:otherwise>
284 <xsl:value-of select="substring-after(string(),'sum: ')"/>
285 </xsl:otherwise>
286 </xsl:choose>
287 </xsl:template>
288
289 <!-- We have several templates itemizedlist, depending on whether we
290 expect the package information, or additional package(s) or patch(es)
291 information. Select the appropriate mode here. -->
292 <xsl:template match="bridgehead">
293 <xsl:choose>
294 <!-- Special case for Openjdk -->
295 <xsl:when test="contains(string(),'Source Package Information')">
296 <xsl:apply-templates
297 select="following-sibling::itemizedlist[1]//simplelist">
298 <xsl:with-param name="varname" select="'PACKAGE'"/>
299 </xsl:apply-templates>
300 <xsl:apply-templates select="following-sibling::itemizedlist
301 [preceding-sibling::bridgehead[1]=current()
302 and position() &gt;1]//simplelist">
303 <xsl:with-param name="varname" select="'PACKAGE1'"/>
304 </xsl:apply-templates>
305 </xsl:when>
306 <!-- Package information -->
307 <xsl:when test="contains(string(),'Package Information')">
308 <xsl:apply-templates select="following-sibling::itemizedlist
309 [preceding-sibling::bridgehead[1]=current()]"
310 mode="package"/>
311 </xsl:when>
312 <!-- Additional package information -->
313 <!-- special case for llvm -->
314 <xsl:when test="contains(string(),'Optional Download')">
315 <xsl:apply-templates select="following-sibling::itemizedlist"
316 mode="additional"/>
317 </xsl:when>
318 <!-- All other additional packages have "Additional" -->
319 <xsl:when test="contains(string(),'Additional')">
320 <xsl:apply-templates select="following-sibling::itemizedlist"
321 mode="additional"/>
322 </xsl:when>
323 <!-- Do not do anything if the dev has created another type of
324 bridgehead. -->
325 <xsl:otherwise/>
326 </xsl:choose>
327 </xsl:template>
328
329 <!-- Call the download code template with appropriate parameters -->
330 <xsl:template match="itemizedlist" mode="package">
331 <xsl:call-template name="download-file">
332 <xsl:with-param name="httpurl">
333 <xsl:value-of select="./listitem[1]/para/ulink/@url"/>
334 </xsl:with-param>
335 <xsl:with-param name="ftpurl">
336 <xsl:value-of select="./listitem/para[contains(string(),'FTP')]/ulink/@url"/>
337 </xsl:with-param>
338 <xsl:with-param name="md5">
339 <xsl:apply-templates select="./listitem/para[contains(string(),'MD5')]"
340 mode="md5"/>
341 </xsl:with-param>
342 <xsl:with-param name="varname" select="'PACKAGE'"/>
343 </xsl:call-template>
344 </xsl:template>
345
346 <xsl:template match="itemizedlist" mode="additional">
347 <!-- The normal layout is "one listitem"<->"one url", but some devs
348 find amusing to have FTP and/or MD5sum listitems, or to
349 enclose the download information inside a simplelist tag... -->
350 <xsl:for-each select="listitem[.//ulink]">
351 <xsl:choose>
352 <!-- hopefully, there was a HTTP line before -->
353 <xsl:when test="contains(string(./para),'FTP')"/>
354 <xsl:when test=".//simplelist">
355 <xsl:apply-templates select=".//simplelist">
356 <xsl:with-param name="varname" select="'PACKAGE1'"/>
357 </xsl:apply-templates>
358 </xsl:when>
359 <xsl:otherwise>
360 <xsl:call-template name="download-file">
361 <xsl:with-param name="httpurl">
362 <xsl:value-of select="./para/ulink/@url"/>
363 </xsl:with-param>
364 <xsl:with-param name="ftpurl">
365 <xsl:value-of
366 select="following-sibling::listitem[1]/
367 para[contains(string(),'FTP')]/ulink/@url"/>
368 </xsl:with-param>
369 <xsl:with-param name="md5">
370 <xsl:apply-templates
371 select="following-sibling::listitem[position()&lt;3]/
372 para[contains(string(),'MD5')]"
373 mode="md5"/>
374 </xsl:with-param>
375 <xsl:with-param name="varname">
376 <xsl:choose>
377 <xsl:when test="contains(./para/ulink/@url,'.patch')">
378 <xsl:text>PATCH</xsl:text>
379 </xsl:when>
380 <xsl:otherwise>
381 <xsl:text>PACKAGE1</xsl:text>
382 </xsl:otherwise>
383 </xsl:choose>
384 </xsl:with-param>
385 </xsl:call-template>
386 </xsl:otherwise>
387 </xsl:choose>
388 </xsl:for-each>
389 </xsl:template>
390
391 <!-- the simplelist case. Hopefully, the layout is one member for
392 url, one for md5 and others for various information, that we do not
393 use -->
394 <xsl:template match="simplelist">
395 <xsl:param name="varname" select="'PACKAGE1'"/>
396 <xsl:call-template name="download-file">
397 <xsl:with-param name="httpurl" select=".//ulink/@url"/>
398 <xsl:with-param name="md5">
399 <xsl:value-of select="substring-after(member[contains(string(),'MD5')],'sum: ')"/>
400 </xsl:with-param>
401 <xsl:with-param name="varname" select="$varname"/>
402 </xsl:call-template>
403 </xsl:template>
404<!--======================== Commands code ==========================-->
405
406 <xsl:template match="screen">
407 <xsl:if test="child::* = userinput and not(@role = 'nodump')">
408 <xsl:choose>
409 <xsl:when test="@role = 'root'">
410 <xsl:if test="$sudo = 'y'">
411 <xsl:text>sudo -E sh &lt;&lt; ROOT_EOF&#xA;</xsl:text>
412 </xsl:if>
413 <xsl:apply-templates mode="root"/>
414 <xsl:if test="$sudo = 'y'">
415 <xsl:text>&#xA;ROOT_EOF</xsl:text>
416 </xsl:if>
417 </xsl:when>
418 <xsl:otherwise>
419 <xsl:apply-templates select="userinput"/>
420 </xsl:otherwise>
421 </xsl:choose>
422 <xsl:text>&#xA;</xsl:text>
423 </xsl:if>
424 </xsl:template>
425
426 <xsl:template name="set-bootpkg-dir">
427 <xsl:param name="bootpkg" select="'bootscripts'"/>
428 <xsl:param name="url" select="''"/>
429 <xsl:text>BOOTPKG_DIR=blfs-</xsl:text>
430 <xsl:copy-of select="$bootpkg"/>
431 <xsl:text>
432BOOTSRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${BOOTPKG_DIR}}
433BOOTBUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
434mkdir -p $BOOTSRC_DIR
435mkdir -p $BOOTBUILD_DIR
436
437pushd $BOOTSRC_DIR
438URL=</xsl:text>
439 <xsl:value-of select="$url"/>
440 <xsl:text>
441BOOTPACKG=$(basename $URL)
442if [[ ! -f $BOOTPACKG ]] ; then
443 if [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
444 cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
445 else
446 wget -T 30 -t 5 $URL
447 fi
448 rm -f $BOOTBUILD_DIR/unpacked
449fi
450
451cd $BOOTBUILD_DIR
452if [[ -e unpacked ]] ; then
453 BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
454 if ! [[ -d $BOOTUNPACKDIR ]]; then
455 tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
456 BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
457 fi
458else
459 tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
460 BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
461fi
462cd $BOOTUNPACKDIR
463</xsl:text>
464 </xsl:template>
465
466 <xsl:template match="screen" mode="config">
467 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
468 <xsl:call-template name="set-bootpkg-dir">
469 <xsl:with-param name="bootpkg" select="'bootscripts'"/>
470 <xsl:with-param name="url"
471 select="id('bootscripts')//itemizedlist//ulink/@url"/>
472 </xsl:call-template>
473 </xsl:if>
474 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']">
475 <xsl:call-template name="set-bootpkg-dir">
476 <xsl:with-param name="bootpkg" select="'systemd-units'"/>
477 <xsl:with-param name="url"
478 select="id('systemd-units')//itemizedlist//ulink/@url"/>
479 </xsl:call-template>
480 </xsl:if>
481 <xsl:apply-templates select='.'/>
482 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or
483 @linkend='systemd-units']">
484 <xsl:text>
485popd</xsl:text>
486 </xsl:if>
487 <xsl:text>&#xA;</xsl:text>
488 </xsl:template>
489
490 <xsl:template match="para/command">
491 <xsl:variable name="ns" select="normalize-space(string())"/>
492 <xsl:if test="(contains($ns,'test') or
493 contains($ns,'check'))">
494 <xsl:text>#</xsl:text>
495 <xsl:value-of select="substring-before($ns,'make ')"/>
496 <xsl:text>make </xsl:text>
497 <xsl:if test="not(contains($ns,'-k'))">
498 <xsl:text>-k </xsl:text>
499 </xsl:if>
500 <xsl:value-of select="substring-after($ns,'make ')"/>
501 <xsl:text> || true&#xA;</xsl:text>
502 </xsl:if>
503 </xsl:template>
504
505 <xsl:template match="userinput">
506 <xsl:apply-templates/>
507 </xsl:template>
508
509 <xsl:template match="text()" mode="root">
510 <xsl:call-template name="output-root">
511 <xsl:with-param name="out-string" select="string()"/>
512 </xsl:call-template>
513 </xsl:template>
514
515 <xsl:template name="output-root">
516 <xsl:param name="out-string" select="''"/>
517 <xsl:choose>
518 <xsl:when test="contains($out-string,'make ')">
519 <xsl:call-template name="output-root">
520 <xsl:with-param name="out-string"
521 select="substring-before($out-string,'make ')"/>
522 </xsl:call-template>
523 <xsl:text>make -j1 </xsl:text>
524 <xsl:call-template name="output-root">
525 <xsl:with-param name="out-string"
526 select="substring-after($out-string,'make ')"/>
527 </xsl:call-template>
528 </xsl:when>
529 <xsl:when test="contains($out-string,'$') and $sudo = 'y'">
530 <xsl:call-template name="output-root">
531 <xsl:with-param name="out-string"
532 select="substring-before($out-string,'$')"/>
533 </xsl:call-template>
534 <xsl:text>\$</xsl:text>
535 <xsl:call-template name="output-root">
536 <xsl:with-param name="out-string"
537 select="substring-after($out-string,'$')"/>
538 </xsl:call-template>
539 </xsl:when>
540 <xsl:when test="contains($out-string,'`') and $sudo = 'y'">
541 <xsl:call-template name="output-root">
542 <xsl:with-param name="out-string"
543 select="substring-before($out-string,'`')"/>
544 </xsl:call-template>
545 <xsl:text>\`</xsl:text>
546 <xsl:call-template name="output-root">
547 <xsl:with-param name="out-string"
548 select="substring-after($out-string,'`')"/>
549 </xsl:call-template>
550 </xsl:when>
551 <xsl:when test="contains($out-string,'\') and $sudo = 'y'">
552 <xsl:call-template name="output-root">
553 <xsl:with-param name="out-string"
554 select="substring-before($out-string,'\')"/>
555 </xsl:call-template>
556 <xsl:text>\\</xsl:text>
557 <xsl:call-template name="output-root">
558 <xsl:with-param name="out-string"
559 select="substring-after($out-string,'\')"/>
560 </xsl:call-template>
561 </xsl:when>
562 <xsl:otherwise>
563 <xsl:value-of select="$out-string"/>
564 </xsl:otherwise>
565 </xsl:choose>
566 </xsl:template>
567
568 <xsl:template match="replaceable">
569 <xsl:text>**EDITME</xsl:text>
570 <xsl:apply-templates/>
571 <xsl:text>EDITME**</xsl:text>
572 </xsl:template>
573
574 <xsl:template match="replaceable" mode="root">
575 <xsl:text>**EDITME</xsl:text>
576 <xsl:apply-templates/>
577 <xsl:text>EDITME**</xsl:text>
578 </xsl:template>
579
580</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.