metanorma-iho 1.2.7 → 1.2.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 223913811da0f7ec6a4d4bd50fca2906a4187424ba722dd604e4edb238130aeb
4
- data.tar.gz: 2850ba37bfa0a78db48994854868ad4bb63caac199cfda5a8fbc00b74d6d0efe
3
+ metadata.gz: 30da89e6d9b659db533ad837527513e9904905288a505c16bc049431f7e385f5
4
+ data.tar.gz: 4b5292a9cfd07d358be2fe89454cb348255db4b9ceefd641284cf484c8aadac5
5
5
  SHA512:
6
- metadata.gz: c338a5b8fbc82e177b135ece92260e51b53e454312890bfe12571a469ac896b4ce973d80e1702ee64e91691cfd30774e76c01e45748aa290ef1d2d04e92bc548
7
- data.tar.gz: 569baa095565a7d2fe7026031fd5d489b9039874602dc51f69a46c26079dc6023d447cab77126f3a8634152c38b8a8502f2d99d0e9b12cca48ff2b1fda137d85
6
+ metadata.gz: 7f4565efcbf7454fa2ebb9d6e59d6b2a73da106dcd8c3157dac367d0a3ac18f28568a874ab571c6c2eb9494bfe1ba38466d9a904b237709770488e92eaeeb368
7
+ data.tar.gz: d618eb6dfc45a401e92f542e030a2bb66aaf920c1b780b421047fd602addc3e6e1678ea6d1e1c530f3f460f57cc4ff3b94570a1a49e2bac9bf4765533a616be1
@@ -2,3 +2,5 @@ table_of_contents: Contents
2
2
  clause: Section
3
3
  subclause: Clause
4
4
  dochistory: Document History
5
+ punct:
6
+ biblio-field-delimiter: ", "
@@ -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 margin-left="0mm">
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 margin-left="0mm">
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 margin-left="0mm" margin-right="0mm" border="0.5pt solid black">
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">
@@ -960,19 +960,6 @@
960
960
 
961
961
  <xsl:template match="mn:fmt-title" name="title">
962
962
 
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 &gt;= 3">10pt</xsl:when>
972
- <xsl:otherwise>12pt</xsl:otherwise>
973
- </xsl:choose>
974
- </xsl:variable>
975
-
976
963
  <xsl:variable name="element-name">
977
964
  <xsl:choose>
978
965
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -980,58 +967,20 @@
980
967
  </xsl:choose>
981
968
  </xsl:variable>
982
969
 
983
- <xsl:element name="{$element-name}">
984
-
985
- <xsl:choose>
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 &gt;= 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 &gt;= 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>
970
+ <xsl:variable name="title_styles">
971
+ <styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
972
+ </xsl:variable>
1020
973
 
1021
- <xsl:if test="../@id = '_document_history' or . = 'Document History'">
1022
- <xsl:attribute name="text-align">center</xsl:attribute>
1023
- </xsl:if>
974
+ <xsl:element name="{$element-name}">
975
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
1024
976
 
1025
977
  <xsl:apply-templates/>
1026
978
  <xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
1027
979
  </xsl:element>
1028
980
 
1029
981
  <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::mn:p)">
1030
- <fo:block> <!-- margin-bottom="12pt" -->
1031
- <xsl:value-of select="$linebreak"/>
1032
- </fo:block>
982
+ <fo:block><xsl:value-of select="$linebreak"/></fo:block>
1033
983
  </xsl:if>
1034
-
1035
984
  </xsl:template>
1036
985
  <!-- ====== -->
1037
986
  <!-- ====== -->
@@ -1049,57 +998,15 @@
1049
998
  <xsl:otherwise>fo:block</xsl:otherwise>
1050
999
  </xsl:choose>
1051
1000
  </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
1001
 
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
-
1098
- <xsl:if test=".//mn:fn">
1099
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
1100
- </xsl:if>
1002
+ <xsl:variable name="p_styles">
1003
+ <styles xsl:use-attribute-sets="p-style">
1004
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
1005
+ </styles>
1006
+ </xsl:variable>
1101
1007
 
1102
- <xsl:copy-of select="@id"/>
1008
+ <xsl:element name="{$element-name}">
1009
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
1103
1010
 
1104
1011
  <xsl:apply-templates>
