1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3
4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
6  Copyright 2000, 2010 Oracle and/or its affiliates.
7
8  OpenOffice.org - a multi-platform office productivity suite
9
10  This file is part of OpenOffice.org.
11
12  OpenOffice.org is free software: you can redistribute it and/or modify
13  it under the terms of the GNU Lesser General Public License version 3
14  only, as published by the Free Software Foundation.
15
16  OpenOffice.org is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  GNU Lesser General Public License version 3 for more details
20  (a copy is included in the LICENSE file that accompanied this code).
21
22  You should have received a copy of the GNU Lesser General Public License
23  version 3 along with OpenOffice.org.  If not, see
24  <http://www.openoffice.org/license.html>
25  for a copy of the LGPLv3 License.
26
27-->
28<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">
29	<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" encoding="ISO-8859-1"/>
30	<!--doctype-system=[<!ENTITY acirc "">] -->
31	<xsl:strip-space elements="tokens"/>
32	<xsl:template match="office:document">
33		<html>
34			<xsl:apply-templates/>
35		</html>
36	</xsl:template>
37	<xsl:template match="office:document-content">
38		<html>
39			<xsl:apply-templates/>
40		</html>
41	</xsl:template>
42	<xsl:template match="office:automatic-styles">
43		<style type="text/css">p.Table-Heading{font-weight:bold;}<xsl:apply-templates/>
44		</style>
45	</xsl:template>
46	<xsl:template match="office:styles"/>
47	<xsl:template match="office:meta"/>
48	<xsl:template match="office:settings"/>
49	<xsl:template match="style:style">
50		<xsl:if test="@style:family ='paragraph'">p.<xsl:value-of select="@style:name"/>{<xsl:apply-templates/>}</xsl:if>
51		<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>
52			<xsl:apply-templates/>}</xsl:if>
53		<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>
54			<xsl:apply-templates/>}</xsl:if>
55	</xsl:template>
56	<xsl:template match="style:properties">
57		<!--<xsl:param name="style" select="@fo:font-weight"/>-->
58		<xsl:if test="@fo:font-weight">font-weight:<xsl:value-of select="@fo:font-weight"/>;</xsl:if>
59		<xsl:if test="@fo:font-style">font-style:<xsl:value-of select="@fo:font-style"/>;</xsl:if>
60		<xsl:if test="@style:font-name">font-family:<xsl:value-of select="@style:font-name"/>;</xsl:if>
61		<xsl:if test="@fo:font-size">font-size:<xsl:value-of select="@fo:font-size"/>;</xsl:if>
62		<xsl:if test="@style:text-underline='single'">text-decoration:underline;</xsl:if>
63		<xsl:if test="@style:text-crossing-out='single-line'">text-decoration:line-through;</xsl:if>
64		<xsl:if test="@fo:text-align='start'">text-align:left</xsl:if>
65		<xsl:if test="@fo:text-align='center'">text-align:center</xsl:if>
66		<xsl:if test="@fo:text-align='end'">text-align:right</xsl:if>
67		<!--<xsl:value-of select="$style"/>-->
68	</xsl:template>
69	<xsl:template match="office:body">
70		<xsl:apply-templates/>
71	</xsl:template>
72	<xsl:template match="table:table">
73		<table border="1" cellpadding="2" width="100%">
74			<xsl:apply-templates/>
75		</table>
76	</xsl:template>
77	<xsl:template match="table:table-header-rows">
78		<th>
79			<xsl:apply-templates/>
80		</th>
81	</xsl:template>
82	<xsl:template match="table:table-row">
83		<tr>
84			<xsl:apply-templates/>
85		</tr>
86	</xsl:template>
87	<xsl:template match="table:table-cell">
88		<xsl:text disable-output-escaping="yes">&lt;td class="</xsl:text>
89		<xsl:value-of select="@table:style-name"/>
90		<xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
91		<!--<xsl:value-of select="."/>-->
92		<xsl:apply-templates/>
93		<xsl:text disable-output-escaping="yes">&lt;/td&gt;</xsl:text>
94		<!--<td width="20%">
95		<xsl:apply-templates />
96		</td>-->
97	</xsl:template>
98	<xsl:template match="text:p">
99		<xsl:if test="ancestor-or-self::table:table-cell">
100			<xsl:if test=".=''">
101				<br/>
102			</xsl:if>
103		</xsl:if>
104		<xsl:text disable-output-escaping="yes">&lt;p class="</xsl:text>
105		<xsl:choose>
106			<xsl:when test="@text:style-name ='Table Heading'">Table-Heading</xsl:when>
107			<xsl:otherwise>
108				<xsl:value-of select="@text:style-name"/>
109			</xsl:otherwise>
110		</xsl:choose>
111		<xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
112		<xsl:apply-templates/>
113		<xsl:text disable-output-escaping="yes">&lt;/p&gt;</xsl:text>
114		<!--<xsl:value-of select="."/>-->
115		<!--<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>-->
116		<!--<br/>-->
117	</xsl:template>
118</xsl:stylesheet>
119