Line 0
Link Here
|
|
|
1 |
<xsl:stylesheet version="1.0" |
2 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
3 |
xmlns:xhtml="http://www.w3.org/1999/xhtml" |
4 |
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" |
5 |
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" |
6 |
exclude-result-prefixes="xhtml"> |
7 |
|
8 |
<!-- Create the root element for this WordprocessingML document --> |
9 |
<xsl:template match="xhtml:html"> |
10 |
<xsl:processing-instruction name="mso-application"> |
11 |
<xsl:text>progid="Word.Document"</xsl:text> |
12 |
</xsl:processing-instruction> |
13 |
<w:wordDocument> |
14 |
<xsl:attribute name="xml:space">preserve</xsl:attribute> |
15 |
<xsl:copy-of select="$styles-element"/> |
16 |
<w:docPr> |
17 |
<w:documentProtection w:formatting="on" w:enforcement="on"/> |
18 |
</w:docPr> |
19 |
<w:body> |
20 |
<xsl:apply-templates/> |
21 |
</w:body> |
22 |
</w:wordDocument> |
23 |
</xsl:template> |
24 |
|
25 |
<!-- Convert <h1> to "Heading 1" paragraph --> |
26 |
<xsl:template match="xhtml:h1"> |
27 |
<w:p> |
28 |
<w:pPr> |
29 |
<w:pStyle w:val="Heading1"/> |
30 |
</w:pPr> |
31 |
<xsl:apply-templates/> |
32 |
</w:p> |
33 |
</xsl:template> |
34 |
|
35 |
<!-- Convert <h2> to "Heading 2" paragraph --> |
36 |
<xsl:template match="xhtml:h2"> |
37 |
<w:p> |
38 |
<w:pPr> |
39 |
<w:pStyle w:val="Heading2"/> |
40 |
</w:pPr> |
41 |
<xsl:apply-templates/> |
42 |
</w:p> |
43 |
</xsl:template> |
44 |
|
45 |
<!-- Convert <h3> to "Heading 3" paragraph --> |
46 |
<xsl:template match="xhtml:h3"> |
47 |
<w:p> |
48 |
<w:pPr> |
49 |
<w:pStyle w:val="Heading3"/> |
50 |
</w:pPr> |
51 |
<xsl:apply-templates/> |
52 |
</w:p> |
53 |
</xsl:template> |
54 |
|
55 |
<!-- Convert <h4> to "Heading 4" paragraph --> |
56 |
<xsl:template match="xhtml:h4"> |
57 |
<w:p> |
58 |
<w:pPr> |
59 |
<w:pStyle w:val="Heading4"/> |
60 |
</w:pPr> |
61 |
<xsl:apply-templates/> |
62 |
</w:p> |
63 |
</xsl:template> |
64 |
|
65 |
<!-- Convert <h5> to "Heading 5" paragraph --> |
66 |
<xsl:template match="xhtml:h5"> |
67 |
<w:p> |
68 |
<w:pPr> |
69 |
<w:pStyle w:val="Heading5"/> |
70 |
</w:pPr> |
71 |
<xsl:apply-templates/> |
72 |
</w:p> |
73 |
</xsl:template> |
74 |
|
75 |
<!-- Convert <h6> to "Heading 6" paragraph --> |
76 |
<xsl:template match="xhtml:h6"> |
77 |
<w:p> |
78 |
<w:pPr> |
79 |
<w:pStyle w:val="Heading6"/> |
80 |
</w:pPr> |
81 |
<xsl:apply-templates/> |
82 |
</w:p> |
83 |
</xsl:template> |
84 |
|
85 |
<!-- Convert <p> elements to regular Word paragraphs ("Normal" style) --> |
86 |
<xsl:template match="xhtml:p"> |
87 |
<w:p> |
88 |
<xsl:apply-templates/> |
89 |
</w:p> |
90 |
</xsl:template> |
91 |
|
92 |
<!-- Don't automatically copy text nodes. Do explicit value-of's instead --> |
93 |
<xsl:template match="text()"/> |
94 |
|
95 |
<!-- For plain p or heading text, just create a run of unformatted text --> |
96 |
<xsl:template match="xhtml:p/text() | xhtml:h1/text() | xhtml:h2/text() | xhtml:h3/text() |
97 |
| xhtml:h4/text() | xhtml:h5/text() | xhtml:h6/text()"> |
98 |
<w:r> |
99 |
<w:t> |
100 |
<xsl:value-of select="normalize-space(.)"/> |
101 |
</w:t> |
102 |
</w:r> |
103 |
</xsl:template> |
104 |
|
105 |
<!-- For text in <em>, apply the "Emphasis" character style --> |
106 |
<xsl:template match="xhtml:em/text()"> |
107 |
<w:r> |
108 |
<w:rPr> |
109 |
<w:rStyle w:val="Emphasis"/> |
110 |
</w:rPr> |
111 |
<w:t> |
112 |
<xsl:value-of select="normalize-space(.)"/> |
113 |
</w:t> |
114 |
</w:r> |
115 |
</xsl:template> |
116 |
|
117 |
<!-- For text in <strong>, apply the "Strong" character style --> |
118 |
<xsl:template match="xhtml:strong/text()"> |
119 |
<w:r> |
120 |
<w:rPr> |
121 |
<w:rStyle w:val="Strong"/> |
122 |
</w:rPr> |
123 |
<w:t> |
124 |
<xsl:value-of select="normalize-space(.)"/> |
125 |
</w:t> |
126 |
</w:r> |
127 |
</xsl:template> |
128 |
|
129 |
<!-- Turn the HTML-style <a> tag to the <w:hlink> hyperlink tag --> |
130 |
<xsl:template match="xhtml:a"> |
131 |
<w:hlink w:dest="{@href}"> |
132 |
<xsl:apply-templates/> |
133 |
</w:hlink> |
134 |
</xsl:template> |
135 |
|
136 |
<!-- For text in <a>, apply the "Hyperlink" character style --> |
137 |
<xsl:template match="xhtml:a/text()"> |
138 |
<w:r> |
139 |
<w:rPr> |
140 |
<w:rStyle w:val="Hyperlink"/> |
141 |
</w:rPr> |
142 |
<w:t> |
143 |
<xsl:value-of select="normalize-space(.)" /> |
144 |
</w:t> |
145 |
</w:r> |
146 |
</xsl:template> |
147 |
|
148 |
<!-- Copy of all the style definitions used in this document --> |
149 |
<xsl:variable name="styles-element"> |
150 |
<w:styles> |
151 |
<w:versionOfBuiltInStylenames w:val="4"/> |
152 |
<w:latentStyles w:defLockedState="on" w:latentStyleCount="156"> |
153 |
<w:lsdException w:name="Normal" w:locked="off"/> |
154 |
<w:lsdException w:name="heading 1" w:locked="off"/> |
155 |
<w:lsdException w:name="heading 2" w:locked="off"/> |
156 |
<w:lsdException w:name="heading 3" w:locked="off"/> |
157 |
<w:lsdException w:name="heading 4" w:locked="off"/> |
158 |
<w:lsdException w:name="heading 5" w:locked="off"/> |
159 |
<w:lsdException w:name="heading 6" w:locked="off"/> |
160 |
<w:lsdException w:name="heading 7" w:locked="off"/> |
161 |
<w:lsdException w:name="heading 8" w:locked="off"/> |
162 |
<w:lsdException w:name="heading 9" w:locked="off"/> |
163 |
<w:lsdException w:name="Default Paragraph Font" w:locked="off"/> |
164 |
<w:lsdException w:name="Hyperlink" w:locked="off"/> |
165 |
<w:lsdException w:name="Strong" w:locked="off"/> |
166 |
<w:lsdException w:name="Emphasis" w:locked="off"/> |
167 |
<w:lsdException w:name="HTML Top of Form" w:locked="off"/> |
168 |
<w:lsdException w:name="HTML Bottom of Form" w:locked="off"/> |
169 |
<w:lsdException w:name="Normal Table" w:locked="off"/> |
170 |
<w:lsdException w:name="No List" w:locked="off"/> |
171 |
</w:latentStyles> |
172 |
<w:style w:type="paragraph" w:default="on" w:styleId="Normal"> |
173 |
<w:name w:val="Normal"/> |
174 |
<w:rsid w:val="00664EF3"/> |
175 |
<w:pPr> |
176 |
<w:spacing w:after="360"/> |
177 |
</w:pPr> |
178 |
<w:rPr> |
179 |
<wx:font wx:val="Times New Roman"/> |
180 |
<w:sz w:val="24"/> |
181 |
<w:sz-cs w:val="24"/> |
182 |
<w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA"/> |
183 |
</w:rPr> |
184 |
</w:style> |
185 |
<w:style w:type="paragraph" w:styleId="Heading1"> |
186 |
<w:name w:val="heading 1"/> |
187 |
<wx:uiName wx:val="Heading 1"/> |
188 |
<w:basedOn w:val="Normal"/> |
189 |
<w:next w:val="Normal"/> |
190 |
<w:rsid w:val="00664EF3"/> |
191 |
<w:pPr> |
192 |
<w:pStyle w:val="Heading1"/> |
193 |
<w:keepNext/> |
194 |
<w:spacing w:before="240" w:after="60"/> |
195 |
<w:outlineLvl w:val="0"/> |
196 |
</w:pPr> |
197 |
<w:rPr> |
198 |
<w:rFonts w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial"/> |
199 |
<wx:font wx:val="Arial"/> |
200 |
<w:b/> |
201 |
<w:b-cs/> |
202 |
<w:kern w:val="32"/> |
203 |
<w:sz w:val="32"/> |
204 |
<w:sz-cs w:val="32"/> |
205 |
</w:rPr> |
206 |
</w:style> |
207 |
<w:style w:type="paragraph" w:styleId="Heading2"> |
208 |
<w:name w:val="heading 2"/> |
209 |
<wx:uiName wx:val="Heading 2"/> |
210 |
<w:basedOn w:val="Normal"/> |
211 |
<w:next w:val="Normal"/> |
212 |
<w:rsid w:val="00664EF3"/> |
213 |
<w:pPr> |
214 |
<w:pStyle w:val="Heading2"/> |
215 |
<w:keepNext/> |
216 |
<w:spacing w:before="240" w:after="60"/> |
217 |
<w:outlineLvl w:val="1"/> |
218 |
</w:pPr> |
219 |
<w:rPr> |
220 |
<w:rFonts w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial"/> |
221 |
<wx:font wx:val="Arial"/> |
222 |
<w:b/> |
223 |
<w:b-cs/> |
224 |
<w:i/> |
225 |
<w:i-cs/> |
226 |
<w:sz w:val="28"/> |
227 |
<w:sz-cs w:val="28"/> |
228 |
</w:rPr> |
229 |
</w:style> |
230 |
<w:style w:type="paragraph" w:styleId="Heading3"> |
231 |
<w:name w:val="heading 3"/> |
232 |
<wx:uiName wx:val="Heading 3"/> |
233 |
<w:basedOn w:val="Normal"/> |
234 |
<w:next w:val="Normal"/> |
235 |
<w:rsid w:val="00664EF3"/> |
236 |
<w:pPr> |
237 |
<w:pStyle w:val="Heading3"/> |
238 |
<w:keepNext/> |
239 |
<w:spacing w:before="240" w:after="60"/> |
240 |
<w:outlineLvl w:val="2"/> |
241 |
</w:pPr> |
242 |
<w:rPr> |
243 |
<w:rFonts w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial"/> |
244 |
<wx:font wx:val="Arial"/> |
245 |
<w:b/> |
246 |
<w:b-cs/> |
247 |
<w:sz w:val="26"/> |
248 |
<w:sz-cs w:val="26"/> |
249 |
</w:rPr> |
250 |
</w:style> |
251 |
<w:style w:type="character" w:default="on" w:styleId="DefaultParagraphFont"> |
252 |
<w:name w:val="Default Paragraph Font"/> |
253 |
<w:semiHidden/> |
254 |
</w:style> |
255 |
<w:style w:type="table" w:default="on" w:styleId="TableNormal"> |
256 |
<w:name w:val="Normal Table"/> |
257 |
<wx:uiName wx:val="Table Normal"/> |
258 |
<w:semiHidden/> |
259 |
<w:rPr> |
260 |
<wx:font wx:val="Times New Roman"/> |
261 |
</w:rPr> |
262 |
<w:tblPr> |
263 |
<w:tblInd w:w="0" w:type="dxa"/> |
264 |
<w:tblCellMar> |
265 |
<w:top w:w="0" w:type="dxa"/> |
266 |
<w:left w:w="108" w:type="dxa"/> |
267 |
<w:bottom w:w="0" w:type="dxa"/> |
268 |
<w:right w:w="108" w:type="dxa"/> |
269 |
</w:tblCellMar> |
270 |
</w:tblPr> |
271 |
</w:style> |
272 |
<w:style w:type="list" w:default="on" w:styleId="NoList"> |
273 |
<w:name w:val="No List"/> |
274 |
<w:semiHidden/> |
275 |
</w:style> |
276 |
<w:style w:type="character" w:styleId="Emphasis"> |
277 |
<w:name w:val="Emphasis"/> |
278 |
<w:basedOn w:val="DefaultParagraphFont"/> |
279 |
<w:rsid w:val="00664EF3"/> |
280 |
<w:rPr> |
281 |
<w:i/> |
282 |
<w:i-cs/> |
283 |
</w:rPr> |
284 |
</w:style> |
285 |
<w:style w:type="character" w:styleId="Strong"> |
286 |
<w:name w:val="Strong"/> |
287 |
<w:basedOn w:val="DefaultParagraphFont"/> |
288 |
<w:rsid w:val="00664EF3"/> |
289 |
<w:rPr> |
290 |
<w:b/> |
291 |
<w:b-cs/> |
292 |
</w:rPr> |
293 |
</w:style> |
294 |
<w:style w:type="character" w:styleId="Hyperlink"> |
295 |
<w:name w:val="Hyperlink"/> |
296 |
<w:basedOn w:val="DefaultParagraphFont"/> |
297 |
<w:rsid w:val="00664EF3"/> |
298 |
<w:rPr> |
299 |
<w:color w:val="0000FF"/> |
300 |
<w:u w:val="single"/> |
301 |
</w:rPr> |
302 |
</w:style> |
303 |
</w:styles> |
304 |
</xsl:variable> |
305 |
|
306 |
<xsl:template match="@*|node()"> |
307 |
<xsl:apply-templates select="@*|node()"/> |
308 |
</xsl:template> |
309 |
|
310 |
</xsl:stylesheet> |
0 |
+ native |
311 |
+ native |