Skip to content

Commit 64d5375

Browse files
Merge pull request #800 from metanorma/jis_update
Jis update
2 parents 2561328 + 90a03e6 commit 64d5375

File tree

1 file changed

+43
-23
lines changed

1 file changed

+43
-23
lines changed

xslt_src/jis.international-standard.core.xsl

+43-23
Original file line numberDiff line numberDiff line change
@@ -514,13 +514,18 @@
514514
<xsl:apply-templates select="xalan:nodeset($docidentifier__)/node()"/>
515515
</xsl:variable>
516516

517-
<xsl:variable name="copyrightText">
518-
<xsl:call-template name="getLocalizedString">
519-
<xsl:with-param name="key">permission_footer</xsl:with-param>
520-
<xsl:with-param name="formatted" select="$vertical_layout"/> <!-- $vertical_layout = 'true' -->
521-
<xsl:with-param name="bibdata_updated" select="/*/jis:bibdata"/> <!-- $vertical_layout = 'true' -->
522-
</xsl:call-template>
517+
<xsl:variable name="copyrightText_">
518+
<xsl:variable name="backpage_boilerplate_text" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:backpage-boilerplate-text)"/>
519+
<xsl:value-of select="$backpage_boilerplate_text"/>
520+
<xsl:if test="$backpage_boilerplate_text = ''">
521+
<xsl:call-template name="getLocalizedString">
522+
<xsl:with-param name="key">permission_footer</xsl:with-param>
523+
<xsl:with-param name="formatted" select="$vertical_layout"/> <!-- $vertical_layout = 'true' -->
524+
<xsl:with-param name="bibdata_updated" select="/*/jis:bibdata"/> <!-- $vertical_layout = 'true' -->
525+
</xsl:call-template>
526+
</xsl:if>
523527
</xsl:variable>
528+
<xsl:variable name="copyrightText" select="normalize-space($copyrightText_)"/>
524529

525530
<xsl:variable name="doctype" select="/*/jis:bibdata/jis:ext/jis:doctype"/>
526531

@@ -1308,7 +1313,15 @@
13081313
</fo:page-sequence>
13091314
</xsl:template> <!-- insertCoverPageJSA -->
13101315

1311-
<xsl:variable name="i18n_JIS"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">JIS</xsl:with-param></xsl:call-template></xsl:variable>
1316+
<xsl:variable name="i18n_JIS_">
1317+
<xsl:variable name="coverpage_header" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:coverpage-header)"/>
1318+
<xsl:value-of select="$coverpage_header"/>
1319+
<xsl:if test="$coverpage_header = ''">
1320+
<xsl:call-template name="getLocalizedString"><xsl:with-param name="key">JIS</xsl:with-param></xsl:call-template>
1321+
</xsl:if>
1322+
</xsl:variable>
1323+
<xsl:variable name="i18n_JIS" select="normalize-space($i18n_JIS_)"/>
1324+
13121325
<xsl:template name="insertCoverPage2024">
13131326
<xsl:param name="num"/>
13141327
<xsl:param name="docidentifier_jis"/>
@@ -1425,14 +1438,9 @@
14251438
<fo:flow flow-name="xsl-region-body" font-family="Noto Serif JP">
14261439

14271440
<fo:block font-weight="900" font-size="14pt" color="white" letter-spacing="2.5mm">
1428-
<xsl:variable name="coverpage_header" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:coverpage-header)"/>
1429-
<xsl:value-of select="$coverpage_header"/>
1430-
<xsl:if test="$coverpage_header = ''">
1431-
<xsl:value-of select="$i18n_JIS"/>
1432-
</xsl:if>
1441+
<xsl:value-of select="$i18n_JIS"/>
14331442
</fo:block>
14341443

1435-
14361444
<fo:block margin-top="75mm" font-size="14pt" font-weight="500">
14371445

14381446
<fo:inline-container writing-mode="lr-tb" text-align="center"
@@ -1526,19 +1534,31 @@
15261534
<fo:flow flow-name="xsl-region-body">
15271535
<!-- publication date -->
15281536
<fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
1529-
<xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'published']/text()"/>
1530-
<fo:inline keep-together.within-line="always">
1531-
<fo:leader leader-pattern="space"/>
1532-
<xsl:text>発行</xsl:text>
1533-
</fo:inline>
1537+
<xsl:variable name="date_published"><xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'published']/text()"/></xsl:variable>
1538+
<xsl:copy-of select="$date_published"/>
1539+
<xsl:choose>
1540+
<xsl:when test="normalize-space($date_published) != ''">
1541+
<fo:inline keep-together.within-line="always">
1542+
<fo:leader leader-pattern="space"/>
1543+
<xsl:text>発行</xsl:text>
1544+
</fo:inline>
1545+
</xsl:when>
1546+
<xsl:otherwise>&#xa0;</xsl:otherwise>
1547+
</xsl:choose>
15341548
</fo:block>
15351549
<!-- revision date -->
15361550
<fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
1537-
<xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'revised']/text()"/>
1538-
<fo:inline keep-together.within-line="always">
1539-
<fo:leader leader-pattern="space"/>
1540-
<xsl:text>改正</xsl:text>
1541-
</fo:inline>
1551+
<xsl:variable name="date_revised"><xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'revised']/text()"/></xsl:variable>
1552+
<xsl:copy-of select="$date_revised"/>
1553+
<xsl:choose>
1554+
<xsl:when test="normalize-space($date_revised) != ''">
1555+
<fo:inline keep-together.within-line="always">
1556+
<fo:leader leader-pattern="space"/>
1557+
<xsl:text>改正</xsl:text>
1558+
</fo:inline>
1559+
</xsl:when>
1560+
<xsl:otherwise>&#xa0;</xsl:otherwise>
1561+
</xsl:choose>
15421562
</fo:block>
15431563
<fo:block font-size="12pt" margin-top="7mm" text-align="right">
15441564
<!-- <xsl:value-of select="$copyrightText"/> -->

0 commit comments

Comments
 (0)