source: BLFS/xsl/scripts.xsl@ 50a8ed0

new_features
Last change on this file since 50a8ed0 was 45f0437, checked in by Pierre Labastie <pierre@…>, 8 years ago

Merge rev 3890 from trunk:
Fix Ed tarball download

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