Skip to content

Commit

Permalink
Merge pull request #628 from openSUSE/fix-docteam-1368-sbp
Browse files Browse the repository at this point in the history
Fix series selection for SBP FO stylesheets
  • Loading branch information
tomschr authored May 14, 2024
2 parents 875dcf6 + 3a06603 commit 9ce772f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions sbp/fo/article.titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@
</fo:table-cell>
<fo:table-cell text-align="right" color="&c_jungle;">
<fo:block font-size="&xxx-large;pt">
<xsl:value-of select="$json-ld-seriesname"/>
<xsl:choose>
<xsl:when test="$json-ld-seriesname != ''">
<xsl:value-of select="$json-ld-seriesname"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="d:info/d:meta[@name='series'][1]" mode="article.titlepage.recto.auto.mode"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
<fo:block font-size="&large;pt" space-before="1em">
<xsl:apply-templates select="d:info/d:meta[@name='category'][1]" mode="article.titlepage.recto.auto.mode"/>
Expand Down Expand Up @@ -107,7 +114,8 @@
</xsl:template>

<xsl:template match="d:meta[@name='series']" mode="article.titlepage.recto.auto.mode">
<!-- We don't process it anymore, using $json-ld-seriesname parameter -->
<!-- Only process it when $json-ld-seriesname != '' -->
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="d:meta[@name='category']" mode="article.titlepage.recto.auto.mode">
Expand Down
2 changes: 1 addition & 1 deletion sbp/xhtml/titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
</xsl:choose>

<div class="series-category">
<xsl:comment/>
<xsl:comment/><!-- Add empty comment in case we don't create series nor categories -->
<xsl:call-template name="add.series.name"/>
<xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:meta[@name='category' or @name='type']"/>
</div>
Expand Down

0 comments on commit 9ce772f

Please sign in to comment.