1105
1012
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -3413,6 +3320,10 @@
3413
3320
  </xsl:element>
3414
3321
  </xsl:template>
3415
3322
 
3323
+ <!-- show sourcecode's name 'before' or 'after' source code -->
3324
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
3325
+ </xsl:variable>
3326
+
3416
3327
  <xsl:template match="mn:sourcecode" name="sourcecode">
3417
3328
 
3418
3329
  <xsl:variable name="sourcecode_attributes">
@@ -3436,7 +3347,12 @@
3436
3347
 
3437
3348
  <xsl:call-template name="refine_sourcecode-container-style"/>
3438
3349
 
3439
- <fo:block-container margin-left="0mm" role="SKIP">
3350
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
3351
+
3352
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
3353
+ <xsl:if test="$sourcecode-name-position = 'before'">
3354
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
3355
+ </xsl:if>
3440
3356
 
3441
3357
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3442
3358
 
@@ -3458,7 +3374,16 @@
3458
3374
  </fo:block>
3459
3375
 
3460
3376
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
3461
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
3377
+
3378
+ <!-- <xsl:choose>
3379
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
3380
+ <xsl:otherwise>
3381
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
3382
+ <!-- </xsl:otherwise>
3383
+ </xsl:choose> -->
3384
+ <xsl:if test="$sourcecode-name-position = 'after'">
3385
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
3386
+ </xsl:if>
3462
3387
 
3463
3388
  </fo:block-container>
3464
3389
  </fo:block-container>
@@ -9258,6 +9183,10 @@
9258
9183
  <!-- image -->
9259
9184
  <!-- ====== -->
9260
9185
 
9186
+ <!-- show figure's name 'before' or 'after' image -->
9187
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
9188
+ </xsl:variable>
9189
+
9261
9190
  <xsl:template match="mn:figure" name="figure">
9262
9191
  <xsl:variable name="isAdded" select="@added"/>
9263
9192
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -9270,6 +9199,10 @@
9270
9199
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
9271
9200
  </xsl:call-template>
9272
9201
 
9202
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
9203
+ <xsl:apply-templates select="mn:fmt-name"/>
9204
+ </xsl:if>
9205
+
9273
9206
  <!-- Example: Dimensions in millimeters -->
9274
9207
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
9275
9208
 
@@ -9290,7 +9223,16 @@
9290
9223
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9291
9224
  <xsl:call-template name="showFigureKey"/>
9292
9225
  </xsl:if>
9293
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9226
+
9227
+ <!-- <xsl:choose>
9228
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
9229
+ <xsl:otherwise>
9230
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
9231
+ <!-- </xsl:otherwise>
9232
+ </xsl:choose> -->
9233
+ <xsl:if test="$figure-name-position = 'after'">
9234
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9235
+ </xsl:if>
9294
9236
 
9295
9237
  </fo:block-container>
9296
9238
  </xsl:template>
@@ -11385,7 +11327,6 @@
11385
11327
  </xsl:attribute-set>
11386
11328
 
11387
11329
  <xsl:template name="refine_references-non-normative-title-style">
11388
-
11389
11330
  </xsl:template>
11390
11331
 
11391
11332
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -13504,7 +13445,7 @@
13504
13445
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13505
13446
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
13506
13447
  <xsl:attribute name="role">H1</xsl:attribute>
13507
- </xsl:attribute-set>
13448
+ </xsl:attribute-set> <!-- annex-title-style -->
13508
13449
 
13509
13450
  <xsl:template name="refine_annex-title-style">
13510
13451
  </xsl:template>
@@ -13515,6 +13456,113 @@
13515
13456
  <xsl:template name="refine_p-zzSTDTitle1-style">
13516
13457
  </xsl:template>
13517
13458
 
