metanorma-iho 1.2.7 → 1.2.9
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/i18n-en.yaml +2 -0
- data/lib/isodoc/iho/iho.specification.xsl +195 -138
- data/lib/isodoc/iho/iho.standard.xsl +195 -138
- data/lib/isodoc/iho/init.rb +2 -2
- data/lib/metanorma/iho/biblio.rng +4 -4
- data/lib/metanorma/iho/converter.rb +2 -0
- data/lib/metanorma/iho/front.rb +5 -7
- data/lib/metanorma/iho/isodoc.rng +27 -10
- data/lib/metanorma/iho/log.rb +17 -0
- data/lib/metanorma/iho/version.rb +1 -1
- data/lib/relaton/render/config.yml +1 -1
- data/metanorma-iho.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 047b8afa4d2bda12e9646e698b9e6438b92d41a58d0642fdb266373f33155beb
|
|
4
|
+
data.tar.gz: 4954543c60c106353afb7395d878cfc0d4c62c8e7061b0d1fab9fc92a32b72b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b4d225989bd269accff32f96177a9e7912313e51bf5b6d54a523ecfbbd6c0082102d9bbf7b90f8d28e1047c17d757ca584a2b1d5ca0445f32f623226236e695
|
|
7
|
+
data.tar.gz: 20e85c84ff5e1f6ecc6bcc4d4da523384516e76d6aaba46620fff1e31cfa8b29e894810e643abb9ec9ddfd6b59bccd14aa1276907393666b5fe4816689136d32
|
data/lib/isodoc/iho/i18n-en.yaml
CHANGED
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
<fo:table-cell number-columns-spanned="2" border="0.5pt solid rgb(0, 21, 50)" font-weight="bold" color="rgb(0, 0, 76)" padding-top="3mm">
|
|
496
496
|
<fo:block-container height="165mm" width="115mm">
|
|
497
497
|
<fo:block-container margin-left="10mm">
|
|
498
|
-
<fo:block-container
|
|
498
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
499
499
|
|
|
500
500
|
<!-- <fo:block-container display-align="center" height="90mm"> -->
|
|
501
501
|
<fo:table table-layout="fixed" width="100%">
|
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
</fo:table-cell>
|
|
561
561
|
<fo:table-cell number-rows-spanned="2">
|
|
562
562
|
<fo:block-container width="79mm" height="72mm" margin-left="56.8mm" background-color="rgb(0, 172, 158)" text-align="right" display-align="after">
|
|
563
|
-
<fo:block-container
|
|
563
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
564
564
|
<fo:block font-size="8pt" color="white" margin-right="5mm" margin-bottom="5mm" line-height-shift-adjustment="disregard-shifts">
|
|
565
565
|
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/>
|
|
566
566
|
</fo:block>
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
</xsl:call-template>
|
|
612
612
|
<fo:flow flow-name="xsl-region-body">
|
|
613
613
|
<fo:block-container margin-left="-1.5mm" margin-right="-1mm">
|
|
614
|
-
<fo:block-container
|
|
614
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style" border="0.5pt solid black">
|
|
615
615
|
<fo:block-container margin-top="6.5mm" margin-left="7.5mm" margin-right="8.5mm" margin-bottom="7.5mm">
|
|
616
616
|
<fo:block-container margin="0">
|
|
617
617
|
<fo:block text-align="justify">
|
|
@@ -921,25 +921,6 @@
|
|
|
921
921
|
<!-- title -->
|
|
922
922
|
<!-- ====== -->
|
|
923
923
|
|
|
924
|
-
<xsl:template match="mn:annex/mn:fmt-title" name="annex_title">
|
|
925
|
-
<fo:block xsl:use-attribute-sets="annex-title-style">
|
|
926
|
-
|
|
927
|
-
<xsl:call-template name="refine_annex-title-style"/>
|
|
928
|
-
|
|
929
|
-
<xsl:apply-templates/>
|
|
930
|
-
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
931
|
-
</fo:block>
|
|
932
|
-
</xsl:template>
|
|
933
|
-
|
|
934
|
-
<xsl:template match="mn:bibliography/mn:references[not(@normative='true')]/mn:fmt-title">
|
|
935
|
-
<fo:block xsl:use-attribute-sets="references-non-normative-title-style">
|
|
936
|
-
|
|
937
|
-
<xsl:call-template name="refine_references-non-normative-title-style"/>
|
|
938
|
-
|
|
939
|
-
<xsl:apply-templates/>
|
|
940
|
-
</fo:block>
|
|
941
|
-
</xsl:template>
|
|
942
|
-
|
|
943
924
|
<xsl:template match="mn:clause" priority="3">
|
|
944
925
|
<xsl:if test="parent::mn:preface or (parent::mn:page_sequence and local-name(../..) = 'preface')">
|
|
945
926
|
<fo:block break-after="page"/>
|
|
@@ -960,19 +941,6 @@
|
|
|
960
941
|
|
|
961
942
|
<xsl:template match="mn:fmt-title" name="title">
|
|
962
943
|
|
|
963
|
-
<xsl:variable name="level">
|
|
964
|
-
<xsl:call-template name="getLevel"/>
|
|
965
|
-
</xsl:variable>
|
|
966
|
-
|
|
967
|
-
<xsl:variable name="font-size">
|
|
968
|
-
<xsl:choose>
|
|
969
|
-
<xsl:when test="$level = 1">12pt</xsl:when>
|
|
970
|
-
<xsl:when test="$level = 2">11pt</xsl:when>
|
|
971
|
-
<xsl:when test="$level >= 3">10pt</xsl:when>
|
|
972
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
|
973
|
-
</xsl:choose>
|
|
974
|
-
</xsl:variable>
|
|
975
|
-
|
|
976
944
|
<xsl:variable name="element-name">
|
|
977
945
|
<xsl:choose>
|
|
978
946
|
<xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
|
|
@@ -980,58 +948,20 @@
|
|
|
980
948
|
</xsl:choose>
|
|
981
949
|
</xsl:variable>
|
|
982
950
|
|
|
983
|
-
<xsl:
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
<xsl:when test="@type = 'floating-title' or @type = 'section-title'">
|
|
987
|
-
<xsl:copy-of select="@id"/>
|
|
988
|
-
</xsl:when>
|
|
989
|
-
<xsl:otherwise>
|
|
990
|
-
<xsl:for-each select="parent::mn:clause">
|
|
991
|
-
<xsl:call-template name="setId"/>
|
|
992
|
-
</xsl:for-each>
|
|
993
|
-
</xsl:otherwise>
|
|
994
|
-
</xsl:choose>
|
|
995
|
-
|
|
996
|
-
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
|
997
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
998
|
-
<xsl:attribute name="space-before">
|
|
999
|
-
<xsl:choose>
|
|
1000
|
-
<xsl:when test="$level = 1">24pt</xsl:when>
|
|
1001
|
-
<xsl:when test="$level = 2 and ../preceding-sibling::*[1][self::mn:fmt-title]">10pt</xsl:when>
|
|
1002
|
-
<xsl:when test="$level = 2">24pt</xsl:when>
|
|
1003
|
-
<xsl:when test="$level >= 3">6pt</xsl:when>
|
|
1004
|
-
<xsl:when test="ancestor::mn:preface">8pt</xsl:when>
|
|
1005
|
-
<xsl:when test="$level = ''">6pt</xsl:when><!-- 13.5pt -->
|
|
1006
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
|
1007
|
-
</xsl:choose>
|
|
1008
|
-
</xsl:attribute>
|
|
1009
|
-
<xsl:attribute name="space-after">
|
|
1010
|
-
<xsl:choose>
|
|
1011
|
-
<xsl:when test="$level >= 3">6pt</xsl:when>
|
|
1012
|
-
<xsl:otherwise>10pt</xsl:otherwise>
|
|
1013
|
-
</xsl:choose>
|
|
1014
|
-
</xsl:attribute>
|
|
1015
|
-
<!-- <xsl:attribute name="margin-bottom">10pt</xsl:attribute> -->
|
|
1016
|
-
|
|
1017
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1018
|
-
|
|
1019
|
-
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
951
|
+
<xsl:variable name="title_styles">
|
|
952
|
+
<styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
|
|
953
|
+
</xsl:variable>
|
|
1020
954
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
</xsl:if>
|
|
955
|
+
<xsl:element name="{$element-name}">
|
|
956
|
+
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
1024
957
|
|
|
1025
958
|
<xsl:apply-templates/>
|
|
1026
959
|
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
1027
960
|
</xsl:element>
|
|
1028
961
|
|
|
1029
962
|
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::mn:p)">
|
|
1030
|
-
<fo:block
|
|
1031
|
-
<xsl:value-of select="$linebreak"/>
|
|
1032
|
-
</fo:block>
|
|
963
|
+
<fo:block><xsl:value-of select="$linebreak"/></fo:block>
|
|
1033
964
|
</xsl:if>
|
|
1034
|
-
|
|
1035
965
|
</xsl:template>
|
|
1036
966
|
<!-- ====== -->
|
|
1037
967
|
<!-- ====== -->
|
|
@@ -1049,57 +979,15 @@
|
|
|
1049
979
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
1050
980
|
</xsl:choose>
|
|
1051
981
|
</xsl:variable>
|
|
1052
|
-
<xsl:element name="{$element-name}">
|
|
1053
|
-
<xsl:attribute name="text-align">
|
|
1054
|
-
<xsl:choose>
|
|
1055
|
-
<xsl:when test="ancestor::mn:quote">justify</xsl:when>
|
|
1056
|
-
<xsl:when test="ancestor::mn:feedback-statement">right</xsl:when>
|
|
1057
|
-
<xsl:when test="ancestor::mn:boilerplate and not(@align)">justify</xsl:when>
|
|
1058
|
-
<xsl:when test="@align = 'justified'">justify</xsl:when>
|
|
1059
|
-
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
|
1060
|
-
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
1061
|
-
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
1062
|
-
<xsl:otherwise>justify</xsl:otherwise>
|
|
1063
|
-
</xsl:choose>
|
|
1064
|
-
</xsl:attribute>
|
|
1065
|
-
<xsl:call-template name="setKeepAttributes"/>
|
|
1066
|
-
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
1067
|
-
<xsl:if test="parent::mn:dd">
|
|
1068
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1069
|
-
</xsl:if>
|
|
1070
|
-
<xsl:if test="ancestor::*[2][self::mn:license-statement] and not(following-sibling::mn:p)">
|
|
1071
|
-
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
1072
|
-
</xsl:if>
|
|
1073
|
-
<xsl:attribute name="line-height">115%</xsl:attribute>
|
|
1074
|
-
<!-- <xsl:attribute name="border">1pt solid red</xsl:attribute> -->
|
|
1075
|
-
<xsl:if test="ancestor::mn:boilerplate and not(ancestor::mn:feedback-statement)">
|
|
1076
|
-
<xsl:attribute name="line-height">125%</xsl:attribute>
|
|
1077
|
-
<xsl:attribute name="space-after">14pt</xsl:attribute>
|
|
1078
|
-
</xsl:if>
|
|
1079
|
-
<xsl:if test="following-sibling::*[1][self::mn:ol or self::mn:ul or self::mn:note or self::mn:termnote or self::mn:example or self::mn:dl]">
|
|
1080
|
-
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
|
1081
|
-
</xsl:if>
|
|
1082
|
-
<xsl:if test="following-sibling::*[1][self::mn:dl]">
|
|
1083
|
-
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
1084
|
-
</xsl:if>
|
|
1085
|
-
<xsl:if test="ancestor::mn:quote">
|
|
1086
|
-
<xsl:attribute name="line-height">130%</xsl:attribute>
|
|
1087
|
-
<!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
|
|
1088
|
-
</xsl:if>
|
|
1089
|
-
|
|
1090
|
-
<xsl:if test="ancestor::*[self::mn:recommendation or self::mn:requirement or self::mn:permission] and not(following-sibling::*)">
|
|
1091
|
-
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
1092
|
-
</xsl:if>
|
|
1093
|
-
|
|
1094
|
-
<xsl:if test="ancestor::mn:li and ancestor::mn:table">
|
|
1095
|
-
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
1096
|
-
</xsl:if>
|
|
1097
982
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
983
|
+
<xsl:variable name="p_styles">
|
|
984
|
+
<styles xsl:use-attribute-sets="p-style">
|
|
985
|
+
<xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
|
|
986
|
+
</styles>
|
|
987
|
+
</xsl:variable>
|
|
1101
988
|
|
|
1102
|
-
|
|
989
|
+
<xsl:element name="{$element-name}">
|
|
990
|
+
<xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
|
|
1103
991
|
|
|
1104
992
|
<xsl:apply-templates>
|
|
1105
993
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
|
@@ -3413,6 +3301,10 @@
|
|
|
3413
3301
|
</xsl:element>
|
|
3414
3302
|
</xsl:template>
|
|
3415
3303
|
|
|
3304
|
+
<!-- show sourcecode's name 'before' or 'after' source code -->
|
|
3305
|
+
<xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
|
|
3306
|
+
</xsl:variable>
|
|
3307
|
+
|
|
3416
3308
|
<xsl:template match="mn:sourcecode" name="sourcecode">
|
|
3417
3309
|
|
|
3418
3310
|
<xsl:variable name="sourcecode_attributes">
|
|
@@ -3436,7 +3328,12 @@
|
|
|
3436
3328
|
|
|
3437
3329
|
<xsl:call-template name="refine_sourcecode-container-style"/>
|
|
3438
3330
|
|
|
3439
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
3331
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
3332
|
+
|
|
3333
|
+
<!-- <xsl:if test="$namespace = 'rsd'"> -->
|
|
3334
|
+
<xsl:if test="$sourcecode-name-position = 'before'">
|
|
3335
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
|
|
3336
|
+
</xsl:if>
|
|
3440
3337
|
|
|
3441
3338
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
3442
3339
|
|
|
@@ -3458,7 +3355,16 @@
|
|
|
3458
3355
|
</fo:block>
|
|
3459
3356
|
|
|
3460
3357
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
|
3461
|
-
|
|
3358
|
+
|
|
3359
|
+
<!-- <xsl:choose>
|
|
3360
|
+
<xsl:when test="$namespace = 'rsd'"></xsl:when>
|
|
3361
|
+
<xsl:otherwise>
|
|
3362
|
+
<xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
|
|
3363
|
+
<!-- </xsl:otherwise>
|
|
3364
|
+
</xsl:choose> -->
|
|
3365
|
+
<xsl:if test="$sourcecode-name-position = 'after'">
|
|
3366
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
|
3367
|
+
</xsl:if>
|
|
3462
3368
|
|
|
3463
3369
|
</fo:block-container>
|
|
3464
3370
|
</fo:block-container>
|
|
@@ -9258,6 +9164,10 @@
|
|
|
9258
9164
|
<!-- image -->
|
|
9259
9165
|
<!-- ====== -->
|
|
9260
9166
|
|
|
9167
|
+
<!-- show figure's name 'before' or 'after' image -->
|
|
9168
|
+
<xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
|
|
9169
|
+
</xsl:variable>
|
|
9170
|
+
|
|
9261
9171
|
<xsl:template match="mn:figure" name="figure">
|
|
9262
9172
|
<xsl:variable name="isAdded" select="@added"/>
|
|
9263
9173
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
@@ -9270,6 +9180,10 @@
|
|
|
9270
9180
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
|
9271
9181
|
</xsl:call-template>
|
|
9272
9182
|
|
|
9183
|
+
<xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
|
|
9184
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
|
9185
|
+
</xsl:if>
|
|
9186
|
+
|
|
9273
9187
|
<!-- Example: Dimensions in millimeters -->
|
|
9274
9188
|
<xsl:apply-templates select="mn:note[@type = 'units']"/>
|
|
9275
9189
|
|
|
@@ -9290,7 +9204,16 @@
|
|
|
9290
9204
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
|
9291
9205
|
<xsl:call-template name="showFigureKey"/>
|
|
9292
9206
|
</xsl:if>
|
|
9293
|
-
|
|
9207
|
+
|
|
9208
|
+
<!-- <xsl:choose>
|
|
9209
|
+
<xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
|
|
9210
|
+
<xsl:otherwise>
|
|
9211
|
+
<xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
|
|
9212
|
+
<!-- </xsl:otherwise>
|
|
9213
|
+
</xsl:choose> -->
|
|
9214
|
+
<xsl:if test="$figure-name-position = 'after'">
|
|
9215
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
|
9216
|
+
</xsl:if>
|
|
9294
9217
|
|
|
9295
9218
|
</fo:block-container>
|
|
9296
9219
|
</xsl:template>
|
|
@@ -11374,7 +11297,7 @@
|
|
|
11374
11297
|
<!-- END Admonition -->
|
|
11375
11298
|
<!-- ================ -->
|
|
11376
11299
|
|
|
11377
|
-
<xsl:attribute-set name="
|
|
11300
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
11378
11301
|
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
11379
11302
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
11380
11303
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
@@ -11384,8 +11307,7 @@
|
|
|
11384
11307
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
11385
11308
|
</xsl:attribute-set>
|
|
11386
11309
|
|
|
11387
|
-
<xsl:template name="
|
|
11388
|
-
|
|
11310
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
11389
11311
|
</xsl:template>
|
|
11390
11312
|
|
|
11391
11313
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -13498,13 +13420,14 @@
|
|
|
13498
13420
|
<!-- ===================================== -->
|
|
13499
13421
|
|
|
13500
13422
|
<xsl:attribute-set name="annex-title-style">
|
|
13423
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13501
13424
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
13502
13425
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13503
13426
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
13427
|
+
<xsl:attribute name="space-before">0</xsl:attribute>
|
|
13504
13428
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
13505
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13506
13429
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
13507
|
-
</xsl:attribute-set>
|
|
13430
|
+
</xsl:attribute-set> <!-- annex-title-style -->
|
|
13508
13431
|
|
|
13509
13432
|
<xsl:template name="refine_annex-title-style">
|
|
13510
13433
|
</xsl:template>
|
|
@@ -13515,6 +13438,127 @@
|
|
|
13515
13438
|
<xsl:template name="refine_p-zzSTDTitle1-style">
|
|
13516
13439
|
</xsl:template>
|
|
13517
13440
|
|
|
13441
|
+
<xsl:attribute-set name="p-style">
|
|
13442
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
13443
|
+
<xsl:attribute name="line-height">115%</xsl:attribute>
|
|
13444
|
+
</xsl:attribute-set> <!-- p-style -->
|
|
13445
|
+
|
|
13446
|
+
<xsl:template name="refine_p-style">
|
|
13447
|
+
<xsl:param name="element-name"/>
|
|
13448
|
+
<xsl:param name="margin"/>
|
|
13449
|
+
<xsl:attribute name="text-align">
|
|
13450
|
+
<xsl:choose>
|
|
13451
|
+
<xsl:when test="ancestor::mn:quote">justify</xsl:when>
|
|
13452
|
+
<xsl:when test="ancestor::mn:feedback-statement">right</xsl:when>
|
|
13453
|
+
<xsl:when test="ancestor::mn:boilerplate and not(@align)">justify</xsl:when>
|
|
13454
|
+
<xsl:when test="@align = 'justified'">justify</xsl:when>
|
|
13455
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
|
13456
|
+
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
13457
|
+
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
13458
|
+
<xsl:otherwise>justify</xsl:otherwise>
|
|
13459
|
+
</xsl:choose>
|
|
13460
|
+
</xsl:attribute>
|
|
13461
|
+
<xsl:call-template name="setKeepAttributes"/>
|
|
13462
|
+
|
|
13463
|
+
<xsl:if test="parent::mn:dd">
|
|
13464
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
13465
|
+
</xsl:if>
|
|
13466
|
+
<xsl:if test="ancestor::*[2][self::mn:license-statement] and not(following-sibling::mn:p)">
|
|
13467
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
13468
|
+
</xsl:if>
|
|
13469
|
+
|
|
13470
|
+
<!-- <xsl:attribute name="border">1pt solid red</xsl:attribute> -->
|
|
13471
|
+
<xsl:if test="ancestor::mn:boilerplate and not(ancestor::mn:feedback-statement)">
|
|
13472
|
+
<xsl:attribute name="line-height">125%</xsl:attribute>
|
|
13473
|
+
<xsl:attribute name="space-after">14pt</xsl:attribute>
|
|
13474
|
+
</xsl:if>
|
|
13475
|
+
<xsl:if test="following-sibling::*[1][self::mn:ol or self::mn:ul or self::mn:note or self::mn:termnote or self::mn:example or self::mn:dl]">
|
|
13476
|
+
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
|
13477
|
+
</xsl:if>
|
|
13478
|
+
<xsl:if test="following-sibling::*[1][self::mn:dl]">
|
|
13479
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
13480
|
+
</xsl:if>
|
|
13481
|
+
<xsl:if test="ancestor::mn:quote">
|
|
13482
|
+
<xsl:attribute name="line-height">130%</xsl:attribute>
|
|
13483
|
+
<!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
|
|
13484
|
+
</xsl:if>
|
|
13485
|
+
|
|
13486
|
+
<xsl:if test="ancestor::*[self::mn:recommendation or self::mn:requirement or self::mn:permission] and not(following-sibling::*)">
|
|
13487
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
13488
|
+
</xsl:if>
|
|
13489
|
+
|
|
13490
|
+
<xsl:if test="ancestor::mn:li and ancestor::mn:table">
|
|
13491
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
13492
|
+
</xsl:if>
|
|
13493
|
+
|
|
13494
|
+
<xsl:if test=".//mn:fn">
|
|
13495
|
+
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
|
13496
|
+
</xsl:if>
|
|
13497
|
+
|
|
13498
|
+
<xsl:copy-of select="@id"/>
|
|
13499
|
+
<!-- $namespace = 'iho' -->
|
|
13500
|
+
|
|
13501
|
+
</xsl:template> <!-- refine_p-style -->
|
|
13502
|
+
|
|
13503
|
+
<xsl:attribute-set name="title-style">
|
|
13504
|
+
<!-- Note: font-size for level 1 title -->
|
|
13505
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
13506
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13507
|
+
<xsl:attribute name="space-before">24pt</xsl:attribute>
|
|
13508
|
+
<xsl:attribute name="space-after">10pt</xsl:attribute>
|
|
13509
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13510
|
+
</xsl:attribute-set> <!-- title-style -->
|
|
13511
|
+
|
|
13512
|
+
<xsl:template name="refine_title-style">
|
|
13513
|
+
<xsl:param name="element-name"/>
|
|
13514
|
+
<xsl:variable name="level">
|
|
13515
|
+
<xsl:call-template name="getLevel"/>
|
|
13516
|
+
</xsl:variable>
|
|
13517
|
+
<xsl:choose>
|
|
13518
|
+
<xsl:when test="@type = 'floating-title' or @type = 'section-title'">
|
|
13519
|
+
<xsl:copy-of select="@id"/>
|
|
13520
|
+
</xsl:when>
|
|
13521
|
+
<xsl:otherwise>
|
|
13522
|
+
<xsl:for-each select="parent::mn:clause">
|
|
13523
|
+
<xsl:call-template name="setId"/>
|
|
13524
|
+
</xsl:for-each>
|
|
13525
|
+
</xsl:otherwise>
|
|
13526
|
+
</xsl:choose>
|
|
13527
|
+
|
|
13528
|
+
<xsl:if test="$level = 2">
|
|
13529
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
13530
|
+
<xsl:attribute name="space-before">24pt</xsl:attribute>
|
|
13531
|
+
<xsl:if test="../preceding-sibling::*[1][self::mn:fmt-title]">
|
|
13532
|
+
<xsl:attribute name="space-before">10pt</xsl:attribute>
|
|
13533
|
+
</xsl:if>
|
|
13534
|
+
</xsl:if>
|
|
13535
|
+
<xsl:if test="$level >= 3">
|
|
13536
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
13537
|
+
<xsl:attribute name="space-before">6pt</xsl:attribute>
|
|
13538
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
13539
|
+
</xsl:if>
|
|
13540
|
+
|
|
13541
|
+
<xsl:if test="../@id = '_document_history' or . = 'Document History'">
|
|
13542
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
13543
|
+
</xsl:if>
|
|
13544
|
+
|
|
13545
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
13546
|
+
<xsl:variable name="annex_title_styles">
|
|
13547
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
13548
|
+
</xsl:variable>
|
|
13549
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
13550
|
+
</xsl:if>
|
|
13551
|
+
|
|
13552
|
+
<xsl:if test="parent::mn:references[not(@normative='true')] and ancestor::mn:bibliography">
|
|
13553
|
+
<xsl:variable name="bibliography_title_styles">
|
|
13554
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
13555
|
+
</xsl:variable>
|
|
13556
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
13557
|
+
</xsl:if>
|
|
13558
|
+
<!-- $namespace = 'iho' -->
|
|
13559
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
13560
|
+
</xsl:template> <!-- refine_title-style -->
|
|
13561
|
+
|
|
13518
13562
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
13519
13563
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
13520
13564
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
@@ -13853,6 +13897,12 @@
|
|
|
13853
13897
|
</xsl:choose>
|
|
13854
13898
|
</xsl:template>
|
|
13855
13899
|
|
|
13900
|
+
<xsl:attribute-set name="reset-margins-style">
|
|
13901
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
13902
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
13903
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
13904
|
+
</xsl:attribute-set>
|
|
13905
|
+
|
|
13856
13906
|
<xsl:attribute-set name="clause-style">
|
|
13857
13907
|
|
|
13858
13908
|
</xsl:attribute-set>
|
|
@@ -14864,8 +14914,9 @@
|
|
|
14864
14914
|
|
|
14865
14915
|
<xsl:template name="setTextAlignment">
|
|
14866
14916
|
<xsl:param name="default">left</xsl:param>
|
|
14917
|
+
<xsl:param name="skip_default">false</xsl:param>
|
|
14867
14918
|
<xsl:variable name="align" select="normalize-space(@align)"/>
|
|
14868
|
-
<xsl:
|
|
14919
|
+
<xsl:variable name="text_align">
|
|
14869
14920
|
<xsl:choose>
|
|
14870
14921
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
|
14871
14922
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
|
@@ -14873,9 +14924,13 @@
|
|
|
14873
14924
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
|
14874
14925
|
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
14875
14926
|
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
14927
|
+
<xsl:when test="$skip_default = 'true'"/>
|
|
14876
14928
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
|
14877
14929
|
</xsl:choose>
|
|
14878
|
-
</xsl:
|
|
14930
|
+
</xsl:variable>
|
|
14931
|
+
<xsl:if test="normalize-space($text_align) != ''">
|
|
14932
|
+
<xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
|
|
14933
|
+
</xsl:if>
|
|
14879
14934
|
<xsl:if test="$align = 'indent'">
|
|
14880
14935
|
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
|
14881
14936
|
</xsl:if>
|
|
@@ -14883,8 +14938,10 @@
|
|
|
14883
14938
|
|
|
14884
14939
|
<xsl:template name="setBlockAttributes">
|
|
14885
14940
|
<xsl:param name="text_align_default">left</xsl:param>
|
|
14941
|
+
<xsl:param name="skip_text_align_default">false</xsl:param>
|
|
14886
14942
|
<xsl:call-template name="setTextAlignment">
|
|
14887
14943
|
<xsl:with-param name="default" select="$text_align_default"/>
|
|
14944
|
+
<xsl:with-param name="skip_default" select="$skip_text_align_default"/>
|
|
14888
14945
|
</xsl:call-template>
|
|
14889
14946
|
<xsl:call-template name="setKeepAttributes"/>
|
|
14890
14947
|
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
<fo:table-cell number-columns-spanned="2" border="0.5pt solid rgb(0, 21, 50)" font-weight="bold" color="rgb(0, 0, 76)" padding-top="3mm">
|
|
496
496
|
<fo:block-container height="165mm" width="115mm">
|
|
497
497
|
<fo:block-container margin-left="10mm">
|
|
498
|
-
<fo:block-container
|
|
498
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
499
499
|
|
|
500
500
|
<!-- <fo:block-container display-align="center" height="90mm"> -->
|
|
501
501
|
<fo:table table-layout="fixed" width="100%">
|
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
</fo:table-cell>
|
|
561
561
|
<fo:table-cell number-rows-spanned="2">
|
|
562
562
|
<fo:block-container width="79mm" height="72mm" margin-left="56.8mm" background-color="rgb(0, 172, 158)" text-align="right" display-align="after">
|
|
563
|
-
<fo:block-container
|
|
563
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
564
564
|
<fo:block font-size="8pt" color="white" margin-right="5mm" margin-bottom="5mm" line-height-shift-adjustment="disregard-shifts">
|
|
565
565
|
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/>
|
|
566
566
|
</fo:block>
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
</xsl:call-template>
|
|
612
612
|
<fo:flow flow-name="xsl-region-body">
|
|
613
613
|
<fo:block-container margin-left="-1.5mm" margin-right="-1mm">
|
|
614
|
-
<fo:block-container
|
|
614
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style" border="0.5pt solid black">
|
|
615
615
|
<fo:block-container margin-top="6.5mm" margin-left="7.5mm" margin-right="8.5mm" margin-bottom="7.5mm">
|
|
616
616
|
<fo:block-container margin="0">
|
|
617
617
|
<fo:block text-align="justify">
|
|
@@ -921,25 +921,6 @@
|
|
|
921
921
|
<!-- title -->
|
|
922
922
|
<!-- ====== -->
|
|
923
923
|
|
|
924
|
-
<xsl:template match="mn:annex/mn:fmt-title" name="annex_title">
|
|
925
|
-
<fo:block xsl:use-attribute-sets="annex-title-style">
|
|
926
|
-
|
|
927
|
-
<xsl:call-template name="refine_annex-title-style"/>
|
|
928
|
-
|
|
929
|
-
<xsl:apply-templates/>
|
|
930
|
-
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
931
|
-
</fo:block>
|
|
932
|
-
</xsl:template>
|
|
933
|
-
|
|
934
|
-
<xsl:template match="mn:bibliography/mn:references[not(@normative='true')]/mn:fmt-title">
|
|
935
|
-
<fo:block xsl:use-attribute-sets="references-non-normative-title-style">
|
|
936
|
-
|
|
937
|
-
<xsl:call-template name="refine_references-non-normative-title-style"/>
|
|
938
|
-
|
|
939
|
-
<xsl:apply-templates/>
|
|
940
|
-
</fo:block>
|
|
941
|
-
</xsl:template>
|
|
942
|
-
|
|
943
924
|
<xsl:template match="mn:clause" priority="3">
|
|
944
925
|
<xsl:if test="parent::mn:preface or (parent::mn:page_sequence and local-name(../..) = 'preface')">
|
|
945
926
|
<fo:block break-after="page"/>
|
|
@@ -960,19 +941,6 @@
|
|
|
960
941
|
|
|
961
942
|
<xsl:template match="mn:fmt-title" name="title">
|
|
962
943
|
|
|
963
|
-
<xsl:variable name="level">
|
|
964
|
-
<xsl:call-template name="getLevel"/>
|
|
965
|
-
</xsl:variable>
|
|
966
|
-
|
|
967
|
-
<xsl:variable name="font-size">
|
|
968
|
-
<xsl:choose>
|
|
969
|
-
<xsl:when test="$level = 1">12pt</xsl:when>
|
|
970
|
-
<xsl:when test="$level = 2">11pt</xsl:when>
|
|
971
|
-
<xsl:when test="$level >= 3">10pt</xsl:when>
|
|
972
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
|
973
|
-
</xsl:choose>
|
|
974
|
-
</xsl:variable>
|
|
975
|
-
|
|
976
944
|
<xsl:variable name="element-name">
|
|
977
945
|
<xsl:choose>
|
|
978
946
|
<xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
|
|
@@ -980,58 +948,20 @@
|
|
|
980
948
|
</xsl:choose>
|
|
981
949
|
</xsl:variable>
|
|
982
950
|
|
|
983
|
-
<xsl:
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
<xsl:when test="@type = 'floating-title' or @type = 'section-title'">
|
|
987
|
-
<xsl:copy-of select="@id"/>
|
|
988
|
-
</xsl:when>
|
|
989
|
-
<xsl:otherwise>
|
|
990
|
-
<xsl:for-each select="parent::mn:clause">
|
|
991
|
-
<xsl:call-template name="setId"/>
|
|
992
|
-
</xsl:for-each>
|
|
993
|
-
</xsl:otherwise>
|
|
994
|
-
</xsl:choose>
|
|
995
|
-
|
|
996
|
-
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
|
997
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
998
|
-
<xsl:attribute name="space-before">
|
|
999
|
-
<xsl:choose>
|
|
1000
|
-
<xsl:when test="$level = 1">24pt</xsl:when>
|
|
1001
|
-
<xsl:when test="$level = 2 and ../preceding-sibling::*[1][self::mn:fmt-title]">10pt</xsl:when>
|
|
1002
|
-
<xsl:when test="$level = 2">24pt</xsl:when>
|
|
1003
|
-
<xsl:when test="$level >= 3">6pt</xsl:when>
|
|
1004
|
-
<xsl:when test="ancestor::mn:preface">8pt</xsl:when>
|
|
1005
|
-
<xsl:when test="$level = ''">6pt</xsl:when><!-- 13.5pt -->
|
|
1006
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
|
1007
|
-
</xsl:choose>
|
|
1008
|
-
</xsl:attribute>
|
|
1009
|
-
<xsl:attribute name="space-after">
|
|
1010
|
-
<xsl:choose>
|
|
1011
|
-
<xsl:when test="$level >= 3">6pt</xsl:when>
|
|
1012
|
-
<xsl:otherwise>10pt</xsl:otherwise>
|
|
1013
|
-
</xsl:choose>
|
|
1014
|
-
</xsl:attribute>
|
|
1015
|
-
<!-- <xsl:attribute name="margin-bottom">10pt</xsl:attribute> -->
|
|
1016
|
-
|
|
1017
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1018
|
-
|
|
1019
|
-
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
951
|
+
<xsl:variable name="title_styles">
|
|
952
|
+
<styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
|
|
953
|
+
</xsl:variable>
|
|
1020
954
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
</xsl:if>
|
|
955
|
+
<xsl:element name="{$element-name}">
|
|
956
|
+
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
1024
957
|
|
|
1025
958
|
<xsl:apply-templates/>
|
|
1026
959
|
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
1027
960
|
</xsl:element>
|
|
1028
961
|
|
|
1029
962
|
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::mn:p)">
|
|
1030
|
-
<fo:block
|
|
1031
|
-
<xsl:value-of select="$linebreak"/>
|
|
1032
|
-
</fo:block>
|
|
963
|
+
<fo:block><xsl:value-of select="$linebreak"/></fo:block>
|
|
1033
964
|
</xsl:if>
|
|
1034
|
-
|
|
1035
965
|
</xsl:template>
|
|
1036
966
|
<!-- ====== -->
|
|
1037
967
|
<!-- ====== -->
|
|
@@ -1049,57 +979,15 @@
|
|
|
1049
979
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
1050
980
|
</xsl:choose>
|
|
1051
981
|
</xsl:variable>
|
|
1052
|
-
<xsl:element name="{$element-name}">
|
|
1053
|
-
<xsl:attribute name="text-align">
|
|
1054
|
-
<xsl:choose>
|
|
1055
|
-
<xsl:when test="ancestor::mn:quote">justify</xsl:when>
|
|
1056
|
-
<xsl:when test="ancestor::mn:feedback-statement">right</xsl:when>
|
|
1057
|
-
<xsl:when test="ancestor::mn:boilerplate and not(@align)">justify</xsl:when>
|
|
1058
|
-
<xsl:when test="@align = 'justified'">justify</xsl:when>
|
|
1059
|
-
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
|
1060
|
-
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
1061
|
-
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
1062
|
-
<xsl:otherwise>justify</xsl:otherwise>
|
|
1063
|
-
</xsl:choose>
|
|
1064
|
-
</xsl:attribute>
|
|
1065
|
-
<xsl:call-template name="setKeepAttributes"/>
|
|
1066
|
-
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
1067
|
-
<xsl:if test="parent::mn:dd">
|
|
1068
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1069
|
-
</xsl:if>
|
|
1070
|
-
<xsl:if test="ancestor::*[2][self::mn:license-statement] and not(following-sibling::mn:p)">
|
|
1071
|
-
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
1072
|
-
</xsl:if>
|
|
1073
|
-
<xsl:attribute name="line-height">115%</xsl:attribute>
|
|
1074
|
-
<!-- <xsl:attribute name="border">1pt solid red</xsl:attribute> -->
|
|
1075
|
-
<xsl:if test="ancestor::mn:boilerplate and not(ancestor::mn:feedback-statement)">
|
|
1076
|
-
<xsl:attribute name="line-height">125%</xsl:attribute>
|
|
1077
|
-
<xsl:attribute name="space-after">14pt</xsl:attribute>
|
|
1078
|
-
</xsl:if>
|
|
1079
|
-
<xsl:if test="following-sibling::*[1][self::mn:ol or self::mn:ul or self::mn:note or self::mn:termnote or self::mn:example or self::mn:dl]">
|
|
1080
|
-
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
|
1081
|
-
</xsl:if>
|
|
1082
|
-
<xsl:if test="following-sibling::*[1][self::mn:dl]">
|
|
1083
|
-
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
1084
|
-
</xsl:if>
|
|
1085
|
-
<xsl:if test="ancestor::mn:quote">
|
|
1086
|
-
<xsl:attribute name="line-height">130%</xsl:attribute>
|
|
1087
|
-
<!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
|
|
1088
|
-
</xsl:if>
|
|
1089
|
-
|
|
1090
|
-
<xsl:if test="ancestor::*[self::mn:recommendation or self::mn:requirement or self::mn:permission] and not(following-sibling::*)">
|
|
1091
|
-
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
1092
|
-
</xsl:if>
|
|
1093
|
-
|
|
1094
|
-
<xsl:if test="ancestor::mn:li and ancestor::mn:table">
|
|
1095
|
-
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
1096
|
-
</xsl:if>
|
|
1097
982
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
983
|
+
<xsl:variable name="p_styles">
|
|
984
|
+
<styles xsl:use-attribute-sets="p-style">
|
|
985
|
+
<xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
|
|
986
|
+
</styles>
|
|
987
|
+
</xsl:variable>
|
|
1101
988
|
|
|
1102
|
-
|
|
989
|
+
<xsl:element name="{$element-name}">
|
|
990
|
+
<xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
|
|
1103
991
|
|
|
1104
992
|
<xsl:apply-templates>
|
|
1105
993
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
|
@@ -3413,6 +3301,10 @@
|
|
|
3413
3301
|
</xsl:element>
|
|
3414
3302
|
</xsl:template>
|
|
3415
3303
|
|
|
3304
|
+
<!-- show sourcecode's name 'before' or 'after' source code -->
|
|
3305
|
+
<xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
|
|
3306
|
+
</xsl:variable>
|
|
3307
|
+
|
|
3416
3308
|
<xsl:template match="mn:sourcecode" name="sourcecode">
|
|
3417
3309
|
|
|
3418
3310
|
<xsl:variable name="sourcecode_attributes">
|
|
@@ -3436,7 +3328,12 @@
|
|
|
3436
3328
|
|
|
3437
3329
|
<xsl:call-template name="refine_sourcecode-container-style"/>
|
|
3438
3330
|
|
|
3439
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
3331
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
3332
|
+
|
|
3333
|
+
<!-- <xsl:if test="$namespace = 'rsd'"> -->
|
|
3334
|
+
<xsl:if test="$sourcecode-name-position = 'before'">
|
|
3335
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
|
|
3336
|
+
</xsl:if>
|
|
3440
3337
|
|
|
3441
3338
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
3442
3339
|
|
|
@@ -3458,7 +3355,16 @@
|
|
|
3458
3355
|
</fo:block>
|
|
3459
3356
|
|
|
3460
3357
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
|
3461
|
-
|
|
3358
|
+
|
|
3359
|
+
<!-- <xsl:choose>
|
|
3360
|
+
<xsl:when test="$namespace = 'rsd'"></xsl:when>
|
|
3361
|
+
<xsl:otherwise>
|
|
3362
|
+
<xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
|
|
3363
|
+
<!-- </xsl:otherwise>
|
|
3364
|
+
</xsl:choose> -->
|
|
3365
|
+
<xsl:if test="$sourcecode-name-position = 'after'">
|
|
3366
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
|
3367
|
+
</xsl:if>
|
|
3462
3368
|
|
|
3463
3369
|
</fo:block-container>
|
|
3464
3370
|
</fo:block-container>
|
|
@@ -9258,6 +9164,10 @@
|
|
|
9258
9164
|
<!-- image -->
|
|
9259
9165
|
<!-- ====== -->
|
|
9260
9166
|
|
|
9167
|
+
<!-- show figure's name 'before' or 'after' image -->
|
|
9168
|
+
<xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
|
|
9169
|
+
</xsl:variable>
|
|
9170
|
+
|
|
9261
9171
|
<xsl:template match="mn:figure" name="figure">
|
|
9262
9172
|
<xsl:variable name="isAdded" select="@added"/>
|
|
9263
9173
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
@@ -9270,6 +9180,10 @@
|
|
|
9270
9180
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
|
9271
9181
|
</xsl:call-template>
|
|
9272
9182
|
|
|
9183
|
+
<xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
|
|
9184
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
|
9185
|
+
</xsl:if>
|
|
9186
|
+
|
|
9273
9187
|
<!-- Example: Dimensions in millimeters -->
|
|
9274
9188
|
<xsl:apply-templates select="mn:note[@type = 'units']"/>
|
|
9275
9189
|
|
|
@@ -9290,7 +9204,16 @@
|
|
|
9290
9204
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
|
9291
9205
|
<xsl:call-template name="showFigureKey"/>
|
|
9292
9206
|
</xsl:if>
|
|
9293
|
-
|
|
9207
|
+
|
|
9208
|
+
<!-- <xsl:choose>
|
|
9209
|
+
<xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
|
|
9210
|
+
<xsl:otherwise>
|
|
9211
|
+
<xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
|
|
9212
|
+
<!-- </xsl:otherwise>
|
|
9213
|
+
</xsl:choose> -->
|
|
9214
|
+
<xsl:if test="$figure-name-position = 'after'">
|
|
9215
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
|
9216
|
+
</xsl:if>
|
|
9294
9217
|
|
|
9295
9218
|
</fo:block-container>
|
|
9296
9219
|
</xsl:template>
|
|
@@ -11374,7 +11297,7 @@
|
|
|
11374
11297
|
<!-- END Admonition -->
|
|
11375
11298
|
<!-- ================ -->
|
|
11376
11299
|
|
|
11377
|
-
<xsl:attribute-set name="
|
|
11300
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
11378
11301
|
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
11379
11302
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
11380
11303
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
@@ -11384,8 +11307,7 @@
|
|
|
11384
11307
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
11385
11308
|
</xsl:attribute-set>
|
|
11386
11309
|
|
|
11387
|
-
<xsl:template name="
|
|
11388
|
-
|
|
11310
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
11389
11311
|
</xsl:template>
|
|
11390
11312
|
|
|
11391
11313
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -13498,13 +13420,14 @@
|
|
|
13498
13420
|
<!-- ===================================== -->
|
|
13499
13421
|
|
|
13500
13422
|
<xsl:attribute-set name="annex-title-style">
|
|
13423
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13501
13424
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
13502
13425
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13503
13426
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
13427
|
+
<xsl:attribute name="space-before">0</xsl:attribute>
|
|
13504
13428
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
13505
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13506
13429
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
13507
|
-
</xsl:attribute-set>
|
|
13430
|
+
</xsl:attribute-set> <!-- annex-title-style -->
|
|
13508
13431
|
|
|
13509
13432
|
<xsl:template name="refine_annex-title-style">
|
|
13510
13433
|
</xsl:template>
|
|
@@ -13515,6 +13438,127 @@
|
|
|
13515
13438
|
<xsl:template name="refine_p-zzSTDTitle1-style">
|
|
13516
13439
|
</xsl:template>
|
|
13517
13440
|
|
|
13441
|
+
<xsl:attribute-set name="p-style">
|
|
13442
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
13443
|
+
<xsl:attribute name="line-height">115%</xsl:attribute>
|
|
13444
|
+
</xsl:attribute-set> <!-- p-style -->
|
|
13445
|
+
|
|
13446
|
+
<xsl:template name="refine_p-style">
|
|
13447
|
+
<xsl:param name="element-name"/>
|
|
13448
|
+
<xsl:param name="margin"/>
|
|
13449
|
+
<xsl:attribute name="text-align">
|
|
13450
|
+
<xsl:choose>
|
|
13451
|
+
<xsl:when test="ancestor::mn:quote">justify</xsl:when>
|
|
13452
|
+
<xsl:when test="ancestor::mn:feedback-statement">right</xsl:when>
|
|
13453
|
+
<xsl:when test="ancestor::mn:boilerplate and not(@align)">justify</xsl:when>
|
|
13454
|
+
<xsl:when test="@align = 'justified'">justify</xsl:when>
|
|
13455
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
|
13456
|
+
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
13457
|
+
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
13458
|
+
<xsl:otherwise>justify</xsl:otherwise>
|
|
13459
|
+
</xsl:choose>
|
|
13460
|
+
</xsl:attribute>
|
|
13461
|
+
<xsl:call-template name="setKeepAttributes"/>
|
|
13462
|
+
|
|
13463
|
+
<xsl:if test="parent::mn:dd">
|
|
13464
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
13465
|
+
</xsl:if>
|
|
13466
|
+
<xsl:if test="ancestor::*[2][self::mn:license-statement] and not(following-sibling::mn:p)">
|
|
13467
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
13468
|
+
</xsl:if>
|
|
13469
|
+
|
|
13470
|
+
<!-- <xsl:attribute name="border">1pt solid red</xsl:attribute> -->
|
|
13471
|
+
<xsl:if test="ancestor::mn:boilerplate and not(ancestor::mn:feedback-statement)">
|
|
13472
|
+
<xsl:attribute name="line-height">125%</xsl:attribute>
|
|
13473
|
+
<xsl:attribute name="space-after">14pt</xsl:attribute>
|
|
13474
|
+
</xsl:if>
|
|
13475
|
+
<xsl:if test="following-sibling::*[1][self::mn:ol or self::mn:ul or self::mn:note or self::mn:termnote or self::mn:example or self::mn:dl]">
|
|
13476
|
+
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
|
13477
|
+
</xsl:if>
|
|
13478
|
+
<xsl:if test="following-sibling::*[1][self::mn:dl]">
|
|
13479
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
13480
|
+
</xsl:if>
|
|
13481
|
+
<xsl:if test="ancestor::mn:quote">
|
|
13482
|
+
<xsl:attribute name="line-height">130%</xsl:attribute>
|
|
13483
|
+
<!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
|
|
13484
|
+
</xsl:if>
|
|
13485
|
+
|
|
13486
|
+
<xsl:if test="ancestor::*[self::mn:recommendation or self::mn:requirement or self::mn:permission] and not(following-sibling::*)">
|
|
13487
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
13488
|
+
</xsl:if>
|
|
13489
|
+
|
|
13490
|
+
<xsl:if test="ancestor::mn:li and ancestor::mn:table">
|
|
13491
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
13492
|
+
</xsl:if>
|
|
13493
|
+
|
|
13494
|
+
<xsl:if test=".//mn:fn">
|
|
13495
|
+
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
|
13496
|
+
</xsl:if>
|
|
13497
|
+
|
|
13498
|
+
<xsl:copy-of select="@id"/>
|
|
13499
|
+
<!-- $namespace = 'iho' -->
|
|
13500
|
+
|
|
13501
|
+
</xsl:template> <!-- refine_p-style -->
|
|
13502
|
+
|
|
13503
|
+
<xsl:attribute-set name="title-style">
|
|
13504
|
+
<!-- Note: font-size for level 1 title -->
|
|
13505
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
13506
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13507
|
+
<xsl:attribute name="space-before">24pt</xsl:attribute>
|
|
13508
|
+
<xsl:attribute name="space-after">10pt</xsl:attribute>
|
|
13509
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13510
|
+
</xsl:attribute-set> <!-- title-style -->
|
|
13511
|
+
|
|
13512
|
+
<xsl:template name="refine_title-style">
|
|
13513
|
+
<xsl:param name="element-name"/>
|
|
13514
|
+
<xsl:variable name="level">
|
|
13515
|
+
<xsl:call-template name="getLevel"/>
|
|
13516
|
+
</xsl:variable>
|
|
13517
|
+
<xsl:choose>
|
|
13518
|
+
<xsl:when test="@type = 'floating-title' or @type = 'section-title'">
|
|
13519
|
+
<xsl:copy-of select="@id"/>
|
|
13520
|
+
</xsl:when>
|
|
13521
|
+
<xsl:otherwise>
|
|
13522
|
+
<xsl:for-each select="parent::mn:clause">
|
|
13523
|
+
<xsl:call-template name="setId"/>
|
|
13524
|
+
</xsl:for-each>
|
|
13525
|
+
</xsl:otherwise>
|
|
13526
|
+
</xsl:choose>
|
|
13527
|
+
|
|
13528
|
+
<xsl:if test="$level = 2">
|
|
13529
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
13530
|
+
<xsl:attribute name="space-before">24pt</xsl:attribute>
|
|
13531
|
+
<xsl:if test="../preceding-sibling::*[1][self::mn:fmt-title]">
|
|
13532
|
+
<xsl:attribute name="space-before">10pt</xsl:attribute>
|
|
13533
|
+
</xsl:if>
|
|
13534
|
+
</xsl:if>
|
|
13535
|
+
<xsl:if test="$level >= 3">
|
|
13536
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
13537
|
+
<xsl:attribute name="space-before">6pt</xsl:attribute>
|
|
13538
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
13539
|
+
</xsl:if>
|
|
13540
|
+
|
|
13541
|
+
<xsl:if test="../@id = '_document_history' or . = 'Document History'">
|
|
13542
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
13543
|
+
</xsl:if>
|
|
13544
|
+
|
|
13545
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
13546
|
+
<xsl:variable name="annex_title_styles">
|
|
13547
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
13548
|
+
</xsl:variable>
|
|
13549
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
13550
|
+
</xsl:if>
|
|
13551
|
+
|
|
13552
|
+
<xsl:if test="parent::mn:references[not(@normative='true')] and ancestor::mn:bibliography">
|
|
13553
|
+
<xsl:variable name="bibliography_title_styles">
|
|
13554
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
13555
|
+
</xsl:variable>
|
|
13556
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
13557
|
+
</xsl:if>
|
|
13558
|
+
<!-- $namespace = 'iho' -->
|
|
13559
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
13560
|
+
</xsl:template> <!-- refine_title-style -->
|
|
13561
|
+
|
|
13518
13562
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
13519
13563
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
13520
13564
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
@@ -13853,6 +13897,12 @@
|
|
|
13853
13897
|
</xsl:choose>
|
|
13854
13898
|
</xsl:template>
|
|
13855
13899
|
|
|
13900
|
+
<xsl:attribute-set name="reset-margins-style">
|
|
13901
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
13902
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
13903
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
13904
|
+
</xsl:attribute-set>
|
|
13905
|
+
|
|
13856
13906
|
<xsl:attribute-set name="clause-style">
|
|
13857
13907
|
|
|
13858
13908
|
</xsl:attribute-set>
|
|
@@ -14864,8 +14914,9 @@
|
|
|
14864
14914
|
|
|
14865
14915
|
<xsl:template name="setTextAlignment">
|
|
14866
14916
|
<xsl:param name="default">left</xsl:param>
|
|
14917
|
+
<xsl:param name="skip_default">false</xsl:param>
|
|
14867
14918
|
<xsl:variable name="align" select="normalize-space(@align)"/>
|
|
14868
|
-
<xsl:
|
|
14919
|
+
<xsl:variable name="text_align">
|
|
14869
14920
|
<xsl:choose>
|
|
14870
14921
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
|
14871
14922
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
|
@@ -14873,9 +14924,13 @@
|
|
|
14873
14924
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
|
14874
14925
|
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
14875
14926
|
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
14927
|
+
<xsl:when test="$skip_default = 'true'"/>
|
|
14876
14928
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
|
14877
14929
|
</xsl:choose>
|
|
14878
|
-
</xsl:
|
|
14930
|
+
</xsl:variable>
|
|
14931
|
+
<xsl:if test="normalize-space($text_align) != ''">
|
|
14932
|
+
<xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
|
|
14933
|
+
</xsl:if>
|
|
14879
14934
|
<xsl:if test="$align = 'indent'">
|
|
14880
14935
|
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
|
14881
14936
|
</xsl:if>
|
|
@@ -14883,8 +14938,10 @@
|
|
|
14883
14938
|
|
|
14884
14939
|
<xsl:template name="setBlockAttributes">
|
|
14885
14940
|
<xsl:param name="text_align_default">left</xsl:param>
|
|
14941
|
+
<xsl:param name="skip_text_align_default">false</xsl:param>
|
|
14886
14942
|
<xsl:call-template name="setTextAlignment">
|
|
14887
14943
|
<xsl:with-param name="default" select="$text_align_default"/>
|
|
14944
|
+
<xsl:with-param name="skip_default" select="$skip_text_align_default"/>
|
|
14888
14945
|
</xsl:call-template>
|
|
14889
14946
|
<xsl:call-template name="setKeepAttributes"/>
|
|
14890
14947
|
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
data/lib/isodoc/iho/init.rb
CHANGED
|
@@ -17,8 +17,8 @@ module IsoDoc
|
|
|
17
17
|
def i18n_init(lang, script, locale, i18nyaml = nil)
|
|
18
18
|
@i18n = I18n.new(
|
|
19
19
|
lang, script, locale: locale,
|
|
20
|
-
i18nyaml: i18nyaml
|
|
21
|
-
Metanorma::Iho.configuration.i18nyaml
|
|
20
|
+
i18nyaml: [i18nyaml,
|
|
21
|
+
Metanorma::Iho.configuration.i18nyaml, @i18nyaml]
|
|
22
22
|
)
|
|
23
23
|
end
|
|
24
24
|
|
|
@@ -690,7 +690,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
|
|
|
690
690
|
<define name="CitationType">
|
|
691
691
|
<attribute name="bibitemid">
|
|
692
692
|
<a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
|
|
693
|
-
<
|
|
693
|
+
<ref name="IdRefType"/>
|
|
694
694
|
</attribute>
|
|
695
695
|
<choice>
|
|
696
696
|
<zeroOrMore>
|
|
@@ -1296,17 +1296,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
|
1296
1296
|
</define>
|
|
1297
1297
|
<define name="validityBegins">
|
|
1298
1298
|
<element name="validityBegins">
|
|
1299
|
-
<ref name="
|
|
1299
|
+
<ref name="ISO8601DateTime"/>
|
|
1300
1300
|
</element>
|
|
1301
1301
|
</define>
|
|
1302
1302
|
<define name="validityEnds">
|
|
1303
1303
|
<element name="validityEnds">
|
|
1304
|
-
<ref name="
|
|
1304
|
+
<ref name="ISO8601DateTime"/>
|
|
1305
1305
|
</element>
|
|
1306
1306
|
</define>
|
|
1307
1307
|
<define name="validityRevision">
|
|
1308
1308
|
<element name="revision">
|
|
1309
|
-
<ref name="
|
|
1309
|
+
<ref name="ISO8601DateTime"/>
|
|
1310
1310
|
</element>
|
|
1311
1311
|
</define>
|
|
1312
1312
|
<define name="TypedTitleString">
|
data/lib/metanorma/iho/front.rb
CHANGED
|
@@ -12,15 +12,14 @@ module Metanorma
|
|
|
12
12
|
def metadata_series(node, xml)
|
|
13
13
|
series = node.attr("series") or return
|
|
14
14
|
xml.series type: "main" do |s|
|
|
15
|
-
s
|
|
16
|
-
s
|
|
15
|
+
add_noko_elem(s, "title", SERIESNAME[series.to_sym] || "N/A")
|
|
16
|
+
add_noko_elem(s, "abbreviation", series)
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def metadata_ext(node, ext)
|
|
21
21
|
unless node.attr("workgroup")
|
|
22
|
-
@log.add("
|
|
23
|
-
"Missing workgroup attribute for document")
|
|
22
|
+
@log.add("IHO_1", nil)
|
|
24
23
|
end
|
|
25
24
|
super
|
|
26
25
|
metadata_commentperiod(node, ext)
|
|
@@ -28,10 +27,9 @@ module Metanorma
|
|
|
28
27
|
|
|
29
28
|
def metadata_commentperiod(node, xml)
|
|
30
29
|
from = node.attr("comment-from") or return
|
|
31
|
-
to = node.attr("comment-to")
|
|
32
30
|
xml.commentperiod do |c|
|
|
33
|
-
c
|
|
34
|
-
c
|
|
31
|
+
add_noko_elem(c, "from", from)
|
|
32
|
+
add_noko_elem(c, "to", node.attr("comment-to"))
|
|
35
33
|
end
|
|
36
34
|
end
|
|
37
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.4 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
|
|
|
905
905
|
</element>
|
|
906
906
|
</define>
|
|
907
907
|
<define name="image" combine="choice">
|
|
908
|
-
<
|
|
909
|
-
<
|
|
910
|
-
|
|
911
|
-
<
|
|
912
|
-
|
|
913
|
-
<
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
908
|
+
<choice>
|
|
909
|
+
<element name="image">
|
|
910
|
+
<ref name="RequiredId"/>
|
|
911
|
+
<ref name="ImageAttributes"/>
|
|
912
|
+
<optional>
|
|
913
|
+
<element name="svg">
|
|
914
|
+
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
915
|
+
<oneOrMore>
|
|
916
|
+
<choice>
|
|
917
|
+
<text/>
|
|
918
|
+
<ref name="AnyElement"/>
|
|
919
|
+
</choice>
|
|
920
|
+
</oneOrMore>
|
|
921
|
+
</element>
|
|
922
|
+
</optional>
|
|
923
|
+
</element>
|
|
924
|
+
<element name="svg">
|
|
925
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
926
|
+
<oneOrMore>
|
|
927
|
+
<choice>
|
|
928
|
+
<text/>
|
|
929
|
+
<ref name="AnyElement"/>
|
|
930
|
+
</choice>
|
|
931
|
+
</oneOrMore>
|
|
932
|
+
</element>
|
|
933
|
+
</choice>
|
|
917
934
|
</define>
|
|
918
935
|
<define name="ParagraphFnBody" combine="interleave">
|
|
919
936
|
<ref name="BlockSource">
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Metanorma
|
|
2
|
+
module Iho
|
|
3
|
+
class Converter
|
|
4
|
+
IHO_LOG_MESSAGES = {
|
|
5
|
+
# rubocop:disable Naming/VariableNumber
|
|
6
|
+
"IHO_1": { category: "AsciiDoc Input",
|
|
7
|
+
error: "Missing workgroup attribute for document",
|
|
8
|
+
severity: 2 },
|
|
9
|
+
}.freeze
|
|
10
|
+
# rubocop:enable Naming/VariableNumber
|
|
11
|
+
|
|
12
|
+
def log_messages
|
|
13
|
+
super.merge(IHO_LOG_MESSAGES)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
template:
|
|
2
|
-
standard: "{{ authoritative_identifier | first }}
|
|
2
|
+
standard: "{{ authoritative_identifier | first }} {{ edition | downcase }} : {{ title }}$$$ {{ creatornames }}$$$ {{role}}$$$ {{ publisher }} ({{ uri }})"
|
|
3
3
|
misc: standard
|
|
4
4
|
nametemplate:
|
|
5
5
|
one: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0] }} {{initials[0]}}{% endif %}"
|
data/metanorma-iho.gemspec
CHANGED
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.require_paths = ["lib"]
|
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
29
29
|
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 3.
|
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 3.2.0"
|
|
31
31
|
|
|
32
32
|
spec.add_development_dependency "debug"
|
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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.9
|
|
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-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
19
|
+
version: 3.2.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.
|
|
26
|
+
version: 3.2.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -247,6 +247,7 @@ files:
|
|
|
247
247
|
- lib/metanorma/iho/front.rb
|
|
248
248
|
- lib/metanorma/iho/iho.rng
|
|
249
249
|
- lib/metanorma/iho/isodoc.rng
|
|
250
|
+
- lib/metanorma/iho/log.rb
|
|
250
251
|
- lib/metanorma/iho/processor.rb
|
|
251
252
|
- lib/metanorma/iho/relaton-iho.rng
|
|
252
253
|
- lib/metanorma/iho/reqt.rng
|