summaryrefslogtreecommitdiff
path: root/docs-xml/xslt/db2latex-xsl/xsl/authorgroup.mod.xsl
blob: 3c625d3d1b8248fd720a53966a2c48d299fafa07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
<!--############################################################################# 
|	$Id: authorgroup.mod.xsl,v 1.10 2003/12/30 13:38:54 j-devenish Exp $
|- #############################################################################
|	$Author: j-devenish $												
+ ############################################################################## -->

<xsl:stylesheet 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
	exclude-result-prefixes="doc" version='1.0'>

	<doc:reference id="authorgroup" xmlns="">
		<referenceinfo>
			<releaseinfo role="meta">
				$Id: authorgroup.mod.xsl,v 1.10 2003/12/30 13:38:54 j-devenish Exp $
			</releaseinfo>
			<authorgroup>
				&ramon;
				&james;
			</authorgroup>
			<copyright>
				<year>2000</year><year>2001</year><year>2002</year><year>2003</year>
				<holder>Ramon Casellas</holder>
			</copyright>
			<revhistory>
				<doc:revision rcasver="1.6">&rev_2003_05;</doc:revision>
			</revhistory>
		</referenceinfo>
		<title>Authorgroups <filename>authorgroup.mod.xsl</filename></title>
		<partintro>
 			<para>The file <filename>authorgroup.mod.xsl</filename> contains the
 			XSL templates for <doc:db>author</doc:db>, <doc:db>editor</doc:db>,
 			<doc:db>othercredit</doc:db><doc:db>personname</doc:db>, <doc:db>authorblurb</doc:db>,
 			<doc:db>authorgroup</doc:db> and <doc:db>authorinitials</doc:db>.</para>
			<section>
				<title>Pertinent Variables</title>
				<itemizedlist>
					<listitem><simpara><xref linkend="param.biblioentry.item.separator"/></simpara></listitem>
				</itemizedlist>
			</section>
		</partintro>
	</doc:reference>

	<doc:template basename="authorgroup" xmlns="">
		<refpurpose>Process <doc:db>authorgroup</doc:db> elements</refpurpose>
		<doc:description>
 			<para>
				Formats a list of authors for typsetting as a formatted block
				(not inline).
 			</para>
			<para>
				Applies templates for <doc:db>author</doc:db> elements,
				inserting <quote>and</quote> between authors' names.
			</para>
		</doc:description>
		<doc:variables>
			&no_var;
		</doc:variables>
		<doc:params>
			<variablelist>
				<varlistentry>
					<term>person.list</term>
					<listitem>
						<para>

							The nodes to be formatted. By default, the template
							will select child::author, child::corpauthor,
							child::othercredit and child::editor for the
							current node.

						</para>
					</listitem>
				</varlistentry>
			</variablelist>
		</doc:params>
		<doc:notes>
 			<para>

 				May be called from any template when the current node has
 				<doc:db>author</doc:db>, <doc:db>editor</doc:db>,
 				<doc:db>corpauthor</doc:db> or <doc:db>othercredit</doc:db> children.

 			</para>
 			<para>

				This template uses <function
				condition='xslt'>person.name.list</function> from
				<filename>db2latex/xsl/common/common.xsl</filename> to format
				the list of authors.

			</para>
 
 			<para>
			
				For compatibility with &latex;, <xref
				linkend="template.normalize-scape"/> is called on the output of
				<function condition='xslt'>person.name.list</function>.
				<doc:todo>This may pose problems but has not been
				investigated.</doc:todo>
			
			</para>
		</doc:notes>
		<doc:samples>
			<simplelist type='inline'>
				&test_article;
				&test_biblio;
				&test_bind;
				&test_book;
				&test_ieeebiblio;
				&test_minimal;
			</simplelist>
		</doc:samples>
	</doc:template>

	<xsl:template match="authorgroup" name="authorgroup">
		<xsl:param name="person.list" select="./author|./corpauthor|./othercredit|./editor"/>
		<xsl:call-template name="normalize-scape">
			<xsl:with-param name="string">
				<xsl:call-template name="person.name.list">
					<xsl:with-param name="person.list" select="$person.list"/>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<doc:template xmlns="">
		<refpurpose>Process names of <doc:db>authors</doc:db> and similar elements</refpurpose>
		<doc:description>
			<para>

				Formats a person's name for inline display.

			</para>
		</doc:description>
		<doc:variables>
			&no_var;
		</doc:variables>
		<doc:notes>

			<para>
			
			This template uses <function
			condition='xslt'>person.name</function> from
			<filename>db2latex/xsl/common/common.xsl</filename> to format the
			names of <doc:db>author</doc:db>, <doc:db>editor</doc:db>,
			<doc:db>othercredit</doc:db> and <doc:db>personname</doc:db>
			elements.
			
			</para>

 			<para>
			
				For compatibility with &latex;, <xref
				linkend="template.normalize-scape"/> is called on the output of
				<function condition='xslt'>person.name.list</function>.
				<doc:todo>This may pose problems but has not been
				investigated.</doc:todo>
			
			</para>

		</doc:notes>
		<doc:samples>
			<simplelist type='inline'>
				<member>See <xref linkend="template.authorgroup"/>.</member>
			</simplelist>
		</doc:samples>
	</doc:template>

	<xsl:template match="author|editor|othercredit|personname">
		<xsl:call-template name="normalize-scape">
			<xsl:with-param name="string">
				<xsl:call-template name="person.name"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<doc:template basename="authorinitials" xmlns="">
		<refpurpose>Process <doc:db>authorinitials</doc:db> elements</refpurpose>
		<doc:description>
			<para>

				Represents <doc:db>authorinitials</doc:db> by applying templates
				normally and then appending <xref
				linkend="param.biblioentry.item.separator"/>.

			</para>
		</doc:description>
		<doc:variables>
			<itemizedlist>
				<listitem><simpara><xref linkend="param.biblioentry.item.separator"/></simpara></listitem>
			</itemizedlist>
		</doc:variables>
		<doc:notes>
			<para>

			<doc:todo>The use of <xref linkend="param.biblioentry.item.separator"/>
			should be replaced with the normal localisation mechanism.</doc:todo>

			</para>
		</doc:notes>
		<doc:samples>
			<simplelist type='inline'>
				&test_book;
				&test_article;
				&test_ieeebiblio;
				&test_minimal;
			</simplelist>
		</doc:samples>
	</doc:template>

	<xsl:template match="authorinitials">
		<xsl:apply-templates/>
		<xsl:value-of select="$biblioentry.item.separator"/>
	</xsl:template>

</xsl:stylesheet>