13459
+ <xsl:attribute-set name="p-style">
13460
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
13461
+ <xsl:attribute name="line-height">115%</xsl:attribute>
13462
+ </xsl:attribute-set> <!-- p-style -->
13463
+
13464
+ <xsl:template name="refine_p-style">
13465
+ <xsl:param name="element-name"/>
13466
+ <xsl:param name="margin"/>
13467
+ <xsl:attribute name="text-align">
13468
+ <xsl:choose>
13469
+ <xsl:when test="ancestor::mn:quote">justify</xsl:when>
13470
+ <xsl:when test="ancestor::mn:feedback-statement">right</xsl:when>
13471
+ <xsl:when test="ancestor::mn:boilerplate and not(@align)">justify</xsl:when>
13472
+ <xsl:when test="@align = 'justified'">justify</xsl:when>
13473
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
13474
+ <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
13475
+ <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
13476
+ <xsl:otherwise>justify</xsl:otherwise>
13477
+ </xsl:choose>
13478
+ </xsl:attribute>
13479
+ <xsl:call-template name="setKeepAttributes"/>
13480
+
13481
+ <xsl:if test="parent::mn:dd">
13482
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
13483
+ </xsl:if>
13484
+ <xsl:if test="ancestor::*[2][self::mn:license-statement] and not(following-sibling::mn:p)">
13485
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
13486
+ </xsl:if>
13487
+
13488
+ <!-- <xsl:attribute name="border">1pt solid red</xsl:attribute> -->
13489
+ <xsl:if test="ancestor::mn:boilerplate and not(ancestor::mn:feedback-statement)">
13490
+ <xsl:attribute name="line-height">125%</xsl:attribute>
13491
+ <xsl:attribute name="space-after">14pt</xsl:attribute>
13492
+ </xsl:if>
13493
+ <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]">
13494
+ <xsl:attribute name="space-after">3pt</xsl:attribute>
13495
+ </xsl:if>
13496
+ <xsl:if test="following-sibling::*[1][self::mn:dl]">
13497
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
13498
+ </xsl:if>
13499
+ <xsl:if test="ancestor::mn:quote">
13500
+ <xsl:attribute name="line-height">130%</xsl:attribute>
13501
+ <!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
13502
+ </xsl:if>
13503
+
13504
+ <xsl:if test="ancestor::*[self::mn:recommendation or self::mn:requirement or self::mn:permission] and not(following-sibling::*)">
13505
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
13506
+ </xsl:if>
13507
+
13508
+ <xsl:if test="ancestor::mn:li and ancestor::mn:table">
13509
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
13510
+ </xsl:if>
13511
+
13512
+ <xsl:if test=".//mn:fn">
13513
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
13514
+ </xsl:if>
13515
+
13516
+ <xsl:copy-of select="@id"/>
13517
+ <!-- $namespace = 'iho' -->
13518
+
13519
+ </xsl:template> <!-- refine_p-style -->
13520
+
13521
+ <xsl:attribute-set name="title-style">
13522
+ <!-- Note: font-size for level 1 title -->
13523
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
13524
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
13525
+ <xsl:attribute name="space-before">24pt</xsl:attribute>
13526
+ <xsl:attribute name="space-after">10pt</xsl:attribute>
13527
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
13528
+ </xsl:attribute-set> <!-- title-style -->
13529
+
13530
+ <xsl:template name="refine_title-style">
13531
+ <xsl:param name="element-name"/>
13532
+ <xsl:variable name="level">
13533
+ <xsl:call-template name="getLevel"/>
13534
+ </xsl:variable>
13535
+ <xsl:choose>
13536
+ <xsl:when test="@type = 'floating-title' or @type = 'section-title'">
13537
+ <xsl:copy-of select="@id"/>
13538
+ </xsl:when>
13539
+ <xsl:otherwise>
13540
+ <xsl:for-each select="parent::mn:clause">
13541
+ <xsl:call-template name="setId"/>
13542
+ </xsl:for-each>
13543
+ </xsl:otherwise>
13544
+ </xsl:choose>
13545
+
13546
+ <xsl:if test="$level = 2">
13547
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
13548
+ <xsl:attribute name="space-before">24pt</xsl:attribute>
13549
+ <xsl:if test="../preceding-sibling::*[1][self::mn:fmt-title]">
13550
+ <xsl:attribute name="space-before">10pt</xsl:attribute>
13551
+ </xsl:if>
13552
+ </xsl:if>
13553
+ <xsl:if test="$level &gt;= 3">
13554
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
13555
+ <xsl:attribute name="space-before">6pt</xsl:attribute>
13556
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
13557
+ </xsl:if>
13558
+
13559
+ <xsl:if test="../@id = '_document_history' or . = 'Document History'">
13560
+ <xsl:attribute name="text-align">center</xsl:attribute>
13561
+ </xsl:if>
13562
+ <!-- $namespace = 'iho' -->
13563
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
13564
+ </xsl:template> <!-- refine_title-style -->
13565
+
13518
13566
  <xsl:template name="processPrefaceSectionsDefault">
