Odt_To_Xhtml.xsl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. <?xml version="1.0"?>
  2. <!--
  3. This file is dual-licensed.
  4. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  5. LGPL:
  6. This stylesheet converts OpenDocument text files to XHTML.
  7. Copyright (C) 2005-2006 J. David Eisenberg
  8. This library is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU Lesser General Public
  10. License as published by the Free Software Foundation; either
  11. version 2.1 of the License, or (at your option) any later version.
  12. This library is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. Lesser General Public License for more details.
  16. You should have received a copy of the GNU Lesser General Public
  17. License along with this library; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. Author: J. David Eisenberg
  20. Contact: catcode@catcode.com
  21. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  22. Apache 2.0
  23. Licensed under the Apache License, Version 2.0 (the "License");
  24. you may not use this file except in compliance with the License.
  25. You may obtain a copy of the License at
  26. http://www.apache.org/licenses/LICENSE-2.0
  27. Unless required by applicable law or agreed to in writing, software
  28. distributed under the License is distributed on an "AS IS" BASIS,
  29. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  30. See the License for the specific language governing permissions and
  31. limitations under the License.
  32. -->
  33. <xsl:stylesheet version="1.0"
  34. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  35. xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
  36. xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
  37. xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
  38. xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
  39. xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
  40. xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
  41. xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
  42. xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
  43. xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
  44. xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
  45. xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
  46. xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
  47. xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
  48. xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
  49. xmlns:dc="http://purl.org/dc/elements/1.1/"
  50. xmlns:xlink="http://www.w3.org/1999/xlink"
  51. xmlns:math="http://www.w3.org/1998/Math/MathML"
  52. xmlns:xforms="http://www.w3.org/2002/xforms"
  53. xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
  54. xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
  55. xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
  56. xmlns:ooo="http://openoffice.org/2004/office"
  57. xmlns:ooow="http://openoffice.org/2004/writer"
  58. xmlns:oooc="http://openoffice.org/2004/calc"
  59. xmlns:int="http://catcode.com/odf_to_xhtml/internal"
  60. xmlns="http://www.w3.org/1999/xhtml"
  61. exclude-result-prefixes="office meta config text table draw presentation
  62. dr3d chart form script style number anim dc xlink math xforms fo
  63. svg smil ooo ooow oooc int #default"
  64. >
  65. <xsl:output
  66. method="xml"
  67. indent="yes"
  68. omit-xml-declaration="yes"
  69. doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  70. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  71. encoding="UTF-8"
  72. />
  73. <xsl:variable name="lineBreak"><xsl:text>
  74. </xsl:text></xsl:variable>
  75. <xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
  76. <xsl:template match="/office:document-content">
  77. <html xmlns="http://www.w3.org/1999/xhtml">
  78. <head>
  79. <title>Converted by odt_to_xhtml.xsl</title>
  80. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  81. <xsl:apply-templates select="office:automatic-styles"/>
  82. </head>
  83. <body>
  84. <xsl:apply-templates select="office:body/office:text"/>
  85. </body>
  86. </html>
  87. </xsl:template>
  88. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  89. <!--
  90. This section of the transformation handles styles in the
  91. content.xml file
  92. -->
  93. <xsl:template match="office:automatic-styles">
  94. <style type="text/css">
  95. <xsl:apply-templates/>
  96. </style>
  97. </xsl:template>
  98. <xsl:template match="style:style">
  99. <xsl:choose>
  100. <xsl:when test="@style:family='table'">
  101. <xsl:call-template name="process-table-style"/>
  102. </xsl:when>
  103. <xsl:when test="@style:family='table-column'">
  104. <xsl:call-template name="process-table-column-style"/>
  105. </xsl:when>
  106. <xsl:when test="@style:family='table-cell'">
  107. <xsl:call-template name="process-table-cell-style"/>
  108. </xsl:when>
  109. <xsl:when test="@style:family='paragraph'">
  110. <xsl:call-template name="process-paragraph-style"/>
  111. </xsl:when>
  112. <xsl:when test="@style:family='text'">
  113. <xsl:call-template name="process-text-style"/>
  114. </xsl:when>
  115. </xsl:choose>
  116. </xsl:template>
  117. <xsl:template name="process-table-style">
  118. <xsl:if test="style:table-properties">
  119. <xsl:value-of select="$lineBreak"/>
  120. <xsl:text>.</xsl:text>
  121. <xsl:value-of select="translate(@style:name,'.','_')"/>
  122. <xsl:text>{width: </xsl:text>
  123. <xsl:value-of select="style:table-properties/
  124. @style:width"/>
  125. <xsl:text>}</xsl:text>
  126. <xsl:value-of select="$lineBreak"/>
  127. </xsl:if>
  128. </xsl:template>
  129. <xsl:template name="process-table-column-style">
  130. <xsl:if test="style:table-column-properties">
  131. <xsl:value-of select="$lineBreak"/>
  132. <xsl:text>.</xsl:text>
  133. <xsl:value-of select="translate(@style:name,'.','_')"/>
  134. <xsl:text>{width: </xsl:text>
  135. <xsl:value-of select="style:table-column-properties/
  136. @style:column-width"/><xsl:text>;</xsl:text>
  137. <xsl:value-of select="$lineBreak"/>
  138. <xsl:call-template name="handle-style-properties">
  139. <xsl:with-param name="nodeSet"
  140. select="style:table-properties"/>
  141. </xsl:call-template>
  142. <xsl:text>}</xsl:text>
  143. <xsl:value-of select="$lineBreak"/>
  144. </xsl:if>
  145. </xsl:template>
  146. <xsl:template name="process-table-cell-style">
  147. <xsl:if test="style:table-cell-properties">
  148. <xsl:value-of select="$lineBreak"/>
  149. <xsl:text>.</xsl:text>
  150. <xsl:value-of select="translate(@style:name,'.','_')"/>
  151. <xsl:text>{</xsl:text><xsl:value-of select="$lineBreak"/>
  152. <xsl:call-template name="handle-style-properties">
  153. <xsl:with-param name="nodeSet"
  154. select="style:table-cell-properties"/>
  155. </xsl:call-template>
  156. <xsl:text>}</xsl:text><xsl:value-of select="$lineBreak"/>
  157. </xsl:if>
  158. </xsl:template>
  159. <xsl:template name="process-paragraph-style">
  160. <xsl:if test="style:paragraph-properties">
  161. <xsl:value-of select="$lineBreak"/>
  162. <xsl:text>.</xsl:text>
  163. <xsl:value-of select="translate(@style:name,'.','_')"/>
  164. <xsl:text>{</xsl:text><xsl:value-of select="$lineBreak"/>
  165. <xsl:call-template name="handle-style-properties">
  166. <xsl:with-param name="nodeSet"
  167. select="style:paragraph-properties"/>
  168. </xsl:call-template>
  169. <xsl:text>}</xsl:text><xsl:value-of select="$lineBreak"/>
  170. </xsl:if>
  171. </xsl:template>
  172. <xsl:template name="process-text-style">
  173. <xsl:if test="style:text-properties">
  174. <xsl:value-of select="$lineBreak"/>
  175. <xsl:text>.</xsl:text>
  176. <xsl:value-of select="translate(@style:name,'.','_')"/>
  177. <xsl:text>{</xsl:text><xsl:value-of select="$lineBreak"/>
  178. <xsl:call-template name="handle-style-properties">
  179. <xsl:with-param name="nodeSet"
  180. select="style:text-properties"/>
  181. </xsl:call-template>
  182. <xsl:text>}</xsl:text><xsl:value-of select="$lineBreak"/>
  183. </xsl:if>
  184. </xsl:template>
  185. <xsl:template name="handle-style-properties">
  186. <xsl:param name="nodeSet"/>
  187. <xsl:for-each select="$nodeSet/@*">
  188. <xsl:variable name="this" select="."/>
  189. <xsl:variable name="find" select="document('')/xsl:stylesheet/
  190. int:attr-map/int:attr[@name=name($this)]"/>
  191. <xsl:if test="$find">
  192. <xsl:variable name="action" select="$find/@action"/>
  193. <xsl:choose>
  194. <xsl:when test="$action='pass-through'">
  195. <xsl:call-template name="pass-through"/>
  196. </xsl:when>
  197. <xsl:when test="$action='check-align'">
  198. <xsl:call-template name="check-align"/>
  199. </xsl:when>
  200. </xsl:choose>
  201. </xsl:if>
  202. </xsl:for-each>
  203. </xsl:template>
  204. <xsl:template name="pass-through">
  205. <xsl:value-of select="local-name()"/><xsl:text>: </xsl:text>
  206. <xsl:value-of select="."/><xsl:text>;</xsl:text>
  207. <xsl:value-of select="$lineBreak"/>
  208. </xsl:template>
  209. <xsl:template name="check-align">
  210. <xsl:value-of select="local-name()"/><xsl:text>: </xsl:text>
  211. <xsl:choose>
  212. <xsl:when test=".='start'"><xsl:text>left</xsl:text></xsl:when>
  213. <xsl:when test=".='end'"><xsl:text>right</xsl:text></xsl:when>
  214. <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
  215. </xsl:choose>
  216. <xsl:text>;</xsl:text>
  217. <xsl:value-of select="$lineBreak"/>
  218. </xsl:template>
  219. <xsl:template match="text:list-level-style-bullet">
  220. <xsl:text>.</xsl:text>
  221. <xsl:value-of select="../@style:name"/>
  222. <xsl:text>_</xsl:text>
  223. <xsl:value-of select="@text:level"/>
  224. <xsl:text>{ list-style-type: </xsl:text>
  225. <xsl:choose>
  226. <xsl:when test="@text:level mod 3 = 1">disc</xsl:when>
  227. <xsl:when test="@text:level mod 3 = 2">circle</xsl:when>
  228. <xsl:when test="@text:level mod 3 = 0">square</xsl:when>
  229. <xsl:otherwise>decimal</xsl:otherwise>
  230. </xsl:choose>
  231. <xsl:text>;}</xsl:text>
  232. <xsl:value-of select="$lineBreak"/>
  233. </xsl:template>
  234. <xsl:template match="text:list-level-style-number">
  235. <xsl:text>.</xsl:text>
  236. <xsl:value-of select="../@style:name"/>
  237. <xsl:text>_</xsl:text>
  238. <xsl:value-of select="@text:level"/>
  239. <xsl:text>{ list-style-type: </xsl:text>
  240. <xsl:choose>
  241. <xsl:when test="@style:num-format='1'">decimal</xsl:when>
  242. <xsl:when test="@style:num-format='I'">upper-roman</xsl:when>
  243. <xsl:when test="@style:num-format='i'">lower-roman</xsl:when>
  244. <xsl:when test="@style:num-format='A'">upper-alpha</xsl:when>
  245. <xsl:when test="@style:num-format='a'">lower-alpha</xsl:when>
  246. <xsl:otherwise>decimal</xsl:otherwise>
  247. </xsl:choose>
  248. <xsl:text>;}</xsl:text>
  249. <xsl:value-of select="$lineBreak"/>
  250. </xsl:template>
  251. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  252. <!--
  253. This section of the transformation handles the true content
  254. elements in the content.xml file
  255. -->
  256. <!--
  257. Yes, paragraphs in ODT really produce a <div> in XHTML,
  258. because an ODT paragraph has no extra line spacing.
  259. -->
  260. <xsl:template match="text:p">
  261. <div class="{translate(@text:style-name,'.','_')}">
  262. <xsl:apply-templates/>
  263. <xsl:if test="count(node())=0"><br /></xsl:if>
  264. </div>
  265. </xsl:template>
  266. <xsl:template match="text:span">
  267. <span class="{translate(@text:style-name,'.','_')}">
  268. <xsl:apply-templates/>
  269. </span>
  270. </xsl:template>
  271. <xsl:template match="text:h">
  272. <!-- Heading levels go only to 6 in XHTML -->
  273. <xsl:variable name="level">
  274. <xsl:choose>
  275. <xsl:when test="@text:outline-level &gt; 6">6</xsl:when>
  276. <xsl:otherwise>
  277. <xsl:value-of select="@text:outline-level"/>
  278. </xsl:otherwise>
  279. </xsl:choose>
  280. </xsl:variable>
  281. <xsl:element name="{concat('h', $level)}">
  282. <xsl:attribute name="class">
  283. <xsl:value-of
  284. select="translate(@text:style-name,'.','_')"/>
  285. </xsl:attribute>
  286. <xsl:apply-templates/>
  287. </xsl:element>
  288. </xsl:template>
  289. <!--
  290. When processing a list, you have to look at the parent style
  291. *and* level of nesting
  292. -->
  293. <xsl:template match="text:list">
  294. <xsl:variable name="level" select="count(ancestor::text:list)+1"/>
  295. <!-- the list class is the @text:style-name of the outermost
  296. <text:list> element -->
  297. <xsl:variable name="listClass">
  298. <xsl:choose>
  299. <xsl:when test="$level=1">
  300. <xsl:value-of select="@text:style-name"/>
  301. </xsl:when>
  302. <xsl:otherwise>
  303. <xsl:value-of select="
  304. ancestor::text:list[last()]/@text:style-name"/>
  305. </xsl:otherwise>
  306. </xsl:choose>
  307. </xsl:variable>
  308. <!-- Now select the <text:list-level-style-foo> element at this
  309. level of nesting for this list -->
  310. <xsl:variable name="node" select="key('listTypes',
  311. $listClass)/*[@text:level='$level']"/>
  312. <!-- emit appropriate list type -->
  313. <xsl:choose>
  314. <xsl:when test="local-name($node)='list-level-style-number'">
  315. <ol class="{concat($listClass,'_',$level)}">
  316. <xsl:apply-templates/>
  317. </ol>
  318. </xsl:when>
  319. <xsl:otherwise>
  320. <ul class="{concat($listClass,'_',$level)}">
  321. <xsl:apply-templates/>
  322. </ul>
  323. </xsl:otherwise>
  324. </xsl:choose>
  325. </xsl:template>
  326. <xsl:template match="text:list-item">
  327. <li><xsl:apply-templates/></li>
  328. </xsl:template>
  329. <xsl:template match="table:table">
  330. <table class="{@table:style-name}">
  331. <colgroup>
  332. <xsl:apply-templates select="table:table-column"/>
  333. </colgroup>
  334. <xsl:if test="table:table-header-rows/table:table-row">
  335. <thead>
  336. <xsl:apply-templates
  337. select="table:table-header-rows/table:table-row"/>
  338. </thead>
  339. </xsl:if>
  340. <tbody>
  341. <xsl:apply-templates select="table:table-row"/>
  342. </tbody>
  343. </table>
  344. </xsl:template>
  345. <xsl:template match="table:table-column">
  346. <col>
  347. <xsl:if test="@table:number-columns-repeated">
  348. <xsl:attribute name="span">
  349. <xsl:value-of select="@table:number-columns-repeated"/>
  350. </xsl:attribute>
  351. </xsl:if>
  352. <xsl:if test="@table:style-name">
  353. <xsl:attribute name="class">
  354. <xsl:value-of select="translate(@table:style-name,'.','_')"/>
  355. </xsl:attribute>
  356. </xsl:if>
  357. </col>
  358. </xsl:template>
  359. <xsl:template match="table:table-row">
  360. <tr>
  361. <xsl:apply-templates select="table:table-cell"/>
  362. </tr>
  363. </xsl:template>
  364. <xsl:template match="table:table-cell">
  365. <xsl:variable name="n">
  366. <xsl:choose>
  367. <xsl:when test="@table:number-columns-repeated != 0">
  368. <xsl:value-of select="@table:number-columns-repeated"/>
  369. </xsl:when>
  370. <xsl:otherwise>1</xsl:otherwise>
  371. </xsl:choose>
  372. </xsl:variable>
  373. <xsl:call-template name="process-table-cell">
  374. <xsl:with-param name="n" select="$n"/>
  375. </xsl:call-template>
  376. </xsl:template>
  377. <xsl:template name="process-table-cell">
  378. <xsl:param name="n"/>
  379. <xsl:if test="$n != 0">
  380. <td>
  381. <xsl:if test="@table:style-name">
  382. <xsl:attribute name="class">
  383. <xsl:value-of select="translate(@table:style-name,
  384. '.','_')"/>
  385. </xsl:attribute>
  386. </xsl:if>
  387. <xsl:if test="@table:number-columns-spanned">
  388. <xsl:attribute name="colspan">
  389. <xsl:value-of select="@table:number-columns-spanned"/>
  390. </xsl:attribute>
  391. </xsl:if>
  392. <xsl:if test="@table:number-rows-spanned">
  393. <xsl:attribute name="rowspan">
  394. <xsl:value-of select="@table:number-rows-spanned"/>
  395. </xsl:attribute>
  396. </xsl:if>
  397. <xsl:apply-templates/>
  398. </td>
  399. <xsl:call-template name="process-table-cell">
  400. <xsl:with-param name="n" select="$n - 1"/>
  401. </xsl:call-template>
  402. </xsl:if>
  403. </xsl:template>
  404. <xsl:template match="text:tab">
  405. <xsl:text xml:space="preserve"> </xsl:text>
  406. </xsl:template>
  407. <xsl:template match="text:line-break">
  408. <br />
  409. </xsl:template>
  410. <xsl:variable name="spaces"
  411. xml:space="preserve"> </xsl:variable>
  412. <xsl:template match="text:s">
  413. <xsl:choose>
  414. <xsl:when test="@text:c">
  415. <xsl:call-template name="insert-spaces">
  416. <xsl:with-param name="n" select="@text:c"/>
  417. </xsl:call-template>
  418. </xsl:when>
  419. <xsl:otherwise>
  420. <xsl:text> </xsl:text>
  421. </xsl:otherwise>
  422. </xsl:choose>
  423. </xsl:template>
  424. <xsl:template name="insert-spaces">
  425. <xsl:param name="n"/>
  426. <xsl:choose>
  427. <xsl:when test="$n &lt;= 30">
  428. <xsl:value-of select="substring($spaces, 1, $n)"/>
  429. </xsl:when>
  430. <xsl:otherwise>
  431. <xsl:value-of select="$spaces"/>
  432. <xsl:call-template name="insert-spaces">
  433. <xsl:with-param name="n">
  434. <xsl:value-of select="$n - 30"/>
  435. </xsl:with-param>
  436. </xsl:call-template>
  437. </xsl:otherwise>
  438. </xsl:choose>
  439. </xsl:template>
  440. <xsl:template match="text:a">
  441. <a href="{@xlink:href}"><xsl:apply-templates/></a>
  442. </xsl:template>
  443. <!--
  444. <text:bookmark-start /> and <text:bookmark-end /> can
  445. be on non-wellformed boundaries. The quickest solution is
  446. to create an <a name=""></a> element.
  447. If you don't put in any content, it becomes an empty element,
  448. which will confuse browsers. While we would love to insert
  449. a zero-width non-breaking space (Unicode 0x200b), Internet
  450. Explorer doesn't recognize it. Hence this ugly hack:
  451. -->
  452. <xsl:template match="text:bookmark-start|text:bookmark">
  453. <a name="{@text:name}"><span style="font-size: 0px"><xsl:text> </xsl:text></span></a>
  454. </xsl:template>
  455. <!--
  456. This template is too dangerous to leave active...
  457. <xsl:template match="text()">
  458. <xsl:if test="normalize-space(.) !=''">
  459. <xsl:value-of select="normalize-space(.)"/>
  460. </xsl:if>
  461. </xsl:template>
  462. -->
  463. <!--
  464. This is a list of fo: attributes to be transferred to the
  465. output document. The action tells which template is to be
  466. called to process the attribute.
  467. -->
  468. <int:attr-map>
  469. <int:attr name="fo:border-left" action="pass-through"/>
  470. <int:attr name="fo:border-right" action="pass-through"/>
  471. <int:attr name="fo:border-top" action="pass-through"/>
  472. <int:attr name="fo:border-bottom" action="pass-through"/>
  473. <int:attr name="fo:border" action="pass-through"/>
  474. <int:attr name="fo:margin-left" action="pass-through"/>
  475. <int:attr name="fo:margin-right" action="pass-through"/>
  476. <int:attr name="fo:margin-top" action="pass-through"/>
  477. <int:attr name="fo:margin-bottom" action="pass-through"/>
  478. <int:attr name="fo:margin" action="pass-through"/>
  479. <int:attr name="fo:padding-left" action="pass-through"/>
  480. <int:attr name="fo:padding-right" action="pass-through"/>
  481. <int:attr name="fo:padding-top" action="pass-through"/>
  482. <int:attr name="fo:padding-bottom" action="pass-through"/>
  483. <int:attr name="fo:padding" action="pass-through"/>
  484. <int:attr name="fo:text-indent" action="pass-through"/>
  485. <int:attr name="fo:font-variant" action="pass-through"/>
  486. <int:attr name="fo:font-family" action="pass-through"/>
  487. <int:attr name="fo:color" action="pass-through"/>
  488. <int:attr name="fo:background-color" action="pass-through"/>
  489. <int:attr name="fo:font-style" action="pass-through"/>
  490. <int:attr name="fo:font-weight" action="pass-through"/>
  491. <int:attr name="fo:line-height" action="pass-through"/>
  492. <int:attr name="fo:text-align" action="check-align"/>
  493. </int:attr-map>
  494. </xsl:stylesheet>