Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package suse-xsl-stylesheets for
openSUSE:Factory checked in at 2024-04-04 22:24:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/suse-xsl-stylesheets (Old)
and /work/SRC/openSUSE:Factory/.suse-xsl-stylesheets.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "suse-xsl-stylesheets"
Thu Apr 4 22:24:37 2024 rev:80 rq:1164406 version:2.94.6
Changes:
--------
---
/work/SRC/openSUSE:Factory/suse-xsl-stylesheets/suse-xsl-stylesheets.changes
2024-03-25 21:06:49.138142909 +0100
+++
/work/SRC/openSUSE:Factory/.suse-xsl-stylesheets.new.1905/suse-xsl-stylesheets.changes
2024-04-04 22:25:04.820708153 +0200
@@ -1,0 +2,18 @@
+Wed Mar 27 16:22:57 UTC 2024 - Thomas Schraitle <[email protected]> -
2.94.6
+
+- Update 2.94.6
+ Fix JSON-LD generation for single & chunked HTML (#622)
+
+-------------------------------------------------------------------
+Mon Mar 25 13:29:01 UTC 2024 - Thomas Schraitle <[email protected]> -
2.94.5
+
+- Update 2.94.5
+ Fix #617: Put task and webpage both into "about" (#620)
+
+-------------------------------------------------------------------
+Mon Mar 25 10:47:46 UTC 2024 - Thomas Schraitle <[email protected]> -
2.94.4
+
+- Update 2.94.4
+ Add additional entries for JSON-LD which creates pointers to all enabled
formats (#612)
+
+-------------------------------------------------------------------
Old:
----
suse-xsl-2.94.3.tar.bz2
New:
----
suse-xsl-2.94.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ suse-xsl-stylesheets.spec ++++++
--- /var/tmp/diff_new_pack.MfSjSZ/_old 2024-04-04 22:25:05.388729066 +0200
+++ /var/tmp/diff_new_pack.MfSjSZ/_new 2024-04-04 22:25:05.388729066 +0200
@@ -22,7 +22,7 @@
%define suse_styles_dir %{db_xml_dir}/stylesheet
#
Name: suse-xsl-stylesheets
-Version: 2.94.3
+Version: 2.94.6
Release: 0
Summary: SUSE-Branded Stylesheets for DocBook
License: GPL-2.0-only OR GPL-3.0-only
++++++ suse-xsl-2.94.3.tar.bz2 -> suse-xsl-2.94.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/suse-xsl-2.94.3/ChangeLog
new/suse-xsl-2.94.6/ChangeLog
--- old/suse-xsl-2.94.3/ChangeLog 2024-03-25 07:50:49.000000000 +0100
+++ new/suse-xsl-2.94.6/ChangeLog 2024-03-27 17:20:07.000000000 +0100
@@ -1,4 +1,24 @@
-------------------------------------------------------------------
+Wed Mar 27 16:19:56 UTC 2024 - [email protected]
+
+Update 2.95.6
+- Fix JSON-LD generation for single & chunked HTML (#622)
+- Metadata: Make checking for content more stable (#622)
+ - Check for $content != '' instead of just $content
+ - datePublished checks now ancestor nodes too to avoid distracting
+ warning message
+ - categories for DC Dublin Core
+-------------------------------------------------------------------
+Mon Mar 25 13:25:48 UTC 2024 - [email protected]
+
+Update 2.94.5
+ Fix #617 JSON-LD: and put task and webpage both into "about" property
+-------------------------------------------------------------------
+Mon Mar 25 10:40:29 UTC 2024 - [email protected]
+
+Update 2.94.4
+ - Add additional entries which creates pointers to all enabled formats (#612)
+-------------------------------------------------------------------
Mon Mar 25 06:48:35 UTC 2024 - [email protected]
- Update 2.94.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/suse-xsl-2.94.3/suse2022-ns/xhtml/chunk.xsl
new/suse-xsl-2.94.6/suse2022-ns/xhtml/chunk.xsl
--- old/suse-xsl-2.94.3/suse2022-ns/xhtml/chunk.xsl 2024-03-25
07:50:49.000000000 +0100
+++ new/suse-xsl-2.94.6/suse2022-ns/xhtml/chunk.xsl 2024-03-27
17:20:07.000000000 +0100
@@ -42,23 +42,6 @@
<xsl:template match="/">
<xsl:apply-imports/>
- <xsl:choose>
- <xsl:when test="$dcfilename != ''">
- <xsl:call-template name="generate-json-ld-external">
- <xsl:with-param name="node" select="*[1]" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="log.message">
- <xsl:with-param name="level">WARN</xsl:with-param>
- <xsl:with-param name="context-desc">
- <xsl:text>JSON-LD</xsl:text>
- </xsl:with-param>
- <xsl:with-param name="message">
- <xsl:text>The parameter $dcfilename is unset. Cannot create the
external JSON file.</xsl:text>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:call-template name="handle-json-ld"/>
</xsl:template>
</xsl:stylesheet>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/suse-xsl-2.94.3/suse2022-ns/xhtml/docbook.xsl
new/suse-xsl-2.94.6/suse2022-ns/xhtml/docbook.xsl
--- old/suse-xsl-2.94.3/suse2022-ns/xhtml/docbook.xsl 2024-03-25
07:50:49.000000000 +0100
+++ new/suse-xsl-2.94.6/suse2022-ns/xhtml/docbook.xsl 2024-03-27
17:20:07.000000000 +0100
@@ -700,29 +700,40 @@
</xsl:template>
+ <xsl:template name="handle-json-ld">
+ <xsl:choose>
+ <xsl:when test="$rootid != '' and $dcfilename != ''">
+ <xsl:call-template name="generate-json-ld-external">
+ <xsl:with-param name="node" select="key('id', $rootid)" />
+ <xsl:with-param name="first" select="1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$dcfilename != ''">
+ <xsl:call-template name="generate-json-ld-external">
+ <xsl:with-param name="node" select="*[1]" />
+ <xsl:with-param name="first" select="1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="log.message">
+ <xsl:with-param name="level">WARN</xsl:with-param>
+ <xsl:with-param name="context-desc">
+ <xsl:text>JSON-LD</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="message">
+ <xsl:text>The parameter $dcfilename is unset. Cannot create the
external JSON file.</xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
<!-- ############################################################## -->
<!-- This template is called when creating single HTML -->
<xsl:template match="/">
<xsl:apply-imports/>
<xsl:if test="$is.chunk = 0">
- <xsl:choose>
- <xsl:when test="$dcfilename != ''">
- <xsl:call-template name="generate-json-ld-external">
- <xsl:with-param name="node" select="." />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="log.message">
- <xsl:with-param name="level">WARN</xsl:with-param>
- <xsl:with-param name="context-desc">
- <xsl:text>JSON-LD</xsl:text>
- </xsl:with-param>
- <xsl:with-param name="message">
- <xsl:text>The parameter $dcfilename is unset. Cannot create the
external JSON file.</xsl:text>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:call-template name="handle-json-ld"/>
</xsl:if>
</xsl:template>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/suse-xsl-2.94.3/suse2022-ns/xhtml/json-ld.xsl
new/suse-xsl-2.94.6/suse2022-ns/xhtml/json-ld.xsl
--- old/suse-xsl-2.94.3/suse2022-ns/xhtml/json-ld.xsl 2024-03-25
07:50:49.000000000 +0100
+++ new/suse-xsl-2.94.6/suse2022-ns/xhtml/json-ld.xsl 2024-03-27
17:20:07.000000000 +0100
@@ -115,7 +115,7 @@
<xsl:variable name="stitchxml" select="document($stitchfile)/*"/>
<xsl:key name="docserv-dcfiles" match="dc" use="."/>
-
+ <xsl:key name="docserv-dcsubdelivfiles" match="subdeliverable"
use="concat('DC-', .)"/>
<xsl:template name="sanitize-date">
<xsl:param name="date" select="."/>
@@ -204,9 +204,11 @@
</xsl:choose>
</xsl:template>
+
<!-- ========================================================== -->
<xsl:template name="generate-json-ld-external">
<xsl:param name="node" select="."/>
+ <xsl:param name="first" select="0" />
<xsl:variable name="base">
<xsl:call-template name="get-basename">
<xsl:with-param name="node" select="$node"/>
@@ -235,7 +237,7 @@
</xsl:call-template>
</xsl:variable>
- <xsl:if test="$generate.json-ld.external != 0">
+ <xsl:if test="$generate.json-ld.external != 0 and $first = 1">
<xsl:variable name="lang">
<xsl:call-template name="l10n.language"/>
</xsl:variable>
@@ -314,13 +316,16 @@
<xsl:call-template name="json-ld-category">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
- <xsl:call-template name="json-ld-task">
+ <xsl:call-template name="json-ld-about"><!-- both task & webpages
integrated into "about" property -->
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
<!-- Belongs to type "SoftwareApplication" -->
<xsl:call-template name="json-ld-software">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
+ <xsl:call-template name="json-ld-releasenotes">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
<!-- This is the last entry. Don't add further additions due to the
trailing comma missing.
@@ -357,8 +362,27 @@
<xsl:template name="json-ld-headline">
<xsl:param name="node" select="."/>
- <xsl:variable name="headline"
- select="normalize-space(($node/d:info/d:meta[@name='title'] |
$node/d:info/d:title | $node/d:title)[last()])"/>
+ <xsl:variable name="candidate-headline">
+ <xsl:choose>
+ <xsl:when test="$node/d:info/d:meta[@name='title']">
+ <xsl:value-of select="$node/d:info/d:meta[@name='title']"/>
+ </xsl:when>
+ <xsl:when test="$node/d:info/d:title">
+ <xsl:value-of select="$node/d:info/d:title"/>
+ </xsl:when>
+ <xsl:when test="$node/d:title">
+ <xsl:value-of select="$node/d:title"/>
+ </xsl:when>
+ <!--<xsl:when
test="$node/ancestor-or-self::*/d:info/d:meta[@name='title']">
+ <xsl:value-of
select="($node/ancestor-or-self::*/d:info/d:meta[@name='title'])[last()]"/>
+ </xsl:when>-->
+ <!--<xsl:when test="$node/ancestor-or-self::*/d:info/d:title">
+ <xsl:value-of
select="($node/ancestor-or-self::*/d:info/d:title)[last()]"/>
+ </xsl:when>-->
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="headline"
select="normalize-space($candidate-headline)"/>
+
"headline": "<xsl:value-of select="translate($headline, '"', '')"/>",
</xsl:template>
@@ -580,6 +604,13 @@
<xsl:when test="normalize-space($node/d:info/d:date) != ''">
<xsl:value-of select="normalize-space(string($node/d:info/d:date))"/>
</xsl:when>
+ <!-- Try to find a date from the ancestor nodes -->
+ <xsl:when
test="$node/ancestor-or-self::*/d:info/d:meta[@name='published']">
+ <xsl:value-of
select="normalize-space(string($node/ancestor-or-self::*/d:info/d:meta[@name='published']))"/>
+ </xsl:when>
+ <xsl:when
test="$node/ancestor-or-self::*/d:info/d:revhistory/d:revision[1]/d:date">
+ <xsl:value-of
select="normalize-space(string($node/ancestor-or-self::*/d:info/d:revhistory/d:revision[1]/d:date))"/>
+ </xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="date">
@@ -712,9 +743,11 @@
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="docserv-dcfile"
+ select="(key('docserv-dcfiles', $dcfile) |
key('docserv-dcsubdelivfiles', $dcfile))[1]"/>
<xsl:variable name="candidate-productid">
<xsl:for-each select="$stitchxml">
- <xsl:value-of select="translate(key('docserv-dcfiles',
$dcfile)/ancestor::product/@productid,
+ <xsl:value-of
select="translate($docserv-dcfile/ancestor::product/@productid,
'&lowercase;',
'&uppercase;')"/>
</xsl:for-each>
@@ -732,7 +765,7 @@
</xsl:variable>
<xsl:variable name="release">
<xsl:for-each select="$stitchxml">
- <xsl:value-of select="key('docserv-dcfiles',
$dcfile)/ancestor::docset/@setid"/>
+ <xsl:value-of select="$docserv-dcfile/ancestor::docset/@setid"/>
</xsl:for-each>
</xsl:variable>
<!--
@@ -747,16 +780,41 @@
</xsl:if>
</xsl:template>
+ <xsl:template name="json-ld-about">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="tasks">
+ <xsl:call-template name="json-ld-task">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="webpages">
+ <xsl:call-template name="json-ld-webpages">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ "about": [
+ <xsl:value-of select="$tasks"/>
+ <xsl:if test="normalize-space($webpages) != ''">
+ <xsl:if test="normalize-space($tasks) != ''">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$webpages"/>
+ </xsl:if>
+ ],
+ </xsl:template>
+
<xsl:template name="json-ld-task">
<xsl:param name="node" select="."/>
- <xsl:variable name="task"
select="$node/d:info/d:meta[@name='task']/d:phrase"/>
- <xsl:if test="count($task) > 0">
- "about": [<xsl:for-each select="$task">{
+ <xsl:variable name="tasks"
select="$node/d:info/d:meta[@name='task']/d:phrase"/>
+ <xsl:if test="count($tasks) > 0">
+ <xsl:for-each select="$tasks">{
"@type": "Thing",
"name": "<xsl:value-of select="normalize-space(.)"/>"
- }<xsl:if test="position() != last()">, </xsl:if>
+ }<xsl:if test="position() < last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
</xsl:for-each>
- ],
</xsl:if>
</xsl:template>
@@ -797,4 +855,100 @@
],
</xsl:if>
</xsl:template>
+
+ <xsl:template name="json-ld-webpages">
+ <xsl:param name="node"/>
+ <xsl:variable name="dcfile">
+ <xsl:call-template name="get-dc-filename">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="filepart" select="substring-after($dcfile, 'DC-')"/>
+ <xsl:variable name="candidate-docsetid">
+ <xsl:for-each select="$stitchxml">
+ <xsl:value-of select="(key('docserv-dcfiles', $dcfile) |
+ key('docserv-dcsubdelivfiles',
$dcfile))[1]/ancestor::docset/@setid"/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="candidate-productid">
+ <xsl:for-each select="$stitchxml">
+ <xsl:value-of select="(key('docserv-dcfiles', $dcfile) |
+ key('docserv-dcsubdelivfiles',
$dcfile))[1]/ancestor::product/@productid"/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="candidate-lang">
+ <xsl:for-each select="$stitchxml">
+ <xsl:variable name="tmp" select="(key('docserv-dcfiles', $dcfile) |
+ key('docserv-dcsubdelivfiles',
$dcfile))[1]/ancestor::language/@lang"/>
+ <!-- We want the part before "-", for example "en-us" => "en" -->
+ <xsl:value-of select="substring-before($tmp, '-')" />
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="candicate-format-node">
+ <formats>
+ <xsl:for-each select="$stitchxml">
+ <xsl:for-each select="(key('docserv-dcfiles', $dcfile) |
+ key('docserv-dcsubdelivfiles',
$dcfile))[1]/ancestor::deliverable/format/@*">
+ <xsl:if test=". = '1' or . = 'yes' or . = 'true'">
+ <format><xsl:value-of select="local-name(.)"/></format>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+ </formats>
+ </xsl:variable>
+ <xsl:variable name="format-node"
select="exsl:node-set($candicate-format-node)/*/*"/>
+
+<!--
+ <xsl:message>JSON-LD json-ld-webpages
+ dcfile=<xsl:value-of select="$dcfile"/>
+ filepart=<xsl:value-of select="$filepart"/>
+ docsetid=<xsl:value-of select="$candidate-docsetid"/>
+ productid=<xsl:value-of select="$candidate-productid"/>
+ format-node=<xsl:value-of select="count($format-node)"/>
+ </xsl:message>
+ -->
+
+ <xsl:if test="count($format-node) = 0">
+ <xsl:call-template name="log.message">
+ <xsl:with-param name="level">error</xsl:with-param>
+ <xsl:with-param name="context-desc">JSON-LD</xsl:with-param>
+ <xsl:with-param name="message">
+ <xsl:text>Could not create WebPage type for DC file </xsl:text>
+ <xsl:value-of select="$dcfile"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:for-each select="$format-node">
+ <xsl:variable name="attr" select="."/>
+ <xsl:variable name="candidate-url"
select="concat($json-ld-fallback-author-url, '/',
+ $candidate-productid, '/',
+ $candidate-docsetid, '/',
+ $attr, '/', $filepart)"/>
+ <xsl:variable name="url">
+ <xsl:choose>
+ <xsl:when test=". = 'html' or . = 'single-html'">
+ <xsl:value-of select="concat($candidate-url, '/')"/>
+ </xsl:when>
+ <xsl:when test=". = 'pdf'">
+ <xsl:value-of select="concat($candidate-url, '_',
$candidate-lang, '.pdf')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$candidate-url"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="encodingformat">
+ <xsl:choose>
+ <xsl:when test=". = 'html' or . =
'single-html'">text/html</xsl:when>
+ <xsl:when test=". = 'pdf'">application/pdf</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ {
+ "@type": "WebPage",
+ "url": "<xsl:value-of select="$url"/>"<xsl:if test="$encodingformat
!= ''">,
+ "encodingFormat": "<xsl:value-of select="$encodingformat"/>"</xsl:if>
+ }<xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
</xsl:stylesheet>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/suse-xsl-2.94.3/suse2022-ns/xhtml/meta.xsl
new/suse-xsl-2.94.6/suse2022-ns/xhtml/meta.xsl
--- old/suse-xsl-2.94.3/suse2022-ns/xhtml/meta.xsl 2024-03-25
07:50:49.000000000 +0100
+++ new/suse-xsl-2.94.6/suse2022-ns/xhtml/meta.xsl 2024-03-27
17:20:07.000000000 +0100
@@ -22,7 +22,7 @@
<xsl:variable name="content" select="normalize-space(@content)"/>
<xsl:choose>
- <xsl:when test="$content">
+ <xsl:when test="$content != ''">
<xsl:if test="$include.html.dublincore">
<meta name="DC.creator" content="{$content}" />
</xsl:if>
@@ -45,7 +45,7 @@
<xsl:variable name="content" select="normalize-space(@content)"/>
<xsl:choose>
- <xsl:when test="$content">
+ <xsl:when test="$content != ''">
<xsl:if test="$include.html.dublincore">
<meta name="DCTERMS.modified" content="{$content}" />
</xsl:if>
@@ -63,11 +63,13 @@
</xsl:template>
<xsl:template match="d:meta[@name='category']" mode="meta">
- <xsl:variable name="content" select="normalize-space(@content)"/>
+ <xsl:variable name="content" select="*"/>
<xsl:choose>
- <xsl:when test="$content">
- <meta name="category" content="{$content}"/>
+ <xsl:when test="$content != ''">
+ <xsl:for-each select="d:phrase">
+ <meta name="category" content="."/>
+ </xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="log.message">