13519
13567
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
13520
13568
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -13853,6 +13901,12 @@
13853
13901
  </xsl:choose>
13854
13902
  </xsl:template>
13855
13903
 
13904
+ <xsl:attribute-set name="reset-margins-style">
13905
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
13906
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
13907
+ <xsl:attribute name="role">SKIP</xsl:attribute>
13908
+ </xsl:attribute-set>
13909
+
13856
13910
  <xsl:attribute-set name="clause-style">
13857
13911
 
13858
13912
  </xsl:attribute-set>
@@ -14864,8 +14918,9 @@
14864
14918
 
14865
14919
  <xsl:template name="setTextAlignment">
14866
14920
  <xsl:param name="default">left</xsl:param>
14921
+ <xsl:param name="skip_default">false</xsl:param>
14867
14922
  <xsl:variable name="align" select="normalize-space(@align)"/>
14868
- <xsl:attribute name="text-align">
14923
+ <xsl:variable name="text_align">
14869
14924
  <xsl:choose>
14870
14925
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
14871
14926
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -14873,9 +14928,13 @@
14873
14928
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
14874
14929
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
14875
14930
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
14931
+ <xsl:when test="$skip_default = 'true'"/>
14876
14932
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
14877
14933
  </xsl:choose>
14878
- </xsl:attribute>
14934
+ </xsl:variable>
14935
+ <xsl:if test="normalize-space($text_align) != ''">
14936
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
14937
+ </xsl:if>
14879
14938
  <xsl:if test="$align = 'indent'">
14880
14939
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
14881
14940
  </xsl:if>
@@ -14883,8 +14942,10 @@
14883
14942
 
14884
14943
  <xsl:template name="setBlockAttributes">
14885
14944
  <xsl:param name="text_align_default">left</xsl:param>
14945
+ <xsl:param name="skip_text_align_default">false</xsl:param>
14886
14946
  <xsl:call-template name="setTextAlignment">
14887
14947
  <xsl:with-param name="default" select="$text_align_default"/>
14948
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
14888
14949
  </xsl:call-template>
14889
14950
  <xsl:call-template name="setKeepAttributes"/>
14890
14951
  <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 margin-left="0mm">
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 margin-left="0mm">
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 margin-left="0mm" margin-right="0mm" border="0.5pt solid black">
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">
@@ -960,19 +960,6 @@
960
960
 
961
961
  <xsl:template match="mn:fmt-title" name="title">
962
962
 
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 &gt;= 3">10pt</xsl:when>
972
- <xsl:otherwise>12pt</xsl:otherwise>
973
- </xsl:choose>
974
- </xsl:variable>
975
-
976
963
  <xsl:variable name="element-name">
977
964
  <xsl:choose>
978
965
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -980,58 +967,20 @@
980
967
  </xsl:choose>
981
968
  </xsl:variable>
982
969
 
983
- <xsl:element name="{$element-name}">
984
-
985
- <xsl:choose>
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 &gt;= 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 &gt;= 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>
970
+ <xsl:variable name="title_styles">
971
+ <styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
972
+ </xsl:variable>
1020
973
 
1021
- <xsl:if test="../@id = '_document_history' or . = 'Document History'">
1022
- <xsl:attribute name="text-align">center</xsl:attribute>
1023
- </xsl:if>
974
+ <xsl:element name="{$element-name}">
975
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
1024
976
 
1025
977
  <xsl:apply-templates/>
1026
978
  <xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
1027
979
  </xsl:element>
1028
980
 
1029
981
  <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::mn:p)">
1030
- <fo:block> <!-- margin-bottom="12pt" -->
1031
- <xsl:value-of select="$linebreak"/>
1032
- </fo:block>
982
+ <fo:block><xsl:value-of select="$linebreak"/></fo:block>
1033
983
  </xsl:if>
1034
-
1035
984
  </xsl:template>
1036
985
  <!-- ====== -->
1037
986
  <!-- ====== -->
@@ -1049,57 +998,15 @@
1049
998
  <xsl:otherwise>fo:block</xsl:otherwise>
