Re: [Libreoffice] [PATCH] fdo#40373 - export xhtml parse error

2011-09-29 Thread Regina Henschel

Hi,

this patch is only to fix the wrong namespace. To get a better 
accessibility is a different problem and has to be addressed separate.


Kind regards
Regina

Christophe Strobbe schrieb:

Hi,

At 16:14 28-9-2011, Christophe Strobbe wrote:

Hi Regina,

At 15:50 28-9-2011, Regina Henschel wrote:

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.


Please don't throw away the lang attribute by replacing it with
xml:lang, just add xml:lang. Language information is important for
text-to-speech software, and last time I checked, screen readers only
supported lang, not xml:lang.


Correction: I now notice that the exported format is XHTML 1.1 plus
MathML 2.0 (which does not support the lang attribute), not XHTML 1.0
(where lang was still allowed). From my point of view accessibility is
more important than that little validation issue, so I would still argue
in favour of keeping the lang attribute.




What is really needed to solve the namespace issue is replacing

namespace=http://www.w3.org/XML/1998/namespace;

with

xmlns=http://www.w3.org/1999/xhtml;


Oops, sorry, I was comparing XSLT code with XHTML code.
The XSLT code already outputs xmlns=http://www.w3.org/1999/xhtml;

Best regards,

Christophe



Best regards,
Christophe




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





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


Re: [Libreoffice] [PATCH] fdo#40373 - export xhtml parse error

2011-09-29 Thread Michael Meeks
Hi Regina,

On Wed, 2011-09-28 at 15:50 +0200, Regina Henschel wrote:
 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.

Nice patch to fix it :-) I assume you have commit access to push that ?
[1]

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

Sounds like it fixes the issue to me, if it is a multi-issue bug it
needs splitting up :-)

The a11y issue is annoying, but I'm not sure we should generate bad
output for that, although of course we should accept bad input
gracefully wherever possible.

Thanks,

Michael.

[1] - if not, please can you follow this flow:
http://www.freedesktop.org/wiki/AccountRequests
  and mail me the bug number privately :-]
-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

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


Re: [Libreoffice] [PATCH] fdo#40373 - export xhtml parse error

2011-09-29 Thread Christophe Strobbe

Hi,

At 11:13 29-9-2011, Michael Meeks wrote:

Hi Regina,

On Wed, 2011-09-28 at 15:50 +0200, Regina Henschel wrote:
 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.

Nice patch to fix it :-) I assume you have commit access to 
push that ?

[1]

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

Sounds like it fixes the issue to me, if it is a multi-issue bug it
needs splitting up :-)

The a11y issue is annoying, but I'm not sure we should generate bad
output for that, although of course we should accept bad input
gracefully wherever possible.


OK, I'll work on the other issues (especially accessibility) 
separately, so there are no objections to push this patch.


Best regards,

Christophe





Thanks,

Michael.

[1] - if not, please can you follow this flow:
http://www.freedesktop.org/wiki/AccountRequests
  and mail me the bug number privately :-]
--
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot



--
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/
Twitter: @RabelaisA11y
---
Open source for accessibility: results from the AEGIS project 
www.aegis-project.eu

---
Please don't invite me to Facebook, Quechup or other social 
networks. You may have agreed to their privacy policy, but I haven't.


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


Re: [Libreoffice] [PATCH] fdo#40373 - export xhtml parse error

2011-09-29 Thread Regina Henschel

Hi Michael,

Michael Meeks schrieb:

Hi Regina,

On Wed, 2011-09-28 at 15:50 +0200, Regina Henschel wrote:

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.


Nice patch to fix it :-) I assume you have commit access to push that ?
[1]


No I have not. And I feel uncomfortable with the idea of getting commit 
access. I contribute patches only from time to time; it would bring a 
large overhead to me and likely damage to the repository.


Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] fdo#40373 - export xhtml parse error

2011-09-28 Thread Regina Henschel

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


Re: [Libreoffice] [PATCH] fdo#40373 - export xhtml parse error

2011-09-28 Thread Christophe Strobbe

Hi Regina,

At 15:50 28-9-2011, Regina Henschel wrote:

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.


Please don't throw away the lang attribute by replacing it with 
xml:lang, just add xml:lang. Language information is important for 
text-to-speech software, and last time I checked, screen readers only 
supported lang, not xml:lang.


What is really needed to solve the namespace issue is replacing

namespace=http://www.w3.org/XML/1998/namespace;

with

xmlns=http://www.w3.org/1999/xhtml;

Best regards,
Christophe



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



--
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/
Twitter: @RabelaisA11y
---
Open source for accessibility: results from the AEGIS project 
www.aegis-project.eu

---
Please don't invite me to Facebook, Quechup or other social 
networks. You may have agreed to their privacy policy, but I haven't.


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


Re: [Libreoffice] [PATCH] fdo#40373 - export xhtml parse error

2011-09-28 Thread Christophe Strobbe

Hi,

At 16:14 28-9-2011, Christophe Strobbe wrote:

Hi Regina,

At 15:50 28-9-2011, Regina Henschel wrote:

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.


Please don't throw away the lang attribute by replacing it with 
xml:lang, just add xml:lang. Language information is important for 
text-to-speech software, and last time I checked, screen readers 
only supported lang, not xml:lang.


Correction: I now notice that the exported format is XHTML 1.1 plus 
MathML 2.0 (which does not support the lang attribute), not XHTML 
1.0 (where lang was still allowed). From my point of view 
accessibility is more important than that little validation issue, so 
I would still argue in favour of keeping the lang attribute.





What is really needed to solve the namespace issue is replacing

namespace=http://www.w3.org/XML/1998/namespace;

with

xmlns=http://www.w3.org/1999/xhtml;


Oops, sorry, I was comparing XSLT code with XHTML code.
The XSLT code already outputs xmlns=http://www.w3.org/1999/xhtml;

Best regards,

Christophe



Best regards,
Christophe



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



--
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/
Twitter: @RabelaisA11y
---
Open source for accessibility: results from the AEGIS project 
www.aegis-project.eu

---
Please don't invite me to Facebook, Quechup or other social 
networks. You may have agreed to their privacy policy, but I haven't.


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