[Libreoffice-commits] core.git: filter/source
Svante Schubert (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 2 12:22:50 UTC 2021
filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 795f89c7d1e4ade6cdaa12cb4ba0857ae3b1e02e
Author: Svante Schubert <svante.schubert at gmail.com>
AuthorDate: Mon Aug 24 17:14:42 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Mar 2 13:22:03 2021 +0100
HTML XSLT: Adding default language for accessiblity
Change-Id: I1e608239bd2524f0d2372871f465d926ea24ba42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111614
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
index e81b93ce4235..196b85eae859 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
@@ -145,7 +145,18 @@
<xsl:template name="start-main">
<xsl:param name="globalData" />
+ <xsl:variable name="lang">
+ <xsl:choose>
+ <xsl:when test="$globalData/meta-file/*/office:meta/dc:language">
+ <xsl:value-of select="$globalData/meta-file/*/office:meta/dc:language" />
+ </xsl:when>
+ <xsl:otherwise>en-US</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:element name="html">
+
+ <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
<xsl:comment>This file was converted to xhtml by LibreOffice - see https://cgit.freedesktop.org/libreoffice/core/tree/filter/source/xslt for the code.</xsl:comment>
<xsl:call-template name='create-header'>
<xsl:with-param name="globalData" select="$globalData" />
More information about the Libreoffice-commits
mailing list