1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2*1e519d8dSAndrew Rist<!--***********************************************************
3*1e519d8dSAndrew Rist *
4*1e519d8dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
5*1e519d8dSAndrew Rist * or more contributor license agreements.  See the NOTICE file
6*1e519d8dSAndrew Rist * distributed with this work for additional information
7*1e519d8dSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
8*1e519d8dSAndrew Rist * to you under the Apache License, Version 2.0 (the
9*1e519d8dSAndrew Rist * "License"); you may not use this file except in compliance
10*1e519d8dSAndrew Rist * with the License.  You may obtain a copy of the License at
11*1e519d8dSAndrew Rist *
12*1e519d8dSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
13*1e519d8dSAndrew Rist *
14*1e519d8dSAndrew Rist * Unless required by applicable law or agreed to in writing,
15*1e519d8dSAndrew Rist * software distributed under the License is distributed on an
16*1e519d8dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17*1e519d8dSAndrew Rist * KIND, either express or implied.  See the License for the
18*1e519d8dSAndrew Rist * specific language governing permissions and limitations
19*1e519d8dSAndrew Rist * under the License.
20*1e519d8dSAndrew Rist *
21*1e519d8dSAndrew Rist ***********************************************************-->
22cdf0e10cSrcweir
23cdf0e10cSrcweir
24cdf0e10cSrcweir<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">
25cdf0e10cSrcweir	<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" encoding="ISO-8859-1"/>
26cdf0e10cSrcweir	<!--doctype-system=[<!ENTITY acirc "">] -->
27cdf0e10cSrcweir	<xsl:strip-space elements="tokens"/>
28cdf0e10cSrcweir	<xsl:template match="office:document">
29cdf0e10cSrcweir		<html>
30cdf0e10cSrcweir			<xsl:apply-templates/>
31cdf0e10cSrcweir		</html>
32cdf0e10cSrcweir	</xsl:template>
33cdf0e10cSrcweir	<xsl:template match="office:document-content">
34cdf0e10cSrcweir		<html>
35cdf0e10cSrcweir			<xsl:apply-templates/>
36cdf0e10cSrcweir		</html>
37cdf0e10cSrcweir	</xsl:template>
38cdf0e10cSrcweir	<xsl:template match="office:automatic-styles">
39cdf0e10cSrcweir		<style type="text/css">p.Table-Heading{font-weight:bold;}<xsl:apply-templates/>
40cdf0e10cSrcweir		</style>
41cdf0e10cSrcweir	</xsl:template>
42cdf0e10cSrcweir	<xsl:template match="office:styles"/>
43cdf0e10cSrcweir	<xsl:template match="office:meta"/>
44cdf0e10cSrcweir	<xsl:template match="office:settings"/>
45cdf0e10cSrcweir	<xsl:template match="style:style">
46cdf0e10cSrcweir		<xsl:if test="@style:family ='paragraph'">p.<xsl:value-of select="@style:name"/>{<xsl:apply-templates/>}</xsl:if>
47cdf0e10cSrcweir		<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>
48cdf0e10cSrcweir			<xsl:apply-templates/>}</xsl:if>
49cdf0e10cSrcweir		<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>
50cdf0e10cSrcweir			<xsl:apply-templates/>}</xsl:if>
51cdf0e10cSrcweir	</xsl:template>
52cdf0e10cSrcweir	<xsl:template match="style:properties">
53cdf0e10cSrcweir		<!--<xsl:param name="style" select="@fo:font-weight"/>-->
54cdf0e10cSrcweir		<xsl:if test="@fo:font-weight">font-weight:<xsl:value-of select="@fo:font-weight"/>;</xsl:if>
55cdf0e10cSrcweir		<xsl:if test="@fo:font-style">font-style:<xsl:value-of select="@fo:font-style"/>;</xsl:if>
56cdf0e10cSrcweir		<xsl:if test="@style:font-name">font-family:<xsl:value-of select="@style:font-name"/>;</xsl:if>
57cdf0e10cSrcweir		<xsl:if test="@fo:font-size">font-size:<xsl:value-of select="@fo:font-size"/>;</xsl:if>
58cdf0e10cSrcweir		<xsl:if test="@style:text-underline='single'">text-decoration:underline;</xsl:if>
59cdf0e10cSrcweir		<xsl:if test="@style:text-crossing-out='single-line'">text-decoration:line-through;</xsl:if>
60cdf0e10cSrcweir		<xsl:if test="@fo:text-align='start'">text-align:left</xsl:if>
61cdf0e10cSrcweir		<xsl:if test="@fo:text-align='center'">text-align:center</xsl:if>
62cdf0e10cSrcweir		<xsl:if test="@fo:text-align='end'">text-align:right</xsl:if>
63cdf0e10cSrcweir		<!--<xsl:value-of select="$style"/>-->
64cdf0e10cSrcweir	</xsl:template>
65cdf0e10cSrcweir	<xsl:template match="office:body">
66cdf0e10cSrcweir		<xsl:apply-templates/>
67cdf0e10cSrcweir	</xsl:template>
68cdf0e10cSrcweir	<xsl:template match="table:table">
69cdf0e10cSrcweir		<table border="1" cellpadding="2" width="100%">
70cdf0e10cSrcweir			<xsl:apply-templates/>
71cdf0e10cSrcweir		</table>
72cdf0e10cSrcweir	</xsl:template>
73cdf0e10cSrcweir	<xsl:template match="table:table-header-rows">
74cdf0e10cSrcweir		<th>
75cdf0e10cSrcweir			<xsl:apply-templates/>
76cdf0e10cSrcweir		</th>
77cdf0e10cSrcweir	</xsl:template>
78cdf0e10cSrcweir	<xsl:template match="table:table-row">
79cdf0e10cSrcweir		<tr>
80cdf0e10cSrcweir			<xsl:apply-templates/>
81cdf0e10cSrcweir		</tr>
82cdf0e10cSrcweir	</xsl:template>
83cdf0e10cSrcweir	<xsl:template match="table:table-cell">
84cdf0e10cSrcweir		<xsl:text disable-output-escaping="yes">&lt;td class="</xsl:text>
85cdf0e10cSrcweir		<xsl:value-of select="@table:style-name"/>
86cdf0e10cSrcweir		<xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
87cdf0e10cSrcweir		<!--<xsl:value-of select="."/>-->
88cdf0e10cSrcweir		<xsl:apply-templates/>
89cdf0e10cSrcweir		<xsl:text disable-output-escaping="yes">&lt;/td&gt;</xsl:text>
90cdf0e10cSrcweir		<!--<td width="20%">
91cdf0e10cSrcweir		<xsl:apply-templates />
92cdf0e10cSrcweir		</td>-->
93cdf0e10cSrcweir	</xsl:template>
94cdf0e10cSrcweir	<xsl:template match="text:p">
95cdf0e10cSrcweir		<xsl:if test="ancestor-or-self::table:table-cell">
96cdf0e10cSrcweir			<xsl:if test=".=''">
97cdf0e10cSrcweir				<br/>
98cdf0e10cSrcweir			</xsl:if>
99cdf0e10cSrcweir		</xsl:if>
100cdf0e10cSrcweir		<xsl:text disable-output-escaping="yes">&lt;p class="</xsl:text>
101cdf0e10cSrcweir		<xsl:choose>
102cdf0e10cSrcweir			<xsl:when test="@text:style-name ='Table Heading'">Table-Heading</xsl:when>
103cdf0e10cSrcweir			<xsl:otherwise>
104cdf0e10cSrcweir				<xsl:value-of select="@text:style-name"/>
105cdf0e10cSrcweir			</xsl:otherwise>
106cdf0e10cSrcweir		</xsl:choose>
107cdf0e10cSrcweir		<xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
108cdf0e10cSrcweir		<xsl:apply-templates/>
109cdf0e10cSrcweir		<xsl:text disable-output-escaping="yes">&lt;/p&gt;</xsl:text>
110cdf0e10cSrcweir		<!--<xsl:value-of select="."/>-->
111cdf0e10cSrcweir		<!--<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>-->
112cdf0e10cSrcweir		<!--<br/>-->
113cdf0e10cSrcweir	</xsl:template>
114cdf0e10cSrcweir</xsl:stylesheet>
115