Hi all,

The patch fixes the following error:
When you export a document via File->Export->XHTML it generates an invalid file, because the lang attribute gets a wrong namespace.

How to proof it:
Export any file and make sure, that the file extension is xhtml. Upload the file to http://validator.w3.org/#validate-by-upload to validate it. Do this with the current version to see the error. Do the same with a patched version, to see that it is OK then.

I do not know, whether this will fix bug fdo#40373; but it fixes, that the currently exported file is invalid, as described above.

Kind regard
Regina
From c94dd2e2f74d9568f48b867dc2da5a9f04121624 Mon Sep 17 00:00:00 2001
From: Regina Henschel <rb.hensc...@t-online.de>
Date: Wed, 28 Sep 2011 15:26:36 +0200
Subject: [PATCH] Generate valid xhtml export by using xml:lang, see also
 fdo#40373

---
 .../source/xslt/odf2xhtml/export/xhtml/header.xsl  |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl 
b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
index 7e83486..dd05f90 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
@@ -319,7 +319,7 @@
 
                <!-- title of document for browser frame title -->
                <xsl:element name="title">
-               <xsl:attribute name="lang" 
namespace="http://www.w3.org/XML/1998/namespace";>
+               <xsl:attribute name="xml:lang">
                        <xsl:value-of select="$lang" />
                </xsl:attribute>
 
@@ -340,7 +340,7 @@
                        <xsl:attribute name="content">
                           <xsl:value-of 
select="$globalData/meta-file/*/office:meta/dc:title" />
                        </xsl:attribute>
-                       <xsl:attribute name="lang" 
namespace="http://www.w3.org/XML/1998/namespace";>
+                       <xsl:attribute name="xml:lang">
                           <xsl:value-of select="$lang" />
                        </xsl:attribute>
                </xsl:element>
@@ -474,7 +474,7 @@
                                </xsl:attribute>
                                </xsl:if>
                                <xsl:if test="$meta-lang">
-                               <xsl:attribute name="lang" 
namespace="http://www.w3.org/XML/1998/namespace";>
+                               <xsl:attribute name="xml:lang">
                                        <xsl:value-of select="$meta-lang" />
                                </xsl:attribute>
                                </xsl:if>
-- 
1.7.5.1

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to