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 09:46:22 UTC
svn commit: r397134 -
/lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Author: cdupoirieux
Date: Wed Apr 26 00:46:19 2006
New Revision: 397134
URL: http://svn.apache.org/viewcvs?rev=397134&view=rev
Log:
FOR-872 - Patch odt_plugin.diff, Thanks to Clay Leeds.
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=397134&r1=397133&r2=397134&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 00:46:19 2006
@@ -49,6 +49,8 @@
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"
@@ -63,15 +65,33 @@
<xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
-<xsl:template match="/office:document-content">
+<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>Converted by odt_to_xhtml.xsl</title>
+<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>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<xsl:apply-templates select="office:automatic-styles"/>
+<xsl:apply-templates select="office:document-content/office:automatic-styles"/>
</head>
<body>
-<xsl:apply-templates select="office:body/office:text"/>
+<xsl:apply-templates select="office:document-content/office:body/office:text"/>
</body>
</html>
</xsl:template>
@@ -81,9 +101,9 @@
This section of the transformation handles styles in the
content.xml file
-->
-<xsl:template match="office:automatic-styles">
+<xsl:template match="office:document-content/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
Re: svn commit: r397134 - /lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Posted by Michael Wechner <mi...@wyona.com>.
Hi Cyriaque
welcome to Lenya :-)
Michi
cdupoirieux@apache.org wrote:
> Author: cdupoirieux
> Date: Wed Apr 26 00:46:19 2006
> New Revision: 397134
>
> URL: http://svn.apache.org/viewcvs?rev=397134&view=rev
> Log:
> FOR-872 - Patch odt_plugin.diff, Thanks to Clay Leeds.
>
> 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=397134&r1=397133&r2=397134&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 00:46:19 2006
> @@ -49,6 +49,8 @@
> 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"
> @@ -63,15 +65,33 @@
>
> <xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
>
> -<xsl:template match="/office:document-content">
> +<xsl:template match="/">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> -<title>Converted by odt_to_xhtml.xsl</title>
> +<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>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
> -<xsl:apply-templates select="office:automatic-styles"/>
> +<xsl:apply-templates select="office:document-content/office:automatic-styles"/>
> </head>
> <body>
> -<xsl:apply-templates select="office:body/office:text"/>
> +<xsl:apply-templates select="office:document-content/office:body/office:text"/>
> </body>
> </html>
> </xsl:template>
> @@ -81,9 +101,9 @@
> This section of the transformation handles styles in the
> content.xml file
> -->
> -<xsl:template match="office:automatic-styles">
> +<xsl:template match="office:document-content/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
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r397134 - /lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> I am -1 on this patch/commit.
>
The issue has been reopened to account for this, has anyone reverted the
patch?
Ross
Re: svn commit: r397134 - /lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> I am -1 on this patch/commit.
>
The issue has been reopened to account for this, has anyone reverted the
patch?
Ross
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r397134 -
/lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Posted by Thorsten Scherler <th...@wyona.com>.
I am -1 on this patch/commit.
It is highly forrest specific and interferes with the lenya way of doing
things.
It is *not* needed to patch the stylesheet! See my comment at
http://issues.apache.org/jira/browse/FOR-872
wdot?
salu2
El mié, 26-04-2006 a las 07:46 +0000, cdupoirieux@apache.org escribió:
> Author: cdupoirieux
> Date: Wed Apr 26 00:46:19 2006
> New Revision: 397134
>
> URL: http://svn.apache.org/viewcvs?rev=397134&view=rev
> Log:
> FOR-872 - Patch odt_plugin.diff, Thanks to Clay Leeds.
>
> 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=397134&r1=397133&r2=397134&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 00:46:19 2006
> @@ -49,6 +49,8 @@
> 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"
> @@ -63,15 +65,33 @@
>
> <xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
>
> -<xsl:template match="/office:document-content">
> +<xsl:template match="/">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> -<title>Converted by odt_to_xhtml.xsl</title>
> +<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>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
> -<xsl:apply-templates select="office:automatic-styles"/>
> +<xsl:apply-templates select="office:document-content/office:automatic-styles"/>
> </head>
> <body>
> -<xsl:apply-templates select="office:body/office:text"/>
> +<xsl:apply-templates select="office:document-content/office:body/office:text"/>
> </body>
> </html>
> </xsl:template>
> @@ -81,9 +101,9 @@
> This section of the transformation handles styles in the
> content.xml file
> -->
> -<xsl:template match="office:automatic-styles">
> +<xsl:template match="office:document-content/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
--
Thorsten Scherler
COO Spain
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
thorsten.scherler@wyona.com thorsten@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r397134 -
/lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
Posted by Thorsten Scherler <th...@wyona.com>.
I am -1 on this patch/commit.
It is highly forrest specific and interferes with the lenya way of doing
things.
It is *not* needed to patch the stylesheet! See my comment at
http://issues.apache.org/jira/browse/FOR-872
wdot?
salu2
El mié, 26-04-2006 a las 07:46 +0000, cdupoirieux@apache.org escribió:
> Author: cdupoirieux
> Date: Wed Apr 26 00:46:19 2006
> New Revision: 397134
>
> URL: http://svn.apache.org/viewcvs?rev=397134&view=rev
> Log:
> FOR-872 - Patch odt_plugin.diff, Thanks to Clay Leeds.
>
> 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=397134&r1=397133&r2=397134&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 00:46:19 2006
> @@ -49,6 +49,8 @@
> 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"
> @@ -63,15 +65,33 @@
>
> <xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
>
> -<xsl:template match="/office:document-content">
> +<xsl:template match="/">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> -<title>Converted by odt_to_xhtml.xsl</title>
> +<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>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
> -<xsl:apply-templates select="office:automatic-styles"/>
> +<xsl:apply-templates select="office:document-content/office:automatic-styles"/>
> </head>
> <body>
> -<xsl:apply-templates select="office:body/office:text"/>
> +<xsl:apply-templates select="office:document-content/office:body/office:text"/>
> </body>
> </html>
> </xsl:template>
> @@ -81,9 +101,9 @@
> This section of the transformation handles styles in the
> content.xml file
> -->
> -<xsl:template match="office:automatic-styles">
> +<xsl:template match="office:document-content/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
--
Thorsten Scherler
COO Spain
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
thorsten.scherler@wyona.com thorsten@apache.org