2 <!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
3 <!--#############################################################################
4 | $Id: example.mod.xsl,v 1.9 2004/01/26 09:40:43 j-devenish Exp $
5 |- #############################################################################
6 | $Author: j-devenish $
7 + ############################################################################## -->
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
12 exclude-result-prefixes="doc" version='1.0'>
14 <doc:reference id="example" xmlns="">
16 <releaseinfo role="meta">
17 $Id: example.mod.xsl,v 1.9 2004/01/26 09:40:43 j-devenish Exp $
24 <year>2000</year><year>2001</year><year>2002</year><year>2003</year>
25 <holder>Ramon Casellas</holder>
28 <doc:revision rcasver="1.7">&rev_2003_05;</doc:revision>
31 <title>Examples <filename>example.mod.xsl</filename></title>
33 <para>The file <filename>example.mod.xsl</filename> contains the
34 XSL templates for <doc:db>example</doc:db> and
35 <doc:db>informalexample</doc:db>.</para>
39 <doc:template xmlns="">
40 <refpurpose>Process <doc:db>example</doc:db> elements</refpurpose>
48 <listitem><simpara><xref linkend="param.latex.example.caption.style"/></simpara></listitem>
56 <simplelist type='inline'>
63 <listitem><simpara><xref linkend="template.generate.formal.title.placement"/></simpara></listitem>
64 <listitem><simpara>&mapping;</simpara></listitem>
65 <listitem><simpara><xref linkend="template.title-caption.mode"/></simpara></listitem>
69 <xsl:template match="example">
70 <xsl:variable name="placement">
71 <xsl:call-template name="generate.formal.title.placement">
72 <xsl:with-param name="object" select="local-name(.)" />
75 <xsl:variable name="caption">
76 <xsl:text>{</xsl:text>
77 <xsl:value-of select="$latex.example.caption.style"/>
78 <xsl:text>{\caption{</xsl:text>
79 <xsl:apply-templates select="title" mode="caption.mode"/>
80 <xsl:text>}</xsl:text>
81 <xsl:call-template name="label.id"/>
82 <xsl:text>}} </xsl:text>
84 <xsl:call-template name="map.begin"/>
85 <xsl:if test="$placement='before'">
86 <xsl:text>\captionswapskip{}</xsl:text>
87 <xsl:value-of select="$caption" />
88 <xsl:text>\captionswapskip{}</xsl:text>
90 <xsl:call-template name="content-templates"/>
91 <xsl:if test="$placement!='before'"><xsl:value-of select="$caption" /></xsl:if>
92 <xsl:call-template name="map.end"/>
95 <doc:template xmlns="">
96 <refpurpose>Process <doc:db>informalexample</doc:db> elements</refpurpose>
99 Calls <xref linkend="template.informal.object"/>.
110 <simplelist type='inline'>
115 <xsl:template match="informalexample">
116 <xsl:call-template name="informal.object"/>