metanorma-iso 3.3.1 → 3.3.2

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: 3627f1a989c6d2de4b3cdb643cec42761bdc8fae0e2717d760d02abd1b78e195
4
- data.tar.gz: 64820748297125b29676d224abacd67e27cbdf10198241dde7985bceaae263af
3
+ metadata.gz: 62383db44746d5687ee8f592669444896cb5f24b79265194a496ef11b0ad0c40
4
+ data.tar.gz: 8ce7b65a8d65719729bde2e6a78c442aef2281262b850e16e2bc8d6b3c3210d1
5
5
  SHA512:
6
- metadata.gz: 3b553a3d16a9379f973d03592a38a84955579d5c44b2fe36cefbb350ef350b42312d951c6b75a35882a6ee50d336b145c0be36682c4913f48a89b150b439cad4
7
- data.tar.gz: dfe4f25fa5c06fff908bf343cee16d355488d538df8906759f2c9b14076a574d09d183dfdafe16c2f6f84cb84ffa1257708fcc59d0719daf80358f9c6e93d56f
6
+ metadata.gz: c5b9244680bc5f548676e5a5b77e26456bbaa3f4bb47125a38053b19ca83a34ac7c37d23ccdc45b12dc568832e9c157f010dbc5417171efd41708b85187c484e
7
+ data.tar.gz: e5f05e8738f30968928dbebcadf19709da40afc102d909918f63517af96fae7cb92b4f8189952d02eb3f38ada00ed2078e38d096fab2ddecf1dc86d139b3faa2
@@ -68,12 +68,6 @@ module IsoDoc
68
68
  end
69
69
  end
70
70
 
71
- def admonition_class(node)
72
- if node["type"] == "editorial" then "zzHelp"
73
- else super
74
- end
75
- end
76
-
77
71
  def admonition_p_parse(node, div)
78
72
  admonition_name_in_first_para(node, div)
79
73
  end
@@ -319,6 +319,11 @@ svg {
319
319
  display: block; /* ← removes unwanted inline spacing */
320
320
  }
321
321
 
322
+ /* style dfn by override in flavor */
323
+ dfn {
324
+ font-style: inherit;
325
+ }
326
+
322
327
  #standard-band {
323
328
  background-color: #0AC442;
324
329
  }
@@ -1439,16 +1444,13 @@ span.keyword {
1439
1444
  }
1440
1445
 
1441
1446
  .Admonition p,