1050
999
  </xsl:choose>
1051
1000
  </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
1001
 
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
-
1098
- <xsl:if test=".//mn:fn">
1099
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
1100
- </xsl:if>
1002
+ <xsl:variable name="p_styles">
1003
+ <styles xsl:use-attribute-sets="p-style">
1004
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
1005
+ </styles>
1006
+ </xsl:variable>
1101
1007
 
1102
- <xsl:copy-of select="@id"/>
1008
+ <xsl:element name="{$element-name}">
1009
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
1103
1010
 
1104
1011
  <xsl:apply-templates>
1105
1012
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -3413,6 +3320,10 @@
3413
3320
  </xsl:element>
3414
3321
  </xsl:template>
3415
3322
 
3323
+ <!-- show sourcecode's name 'before' or 'after' source code -->
3324
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
3325
+ </xsl:variable>
3326
+
3416
3327
  <xsl:template match="mn:sourcecode" name="sourcecode">
3417
3328
 
3418
3329
  <xsl:variable name="sourcecode_attributes">
@@ -3436,7 +3347,12 @@
3436
3347
 
3437
3348
  <xsl:call-template name="refine_sourcecode-container-style"/>
3438
3349
 
3439
- <fo:block-container margin-left="0mm" role="SKIP">
3350
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
3351
+
3352
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
3353
+ <xsl:if test="$sourcecode-name-position = 'before'">
3354
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
3355
+ </xsl:if>
3440
3356
 
3441
3357
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3442
3358
 
@@ -3458,7 +3374,16 @@
3458
3374
  </fo:block>
3459
3375
 
3460
3376
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
3461
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
3377
+
3378
+ <!-- <xsl:choose>
3379
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
3380
+ <xsl:otherwise>
3381
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
3382
+ <!-- </xsl:otherwise>
3383
+ </xsl:choose> -->
3384
+ <xsl:if test="$sourcecode-name-position = 'after'">
3385
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
3386
+ </xsl:if>
3462
3387
 
3463
3388
  </fo:block-container>
3464
3389
  </fo:block-container>
@@ -9258,6 +9183,10 @@
9258
9183
  <!-- image -->
9259
9184
  <!-- ====== -->
9260
9185
 
9186
+ <!-- show figure's name 'before' or 'after' image -->
9187
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
9188
+ </xsl:variable>
9189
+
9261
9190
  <xsl:template match="mn:figure" name="figure">
9262
9191
  <xsl:variable name="isAdded" select="@added"/>
9263
9192
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -9270,6 +9199,10 @@
9270
9199
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
9271
9200
  </xsl:call-template>
9272
9201
 
9202
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
9203
+ <xsl:apply-templates select="mn:fmt-name"/>
9204
+ </xsl:if>
9205
+
9273
9206
  <!-- Example: Dimensions in millimeters -->
9274
9207
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
9275
9208
 
@@ -9290,7 +9223,16 @@
9290
9223
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9291
9224
  <xsl:call-template name="showFigureKey"/>
9292
9225
  </xsl:if>
9293
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9226
+
9227
+ <!-- <xsl:choose>
9228
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
9229
+ <xsl:otherwise>
9230
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
9231
+ <!-- </xsl:otherwise>
9232
+ </xsl:choose> -->
9233
+ <xsl:if test="$figure-name-position = 'after'">
9234
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9235
+ </xsl:if>
9294
9236
 
9295
9237
  </fo:block-container>
9296
9238
  </xsl:template>
@@ -11385,7 +11327,6 @@
11385
11327
  </xsl:attribute-set>
11386
11328
 
11387
11329
  <xsl:template name="refine_references-non-normative-title-style">
11388
-
11389
11330
  </xsl:template>
11390
11331
 
11391
11332
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -13504,7 +13445,7 @@
13504
13445
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13505
13446
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
13506
13447
  <xsl:attribute name="role">H1</xsl:attribute>
13507
- </xsl:attribute-set>
13448
+ </xsl:attribute-set> <!-- annex-title-style -->
13508
13449
 
13509
13450
  <xsl:template name="refine_annex-title-style">
13510
13451
  </xsl:template>
@@ -13515,6 +13456,113 @@
13515
13456
  <xsl:template name="refine_p-zzSTDTitle1-style">
13516
13457
  </xsl:template>
13517
13458
 
