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

Regina Henschel rb.henschel at t-online.de
Wed Sep 28 23:09:30 PDT 2011


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.
>
>



More information about the LibreOffice mailing list