Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCTEAM-1368: Take TRD series from a parameter #627

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions trd/fo/article.titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<fo:table-column column-number="2" /><!-- column-width="75%" -->

<fo:table-body>
<fo:table-cell text-align="start">
<fo:block>
<fo:table-cell text-align="start">
<fo:block padding-top="0pt" margin-top="-10pt" margin-left="-10pt">
<fo:instream-foreign-object
content-width="{$titlepage.logo.width.article}"
width="{$titlepage.logo.width}">
Expand All @@ -39,7 +39,14 @@
</fo:table-cell>
<fo:table-cell text-align="right" color="&c_jungle;">
<fo:block font-size="&x-large;pt" hyphenate="false">
<xsl:apply-templates select="d:info/d:meta[@name='series'][1]" mode="article.titlepage.recto.auto.mode"/>
<xsl:choose>
<xsl:when test="$json-ld-seriesname != ''">
<xsl:value-of select="$json-ld-seriesname"/>
</xsl:when>
<xsl:when test="d:info/d:meta[@name='series']">
<xsl:apply-templates select="d:info/d:meta[@name='series'][1]" mode="article.titlepage.recto.auto.mode"/>
</xsl:when>
</xsl:choose>
</fo:block>
<fo:block font-size="&large;pt">
<xsl:apply-templates select="d:info/d:meta[@name='type'][1]" mode="article.titlepage.recto.auto.mode"/>
Expand Down
9 changes: 8 additions & 1 deletion trd/fo/book.titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@
</fo:table-cell>
<fo:table-cell text-align="right" color="&c_jungle;">
<fo:block font-size="&xxx-large;pt">
<xsl:apply-templates select="d:info/d:meta[@name='series'][1]" mode="book.titlepage.recto.auto.mode"/>
<xsl:choose>
<xsl:when test="$json-ld-seriesname != ''">
<xsl:value-of select="$json-ld-seriesname"/>
</xsl:when>
<xsl:when test="d:info/d:meta[@name='series']">
<xsl:apply-templates select="d:info/d:meta[@name='series'][1]" mode="book.titlepage.recto.auto.mode"/>
</xsl:when>
</xsl:choose>
</fo:block>
<fo:block font-size="&large;pt">
<xsl:apply-templates select="d:info/d:meta[@name='category'][1]" mode="book.titlepage.recto.auto.mode"/>
Expand Down
2 changes: 1 addition & 1 deletion trd/fo/param.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
exclude-result-prefixes="d">

<xsl:param name="titlepage.logo.image"><xsl:value-of select="$styleroot"/>images/trd-lightbulb-title.svg</xsl:param>

<xsl:param name="json-ld-seriesname">Technical Reference Documentation</xsl:param>

<xsl:attribute-set name="book.titlepage.recto.style">
<xsl:attribute name="font-family"><xsl:value-of select="$title.font.family"/></xsl:attribute>
Expand Down
3 changes: 2 additions & 1 deletion trd/xhtml/book.titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
</xsl:variable>
<xsl:variable name="authorgroup" select="exsl:node-set($rtf.authorgroup)"/>

<!--
<xsl:message>author[1] mode="book.titlepage.recto.auto.mode"
content of authorgroup = <xsl:value-of select="count($authorgroup/*/*)"/>
following-sibling::d:author=<xsl:value-of select="count(following-sibling::d:author)"/>
Expand All @@ -66,7 +67,7 @@
following-sibling::d:othercredit=<xsl:value-of select="count(following-sibling::d:othercredit)"/>
preceding-sibling::d:othercredit=<xsl:value-of select="count(preceding-sibling::d:othercredit)"/>
</xsl:message>

-->
<!-- Delegate all collected nodes to the authorgroup template -->
<xsl:apply-templates select="$authorgroup" mode="book.titlepage.recto.auto.mode"/>
</xsl:template>
Expand Down
1 change: 1 addition & 0 deletions trd/xhtml/param.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="json-ld-seriesname">Technical Reference Documentation</xsl:param>
</xsl:stylesheet>
Loading