/[volute]/trunk/projects/grid/uws/doc/ivoadoc/ivoa-fo.xsl
ViewVC logotype

Contents of /trunk/projects/grid/uws/doc/ivoadoc/ivoa-fo.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 982 - (show annotations)
Mon Apr 20 15:07:43 2009 UTC (11 years, 7 months ago) by harripa
File MIME type: text/plain
File size: 11082 byte(s)
restructured directory tree to take advantage of svn external refs
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Derived from W3-REC stype from antenna house - it still needs much work to make it really production quality.
3
4 Is being targeted at the apache-fop implementation - consequently has some tweaks from ideal (e.g. in table handling)
5
6 Paul Harrison
7 -->
8 <!--
9
10 Copyright Antenna House, Inc. (http://www.antennahouse.com) 2001, 2002.
11
12 Since this stylesheet is originally developed by Antenna House to be used with XSL Formatter, it may not be compatible with another XSL-FO processors.
13
14 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
18 -->
19
20 <xsl:stylesheet version="1.0"
21 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22 xmlns:fo="http://www.w3.org/1999/XSL/Format"
23 xmlns:html="http://www.w3.org/1999/xhtml">
24
25 <xsl:import href="xhtml2fo.xsl"/>
26
27 <xsl:output method="xml"
28 version="1.0"
29 encoding="UTF-8"
30 indent="no"/>
31
32 <!--======================================================================
33 Parameters
34 =======================================================================-->
35
36 <!-- page size -->
37 <xsl:param name="page-width">auto</xsl:param>
38 <xsl:param name="page-height">auto</xsl:param>
39 <xsl:param name="page-margin-top">1in</xsl:param>
40 <xsl:param name="page-margin-bottom">1in</xsl:param>
41 <xsl:param name="page-margin-left">1in</xsl:param>
42 <xsl:param name="page-margin-right">1in</xsl:param>
43
44 <!-- page header and footer -->
45 <xsl:param name="page-header-margin">0.5in</xsl:param>
46 <xsl:param name="page-footer-margin">0.5in</xsl:param>
47 <xsl:param name="title-print-in-header">true</xsl:param>
48 <xsl:param name="page-number-print-in-footer">true</xsl:param>
49
50 <!-- multi column -->
51 <xsl:param name="column-count">1</xsl:param>
52 <xsl:param name="column-gap">12pt</xsl:param>
53
54 <!-- writing-mode: lr-tb | rl-tb | tb-rl -->
55 <xsl:param name="writing-mode">lr-tb</xsl:param>
56
57 <!-- text-align: justify | start -->
58 <xsl:param name="text-align">justify</xsl:param>
59
60 <!-- hyphenate: true | false -->
61 <xsl:param name="hyphenate">true</xsl:param>
62
63
64 <!--======================================================================
65 Attribute Sets
66 =======================================================================-->
67
68 <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
69 Root
70 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
71
72 <xsl:attribute-set name="root">
73 <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
74 <xsl:attribute name="hyphenate"><xsl:value-of select="$hyphenate"/></xsl:attribute>
75 <xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
76 <xsl:attribute name="language"><xsl:text>en</xsl:text></xsl:attribute>
77
78 <!-- specified on fo:root to change the properties' initial values -->
79 </xsl:attribute-set>
80
81 <xsl:attribute-set name="page">
82 <xsl:attribute name="page-width"><xsl:value-of select="$page-width"/></xsl:attribute>
83 <xsl:attribute name="page-height"><xsl:value-of select="$page-height"/></xsl:attribute>
84 <!-- specified on fo:simple-page-master -->
85 </xsl:attribute-set>
86
87 <xsl:attribute-set name="body">
88 <!-- specified on fo:flow's only child fo:block -->
89 <xsl:attribute name="font-family">sans-serif</xsl:attribute>
90 </xsl:attribute-set>
91
92 <xsl:attribute-set name="page-header">
93 <!-- specified on (page-header)fo:static-content's only child fo:block -->
94 <xsl:attribute name="font-size">small</xsl:attribute>
95 <xsl:attribute name="text-align">center</xsl:attribute>
96 </xsl:attribute-set>
97
98 <xsl:attribute-set name="page-footer">
99 <!-- specified on (page-footer)fo:static-content's only child fo:block -->
100 <xsl:attribute name="font-size">small</xsl:attribute>
101 <xsl:attribute name="text-align">center</xsl:attribute>
102 </xsl:attribute-set>
103
104 <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
105 Block-level
106 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
107
108 <xsl:attribute-set name="h1">
109 <xsl:attribute name="font-size">170%</xsl:attribute>
110 <xsl:attribute name="font-weight">normal</xsl:attribute>
111 <xsl:attribute name="font-family">sans-serif</xsl:attribute>
112 <xsl:attribute name="color">#005A9C</xsl:attribute>
113 <xsl:attribute name="text-align">start</xsl:attribute>
114 </xsl:attribute-set>
115
116 <xsl:attribute-set name="h2">
117 <xsl:attribute name="font-size">140%</xsl:attribute>
118 <xsl:attribute name="font-weight">normal</xsl:attribute>
119 <xsl:attribute name="font-family">sans-serif</xsl:attribute>
120 <xsl:attribute name="color">#005A9C</xsl:attribute>
121 <xsl:attribute name="text-align">start</xsl:attribute>
122 </xsl:attribute-set>
123
124 <xsl:attribute-set name="h3">
125 <xsl:attribute name="font-size">120%</xsl:attribute>
126 <xsl:attribute name="font-weight">normal</xsl:attribute>
127 <xsl:attribute name="font-family">sans-serif</xsl:attribute>
128 <xsl:attribute name="color">#005A9C</xsl:attribute>
129 <xsl:attribute name="text-align">start</xsl:attribute>
130 </xsl:attribute-set>
131
132 <xsl:attribute-set name="h4">
133 <xsl:attribute name="font-size">100%</xsl:attribute>
134 <xsl:attribute name="font-weight">bold</xsl:attribute>
135 <xsl:attribute name="font-family">sans-serif</xsl:attribute>
136 <xsl:attribute name="color">#005A9C</xsl:attribute>
137 <xsl:attribute name="text-align">start</xsl:attribute>
138 </xsl:attribute-set>
139
140 <xsl:attribute-set name="h5">
141 <xsl:attribute name="font-size">100%</xsl:attribute>
142 <xsl:attribute name="font-weight">normal</xsl:attribute>
143 <xsl:attribute name="font-style">italic</xsl:attribute>
144 <xsl:attribute name="font-family">sans-serif</xsl:attribute>
145 <xsl:attribute name="color">#005A9C</xsl:attribute>
146 <xsl:attribute name="text-align">start</xsl:attribute>
147 </xsl:attribute-set>
148
149 <xsl:attribute-set name="h6">
150 <xsl:attribute name="font-size">100%</xsl:attribute>
151 <xsl:attribute name="font-weight">normal</xsl:attribute>
152 <xsl:attribute name="font-variant">small-caps</xsl:attribute>
153 <xsl:attribute name="font-family">sans-serif</xsl:attribute>
154 <xsl:attribute name="color">#005A9C</xsl:attribute>
155 <xsl:attribute name="text-align">start</xsl:attribute>
156 </xsl:attribute-set>
157
158 <xsl:attribute-set name="p">
159 </xsl:attribute-set>
160
161 <xsl:attribute-set name="blockquote">
162 </xsl:attribute-set>
163
164 <xsl:attribute-set name="pre">
165 <xsl:attribute name="start-indent">inherited-property-value(start-indent) + 2em</xsl:attribute>
166 </xsl:attribute-set>
167
168 <xsl:attribute-set name="address">
169 <xsl:attribute name="font-style">italic</xsl:attribute>
170 </xsl:attribute-set>
171
172 <xsl:attribute-set name="hr">
173 </xsl:attribute-set>
174
175 <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
176 List
177 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
178 <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
179 Table
180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
181 <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
182 Inline-level
183 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
184 <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
185 Link
186 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
187 <!-- default attributes are defined in xhtml2fo.xsl -->
188
189
190 <!--======================================================================
191 misc. additional
192 =======================================================================-->
193
194 <!-- .hide { display: none } -->
195 <xsl:template match="*[@class = 'hide']"/>
196
197 <!-- div.head { margin-bottom: 1em } -->
198 <xsl:template match="html:div[@class = 'head']">
199 <fo:block space-after="1em">
200 <xsl:call-template name="process-common-attributes-and-children"/>
201 </fo:block>
202 </xsl:template>
203
204 <!-- div.head h1 { margin-top: 2em; clear: both } -->
205 <xsl:template match="html:div[@class = 'head']//html:h1">
206 <fo:block xsl:use-attribute-sets="h1"
207 space-before="2em" space-before.conditionality="retain">
208 <xsl:call-template name="process-common-attributes-and-children"/>
209 </fo:block>
210 </xsl:template>
211
212 <!-- div.head table { margin-left: 2em; margin-top: 2em } -->
213 <xsl:template match="html:div[@class = 'head']//html:table">
214 <!-- pah removed table caption from here - apache FOP does not do this... -->
215 <fo:table xsl:use-attribute-sets="table">
216 <xsl:call-template name="process-table"/>
217 </fo:table>
218 </xsl:template>
219
220 <!-- div.head img { color: white; border: none } /* remove border from top image */ -->
221 <xsl:template match="html:div[@class = 'head']//html:img">
222 <fo:external-graphic xsl:use-attribute-sets="img"
223 color="white" border="none">
224 <xsl:call-template name="process-img"/>
225 </fo:external-graphic>
226 </xsl:template>
227
228 <!-- p.copyright { font-size: small } -->
229 <xsl:template match="html:p[@class = 'copyright']">
230 <fo:block xsl:use-attribute-sets="p" font-size="small">
231 <xsl:call-template name="process-common-attributes-and-children"/>
232 </fo:block>
233 </xsl:template>
234
235 <!-- p.copyright small { font-size: small } -->
236 <xsl:template match="html:p[@class = 'copyright']//html:small">
237 <fo:inline font-size="small">
238 <xsl:call-template name="process-common-attributes-and-children"/>
239 </fo:inline>
240 </xsl:template>
241
242 <!-- ul.toc { list-style: none; } -->
243 <xsl:template match="html:ul[@class = 'toc']/html:li">
244 <fo:list-item xsl:use-attribute-sets="ul-li">
245 <xsl:call-template name="process-common-attributes"/>
246 <fo:list-item-label>
247 <fo:block/>
248 </fo:list-item-label>
249 <fo:list-item-body start-indent="body-start()">
250 <fo:block>
251 <xsl:apply-templates/>
252 </fo:block>
253 </fo:list-item-body>
254 </fo:list-item>
255 </xsl:template>
256
257 </xsl:stylesheet>

Properties

Name Value
svn:mime-type text/plain

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26