|
1 <?xml version="1.0"?> |
|
2 <xsl:stylesheet version="1.1" |
|
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
4 xmlns:xt="http://www.jclark.com/xt" |
|
5 extension-element-prefixes="xt" |
|
6 xmlns="http://www.w3.org/1999/XSL/Format"> |
|
7 <xsl:import href="common.xsl"/> |
|
8 <xsl:output method="xml" |
|
9 indent="yes"/> |
|
10 |
|
11 <xsl:attribute-set name="verylarge-title-font"> |
|
12 <xsl:attribute name="font-size">18pt</xsl:attribute> |
|
13 <xsl:attribute name="font-weight">bold</xsl:attribute> |
|
14 </xsl:attribute-set> |
|
15 <xsl:attribute-set name="large-title-font"> |
|
16 <xsl:attribute name="font-size">16pt</xsl:attribute> |
|
17 <xsl:attribute name="font-weight">bold</xsl:attribute> |
|
18 </xsl:attribute-set> |
|
19 <xsl:attribute-set name="medium-title-font"> |
|
20 <xsl:attribute name="font-size">14pt</xsl:attribute> |
|
21 <xsl:attribute name="font-weight">bold</xsl:attribute> |
|
22 </xsl:attribute-set> |
|
23 <xsl:attribute-set name="small-title-font"> |
|
24 <xsl:attribute name="font-size">12pt</xsl:attribute> |
|
25 <xsl:attribute name="font-weight">bold</xsl:attribute> |
|
26 </xsl:attribute-set> |
|
27 <xsl:attribute-set name="default-font"> |
|
28 <xsl:attribute name="font-size">10pt</xsl:attribute> |
|
29 </xsl:attribute-set> |
|
30 |
|
31 <xsl:template name="list-label"> |
|
32 <xsl:param name="labeltext"/> |
|
33 <!-- <xsl:param name="labeltext"> |
|
34 <xsl:text>•</xsl:text> |
|
35 </xsl:param> --> |
|
36 <list-item-label end-indent="label-end()"> |
|
37 <block start-indent="5mm"><xsl:value-of select="$labeltext"/></block> |
|
38 </list-item-label> |
|
39 </xsl:template> |
|
40 |
|
41 <!-- normal name processing --> |
|
42 <!-- should be move in common.xsl --> |
|
43 <xsl:template name="name"> |
|
44 <xsl:apply-templates select="firstname"/> |
|
45 <xsl:if test="initials"> |
|
46 <xsl:text> </xsl:text> |
|
47 <xsl:apply-templates select="initials"/> |
|
48 </xsl:if> |
|
49 <xsl:text> </xsl:text> |
|
50 <xsl:apply-templates select="surname"/> |
|
51 </xsl:template> |
|
52 |
|
53 <xsl:template match="address"> |
|
54 <xsl:apply-templates mode="address" select="street"/> |
|
55 <block> |
|
56 <xsl:value-of select="city"/> |
|
57 (<xsl:value-of select="state"/>), |
|
58 <xsl:value-of select="postcode"/> |
|
59 </block> |
|
60 <xsl:apply-templates select="country" mode="address"/> |
|
61 </xsl:template> |
|
62 <xsl:template match="*" mode="address"> |
|
63 <block><xsl:apply-templates/></block> |
|
64 </xsl:template> |
|
65 |
|
66 <xsl:template match="organism" mode="short"> |
|
67 <xsl:apply-templates select="name"/> |
|
68 </xsl:template> |
|
69 |
|
70 <!-- para default processing --> |
|
71 <xsl:template match="para"> |
|
72 <block text-align="justify"><xsl:apply-templates/></block> |
|
73 </xsl:template> |
|
74 |
|
75 <!-- formalpara processing --> |
|
76 <xsl:template match="formalpara/para"> |
|
77 <xsl:apply-templates/> |
|
78 </xsl:template> |
|
79 <xsl:template match="formalpara/title"> |
|
80 <inline font-weight="bold"><xsl:apply-templates/></inline> |
|
81 </xsl:template> |
|
82 <xsl:template match="formalpara"> |
|
83 <block><xsl:apply-templates/></block> |
|
84 </xsl:template> |
|
85 |
|
86 <!-- list processing --> |
|
87 <xsl:template match="list"> |
|
88 <list-block> |
|
89 <xsl:apply-templates/> |
|
90 </list-block> |
|
91 </xsl:template> |
|
92 <xsl:template match="shortlist"> |
|
93 <block margin-left="24pt"><xsl:apply-templates mode="short"/></block> |
|
94 </xsl:template> |
|
95 |
|
96 <xsl:template match="listitem"> |
|
97 <list-item> |
|
98 <xsl:call-template name="list-label"/> |
|
99 <list-item-body start-indent="body-start()"> |
|
100 <xsl:apply-templates/> |
|
101 </list-item-body> |
|
102 </list-item> |
|
103 </xsl:template> |
|
104 |
|
105 <xsl:template match="item"> |
|
106 <list-item> |
|
107 <xsl:call-template name="list-label"/> |
|
108 <list-item-body start-indent="body-start()"> |
|
109 <block><xsl:apply-templates/></block> |
|
110 </list-item-body> |
|
111 </list-item> |
|
112 </xsl:template> |
|
113 |
|
114 <!-- inline element --> |
|
115 <xsl:template match="emphasis"> |
|
116 <inline font-style="italic"><xsl:apply-templates/></inline> |
|
117 </xsl:template> |
|
118 <xsl:template match="term"> |
|
119 <inline text-decoration="underline"><xsl:apply-templates/></inline> |
|
120 </xsl:template> |
|
121 <xsl:template match="foreign"> |
|
122 <inline font-style="italic"><xsl:apply-templates/></inline> |
|
123 </xsl:template> |
|
124 <xsl:template match="replaceable"> |
|
125 <inline font-style="italic"> |
|
126 <xsl:text>[</xsl:text> |
|
127 <xsl:apply-templates/> |
|
128 <xsl:text>]</xsl:text> |
|
129 </inline> |
|
130 </xsl:template> |
|
131 <xsl:template match="literal"> |
|
132 <inline font-style="Courier"><xsl:apply-templates/></inline> |
|
133 </xsl:template> |
|
134 |
|
135 <xsl:template match="subscript"> |
|
136 <inline vertical-align="sub" font-size="60%"><xsl:apply-templates/></inline> |
|
137 </xsl:template> |
|
138 |
|
139 <xsl:template match="superscript"> |
|
140 <inline vertical-align="super" font-size="60%"><xsl:apply-templates/></inline> |
|
141 </xsl:template> |
|
142 |
|
143 </xsl:stylesheet> |
|
144 |
|
145 <!-- Keep this comment at the end of the file |
|
146 Local variables: |
|
147 mode: xml |
|
148 sgml-omittag:nil |
|
149 sgml-shorttag:nil |
|
150 sgml-namecase-general:nil |
|
151 sgml-general-insert-case:lower |
|
152 sgml-minimize-attributes:nil |
|
153 sgml-always-quote-attributes:t |
|
154 sgml-indent-step:2 |
|
155 sgml-indent-data:nil |
|
156 sgml-parent-document:nil |
|
157 sgml-exposed-tags:nil |
|
158 sgml-local-catalogs:nil |
|
159 sgml-local-ecat-files:nil |
|
160 outline-regexp:"\<xsl:" |
|
161 End: |
|
162 --> |