diff options
author | Svante Schubert <svante.schubert@gmail.com> | 2020-08-10 17:56:12 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-03-02 13:18:46 +0100 |
commit | 36c3db0ab81187830adf2443dd6b9d8efef6faee (patch) | |
tree | ea8e7f016c348b9012c25525e76f2365e36c94a0 /filter | |
parent | bb0940798e29f1bab1419db2863a4a837d331596 (diff) |
Minor XSL updates to improve for the XHTML of our specification
Change-Id: I8a4f82e3e67c1f9f9e7c0b228216036cee22eb71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111605
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xslt/odf2xhtml/export/xhtml/header.xsl | 36 | ||||
-rw-r--r-- | filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl | 1 |
2 files changed, 31 insertions, 6 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl index 522ad4823d63..a4b50816e033 100644 --- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl +++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl @@ -371,11 +371,31 @@ </xsl:if> <!-- keywords about the input source (keywords) --> - <xsl:call-template name="add-meta-tag"> - <xsl:with-param name="meta-name" select="'DCTERMS.subject'" /> - <xsl:with-param name="meta-data" select="normalize-space(concat($globalData/meta-file/*/office:meta/dc:subject,', ',$keywords))" /> - <xsl:with-param name="meta-lang" select="$lang" /> - </xsl:call-template> + <xsl:if test="($globalData/meta-file/*/office:meta/dc:subject != '') or ($keywords != '')"> + <xsl:choose> + <xsl:when test="($globalData/meta-file/*/office:meta/dc:subject != '') and ($keywords != '')"> + <xsl:call-template name="add-meta-tag"> + <xsl:with-param name="meta-name" select="'DCTERMS.subject'" /> + <xsl:with-param name="meta-data" select="normalize-space(concat($globalData/meta-file/*/office:meta/dc:subject,', ',$keywords))" /> + <xsl:with-param name="meta-lang" select="$lang" /> + </xsl:call-template> + </xsl:when> + <xsl:when test="($globalData/meta-file/*/office:meta/dc:subject != '')"> + <xsl:call-template name="add-meta-tag"> + <xsl:with-param name="meta-name" select="'DCTERMS.subject'" /> + <xsl:with-param name="meta-data" select="normalize-space($globalData/meta-file/*/office:meta/dc:subject)" /> + <xsl:with-param name="meta-lang" select="$lang" /> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="add-meta-tag"> + <xsl:with-param name="meta-name" select="'DCTERMS.subject'" /> + <xsl:with-param name="meta-data" select="normalize-space($keywords)" /> + <xsl:with-param name="meta-lang" select="$lang" /> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:if> <!-- detailed description about the input source (description) --> <xsl:call-template name="add-meta-tag"> @@ -401,6 +421,10 @@ <!-- <xsl:with-param name="meta-lang" select="$lang" /> --> </xsl:call-template> </xsl:for-each> + <xsl:call-template name="add-meta-tag"> + <xsl:with-param name="meta-name" select="'xsl:vendor'" /> + <xsl:with-param name="meta-data" select="system-property('xsl:vendor')" /> + </xsl:call-template> <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" hreflang="en" /> <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" hreflang="en" /> @@ -430,7 +454,7 @@ <xsl:param name="meta-enc" /> <xsl:param name="meta-lang" /> - <xsl:if test="$meta-data"> + <xsl:if test="$meta-data and $meta-data != ''"> <xsl:element name="meta"> <xsl:attribute name="name"> <xsl:value-of select="$meta-name" /> diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl index e872d58dbdad..e81b93ce4235 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" /> |