1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" xmlns:
style=
"http://openoffice.org/2000/style" xmlns:
table=
"http://openoffice.org/2000/table" xmlns:
text=
"http://openoffice.org/2000/text" xmlns:
office=
"http://openoffice.org/2000/office" xmlns:
fo=
"http://www.w3.org/1999/XSL/Format">
20 <xsl:output method=
"xml" omit-xml-declaration=
"yes" indent=
"yes" encoding=
"ISO-8859-1"/>
21 <!--doctype-system=[<!ENTITY acirc "">] -->
22 <xsl:strip-space elements=
"tokens"/>
23 <xsl:template match=
"office:document">
25 <xsl:apply-templates/>
28 <xsl:template match=
"office:document-content">
30 <xsl:apply-templates/>
33 <xsl:template match=
"office:automatic-styles">
34 <style type=
"text/css">p.Table-Heading{font-weight:bold;}
<xsl:apply-templates/>
37 <xsl:template match=
"office:styles"/>
38 <xsl:template match=
"office:meta"/>
39 <xsl:template match=
"office:settings"/>
40 <xsl:template match=
"style:style">
41 <xsl:if test=
"@style:family ='paragraph'">p.
<xsl:value-of select=
"@style:name"/>{
<xsl:apply-templates/>}
</xsl:if>
42 <xsl:if test=
"@style:family ='paragraph'">p.
<xsl:value-of select=
"@style:name"/>{
<xsl:if test=
"@style:parent-style-name='Table Heading'">font-weight:bold;font-style:italic;
</xsl:if>
43 <xsl:apply-templates/>}
</xsl:if>
44 <xsl:if test=
"@style:family ='table-cell'">td.
<xsl:value-of select=
"@style:name"/>{
<xsl:if test=
"@style:parent-style-name='Table Heading'">font-weight:bold;font-style:italic;
</xsl:if>
45 <xsl:apply-templates/>}
</xsl:if>
47 <xsl:template match=
"style:properties">
48 <!--<xsl:param name="style" select="@fo:font-weight"/>-->
49 <xsl:if test=
"@fo:font-weight">font-weight:
<xsl:value-of select=
"@fo:font-weight"/>;
</xsl:if>
50 <xsl:if test=
"@fo:font-style">font-style:
<xsl:value-of select=
"@fo:font-style"/>;
</xsl:if>
51 <xsl:if test=
"@style:font-name">font-family:
<xsl:value-of select=
"@style:font-name"/>;
</xsl:if>
52 <xsl:if test=
"@fo:font-size">font-size:
<xsl:value-of select=
"@fo:font-size"/>;
</xsl:if>
53 <xsl:if test=
"@style:text-underline='single'">text-decoration:underline;
</xsl:if>
54 <xsl:if test=
"@style:text-crossing-out='single-line'">text-decoration:line-through;
</xsl:if>
55 <xsl:if test=
"@fo:text-align='start'">text-align:left
</xsl:if>
56 <xsl:if test=
"@fo:text-align='center'">text-align:center
</xsl:if>
57 <xsl:if test=
"@fo:text-align='end'">text-align:right
</xsl:if>
58 <!--<xsl:value-of select="$style"/>-->
60 <xsl:template match=
"office:body">
61 <xsl:apply-templates/>
63 <xsl:template match=
"table:table">
64 <table border=
"1" cellpadding=
"2" width=
"100%">
65 <xsl:apply-templates/>
68 <xsl:template match=
"table:table-header-rows">
70 <xsl:apply-templates/>
73 <xsl:template match=
"table:table-row">
75 <xsl:apply-templates/>
78 <xsl:template match=
"table:table-cell">
79 <xsl:text disable-output-escaping=
"yes"><td
class=
"</xsl:text>
80 <xsl:value-of select="@table:style-name
"/>
81 <xsl:text disable-output-escaping="yes
">"></xsl:text>
82 <!--<xsl:value-of select="."/>-->
83 <xsl:apply-templates/>
84 <xsl:text disable-output-escaping=
"yes"></td
></xsl:text>
86 <xsl:apply-templates />
89 <xsl:template match=
"text:p">
90 <xsl:if test=
"ancestor-or-self::table:table-cell">
95 <xsl:text disable-output-escaping=
"yes"><p
class=
"</xsl:text>
97 <xsl:when test="@text:style-name ='Table Heading'
">Table-Heading</xsl:when>
99 <xsl:value-of select="@text:style-name
"/>
102 <xsl:text disable-output-escaping="yes
">"></xsl:text>
103 <xsl:apply-templates/>
104 <xsl:text disable-output-escaping=
"yes"></p
></xsl:text>
105 <!--<xsl:value-of select="."/>-->
106 <!--<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>-->