You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by cd...@apache.org on 2006/04/26 17:49:12 UTC
svn commit: r397225 -
/lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Author: cdupoirieux
Date: Wed Apr 26 08:49:10 2006
New Revision: 397225
URL: http://svn.apache.org/viewcvs?rev=397225&view=rev
Log:
FOR-872 - RollBack of the patch in order to take into account Thorsten remarks.
Waiting for a new patch Clay...
Modified:
lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Modified: lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl?rev=397225&r1=397224&r2=397225&view=diff
==============================================================================
--- lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl (original)
+++ lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl Wed Apr 26 08:49:10 2006
@@ -49,8 +49,6 @@
dr3d chart form script style number anim dc xlink math xforms fo
svg smil ooo ooow oooc int #default"
>
-<!-- FIXME Grab file name (to be used in case there's no ODT //dc:title/ or //h1[1]) -->
-<xsl:variable name="filename">Client Name</xsl:variable>
<xsl:output
method="xml"
@@ -65,33 +63,15 @@
<xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
-<xsl:template match="/">
+<xsl:template match="/office:document-content">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>
- <xsl:choose>
- <!-- if no title element or h1 elements, display $filename -->
- <xsl:when test="(/office:document-meta/office:meta/dc:title = '' or
- not(office:document-meta/office:meta/dc:title)) and
- office:document-content/office:body/office:text/text:h[1] = ''">
- <xsl:value-of select="$filename"/>
- </xsl:when>
- <!-- if no title element, display 1st h1 -->
- <xsl:when test="not(/office:document-meta/office:meta/dc:title) and
- office:document-content/office:body/office:text/text:h[1] != ''">
- <xsl:value-of select="office:document-content/office:body/office:text/text:h[1]"/>
- </xsl:when>
- <!-- display title element from ODT File:Properties -->
- <xsl:otherwise>
- <xsl:value-of select="/office:document-meta/office:meta/dc:title"/>
- </xsl:otherwise>
- </xsl:choose>
-</title>
+<title>Converted by odt_to_xhtml.xsl</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<xsl:apply-templates select="office:document-content/office:automatic-styles"/>
+<xsl:apply-templates select="office:automatic-styles"/>
</head>
<body>
-<xsl:apply-templates select="office:document-content/office:body/office:text"/>
+<xsl:apply-templates select="office:body/office:text"/>
</body>
</html>
</xsl:template>
@@ -101,9 +81,9 @@
This section of the transformation handles styles in the
content.xml file
-->
-<xsl:template match="office:document-content/office:automatic-styles">
+<xsl:template match="office:automatic-styles">
<style type="text/css">
- <xsl:apply-templates/>
+ <xsl:apply-templates/>
</style>
</xsl:template>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org