13459
+ <xsl:attribute-set name="p-style">
13460
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
13461
+ <xsl:attribute name="line-height">115%</xsl:attribute>
13462
+ </xsl:attribute-set> <!-- p-style -->
13463
+
13464
+ <xsl:template name="refine_p-style">
13465
+ <xsl:param name="element-name"/>
13466
+ <xsl:param name="margin"/>
13467
+ <xsl:attribute name="text-align">
13468
+ <xsl:choose>
13469
+ <xsl:when test="ancestor::mn:quote">justify</xsl:when>
13470
+ <xsl:when test="ancestor::mn:feedback-statement">right</xsl:when>
13471
+ <xsl:when test="ancestor::mn:boilerplate and not(@align)">justify</xsl:when>
13472
+ <xsl:when test="@align = 'justified'">justify</xsl:when>
13473
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
13474
+ <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
13475
+ <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
13476
+ <xsl:otherwise>justify</xsl:otherwise>
13477
+ </xsl:choose>
13478
+ </xsl:attribute>
13479
+ <xsl:call-template name="setKeepAttributes"/>
13480
+
13481
+ <xsl:if test="parent::mn:dd">
13482
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
13483
+ </xsl:if>
13484
+ <xsl:if test="ancestor::*[2][self::mn:license-statement] and not(following-sibling::mn:p)">
13485
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
13486
+ </xsl:if>
13487
+
13488
+ <!-- <xsl:attribute name="border">1pt solid red</xsl:attribute> -->
13489
+ <xsl:if test="ancestor::mn:boilerplate and not(ancestor::mn:feedback-statement)">
13490
+ <xsl:attribute name="line-height">125%</xsl:attribute>
13491
+ <xsl:attribute name="space-after">14pt</xsl:attribute>
13492
+ </xsl:if>
13493
+ <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]">
13494
+ <xsl:attribute name="space-after">3pt</xsl:attribute>
13495
+ </xsl:if>
13496
+ <xsl:if test="following-sibling::*[1][self::mn:dl]">
13497
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
13498
+ </xsl:if>
13499
+ <xsl:if test="ancestor::mn:quote">
13500
+ <xsl:attribute name="line-height">130%</xsl:attribute>
13501
+ <!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
13502
+ </xsl:if>
13503
+
13504
+ <xsl:if test="ancestor::*[self::mn:recommendation or self::mn:requirement or self::mn:permission] and not(following-sibling::*)">
13505
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
13506
+ </xsl:if>
13507
+
13508
+ <xsl:if test="ancestor::mn:li and ancestor::mn:table">
13509
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
13510
+ </xsl:if>
13511
+
13512
+ <xsl:if test=".//mn:fn">
13513
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
13514
+ </xsl:if>
13515
+
13516
+ <xsl:copy-of select="@id"/>
13517
+ <!-- $namespace = 'iho' -->
13518
+
13519
+ </xsl:template> <!-- refine_p-style -->
13520
+
13521
+ <xsl:attribute-set name="title-style">
13522
+ <!-- Note: font-size for level 1 title -->
13523
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
13524
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
13525
+ <xsl:attribute name="space-before">24pt</xsl:attribute>
13526
+ <xsl:attribute name="space-after">10pt</xsl:attribute>
13527
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
13528
+ </xsl:attribute-set> <!-- title-style -->
13529
+
13530
+ <xsl:template name="refine_title-style">
13531
+ <xsl:param name="element-name"/>
13532
+ <xsl:variable name="level">
13533
+ <xsl:call-template name="getLevel"/>
13534
+ </xsl:variable>
13535
+ <xsl:choose>
13536
+ <xsl:when test="@type = 'floating-title' or @type = 'section-title'">
13537
+ <xsl:copy-of select="@id"/>
13538
+ </xsl:when>
13539
+ <xsl:otherwise>
13540
+ <xsl:for-each select="parent::mn:clause">
13541
+ <xsl:call-template name="setId"/>
13542
+ </xsl:for-each>
13543
+ </xsl:otherwise>
13544
+ </xsl:choose>
13545
+
13546
+ <xsl:if test="$level = 2">
13547
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
13548
+ <xsl:attribute name="space-before">24pt</xsl:attribute>
13549
+ <xsl:if test="../preceding-sibling::*[1][self::mn:fmt-title]">
13550
+ <xsl:attribute name="space-before">10pt</xsl:attribute>
13551
+ </xsl:if>
13552
+ </xsl:if>
13553
+ <xsl:if test="$level &gt;= 3">
13554
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
13555
+ <xsl:attribute name="space-before">6pt</xsl:attribute>
13556
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
13557
+ </xsl:if>
13558
+
13559
+ <xsl:if test="../@id = '_document_history' or . = 'Document History'">
13560
+ <xsl:attribute name="text-align">center</xsl:attribute>
13561
+ </xsl:if>
13562
+ <!-- $namespace = 'iho' -->
13563
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
13564
+ </xsl:template> <!-- refine_title-style -->
13565
+
13518
13566
  <xsl:template name="processPrefaceSectionsDefault">
