metanorma-iho 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/iho/iho.specification.xsl +83 -61
- data/lib/isodoc/iho/iho.standard.xsl +83 -61
- data/lib/metanorma/iho/biblio.rng +1 -1
- data/lib/metanorma/iho/front.rb +2 -1
- data/lib/metanorma/iho/isodoc.rng +35 -10
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 223913811da0f7ec6a4d4bd50fca2906a4187424ba722dd604e4edb238130aeb
|
4
|
+
data.tar.gz: 2850ba37bfa0a78db48994854868ad4bb63caac199cfda5a8fbc00b74d6d0efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c338a5b8fbc82e177b135ece92260e51b53e454312890bfe12571a469ac896b4ce973d80e1702ee64e91691cfd30774e76c01e45748aa290ef1d2d04e92bc548
|
7
|
+
data.tar.gz: 569baa095565a7d2fe7026031fd5d489b9039874602dc51f69a46c26079dc6023d447cab77126f3a8634152c38b8a8502f2d99d0e9b12cca48ff2b1fda137d85
|
@@ -1160,6 +1160,22 @@
|
|
1160
1160
|
<xsl:param name="month_year"/>
|
1161
1161
|
<xsl:param name="font-weight" select="'bold'"/>
|
1162
1162
|
<xsl:param name="orientation"/>
|
1163
|
+
|
1164
|
+
<xsl:call-template name="insertHeader">
|
1165
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
1166
|
+
<xsl:with-param name="orientation" select="$orientation"/>
|
1167
|
+
</xsl:call-template>
|
1168
|
+
|
1169
|
+
<xsl:call-template name="insertFooter">
|
1170
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
1171
|
+
<xsl:with-param name="edition" select="$edition"/>
|
1172
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
1173
|
+
</xsl:call-template>
|
1174
|
+
</xsl:template>
|
1175
|
+
|
1176
|
+
<xsl:template name="insertHeader">
|
1177
|
+
<xsl:param name="title_header"/>
|
1178
|
+
<xsl:param name="orientation"/>
|
1163
1179
|
<fo:static-content flow-name="header-odd" role="artifact">
|
1164
1180
|
<fo:block-container height="100%" font-size="8pt">
|
1165
1181
|
<fo:block padding-top="12.5mm">
|
@@ -1200,12 +1216,8 @@
|
|
1200
1216
|
<xsl:with-param name="title_header" select="$title_header"/>
|
1201
1217
|
<xsl:with-param name="orientation" select="$orientation"/>
|
1202
1218
|
</xsl:call-template>
|
1203
|
-
<xsl:call-template name="insertFooter">
|
1204
|
-
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
1205
|
-
<xsl:with-param name="edition" select="$edition"/>
|
1206
|
-
<xsl:with-param name="month_year" select="$month_year"/>
|
1207
|
-
</xsl:call-template>
|
1208
1219
|
</xsl:template>
|
1220
|
+
|
1209
1221
|
<xsl:template name="insertHeaderBlank">
|
1210
1222
|
<xsl:param name="title_header"/>
|
1211
1223
|
<xsl:param name="orientation"/>
|
@@ -1235,6 +1247,7 @@
|
|
1235
1247
|
</fo:block-container>
|
1236
1248
|
</fo:static-content>
|
1237
1249
|
</xsl:template>
|
1250
|
+
|
1238
1251
|
<xsl:template name="insertFooter">
|
1239
1252
|
<xsl:param name="docidentifier"/>
|
1240
1253
|
<xsl:param name="edition"/>
|
@@ -1255,6 +1268,7 @@
|
|
1255
1268
|
</fo:block-container>
|
1256
1269
|
</fo:static-content>
|
1257
1270
|
</xsl:template>
|
1271
|
+
|
1258
1272
|
<xsl:template name="insertHeaderFooterBlank">
|
1259
1273
|
<xsl:param name="title_header"/>
|
1260
1274
|
<xsl:param name="docidentifier"/>
|
@@ -4707,88 +4721,82 @@
|
|
4707
4721
|
<xsl:template name="refine_term-style">
|
4708
4722
|
</xsl:template>
|
4709
4723
|
|
4710
|
-
<xsl:attribute-set name="term-
|
4724
|
+
<xsl:attribute-set name="term-number-style">
|
4711
4725
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4712
4726
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4713
4727
|
</xsl:attribute-set> <!-- term-name-style -->
|
4714
4728
|
|
4715
|
-
<xsl:template name="refine_term-
|
4729
|
+
<xsl:template name="refine_term-number-style">
|
4716
4730
|
</xsl:template>
|
4717
4731
|
|
4718
|
-
<xsl:attribute-set name="preferred-style">
|
4719
|
-
</xsl:attribute-set> <!-- preferred-style -->
|
4720
|
-
|
4721
|
-
<xsl:template name="refine_preferred-style">
|
4722
|
-
</xsl:template>
|
4723
|
-
|
4724
|
-
<xsl:attribute-set name="preferred-block-style">
|
4732
|
+
<xsl:attribute-set name="term-preferred-block-style">
|
4725
4733
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
4726
4734
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
4727
4735
|
|
4728
|
-
<xsl:template name="
|
4736
|
+
<xsl:template name="refine_term-preferred-block-style">
|
4729
4737
|
</xsl:template>
|
4730
4738
|
|
4731
|
-
<xsl:attribute-set name="preferred-
|
4739
|
+
<xsl:attribute-set name="term-preferred-style">
|
4732
4740
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4733
4741
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4734
4742
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
4735
4743
|
|
4736
|
-
<xsl:template name="
|
4744
|
+
<xsl:template name="refine_term-preferred-style">
|
4737
4745
|
<xsl:if test="mn:strong">
|
4738
4746
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4739
4747
|
</xsl:if>
|
4740
4748
|
</xsl:template>
|
4741
4749
|
|
4742
|
-
<xsl:attribute-set name="domain-style">
|
4743
|
-
</xsl:attribute-set> <!-- domain-style -->
|
4750
|
+
<xsl:attribute-set name="term-domain-style">
|
4751
|
+
</xsl:attribute-set> <!-- term-domain-style -->
|
4744
4752
|
|
4745
|
-
<xsl:template name="
|
4753
|
+
<xsl:template name="refine_term-domain-style">
|
4746
4754
|
</xsl:template>
|
4747
4755
|
|
4748
|
-
<xsl:attribute-set name="admitted-style">
|
4749
|
-
</xsl:attribute-set> <!-- admitted-style -->
|
4756
|
+
<xsl:attribute-set name="term-admitted-style">
|
4757
|
+
</xsl:attribute-set> <!-- term-admitted-style -->
|
4750
4758
|
|
4751
|
-
<xsl:template name="
|
4759
|
+
<xsl:template name="refine_term-admitted-style">
|
4752
4760
|
</xsl:template>
|
4753
4761
|
|
4754
|
-
<xsl:attribute-set name="deprecates-style">
|
4755
|
-
</xsl:attribute-set> <!-- deprecates-style -->
|
4762
|
+
<xsl:attribute-set name="term-deprecates-style">
|
4763
|
+
</xsl:attribute-set> <!-- term-deprecates-style -->
|
4756
4764
|
|
4757
|
-
<xsl:template name="
|
4765
|
+
<xsl:template name="refine_term-deprecates-style">
|
4758
4766
|
</xsl:template>
|
4759
4767
|
|
4760
|
-
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
4768
|
+
<xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
|
4761
4769
|
</xsl:attribute-set>
|
4762
4770
|
|
4763
|
-
<xsl:template name="
|
4771
|
+
<xsl:template name="refine_term-related-block-style">
|
4764
4772
|
</xsl:template>
|
4765
4773
|
|
4766
|
-
<xsl:attribute-set name="definition-style">
|
4774
|
+
<xsl:attribute-set name="term-definition-style">
|
4767
4775
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4768
|
-
</xsl:attribute-set> <!-- definition-style -->
|
4776
|
+
</xsl:attribute-set> <!-- term-definition-style -->
|
4769
4777
|
|
4770
|
-
<xsl:template name="
|
4778
|
+
<xsl:template name="refine_term-definition-style">
|
4771
4779
|
</xsl:template>
|
4772
4780
|
|
4773
|
-
<xsl:attribute-set name="termsource-style">
|
4781
|
+
<xsl:attribute-set name="term-termsource-style">
|
4774
4782
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4775
|
-
</xsl:attribute-set> <!-- termsource-style -->
|
4783
|
+
</xsl:attribute-set> <!-- term-termsource-style -->
|
4776
4784
|
|
4777
|
-
<xsl:template name="
|
4778
|
-
</xsl:template> <!--
|
4785
|
+
<xsl:template name="refine_term-termsource-style">
|
4786
|
+
</xsl:template> <!-- refine_term-termsource-style -->
|
4779
4787
|
|
4780
|
-
<xsl:attribute-set name="termsource-text-style">
|
4781
|
-
</xsl:attribute-set> <!-- termsource-text-style -->
|
4788
|
+
<xsl:attribute-set name="term-termsource-text-style">
|
4789
|
+
</xsl:attribute-set> <!-- term-termsource-text-style -->
|
4782
4790
|
|
4783
|
-
<xsl:template name="
|
4791
|
+
<xsl:template name="refine_term-termsource-text-style">
|
4784
4792
|
</xsl:template>
|
4785
4793
|
|
4786
|
-
<xsl:attribute-set name="origin-style">
|
4794
|
+
<xsl:attribute-set name="term-origin-style">
|
4787
4795
|
<xsl:attribute name="color">blue</xsl:attribute>
|
4788
4796
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4789
|
-
</xsl:attribute-set> <!-- origin-style -->
|
4797
|
+
</xsl:attribute-set> <!-- term-origin-style -->
|
4790
4798
|
|
4791
|
-
<xsl:template name="
|
4799
|
+
<xsl:template name="refine_term-origin-style">
|
4792
4800
|
</xsl:template>
|
4793
4801
|
|
4794
4802
|
<!-- ====== -->
|
@@ -4832,9 +4840,9 @@
|
|
4832
4840
|
<!-- modification -->
|
4833
4841
|
<!-- ====== -->
|
4834
4842
|
<xsl:template match="mn:fmt-termsource" name="termsource">
|
4835
|
-
<fo:block xsl:use-attribute-sets="termsource-style">
|
4843
|
+
<fo:block xsl:use-attribute-sets="term-termsource-style">
|
4836
4844
|
|
4837
|
-
<xsl:call-template name="
|
4845
|
+
<xsl:call-template name="refine_term-termsource-style"/>
|
4838
4846
|
|
4839
4847
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4840
4848
|
<xsl:variable name="termsource_text">
|
@@ -4882,8 +4890,8 @@
|
|
4882
4890
|
|
4883
4891
|
<!-- text SOURCE: -->
|
4884
4892
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
4885
|
-
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4886
|
-
<xsl:call-template name="
|
4893
|
+
<fo:inline xsl:use-attribute-sets="term-termsource-text-style">
|
4894
|
+
<xsl:call-template name="refine_term-termsource-text-style"/>
|
4887
4895
|
<xsl:value-of select="."/>
|
4888
4896
|
</fo:inline>
|
4889
4897
|
</xsl:template>
|
@@ -4895,8 +4903,8 @@
|
|
4895
4903
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4896
4904
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4897
4905
|
</xsl:if>
|
4898
|
-
<fo:inline xsl:use-attribute-sets="origin-style">
|
4899
|
-
<xsl:call-template name="
|
4906
|
+
<fo:inline xsl:use-attribute-sets="term-origin-style">
|
4907
|
+
<xsl:call-template name="refine_term-origin-style"/>
|
4900
4908
|
<xsl:apply-templates/>
|
4901
4909
|
</fo:inline>
|
4902
4910
|
</fo:basic-link>
|
@@ -4944,14 +4952,14 @@
|
|
4944
4952
|
<xsl:variable name="levelTerm">
|
4945
4953
|
<xsl:call-template name="getLevelTermName"/>
|
4946
4954
|
</xsl:variable>
|
4947
|
-
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
4955
|
+
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
|
4948
4956
|
|
4949
|
-
<xsl:call-template name="
|
4957
|
+
<xsl:call-template name="refine_term-preferred-block-style"/>
|
4950
4958
|
|
4951
4959
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
4952
4960
|
|
4953
|
-
<fo:block xsl:use-attribute-sets="term-
|
4954
|
-
<xsl:call-template name="refine_term-
|
4961
|
+
<fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
|
4962
|
+
<xsl:call-template name="refine_term-number-style"/>
|
4955
4963
|
|
4956
4964
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
4957
4965
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -4961,8 +4969,8 @@
|
|
4961
4969
|
</fo:block>
|
4962
4970
|
</xsl:if>
|
4963
4971
|
|
4964
|
-
<fo:block xsl:use-attribute-sets="preferred-
|
4965
|
-
<xsl:call-template name="
|
4972
|
+
<fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
|
4973
|
+
<xsl:call-template name="refine_term-preferred-style"/>
|
4966
4974
|
|
4967
4975
|
<xsl:apply-templates/>
|
4968
4976
|
</fo:block>
|
@@ -4982,15 +4990,15 @@
|
|
4982
4990
|
<xsl:template match="mn:domain"/>
|
4983
4991
|
|
4984
4992
|
<xsl:template match="mn:fmt-admitted">
|
4985
|
-
<fo:block xsl:use-attribute-sets="admitted-style">
|
4986
|
-
<xsl:call-template name="
|
4993
|
+
<fo:block xsl:use-attribute-sets="term-admitted-style">
|
4994
|
+
<xsl:call-template name="refine_term-admitted-style"/>
|
4987
4995
|
<xsl:apply-templates/>
|
4988
4996
|
</fo:block>
|
4989
4997
|
</xsl:template>
|
4990
4998
|
|
4991
4999
|
<xsl:template match="mn:fmt-deprecates">
|
4992
|
-
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4993
|
-
<xsl:call-template name="
|
5000
|
+
<fo:block xsl:use-attribute-sets="term-deprecates-style">
|
5001
|
+
<xsl:call-template name="refine_term-deprecates-style"/>
|
4994
5002
|
<xsl:apply-templates/>
|
4995
5003
|
</fo:block>
|
4996
5004
|
</xsl:template>
|
@@ -5003,8 +5011,8 @@
|
|
5003
5011
|
<!-- End Preferred, admitted, deprecated -->
|
5004
5012
|
|
5005
5013
|
<xsl:template match="mn:fmt-related">
|
5006
|
-
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
5007
|
-
<xsl:call-template name="
|
5014
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
|
5015
|
+
<xsl:call-template name="refine_term-related-block-style"/>
|
5008
5016
|
<xsl:apply-templates/>
|
5009
5017
|
</fo:block>
|
5010
5018
|
</xsl:template>
|
@@ -5018,8 +5026,8 @@
|
|
5018
5026
|
<!-- definition -->
|
5019
5027
|
<!-- ========== -->
|
5020
5028
|
<xsl:template match="mn:fmt-definition">
|
5021
|
-
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
5022
|
-
<xsl:call-template name="
|
5029
|
+
<fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
|
5030
|
+
<xsl:call-template name="refine_term-definition-style"/>
|
5023
5031
|
<xsl:apply-templates/>
|
5024
5032
|
</fo:block>
|
5025
5033
|
</xsl:template>
|
@@ -14919,6 +14927,20 @@
|
|
14919
14927
|
</fo:block-container>
|
14920
14928
|
</xsl:template>
|
14921
14929
|
|
14930
|
+
<!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
|
14931
|
+
<xsl:template name="insertCoverPageFullImage">
|
14932
|
+
<xsl:param name="name">coverpage-image</xsl:param>
|
14933
|
+
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
|
14934
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
14935
|
+
<fo:flow flow-name="xsl-region-body">
|
14936
|
+
<xsl:call-template name="insertBackgroundPageImage">
|
14937
|
+
<xsl:with-param name="number" select="position()"/>
|
14938
|
+
</xsl:call-template>
|
14939
|
+
</fo:flow>
|
14940
|
+
</fo:page-sequence>
|
14941
|
+
</xsl:for-each>
|
14942
|
+
</xsl:template>
|
14943
|
+
|
14922
14944
|
<xsl:template name="insertPageImage">
|
14923
14945
|
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
14924
14946
|
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
@@ -1160,6 +1160,22 @@
|
|
1160
1160
|
<xsl:param name="month_year"/>
|
1161
1161
|
<xsl:param name="font-weight" select="'bold'"/>
|
1162
1162
|
<xsl:param name="orientation"/>
|
1163
|
+
|
1164
|
+
<xsl:call-template name="insertHeader">
|
1165
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
1166
|
+
<xsl:with-param name="orientation" select="$orientation"/>
|
1167
|
+
</xsl:call-template>
|
1168
|
+
|
1169
|
+
<xsl:call-template name="insertFooter">
|
1170
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
1171
|
+
<xsl:with-param name="edition" select="$edition"/>
|
1172
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
1173
|
+
</xsl:call-template>
|
1174
|
+
</xsl:template>
|
1175
|
+
|
1176
|
+
<xsl:template name="insertHeader">
|
1177
|
+
<xsl:param name="title_header"/>
|
1178
|
+
<xsl:param name="orientation"/>
|
1163
1179
|
<fo:static-content flow-name="header-odd" role="artifact">
|
1164
1180
|
<fo:block-container height="100%" font-size="8pt">
|
1165
1181
|
<fo:block padding-top="12.5mm">
|
@@ -1200,12 +1216,8 @@
|
|
1200
1216
|
<xsl:with-param name="title_header" select="$title_header"/>
|
1201
1217
|
<xsl:with-param name="orientation" select="$orientation"/>
|
1202
1218
|
</xsl:call-template>
|
1203
|
-
<xsl:call-template name="insertFooter">
|
1204
|
-
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
1205
|
-
<xsl:with-param name="edition" select="$edition"/>
|
1206
|
-
<xsl:with-param name="month_year" select="$month_year"/>
|
1207
|
-
</xsl:call-template>
|
1208
1219
|
</xsl:template>
|
1220
|
+
|
1209
1221
|
<xsl:template name="insertHeaderBlank">
|
1210
1222
|
<xsl:param name="title_header"/>
|
1211
1223
|
<xsl:param name="orientation"/>
|
@@ -1235,6 +1247,7 @@
|
|
1235
1247
|
</fo:block-container>
|
1236
1248
|
</fo:static-content>
|
1237
1249
|
</xsl:template>
|
1250
|
+
|
1238
1251
|
<xsl:template name="insertFooter">
|
1239
1252
|
<xsl:param name="docidentifier"/>
|
1240
1253
|
<xsl:param name="edition"/>
|
@@ -1255,6 +1268,7 @@
|
|
1255
1268
|
</fo:block-container>
|
1256
1269
|
</fo:static-content>
|
1257
1270
|
</xsl:template>
|
1271
|
+
|
1258
1272
|
<xsl:template name="insertHeaderFooterBlank">
|
1259
1273
|
<xsl:param name="title_header"/>
|
1260
1274
|
<xsl:param name="docidentifier"/>
|
@@ -4707,88 +4721,82 @@
|
|
4707
4721
|
<xsl:template name="refine_term-style">
|
4708
4722
|
</xsl:template>
|
4709
4723
|
|
4710
|
-
<xsl:attribute-set name="term-
|
4724
|
+
<xsl:attribute-set name="term-number-style">
|
4711
4725
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4712
4726
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4713
4727
|
</xsl:attribute-set> <!-- term-name-style -->
|
4714
4728
|
|
4715
|
-
<xsl:template name="refine_term-
|
4729
|
+
<xsl:template name="refine_term-number-style">
|
4716
4730
|
</xsl:template>
|
4717
4731
|
|
4718
|
-
<xsl:attribute-set name="preferred-style">
|
4719
|
-
</xsl:attribute-set> <!-- preferred-style -->
|
4720
|
-
|
4721
|
-
<xsl:template name="refine_preferred-style">
|
4722
|
-
</xsl:template>
|
4723
|
-
|
4724
|
-
<xsl:attribute-set name="preferred-block-style">
|
4732
|
+
<xsl:attribute-set name="term-preferred-block-style">
|
4725
4733
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
4726
4734
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
4727
4735
|
|
4728
|
-
<xsl:template name="
|
4736
|
+
<xsl:template name="refine_term-preferred-block-style">
|
4729
4737
|
</xsl:template>
|
4730
4738
|
|
4731
|
-
<xsl:attribute-set name="preferred-
|
4739
|
+
<xsl:attribute-set name="term-preferred-style">
|
4732
4740
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4733
4741
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4734
4742
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
4735
4743
|
|
4736
|
-
<xsl:template name="
|
4744
|
+
<xsl:template name="refine_term-preferred-style">
|
4737
4745
|
<xsl:if test="mn:strong">
|
4738
4746
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4739
4747
|
</xsl:if>
|
4740
4748
|
</xsl:template>
|
4741
4749
|
|
4742
|
-
<xsl:attribute-set name="domain-style">
|
4743
|
-
</xsl:attribute-set> <!-- domain-style -->
|
4750
|
+
<xsl:attribute-set name="term-domain-style">
|
4751
|
+
</xsl:attribute-set> <!-- term-domain-style -->
|
4744
4752
|
|
4745
|
-
<xsl:template name="
|
4753
|
+
<xsl:template name="refine_term-domain-style">
|
4746
4754
|
</xsl:template>
|
4747
4755
|
|
4748
|
-
<xsl:attribute-set name="admitted-style">
|
4749
|
-
</xsl:attribute-set> <!-- admitted-style -->
|
4756
|
+
<xsl:attribute-set name="term-admitted-style">
|
4757
|
+
</xsl:attribute-set> <!-- term-admitted-style -->
|
4750
4758
|
|
4751
|
-
<xsl:template name="
|
4759
|
+
<xsl:template name="refine_term-admitted-style">
|
4752
4760
|
</xsl:template>
|
4753
4761
|
|
4754
|
-
<xsl:attribute-set name="deprecates-style">
|
4755
|
-
</xsl:attribute-set> <!-- deprecates-style -->
|
4762
|
+
<xsl:attribute-set name="term-deprecates-style">
|
4763
|
+
</xsl:attribute-set> <!-- term-deprecates-style -->
|
4756
4764
|
|
4757
|
-
<xsl:template name="
|
4765
|
+
<xsl:template name="refine_term-deprecates-style">
|
4758
4766
|
</xsl:template>
|
4759
4767
|
|
4760
|
-
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
4768
|
+
<xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
|
4761
4769
|
</xsl:attribute-set>
|
4762
4770
|
|
4763
|
-
<xsl:template name="
|
4771
|
+
<xsl:template name="refine_term-related-block-style">
|
4764
4772
|
</xsl:template>
|
4765
4773
|
|
4766
|
-
<xsl:attribute-set name="definition-style">
|
4774
|
+
<xsl:attribute-set name="term-definition-style">
|
4767
4775
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4768
|
-
</xsl:attribute-set> <!-- definition-style -->
|
4776
|
+
</xsl:attribute-set> <!-- term-definition-style -->
|
4769
4777
|
|
4770
|
-
<xsl:template name="
|
4778
|
+
<xsl:template name="refine_term-definition-style">
|
4771
4779
|
</xsl:template>
|
4772
4780
|
|
4773
|
-
<xsl:attribute-set name="termsource-style">
|
4781
|
+
<xsl:attribute-set name="term-termsource-style">
|
4774
4782
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4775
|
-
</xsl:attribute-set> <!-- termsource-style -->
|
4783
|
+
</xsl:attribute-set> <!-- term-termsource-style -->
|
4776
4784
|
|
4777
|
-
<xsl:template name="
|
4778
|
-
</xsl:template> <!--
|
4785
|
+
<xsl:template name="refine_term-termsource-style">
|
4786
|
+
</xsl:template> <!-- refine_term-termsource-style -->
|
4779
4787
|
|
4780
|
-
<xsl:attribute-set name="termsource-text-style">
|
4781
|
-
</xsl:attribute-set> <!-- termsource-text-style -->
|
4788
|
+
<xsl:attribute-set name="term-termsource-text-style">
|
4789
|
+
</xsl:attribute-set> <!-- term-termsource-text-style -->
|
4782
4790
|
|
4783
|
-
<xsl:template name="
|
4791
|
+
<xsl:template name="refine_term-termsource-text-style">
|
4784
4792
|
</xsl:template>
|
4785
4793
|
|
4786
|
-
<xsl:attribute-set name="origin-style">
|
4794
|
+
<xsl:attribute-set name="term-origin-style">
|
4787
4795
|
<xsl:attribute name="color">blue</xsl:attribute>
|
4788
4796
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4789
|
-
</xsl:attribute-set> <!-- origin-style -->
|
4797
|
+
</xsl:attribute-set> <!-- term-origin-style -->
|
4790
4798
|
|
4791
|
-
<xsl:template name="
|
4799
|
+
<xsl:template name="refine_term-origin-style">
|
4792
4800
|
</xsl:template>
|
4793
4801
|
|
4794
4802
|
<!-- ====== -->
|
@@ -4832,9 +4840,9 @@
|
|
4832
4840
|
<!-- modification -->
|
4833
4841
|
<!-- ====== -->
|
4834
4842
|
<xsl:template match="mn:fmt-termsource" name="termsource">
|
4835
|
-
<fo:block xsl:use-attribute-sets="termsource-style">
|
4843
|
+
<fo:block xsl:use-attribute-sets="term-termsource-style">
|
4836
4844
|
|
4837
|
-
<xsl:call-template name="
|
4845
|
+
<xsl:call-template name="refine_term-termsource-style"/>
|
4838
4846
|
|
4839
4847
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4840
4848
|
<xsl:variable name="termsource_text">
|
@@ -4882,8 +4890,8 @@
|
|
4882
4890
|
|
4883
4891
|
<!-- text SOURCE: -->
|
4884
4892
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
4885
|
-
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4886
|
-
<xsl:call-template name="
|
4893
|
+
<fo:inline xsl:use-attribute-sets="term-termsource-text-style">
|
4894
|
+
<xsl:call-template name="refine_term-termsource-text-style"/>
|
4887
4895
|
<xsl:value-of select="."/>
|
4888
4896
|
</fo:inline>
|
4889
4897
|
</xsl:template>
|
@@ -4895,8 +4903,8 @@
|
|
4895
4903
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4896
4904
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4897
4905
|
</xsl:if>
|
4898
|
-
<fo:inline xsl:use-attribute-sets="origin-style">
|
4899
|
-
<xsl:call-template name="
|
4906
|
+
<fo:inline xsl:use-attribute-sets="term-origin-style">
|
4907
|
+
<xsl:call-template name="refine_term-origin-style"/>
|
4900
4908
|
<xsl:apply-templates/>
|
4901
4909
|
</fo:inline>
|
4902
4910
|
</fo:basic-link>
|
@@ -4944,14 +4952,14 @@
|
|
4944
4952
|
<xsl:variable name="levelTerm">
|
4945
4953
|
<xsl:call-template name="getLevelTermName"/>
|
4946
4954
|
</xsl:variable>
|
4947
|
-
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
4955
|
+
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
|
4948
4956
|
|
4949
|
-
<xsl:call-template name="
|
4957
|
+
<xsl:call-template name="refine_term-preferred-block-style"/>
|
4950
4958
|
|
4951
4959
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
4952
4960
|
|
4953
|
-
<fo:block xsl:use-attribute-sets="term-
|
4954
|
-
<xsl:call-template name="refine_term-
|
4961
|
+
<fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
|
4962
|
+
<xsl:call-template name="refine_term-number-style"/>
|
4955
4963
|
|
4956
4964
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
4957
4965
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -4961,8 +4969,8 @@
|
|
4961
4969
|
</fo:block>
|
4962
4970
|
</xsl:if>
|
4963
4971
|
|
4964
|
-
<fo:block xsl:use-attribute-sets="preferred-
|
4965
|
-
<xsl:call-template name="
|
4972
|
+
<fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
|
4973
|
+
<xsl:call-template name="refine_term-preferred-style"/>
|
4966
4974
|
|
4967
4975
|
<xsl:apply-templates/>
|
4968
4976
|
</fo:block>
|
@@ -4982,15 +4990,15 @@
|
|
4982
4990
|
<xsl:template match="mn:domain"/>
|
4983
4991
|
|
4984
4992
|
<xsl:template match="mn:fmt-admitted">
|
4985
|
-
<fo:block xsl:use-attribute-sets="admitted-style">
|
4986
|
-
<xsl:call-template name="
|
4993
|
+
<fo:block xsl:use-attribute-sets="term-admitted-style">
|
4994
|
+
<xsl:call-template name="refine_term-admitted-style"/>
|
4987
4995
|
<xsl:apply-templates/>
|
4988
4996
|
</fo:block>
|
4989
4997
|
</xsl:template>
|
4990
4998
|
|
4991
4999
|
<xsl:template match="mn:fmt-deprecates">
|
4992
|
-
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4993
|
-
<xsl:call-template name="
|
5000
|
+
<fo:block xsl:use-attribute-sets="term-deprecates-style">
|
5001
|
+
<xsl:call-template name="refine_term-deprecates-style"/>
|
4994
5002
|
<xsl:apply-templates/>
|
4995
5003
|
</fo:block>
|
4996
5004
|
</xsl:template>
|
@@ -5003,8 +5011,8 @@
|
|
5003
5011
|
<!-- End Preferred, admitted, deprecated -->
|
5004
5012
|
|
5005
5013
|
<xsl:template match="mn:fmt-related">
|
5006
|
-
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
5007
|
-
<xsl:call-template name="
|
5014
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
|
5015
|
+
<xsl:call-template name="refine_term-related-block-style"/>
|
5008
5016
|
<xsl:apply-templates/>
|
5009
5017
|
</fo:block>
|
5010
5018
|
</xsl:template>
|
@@ -5018,8 +5026,8 @@
|
|
5018
5026
|
<!-- definition -->
|
5019
5027
|
<!-- ========== -->
|
5020
5028
|
<xsl:template match="mn:fmt-definition">
|
5021
|
-
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
5022
|
-
<xsl:call-template name="
|
5029
|
+
<fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
|
5030
|
+
<xsl:call-template name="refine_term-definition-style"/>
|
5023
5031
|
<xsl:apply-templates/>
|
5024
5032
|
</fo:block>
|
5025
5033
|
</xsl:template>
|
@@ -14919,6 +14927,20 @@
|
|
14919
14927
|
</fo:block-container>
|
14920
14928
|
</xsl:template>
|
14921
14929
|
|
14930
|
+
<!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
|
14931
|
+
<xsl:template name="insertCoverPageFullImage">
|
14932
|
+
<xsl:param name="name">coverpage-image</xsl:param>
|
14933
|
+
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
|
14934
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
14935
|
+
<fo:flow flow-name="xsl-region-body">
|
14936
|
+
<xsl:call-template name="insertBackgroundPageImage">
|
14937
|
+
<xsl:with-param name="number" select="position()"/>
|
14938
|
+
</xsl:call-template>
|
14939
|
+
</fo:flow>
|
14940
|
+
</fo:page-sequence>
|
14941
|
+
</xsl:for-each>
|
14942
|
+
</xsl:template>
|
14943
|
+
|
14922
14944
|
<xsl:template name="insertPageImage">
|
14923
14945
|
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
14924
14946
|
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
@@ -869,7 +869,7 @@ depending on whether the items exist as independent documents, or are parts of a
|
|
869
869
|
</zeroOrMore>
|
870
870
|
</element>
|
871
871
|
</define>
|
872
|
-
<define name="BibItemType"
|
872
|
+
<define name="BibItemType">
|
873
873
|
<a:documentation>Type of bibliographic item.
|
874
874
|
The value list complies with the types provided in ISO 690:2021.
|
875
875
|
NOTE: These values represent a strict superset to BibTeX
|
data/lib/metanorma/iho/front.rb
CHANGED
@@ -46,7 +46,7 @@ module Metanorma
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def title_main(node, xml)
|
49
|
-
title = node.attr("title")
|
49
|
+
title = node.attr("title") or return
|
50
50
|
add_title_xml(xml, title, "en", "title-main")
|
51
51
|
end
|
52
52
|
|
@@ -57,6 +57,7 @@ module Metanorma
|
|
57
57
|
%i(appendix annex part supplement).each do |w|
|
58
58
|
typed_title(m, xml, w)
|
59
59
|
end
|
60
|
+
title_fallback(node, xml)
|
60
61
|
end
|
61
62
|
|
62
63
|
def typed_title(metadata, xml, type)
|
@@ -311,17 +311,28 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
311
311
|
</ref>
|
312
312
|
</optional>
|
313
313
|
<choice>
|
314
|
-
<a:documentation>Content of the figure</a:documentation>
|
315
|
-
<ref name="image"
|
314
|
+
<a:documentation>Content of the figure </a:documentation>
|
315
|
+
<ref name="image">
|
316
|
+
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
317
|
+
</ref>
|
316
318
|
<ref name="video"/>
|
317
319
|
<ref name="audio"/>
|
318
|
-
<ref name="pre"
|
320
|
+
<ref name="pre">
|
321
|
+
<a:documentation>figures can contain ASCII art</a:documentation>
|
322
|
+
</ref>
|
319
323
|
<oneOrMore>
|
320
|
-
<ref name="paragraph-with-footnote"
|
324
|
+
<ref name="paragraph-with-footnote">
|
325
|
+
<a:documentation>figures can contain discursive art</a:documentation>
|
326
|
+
</ref>
|
321
327
|
</oneOrMore>
|
322
328
|
<zeroOrMore>
|
323
|
-
<ref name="figure"
|
329
|
+
<ref name="figure">
|
330
|
+
<a:documentation>subfigures, nested directly within a figure</a:documentation>
|
331
|
+
</ref>
|
324
332
|
</zeroOrMore>
|
333
|
+
<ref name="table">
|
334
|
+
<a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
|
335
|
+
</ref>
|
325
336
|
</choice>
|
326
337
|
<zeroOrMore>
|
327
338
|
<ref name="fn">
|
@@ -354,17 +365,28 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
354
365
|
</ref>
|
355
366
|
</optional>
|
356
367
|
<choice>
|
357
|
-
<a:documentation>Content of the figure</a:documentation>
|
358
|
-
<ref name="image-no-id"
|
368
|
+
<a:documentation>Content of the figure </a:documentation>
|
369
|
+
<ref name="image-no-id">
|
370
|
+
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
371
|
+
</ref>
|
359
372
|
<ref name="video-no-id"/>
|
360
373
|
<ref name="audio-no-id"/>
|
361
|
-
<ref name="pre-no-id"
|
374
|
+
<ref name="pre-no-id">
|
375
|
+
<a:documentation>figures can contain ASCII art</a:documentation>
|
376
|
+
</ref>
|
362
377
|
<oneOrMore>
|
363
|
-
<ref name="paragraph-with-footnote-no-id"
|
378
|
+
<ref name="paragraph-with-footnote-no-id">
|
379
|
+
<a:documentation>figures can contain discursive art</a:documentation>
|
380
|
+
</ref>
|
364
381
|
</oneOrMore>
|
365
382
|
<zeroOrMore>
|
366
|
-
<ref name="figure-no-id"
|
383
|
+
<ref name="figure-no-id">
|
384
|
+
<a:documentation>subfigures, nested directly within a figure</a:documentation>
|
385
|
+
</ref>
|
367
386
|
</zeroOrMore>
|
387
|
+
<ref name="table-no-id">
|
388
|
+
<a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
|
389
|
+
</ref>
|
368
390
|
</choice>
|
369
391
|
<zeroOrMore>
|
370
392
|
<ref name="fn">
|
@@ -876,6 +898,9 @@ titlecase, or lowercase</a:documentation>
|
|
876
898
|
<data type="boolean"/>
|
877
899
|
</attribute>
|
878
900
|
</optional>
|
901
|
+
<ref name="LocalizedStringAttributes">
|
902
|
+
<a:documentation>Specify language of bibitem, can be used to render it with language-specific bibliographic style</a:documentation>
|
903
|
+
</ref>
|
879
904
|
<ref name="ReducedBibliographicItem"/>
|
880
905
|
</element>
|
881
906
|
</define>
|
data/metanorma-iho.gemspec
CHANGED
@@ -40,5 +40,5 @@ spec.add_development_dependency "rubocop-performance"
|
|
40
40
|
spec.add_development_dependency "sassc-embedded", "~> 1"
|
41
41
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
42
42
|
spec.add_development_dependency "timecop", "~> 0.9"
|
43
|
-
spec.add_development_dependency "canon"
|
43
|
+
spec.add_development_dependency "canon", "= 0.1.3"
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -182,16 +182,16 @@ dependencies:
|
|
182
182
|
name: canon
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - '='
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 0.1.3
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - '='
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 0.1.3
|
195
195
|
description: |
|
196
196
|
metanorma-iho lets you write IHO in AsciiDoc syntax.
|
197
197
|
|