1442
- .admonition p,
1443
- .zzHelp p {
1447
+ .admonition p {
1444
1448
  margin: 0;
1445
1449
  }
1446
1450
 
1447
- div.zzHelp {
1451
+ div.Admonition.AdmonitionEditorial {
1448
1452
  color: green;
1449
- padding: 0.5em;
1450
- margin: 1.5em 0 1.5em 0;
1451
- text-align: left;
1453
+ background-color: white;
1452
1454
  }
1453
1455
 
1454
1456
  /* Collapse TOC */
@@ -747,16 +747,14 @@ span.keyword {
747
747
  }
748
748
 
749
749
  .Admonition p,
750
- .admonition p,
751
- .zzHelp p {
750
+ .admonition p
751
+ {
752
752
  margin: 0;
753
753
  }
754
754
 
755
- div.zzHelp {
755
+ div.Admonition.AdmonitionEditorial {
756
756
  color: green;
757
- padding: 0.5em;
758
- margin: 1.5em 0 1.5em 0;
759
- text-align: left;
757
+ background-color: white;
760
758
  }
761
759
 
762
760
  /* Collapse TOC */
@@ -319,6 +319,11 @@ svg {
319
319
  display: block; /* ← removes unwanted inline spacing */
320
320
  }
321
321
 
322
+ /* style dfn by override in flavor */
323
+ dfn {
324
+ font-style: inherit;
325
+ }
326
+
322
327
  #standard-band {
323
328
  background-color: #0AC442;
324
329
  }
@@ -1274,15 +1279,13 @@ figcaption, .SourceTitle, .AdmonitionTitle, .RecommendationTitle {
1274
1279
  text-align: left;
1275
1280
  }
1276
1281
 
1277
- .Admonition p, .zzHelp p {
1282
+ .Admonition p {
1278
1283
  margin: 0;
1279
1284
  }
1280
1285
 
1281
- div.zzHelp {
1286
+ div.Admonition.AdmonitionEditorial {
1282
1287
  color: green;
1283
- padding: 0.5em;
1284
- margin: 1.5em 0 1.5em 0;
1285
- text-align: left;
1288
+ background-color: white;
1286
1289
  }
1287
1290
 
1288
1291
  /*
@@ -584,15 +584,13 @@ figure dl {
584
584
  text-align: left;
585
585
  }
586
586
 
587
- .Admonition p, .zzHelp p {
587
+ .Admonition p {
588
588
  margin: 0;
589
589
  }
590
590
 
591
- div.zzHelp {
591
+ div.Admonition.AdmonitionEditorial {
592
592
  color: green;
593
- padding: 0.5em;
594
- margin: 1.5em 0 1.5em 0;
595
- text-align: left;
593
+ background-color: white;
596
594
  }
597
595
 
598
596
 
@@ -115,7 +115,14 @@ module IsoDoc
115
115
 
116
116
  def ol_attrs(node)
117
117
  ret = super
118
- ret.merge(class: OL_STYLE.invert[ret[:type]])
118
+ klass = OL_STYLE.invert[ret[:type]]
119
+ ret = ret.merge(class: klass)
120
+ if (start = node["start"]) && klass
121
+ start_val = start.to_i - 1
122
+ existing_style = ret[:style] ? "#{ret[:style]};" : ""
123
+ ret = ret.merge(style: "#{existing_style}counter-reset: #{klass} #{start_val}")
124
+ end
125
+ ret
119
126
  end
120
127
 
121
128
  include BaseConvert
@@ -2097,7 +2097,7 @@
2097
2097
 
2098
2098
  <fo:block-container font-family="Cambria" line-height="1.1" role="SKIP" height="110mm">
2099
2099
  <!-- for role see coment https://github.com/pdf-association/extension-brotli/issues/5#issuecomment-3931742869 -->
2100
- <fo:block margin-right="3.5mm"> <!-- role="SKIP" -->
2100
+ <fo:block margin-right="3.5mm" role="P/Title"> <!-- role="SKIP" -->
2101
2101
  <fo:block font-size="18pt" font-weight="bold" margin-top="2.5mm" role="SKIP"> <!-- role="H1" -->
2102
2102
  <xsl:call-template name="insertTitlesLangMain"><xsl:with-param name="num" select="$num"/></xsl:call-template>
2103
2103
  </fo:block>
@@ -2532,7 +2532,7 @@
2532
2532
 
2533
2533
  <fo:block-container line-height="1.1" margin-top="3mm" role="SKIP">
2534
2534
  <xsl:call-template name="insertTripleLine"/>
2535
- <fo:block margin-right="5mm"> <!-- role="SKIP" -->
2535
+ <fo:block margin-right="5mm" role="P/Title"> <!-- role="SKIP" -->
2536
2536
  <fo:block font-size="18pt" font-weight="bold" margin-top="6pt" role="SKIP"> <!-- role="H1" -->
2537
2537
  <xsl:if test="$layoutVersion = '1989'">
2538
2538
  <xsl:attribute name="font-size">16pt</xsl:attribute>
@@ -2782,7 +2782,7 @@
2782
2782
  <fo:table-cell role="SKIP">
2783
2783
  <xsl:call-template name="insertTripleLine"/>
2784
2784
  <fo:block-container line-height="1.1" role="SKIP">
2785
- <fo:block margin-right="3.5mm"> <!-- role="SKIP" -->
2785
+ <fo:block margin-right="3.5mm" role="P/Title"> <!-- role="SKIP" -->
2786
2786
  <xsl:variable name="font_size">
2787
2787
  <xsl:choose>
2788
2788
  <xsl:when test="$layoutVersion = '1989'">16pt</xsl:when>
@@ -2929,7 +2929,7 @@
2929
2929
 
2930
2930
  <xsl:call-template name="insertTripleLine"/>
2931
2931
  <fo:block-container line-height="1.1" role="SKIP">
2932
- <fo:block margin-right="40mm"> <!-- role="SKIP" -->
2932
+ <fo:block margin-right="40mm" role="P/Title"> <!-- role="SKIP" -->
2933
2933
  <fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="SKIP"> <!-- role="H1" -->
2934
2934
  <xsl:if test="$layoutVersion = '1989'">
2935
2935
  <xsl:attribute name="font-size">16pt</xsl:attribute>
@@ -3010,7 +3010,7 @@
3010
3010
  </fo:block>
3011
3011
  </fo:block-container>
3012
3012
 
3013
- <fo:block-container font-size="16pt" role="P"> <!-- role="SKIP" -->
3013
+ <fo:block-container font-size="16pt" role="P/Title"> <!-- role="SKIP" -->
3014
3014
  <!-- Information and documentation — Codes for transcription systems -->
3015
3015
  <fo:block font-weight="bold" role="SKIP"> <!-- role="H1" -->
3016
3016
  <xsl:call-template name="insertTitlesLangMain"><xsl:with-param name="num" select="$num"/></xsl:call-template>
@@ -3748,25 +3748,25 @@
3748
3748
  </fo:block>
3749
3749
  </fo:list-item-label>
3750
3750
  <fo:list-item-body start-indent="body-start()" role="SKIP">
3751
- <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm" role="SKIP"> <!-- role="SKIP" role="Reference" -->
3751
+ <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm" role="Reference"> <!-- role="SKIP" role="Reference" -->
3752
3752
 
3753
3753
  <xsl:if test="$layoutVersion = '1987' and @type = 'section'">
3754
3754
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3755
3755
  </xsl:if>
3756
3756
 
3757
3757
  <!-- Reference/Link for title -->
3758
- <fo:wrapper role="Reference">
3758
+ <!-- <fo:wrapper role="Reference"> -->
3759
3759
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}"> <!-- role="SKIP" -->
3760
3760
  <xsl:if test="$layoutVersion = '1987' and @type = 'section'">
3761
3761
  <xsl:value-of select="concat(@section, ' ')"/>
3762
3762
  </xsl:if>
3763
3763
  <xsl:apply-templates select="mnx:title"/>
3764
- </fo:basic-link>
3765
- </fo:wrapper>
3764
+ <!-- </fo:basic-link> -->
3765
+ <!-- </fo:wrapper> -->
3766
3766
 
3767
3767
  <!-- Reference/Link for page number -->
3768
- <fo:wrapper role="Reference">
3769
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
3768
+ <!-- <fo:wrapper role="Reference"> -->
3769
+ <!-- <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}"> -->
3770
3770
  <fo:inline keep-together.within-line="always" role="SKIP">
3771
3771
  <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
3772
3772
  <fo:inline role="SKIP">
@@ -3784,7 +3784,7 @@
3784
3784
  </fo:inline>
3785
3785
  </fo:inline>
3786
3786
  </fo:basic-link>
3787
- </fo:wrapper>
3787
+ <!-- </fo:wrapper> -->
3788
3788
 
3789
3789
  </fo:block>
3790
3790
  </fo:list-item-body>
@@ -3795,28 +3795,38 @@
3795
3795
 
3796
3796
  </xsl:for-each>
3797
3797
 
3798
- <!-- List of Tables -->
3799
- <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
3800
- <xsl:if test="position() = 1">
3801
- <xsl:call-template name="insertListOf_Title">
3802
- <xsl:with-param name="title" select="$title-list-tables"/>
3803
- </xsl:call-template>
3804
- </xsl:if>
3805
- <xsl:call-template name="insertListOf_Item"/>
3806
- </xsl:for-each>
3798
+ </xsl:if>
3799
+ </fo:block>
3807
3800
 
3808
- <!-- List of Figures -->
3809
- <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
3810
- <xsl:if test="position() = 1">
3811
- <xsl:call-template name="insertListOf_Title">
3812
- <xsl:with-param name="title" select="$title-list-figures"/>
3813
- </xsl:call-template>
3814
- </xsl:if>
3815
- <xsl:call-template name="insertListOf_Item"/>
3816
- </xsl:for-each>
3801
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
3802
+ <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
3803
+ <fo:block-container>
3804
+ <!-- List of Tables -->
3805
+ <xsl:call-template name="insertListOf_Title">
3806
+ <xsl:with-param name="title" select="$title-list-tables"/>
3807
+ </xsl:call-template>
3808
+ <fo:block role="TOC">
3809
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
3810
+ <xsl:call-template name="insertListOf_Item"/>
3811
+ </xsl:for-each>
3812
+ </fo:block>
3813
+ </fo:block-container>
3814
+ </xsl:if>
3817
3815
 
3816
+ <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
3817
+ <fo:block-container>
3818
+ <!-- List of Figures -->
3819
+ <xsl:call-template name="insertListOf_Title">
3820
+ <xsl:with-param name="title" select="$title-list-figures"/>
3821
+ </xsl:call-template>
3822
+ <fo:block role="TOC">
3823
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
3824
+ <xsl:call-template name="insertListOf_Item"/>
3825
+ </xsl:for-each>
3826
+ </fo:block>
3827
+ </fo:block-container>
3818
3828
  </xsl:if>
3819
- </fo:block>
3829
+ </xsl:if>
3820
3830
  </fo:block-container>
3821
3831
  </xsl:otherwise>
3822
3832
  </xsl:choose>
@@ -3890,9 +3900,9 @@
3890
3900
  <xsl:with-param name="value" select="@alt-text"/>
3891
3901
  </xsl:call-template>
3892
3902
  <xsl:apply-templates select="." mode="contents"/>
3893
- <fo:inline keep-together.within-line="always">
3903
+ <fo:inline keep-together.within-line="always" role="SKIP">
3894
3904
  <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
3895
- <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
3905
+ <fo:inline role="SKIP"><fo:page-number-citation ref-id="{@id}" role="SKIP"/></fo:inline>
3896
3906
  </fo:inline>
3897
3907
  </fo:basic-link>
3898
3908
  </fo:wrapper>
@@ -4068,7 +4078,7 @@
4068
4078
  <xsl:template match="mn:sections//mn:p[@class = 'zzSTDTitle1']" priority="4">
4069
4079
  <xsl:choose>
4070
4080
  <xsl:when test="$layoutVersion = '1951'">
4071
- <fo:block font-size="13pt" font-weight="bold" text-align="center" margin-top="49mm" margin-bottom="20mm" text-transform="uppercase" line-height="1.1" role="P">
4081
+ <fo:block font-size="13pt" font-weight="bold" text-align="center" margin-top="49mm" margin-bottom="20mm" text-transform="uppercase" line-height="1.1" role="P/Title">
4072
4082
  <xsl:if test="$revision_date_num &gt;= 19680101">
4073
4083
  <xsl:attribute name="font-family">Arial</xsl:attribute>
4074
4084
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
@@ -4103,7 +4113,7 @@
4103
4113
  </xsl:when>
4104
4114
  <xsl:when test="$layoutVersion = '1987' and $doctype = 'technical-report'"/>
4105
4115
  <xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4106
- <fo:block font-size="16pt" font-weight="bold" margin-top="40pt" margin-bottom="40pt" line-height="1.1" role="P" span="all">
4116
+ <fo:block font-size="16pt" font-weight="bold" margin-top="40pt" margin-bottom="40pt" line-height="1.1" role="P/Title" span="all">
4107
4117
  <xsl:if test="following-sibling::*[1][self::mn:p][starts-with(@class, 'zzSTDTitle')]">
4108
4118
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4109
4119
  </xsl:if>
@@ -4119,7 +4129,7 @@
4119
4129
  </xsl:if>
4120
4130
  </xsl:when>
4121
4131
  <xsl:otherwise>
4122
- <fo:block font-size="18pt" font-weight="bold" margin-top="40pt" margin-bottom="20pt" line-height="1.1" role="P">
4132
+ <fo:block font-size="18pt" font-weight="bold" margin-top="40pt" margin-bottom="20pt" line-height="1.1" role="P/Title">
4123
4133
  <xsl:if test="$layoutVersion = '2024'">
4124
4134
  <xsl:attribute name="margin-top">50pt</xsl:attribute>
4125
4135
  </xsl:if>
@@ -4151,7 +4161,7 @@
4151
4161
  <xsl:template match="mn:sections//mn:p[@class = 'zzSTDTitle2']" priority="4">
4152
4162
  <!-- Example: <p class="zzSTDTitle2" displayorder="3">AMENDMENT 1: Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions</p> -->
4153
4163
  <xsl:if test="$doctype = 'amendment'">
4154
- <fo:block font-size="18pt" margin-top="12pt" margin-bottom="20pt" margin-right="0mm" font-weight="normal" line-height="1.1" role="P">
4164
+ <fo:block font-size="18pt" margin-top="12pt" margin-bottom="20pt" margin-right="0mm" font-weight="normal" line-height="1.1" role="P/Title">
4155
4165
  <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4156
4166
  <xsl:attribute name="font-size">16pt</xsl:attribute>
4157
4167
  </xsl:if>
@@ -6339,18 +6349,21 @@
6339
6349
 
6340
6350
  <xsl:attribute-set name="page-sequence-preface">
6341
6351
  <xsl:attribute name="format">i</xsl:attribute>
6342
- </xsl:attribute-set>
6352
+ </xsl:attribute-set> <!-- page-sequence-preface -->
6343
6353
 
6344
6354
  <xsl:template name="refine_page-sequence-preface">
6345
6355
  <xsl:param name="layoutVersion"/>
6346
- </xsl:template>
6356
+ <xsl:param name="doctype"/>
6357
+ <xsl:param name="num"/>
6358
+ <xsl:param name="skip_force_page_count">false</xsl:param>
6359
+ </xsl:template> <!-- refine_page-sequence-preface -->
6347
6360
 
6348
6361
  <xsl:attribute-set name="page-sequence-main">
6349
-
6350
- </xsl:attribute-set>
6362
+ </xsl:attribute-set> <!-- page-sequence-main -->
6351
6363
 
6352
6364
  <xsl:template name="refine_page-sequence-main">
6353
6365
  <xsl:param name="layoutVersion"/>
6366
+ <xsl:param name="doctype"/>
6354
6367
  <xsl:if test="position() = 1">
6355
6368
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
6356
6369
  </xsl:if>
@@ -6358,7 +6371,7 @@
6358
6371
  <xsl:attribute name="initial-page-number">auto</xsl:attribute>
6359
6372
  <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
6360
6373
  </xsl:if>
6361
- </xsl:template>
6374
+ </xsl:template> <!-- refine_page-sequence-main -->
6362
6375
 
6363
6376
  <xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
6364
6377
  <xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
@@ -17753,6 +17766,7 @@
17753
17766
  </xsl:attribute-set>
17754
17767
 
17755
17768
  <xsl:template name="refine_toc-style">
17769
+ <xsl:copy-of select="@id"/>
17756
17770
  <xsl:if test="$layoutVersion = '1987'">
17757
17771
  <xsl:attribute name="font-size">9pt</xsl:attribute>
17758
17772
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -17828,7 +17842,7 @@
17828
17842
 
17829
17843
  <!-- List of Figures, Tables -->
17830
17844
  <xsl:attribute-set name="toc-listof-title-style">
17831
- <xsl:attribute name="role">TOCI</xsl:attribute>
17845
+ <xsl:attribute name="role">H2</xsl:attribute> <!-- TOCI -->
17832
17846
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
17833
17847
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
17834
17848
  </xsl:attribute-set>
@@ -17854,13 +17868,13 @@
17854
17868
 
17855
17869
  <xsl:template name="processPrefaceSectionsDefault_Contents">
17856
17870
  <xsl:variable name="nodes_preface_">
17857
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
17871
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
17858
17872
  <node id="{@id}"/>
17859
17873
  </xsl:for-each>
17860
17874
  </xsl:variable>
17861
17875
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
17862
17876
 
17863
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
17877
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
17864
17878
  <xsl:sort select="@displayorder" data-type="number"/>
17865
17879
 
17866
17880
  <!-- process Section's title -->
@@ -17873,6 +17887,23 @@
17873
17887
  </xsl:for-each>
17874
17888
  </xsl:template>
17875
17889
 
17890
+ <xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
17891
+ <xsl:variable name="title">
17892
+ <xsl:call-template name="getName"/>
17893
+ </xsl:variable>
17894
+ <xsl:variable name="root">
17895
+ <xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
17896
+ <xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
17897
+ </xsl:variable>
17898
+ <mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
17899
+ <mnx:title>
17900
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
17901
+ <xsl:with-param name="element" select="$root"/>
17902
+ </xsl:apply-templates>
17903
+ </mnx:title>
17904
+ </mnx:item>
17905
+ </xsl:template>
17906
+
17876
17907
  <xsl:template name="processMainSectionsDefault_Contents">
17877
17908
 
17878
17909
  <xsl:variable name="nodes_sections_">
@@ -19887,16 +19918,17 @@
19887
19918
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
19888
19919
  <xsl:template name="insert_basic_link">
19889
19920
  <xsl:param name="element"/>
19921
+ <xsl:param name="wrapper">true</xsl:param>
19890
19922
  <xsl:variable name="element_node" select="xalan:nodeset($element)"/>
19891
19923
  <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
19892
19924
  <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
19893
19925
  <xsl:choose>
19894
- <xsl:when test="$internal-destination = 'true'">
19926
+ <xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
19895
19927
  <fo:wrapper role="Reference">
19896
19928
  <xsl:copy-of select="$element_node"/>
19897
19929
  </fo:wrapper>
19898
19930
  </xsl:when>
19899
- <xsl:when test="$external-destination = 'true'">
19931
+ <xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
19900
19932
  <xsl:copy-of select="$element_node"/>
19901
19933
  </xsl:when>
19902
19934
  <xsl:otherwise>
@@ -2097,7 +2097,7 @@
2097
2097
 
2098
2098
  <fo:block-container font-family="Cambria" line-height="1.1" role="SKIP" height="110mm">
2099
2099
  <!-- for role see coment https://github.com/pdf-association/extension-brotli/issues/5#issuecomment-3931742869 -->
2100
- <fo:block margin-right="3.5mm"> <!-- role="SKIP" -->
2100
+ <fo:block margin-right="3.5mm" role="P/Title"> <!-- role="SKIP" -->
2101
2101
  <fo:block font-size="18pt" font-weight="bold" margin-top="2.5mm" role="SKIP"> <!-- role="H1" -->
2102
2102
  <xsl:call-template name="insertTitlesLangMain"><xsl:with-param name="num" select="$num"/></xsl:call-template>
2103
2103
  </fo:block>
@@ -2532,7 +2532,7 @@
2532
2532
 
2533
2533
  <fo:block-container line-height="1.1" margin-top="3mm" role="SKIP">
2534
2534
  <xsl:call-template name="insertTripleLine"/>
2535
- <fo:block margin-right="5mm"> <!-- role="SKIP" -->
2535
+ <fo:block margin-right="5mm" role="P/Title"> <!-- role="SKIP" -->
2536
2536
  <fo:block font-size="18pt" font-weight="bold" margin-top="6pt" role="SKIP"> <!-- role="H1" -->
2537
2537
  <xsl:if test="$layoutVersion = '1989'">
2538
2538
  <xsl:attribute name="font-size">16pt</xsl:attribute>
@@ -2782,7 +2782,7 @@
2782
2782
  <fo:table-cell role="SKIP">
2783
2783
  <xsl:call-template name="insertTripleLine"/>
2784
2784
  <fo:block-container line-height="1.1" role="SKIP">
2785
- <fo:block margin-right="3.5mm"> <!-- role="SKIP" -->
2785
+ <fo:block margin-right="3.5mm" role="P/Title"> <!-- role="SKIP" -->
2786
2786
  <xsl:variable name="font_size">
2787
2787
  <xsl:choose>
2788
2788
  <xsl:when test="$layoutVersion = '1989'">16pt</xsl:when>
@@ -2929,7 +2929,7 @@
2929
2929
 
2930
2930
  <xsl:call-template name="insertTripleLine"/>
2931
2931
  <fo:block-container line-height="1.1" role="SKIP">
2932
- <fo:block margin-right="40mm"> <!-- role="SKIP" -->
2932
+ <fo:block margin-right="40mm" role="P/Title"> <!-- role="SKIP" -->
2933
2933
  <fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="SKIP"> <!-- role="H1" -->
2934
2934
  <xsl:if test="$layoutVersion = '1989'">
2935
2935
  <xsl:attribute name="font-size">16pt</xsl:attribute>
@@ -3010,7 +3010,7 @@
3010
3010
  </fo:block>
3011
3011
  </fo:block-container>
3012
3012
 
3013
- <fo:block-container font-size="16pt" role="P"> <!-- role="SKIP" -->
3013
+ <fo:block-container font-size="16pt" role="P/Title"> <!-- role="SKIP" -->
3014
3014
  <!-- Information and documentation — Codes for transcription systems -->
3015
3015
  <fo:block font-weight="bold" role="SKIP"> <!-- role="H1" -->
3016
3016
  <xsl:call-template name="insertTitlesLangMain"><xsl:with-param name="num" select="$num"/></xsl:call-template>
@@ -3748,25 +3748,25 @@
3748
3748
  </fo:block>
3749
3749
  </fo:list-item-label>
3750
3750
  <fo:list-item-body start-indent="body-start()" role="SKIP">
3751
- <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm" role="SKIP"> <!-- role="SKIP" role="Reference" -->
3751
+ <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm" role="Reference"> <!-- role="SKIP" role="Reference" -->
3752
3752
 
3753
3753
  <xsl:if test="$layoutVersion = '1987' and @type = 'section'">
3754
3754
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3755
3755
  </xsl:if>
3756
3756
 
3757
3757
  <!-- Reference/Link for title -->
3758
- <fo:wrapper role="Reference">
3758
+ <!-- <fo:wrapper role="Reference"> -->
3759
3759
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}"> <!-- role="SKIP" -->
3760
3760
  <xsl:if test="$layoutVersion = '1987' and @type = 'section'">
3761
3761
  <xsl:value-of select="concat(@section, ' ')"/>
3762
3762
  </xsl:if>
3763
3763
  <xsl:apply-templates select="mnx:title"/>
3764
- </fo:basic-link>
3765
- </fo:wrapper>
3764
+ <!-- </fo:basic-link> -->
3765
+ <!-- </fo:wrapper> -->
3766
3766
 
3767
3767
  <!-- Reference/Link for page number -->
3768
- <fo:wrapper role="Reference">
3769
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
3768
+ <!-- <fo:wrapper role="Reference"> -->
3769
+ <!-- <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}"> -->
3770
3770
  <fo:inline keep-together.within-line="always" role="SKIP">
3771
3771
  <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
3772
3772
  <fo:inline role="SKIP">
@@ -3784,7 +3784,7 @@
3784
3784
  </fo:inline>
3785
3785
  </fo:inline>
3786
3786
  </fo:basic-link>
3787
- </fo:wrapper>
3787
+ <!-- </fo:wrapper> -->
3788
3788
 
3789
3789
  </fo:block>
3790
3790
  </fo:list-item-body>
@@ -3795,28 +3795,38 @@
3795
3795
 
3796
3796
  </xsl:for-each>
3797
3797
 
3798
- <!-- List of Tables -->
3799
- <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
3800
- <xsl:if test="position() = 1">
3801
- <xsl:call-template name="insertListOf_Title">
3802
- <xsl:with-param name="title" select="$title-list-tables"/>
3803
- </xsl:call-template>
3804
- </xsl:if>
3805
- <xsl:call-template name="insertListOf_Item"/>
3806
- </xsl:for-each>
3798
+ </xsl:if>
3799
+ </fo:block>
3807
3800
 
3808
- <!-- List of Figures -->
3809
- <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
3810
- <xsl:if test="position() = 1">
3811
- <xsl:call-template name="insertListOf_Title">
3812
- <xsl:with-param name="title" select="$title-list-figures"/>
3813
- </xsl:call-template>
3814
- </xsl:if>
3815
- <xsl:call-template name="insertListOf_Item"/>
3816
- </xsl:for-each>
3801
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
3802
+ <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
3803
+ <fo:block-container>
3804
+ <!-- List of Tables -->
3805
+ <xsl:call-template name="insertListOf_Title">
3806
+ <xsl:with-param name="title" select="$title-list-tables"/>
3807
+ </xsl:call-template>
3808
+ <fo:block role="TOC">
3809
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
3810
+ <xsl:call-template name="insertListOf_Item"/>
3811
+ </xsl:for-each>
3812
+ </fo:block>
3813
+ </fo:block-container>
3814
+ </xsl:if>
3817
3815
 
3816
+ <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
3817
+ <fo:block-container>
3818
+ <!-- List of Figures -->
3819
+ <xsl:call-template name="insertListOf_Title">
3820
+ <xsl:with-param name="title" select="$title-list-figures"/>
3821
+ </xsl:call-template>
3822
+ <fo:block role="TOC">
3823
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
3824
+ <xsl:call-template name="insertListOf_Item"/>
3825
+ </xsl:for-each>
3826
+ </fo:block>
3827
+ </fo:block-container>
3818
3828
  </xsl:if>
3819
- </fo:block>
3829
+ </xsl:if>
3820
3830
  </fo:block-container>
3821
3831
  </xsl:otherwise>
3822
3832
  </xsl:choose>
@@ -3890,9 +3900,9 @@
3890
3900
  <xsl:with-param name="value" select="@alt-text"/>
3891
3901
  </xsl:call-template>
3892
3902
  <xsl:apply-templates select="." mode="contents"/>
3893
- <fo:inline keep-together.within-line="always">
3903
+ <fo:inline keep-together.within-line="always" role="SKIP">
3894
3904
  <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
3895
- <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
3905
+ <fo:inline role="SKIP"><fo:page-number-citation ref-id="{@id}" role="SKIP"/></fo:inline>
3896
3906
  </fo:inline>
3897
3907
  </fo:basic-link>
3898
3908
  </fo:wrapper>
@@ -4068,7 +4078,7 @@
4068
4078
  <xsl:template match="mn:sections//mn:p[@class = 'zzSTDTitle1']" priority="4">
4069
4079
  <xsl:choose>
4070
4080
  <xsl:when test="$layoutVersion = '1951'">
4071
- <fo:block font-size="13pt" font-weight="bold" text-align="center" margin-top="49mm" margin-bottom="20mm" text-transform="uppercase" line-height="1.1" role="P">
4081
+ <fo:block font-size="13pt" font-weight="bold" text-align="center" margin-top="49mm" margin-bottom="20mm" text-transform="uppercase" line-height="1.1" role="P/Title">
4072
4082
  <xsl:if test="$revision_date_num &gt;= 19680101">
4073
4083
  <xsl:attribute name="font-family">Arial</xsl:attribute>
4074
4084
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
@@ -4103,7 +4113,7 @@
4103
4113
  </xsl:when>
4104
4114
  <xsl:when test="$layoutVersion = '1987' and $doctype = 'technical-report'"/>
4105
4115
  <xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4106
- <fo:block font-size="16pt" font-weight="bold" margin-top="40pt" margin-bottom="40pt" line-height="1.1" role="P" span="all">
4116
+ <fo:block font-size="16pt" font-weight="bold" margin-top="40pt" margin-bottom="40pt" line-height="1.1" role="P/Title" span="all">
4107
4117
  <xsl:if test="following-sibling::*[1][self::mn:p][starts-with(@class, 'zzSTDTitle')]">
4108
4118
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4109
4119
  </xsl:if>
@@ -4119,7 +4129,7 @@
4119
4129
  </xsl:if>
4120
4130
  </xsl:when>
4121
4131
  <xsl:otherwise>
4122
- <fo:block font-size="18pt" font-weight="bold" margin-top="40pt" margin-bottom="20pt" line-height="1.1" role="P">
4132
+ <fo:block font-size="18pt" font-weight="bold" margin-top="40pt" margin-bottom="20pt" line-height="1.1" role="P/Title">
4123
4133
  <xsl:if test="$layoutVersion = '2024'">
4124
4134
  <xsl:attribute name="margin-top">50pt</xsl:attribute>
4125
4135
  </xsl:if>
@@ -4151,7 +4161,7 @@
4151
4161
  <xsl:template match="mn:sections//mn:p[@class = 'zzSTDTitle2']" priority="4">
4152
4162
  <!-- Example: <p class="zzSTDTitle2" displayorder="3">AMENDMENT 1: Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions</p> -->
4153
4163
  <xsl:if test="$doctype = 'amendment'">
4154
- <fo:block font-size="18pt" margin-top="12pt" margin-bottom="20pt" margin-right="0mm" font-weight="normal" line-height="1.1" role="P">
4164
+ <fo:block font-size="18pt" margin-top="12pt" margin-bottom="20pt" margin-right="0mm" font-weight="normal" line-height="1.1" role="P/Title">
4155
4165
  <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4156
4166
  <xsl:attribute name="font-size">16pt</xsl:attribute>
4157
4167
  </xsl:if>
@@ -6339,18 +6349,21 @@
6339
6349
 
6340
6350
  <xsl:attribute-set name="page-sequence-preface">
6341
6351
  <xsl:attribute name="format">i</xsl:attribute>
6342
- </xsl:attribute-set>
6352
+ </xsl:attribute-set> <!-- page-sequence-preface -->
6343
6353
 
6344
6354
  <xsl:template name="refine_page-sequence-preface">
6345
6355
  <xsl:param name="layoutVersion"/>
6346
- </xsl:template>
6356
+ <xsl:param name="doctype"/>
6357
+ <xsl:param name="num"/>
6358
+ <xsl:param name="skip_force_page_count">false</xsl:param>
6359
+ </xsl:template> <!-- refine_page-sequence-preface -->
6347
6360
 
6348
6361
  <xsl:attribute-set name="page-sequence-main">
6349
-
6350
- </xsl:attribute-set>
6362
+ </xsl:attribute-set> <!-- page-sequence-main -->
6351
6363
 
6352
6364
  <xsl:template name="refine_page-sequence-main">
6353
6365
  <xsl:param name="layoutVersion"/>
6366
+ <xsl:param name="doctype"/>
6354
6367
  <xsl:if test="position() = 1">
6355
6368
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
6356
6369
  </xsl:if>
@@ -6358,7 +6371,7 @@
6358
6371
  <xsl:attribute name="initial-page-number">auto</xsl:attribute>
6359
6372
  <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
6360
6373
  </xsl:if>
6361
- </xsl:template>
6374
+ </xsl:template> <!-- refine_page-sequence-main -->
6362
6375
 
6363
6376
  <xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
6364
6377
  <xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
@@ -17753,6 +17766,7 @@
17753
17766
  </xsl:attribute-set>
17754
17767
 
17755
17768
  <xsl:template name="refine_toc-style">
17769
+ <xsl:copy-of select="@id"/>
17756
17770
  <xsl:if test="$layoutVersion = '1987'">
17757
17771
  <xsl:attribute name="font-size">9pt</xsl:attribute>
17758
17772
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -17828,7 +17842,7 @@
17828
17842
 
17829
17843
  <!-- List of Figures, Tables -->
17830
17844
  <xsl:attribute-set name="toc-listof-title-style">
17831
- <xsl:attribute name="role">TOCI</xsl:attribute>
17845
+ <xsl:attribute name="role">H2</xsl:attribute> <!-- TOCI -->
17832
17846
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
17833
17847
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
17834
17848
  </xsl:attribute-set>
@@ -17854,13 +17868,13 @@
17854
17868
 
17855
17869
  <xsl:template name="processPrefaceSectionsDefault_Contents">
17856
17870
  <xsl:variable name="nodes_preface_">
17857
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
17871
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
17858
17872
  <node id="{@id}"/>
17859
17873
  </xsl:for-each>
17860
17874
  </xsl:variable>
17861
17875
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
17862
17876
 
17863
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
17877
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
17864
17878
  <xsl:sort select="@displayorder" data-type="number"/>
17865
17879
 
17866
17880
  <!-- process Section's title -->
@@ -17873,6 +17887,23 @@
17873
17887
  </xsl:for-each>
17874
17888
  </xsl:template>
17875
17889
 
17890
+ <xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
17891
+ <xsl:variable name="title">
17892
+ <xsl:call-template name="getName"/>
17893
+ </xsl:variable>
17894
+ <xsl:variable name="root">
17895
+ <xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
17896
+ <xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
17897
+ </xsl:variable>
17898
+ <mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
17899
+ <mnx:title>
17900
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
17901
+ <xsl:with-param name="element" select="$root"/>
17902
+ </xsl:apply-templates>
17903
+ </mnx:title>
17904
+ </mnx:item>
17905
+ </xsl:template>
17906
+
17876
17907
  <xsl:template name="processMainSectionsDefault_Contents">
17877
17908
 
17878
17909
  <xsl:variable name="nodes_sections_">
@@ -19887,16 +19918,17 @@
19887
19918
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
19888
19919
  <xsl:template name="insert_basic_link">
19889
19920
  <xsl:param name="element"/>
19921
+ <xsl:param name="wrapper">true</xsl:param>
19890
19922
  <xsl:variable name="element_node" select="xalan:nodeset($element)"/>
19891
19923
  <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
19892
19924
  <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
19893
19925
  <xsl:choose>
19894
- <xsl:when test="$internal-destination = 'true'">
19926
+ <xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
19895
19927
  <fo:wrapper role="Reference">
19896
19928
  <xsl:copy-of select="$element_node"/>
19897
19929
  </fo:wrapper>
19898
19930
  </xsl:when>
19899
- <xsl:when test="$external-destination = 'true'">
19931
+ <xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
19900
19932
  <xsl:copy-of select="$element_node"/>
19901
19933
  </xsl:when>
19902
19934
  <xsl:otherwise>
@@ -27,7 +27,6 @@ module IsoDoc
27
27
  revdate = isoxml.at(ns("//bibdata/version/revision-date"))
28
28
  set(:revdate, revdate&.text)
29
29
  docstatus and docstatus1(isoxml, docstatus, published)
30
- #docscheme = isoxml.at(ns("//presentation-metadata/document-scheme"))
31
30
  docscheme = get[:"presentation_metadata_document-scheme"]
32
31
  docscheme && !docscheme.empty? and set(:document_scheme, docscheme.first)
33
32
  end
@@ -31,6 +31,7 @@ module IsoDoc
31
31
  formula docxml
32
32
  admonition docxml
33
33
  source docxml
34
+ #list_to_table docxml
34
35
  ul docxml
35
36
  ol docxml
36
37
  quote docxml
@@ -251,6 +251,12 @@ module IsoDoc
251
251
  .each { |n| parse(n, out) }
252
252
  end
253
253
 
254
+ def admonition_class(node)
255
+ if node["type"] == "editorial" then "zzHelp"
256
+ else super
257
+ end
258
+ end
259
+
254
260
  include BaseConvert
255
261
  include Init
256
262
  end
@@ -67,6 +67,8 @@ module Metanorma
67
67
  def ol_attrs(node)
68
68
  ret = super
69
69
  ret.delete(:type)
70
+ # test
71
+ #ret[:display] = node.attr("display")
70
72
  ret
71
73
  end
72
74
 
@@ -1939,10 +1939,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
1939
1939
  <value>hasAnnotation</value>
1940
1940
  <value>draftOf</value>
1941
1941
  <value>hasDraft</value>
1942
- <value>preliminaryDraftOf</value>
1943
- <value>hasPreliminaryDraft</value>
1944
- <value>revisionDraftOf</value>
1945
- <value>hasRevisionDraft</value>
1942
+ <value>predecessorDraftOf</value>
1943
+ <value>hasPredecessorDraft</value>
1944
+ <value>successorDraftOf</value>
1945
+ <value>hasSuccessorDraft</value>
1946
1946
  <value>editionOf</value>
1947
1947
  <value>hasEdition</value>
1948
1948
  <value>updates</value>
@@ -641,8 +641,85 @@ This is done if the footnote reference is already presented in some other form,
641
641
  </ref>
642
642
  </zeroOrMore>
643
643
  </define>
644
+ <define name="altsource">
645
+ <a:documentation>Alternative file to use as media</a:documentation>
646
+ <element name="altsource">
647
+ <ref name="MediaAttributes"/>
648
+ <optional>
649
+ <attribute name="tag">
650
+ <a:documentation>Comma-delimited tag to indicate when the alternate file is to be used,
651
+ at minimum allows contain `html`, `doc`, `pdf` as the main target formats of Metanorma,
652
+ and `default` for the fallback. The presence of an altsource tagged `default` is required</a:documentation>
653
+ </attribute>
654
+ </optional>
655
+ <optional>
656
+ <attribute name="media">
657
+ <a:documentation>CSS media query to indicate when the alternate file is to be used</a:documentation>
658
+ </attribute>
659
+ </optional>
660
+ </element>
661
+ </define>
662
+ <define name="image">
663
+ <a:documentation>Container for image content</a:documentation>
664
+ <choice>
665
+ <element name="image">
666
+ <ref name="RequiredId"/>
667
+ <ref name="ImageAttributes">
668
+ <a:documentation>When specified along with altsource, ImageAttributes give the default image to be rendered</a:documentation>
669
+ </ref>
670
+ <ref name="ImageBody"/>
671
+ </element>
672
+ <element name="svg">
673
+ <a:documentation>Add svg mark up to image</a:documentation>
674
+ <oneOrMore>
675
+ <choice>
676
+ <text/>
677
+ <ref name="AnyElement"/>
678
+ </choice>
679
+ </oneOrMore>
680
+ </element>
681
+ </choice>
682
+ </define>
683
+ <define name="ImageAttributes">
684
+ <optional>
685
+ <ref name="MediaAttributes">
686
+ <a:documentation>If the image contains altsource, the media attributes are given on each of the altsource elements instead of the root node</a:documentation>
687
+ </ref>
688
+ </optional>
689
+ <ref name="MediaAccessibilityAttributes"/>
690
+ <optional>
691
+ <attribute name="width">
692
+ <a:documentation>Height of image</a:documentation>
693
+ <ref name="ImageSize"/>
694
+ </attribute>
695
+ </optional>
696
+ <optional>
697
+ <attribute name="height">
698
+ <a:documentation>Width of image</a:documentation>
699
+ <ref name="ImageSize"/>
700
+ </attribute>
701
+ </optional>
702
+ </define>
644
703
  </include>
645
704
  <!-- end overrides -->
705
+ <define name="ImageBody">
706
+ <optional>
707
+ <element name="svg">
708
+ <a:documentation>image can contain SVG XML, which is used to access its identifiers within the Metanorma XML</a:documentation>
709
+ <oneOrMore>
710
+ <choice>
711
+ <text/>
712
+ <ref name="AnyElement"/>
713
+ </choice>
714
+ </oneOrMore>
715
+ </element>
716
+ </optional>
717
+ <zeroOrMore>
718
+ <ref name="altsource">
719
+ <a:documentation>Alternative files to use as media</a:documentation>
720
+ </ref>
721
+ </zeroOrMore>
722
+ </define>
646
723
  <define name="key">
647
724
  <a:documentation>Key to a table, figure, or formula</a:documentation>
648
725
  <element name="key">
@@ -930,34 +1007,6 @@ titlecase, or lowercase</a:documentation>
930
1007
  <ref name="ReducedBibliographicItem"/>
931
1008
  </element>
932
1009
  </define>
933
- <define name="image" combine="choice">
934
- <choice>
935
- <element name="image">
936
- <ref name="RequiredId"/>
937
- <ref name="ImageAttributes"/>
938
- <optional>
939
- <element name="svg">
940
- <a:documentation>Allow svg in image/svg, for consistency</a:documentation>
941
- <oneOrMore>
942
- <choice>
943
- <text/>
944
- <ref name="AnyElement"/>
945
- </choice>
946
- </oneOrMore>
947
- </element>
948
- </optional>
949
- </element>
950
- <element name="svg">
951
- <a:documentation>Add svg mark up to image</a:documentation>
952
- <oneOrMore>
953
- <choice>
954
- <text/>
955
- <ref name="AnyElement"/>
956
- </choice>
957
- </oneOrMore>
958
- </element>
959
- </choice>
960
- </define>
961
1010
  <define name="ParagraphFnBody" combine="interleave">
962
1011
  <ref name="BlockSource">
963
1012
  <a:documentation>Bibliographic source for the information in the paragraph
@@ -8,7 +8,6 @@ require_relative "validate_list"
8
8
  require_relative "validate_xref"
9
9
  require "nokogiri"
10
10
  require "jing"
11
- require "iev"
12
11
 
13
12
  module Metanorma
14
13
  module Iso
@@ -24,13 +23,13 @@ module Metanorma
24
23
  def isosubgroup_validate(root)
25
24
  root.xpath("#{COMMITTEE_XPATH}[@type = 'Technical committee']/@subtype")
26
25
  .each do |t|
27
- %w{TC PC JTC JPC}.include?(t.text) or
28
- @log.add("ISO_2", nil, params: [t.text])
26
+ %w{TC PC JTC JPC}.include?(t.text) or
27
+ @log.add("ISO_2", nil, params: [t.text])
29
28
  end
30
29
  root.xpath("#{COMMITTEE_XPATH}[@type = 'Subcommittee']/@subtype")
31
30
  .each do |t|
32
- %w{SC JSC}.include?(t.text) or
33
- @log.add("ISO_3", nil, params: [t.text])
31
+ %w{SC JSC}.include?(t.text) or
32
+ @log.add("ISO_3", nil, params: [t.text])
34
33
  end
35
34
  end
36
35
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "3.3.1".freeze
3
+ VERSION = "3.3.2".freeze
4
4
  end
5
5
  end
@@ -40,6 +40,7 @@ Gem::Specification.new do |spec|
40
40
  #spec.add_dependency "pubid-iso", "~> 0.7.0"
41
41
  spec.add_dependency "tokenizer", "~> 0.3.0"
42
42
 
43
+ spec.add_development_dependency "benchmark"
43
44
  spec.add_development_dependency "canon", "= 0.1.3"
44
45
  spec.add_development_dependency "debug"
45
46
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-02 00:00:00.000000000 Z
11
+ date: 2026-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.3.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: benchmark
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: canon
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -299,19 +313,6 @@ files:
299
313
  - LICENSE
300
314
  - Makefile
301
315
  - README.adoc
302
- - lib/asciidoctor/iso/base.rb
303
- - lib/asciidoctor/iso/cleanup.rb
304
- - lib/asciidoctor/iso/converter.rb
305
- - lib/asciidoctor/iso/deprecated.rb
306
- - lib/asciidoctor/iso/front.rb
307
- - lib/asciidoctor/iso/front_id.rb
308
- - lib/asciidoctor/iso/section.rb
309
- - lib/asciidoctor/iso/validate.rb
310
- - lib/asciidoctor/iso/validate_image.rb
311
- - lib/asciidoctor/iso/validate_requirements.rb
312
- - lib/asciidoctor/iso/validate_section.rb
313
- - lib/asciidoctor/iso/validate_style.rb
314
- - lib/asciidoctor/iso/validate_title.rb
315
316
  - lib/html2doc/lists.rb
316
317
  - lib/isodoc/iso/base_convert.rb
317
318
  - lib/isodoc/iso/html/header-dis.html
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/base"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/cleanup"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/converter"
@@ -1,7 +0,0 @@
1
- warn "Please replace your references to Asciidoctor::ISO with Metanorma::ISO "\
2
- "and your instances of require 'asciidoctor/iso' with "\
3
- "require 'metanorma/iso'"
4
-
5
- exit 127 if ENV["METANORMA_DEPRECATION_FAIL"]
6
-
7
- Asciidoctor::ISO = Metanorma::ISO unless defined? Asciidoctor::ISO
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/front"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/front_id"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/section"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/validate"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/validate_image"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/validate_requirements"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/validate_section"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/validate_style"
@@ -1,2 +0,0 @@
1
- require "asciidoctor/iso/deprecated"
2
- require "metanorma/iso/validate_title"