13519
13567
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
13520
13568
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -13853,6 +13901,12 @@
13853
13901
  </xsl:choose>
13854
13902
  </xsl:template>
13855
13903
 
13904
+ <xsl:attribute-set name="reset-margins-style">
13905
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
13906
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
13907
+ <xsl:attribute name="role">SKIP</xsl:attribute>
13908
+ </xsl:attribute-set>
13909
+
13856
13910
  <xsl:attribute-set name="clause-style">
13857
13911
 
13858
13912
  </xsl:attribute-set>
@@ -14864,8 +14918,9 @@
14864
14918
 
14865
14919
  <xsl:template name="setTextAlignment">
14866
14920
  <xsl:param name="default">left</xsl:param>
14921
+ <xsl:param name="skip_default">false</xsl:param>
14867
14922
  <xsl:variable name="align" select="normalize-space(@align)"/>
14868
- <xsl:attribute name="text-align">
14923
+ <xsl:variable name="text_align">
14869
14924
  <xsl:choose>
14870
14925
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
14871
14926
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -14873,9 +14928,13 @@
14873
14928
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
14874
14929
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
14875
14930
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
14931
+ <xsl:when test="$skip_default = 'true'"/>
14876
14932
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
14877
14933
  </xsl:choose>
14878
- </xsl:attribute>
14934
+ </xsl:variable>
14935
+ <xsl:if test="normalize-space($text_align) != ''">
14936
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
14937
+ </xsl:if>
14879
14938
  <xsl:if test="$align = 'indent'">
14880
14939
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
14881
14940
  </xsl:if>
@@ -14883,8 +14942,10 @@
14883
14942
 
14884
14943
  <xsl:template name="setBlockAttributes">
14885
14944
  <xsl:param name="text_align_default">left</xsl:param>
14945
+ <xsl:param name="skip_text_align_default">false</xsl:param>
14886
14946
  <xsl:call-template name="setTextAlignment">
14887
14947
  <xsl:with-param name="default" select="$text_align_default"/>
14948
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
14888
14949
  </xsl:call-template>
14889
14950
  <xsl:call-template name="setKeepAttributes"/>
14890
14951
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
@@ -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 || @i18nyaml
20
+ i18nyaml: [i18nyaml,
21
+ Metanorma::Iho.configuration.i18nyaml, @i18nyaml]
22
22
  )
23
23
  end
24
24
 
@@ -37,3 +37,5 @@ module Metanorma
37
37
  end
38
38
  end
39
39
  end
40
+
41
+ require_relative "log"
@@ -19,8 +19,7 @@ module Metanorma
19
19
 
20
20
  def metadata_ext(node, ext)
21
21
  unless node.attr("workgroup")
22
- @log.add("AsciiDoc Input", nil,
23
- "Missing workgroup attribute for document")
22
+ @log.add("IHO_1", nil)
24
23
  end
25
24
  super
26
25
  metadata_commentperiod(node, ext)
@@ -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
  module Metanorma
2
2
  module Iho
3
- VERSION = "1.2.7".freeze
3
+ VERSION = "1.2.8".freeze
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  template:
2
- standard: "{{ authoritative_identifier | first }} edition_{{ edition }} : {{ title }}, {{ creatornames }}, {{role}}, {{ publisher }} ({{ uri }}) ."
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 %}"
@@ -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.1.0"
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.7
4
+ version: 1.2.8
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-10-13 00:00:00.000000000 Z
11
+ date: 2025-11-03 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.1.0
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.1.0
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