1 | <?xml version="1.0" encoding="UTF-8" ?>
|
---|
2 | <!-- This file is part of the DITA Open Toolkit project hosted on
|
---|
3 | Sourceforge.net. See the accompanying license.txt file for
|
---|
4 | applicable licenses.-->
|
---|
5 | <!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved. -->
|
---|
6 |
|
---|
7 | <!-- domains2fo.xsl
|
---|
8 | | DITA domains support for the demo set; extend as needed
|
---|
9 |
|
---|
10 | *-->
|
---|
11 |
|
---|
12 | <xsl:transform version="1.0"
|
---|
13 | xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
---|
14 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
15 |
|
---|
16 | <xsl:output method="xml" version="1.0"
|
---|
17 | indent="yes"/>
|
---|
18 |
|
---|
19 |
|
---|
20 | <!-- Start of UI domain -->
|
---|
21 |
|
---|
22 | <xsl:template match="*[contains(@class,' ui-d/uicontrol ')]">
|
---|
23 | <!-- insert an arrow before all but the first uicontrol in a menucascade -->
|
---|
24 | <xsl:if test="ancestor::*[contains(@class,' ui-d/menucascade ')]">
|
---|
25 | <xsl:variable name="uicontrolcount"><xsl:number count="*[contains(@class,' ui-d/uicontrol ')]"/></xsl:variable>
|
---|
26 | <xsl:if test="$uicontrolcount>'1'">
|
---|
27 | <xsl:text> --> </xsl:text>
|
---|
28 | </xsl:if>
|
---|
29 | </xsl:if>
|
---|
30 | <fo:inline font-weight="bold">
|
---|
31 | <xsl:call-template name="setclass"/>
|
---|
32 | <xsl:apply-templates select="@id"/>
|
---|
33 | <xsl:apply-templates/>
|
---|
34 | </fo:inline>
|
---|
35 | </xsl:template>
|
---|
36 |
|
---|
37 |
|
---|
38 | <xsl:template match="*[contains(@class,' ui-d/wintitle ')]">
|
---|
39 | <fo:inline>
|
---|
40 | <xsl:call-template name="setclass"/>
|
---|
41 | <xsl:apply-templates select="@id"/>
|
---|
42 | <xsl:apply-templates/>
|
---|
43 | </fo:inline>
|
---|
44 | </xsl:template>
|
---|
45 |
|
---|
46 |
|
---|
47 | <xsl:template match="*[contains(@class,' ui-d/menucascade ')]">
|
---|
48 | <fo:inline>
|
---|
49 | <xsl:call-template name="setclass"/>
|
---|
50 | <xsl:apply-templates select="@id"/>
|
---|
51 | <xsl:apply-templates/>
|
---|
52 | </fo:inline>
|
---|
53 | </xsl:template>
|
---|
54 |
|
---|
55 |
|
---|
56 | <xsl:template match="*[contains(@class,' ui-d/shortcut ')]">
|
---|
57 | <fo:inline text-decoration="underline">
|
---|
58 | <xsl:call-template name="setclass"/>
|
---|
59 | <xsl:apply-templates select="@id"/>
|
---|
60 | <xsl:apply-templates/>
|
---|
61 | </fo:inline>
|
---|
62 | </xsl:template>
|
---|
63 |
|
---|
64 |
|
---|
65 | <xsl:template match="*[contains(@class,' ui-d/screen ')]">
|
---|
66 | <xsl:call-template name="gen-att-label"/>
|
---|
67 | <fo:block xsl:use-attribute-sets="pre">
|
---|
68 | <xsl:call-template name="setclass"/>
|
---|
69 | <xsl:apply-templates select="@id"/>
|
---|
70 | <xsl:call-template name="setscale"/>
|
---|
71 | <!-- rules have to be applied within the scope of the PRE box; else they start from page margin! -->
|
---|
72 | <xsl:if test="contains(@frame,'top')"><fo:block><fo:leader leader-pattern="rule" leader-length="5.65in" /></fo:block></xsl:if>
|
---|
73 | <xsl:apply-templates/>
|
---|
74 | <xsl:if test="contains(@frame,'bot')"><fo:block><fo:leader leader-pattern="rule" leader-length="5.65in" /></fo:block></xsl:if>
|
---|
75 | </fo:block>
|
---|
76 | </xsl:template>
|
---|
77 |
|
---|
78 |
|
---|
79 | <!-- start of highlighting domain -->
|
---|
80 |
|
---|
81 | <xsl:template match="*[contains(@class,' hi-d/b ')]">
|
---|
82 | <fo:inline font-weight="bold">
|
---|
83 | <xsl:call-template name="setclass"/>
|
---|
84 | <xsl:apply-templates select="@id"/>
|
---|
85 | <xsl:call-template name="apply-for-phrases"/>
|
---|
86 | </fo:inline>
|
---|
87 | </xsl:template>
|
---|
88 |
|
---|
89 |
|
---|
90 | <xsl:template match="*[contains(@class,' hi-d/i ')]">
|
---|
91 | <fo:inline font-style="italic">
|
---|
92 | <xsl:call-template name="setclass"/>
|
---|
93 | <xsl:apply-templates select="@id"/>
|
---|
94 | <xsl:call-template name="apply-for-phrases"/>
|
---|
95 | </fo:inline>
|
---|
96 | </xsl:template>
|
---|
97 |
|
---|
98 |
|
---|
99 | <xsl:template match="*[contains(@class,' hi-d/u ')]">
|
---|
100 | <fo:inline text-decoration="underline">
|
---|
101 | <xsl:call-template name="setclass"/>
|
---|
102 | <xsl:apply-templates select="@id"/>
|
---|
103 | <xsl:call-template name="apply-for-phrases"/>
|
---|
104 | </fo:inline>
|
---|
105 | </xsl:template>
|
---|
106 |
|
---|
107 |
|
---|
108 | <xsl:template match="*[contains(@class,' hi-d/tt ')]">
|
---|
109 | <fo:inline font-family="Courier">
|
---|
110 | <xsl:call-template name="setclass"/>
|
---|
111 | <xsl:apply-templates select="@id"/>
|
---|
112 | <xsl:call-template name="apply-for-phrases"/>
|
---|
113 | </fo:inline>
|
---|
114 | </xsl:template>
|
---|
115 |
|
---|
116 |
|
---|
117 | <xsl:template match="*[contains(@class,' hi-d/sup ')]">
|
---|
118 | <fo:inline baseline-shift="super" font-size="75%">
|
---|
119 | <xsl:call-template name="setclass"/>
|
---|
120 | <xsl:apply-templates select="@id"/>
|
---|
121 | <xsl:apply-templates/>
|
---|
122 | </fo:inline>
|
---|
123 | </xsl:template>
|
---|
124 |
|
---|
125 |
|
---|
126 | <xsl:template match="*[contains(@class,' hi-d/sub ')]">
|
---|
127 | <fo:inline baseline-shift="sub" font-size="75%">
|
---|
128 | <xsl:call-template name="setclass"/>
|
---|
129 | <xsl:apply-templates select="@id"/>
|
---|
130 | <xsl:apply-templates/>
|
---|
131 | </fo:inline>
|
---|
132 | </xsl:template>
|
---|
133 |
|
---|
134 |
|
---|
135 | <!-- start of programming domain -->
|
---|
136 |
|
---|
137 | <xsl:template match="*[contains(@class,' pr-d/codeph ')]">
|
---|
138 | <fo:inline font-family="Courier">
|
---|
139 | <xsl:call-template name="setclass"/>
|
---|
140 | <xsl:apply-templates select="@id"/>
|
---|
141 | <xsl:call-template name="apply-for-phrases"/>
|
---|
142 | </fo:inline>
|
---|
143 | </xsl:template>
|
---|
144 |
|
---|
145 |
|
---|
146 | <xsl:template match="*[contains(@class,' pr-d/codeblock ')]">
|
---|
147 | <xsl:call-template name="gen-att-label"/>
|
---|
148 | <fo:block xsl:use-attribute-sets="pre">
|
---|
149 | <xsl:call-template name="setclass"/>
|
---|
150 | <xsl:apply-templates select="@id"/>
|
---|
151 | <xsl:call-template name="setscale"/>
|
---|
152 | <!-- rules have to be applied within the scope of the PRE box; else they start from page margin! -->
|
---|
153 | <xsl:if test="contains(@frame,'top')"><fo:block><fo:leader leader-pattern="rule" leader-length="5.65in" /></fo:block></xsl:if>
|
---|
154 | <xsl:apply-templates/>
|
---|
155 | <xsl:if test="contains(@frame,'bot')"><fo:block><fo:leader leader-pattern="rule" leader-length="5.65in" /></fo:block></xsl:if>
|
---|
156 | </fo:block>
|
---|
157 | </xsl:template>
|
---|
158 |
|
---|
159 |
|
---|
160 | <xsl:template match="*[contains(@class,' pr-d/option ')]">
|
---|
161 | <fo:inline>
|
---|
162 | <xsl:call-template name="setclass"/>
|
---|
163 | <xsl:apply-templates select="@id"/>
|
---|
164 | <xsl:call-template name="apply-for-phrases"/>
|
---|
165 | </fo:inline>
|
---|
166 | </xsl:template>
|
---|
167 |
|
---|
168 |
|
---|
169 | <xsl:template match="*[contains(@class,' pr-d/var ')]">
|
---|
170 | <fo:inline font-style="italic">
|
---|
171 | <xsl:call-template name="setclass"/>
|
---|
172 | <xsl:apply-templates select="@id"/>
|
---|
173 | <xsl:call-template name="apply-for-phrases"/>
|
---|
174 | </fo:inline>
|
---|
175 | </xsl:template>
|
---|
176 |
|
---|
177 |
|
---|
178 | <xsl:template match="*[contains(@class,' pr-d/parmname ')]">
|
---|
179 | <fo:inline>
|
---|
180 | <xsl:call-template name="setclass"/>
|
---|
181 | <xsl:apply-templates select="@id"/>
|
---|
182 | <xsl:call-template name="apply-for-phrases"/>
|
---|
183 | </fo:inline>
|
---|
184 | </xsl:template>
|
---|
185 |
|
---|
186 |
|
---|
187 | <xsl:template match="*[contains(@class,' pr-d/synph ')]">
|
---|
188 | <fo:inline>
|
---|
189 | <xsl:call-template name="setclass"/>
|
---|
190 | <xsl:apply-templates select="@id"/>
|
---|
191 | <xsl:call-template name="apply-for-phrases"/>
|
---|
192 | </fo:inline>
|
---|
193 | </xsl:template>
|
---|
194 |
|
---|
195 |
|
---|
196 | <xsl:template match="*[contains(@class,' pr-d/oper ')]">
|
---|
197 | <fo:inline font-family="Courier">
|
---|
198 | <xsl:call-template name="setclass"/>
|
---|
199 | <xsl:apply-templates select="@id"/>
|
---|
200 | <xsl:call-template name="apply-for-phrases"/>
|
---|
201 | </fo:inline>
|
---|
202 | </xsl:template>
|
---|
203 |
|
---|
204 |
|
---|
205 | <xsl:template match="*[contains(@class,' pr-d/delim ')]">
|
---|
206 | <fo:inline font-family="Courier">
|
---|
207 | <xsl:call-template name="setclass"/>
|
---|
208 | <xsl:apply-templates select="@id"/>
|
---|
209 | <xsl:call-template name="apply-for-phrases"/>
|
---|
210 | </fo:inline>
|
---|
211 | </xsl:template>
|
---|
212 |
|
---|
213 |
|
---|
214 | <xsl:template match="*[contains(@class,' pr-d/sep ')]">
|
---|
215 | <fo:inline font-family="Courier">
|
---|
216 | <xsl:call-template name="setclass"/>
|
---|
217 | <xsl:apply-templates select="@id"/>
|
---|
218 | <xsl:call-template name="apply-for-phrases"/>
|
---|
219 | </fo:inline>
|
---|
220 | </xsl:template>
|
---|
221 |
|
---|
222 |
|
---|
223 |
|
---|
224 | <xsl:template match="*[contains(@class,' pr-d/apiname ')]">
|
---|
225 | <fo:inline font-family="Courier">
|
---|
226 | <xsl:call-template name="setclass"/>
|
---|
227 | <xsl:apply-templates select="@id"/>
|
---|
228 | <xsl:call-template name="apply-for-phrases"/>
|
---|
229 | </fo:inline>
|
---|
230 | </xsl:template>
|
---|
231 |
|
---|
232 |
|
---|
233 | <xsl:template match="*[contains(@class,' pr-d/parml ')]">
|
---|
234 | <xsl:call-template name="gen-att-label"/>
|
---|
235 | <fo:block>
|
---|
236 | <xsl:apply-templates select="@id"/>
|
---|
237 | <xsl:apply-templates/>
|
---|
238 | </fo:block>
|
---|
239 | </xsl:template>
|
---|
240 |
|
---|
241 |
|
---|
242 | <xsl:template match="*[contains(@class,' pr-d/plentry ')]">
|
---|
243 | <xsl:apply-templates/>
|
---|
244 | </xsl:template>
|
---|
245 |
|
---|
246 |
|
---|
247 | <xsl:template match="*[contains(@class,' pr-d/pt ')]">
|
---|
248 | <fo:block xsl:use-attribute-sets="dt">
|
---|
249 | <xsl:call-template name="setclass"/>
|
---|
250 | <xsl:apply-templates select="@id"/>
|
---|
251 | <xsl:choose>
|
---|
252 | <xsl:when test="*"> <!-- tagged content - do not default to bold -->
|
---|
253 | <xsl:apply-templates/>
|
---|
254 | </xsl:when>
|
---|
255 | <xsl:otherwise>
|
---|
256 | <fo:inline font-weight="bold"><xsl:call-template name="apply-for-phrases"/></fo:inline> <!-- text only - bold it -->
|
---|
257 | </xsl:otherwise>
|
---|
258 | </xsl:choose>
|
---|
259 | </fo:block>
|
---|
260 | </xsl:template>
|
---|
261 |
|
---|
262 |
|
---|
263 | <xsl:template match="*[contains(@class,' pr-d/pd ')]">
|
---|
264 | <fo:block xsl:use-attribute-sets="dd">
|
---|
265 | <xsl:call-template name="setclass"/>
|
---|
266 | <xsl:apply-templates select="@id"/>
|
---|
267 | <xsl:apply-templates />
|
---|
268 | </fo:block>
|
---|
269 | </xsl:template>
|
---|
270 |
|
---|
271 |
|
---|
272 | <!-- syntax diagram -->
|
---|
273 |
|
---|
274 | <xsl:template match="*[contains(@class,' pr-d/synblk ')]">
|
---|
275 | <fo:inline>
|
---|
276 | <xsl:call-template name="setclass"/>
|
---|
277 | <xsl:apply-templates select="@id"/>
|
---|
278 | <xsl:call-template name="apply-for-phrases"/>
|
---|
279 | </fo:inline>
|
---|
280 | </xsl:template>
|
---|
281 |
|
---|
282 |
|
---|
283 | <xsl:template name="gen-synnotes">
|
---|
284 | <fo:block font-weight="bold">Notes:</fo:block>
|
---|
285 | <xsl:for-each select="//*[contains(@class,' pr-d/synnote ')]">
|
---|
286 | <xsl:call-template name="dosynnt"/>
|
---|
287 | </xsl:for-each>
|
---|
288 | </xsl:template>
|
---|
289 |
|
---|
290 | <xsl:template name="dosynnt"> <!-- creates a list of endnotes of synnt content -->
|
---|
291 | <xsl:variable name="callout">
|
---|
292 | <xsl:choose>
|
---|
293 | <xsl:when test="@callout"><xsl:value-of select="@callout"/></xsl:when>
|
---|
294 | <xsl:otherwise><xsl:value-of select="@id"/></xsl:otherwise>
|
---|
295 | </xsl:choose>
|
---|
296 | </xsl:variable>
|
---|
297 | <!--a name="{@id}"-->{<xsl:value-of select="$callout"/>}<!--/a-->
|
---|
298 | <!--
|
---|
299 | <table border="1" cellpadding="6">
|
---|
300 | <tr><td bgcolor="LightGrey">
|
---|
301 | <xsl:apply-templates/>
|
---|
302 | </td></tr>
|
---|
303 | </table>
|
---|
304 | -->
|
---|
305 | <fo:block><xsl:apply-templates/></fo:block>
|
---|
306 | </xsl:template>
|
---|
307 |
|
---|
308 |
|
---|
309 | <xsl:template match="*[contains(@class,' pr-d/synnoteref ')]">
|
---|
310 | <fo:inline baseline-shift="super" font-size="75%">
|
---|
311 | <!--
|
---|
312 | <xsl:element name="a">
|
---|
313 | <xsl:attribute name="href">#FNsrc_<xsl:value-of select="@refid"/>
|
---|
314 | </xsl:attribute>
|
---|
315 | -->
|
---|
316 | [<xsl:value-of select="@refid"/>]
|
---|
317 | <!--
|
---|
318 | </xsl:element>
|
---|
319 | -->
|
---|
320 | </fo:inline>
|
---|
321 | </xsl:template>
|
---|
322 |
|
---|
323 |
|
---|
324 | <xsl:template match="*[contains(@class,' pr-d/synnote ')]">
|
---|
325 | <fo:inline baseline-shift="super" font-size="75%">
|
---|
326 | <xsl:choose>
|
---|
327 | <xsl:when test="not(@id='')"> <!-- case of an explicit id -->
|
---|
328 | <xsl:value-of select="@id"/>
|
---|
329 | </xsl:when>
|
---|
330 | <xsl:when test="not(@callout='')"> <!-- case of an explicit callout (presume id for now) -->
|
---|
331 | <xsl:value-of select="@callout"/>
|
---|
332 | </xsl:when>
|
---|
333 | <xsl:otherwise>
|
---|
334 | <xsl:text>*</xsl:text>
|
---|
335 | </xsl:otherwise>
|
---|
336 | </xsl:choose>
|
---|
337 | </fo:inline>
|
---|
338 | </xsl:template>
|
---|
339 |
|
---|
340 |
|
---|
341 |
|
---|
342 | <xsl:template match="*[contains(@class,' pr-d/syntaxdiagram ')]">
|
---|
343 | <fo:block>
|
---|
344 | <xsl:apply-templates/>
|
---|
345 | </fo:block>
|
---|
346 | </xsl:template>
|
---|
347 |
|
---|
348 | <xsl:template match="*[contains(@class,' pr-d/fragment ')]">
|
---|
349 | <fo:block>
|
---|
350 | <xsl:value-of select="*[contains(@class,' topic/title ')]"/><xsl:text> </xsl:text>
|
---|
351 | <xsl:apply-templates/>
|
---|
352 | </fo:block>
|
---|
353 | </xsl:template>
|
---|
354 |
|
---|
355 | <!-- Title is optional-->
|
---|
356 | <xsl:template match="*[contains(@class,' pr-d/syntaxdiagram ')]/*[contains(@class,' topic/title ')]">
|
---|
357 | <fo:block font-weight="bold">
|
---|
358 | <xsl:value-of select="."/>
|
---|
359 | </fo:block>
|
---|
360 | </xsl:template>
|
---|
361 |
|
---|
362 | <!-- Basically, we want to hide his content. -->
|
---|
363 | <xsl:template match="*[contains(@class,' pr-d/repsep ')]"/>
|
---|
364 |
|
---|
365 |
|
---|
366 | <xsl:template match="*[contains(@class,' pr-d/kwd ')]">
|
---|
367 | <fo:inline font-family="Courier">
|
---|
368 | <xsl:if test="parent::*[contains(@class,' pr-d/groupchoice ')]">
|
---|
369 | <xsl:if test="count(preceding-sibling::*)!=0"> | </xsl:if>
|
---|
370 | </xsl:if>
|
---|
371 | <xsl:if test="@importance='optional'"> [</xsl:if>
|
---|
372 | <xsl:choose>
|
---|
373 | <xsl:when test="@importance='default'">
|
---|
374 | <fo:inline text-decoration="underline"><xsl:value-of select="."/></fo:inline>
|
---|
375 | </xsl:when>
|
---|
376 | <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
---|
377 | </xsl:choose>
|
---|
378 | <xsl:if test="@importance='optional'">] </xsl:if>
|
---|
379 | </fo:inline>
|
---|
380 | </xsl:template>
|
---|
381 |
|
---|
382 | <!-- This should test to see if there's a fragment with matching title
|
---|
383 | and if so, produce an associative link. -->
|
---|
384 | <xsl:template match="*[contains(@class,' pr-d/fragref ')]" priority="100">
|
---|
385 | <fo:inline font-family="Courier">
|
---|
386 | <!--a><xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute-->
|
---|
387 | <<xsl:value-of select="."/>><!--/a-->
|
---|
388 | </fo:inline>
|
---|
389 | </xsl:template>
|
---|
390 |
|
---|
391 | <!-- Where is the template for var with a priority of 50? -->
|
---|
392 | <xsl:template match="*[contains(@class,' pr-d/var ')]" priority="51">
|
---|
393 | <fo:inline font-style="italic">
|
---|
394 | <xsl:if test="parent::*[contains(@class,' pr-d/groupchoice ')]">
|
---|
395 | <xsl:if test="count(preceding-sibling::*)!=0"> | </xsl:if>
|
---|
396 | </xsl:if>
|
---|
397 | <xsl:if test="@importance='optional'"> [</xsl:if>
|
---|
398 | <xsl:choose>
|
---|
399 | <xsl:when test="@importance='default'">
|
---|
400 | <fo:inline text-decoration="underline"><xsl:value-of select="."/></fo:inline>
|
---|
401 | </xsl:when>
|
---|
402 | <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
---|
403 | </xsl:choose>
|
---|
404 | <xsl:if test="@importance='optional'">] </xsl:if>
|
---|
405 | </fo:inline>
|
---|
406 | </xsl:template>
|
---|
407 |
|
---|
408 |
|
---|
409 | <xsl:template match="*[contains(@class,' pr-d/fragment ')]/*[contains(@class,' topic/title ')]">
|
---|
410 | <fo:block font-weight="bold"><xsl:apply-templates/></fo:block>
|
---|
411 | </xsl:template>
|
---|
412 |
|
---|
413 | <xsl:template match="*[contains(@class,' pr-d/fragment ')]/*[contains(@class,' pr-d/groupcomp ')]|*[contains(@class,' pr-d/fragment ')]/*[contains(@class,' pr-d/groupchoice ')]|*[contains(@class,' pr-d/fragment ')]/*[contains(@class,' pr-d/groupseq ')]">
|
---|
414 | <fo:block><!--indent this?-->
|
---|
415 | <xsl:call-template name="dogroup"/>
|
---|
416 | </fo:block>
|
---|
417 | </xsl:template>
|
---|
418 |
|
---|
419 |
|
---|
420 | <xsl:template match="*[contains(@class,' pr-d/syntaxdiagram ')]/*[contains(@class,' pr-d/groupcomp ')]|*[contains(@class,' pr-d/syntaxdiagram ')]/*[contains(@class,' pr-d/groupseq ')]|*[contains(@class,' pr-d/syntaxdiagram ')]/*[contains(@class,' pr-d/groupchoice ')]">
|
---|
421 | <xsl:call-template name="dogroup"/>
|
---|
422 | </xsl:template>
|
---|
423 |
|
---|
424 |
|
---|
425 | <!-- okay, here we have to work each permutation because figgroup/figroup fallback is too general -->
|
---|
426 | <xsl:template match="*[contains(@class,' pr-d/groupcomp ')]/*[contains(@class,' pr-d/groupcomp ')]">
|
---|
427 | <xsl:call-template name="dogroup"/>
|
---|
428 | </xsl:template>
|
---|
429 |
|
---|
430 | <xsl:template match="*[contains(@class,' pr-d/groupchoice ')]/*[contains(@class,' pr-d/groupchoice ')]">
|
---|
431 | <xsl:call-template name="dogroup"/>
|
---|
432 | </xsl:template>
|
---|
433 |
|
---|
434 | <xsl:template match="*[contains(@class,' pr-d/groupseq ')]/*[contains(@class,' pr-d/groupseq ')]">
|
---|
435 | <xsl:call-template name="dogroup"/>
|
---|
436 | </xsl:template>
|
---|
437 |
|
---|
438 | <xsl:template match="*[contains(@class,' pr-d/groupchoice ')]/*[contains(@class,' pr-d/groupcomp ')]">
|
---|
439 | <xsl:call-template name="dogroup"/>
|
---|
440 | </xsl:template>
|
---|
441 | <xsl:template match="*[contains(@class,' pr-d/groupchoice ')]/*[contains(@class,' pr-d/groupseq ')]">
|
---|
442 | <xsl:call-template name="dogroup"/>
|
---|
443 | </xsl:template>
|
---|
444 |
|
---|
445 | <xsl:template match="*[contains(@class,' pr-d/groupcomp ')]/*[contains(@class,' pr-d/groupchoice ')]">
|
---|
446 | <xsl:call-template name="dogroup"/>
|
---|
447 | </xsl:template>
|
---|
448 |
|
---|
449 | <xsl:template match="*[contains(@class,' pr-d/groupcomp ')]/*[contains(@class,' pr-d/groupseq ')]">
|
---|
450 | <xsl:call-template name="dogroup"/>
|
---|
451 | </xsl:template>
|
---|
452 |
|
---|
453 | <xsl:template match="*[contains(@class,' pr-d/groupseq ')]/*[contains(@class,' pr-d/groupchoice ')]">
|
---|
454 | <xsl:call-template name="dogroup"/>
|
---|
455 | </xsl:template>
|
---|
456 |
|
---|
457 | <xsl:template match="*[contains(@class,' pr-d/groupseq ')]/*[contains(@class,' pr-d/groupcomp ')]">
|
---|
458 | <xsl:call-template name="dogroup"/>
|
---|
459 | </xsl:template>
|
---|
460 |
|
---|
461 | <xsl:template name="dogroup">
|
---|
462 | <xsl:if test="parent::*[contains(@class,' pr-d/groupchoice ')]">
|
---|
463 | <xsl:if test="count(preceding-sibling::*)!=0"> | </xsl:if>
|
---|
464 | </xsl:if>
|
---|
465 | <xsl:if test="@importance='optional'">[</xsl:if>
|
---|
466 | <xsl:if test="name()='groupchoice'">{</xsl:if>
|
---|
467 | <xsl:text> </xsl:text><xsl:apply-templates/><xsl:text> </xsl:text>
|
---|
468 | <!-- repid processed here before -->
|
---|
469 | <xsl:if test="name()='groupchoice'">}</xsl:if>
|
---|
470 | <xsl:if test="@importance='optional'">]</xsl:if>
|
---|
471 | </xsl:template>
|
---|
472 |
|
---|
473 | <xsl:template match="*[contains(@class,' pr-d/groupcomp ')]/title|*[contains(@class,' pr-d/groupseq ')]/title|*[contains(@class,' pr-d/groupseq ')]/title"/> <!-- Consume title -->
|
---|
474 |
|
---|
475 |
|
---|
476 | <!-- start of software domain elements -->
|
---|
477 |
|
---|
478 | <xsl:template match="*[contains(@class,' sw-d/msgph ')]">
|
---|
479 | <fo:inline font-family="Courier">
|
---|
480 | <xsl:call-template name="setclass"/>
|
---|
481 | <xsl:apply-templates select="@id"/>
|
---|
482 | <xsl:call-template name="apply-for-phrases"/>
|
---|
483 | </fo:inline>
|
---|
484 | </xsl:template>
|
---|
485 |
|
---|
486 |
|
---|
487 |
|
---|
488 | <xsl:template match="*[contains(@class,' sw-d/msgblock ')]">
|
---|
489 | <xsl:if test="contains(@frame,'top')"><hr /></xsl:if>
|
---|
490 | <xsl:call-template name="gen-att-label"/>
|
---|
491 | <fo:block> <!-- use pre style -->
|
---|
492 | <xsl:call-template name="setclass"/>
|
---|
493 | <xsl:apply-templates select="@id"/>
|
---|
494 | <xsl:if test="@scale">
|
---|
495 | <!--xsl:attribute name="style">font-size: <xsl:value-of select="@scale"/>%;</xsl:attribute-->
|
---|
496 | </xsl:if>
|
---|
497 | <xsl:apply-templates/>
|
---|
498 | </fo:block>
|
---|
499 | <xsl:if test="contains(@frame,'bot')"><hr /></xsl:if>
|
---|
500 | </xsl:template>
|
---|
501 |
|
---|
502 |
|
---|
503 | <xsl:template match="*[contains(@class,' sw-d/msgnum ')]">
|
---|
504 | <fo:inline>
|
---|
505 | <xsl:call-template name="setclass"/>
|
---|
506 | <xsl:apply-templates select="@id"/>
|
---|
507 | <xsl:call-template name="apply-for-phrases"/>
|
---|
508 | </fo:inline>
|
---|
509 | </xsl:template>
|
---|
510 |
|
---|
511 |
|
---|
512 | <xsl:template match="*[contains(@class,' sw-d/cmdname ')]">
|
---|
513 | <fo:inline>
|
---|
514 | <xsl:call-template name="setclass"/>
|
---|
515 | <xsl:apply-templates select="@id"/>
|
---|
516 | <xsl:call-template name="apply-for-phrases"/>
|
---|
517 | </fo:inline>
|
---|
518 | </xsl:template>
|
---|
519 |
|
---|
520 |
|
---|
521 | <xsl:template match="*[contains(@class,' sw-d/varname ')]">
|
---|
522 | <fo:inline font-style="italic">
|
---|
523 | <xsl:call-template name="setclass"/>
|
---|
524 | <xsl:apply-templates select="@id"/>
|
---|
525 | <xsl:call-template name="apply-for-phrases"/>
|
---|
526 | </fo:inline>
|
---|
527 | </xsl:template>
|
---|
528 |
|
---|
529 |
|
---|
530 | <xsl:template match="*[contains(@class,' sw-d/filepath ')]">
|
---|
531 | <fo:inline font-family="Courier">
|
---|
532 | <xsl:call-template name="setclass"/>
|
---|
533 | <xsl:apply-templates select="@id"/>
|
---|
534 | <xsl:call-template name="apply-for-phrases"/>
|
---|
535 | </fo:inline>
|
---|
536 | </xsl:template>
|
---|
537 |
|
---|
538 |
|
---|
539 | <xsl:template match="*[contains(@class,' sw-d/userinput ')]">
|
---|
540 | <fo:inline font-family="Courier">
|
---|
541 | <xsl:call-template name="setclass"/>
|
---|
542 | <xsl:apply-templates select="@id"/>
|
---|
543 | <xsl:call-template name="apply-for-phrases"/>
|
---|
544 | </fo:inline>
|
---|
545 | </xsl:template>
|
---|
546 |
|
---|
547 |
|
---|
548 | <xsl:template match="*[contains(@class,' sw-d/systemoutput ')]">
|
---|
549 | <fo:inline font-family="Courier">
|
---|
550 | <xsl:call-template name="setclass"/>
|
---|
551 | <xsl:apply-templates select="@id"/>
|
---|
552 | <xsl:call-template name="apply-for-phrases"/>
|
---|
553 | </fo:inline>
|
---|
554 | </xsl:template>
|
---|
555 |
|
---|
556 |
|
---|
557 | </xsl:transform>
|
---|
558 |
|
---|