metanorma-jis 0.3.3 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/jis/html/style-human.css +4 -1
- data/lib/isodoc/jis/html/style-iso.css +4 -1
- data/lib/isodoc/jis/jis.international-standard.xsl +287 -40
- data/lib/metanorma/jis/basicdoc.rng +861 -481
- data/lib/metanorma/jis/biblio-standoc.rng +87 -20
- data/lib/metanorma/jis/biblio.rng +882 -325
- data/lib/metanorma/jis/isodoc.rng +1031 -915
- data/lib/metanorma/jis/reqt.rng +94 -75
- data/lib/metanorma/jis/validate.rb +1 -0
- data/lib/metanorma/jis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd38af1784c6d7f4494cbf4203af167b130319d5d339c56dff97b0e42d1fb264
|
4
|
+
data.tar.gz: a54d5df226904400904b7e907fbdb665e20096c3136c6aa4c37ccc98b6c9b3e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3733abc0cc0b77fc8401adb1ae3430afc980384ae45a3a9f45739913ce8d963e29c354b7bdbe9a9149f1fef1bd7681c6d0f8167de9a44979c680383f2d6295d4
|
7
|
+
data.tar.gz: 267bc08daa21eda8885b747ba70503441643a5dd99dca434878573045d477f4757991fe8f89e6a922f026272cf17f04128031d29d7f4cfbfb3d058533dbe97ff
|
@@ -82,6 +82,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
82
82
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
83
83
|
font-size: {{monospacefontsize}}; }
|
84
84
|
|
85
|
+
sub, sup {
|
86
|
+
font-size: 0.75em; }
|
87
|
+
|
85
88
|
article, aside, details, figcaption, figure,
|
86
89
|
footer, header, hgroup, menu, nav, section {
|
87
90
|
display: block; }
|
@@ -239,7 +242,7 @@ h6:hover > a.anchor,
|
|
239
242
|
background-color: #777;
|
240
243
|
color: white;
|
241
244
|
cursor: pointer;
|
242
|
-
padding:
|
245
|
+
padding: 3px 0;
|
243
246
|
margin: 0;
|
244
247
|
width: 100%;
|
245
248
|
border: none;
|
@@ -82,6 +82,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
82
82
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
83
83
|
font-size: {{monospacefontsize}}; }
|
84
84
|
|
85
|
+
sub, sup {
|
86
|
+
font-size: 0.75em; }
|
87
|
+
|
85
88
|
article, aside, details, figcaption, figure,
|
86
89
|
footer, header, hgroup, menu, nav, section {
|
87
90
|
display: block; }
|
@@ -239,7 +242,7 @@ h6:hover > a.anchor,
|
|
239
242
|
background-color: #777;
|
240
243
|
color: white;
|
241
244
|
cursor: pointer;
|
242
|
-
padding:
|
245
|
+
padding: 3px 0;
|
243
246
|
margin: 0;
|
244
247
|
width: 100%;
|
245
248
|
border: none;
|
@@ -6,7 +6,10 @@
|
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
9
|
-
<xsl:variable name="isIgnoreComplexScripts">true</xsl:variable>
|
9
|
+
<!-- <xsl:variable name="isIgnoreComplexScripts">true</xsl:variable> -->
|
10
|
+
|
11
|
+
<xsl:variable name="vertical_layout" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:vertical-layout)"/>
|
12
|
+
<xsl:variable name="vertical_layout_rotate_clause_numbers" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:vertical-layout-rotate-clause-numbers)"/>
|
10
13
|
|
11
14
|
<xsl:variable name="contents_">
|
12
15
|
<xsl:variable name="bundle" select="count(//jis:jis-standard) > 1"/>
|
@@ -67,21 +70,45 @@
|
|
67
70
|
</fo:simple-page-master>
|
68
71
|
|
69
72
|
<fo:simple-page-master master-name="first_page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
70
|
-
<
|
73
|
+
<xsl:if test="$vertical_layout = 'true'">
|
74
|
+
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
75
|
+
<xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
|
76
|
+
</xsl:if>
|
77
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
|
78
|
+
<xsl:if test="$vertical_layout = 'true'">
|
79
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
80
|
+
</xsl:if>
|
81
|
+
</fo:region-body>
|
71
82
|
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
72
83
|
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
73
84
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
74
85
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
75
86
|
</fo:simple-page-master>
|
76
87
|
<fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
77
|
-
<
|
88
|
+
<xsl:if test="$vertical_layout = 'true'">
|
89
|
+
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
90
|
+
<xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
|
91
|
+
</xsl:if>
|
92
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
|
93
|
+
<xsl:if test="$vertical_layout = 'true'">
|
94
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
95
|
+
</xsl:if>
|
96
|
+
</fo:region-body>
|
78
97
|
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
|
79
98
|
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
80
99
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
81
100
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
82
101
|
</fo:simple-page-master>
|
83
102
|
<fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
84
|
-
<
|
103
|
+
<xsl:if test="$vertical_layout = 'true'">
|
104
|
+
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
105
|
+
<xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
|
106
|
+
</xsl:if>
|
107
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
|
108
|
+
<xsl:if test="$vertical_layout = 'true'">
|
109
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
110
|
+
</xsl:if>
|
111
|
+
</fo:region-body>
|
85
112
|
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
86
113
|
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
87
114
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
@@ -89,7 +116,15 @@
|
|
89
116
|
</fo:simple-page-master>
|
90
117
|
|
91
118
|
<fo:simple-page-master master-name="first_page_toc" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
92
|
-
<
|
119
|
+
<xsl:if test="$vertical_layout = 'true'">
|
120
|
+
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
121
|
+
<xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
|
122
|
+
</xsl:if>
|
123
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
|
124
|
+
<xsl:if test="$vertical_layout = 'true'">
|
125
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
126
|
+
</xsl:if>
|
127
|
+
</fo:region-body>
|
93
128
|
<fo:region-before region-name="header-odd-first" extent="{$marginTop}mm"/>
|
94
129
|
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
95
130
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
@@ -127,7 +162,15 @@
|
|
127
162
|
</fo:page-sequence-master>
|
128
163
|
|
129
164
|
<fo:simple-page-master master-name="commentary_first_page_even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
130
|
-
<
|
165
|
+
<xsl:if test="$vertical_layout = 'true'">
|
166
|
+
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
167
|
+
<xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
|
168
|
+
</xsl:if>
|
169
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
|
170
|
+
<xsl:if test="$vertical_layout = 'true'">
|
171
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
172
|
+
</xsl:if>
|
173
|
+
</fo:region-body>
|
131
174
|
<fo:region-before region-name="header-commentary-even-first" extent="{$marginTop}mm"/>
|
132
175
|
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
133
176
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
@@ -135,7 +178,15 @@
|
|
135
178
|
</fo:simple-page-master>
|
136
179
|
|
137
180
|
<fo:simple-page-master master-name="commentary_first_page_odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
138
|
-
<
|
181
|
+
<xsl:if test="$vertical_layout = 'true'">
|
182
|
+
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
183
|
+
<xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
|
184
|
+
</xsl:if>
|
185
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
|
186
|
+
<xsl:if test="$vertical_layout = 'true'">
|
187
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
188
|
+
</xsl:if>
|
189
|
+
</fo:region-body>
|
139
190
|
<fo:region-before region-name="header-commentary-odd-first" extent="{$marginTop}mm"/>
|
140
191
|
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
141
192
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
@@ -592,12 +643,22 @@
|
|
592
643
|
</xsl:when>
|
593
644
|
<xsl:otherwise>
|
594
645
|
<fo:list-block space-after="5pt">
|
646
|
+
<xsl:variable name="provisional-distance-between-starts">
|
647
|
+
<xsl:choose>
|
648
|
+
<xsl:when test="string-length(@section) = 1">5</xsl:when>
|
649
|
+
<xsl:when test="string-length(@section) >= 2"><xsl:value-of select="5 + (string-length(@section) - 1) * 2"/></xsl:when>
|
650
|
+
<xsl:when test="@type = 'annex'">16</xsl:when>
|
651
|
+
<xsl:otherwise>5</xsl:otherwise>
|
652
|
+
</xsl:choose>
|
653
|
+
</xsl:variable>
|
595
654
|
<xsl:attribute name="provisional-distance-between-starts">
|
596
655
|
<xsl:choose>
|
597
|
-
<xsl:when test="
|
598
|
-
|
599
|
-
|
600
|
-
<xsl:otherwise>
|
656
|
+
<xsl:when test="$vertical_layout_rotate_clause_numbers = 'true'">
|
657
|
+
<xsl:value-of select="concat($provisional-distance-between-starts * 1.5, 'mm')"/>
|
658
|
+
</xsl:when>
|
659
|
+
<xsl:otherwise>
|
660
|
+
<xsl:value-of select="concat($provisional-distance-between-starts, 'mm')"/>
|
661
|
+
</xsl:otherwise>
|
601
662
|
</xsl:choose>
|
602
663
|
</xsl:attribute>
|
603
664
|
<fo:list-item>
|
@@ -1112,10 +1173,24 @@
|
|
1112
1173
|
<xsl:call-template name="extractSection"/>
|
1113
1174
|
</xsl:variable>
|
1114
1175
|
<xsl:if test="normalize-space($section) != ''">
|
1115
|
-
|
1116
|
-
|
1117
|
-
<
|
1118
|
-
|
1176
|
+
|
1177
|
+
<xsl:choose>
|
1178
|
+
<xsl:when test="$vertical_layout_rotate_clause_numbers = 'true'">
|
1179
|
+
<fo:inline font-family="Times New Roman" font-weight="bold">
|
1180
|
+
<xsl:call-template name="insertVerticalChar">
|
1181
|
+
<xsl:with-param name="str" select="$section"/>
|
1182
|
+
</xsl:call-template>
|
1183
|
+
</fo:inline>
|
1184
|
+
<fo:inline padding-right="4mm"> </fo:inline>
|
1185
|
+
</xsl:when>
|
1186
|
+
<xsl:otherwise>
|
1187
|
+
<fo:inline font-family="Times New Roman" font-weight="bold">
|
1188
|
+
<xsl:value-of select="$section"/>
|
1189
|
+
<fo:inline padding-right="4mm"> </fo:inline>
|
1190
|
+
</fo:inline>
|
1191
|
+
</xsl:otherwise>
|
1192
|
+
</xsl:choose>
|
1193
|
+
|
1119
1194
|
</xsl:if>
|
1120
1195
|
|
1121
1196
|
<xsl:call-template name="extractTitle"/>
|
@@ -1595,6 +1670,9 @@
|
|
1595
1670
|
<xsl:param name="section_title"/>
|
1596
1671
|
<fo:static-content flow-name="header-odd-first" role="artifact">
|
1597
1672
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="right">
|
1673
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1674
|
+
<xsl:attribute name="display-align">center</xsl:attribute>
|
1675
|
+
</xsl:if>
|
1598
1676
|
<xsl:if test="$section = 'main'"><fo:block><fo:page-number/></fo:block></xsl:if>
|
1599
1677
|
<fo:block>
|
1600
1678
|
<xsl:copy-of select="$docidentifier"/>
|
@@ -1603,6 +1681,9 @@
|
|
1603
1681
|
</fo:static-content>
|
1604
1682
|
<fo:static-content flow-name="header-odd" role="artifact">
|
1605
1683
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="right">
|
1684
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1685
|
+
<xsl:attribute name="display-align">center</xsl:attribute>
|
1686
|
+
</xsl:if>
|
1606
1687
|
<xsl:if test="$section = 'main' or $section = 'commentary'"><fo:block><fo:page-number/></fo:block></xsl:if>
|
1607
1688
|
<fo:block>
|
1608
1689
|
<xsl:copy-of select="$docidentifier"/>
|
@@ -1612,6 +1693,9 @@
|
|
1612
1693
|
</fo:static-content>
|
1613
1694
|
<fo:static-content flow-name="header-even" role="artifact">
|
1614
1695
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after">
|
1696
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1697
|
+
<xsl:attribute name="display-align">center</xsl:attribute>
|
1698
|
+
</xsl:if>
|
1615
1699
|
<xsl:if test="$section = 'main' or $section = 'commentary'"><fo:block><fo:page-number/></fo:block></xsl:if>
|
1616
1700
|
<fo:block>
|
1617
1701
|
<xsl:copy-of select="$docidentifier"/>
|
@@ -1622,6 +1706,9 @@
|
|
1622
1706
|
|
1623
1707
|
<fo:static-content flow-name="header-commentary-even-first" role="artifact">
|
1624
1708
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="left">
|
1709
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1710
|
+
<xsl:attribute name="display-align">center</xsl:attribute>
|
1711
|
+
</xsl:if>
|
1625
1712
|
<fo:block><fo:page-number/></fo:block>
|
1626
1713
|
<fo:block> </fo:block>
|
1627
1714
|
</fo:block-container>
|
@@ -1629,6 +1716,9 @@
|
|
1629
1716
|
|
1630
1717
|
<fo:static-content flow-name="header-commentary-odd-first" role="artifact">
|
1631
1718
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="right">
|
1719
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1720
|
+
<xsl:attribute name="display-align">center</xsl:attribute>
|
1721
|
+
</xsl:if>
|
1632
1722
|
<fo:block><fo:page-number/></fo:block>
|
1633
1723
|
<fo:block> </fo:block>
|
1634
1724
|
</fo:block-container>
|
@@ -1662,7 +1752,12 @@
|
|
1662
1752
|
</fo:block>
|
1663
1753
|
</xsl:if>
|
1664
1754
|
<!-- copyright restriction -->
|
1665
|
-
<fo:block font-size="7pt" text-align="center" font-family="IPAexMincho" margin-bottom="13mm"
|
1755
|
+
<fo:block font-size="7pt" text-align="center" font-family="IPAexMincho" margin-bottom="13mm">
|
1756
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1757
|
+
<xsl:attribute name="margin-bottom">5mm</xsl:attribute>
|
1758
|
+
</xsl:if>
|
1759
|
+
<xsl:value-of select="$copyrightText"/>
|
1760
|
+
</fo:block>
|
1666
1761
|
</fo:block-container>
|
1667
1762
|
</fo:static-content>
|
1668
1763
|
</xsl:template>
|
@@ -4865,6 +4960,7 @@
|
|
4865
4960
|
|
4866
4961
|
<fo:block role="SKIP">
|
4867
4962
|
<xsl:apply-templates/>
|
4963
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
4868
4964
|
</fo:block>
|
4869
4965
|
</fo:table-cell>
|
4870
4966
|
</xsl:template> <!-- cell in table header row - 'th' -->
|
@@ -4928,6 +5024,8 @@
|
|
4928
5024
|
|
4929
5025
|
<xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
4930
5026
|
|
5027
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
5028
|
+
|
4931
5029
|
</fo:block>
|
4932
5030
|
</fo:table-cell>
|
4933
5031
|
</xsl:template> <!-- td -->
|
@@ -7738,14 +7836,16 @@
|
|
7738
7836
|
<xsl:template match="*[local-name()='link']" name="link">
|
7739
7837
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
7740
7838
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
7839
|
+
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
7741
7840
|
<xsl:variable name="target">
|
7742
7841
|
<xsl:choose>
|
7743
7842
|
<xsl:when test="@updatetype = 'true'">
|
7744
7843
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7745
7844
|
</xsl:when>
|
7746
7845
|
<!-- link to the PDF attachment -->
|
7747
|
-
<xsl:when test="
|
7748
|
-
<xsl:
|
7846
|
+
<xsl:when test="$isLinkToEmbeddedFile = 'true'">
|
7847
|
+
<xsl:variable name="target_file" select="java:org.metanorma.fop.Util.getFilenameFromPath(@target)"/>
|
7848
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_file, ')')"/>
|
7749
7849
|
</xsl:when>
|
7750
7850
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
7751
7851
|
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
@@ -7776,6 +7876,11 @@
|
|
7776
7876
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7777
7877
|
</xsl:if>
|
7778
7878
|
|
7879
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7880
|
+
<xsl:attribute name="color">inherit</xsl:attribute>
|
7881
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
7882
|
+
</xsl:if>
|
7883
|
+
|
7779
7884
|
<xsl:call-template name="refine_link-style"/>
|
7780
7885
|
|
7781
7886
|
<xsl:choose>
|
@@ -7786,6 +7891,9 @@
|
|
7786
7891
|
<xsl:call-template name="insert_basic_link">
|
7787
7892
|
<xsl:with-param name="element">
|
7788
7893
|
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
7894
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7895
|
+
<xsl:attribute name="role">Annot</xsl:attribute>
|
7896
|
+
</xsl:if>
|
7789
7897
|
<xsl:choose>
|
7790
7898
|
<xsl:when test="normalize-space(.) = ''">
|
7791
7899
|
<xsl:call-template name="add-zero-spaces-link-java">
|
@@ -7798,6 +7906,10 @@
|
|
7798
7906
|
</xsl:otherwise>
|
7799
7907
|
</xsl:choose>
|
7800
7908
|
</fo:basic-link>
|
7909
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7910
|
+
<!-- reserve space at right for PaperClip icon -->
|
7911
|
+
<fo:inline keep-with-previous.within-line="always"> </fo:inline>
|
7912
|
+
</xsl:if>
|
7801
7913
|
</xsl:with-param>
|
7802
7914
|
</xsl:call-template>
|
7803
7915
|
</xsl:otherwise>
|
@@ -13308,6 +13420,39 @@
|
|
13308
13420
|
</pdf:catalog>
|
13309
13421
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
13310
13422
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
13423
|
+
<rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" rdf:about="">
|
13424
|
+
<pdfaExtension:schemas>
|
13425
|
+
<rdf:Bag>
|
13426
|
+
<rdf:li rdf:parseType="Resource">
|
13427
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
13428
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
13429
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
13430
|
+
<pdfaSchema:property>
|
13431
|
+
<rdf:Seq>
|
13432
|
+
<rdf:li rdf:parseType="Resource">
|
13433
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
13434
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
13435
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
13436
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
13437
|
+
</rdf:li>
|
13438
|
+
<rdf:li rdf:parseType="Resource">
|
13439
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
13440
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
13441
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
13442
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
13443
|
+
</rdf:li>
|
13444
|
+
<rdf:li rdf:parseType="Resource">
|
13445
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
13446
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
13447
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
13448
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
13449
|
+
</rdf:li>
|
13450
|
+
</rdf:Seq>
|
13451
|
+
</pdfaSchema:property>
|
13452
|
+
</rdf:li>
|
13453
|
+
</rdf:Bag>
|
13454
|
+
</pdfaExtension:schemas>
|
13455
|
+
</rdf:Description>
|
13311
13456
|
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
|
13312
13457
|
<!-- Dublin Core properties go here -->
|
13313
13458
|
<dc:title>
|
@@ -13318,33 +13463,57 @@
|
|
13318
13463
|
|
13319
13464
|
</xsl:for-each>
|
13320
13465
|
</xsl:variable>
|
13321
|
-
<
|
13322
|
-
<
|
13323
|
-
<xsl:
|
13324
|
-
|
13325
|
-
|
13326
|
-
|
13327
|
-
|
13328
|
-
|
13466
|
+
<rdf:Alt>
|
13467
|
+
<rdf:li xml:lang="x-default">
|
13468
|
+
<xsl:choose>
|
13469
|
+
<xsl:when test="normalize-space($title) != ''">
|
13470
|
+
<xsl:value-of select="$title"/>
|
13471
|
+
</xsl:when>
|
13472
|
+
<xsl:otherwise>
|
13473
|
+
<xsl:text> </xsl:text>
|
13474
|
+
</xsl:otherwise>
|
13475
|
+
</xsl:choose>
|
13476
|
+
</rdf:li>
|
13477
|
+
</rdf:Alt>
|
13329
13478
|
</dc:title>
|
13330
|
-
<
|
13479
|
+
<xsl:variable name="dc_creator">
|
13331
13480
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
13332
13481
|
|
13333
|
-
<
|
13334
|
-
<xsl:
|
13335
|
-
|
13336
|
-
|
13482
|
+
<rdf:Seq>
|
13483
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
13484
|
+
<rdf:li>
|
13485
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
13486
|
+
</rdf:li>
|
13487
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
13488
|
+
</xsl:for-each>
|
13489
|
+
</rdf:Seq>
|
13337
13490
|
|
13338
13491
|
</xsl:for-each>
|
13339
|
-
</
|
13340
|
-
<
|
13492
|
+
</xsl:variable>
|
13493
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
13494
|
+
<dc:creator>
|
13495
|
+
<xsl:copy-of select="$dc_creator"/>
|
13496
|
+
</dc:creator>
|
13497
|
+
</xsl:if>
|
13498
|
+
|
13499
|
+
<xsl:variable name="dc_description">
|
13341
13500
|
<xsl:variable name="abstract">
|
13342
13501
|
|
13343
13502
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
13344
13503
|
|
13345
13504
|
</xsl:variable>
|
13346
|
-
<
|
13347
|
-
|
13505
|
+
<rdf:Alt>
|
13506
|
+
<rdf:li xml:lang="x-default">
|
13507
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
13508
|
+
</rdf:li>
|
13509
|
+
</rdf:Alt>
|
13510
|
+
</xsl:variable>
|
13511
|
+
<xsl:if test="normalize-space($dc_description)">
|
13512
|
+
<dc:description>
|
13513
|
+
<xsl:copy-of select="$dc_description"/>
|
13514
|
+
</dc:description>
|
13515
|
+
</xsl:if>
|
13516
|
+
|
13348
13517
|
<pdf:Keywords>
|
13349
13518
|
<xsl:call-template name="insertKeywords">
|
13350
13519
|
<xsl:with-param name="meta">true</xsl:with-param>
|
@@ -13359,9 +13528,14 @@
|
|
13359
13528
|
</x:xmpmeta>
|
13360
13529
|
<!-- add attachments -->
|
13361
13530
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13362
|
-
<xsl:variable name="
|
13363
|
-
|
13364
|
-
<
|
13531
|
+
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
13532
|
+
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
13533
|
+
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
13534
|
+
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
13535
|
+
<!-- Todo: need update -->
|
13536
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
13537
|
+
|
13538
|
+
<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
|
13365
13539
|
<xsl:attribute name="src">
|
13366
13540
|
<xsl:choose>
|
13367
13541
|
<xsl:when test="normalize-space() != ''">
|
@@ -13377,18 +13551,27 @@
|
|
13377
13551
|
<xsl:if test="$description != ''">
|
13378
13552
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13379
13553
|
</xsl:if>
|
13554
|
+
<xsl:if test="$afrelationship != ''">
|
13555
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13556
|
+
</xsl:if>
|
13380
13557
|
</pdf:embedded-file>
|
13381
13558
|
</xsl:for-each>
|
13382
13559
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
13383
13560
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
13384
13561
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
13385
13562
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
13563
|
+
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
13386
13564
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
13387
13565
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
13388
|
-
|
13566
|
+
<!-- Todo: need update -->
|
13567
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
13568
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
13389
13569
|
<xsl:if test="$description != ''">
|
13390
13570
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13391
13571
|
</xsl:if>
|
13572
|
+
<xsl:if test="$afrelationship != ''">
|
13573
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13574
|
+
</xsl:if>
|
13392
13575
|
</pdf:embedded-file>
|
13393
13576
|
</xsl:for-each>
|
13394
13577
|
</xsl:if>
|
@@ -13408,6 +13591,12 @@
|
|
13408
13591
|
<!-- Get or calculate depth of the element -->
|
13409
13592
|
<xsl:template name="getLevel">
|
13410
13593
|
<xsl:param name="depth"/>
|
13594
|
+
<!-- <xsl:message>
|
13595
|
+
<xsl:choose>
|
13596
|
+
<xsl:when test="local-name() = 'title'">title=<xsl:value-of select="."/></xsl:when>
|
13597
|
+
<xsl:when test="local-name() = 'clause'">clause/title=<xsl:value-of select="*[local-name() = 'title']"/></xsl:when>
|
13598
|
+
</xsl:choose>
|
13599
|
+
</xsl:message> -->
|
13411
13600
|
<xsl:choose>
|
13412
13601
|
<xsl:when test="normalize-space(@depth) != ''">
|
13413
13602
|
<xsl:value-of select="@depth"/>
|
@@ -13428,8 +13617,27 @@
|
|
13428
13617
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
13429
13618
|
<xsl:value-of select="$level_total - 2"/>
|
13430
13619
|
</xsl:when>
|
13620
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
13621
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
13622
|
+
<xsl:choose>
|
13623
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13624
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13625
|
+
</xsl:when>
|
13626
|
+
<xsl:otherwise>
|
13627
|
+
<xsl:value-of select="$level_total - 2"/>
|
13628
|
+
</xsl:otherwise>
|
13629
|
+
</xsl:choose>
|
13630
|
+
</xsl:when>
|
13431
13631
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
13432
|
-
<xsl:
|
13632
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
|
13633
|
+
<xsl:choose>
|
13634
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13635
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13636
|
+
</xsl:when>
|
13637
|
+
<xsl:otherwise>
|
13638
|
+
<xsl:value-of select="$level_total - 1"/>
|
13639
|
+
</xsl:otherwise>
|
13640
|
+
</xsl:choose>
|
13433
13641
|
</xsl:when>
|
13434
13642
|
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
13435
13643
|
<xsl:value-of select="$level_total - 1"/>
|
@@ -13437,6 +13645,17 @@
|
|
13437
13645
|
<xsl:when test="parent::*[local-name() = 'annex']">
|
13438
13646
|
<xsl:value-of select="$level_total - 1"/>
|
13439
13647
|
</xsl:when>
|
13648
|
+
<xsl:when test="ancestor::*[local-name() = 'annex'] and self::*[local-name() = 'title']">
|
13649
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
13650
|
+
<xsl:choose>
|
13651
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13652
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13653
|
+
</xsl:when>
|
13654
|
+
<xsl:otherwise>
|
13655
|
+
<xsl:value-of select="$level_total - 1"/>
|
13656
|
+
</xsl:otherwise>
|
13657
|
+
</xsl:choose>
|
13658
|
+
</xsl:when>
|
13440
13659
|
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
13441
13660
|
<xsl:value-of select="$level_total"/>
|
13442
13661
|
</xsl:when>
|
@@ -13793,6 +14012,20 @@
|
|
13793
14012
|
|
13794
14013
|
<!-- END: insert cover page image -->
|
13795
14014
|
|
14015
|
+
<xsl:template name="insertVerticalChar">
|
14016
|
+
<xsl:param name="str"/>
|
14017
|
+
<xsl:if test="string-length($str) > 0">
|
14018
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
14019
|
+
<fo:block-container width="1em">
|
14020
|
+
<fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
|
14021
|
+
</fo:block-container>
|
14022
|
+
</fo:inline-container>
|
14023
|
+
<xsl:call-template name="insertVerticalChar">
|
14024
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
14025
|
+
</xsl:call-template>
|
14026
|
+
</xsl:if>
|
14027
|
+
</xsl:template>
|
14028
|
+
|
13796
14029
|
<xsl:template name="number-to-words">
|
13797
14030
|
<xsl:param name="number"/>
|
13798
14031
|
<xsl:param name="first"/>
|
@@ -14080,4 +14313,18 @@
|
|
14080
14313
|
</xsl:if>
|
14081
14314
|
</xsl:template>
|
14082
14315
|
|
14316
|
+
<xsl:template match="@*|node()" mode="set_table_role_skip">
|
14317
|
+
<xsl:copy>
|
14318
|
+
<xsl:apply-templates select="@*|node()" mode="set_table_role_skip"/>
|
14319
|
+
</xsl:copy>
|
14320
|
+
</xsl:template>
|
14321
|
+
|
14322
|
+
<xsl:template match="*[starts-with(local-name(), 'table')]" mode="set_table_role_skip">
|
14323
|
+
<xsl:copy>
|
14324
|
+
<xsl:apply-templates select="@*" mode="set_table_role_skip"/>
|
14325
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
14326
|
+
<xsl:apply-templates select="node()" mode="set_table_role_skip"/>
|
14327
|
+
</xsl:copy>
|
14328
|
+
</xsl:template>
|
14329
|
+
|
14083
14330
|
</xsl:stylesheet>
|