Stylescript fixes
[Samba/gebeck_regimport.git] / docs / xslt / pearson.xsl
blob99ee05b5af9c7f8842ec18bd764dd7766809fc29
1 <?xml version='1.0'?>
2 <!--
3 Convert DocBook to XML validating against the Pearson DTD
5 (C) Jochen Hein
6 (C) Jelmer Vernooij <jelmer@samba.org> 2004
7 -->
8 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns:exsl="http://exslt.org/common"
10 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
11 exclude-result-prefixes="doc"
12 version="1.1"
13 extension-element-prefixes="exsl">
15 <xsl:import href="../settings.xsl"/>
17 <!-- TODO <entry></entry> -> <entry><p/></entry> -->
19 <xsl:output method="xml"
20 encoding="UTF-8"
21 doctype-public="-//Pearson//DTD Books//DE"
22 doctype-system="http://www.pearson.de/pearson.dtd"
23 indent="yes"
24 omit-xml-declaration="no"
25 standalone="no"/>
27 <!-- Warn about DocBook elements that are not converted -->
28 <xsl:template match="*">
29 <xsl:message>
30 <xsl:text>No template matches </xsl:text>
31 <xsl:value-of select="name(.)"/>
32 <xsl:text>.</xsl:text>
33 </xsl:message>
34 </xsl:template>
36 <!--
37 ====================================================================
38 -->
39 <!-- Establish strip/preserve whitespace rules -->
41 <xsl:preserve-space elements="*"/>
43 <xsl:strip-space elements="
44 abstract affiliation anchor answer appendix area areaset areaspec
45 artheader article audiodata audioobject author authorblurb authorgroup
46 beginpage bibliodiv biblioentry bibliography biblioset blockquote book
47 bookbiblio bookinfo callout calloutlist caption caution
48 city pubdate publisher publishername"/>
50 <xsl:template name="transform.id.attribute">
51 <xsl:if test="@id != ''">
52 <xsl:attribute name="id">
53 <xsl:value-of select="@id"/>
54 </xsl:attribute>
55 </xsl:if>
56 </xsl:template>
58 <xsl:template match="/">
59 <xsl:processing-instruction
60 name="xml-stylesheet">href="pearson.css"
61 type="text/css"</xsl:processing-instruction>
62 <xsl:text>
63 </xsl:text>
64 <xsl:comment>
65 <xsl:text>Transformed with pearson.xsl by Jochen Hein</xsl:text>
66 </xsl:comment>
67 <xsl:text>
68 </xsl:text>
69 <!-- Releaseinfo einbauen? -->
70 <xsl:comment>
71 <xsl:apply-templates select=".//releaseinfo" mode="comment"/>
72 </xsl:comment>
73 <xsl:text>
74 </xsl:text>
75 <xsl:apply-templates/>
76 </xsl:template>
78 <xsl:template match="book">
79 <book>
80 <xsl:apply-templates/>
81 </book>
82 </xsl:template>
84 <xsl:template match="bookinfo">
85 <bookinfo>
86 <xsl:apply-templates/>
87 </bookinfo>
88 </xsl:template>
90 <xsl:template match="bookinfo/author">
91 <!-- author>
92 <xsl:apply-templates/>
93 </author -->
94 </xsl:template>
96 <xsl:template match="chapter">
97 <chapter>
98 <xsl:call-template name="transform.id.attribute"/>
99 <xsl:apply-templates/>
100 </chapter>
101 </xsl:template>
103 <xsl:template match="chapter/title/command">
104 <xsl:apply-templates/>
105 </xsl:template>
107 <xsl:template match="index">
108 <xsl:comment> XXX insert index here </xsl:comment>
109 <!-- chapter>
110 <xsl:call-template name="transform.id.attribute"/>
111 <xsl:apply-templates/>
112 </chapter -->
113 </xsl:template>
115 <xsl:template match="preface">
116 <preface>
117 <xsl:call-template name="transform.id.attribute"/>
118 <xsl:apply-templates/>
119 </preface>
120 </xsl:template>
122 <xsl:template match="section|sect1|sect2|sect3|sect4">
123 <sect>
124 <xsl:call-template name="transform.id.attribute"/>
125 <xsl:apply-templates/>
126 </sect>
127 </xsl:template>
129 <xsl:template match="partintro">
130 <xsl:copy>
131 <xsl:apply-templates select="@*|node()"/>
132 </xsl:copy>
133 </xsl:template>
135 <xsl:template match="part">
136 <appendix>
137 <xsl:apply-templates/>
138 </appendix>
139 </xsl:template>
141 <xsl:template match="appendix[1]">
142 <appendix>
143 <chapter>
144 <xsl:call-template name="transform.id.attribute"/>
145 <xsl:apply-templates/>
146 </chapter>
147 <xsl:for-each select="following-sibling::appendix">
148 <chapter>
149 <xsl:call-template name="transform.id.attribute"/>
150 <xsl:apply-templates/>
151 </chapter>
152 </xsl:for-each>
153 </appendix>
154 </xsl:template>
156 <xsl:template match="appendix[position() != 1]">
157 </xsl:template>
159 <xsl:template match="title">
160 <title><xsl:apply-templates/></title>
161 </xsl:template>
164 <xsl:template match="para">
165 <p><xsl:apply-templates/></p>
166 <!-- p><xsl:apply-templates><value-of
167 select="normalize-space()"/></xsl:apply-templates></p -->
168 </xsl:template>
170 <xsl:template match="tip">
171 <tip><xsl:apply-templates/></tip>
172 </xsl:template>
174 <xsl:template match="warning|important|caution">
175 <stop><xsl:apply-templates/></stop>
176 </xsl:template>
178 <xsl:template match="note">
179 <info><xsl:apply-templates/></info>
180 </xsl:template>
182 <xsl:template match="emphasis">
183 <xsl:variable name="role" select="@role"/>
185 <xsl:choose>
186 <xsl:when test="$role='italic'">
187 <i><xsl:apply-templates/></i>
188 </xsl:when>
189 <xsl:otherwise>
190 <em><xsl:apply-templates/></em>
191 </xsl:otherwise>
192 </xsl:choose>
193 </xsl:template>
195 <xsl:template match="ulink">
196 <xsl:apply-templates/>
197 <footnote><p><url><xsl:value-of select="@ulink"/></url></p></footnote>
198 </xsl:template>
200 <xsl:template match="email">
201 <url>mailto:<xsl:apply-templates/></url>
202 </xsl:template>
204 <xsl:template match="indexterm">
205 <ie><xsl:apply-templates/></ie>
206 </xsl:template>
208 <xsl:template match="primary">
209 <t><xsl:apply-templates/></t>
210 </xsl:template>
212 <xsl:template match="secondary">
213 <t><xsl:apply-templates/></t>
214 </xsl:template>
216 <xsl:template match="see">
217 <synonym><xsl:apply-templates/></synonym>
218 </xsl:template>
220 <xsl:template
221 match="footnote"><footnote><xsl:apply-templates/></footnote></xsl:template>
223 <xsl:template match="command">
224 <code><xsl:apply-templates/></code>
225 </xsl:template>
227 <xsl:template match="function">
228 <code><xsl:apply-templates/></code>
229 </xsl:template>
231 <xsl:template match="systemitem">
233 <!-- xsl:if test="@role != '' and @role != 'signal'">
234 <xsl:message>
235 Warning: role attribute is <xsl:value-of select="@role"/>
236 </xsl:message>
237 </xsl:if -->
238 <code><xsl:apply-templates/></code>
239 </xsl:template>
241 <xsl:template match="sgmltag">
242 <code><xsl:apply-templates/></code>
243 </xsl:template>
245 <xsl:template match="filename">
246 <code><xsl:apply-templates/></code>
247 </xsl:template>
249 <xsl:template match="errorcode">
250 <code><xsl:apply-templates/></code>
251 </xsl:template>
253 <xsl:template match="errortype">
254 <code><xsl:apply-templates/></code>
255 </xsl:template>
257 <xsl:template match="returnvalue">
258 <code><xsl:apply-templates/></code>
259 </xsl:template>
261 <xsl:template match="glosslist|glossary">
262 <dl><xsl:apply-templates/></dl>
263 </xsl:template>
265 <xsl:template match="glossentry">
266 <dlitem><xsl:apply-templates/></dlitem>
267 </xsl:template>
269 <xsl:template match="glossentry/acronym">
270 <dt><xsl:apply-templates/></dt>
271 </xsl:template>
273 <xsl:template match="acronym">
274 <b><xsl:apply-templates/></b>
275 </xsl:template>
277 <xsl:template match="glossterm">
278 <dt><xsl:apply-templates/></dt>
279 </xsl:template>
281 <xsl:template match="glossdef">
282 <dd><xsl:apply-templates/></dd>
283 </xsl:template>
285 <xsl:template match="itemizedlist">
286 <ul><xsl:apply-templates/></ul>
287 </xsl:template>
289 <xsl:template match="varlistentry">
290 <dlitem>
291 <dt><xsl:apply-templates select="term"/></dt>
292 <dd><xsl:apply-templates select="listitem"/></dd>
293 </dlitem>
294 </xsl:template>
296 <xsl:template match="variablelist">
297 <dl><xsl:apply-templates/></dl>
298 </xsl:template>
300 <xsl:template match="simplelist">
301 <ul>
302 <xsl:for-each select="member">
303 <li><p><xsl:apply-templates/></p></li>
304 </xsl:for-each>
305 </ul>
306 </xsl:template>
308 <xsl:template match="orderedlist">
309 <xsl:variable name="numeration" select="@numeration"/>
310 <ol>
311 <xsl:if test="$numeration != ''">
312 <xsl:attribute name="type">
313 <xsl:value-of select="$numeration"/>
314 </xsl:attribute>
315 </xsl:if>
316 <xsl:apply-templates/>
317 </ol>
318 </xsl:template>
320 <xsl:template match="listitem">
321 <li><xsl:apply-templates/></li>
322 </xsl:template>
324 <xsl:template match="firstterm">
325 <em><xsl:apply-templates/></em>
326 </xsl:template>
328 <xsl:template match="literal/systemitem">
329 <em><xsl:apply-templates/></em>
330 </xsl:template>
332 <xsl:template match="superscript">
333 <sup><xsl:apply-templates/></sup>
334 </xsl:template>
336 <xsl:template match="productname">
337 <xsl:apply-templates/>
338 </xsl:template>
340 <xsl:template match="keycombo">
342 <xsl:variable name="action" select="@action"/>
343 <xsl:variable name="joinchar">
345 <xsl:choose>
347 <xsl:when test="$action='seq'">
348 <xsl:text> </xsl:text></xsl:when>
349 <xsl:when test="$action='simul'">+</xsl:when>
350 <xsl:when test="$action='press'">-</xsl:when>
351 <xsl:when test="$action='click'">-</xsl:when>
352 <xsl:when test="$action='double-click'">-</xsl:when>
353 <xsl:when test="$action='other'"></xsl:when>
354 <xsl:otherwise>-</xsl:otherwise>
355 </xsl:choose>
356 </xsl:variable>
358 <xsl:for-each select="*">
359 <xsl:if test="position()>1"><xsl:value-of
360 select="$joinchar"/></xsl:if>
361 <xsl:apply-templates select="."/>
362 </xsl:for-each>
364 </xsl:template>
367 <xsl:template match="keycap">
368 <key><xsl:apply-templates/></key>
369 </xsl:template>
371 <xsl:template match="keycap/replaceable">
372 <xsl:apply-templates/>
373 </xsl:template>
377 <xsl:template match="menuchoice">
378 <xsl:variable name="shortcut" select="./shortcut"/>
379 <xsl:call-template name="process.menuchoice"/>
380 <xsl:if test="$shortcut">
381 <xsl:text> (</xsl:text>
382 <xsl:apply-templates select="$shortcut"/>
383 <xsl:text>)</xsl:text>
384 </xsl:if>
385 </xsl:template>
387 <xsl:template name="process.menuchoice">
388 <xsl:param name="nodelist"
389 select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
390 <xsl:param name="count" select="1"/>
392 <xsl:choose>
393 <xsl:when test="$count>count($nodelist)"></xsl:when>
394 <xsl:when test="$count=1">
395 <xsl:apply-templates select="$nodelist[$count=position()]"/>
396 <xsl:call-template name="process.menuchoice">
397 <xsl:with-param name="nodelist" select="$nodelist"/>
398 <xsl:with-param name="count" select="$count+1"/>
399 </xsl:call-template>
400 </xsl:when>
401 <xsl:otherwise>
402 <xsl:variable name="node" select="$nodelist[$count=position()]"/>
403 <xsl:choose>
404 <xsl:when test="name($node)='guimenuitem'
405 or name($node)='guisubmenu'">
406 <xsl:text>-&gt;</xsl:text>
407 </xsl:when>
408 <xsl:otherwise>+</xsl:otherwise>
409 </xsl:choose>
410 <xsl:apply-templates select="$node"/>
411 <xsl:call-template name="process.menuchoice">
412 <xsl:with-param name="nodelist" select="$nodelist"/>
413 <xsl:with-param name="count" select="$count+1"/>
414 </xsl:call-template>
415 </xsl:otherwise>
416 </xsl:choose>
417 </xsl:template>
420 <xsl:template match="guimenu">
421 <guiitem><xsl:apply-templates/></guiitem>
422 </xsl:template>
424 <xsl:template match="guimenuitem">
425 <guiitem><xsl:apply-templates/></guiitem>
426 </xsl:template>
428 <xsl:template match="guiicon">
429 <guiitem><xsl:apply-templates/></guiitem>
430 </xsl:template>
432 <xsl:template match="guilabel">
433 <guiitem><xsl:apply-templates/></guiitem>
434 </xsl:template>
436 <xsl:template match="guibutton">
437 <guiitem><xsl:apply-templates/></guiitem>
438 </xsl:template>
440 <xsl:template name="transform.epigraph">
441 <xsl:apply-templates select="para"/>
442 <xsl:apply-templates select="attribution"/>
443 </xsl:template>
445 <xsl:template match="epigraph">
446 <chapterintro><motto><xsl:call-template
447 name="transform.epigraph"/></motto></chapterintro>
448 </xsl:template>
450 <xsl:template match="section/epigraph">
451 <motto><xsl:call-template name="transform.epigraph"/></motto>
452 </xsl:template>
454 <xsl:template match="epigraph/para">
455 <p><em><xsl:apply-templates/></em></p>
456 </xsl:template>
457 <xsl:template match="attribution">
458 <p><i><xsl:apply-templates/></i></p>
459 </xsl:template>
461 <xsl:template match="errorname">
462 <i><xsl:apply-templates/></i>
463 </xsl:template>
465 <xsl:template match="constant">
466 <b><xsl:apply-templates/></b>
467 </xsl:template>
469 <xsl:template match="envar">
470 <code><xsl:apply-templates/></code>
471 </xsl:template>
473 <xsl:template match="literal">
474 <code><xsl:apply-templates/></code>
475 </xsl:template>
477 <xsl:template match="option">
478 <code><xsl:apply-templates/></code>
479 </xsl:template>
481 <xsl:template match="parameter">
482 <code><xsl:apply-templates/></code>
483 </xsl:template>
485 <xsl:template match="application">
486 <b><xsl:apply-templates/></b>
487 </xsl:template>
489 <xsl:template match="screen/userinput">
490 <b><xsl:apply-templates/></b>
491 </xsl:template>
493 <xsl:template match="screen/prompt">
494 <xsl:apply-templates/>
495 </xsl:template>
497 <xsl:template match="prompt">
498 <code><xsl:apply-templates/></code>
499 </xsl:template>
501 <xsl:template match="userinput">
502 <code><b><xsl:apply-templates/></b></code>
503 </xsl:template>
505 <xsl:template match="computeroutput">
506 <code><xsl:apply-templates/></code>
507 </xsl:template>
509 <xsl:template match="screen/computeroutput">
510 <xsl:apply-templates/>
511 </xsl:template>
513 <xsl:template match="replaceable">
514 <i><xsl:apply-templates/></i>
515 </xsl:template>
517 <xsl:template match="userinput/replaceable">
518 <i><xsl:apply-templates/></i>
519 </xsl:template>
521 <xsl:template match="citation"
522 xmlns:xlink="http://www.w3.org/1999/xlink">
524 <xsl:variable name="target" select="."/>
525 <xsl:variable name="targets" select="id($target)"/>
527 <!-- xsl:call-template name="check.id.unique">
528 <xsl:with-param name="linkend" select="$target"/>
529 </xsl:call-template -->
531 <xsl:choose>
532 <xsl:when test="count($targets) = 0">
533 <xsl:message>
534 <xsl:text>Citation of nonexistent id: </xsl:text>
535 <xsl:value-of select="."/>
536 </xsl:message>
537 <xsl:text>[??? </xsl:text>
538 <xsl:value-of select="."/>
539 <xsl:text>]</xsl:text>
540 </xsl:when>
541 <xsl:otherwise>
542 <xsl:text>[</xsl:text><xsl:value-of
543 select="."/><xsl:text>]</xsl:text>
544 </xsl:otherwise>
545 </xsl:choose>
547 </xsl:template>
549 <xsl:template match="figure">
550 <figure>
551 <xsl:call-template name="transform.id.attribute"/>
552 <xsl:apply-templates/>
553 </figure>
554 </xsl:template>
556 <xsl:template match="graphic">
557 <xsl:message>
558 <xsl:text>Obsolete tag "graphic" found.</xsl:text>
559 </xsl:message>
561 <figureref>
562 <xsl:attribute name="fileref">
563 <xsl:value-of select="@fileref"/>
564 </xsl:attribute>
565 </figureref>
566 </xsl:template>
568 <xsl:template match="mediaobject">
569 <xsl:apply-templates/>
570 </xsl:template>
572 <xsl:template match="imageobject">
573 <xsl:apply-templates/>
574 </xsl:template>
576 <xsl:template match="imagedata">
577 <xsl:variable name="scale" select="@scale"/>
578 <figureref>
579 <xsl:attribute name="fileref">
580 <xsl:value-of select="@fileref"/>
581 </xsl:attribute>
582 <xsl:if test="$scale != ''">
583 <xsl:attribute name="scale"><xsl:value-of
584 select="$scale"/>%</xsl:attribute>
585 </xsl:if>
586 </figureref>
587 </xsl:template>
589 <xsl:template match="example">
590 <screen>
591 <xsl:call-template name="transform.id.attribute"/>
592 <xsl:apply-templates/>
593 </screen>
594 </xsl:template>
596 <xsl:template match="listing">
597 <screen>
598 <xsl:call-template name="transform.id.attribute"/>
599 <xsl:apply-templates/> </screen>
600 </xsl:template>
602 <xsl:template name="check.title.not.empty">
603 <xsl:variable name="title" select="."/>
604 <xsl:if test="$title=''">
605 <xsl:message>title tag is empty!</xsl:message>
606 </xsl:if>
607 </xsl:template>
609 <xsl:template match="figure/title">
610 <xsl:call-template name="check.title.not.empty"/>
611 <description><xsl:apply-templates/></description>
612 </xsl:template>
613 <xsl:template match="listing/title">
614 <xsl:call-template name="check.title.not.empty"/>
615 <description><xsl:apply-templates/></description>
616 </xsl:template>
617 <xsl:template match="example/title">
618 <xsl:call-template name="check.title.not.empty"/>
619 <description><xsl:apply-templates/></description>
620 </xsl:template>
622 <xsl:template match="literallayout">
623 <screentext><xsl:apply-templates/></screentext>
624 </xsl:template>
625 <xsl:template match="screen">
626 <screentext><xsl:apply-templates/></screentext>
627 </xsl:template>
629 <xsl:template match="programlisting">
630 <listing>
631 <xsl:if test="title != ''">
632 <xsl:description><xsl:value-of select="title"/></xsl:description>
633 </xsl:if>
634 <listingcode>
635 <xsl:apply-templates/>
636 </listingcode>
637 </listing>
638 </xsl:template>
640 <!-- Tabellen -->
641 <xsl:template match="table">
642 <table>
643 <xsl:call-template name="transform.id.attribute"/>
644 <xsl:apply-templates/>
645 </table>
646 </xsl:template>
647 <xsl:template match="table/title">
648 <description><xsl:apply-templates/></description>
649 </xsl:template>
651 <xsl:template match="tgroup">
652 <tgroup>
653 <xsl:attribute name="cols">
654 <xsl:value-of select="@cols"/></xsl:attribute>
655 <xsl:apply-templates/>
656 </tgroup>
657 </xsl:template>
658 <xsl:template match="thead">
659 <thead><xsl:apply-templates/></thead>
660 </xsl:template>
661 <xsl:template match="tbody">
662 <tbody><xsl:apply-templates/></tbody>
663 </xsl:template>
664 <xsl:template match="row">
665 <row><xsl:apply-templates/></row>
666 </xsl:template>
667 <xsl:template match="entry">
668 <entry><p><xsl:apply-templates/></p></entry>
669 </xsl:template>
670 <xsl:template match="colspec">
671 <colspec><xsl:copy-of select="@*"/><xsl:apply-templates/></colspec>
672 </xsl:template>
674 <!-- xref nach pearson-equivalent - Einige Ideen stammen von Norm -->
676 <xsl:template name="object.id">
677 <xsl:param name="object" select="."/>
678 <xsl:choose>
679 <xsl:when test="$object/@id">
680 <xsl:value-of select="$object/@id"/>
681 </xsl:when>
682 <xsl:otherwise>
683 <xsl:value-of select="generate-id($object)"/>
684 </xsl:otherwise>
685 </xsl:choose>
686 </xsl:template>
688 <xsl:template name="anchor">
689 <xsl:param name="node" select="."/>
690 <xsl:param name="conditional" select="1"/>
691 <xsl:variable name="id">
692 <xsl:call-template name="object.id">
693 <xsl:with-param name="object" select="$node"/>
694 </xsl:call-template>
695 </xsl:variable>
696 <xsl:if test="$conditional = 0 or $node/@id">
697 <a name="{$id}"/>
698 </xsl:if>
699 </xsl:template>
701 <xsl:template name="check.id.unique">
702 <xsl:param name="linkend"></xsl:param>
703 <xsl:if test="$linkend != ''">
704 <xsl:variable name="targets" select="id($linkend)"/>
705 <xsl:variable name="target" select="$targets[1]"/>
707 <xsl:if test="count($targets)=0">
708 <xsl:message>
709 <xsl:text>Error: no ID for constraint linkend: </xsl:text>
710 <xsl:value-of select="$linkend"/>
711 <xsl:text>.</xsl:text>
712 </xsl:message>
713 </xsl:if>
715 <xsl:if test="count($targets)>1">
716 <xsl:message>
717 <xsl:text>Warning: multiple "IDs" for constraint linkend:
718 </xsl:text>
719 <xsl:value-of select="$linkend"/>
720 <xsl:text>.</xsl:text>
721 </xsl:message>
722 </xsl:if>
723 </xsl:if>
724 </xsl:template>
726 <xsl:template match="xref|link"
727 xmlns:xlink="http://www.w3.org/1999/xlink">
728 <xsl:variable name="linkend" select="@linkend"/>
729 <xsl:variable name="targets" select="id(@linkend)"/>
730 <xsl:variable name="target" select="$targets[1]"/>
731 <xsl:variable name="refelem" select="local-name($target)"/>
733 <xsl:call-template name="check.id.unique">
734 <xsl:with-param name="linkend" select="$linkend"/>
735 </xsl:call-template>
737 <xsl:call-template name="anchor"/>
739 <xsl:choose>
740 <xsl:when test="count($targets) = 0">
741 <xsl:message>
742 <xsl:text>XRef to nonexistent id: </xsl:text>
743 <xsl:value-of select="@linkend"/>
744 </xsl:message>
745 <xsl:text>[??? </xsl:text>
746 <xsl:value-of select="@linkend"/>
747 <xsl:text>]</xsl:text>
748 </xsl:when>
749 <xsl:when test="count($targets) > 1">
750 <xsl:message>Uh, multiple linkends
751 <xsl:value-of select="@linkend"/>
752 </xsl:message>
753 </xsl:when>
754 </xsl:choose>
756 <xsl:choose>
757 <xsl:when test='$refelem = "chapter" or $refelem = "preface"'>
758 <xsl:text>Kapitel </xsl:text>
759 </xsl:when>
760 <xsl:when test='$refelem = "section" or $refelem = "sect1" or $refelem = "sect2" or $refelem = "sect3" or $refelem = "sect4"'>
761 <xsl:text>Abschnitt </xsl:text>
762 </xsl:when>
763 <xsl:when test='$refelem = "figure"'>
764 <xsl:text>Abbildung </xsl:text>
765 </xsl:when>
766 <xsl:when test='$refelem = "example"'>
767 <!-- xsl:choose>
768 <xsl:when test="$target/@role='listing'">
769 <xsl:text>Listing </xsl:text>
770 </xsl:when>
771 <xsl:otherwise -->
772 <xsl:text>Listing </xsl:text>
773 <!-- /xsl:otherwise>
774 </xsl:choose -->
775 </xsl:when>
776 <xsl:when test='$refelem = "table"'>
777 <xsl:text>Tabelle </xsl:text>
778 </xsl:when>
779 <xsl:when test='$refelem = "appendix"'>
780 <xsl:text>Anhang </xsl:text>
781 </xsl:when>
782 <xsl:otherwise>
783 <xsl:message>
784 <xsl:text>Cant't handle xref to </xsl:text>
785 <xsl:value-of select="$refelem"/>
786 <xsl:text>:</xsl:text>
787 <xsl:value-of select="@linkend"/>
788 </xsl:message>
789 <xsl:text>(??? $refelem)</xsl:text>
790 </xsl:otherwise>
791 </xsl:choose>
793 <xref>
794 <xsl:attribute name="xlink:href"
795 xmlns:xlink="http://www.w3.org/1999/xlink">
796 <!-- xsl:attribute name="id" -->
797 <xsl:value-of select="@linkend"/>
798 </xsl:attribute>
799 </xref>
800 </xsl:template>
802 <xsl:template match="quote">"<xsl:apply-templates/>"</xsl:template>
803 <!-- xsl:template
804 match="quote"><quote><xsl:apply-templates/></quote></xsl:template -->
807 <!-- Literaturverzeichnis -->
808 <xsl:template match="author">
809 <xsl:apply-templates/>,
810 </xsl:template>
812 <xsl:template match="editor">
813 <!--FIXME: More information referring to editor ? -->
814 <xsl:apply-templates/>,
815 </xsl:template>
817 <xsl:template match="othername">
818 <xsl:apply-templates/>
819 </xsl:template>
820 <xsl:template match="firstname">
821 <xsl:apply-templates/><xsl:text> </xsl:text>
822 </xsl:template>
823 <xsl:template match="surname">
824 <xsl:apply-templates/>
825 </xsl:template>
826 <xsl:template match="copyright">
827 <!-- empty -->
828 </xsl:template>
829 <xsl:template match="edition">
830 <!-- empty -->
831 </xsl:template>
832 <xsl:template match="publisher">
833 <!-- empty -->
834 </xsl:template>
835 <xsl:template match="pubdate">
836 <xsl:apply-templates/>
837 </xsl:template>
838 <xsl:template match="isbn">
839 ISBN <xsl:apply-templates/>
840 </xsl:template>
842 <!-- Literaturverzeichnis -->
843 <xsl:template match="bibliography">
844 <sect>
845 <xsl:apply-templates/>
846 </sect>
847 </xsl:template>
849 <xsl:template name="process.bibliomixed">
851 <xsl:variable name="bibid" select="id(@id)"/>
852 <dlitem><dt>[<xsl:value-of select="@id"/>]</dt>
853 <dd><p><xsl:apply-templates select=".//title"/>,
854 <xsl:if test="count(.//subtitle)>0">
855 <xsl:apply-templates select=".//subtitle"/>,
856 </xsl:if>
857 <xsl:apply-templates select=".//author"/>
858 <xsl:apply-templates select=".//publisher"/>
859 <xsl:apply-templates select=".//pubdate"/>
860 <xsl:if test="count(.//isbn)>0">
861 <xsl:text>, </xsl:text>
862 <xsl:apply-templates select=".//isbn"/>
863 </xsl:if>
864 <xsl:text>.</xsl:text></p>
865 <xsl:call-template name="process.abstract" select=".//abstract"/>
866 </dd>
867 </dlitem>
868 </xsl:template>
870 <xsl:template match="bibliomixed[1]">
871 <dl><xsl:call-template name="process.bibliomixed"/>
872 <xsl:for-each select="following-sibling::bibliomixed">
873 <xsl:call-template name="process.bibliomixed"/>
874 </xsl:for-each>
875 </dl>
876 </xsl:template>
879 <xsl:template match="bibliomixed/title">
880 <i><xsl:apply-templates/></i>
881 </xsl:template>
883 <xsl:template match="biblioentry/title">
884 <i><xsl:apply-templates/></i>
885 </xsl:template>
887 <xsl:template match="bibliomixed/subtitle">
888 <xsl:apply-templates/>
889 </xsl:template>
891 <xsl:template match="bibliomixed/publisher">
892 <xsl:apply-templates/>
893 </xsl:template>
895 <xsl:template match="publishername">
896 <xsl:apply-templates/>,
897 </xsl:template>
898 <xsl:template match="publisher/address">
899 <xsl:apply-templates/>
900 </xsl:template>
901 <xsl:template match="city">
902 <xsl:apply-templates/>,
903 </xsl:template>
905 <xsl:template name="process.abstract">
906 <xsl:apply-templates select="abstract//para"/>
907 </xsl:template>
908 <xsl:template match="bibliomixed">
909 <!-- empty -->
910 </xsl:template>
912 <xsl:template match="chapterinfo">
913 <!-- empty -->
914 </xsl:template>
916 <xsl:template match="sectioninfo">
917 <!-- empty -->
918 </xsl:template>
920 <xsl:template match="prefaceinfo">
921 <!-- empty -->
922 </xsl:template>
924 <xsl:template match="appendixinfo">
925 <!-- empty -->
926 </xsl:template>
928 <xsl:template match="releaseinfo">
929 <xsl:comment><xsl:apply-templates/></xsl:comment>
930 </xsl:template>
932 <xsl:template match="releaseinfo" mode="comment">
933 <xsl:text>
934 </xsl:text>
935 <xsl:apply-templates/>
936 </xsl:template>
938 <xsl:template match="trademark">
939 <xsl:apply-templates/>
940 </xsl:template>
942 <xsl:template match="processing-instruction('linebreak')">
943 <br/>
944 </xsl:template>
946 <xsl:template match="processing-instruction('pearson')">
947 <xsl:copy/>
948 </xsl:template>
950 <xsl:template match="procedure">
951 <xsl:element name="step">
952 <xsl:apply-templates/>
953 </xsl:element>
954 </xsl:template>
956 <xsl:template match="procedure/step">
957 <xsl:apply-templates/><!--FIXME-->
958 </xsl:template>
960 <xsl:template match="toc">
961 <xsl:element name="toc">
962 <xsl:attribute name="role">
963 <xsl:text>sect</xsl:text>
964 </xsl:attribute>
965 </xsl:element>
966 </xsl:template>
968 <xsl:template match="lot">
969 <xsl:element name="toc">
970 <xsl:attribute name="role">
971 <xsl:text>table</xsl:text>
972 </xsl:attribute>
973 </xsl:element>
974 </xsl:template>
976 <xsl:template match="lof">
977 <xsl:element name="toc">
978 <xsl:attribute name="role">
979 <xsl:text>figure</xsl:text>
980 </xsl:attribute>
981 </xsl:element>
982 </xsl:template>
984 <xsl:template match="blockquote">
985 <motto><xsl:apply-templates/></motto>
986 </xsl:template>
988 <xsl:template match="authorgroup">
989 <xsl:apply-templates/>
990 </xsl:template>
992 <xsl:template match="formalpara">
993 <!--FIXME-->
994 </xsl:template>
996 <xsl:template match="citerefentry"/><!--FIXME-->
997 <xsl:template match="term"/><!--FIXME-->
998 <xsl:template match="substeps"/><!--FIXME-->
999 <xsl:template match="seealso"/><!--FIXME-->
1000 <xsl:template match="affiliation"/><!--FIXME-->
1001 </xsl:stylesheet>
1004 <!--
1005 <?xml version='1.0'?>
1006 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1007 xmlns:exsl="http://exslt.org/common"
1008 version="1.1"
1009 extension-element-prefixes="exsl">
1012 <xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-public="-//Pearson//DTD Books//DE" doctype-system="http://www.pearson.de/pearson.dtd"/>
1014 <xsl:template match="book">
1015 <xsl:element name="book">
1016 <xsl:apply-templates/>
1017 </xsl:element>
1018 </xsl:template>
1020 <xsl:template match="pubdate">
1021 <xsl:element name="publdate">
1022 <xsl:apply-templates/>
1023 </xsl:element>
1024 </xsl:template>
1026 <xsl:template match="para">
1027 <xsl:element name="p">
1028 <xsl:apply-templates/>
1029 </xsl:element>
1030 </xsl:template>
1032 <xsl:template match="ulink">
1033 <xsl:apply-templates/>
1034 <xsl:element name="footnote">
1035 <xsl:element name="url">
1036 <xsl:value-of select="@ulink"/>
1037 </xsl:element>
1038 </xsl:element>
1039 </xsl:template>
1041 <xsl:template match="glossentry">
1042 <xsl:element name="glossitem">
1043 <xsl:apply-templates/>
1044 </xsl:element>
1045 </xsl:template>
1047 <xsl:template match="glossterm">
1048 <xsl:element name="term">
1049 <xsl:apply-templates/>
1050 </xsl:element>
1051 </xsl:template>
1053 <xsl:template match="para/itemizedlist|itemizedlist">
1054 <xsl:element name="ul">
1055 <xsl:for-each select="listitem">
1056 <xsl:element name="li">
1057 <xsl:apply-templates/>
1058 </xsl:element>
1059 </xsl:for-each>
1060 </xsl:element>
1061 </xsl:template>
1063 <xsl:template match="emphasis">
1064 <xsl:element name="em">
1065 <xsl:apply-templates/>
1066 </xsl:element>
1067 </xsl:template>
1069 <xsl:template match="link">
1070 FIXME
1071 <xsl:element name="xref">
1072 <xsl:attribute name="xlink:href">
1073 <xsl:value-of select="@linkend"/>
1074 </xsl:attribute>
1075 <xsl:apply-templates/>
1076 </xsl:element>
1077 </xsl:template>
1079 <xsl:template match="acronym"/>
1081 <xsl:template match="glossdef/para">
1082 <xsl:element name="glosspara">
1083 <xsl:apply-templates/>
1084 </xsl:element>
1085 </xsl:template>
1087 <xsl:template match="author">
1088 <xsl:element name="author">
1089 <xsl:value-of select="firstname"/><xsl:text> </xsl:text><xsl:value-of select="surname"/>
1090 </xsl:element>
1091 </xsl:template>
1093 <xsl:template match="editor">
1094 <xsl:element name="editor">
1095 <xsl:value-of select="firstname"/><xsl:text> </xsl:text><xsl:value-of select="surname"/>
1096 </xsl:element>
1097 </xsl:template>
1099 </xsl:stylesheet>-->