Next update of VFS modules development guide
[Samba.git] / docs / xslt / db2latex-xsl / xsl / scape.mod.xsl
blobef0b6374abba8772551a4ac7cee0541f216a3fad
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- This file was generated automatically. -->
3 <!-- Developers should not commit sundry patches against this file. -->
4 <!-- The source file (with documentation!) is in the admin directory. -->
5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
6 <doc:reference xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" id="scape">
7 <referenceinfo>
8 <releaseinfo role="meta">
9 $Id: scape.mod.xsl,v 1.4 2004/01/23 11:36:06 j-devenish Exp $
10 </releaseinfo>
11 <authorgroup>
12 <author>
13 <firstname>James</firstname>
14 <surname>Devenish</surname>
15 </author>
16 </authorgroup>
17 <copyright>
18 <year>2003</year>
19 <year>2004</year>
20 <holder>Ramon Casellas</holder>
21 </copyright>
22 </referenceinfo>
23 <title><productname condition="noindex">LaTeX</productname> Active-character Escaping</title>
24 </doc:reference>
25 <doc:template xmlns:doc="http://nwalsh.com/xsl/documentation/1.0">
26 <refpurpose>General text escaping for <productname condition="noindex">LaTeX</productname> active characters</refpurpose>
27 <doc:description>
28 <para>
29 Certain characters must be escaped so that <productname condition="noindex">LaTeX</productname> will typeset
30 them verbatim rather than attempting to interpret them as commands.
31 </para>
32 </doc:description>
33 <refsection>
34 <title>Mapping Source</title>
35 <programlisting><![CDATA[<template name="scape">
37 <map from="&lt;" to="\textless{}"/>
39 <map from="&gt;" to="\textgreater{}"/>
41 <map from="~" to="\textasciitilde{}"/>
43 <map from="^" to="\textasciicircum{}"/>
45 <map from="&amp;" to="\&amp;"/>
47 <map from="#" to="\#"/>
49 <map from="_" to="\_"/>
51 <map from="$" to="\$"/>
53 <map from="%" to="\%"/>
55 <map from="|" to="\docbooktolatexpipe{}"/>
57 <map from="{" to="\{"/>
59 <map from="}" to="\}"/>
61 <map from="\textbackslash " to="\textbackslash \ "/>
63 <map from="\" to="\textbackslash "/>
65 </template>]]></programlisting>
66 </refsection>
67 </doc:template>
68 <xsl:template name="scape">
69 <xsl:param name="string"/>
70 <xsl:call-template name="string-replace">
71 <xsl:with-param name="from">&lt;</xsl:with-param>
72 <xsl:with-param name="to">\textless{}</xsl:with-param>
73 <xsl:with-param name="string">
74 <xsl:call-template name="string-replace">
75 <xsl:with-param name="from">&gt;</xsl:with-param>
76 <xsl:with-param name="to">\textgreater{}</xsl:with-param>
77 <xsl:with-param name="string">
78 <xsl:call-template name="string-replace">
79 <xsl:with-param name="from">~</xsl:with-param>
80 <xsl:with-param name="to">\textasciitilde{}</xsl:with-param>
81 <xsl:with-param name="string">
82 <xsl:call-template name="string-replace">
83 <xsl:with-param name="from">^</xsl:with-param>
84 <xsl:with-param name="to">\textasciicircum{}</xsl:with-param>
85 <xsl:with-param name="string">
86 <xsl:call-template name="string-replace">
87 <xsl:with-param name="from">&amp;</xsl:with-param>
88 <xsl:with-param name="to">\&amp;</xsl:with-param>
89 <xsl:with-param name="string">
90 <xsl:call-template name="string-replace">
91 <xsl:with-param name="from">#</xsl:with-param>
92 <xsl:with-param name="to">\#</xsl:with-param>
93 <xsl:with-param name="string">
94 <xsl:call-template name="string-replace">
95 <xsl:with-param name="from">_</xsl:with-param>
96 <xsl:with-param name="to">\_</xsl:with-param>
97 <xsl:with-param name="string">
98 <xsl:call-template name="string-replace">
99 <xsl:with-param name="from">$</xsl:with-param>
100 <xsl:with-param name="to">\$</xsl:with-param>
101 <xsl:with-param name="string">
102 <xsl:call-template name="string-replace">
103 <xsl:with-param name="from">%</xsl:with-param>
104 <xsl:with-param name="to">\%</xsl:with-param>
105 <xsl:with-param name="string">
106 <xsl:call-template name="string-replace">
107 <xsl:with-param name="from">|</xsl:with-param>
108 <xsl:with-param name="to">\docbooktolatexpipe{}</xsl:with-param>
109 <xsl:with-param name="string">
110 <xsl:call-template name="string-replace">
111 <xsl:with-param name="from">{</xsl:with-param>
112 <xsl:with-param name="to">\{</xsl:with-param>
113 <xsl:with-param name="string">
114 <xsl:call-template name="string-replace">
115 <xsl:with-param name="from">}</xsl:with-param>
116 <xsl:with-param name="to">\}</xsl:with-param>
117 <xsl:with-param name="string">
118 <xsl:call-template name="string-replace">
119 <xsl:with-param name="from">\textbackslash </xsl:with-param>
120 <xsl:with-param name="to">\textbackslash \ </xsl:with-param>
121 <xsl:with-param name="string">
122 <xsl:call-template name="string-replace">
123 <xsl:with-param name="from">\</xsl:with-param>
124 <xsl:with-param name="to">\textbackslash </xsl:with-param>
125 <xsl:with-param name="string" select="$string"/>
126 </xsl:call-template>
127 </xsl:with-param>
128 </xsl:call-template>
129 </xsl:with-param>
130 </xsl:call-template>
131 </xsl:with-param>
132 </xsl:call-template>
133 </xsl:with-param>
134 </xsl:call-template>
135 </xsl:with-param>
136 </xsl:call-template>
137 </xsl:with-param>
138 </xsl:call-template>
139 </xsl:with-param>
140 </xsl:call-template>
141 </xsl:with-param>
142 </xsl:call-template>
143 </xsl:with-param>
144 </xsl:call-template>
145 </xsl:with-param>
146 </xsl:call-template>
147 </xsl:with-param>
148 </xsl:call-template>
149 </xsl:with-param>
150 </xsl:call-template>
151 </xsl:with-param>
152 </xsl:call-template>
153 </xsl:template>
154 <doc:template xmlns:doc="http://nwalsh.com/xsl/documentation/1.0">
155 <refpurpose>Escape characters for use with <function condition="latex">index</function>
156 <productname condition="noindex">LaTeX</productname> command</refpurpose>
157 <doc:description>
158 <para>
159 In addition to the characters from <xref linkend="template.scape"/>,
160 certain extra characters must be escaped so that <productname condition="noindex">LaTeX</productname> will not treat
161 them as indexing directives.
162 </para>
163 </doc:description>
164 <refsection>
165 <title>Mapping Source</title>
166 <programlisting><![CDATA[<template name="scape-indexterm">
168 <map from="!" to="&#34;!"/>
170 <map from="|" to="\ensuremath{&#34;|}"/>
172 <map from="@" to="&#34;@"/>
174 <map from="&lt;" to="\textless{}"/>
176 <map from="&gt;" to="\textgreater{}"/>
178 <map from="~" to="\textasciitilde{}"/>
180 <map from="^" to="\textasciicircum{}"/>
182 <map from="&amp;" to="\&amp;"/>
184 <map from="#" to="\#"/>
186 <map from="_" to="\_"/>
188 <map from="$" to="\$"/>
190 <map from="%" to="\%"/>
192 <map from="\}" to="\textbraceright{}"/>
194 <map from="{" to="\textbraceleft{}"/>
196 <map from="}" to="\}"/>
198 <map from="&#34;" to="&#34;&#34;"/>
200 <map from="\textbackslash " to="\textbackslash \ "/>
202 <map from="\" to="\textbackslash "/>
204 </template>]]></programlisting>
205 </refsection>
206 </doc:template>
207 <xsl:template name="scape-indexterm">
208 <xsl:param name="string"/>
209 <xsl:call-template name="string-replace">
210 <xsl:with-param name="from">!</xsl:with-param>
211 <xsl:with-param name="to">"!</xsl:with-param>
212 <xsl:with-param name="string">
213 <xsl:call-template name="string-replace">
214 <xsl:with-param name="from">|</xsl:with-param>
215 <xsl:with-param name="to">\ensuremath{"|}</xsl:with-param>
216 <xsl:with-param name="string">
217 <xsl:call-template name="string-replace">
218 <xsl:with-param name="from">@</xsl:with-param>
219 <xsl:with-param name="to">"@</xsl:with-param>
220 <xsl:with-param name="string">
221 <xsl:call-template name="string-replace">
222 <xsl:with-param name="from">&lt;</xsl:with-param>
223 <xsl:with-param name="to">\textless{}</xsl:with-param>
224 <xsl:with-param name="string">
225 <xsl:call-template name="string-replace">
226 <xsl:with-param name="from">&gt;</xsl:with-param>
227 <xsl:with-param name="to">\textgreater{}</xsl:with-param>
228 <xsl:with-param name="string">
229 <xsl:call-template name="string-replace">
230 <xsl:with-param name="from">~</xsl:with-param>
231 <xsl:with-param name="to">\textasciitilde{}</xsl:with-param>
232 <xsl:with-param name="string">
233 <xsl:call-template name="string-replace">
234 <xsl:with-param name="from">^</xsl:with-param>
235 <xsl:with-param name="to">\textasciicircum{}</xsl:with-param>
236 <xsl:with-param name="string">
237 <xsl:call-template name="string-replace">
238 <xsl:with-param name="from">&amp;</xsl:with-param>
239 <xsl:with-param name="to">\&amp;</xsl:with-param>
240 <xsl:with-param name="string">
241 <xsl:call-template name="string-replace">
242 <xsl:with-param name="from">#</xsl:with-param>
243 <xsl:with-param name="to">\#</xsl:with-param>
244 <xsl:with-param name="string">
245 <xsl:call-template name="string-replace">
246 <xsl:with-param name="from">_</xsl:with-param>
247 <xsl:with-param name="to">\_</xsl:with-param>
248 <xsl:with-param name="string">
249 <xsl:call-template name="string-replace">
250 <xsl:with-param name="from">$</xsl:with-param>
251 <xsl:with-param name="to">\$</xsl:with-param>
252 <xsl:with-param name="string">
253 <xsl:call-template name="string-replace">
254 <xsl:with-param name="from">%</xsl:with-param>
255 <xsl:with-param name="to">\%</xsl:with-param>
256 <xsl:with-param name="string">
257 <xsl:call-template name="string-replace">
258 <xsl:with-param name="from">\}</xsl:with-param>
259 <xsl:with-param name="to">\textbraceright{}</xsl:with-param>
260 <xsl:with-param name="string">
261 <xsl:call-template name="string-replace">
262 <xsl:with-param name="from">{</xsl:with-param>
263 <xsl:with-param name="to">\textbraceleft{}</xsl:with-param>
264 <xsl:with-param name="string">
265 <xsl:call-template name="string-replace">
266 <xsl:with-param name="from">}</xsl:with-param>
267 <xsl:with-param name="to">\}</xsl:with-param>
268 <xsl:with-param name="string">
269 <xsl:call-template name="string-replace">
270 <xsl:with-param name="from">"</xsl:with-param>
271 <xsl:with-param name="to">""</xsl:with-param>
272 <xsl:with-param name="string">
273 <xsl:call-template name="string-replace">
274 <xsl:with-param name="from">\textbackslash </xsl:with-param>
275 <xsl:with-param name="to">\textbackslash \ </xsl:with-param>
276 <xsl:with-param name="string">
277 <xsl:call-template name="string-replace">
278 <xsl:with-param name="from">\</xsl:with-param>
279 <xsl:with-param name="to">\textbackslash </xsl:with-param>
280 <xsl:with-param name="string" select="$string"/>
281 </xsl:call-template>
282 </xsl:with-param>
283 </xsl:call-template>
284 </xsl:with-param>
285 </xsl:call-template>
286 </xsl:with-param>
287 </xsl:call-template>
288 </xsl:with-param>
289 </xsl:call-template>
290 </xsl:with-param>
291 </xsl:call-template>
292 </xsl:with-param>
293 </xsl:call-template>
294 </xsl:with-param>
295 </xsl:call-template>
296 </xsl:with-param>
297 </xsl:call-template>
298 </xsl:with-param>
299 </xsl:call-template>
300 </xsl:with-param>
301 </xsl:call-template>
302 </xsl:with-param>
303 </xsl:call-template>
304 </xsl:with-param>
305 </xsl:call-template>
306 </xsl:with-param>
307 </xsl:call-template>
308 </xsl:with-param>
309 </xsl:call-template>
310 </xsl:with-param>
311 </xsl:call-template>
312 </xsl:with-param>
313 </xsl:call-template>
314 </xsl:with-param>
315 </xsl:call-template>
316 </xsl:template>
317 <doc:template xmlns:doc="http://nwalsh.com/xsl/documentation/1.0">
318 <refpurpose>Verbatim-text escaping for <productname condition="noindex">LaTeX</productname> active characters</refpurpose>
319 <refsection>
320 <title>Mapping Source</title>
321 <programlisting><![CDATA[<template name="scape-verbatim">
323 <map from="~" to="\textasciitilde{}"/>
325 <map from="^" to="\textasciicircum{}"/>
327 <map from="&amp;" to="\&amp;"/>
329 <map from="#" to="\#"/>
331 <map from="_" to="\_\dbz{}"/>
333 <map from="$" to="\$"/>
335 <map from="%" to="\%"/>
337 <map from="/" to="/\dbz{}"/>
339 <map from="-" to="-\dbz{}"/>
341 <map from="+" to="+\dbz{}"/>
343 <map from="." to=".\dbz{}"/>
345 <map from="(" to="(\dbz{}"/>
347 <map from=")" to=")\dbz{}"/>
349 <map from="{" to="\docbooktolatexgobble\string\{"/>
351 <map from="}" to="\docbooktolatexgobble\string\}"/>
353 <map from="\" to="\docbooktolatexgobble\string\\"/>
355 </template>]]></programlisting>
356 </refsection>
357 </doc:template>
358 <xsl:template name="scape-verbatim">
359 <xsl:param name="string"/>
360 <xsl:call-template name="string-replace">
361 <xsl:with-param name="from">~</xsl:with-param>
362 <xsl:with-param name="to">\textasciitilde{}</xsl:with-param>
363 <xsl:with-param name="string">
364 <xsl:call-template name="string-replace">
365 <xsl:with-param name="from">^</xsl:with-param>
366 <xsl:with-param name="to">\textasciicircum{}</xsl:with-param>
367 <xsl:with-param name="string">
368 <xsl:call-template name="string-replace">
369 <xsl:with-param name="from">&amp;</xsl:with-param>
370 <xsl:with-param name="to">\&amp;</xsl:with-param>
371 <xsl:with-param name="string">
372 <xsl:call-template name="string-replace">
373 <xsl:with-param name="from">#</xsl:with-param>
374 <xsl:with-param name="to">\#</xsl:with-param>
375 <xsl:with-param name="string">
376 <xsl:call-template name="string-replace">
377 <xsl:with-param name="from">_</xsl:with-param>
378 <xsl:with-param name="to">\_\dbz{}</xsl:with-param>
379 <xsl:with-param name="string">
380 <xsl:call-template name="string-replace">
381 <xsl:with-param name="from">$</xsl:with-param>
382 <xsl:with-param name="to">\$</xsl:with-param>
383 <xsl:with-param name="string">
384 <xsl:call-template name="string-replace">
385 <xsl:with-param name="from">%</xsl:with-param>
386 <xsl:with-param name="to">\%</xsl:with-param>
387 <xsl:with-param name="string">
388 <xsl:call-template name="string-replace">
389 <xsl:with-param name="from">/</xsl:with-param>
390 <xsl:with-param name="to">/\dbz{}</xsl:with-param>
391 <xsl:with-param name="string">
392 <xsl:call-template name="string-replace">
393 <xsl:with-param name="from">-</xsl:with-param>
394 <xsl:with-param name="to">-\dbz{}</xsl:with-param>
395 <xsl:with-param name="string">
396 <xsl:call-template name="string-replace">
397 <xsl:with-param name="from">+</xsl:with-param>
398 <xsl:with-param name="to">+\dbz{}</xsl:with-param>
399 <xsl:with-param name="string">
400 <xsl:call-template name="string-replace">
401 <xsl:with-param name="from">.</xsl:with-param>
402 <xsl:with-param name="to">.\dbz{}</xsl:with-param>
403 <xsl:with-param name="string">
404 <xsl:call-template name="string-replace">
405 <xsl:with-param name="from">(</xsl:with-param>
406 <xsl:with-param name="to">(\dbz{}</xsl:with-param>
407 <xsl:with-param name="string">
408 <xsl:call-template name="string-replace">
409 <xsl:with-param name="from">)</xsl:with-param>
410 <xsl:with-param name="to">)\dbz{}</xsl:with-param>
411 <xsl:with-param name="string">
412 <xsl:call-template name="string-replace">
413 <xsl:with-param name="from">{</xsl:with-param>
414 <xsl:with-param name="to">\docbooktolatexgobble\string\{</xsl:with-param>
415 <xsl:with-param name="string">
416 <xsl:call-template name="string-replace">
417 <xsl:with-param name="from">}</xsl:with-param>
418 <xsl:with-param name="to">\docbooktolatexgobble\string\}</xsl:with-param>
419 <xsl:with-param name="string">
420 <xsl:call-template name="string-replace">
421 <xsl:with-param name="from">\</xsl:with-param>
422 <xsl:with-param name="to">\docbooktolatexgobble\string\\</xsl:with-param>
423 <xsl:with-param name="string" select="$string"/>
424 </xsl:call-template>
425 </xsl:with-param>
426 </xsl:call-template>
427 </xsl:with-param>
428 </xsl:call-template>
429 </xsl:with-param>
430 </xsl:call-template>
431 </xsl:with-param>
432 </xsl:call-template>
433 </xsl:with-param>
434 </xsl:call-template>
435 </xsl:with-param>
436 </xsl:call-template>
437 </xsl:with-param>
438 </xsl:call-template>
439 </xsl:with-param>
440 </xsl:call-template>
441 </xsl:with-param>
442 </xsl:call-template>
443 </xsl:with-param>
444 </xsl:call-template>
445 </xsl:with-param>
446 </xsl:call-template>
447 </xsl:with-param>
448 </xsl:call-template>
449 </xsl:with-param>
450 </xsl:call-template>
451 </xsl:with-param>
452 </xsl:call-template>
453 </xsl:with-param>
454 </xsl:call-template>
455 </xsl:template>
456 <doc:template xmlns:doc="http://nwalsh.com/xsl/documentation/1.0">
457 <refpurpose>Escape characters for use with the <productname>hyperref</productname>
458 <productname condition="noindex">LaTeX</productname> package</refpurpose>
459 <refsection>
460 <title>Mapping Source</title>
461 <programlisting><![CDATA[<template name="scape-href">
463 <map from="&amp;" to="\&amp;"/>
465 <map from="%" to="\%"/>
467 <map from="[" to="\["/>
469 <map from="]" to="\]"/>
471 <map from="{" to="\{"/>
473 <map from="}" to="\}"/>
475 <map from="\" to="\docbooktolatexgobble\string\\"/>
477 </template>]]></programlisting>
478 </refsection>
479 </doc:template>
480 <xsl:template name="scape-href">
481 <xsl:param name="string"/>
482 <xsl:call-template name="string-replace">
483 <xsl:with-param name="from">&amp;</xsl:with-param>
484 <xsl:with-param name="to">\&amp;</xsl:with-param>
485 <xsl:with-param name="string">
486 <xsl:call-template name="string-replace">
487 <xsl:with-param name="from">%</xsl:with-param>
488 <xsl:with-param name="to">\%</xsl:with-param>
489 <xsl:with-param name="string">
490 <xsl:call-template name="string-replace">
491 <xsl:with-param name="from">[</xsl:with-param>
492 <xsl:with-param name="to">\[</xsl:with-param>
493 <xsl:with-param name="string">
494 <xsl:call-template name="string-replace">
495 <xsl:with-param name="from">]</xsl:with-param>
496 <xsl:with-param name="to">\]</xsl:with-param>
497 <xsl:with-param name="string">
498 <xsl:call-template name="string-replace">
499 <xsl:with-param name="from">{</xsl:with-param>
500 <xsl:with-param name="to">\{</xsl:with-param>
501 <xsl:with-param name="string">
502 <xsl:call-template name="string-replace">
503 <xsl:with-param name="from">}</xsl:with-param>
504 <xsl:with-param name="to">\}</xsl:with-param>
505 <xsl:with-param name="string">
506 <xsl:call-template name="string-replace">
507 <xsl:with-param name="from">\</xsl:with-param>
508 <xsl:with-param name="to">\docbooktolatexgobble\string\\</xsl:with-param>
509 <xsl:with-param name="string" select="$string"/>
510 </xsl:call-template>
511 </xsl:with-param>
512 </xsl:call-template>
513 </xsl:with-param>
514 </xsl:call-template>
515 </xsl:with-param>
516 </xsl:call-template>
517 </xsl:with-param>
518 </xsl:call-template>
519 </xsl:with-param>
520 </xsl:call-template>
521 </xsl:with-param>
522 </xsl:call-template>
523 </xsl:template>
524 <doc:template xmlns:doc="http://nwalsh.com/xsl/documentation/1.0">
525 <refpurpose>Escape characters for use with the <productname>url</productname>
526 <productname condition="noindex">LaTeX</productname> package</refpurpose>
527 <refsection>
528 <title>Mapping Source</title>
529 <programlisting><![CDATA[<template name="scape-url">
531 <map from="&amp;" to="\string&amp;"/>
533 <map from="%" to="\%"/>
535 <map from="{" to="\{"/>
537 <map from="}" to="\}"/>
539 <map from="\" to="\docbooktolatexgobble\string\\"/>
541 </template>]]></programlisting>
542 </refsection>
543 </doc:template>
544 <xsl:template name="scape-url">
545 <xsl:param name="string"/>
546 <xsl:call-template name="string-replace">
547 <xsl:with-param name="from">&amp;</xsl:with-param>
548 <xsl:with-param name="to">\string&amp;</xsl:with-param>
549 <xsl:with-param name="string">
550 <xsl:call-template name="string-replace">
551 <xsl:with-param name="from">%</xsl:with-param>
552 <xsl:with-param name="to">\%</xsl:with-param>
553 <xsl:with-param name="string">
554 <xsl:call-template name="string-replace">
555 <xsl:with-param name="from">{</xsl:with-param>
556 <xsl:with-param name="to">\{</xsl:with-param>
557 <xsl:with-param name="string">
558 <xsl:call-template name="string-replace">
559 <xsl:with-param name="from">}</xsl:with-param>
560 <xsl:with-param name="to">\}</xsl:with-param>
561 <xsl:with-param name="string">
562 <xsl:call-template name="string-replace">
563 <xsl:with-param name="from">\</xsl:with-param>
564 <xsl:with-param name="to">\docbooktolatexgobble\string\\</xsl:with-param>
565 <xsl:with-param name="string" select="$string"/>
566 </xsl:call-template>
567 </xsl:with-param>
568 </xsl:call-template>
569 </xsl:with-param>
570 </xsl:call-template>
571 </xsl:with-param>
572 </xsl:call-template>
573 </xsl:with-param>
574 </xsl:call-template>
575 </xsl:template>
576 <doc:template xmlns:doc="http://nwalsh.com/xsl/documentation/1.0">
577 <refpurpose>Escape the ] character in <productname condition="noindex">LaTeX</productname> optional arguments (experimental)</refpurpose>
578 <refsection>
579 <title>Mapping Source</title>
580 <programlisting><![CDATA[<template name="scape-optionalarg">
582 <map from="]" to="{\rbrack}"/>
584 </template>]]></programlisting>
585 </refsection>
586 </doc:template>
587 <xsl:template name="scape-optionalarg">
588 <xsl:param name="string"/>
589 <xsl:call-template name="string-replace">
590 <xsl:with-param name="from">]</xsl:with-param>
591 <xsl:with-param name="to">{\rbrack}</xsl:with-param>
592 <xsl:with-param name="string" select="$string"/>
593 </xsl:call-template>
594 </xsl:template>
595 <doc:template xmlns:doc="http://nwalsh.com/xsl/documentation/1.0">
596 <refpurpose>Basic line-breaking for verbatim text</refpurpose>
597 <doc:description>
598 <para>
599 Allow line breaking after certain characters.
600 Text should be escaped with the <xref linkend="template.scape"/>
601 template before being passed to this template.
602 </para>
603 </doc:description>
604 <refsection>
605 <title>Mapping Source</title>
606 <programlisting><![CDATA[<template name="scape-slash">
608 <map from="." to=".\dbz{}"/>
610 <map from="/" to="/\dbz{}"/>
612 </template>]]></programlisting>
613 </refsection>
614 </doc:template>
615 <xsl:template name="scape-slash">
616 <xsl:param name="string"/>
617 <xsl:call-template name="string-replace">
618 <xsl:with-param name="from">.</xsl:with-param>
619 <xsl:with-param name="to">.\dbz{}</xsl:with-param>
620 <xsl:with-param name="string">
621 <xsl:call-template name="string-replace">
622 <xsl:with-param name="from">/</xsl:with-param>
623 <xsl:with-param name="to">/\dbz{}</xsl:with-param>
624 <xsl:with-param name="string" select="$string"/>
625 </xsl:call-template>
626 </xsl:with-param>
627 </xsl:call-template>
628 </xsl:template>
629 </xsl:stylesheet>