trying to get HEAD building again. If you want the code
[gd/samba-autobuild/.git] / docs / docbook / xslt / db2latex / sgmltag.mod.xsl
1 <?xml version='1.0'?>
2 <!--############################################################################# 
3 |- #############################################################################
4 |                                                                                                               
5 |   PURPOSE:
6 + ############################################################################## -->
7
8 <xsl:stylesheet 
9     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10     xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
11     exclude-result-prefixes="doc" version='1.0'>
12
13
14
15     <!--############################################################################# -->
16     <!-- DOCUMENTATION                                                                -->
17     <doc:reference id="sgmltag" xmlns="">
18         <referenceinfo>
19             <releaseinfo role="meta">
20             </releaseinfo>
21         <authogroup>
22             <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
23             <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
24         </authogroup>
25             <copyright>
26                 <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
27                 <holder>Ramon Casellas</holder>
28             </copyright>
29         </referenceinfo>
30
31         <title>SGML Tags <filename>sgmltag.mod.xsl</filename></title>
32         <partintro>
33             <section><title>Introduction</title>
34                 <para></para>
35             </section>
36         </partintro>
37     </doc:reference>
38
39
40
41
42     <xsl:template match="sgmltag">
43         <xsl:call-template name="format.sgmltag"/>
44     </xsl:template>
45
46     <xsl:template name="format.sgmltag">
47         <xsl:param name="class">
48             <xsl:choose>
49                 <xsl:when test="@class">
50                     <xsl:value-of select="normalize-space(@class)"/>
51                 </xsl:when>
52                 <xsl:otherwise>element</xsl:otherwise>
53             </xsl:choose>
54         </xsl:param>
55
56         <xsl:choose>
57             <xsl:when test="$class='attribute'">
58                 <xsl:call-template name="inline.charseq"/>
59             </xsl:when>
60             <xsl:when test="$class='attvalue'">
61                 <xsl:call-template name="inline.monoseq"/>
62             </xsl:when>
63             <xsl:when test="$class='element'">
64                 <xsl:call-template name="inline.monoseq"/>
65             </xsl:when>
66             <xsl:when test="$class='endtag'">
67                 <xsl:call-template name="inline.monoseq">
68                     <xsl:with-param name="content">
69                         <xsl:text>&lt;/</xsl:text>
70                         <xsl:apply-templates/>
71                         <xsl:text>&gt;</xsl:text>
72                     </xsl:with-param>
73                 </xsl:call-template>
74             </xsl:when>
75             <xsl:when test="$class='genentity'">
76                 <xsl:call-template name="inline.monoseq">
77                     <xsl:with-param name="content">
78                         <xsl:text>\&amp;</xsl:text>
79                         <xsl:apply-templates/>
80                         <xsl:text>;</xsl:text>
81                     </xsl:with-param>
82                 </xsl:call-template>
83             </xsl:when>
84             <xsl:when test="$class='numcharref'">
85                 <xsl:call-template name="inline.monoseq">
86                     <xsl:with-param name="content">
87                         <xsl:text>\&amp;\#</xsl:text>
88                         <xsl:apply-templates/>
89                         <xsl:text>;</xsl:text>
90                     </xsl:with-param>
91                 </xsl:call-template>
92             </xsl:when>
93             <xsl:when test="$class='paramentity'">
94                 <xsl:call-template name="inline.monoseq">
95                     <xsl:with-param name="content">
96                         <xsl:text>\%</xsl:text>
97                         <xsl:apply-templates/>
98                         <xsl:text>;</xsl:text>
99                     </xsl:with-param>
100                 </xsl:call-template>
101             </xsl:when>
102             <xsl:when test="$class='pi'">
103                 <xsl:call-template name="inline.monoseq">
104                     <xsl:with-param name="content">
105                         <xsl:text>&lt;?</xsl:text>
106                         <xsl:apply-templates/>
107                         <xsl:text>?&gt;</xsl:text>
108                     </xsl:with-param>
109                 </xsl:call-template>
110             </xsl:when>
111             <xsl:when test="$class='xmlpi'">
112                 <xsl:call-template name="inline.monoseq">
113                     <xsl:with-param name="content">
114                         <xsl:text>&lt;?</xsl:text>
115                         <xsl:apply-templates/>
116                         <xsl:text>?&gt;</xsl:text>
117                     </xsl:with-param>
118                 </xsl:call-template>
119             </xsl:when>
120             <xsl:when test="$class='starttag'">
121                 <xsl:call-template name="inline.monoseq">
122                     <xsl:with-param name="content">
123                         <xsl:text>&lt;</xsl:text>
124                         <xsl:apply-templates/>
125                         <xsl:text>&gt;</xsl:text>
126                     </xsl:with-param>
127                 </xsl:call-template>
128             </xsl:when>
129             <xsl:when test="$class='emptytag'">
130                 <xsl:call-template name="inline.monoseq">
131                     <xsl:with-param name="content">
132                         <xsl:text>&lt;</xsl:text>
133                         <xsl:apply-templates/>
134                         <xsl:text>/&gt;</xsl:text>
135                     </xsl:with-param>
136                 </xsl:call-template>
137             </xsl:when>
138             <xsl:when test="$class='sgmlcomment'">
139                 <xsl:call-template name="inline.monoseq">
140                     <xsl:with-param name="content">
141                         <xsl:text>&lt;!--</xsl:text>
142                         <xsl:apply-templates/>
143                         <xsl:text>--&gt;</xsl:text>
144                     </xsl:with-param>
145                 </xsl:call-template>
146             </xsl:when>
147             <xsl:otherwise>
148                 <xsl:call-template name="inline.charseq"/>
149             </xsl:otherwise>
150         </xsl:choose>
151     </xsl:template>
152
153 </xsl:stylesheet>
154