summaryrefslogtreecommitdiff
path: root/xmerge/source/htmlsoff
diff options
context:
space:
mode:
Diffstat (limited to 'xmerge/source/htmlsoff')
-rw-r--r--xmerge/source/htmlsoff/converter.xml41
-rw-r--r--xmerge/source/htmlsoff/htmltosoff.xsl165
-rw-r--r--xmerge/source/htmlsoff/package.html56
-rw-r--r--xmerge/source/htmlsoff/sofftohtml.xsl109
4 files changed, 0 insertions, 371 deletions
diff --git a/xmerge/source/htmlsoff/converter.xml b/xmerge/source/htmlsoff/converter.xml
deleted file mode 100644
index 2ed7f25bebc2..000000000000
--- a/xmerge/source/htmlsoff/converter.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<!--<!DOCTYPE converters SYSTEM "converter.dtd">-->
-<converters>
- <converter type="staroffice/sxw" version="1.0">
- <converter-display-name>
- XSLT Transformation
- </converter-display-name>
- <converter-description>
- Converter which performs xslt transformations
- </converter-description>
- <converter-vendor>OpenOffice.org</converter-vendor>
- <converter-class-impl>
- org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl
- </converter-class-impl>
- <converter-xslt-serialize>
- sofftohtml.xsl
- </converter-xslt-serialize>
- <converter-xslt-deserialize>
- htmltosoff.xsl
- </converter-xslt-deserialize>
- <converter-target type="text/html" />
- </converter>
-</converters>
-
diff --git a/xmerge/source/htmlsoff/htmltosoff.xsl b/xmerge/source/htmlsoff/htmltosoff.xsl
deleted file mode 100644
index 0b3bd6d4e816..000000000000
--- a/xmerge/source/htmlsoff/htmltosoff.xsl
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version='1.0' encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:office="http://openoffice.org/2000/office"
- xmlns:style="http://openoffice.org/2000/style"
- xmlns:text="http://openoffice.org/2000/text"
- xmlns:table="http://openoffice.org/2000/table"
- xmlns:draw="http://openoffice.org/2000/drawing"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:number="http://openoffice.org/2000/datastyle"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:chart="http://openoffice.org/2000/chart"
- xmlns:dr3d="http://openoffice.org/2000/dr3d"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:form="http://openoffice.org/2000/form"
- xmlns:script="http://openoffice.org/2000/script"
- >
-<xsl:output method="xml" />
-
-
-<xsl:template match="/">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="html">
-
- <office:document-content xmlns:office="http://openoffice.org/2000/office"
- xmlns:style="http://openoffice.org/2000/style"
- xmlns:text="http://openoffice.org/2000/text"
- xmlns:table="http://openoffice.org/2000/table"
- xmlns:draw="http://openoffice.org/2000/drawing"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:number="http://openoffice.org/2000/datastyle"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:chart="http://openoffice.org/2000/chart"
- xmlns:dr3d="http://openoffice.org/2000/dr3d"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:form="http://openoffice.org/2000/form"
- xmlns:script="http://openoffice.org/2000/script"
- office:class="text" office:version="1.0">
-
-<office:script/>
- <office:font-decls>
- <style:font-decl style:name="Letter Gothic" fo:font-family="&apos;Letter Gothic&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
- <style:font-decl style:name="Arial Unicode MS" fo:font-family="&apos;Arial Unicode MS&apos;" style:font-pitch="variable"/>
- <style:font-decl style:name="HG Mincho Light J" fo:font-family="&apos;HG Mincho Light J&apos;" style:font-pitch="variable"/>
- <style:font-decl style:name="CG Times" fo:font-family="&apos;CG Times&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
- <style:font-decl style:name="Thorndale" fo:font-family="Thorndale" style:font-family-generic="roman" style:font-pitch="variable"/>
- <style:font-decl style:name="Antique Olive" fo:font-family="&apos;Antique Olive&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
- <style:font-decl style:name="Arial Black" fo:font-family="&apos;Arial Black&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
- </office:font-decls>
- <office:automatic-styles>
- <style:style style:name="Table1" style:family="table">
- <style:properties style:width="16.999cm" table:align="margins"/>
- </style:style>
- <style:style style:name="Table1.A" style:family="table-column">
- <style:properties style:column-width="3.399cm" style:rel-column-width="13107*"/>
- </style:style>
- <style:style style:name="Table1.A1" style:family="table-cell">
- <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="none" fo:border-top="0.002cm solid #000000" fo:border-bottom="0.002cm solid #000000"/>
- </style:style>
- <style:style style:name="Table1.E1" style:family="table-cell">
- <style:properties fo:padding="0.097cm" fo:border="0.002cm solid #000000"/>
- </style:style>
- <style:style style:name="Table1.A2" style:family="table-cell">
- <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.002cm solid #000000"/>
- </style:style>
- <style:style style:name="Table1.E2" style:family="table-cell">
- <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="0.002cm solid #000000" fo:border-top="none" fo:border-bottom="0.002cm solid #000000"/>
- </style:style>
- <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
- <style:properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
- </style:style>
- <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table Contents">
- <style:properties style:font-name="Arial Black" fo:font-size="20pt"/>
- </style:style>
- </office:automatic-styles>
-
-
-
-
-
- <office:body>
- <text:sequence-decls>
- <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
- <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
- <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
- <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
- </text:sequence-decls>
-
- <xsl:apply-templates/>
- </office:body>
- </office:document-content>
-
-</xsl:template>
-
-<xsl:template match="body">
- <xsl:apply-templates />
-</xsl:template>
-
-
-
-<xsl:template match="p">
- <xsl:for-each select=".">
- <text:p text:style-name="P1">
- <!--<xsl:value-of select="."/>-->
- <xsl:apply-templates />
- </text:p>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="br">
- <xsl:if test="ancestor::p">
- <xsl:text disable-output-escaping="yes">&lt;/text:p&gt; &lt;text:p text:style-name="P1"&gt;</xsl:text>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="table">
- <xsl:for-each select=".">
- <table:table table:name="Table1" table:style-name="Table1">
- <table:table-column table:style-name="Table1.A" table:number-columns-repeated="5"/>
- <xsl:apply-templates/>
- </table:table>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="tr">
- <xsl:for-each select=".">
- <table:table-row>
- <xsl:apply-templates/>
- </table:table-row>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="td">
- <xsl:for-each select=".">
- <table:table-cell table:style-name="Table1.A1" table:value-type="string">
- <text:p text:style-name="P1">
- <xsl:value-of select="."/>
- </text:p>
- </table:table-cell>
- </xsl:for-each>
-</xsl:template>
-
-
-
-</xsl:stylesheet>
diff --git a/xmerge/source/htmlsoff/package.html b/xmerge/source/htmlsoff/package.html
deleted file mode 100644
index f5c961784b99..000000000000
--- a/xmerge/source/htmlsoff/package.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<HTML>
-<HEAD>
- <TITLE>org.openoffice.xmerge.converter.xml.xslt package</TITLE>
-</HEAD>
-<BODY>
-<P>Provides the tools for doing the conversion of StarWriter XML to
-and from supported formats, through the use of an XSLT
-transformation.</P>
-<P>It follows the {@link org.openoffice.xmerge}
-framework for the conversion process.</P>
-<P>This converter does not currently support merge.</P>
-<P><FONT FACE="Times New Roman, serif"><FONT SIZE=5><B>XSLT
-Transformation</B></FONT></FONT></P>
-<p>The converter makes use
-of one or more XSLT style sheets, which are used in the
-DocumentSerializer and DocumentDeserializer, to perform the actual
-translations. The location of these stylesheets is extracted from the {@link org.openoffice.xmerge.util.registry.ConverterInfo ConverterInfo} data structure, and are specified using the optional converter-xslt-serialize and converter-xsltdeserialize tags in a plugins converter.xml file. Please refer to the SDK document for more information about how to implement a Plugin Configuration XML File for a specific plugin.
-A sample OpenOffice to Html stylesheet and Html to
-Openffice stylesheet, has been provided as a sample implementation.
-The converter also makes use of an XsltPlugin.properties file, which may be edited by the user to provide MIME-TYPE to file extension mappings. This file is used by the {@link org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl getDeviceFileExtension} method.
-</p>
-
-<H2>TODO list</H2>
-
-<p><ol>
-<li>Expand XSLT style sheets to support more office/html
- capabilities</li>
-<li>Add support for certain character codes, such as &amp;nbsp
- which currently causes the transformer to break.</li>
-<li>Change the DocumentDeserializer transformer, so that the DOMResult is serialized using the xalan serializer and create an SxwDocument from the result</li>
-</ol></p>
-
-@see org.openoffice.xmerge.util.registry
-
-</BODY>
-</HTML>
-
-
diff --git a/xmerge/source/htmlsoff/sofftohtml.xsl b/xmerge/source/htmlsoff/sofftohtml.xsl
deleted file mode 100644
index a596bf301e83..000000000000
--- a/xmerge/source/htmlsoff/sofftohtml.xsl
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<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">
- <xsl:output method="xml" omit-xml-declaration="yes" indent="yes" encoding="ISO-8859-1"/>
- <!--doctype-system=[<!ENTITY acirc "">] -->
- <xsl:strip-space elements="tokens"/>
- <xsl:template match="office:document">
- <html>
- <xsl:apply-templates/>
- </html>
- </xsl:template>
- <xsl:template match="office:document-content">
- <html>
- <xsl:apply-templates/>
- </html>
- </xsl:template>
- <xsl:template match="office:automatic-styles">
- <style type="text/css">p.Table-Heading{font-weight:bold;}<xsl:apply-templates/>
- </style>
- </xsl:template>
- <xsl:template match="office:styles"/>
- <xsl:template match="office:meta"/>
- <xsl:template match="office:settings"/>
- <xsl:template match="style:style">
- <xsl:if test="@style:family ='paragraph'">p.<xsl:value-of select="@style:name"/>{<xsl:apply-templates/>}</xsl:if>
- <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>
- <xsl:apply-templates/>}</xsl:if>
- <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>
- <xsl:apply-templates/>}</xsl:if>
- </xsl:template>
- <xsl:template match="style:properties">
- <!--<xsl:param name="style" select="@fo:font-weight"/>-->
- <xsl:if test="@fo:font-weight">font-weight:<xsl:value-of select="@fo:font-weight"/>;</xsl:if>
- <xsl:if test="@fo:font-style">font-style:<xsl:value-of select="@fo:font-style"/>;</xsl:if>
- <xsl:if test="@style:font-name">font-family:<xsl:value-of select="@style:font-name"/>;</xsl:if>
- <xsl:if test="@fo:font-size">font-size:<xsl:value-of select="@fo:font-size"/>;</xsl:if>
- <xsl:if test="@style:text-underline='single'">text-decoration:underline;</xsl:if>
- <xsl:if test="@style:text-crossing-out='single-line'">text-decoration:line-through;</xsl:if>
- <xsl:if test="@fo:text-align='start'">text-align:left</xsl:if>
- <xsl:if test="@fo:text-align='center'">text-align:center</xsl:if>
- <xsl:if test="@fo:text-align='end'">text-align:right</xsl:if>
- <!--<xsl:value-of select="$style"/>-->
- </xsl:template>
- <xsl:template match="office:body">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="table:table">
- <table border="1" cellpadding="2" width="100%">
- <xsl:apply-templates/>
- </table>
- </xsl:template>
- <xsl:template match="table:table-header-rows">
- <th>
- <xsl:apply-templates/>
- </th>
- </xsl:template>
- <xsl:template match="table:table-row">
- <tr>
- <xsl:apply-templates/>
- </tr>
- </xsl:template>
- <xsl:template match="table:table-cell">
- <xsl:text disable-output-escaping="yes">&lt;td class="</xsl:text>
- <xsl:value-of select="@table:style-name"/>
- <xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
- <!--<xsl:value-of select="."/>-->
- <xsl:apply-templates/>
- <xsl:text disable-output-escaping="yes">&lt;/td&gt;</xsl:text>
- <!--<td width="20%">
- <xsl:apply-templates />
- </td>-->
- </xsl:template>
- <xsl:template match="text:p">
- <xsl:if test="ancestor-or-self::table:table-cell">
- <xsl:if test=".=''">
- <br/>
- </xsl:if>
- </xsl:if>
- <xsl:text disable-output-escaping="yes">&lt;p class="</xsl:text>
- <xsl:choose>
- <xsl:when test="@text:style-name ='Table Heading'">Table-Heading</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@text:style-name"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
- <xsl:apply-templates/>
- <xsl:text disable-output-escaping="yes">&lt;/p&gt;</xsl:text>
- <!--<xsl:value-of select="."/>-->
- <!--<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>-->
- <!--<br/>-->
- </xsl:template>
-</xsl:stylesheet>