filter/source/xslt/odf2xhtml/export/xhtml/header.xsl | 36 ++++++++++-- filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl | 1 2 files changed, 31 insertions(+), 6 deletions(-)
New commits: commit 36c3db0ab81187830adf2443dd6b9d8efef6faee Author: Svante Schubert <svante.schub...@gmail.com> AuthorDate: Mon Aug 10 17:56:12 2020 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Mar 2 13:18:46 2021 +0100 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.st...@allotropia.de> 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" /> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits