|
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 |
|
8 <xsl:import href="common.xsl"/> |
|
9 <xsl:import href="print.xsl"/> |
|
10 <xsl:import href="masters_print.xsl"/> |
|
11 |
|
12 <xsl:output method="xml" indent="yes"/> |
|
13 |
|
14 <xsl:attribute-set name="standard-block"> |
|
15 <xsl:attribute name="text-indent">10mm</xsl:attribute> |
|
16 <xsl:attribute name="space-before">10pt</xsl:attribute> |
|
17 <xsl:attribute name="space-before.conditionnaly">discard</xsl:attribute> |
|
18 <xsl:attribute name="text-align">justify</xsl:attribute> |
|
19 </xsl:attribute-set> |
|
20 |
|
21 <xsl:template name="static-content"> |
|
22 <xsl:param name="title"/> |
|
23 <static-content flow-name="xsl-region-before"> |
|
24 <block border-after-style="solid"> |
|
25 <table width="100%" table-layout="fixed"> |
|
26 <table-column column-width="proportional-column-width(1)" |
|
27 number-columns-repeated="2"/> |
|
28 <table-body> |
|
29 <table-row> |
|
30 <table-cell> |
|
31 <block text-align="start"><xsl:value-of select="$title"/></block> |
|
32 </table-cell> |
|
33 </table-row> |
|
34 </table-body> |
|
35 </table> |
|
36 </block> |
|
37 </static-content> |
|
38 <static-content flow-name="xsl-region-after"> |
|
39 <block border-before-style="solid"> |
|
40 <table width="100%" table-layout="fixed"> |
|
41 <table-column column-width="proportional-column-width(1)" |
|
42 number-columns-repeated="2"/> |
|
43 <table-body> |
|
44 <table-row> |
|
45 <table-cell> |
|
46 <block text-align="end"> |
|
47 <xsl:text>page </xsl:text> |
|
48 <page-number/> |
|
49 </block> |
|
50 </table-cell> |
|
51 </table-row> |
|
52 </table-body> |
|
53 </table> |
|
54 </block> |
|
55 </static-content> |
|
56 </xsl:template> |
|
57 |
|
58 <!-- book --> |
|
59 <xsl:template match="book"> |
|
60 <root> |
|
61 <xsl:call-template name="master-set"/> |
|
62 <xsl:apply-templates select="section"/> |
|
63 </root> |
|
64 </xsl:template> |
|
65 |
|
66 <xsl:template match="/book/section"> |
|
67 <page-sequence master-reference="book-sequence"> |
|
68 <xsl:call-template name="static-content"> |
|
69 <xsl:with-param name="title"> |
|
70 <xsl:apply-templates select="title"/> |
|
71 </xsl:with-param> |
|
72 </xsl:call-template> |
|
73 <flow flow-name="xsl-region-body"> |
|
74 <xsl:apply-templates select="*[name()!='story']"/> |
|
75 </flow> |
|
76 </page-sequence> |
|
77 <xsl:apply-templates select="story"/> |
|
78 </xsl:template> |
|
79 |
|
80 <xsl:template match="story"> |
|
81 <page-sequence master-reference="book-sequence"> |
|
82 <xsl:call-template name="static-content"> |
|
83 <xsl:with-param name="title"> |
|
84 <xsl:apply-templates select="title"/> |
|
85 </xsl:with-param> |
|
86 </xsl:call-template> |
|
87 <flow flow-name="xsl-region-body"> |
|
88 <xsl:apply-templates/> |
|
89 </flow> |
|
90 </page-sequence> |
|
91 </xsl:template> |
|
92 |
|
93 <xsl:template match="section/title"> |
|
94 <block xsl:use-attribute-sets="verylarge-title-font"> |
|
95 <xsl:attribute name="space-after">5pt</xsl:attribute> |
|
96 <xsl:attribute name="space-before">10pt</xsl:attribute> |
|
97 <xsl:apply-templates/> |
|
98 </block> |
|
99 </xsl:template> |
|
100 |
|
101 <xsl:template match="story/title"> |
|
102 <block xsl:use-attribute-sets="large-title-font"> |
|
103 <xsl:attribute name="space-after">5pt</xsl:attribute> |
|
104 <xsl:attribute name="space-before">10pt</xsl:attribute> |
|
105 <xsl:apply-templates/> |
|
106 </block> |
|
107 </xsl:template> |
|
108 |
|
109 <xsl:template match="story/section/title"> |
|
110 <block xsl:use-attribute-sets="medium-title-font"> |
|
111 <xsl:attribute name="space-after">5pt</xsl:attribute> |
|
112 <xsl:attribute name="space-before">10pt</xsl:attribute> |
|
113 <xsl:apply-templates/> |
|
114 </block> |
|
115 </xsl:template> |
|
116 |
|
117 <xsl:template match="nda"> |
|
118 <block border="solid" padding="5pt" font-style="italic"> |
|
119 <xsl:apply-templates/> |
|
120 </block> |
|
121 </xsl:template> |
|
122 |
|
123 <xsl:template match="para"> |
|
124 <block xsl:use-attribute-sets="standard-block"> |
|
125 <xsl:apply-templates/> |
|
126 </block> |
|
127 </xsl:template> |
|
128 |
|
129 <!-- dialog template --> |
|
130 <xsl:template match="dialog"> |
|
131 <block xsl:use-attribute-sets="standard-block" start-indent="1cm"> |
|
132 <xsl:apply-templates/> |
|
133 </block> |
|
134 </xsl:template> |
|
135 <xsl:template match="cite"> |
|
136 <block xsl:use-attribute-sets="standard-block" font-style="italic"> |
|
137 <xsl:text>"</xsl:text> |
|
138 <xsl:apply-templates/> |
|
139 <xsl:text>"</xsl:text> |
|
140 </block> |
|
141 </xsl:template> |
|
142 |
|
143 <xsl:template match="citation"> |
|
144 <block xsl:use-attribute-sets="standard-block" font-style="italic" |
|
145 font-size="75%" margin-left="4in"> |
|
146 <xsl:apply-templates/> |
|
147 </block> |
|
148 </xsl:template> |
|
149 |
|
150 <xsl:template match="poem"> |
|
151 <block xsl:use-attribute-sets="standard-block" font-style="italic" |
|
152 margin-left=".5in" margin-right=".5in"> |
|
153 <xsl:apply-templates/> |
|
154 </block> |
|
155 </xsl:template> |
|
156 |
|
157 <xsl:template match="strophe"> |
|
158 <block xsl:use-attribute-sets="standard-block"> |
|
159 <xsl:apply-templates/> |
|
160 </block> |
|
161 </xsl:template> |
|
162 |
|
163 <xsl:template match="verse"> |
|
164 <block><xsl:apply-templates/></block> |
|
165 </xsl:template> |
|
166 |
|
167 </xsl:stylesheet> |
|
168 |
|
169 <!-- Keep this comment at the end of the file |
|
170 Local variables: |
|
171 mode: xml |
|
172 sgml-omittag:nil |
|
173 sgml-shorttag:nil |
|
174 sgml-namecase-general:nil |
|
175 sgml-general-insert-case:lower |
|
176 sgml-minimize-attributes:nil |
|
177 sgml-always-quote-attributes:t |
|
178 sgml-indent-step:2 |
|
179 sgml-indent-data:nil |
|
180 sgml-parent-document:nil |
|
181 sgml-exposed-tags:nil |
|
182 sgml-local-catalogs:nil |
|
183 sgml-local-ecat-files:nil |
|
184 outline-regexp:"<xsl:" |
|
185 End: |
|
186 --> |