summaryrefslogtreecommitdiff
path: root/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl')
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl23
1 files changed, 23 insertions, 0 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
index e872d58dbdad..b320f9c22979 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
@@ -132,6 +132,7 @@
<xsl:if test="$debugEnabled">
<xsl:call-template name="debug-check-parameter" />
</xsl:if>
+ <xsl:message>XSL Vendor: '<xsl:value-of select="system-property('xsl:vendor')"/>'</xsl:message>
<!-- gathers style properties and
returns them as globalData parameter to the 'start-main' template -->
<xsl:call-template name="collect-global-odf-properties" />
@@ -144,16 +145,38 @@
<xsl:template name="start-main">
<xsl:param name="globalData" />
+ <!-- disable style collection debug
+ <xsl:call-template name="write-collected-styles">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:call-template> -->
+
+ <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:text>&#xa;</xsl:text>
<xsl:element name="html">
+
+ <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
+ <xsl:text>&#xa;</xsl:text>
<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:text>&#xa;</xsl:text>
<xsl:call-template name='create-header'>
<xsl:with-param name="globalData" select="$globalData" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
<xsl:call-template name='create-body'>
<xsl:with-param name="globalData" select="$globalData" />
</xsl:call-template>
+ <xsl:text>&#xa;</xsl:text>
</xsl:element>
+ <xsl:text>&#xa;</xsl:text>
</xsl:template>