metanorma-iso 1.9.4 → 1.9.5

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: d361028b55729e120ba979ff911c432c4c540c92c5bb8046d9924fa908ac7420
4
- data.tar.gz: 9cabc0515d30da042e63c0728bec5efca3d0600ce05bddf23aa4051cae29bc53
3
+ metadata.gz: c3710d3b53ba9f99228d2305a92fc2ae20f8aee71f555a06b3273a029df82dc9
4
+ data.tar.gz: 14d71fa2b1cac17b6097d6601bc05a36096cce50ae6dd0ace99cbee759fe8d47
5
5
  SHA512:
6
- metadata.gz: c570db53cb7e7d27f9bc10ab473ecc31f6d036dec343048f4992e79acc4bdd6a0be3aeaf26abdf56f21501d4af48475557641e81417a873ee5205e47330d20eb
7
- data.tar.gz: 33da49640740fb46d457ddb28a68bbf4d7b64d01e604c003d5ef8846405173274df650ddb0f37833e203a224f344afe18d12f4db67a4c81682c3be50e6b3eee3
6
+ metadata.gz: 9fd09732d19307285a7f4068b97be6c0bb5ca9a15028f10241c778e56eaf3d2d55093015d16f56c9cde30715d0c8842f345abd1bbeea0a208fd499c98fa303b2
7
+ data.tar.gz: b7abcda89ee9c7b390fbfef096b5403a1e507d9ed4e70071ccc3679c6cdc9c9c440c68b931634470407b85bc6acf562248713ff81d1ec25fc85d90d7bf8fd653
@@ -1036,6 +1036,7 @@
1036
1036
  <ref name="svgmap"/>
1037
1037
  <ref name="inputform"/>
1038
1038
  <ref name="toc"/>
1039
+ <ref name="passthrough"/>
1039
1040
  </choice>
1040
1041
  </define>
1041
1042
  <define name="toc">
@@ -1043,6 +1044,14 @@
1043
1044
  <ref name="ul"/>
1044
1045
  </element>
1045
1046
  </define>
1047
+ <define name="passthrough">
1048
+ <element name="passthrough">
1049
+ <optional>
1050
+ <attribute name="formats"/>
1051
+ </optional>
1052
+ <text/>
1053
+ </element>
1054
+ </define>
1046
1055
  <define name="inputform">
1047
1056
  <element name="form">
1048
1057
  <attribute name="id">
@@ -2731,13 +2731,20 @@
2731
2731
 
2732
2732
  </xsl:attribute-set><xsl:attribute-set name="list-style">
2733
2733
 
2734
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2734
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
2735
+ <xsl:attribute name="line-height">135%</xsl:attribute>
2736
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
2735
2737
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2736
2738
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2737
2739
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2738
2740
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2739
2741
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2740
- </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2742
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2743
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2744
+ <xsl:sort select="@displayorder" data-type="number"/>
2745
+ <xsl:apply-templates select="." mode="contents"/>
2746
+ </xsl:for-each>
2747
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2741
2748
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2742
2749
 
2743
2750
  <!-- Normative references -->
@@ -2750,13 +2757,33 @@
2750
2757
  <!-- Bibliography -->
2751
2758
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2752
2759
 
2753
- </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2760
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2761
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2762
+ <xsl:sort select="@displayorder" data-type="number"/>
2763
+ <xsl:apply-templates select="." mode="contents"/>
2764
+ </xsl:for-each>
2765
+
2766
+ <xsl:for-each select="/*/*[local-name()='annex']">
2767
+ <xsl:sort select="@displayorder" data-type="number"/>
2768
+ <xsl:apply-templates select="." mode="contents"/>
2769
+ </xsl:for-each>
2770
+
2771
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2772
+ <xsl:sort select="@displayorder" data-type="number"/>
2773
+ <xsl:apply-templates select="." mode="contents"/>
2774
+ </xsl:for-each>
2775
+ </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2754
2776
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2755
2777
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2756
2778
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2757
2779
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2758
2780
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2759
- </xsl:template><xsl:template name="processMainSectionsDefault">
2781
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2782
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2783
+ <xsl:sort select="@displayorder" data-type="number"/>
2784
+ <xsl:apply-templates select="."/>
2785
+ </xsl:for-each>
2786
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2760
2787
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2761
2788
 
2762
2789
  <!-- Normative references -->
@@ -2768,6 +2795,22 @@
2768
2795
  <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2769
2796
  <!-- Bibliography -->
2770
2797
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2798
+ </xsl:template><xsl:template name="processMainSectionsDefault">
2799
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2800
+ <xsl:sort select="@displayorder" data-type="number"/>
2801
+ <xsl:apply-templates select="."/>
2802
+
2803
+ </xsl:for-each>
2804
+
2805
+ <xsl:for-each select="/*/*[local-name()='annex']">
2806
+ <xsl:sort select="@displayorder" data-type="number"/>
2807
+ <xsl:apply-templates select="."/>
2808
+ </xsl:for-each>
2809
+
2810
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2811
+ <xsl:sort select="@displayorder" data-type="number"/>
2812
+ <xsl:apply-templates select="."/>
2813
+ </xsl:for-each>
2771
2814
  </xsl:template><xsl:template match="text()">
2772
2815
  <xsl:value-of select="."/>
2773
2816
  </xsl:template><xsl:template match="*[local-name()='br']">
@@ -5406,6 +5449,13 @@
5406
5449
  </xsl:attribute>
5407
5450
  <xsl:apply-templates mode="svg_update"/>
5408
5451
  </xsl:copy>
5452
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
5453
+ <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
5454
+ <xsl:for-each select="*[local-name() = 'svg']">
5455
+ <xsl:call-template name="image_svg">
5456
+ <xsl:with-param name="name" select="$name"/>
5457
+ </xsl:call-template>
5458
+ </xsl:for-each>
5409
5459
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
5410
5460
  <xsl:variable name="svg_content" select="document(@src)"/>
5411
5461
  <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
@@ -5510,7 +5560,7 @@
5510
5560
  </fo:basic-link>
5511
5561
  </fo:block>
5512
5562
  </fo:block-container>
5513
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
5563
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
5514
5564
  <xsl:apply-templates mode="contents"/>
5515
5565
  <xsl:text> </xsl:text>
5516
5566
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
@@ -6195,19 +6245,21 @@
6195
6245
  </xsl:if>
6196
6246
  </xsl:template><xsl:variable name="localized.source">
6197
6247
  <xsl:call-template name="getLocalizedString">
6198
- <xsl:with-param name="key">source</xsl:with-param>
6199
- </xsl:call-template>
6248
+ <xsl:with-param name="key">source</xsl:with-param>
6249
+ </xsl:call-template>
6200
6250
  </xsl:variable><xsl:template match="*[local-name() = 'origin']">
6201
6251
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
6202
6252
  <xsl:if test="normalize-space(@citeas) = ''">
6203
6253
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
6204
6254
  </xsl:if>
6205
6255
 
6256
+
6206
6257
  <fo:inline>
6207
6258
 
6208
6259
 
6209
6260
 
6210
6261
 
6262
+
6211
6263
  <xsl:value-of select="$localized.source"/>
6212
6264
  <xsl:text>: </xsl:text>
6213
6265
 
@@ -6219,6 +6271,7 @@
6219
6271
  <fo:inline xsl:use-attribute-sets="origin-style">
6220
6272
  <xsl:apply-templates/>
6221
6273
  </fo:inline>
6274
+
6222
6275
  </fo:basic-link>
6223
6276
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
6224
6277
  <fo:inline><xsl:apply-templates/></fo:inline>
@@ -6285,6 +6338,9 @@
6285
6338
 
6286
6339
  </xsl:if>
6287
6340
 
6341
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
6342
+ <xsl:variable name="text" select="normalize-space()"/>
6343
+
6288
6344
 
6289
6345
 
6290
6346
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -6297,7 +6353,9 @@
6297
6353
 
6298
6354
 
6299
6355
  </xsl:if>
6300
-
6356
+
6357
+
6358
+
6301
6359
  <xsl:apply-templates/>
6302
6360
  </fo:basic-link>
6303
6361
 
@@ -6830,9 +6888,97 @@
6830
6888
  <fo:block-container border="1pt solid black" width="50%">
6831
6889
  <fo:block> </fo:block>
6832
6890
  </fo:block-container>
6891
+ </xsl:template><xsl:template match="*[local-name() = 'toc']">
6892
+ <xsl:param name="colwidths"/>
6893
+ <xsl:variable name="colwidths_">
6894
+ <xsl:choose>
6895
+ <xsl:when test="not($colwidths)">
6896
+ <xsl:variable name="toc_table_simple">
6897
+ <tbody>
6898
+ <xsl:apply-templates mode="toc_table_width"/>
6899
+ </tbody>
6900
+ </xsl:variable>
6901
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
6902
+ <xsl:call-template name="calculate-column-widths">
6903
+ <xsl:with-param name="cols-count" select="$cols-count"/>
6904
+ <xsl:with-param name="table" select="$toc_table_simple"/>
6905
+ </xsl:call-template>
6906
+ </xsl:when>
6907
+ <xsl:otherwise>
6908
+ <xsl:copy-of select="$colwidths"/>
6909
+ </xsl:otherwise>
6910
+ </xsl:choose>
6911
+ </xsl:variable>
6912
+ <fo:block role="TOCI" space-after="16pt">
6913
+ <fo:table width="100%" table-layout="fixed">
6914
+ <xsl:for-each select="xalan:nodeset($colwidths_)/column">
6915
+ <fo:table-column column-width="proportional-column-width({.})"/>
6916
+ </xsl:for-each>
6917
+ <fo:table-body>
6918
+ <xsl:apply-templates/>
6919
+ </fo:table-body>
6920
+ </fo:table>
6921
+ </fo:block>
6922
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
6923
+ <fo:table-row min-height="5mm">
6924
+ <xsl:apply-templates/>
6925
+ </fo:table-row>
6926
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
6927
+ <xsl:apply-templates/>
6928
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
6929
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
6930
+ <xsl:variable name="target" select="@target"/>
6931
+ <xsl:for-each select="*[local-name() = 'tab']">
6932
+ <xsl:variable name="current_id" select="generate-id()"/>
6933
+ <fo:table-cell>
6934
+ <fo:block>
6935
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
6936
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
6937
+ <xsl:choose>
6938
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
6939
+ <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
6940
+ </xsl:choose>
6941
+ </xsl:for-each>
6942
+ </fo:basic-link>
6943
+ </fo:block>
6944
+ </fo:table-cell>
6945
+ </xsl:for-each>
6946
+ <!-- last column - for page numbers -->
6947
+ <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
6948
+ <fo:block>
6949
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
6950
+ <fo:page-number-citation ref-id="{$target}"/>
6951
+ </fo:basic-link>
6952
+ </fo:block>
6953
+ </fo:table-cell>
6954
+ </xsl:template><xsl:template match="*" mode="toc_table_width">
6955
+ <xsl:apply-templates mode="toc_table_width"/>
6956
+ </xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
6957
+ <tr>
6958
+ <xsl:apply-templates mode="toc_table_width"/>
6959
+ </tr>
6960
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
6961
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
6962
+ <xsl:for-each select="*[local-name() = 'tab']">
6963
+ <xsl:variable name="current_id" select="generate-id()"/>
6964
+ <td>
6965
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
6966
+ <xsl:copy-of select="."/>
6967
+ </xsl:for-each>
6968
+ </td>
6969
+ </xsl:for-each>
6970
+ <td>333</td> <!-- page number, just for fill -->
6833
6971
  </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6834
6972
  <fo:inline padding-right="5mm"> </fo:inline>
6835
6973
  <fo:inline><xsl:apply-templates/></fo:inline>
6974
+ </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
6975
+ <fo:inline padding-right="2.5mm" baseline-shift="5%">
6976
+ <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
6977
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 2 2">
6978
+ <rect x="0" y="0" width="2" height="2" fill="black"/>
6979
+ </svg>
6980
+ </fo:instream-foreign-object>
6981
+ </fo:inline>
6836
6982
  </xsl:template><xsl:template name="convertDate">
6837
6983
  <xsl:param name="date"/>
6838
6984
  <xsl:param name="format" select="'short'"/>
@@ -2731,13 +2731,20 @@
2731
2731
 
2732
2732
  </xsl:attribute-set><xsl:attribute-set name="list-style">
2733
2733
 
2734
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2734
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
2735
+ <xsl:attribute name="line-height">135%</xsl:attribute>
2736
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
2735
2737
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2736
2738
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2737
2739
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2738
2740
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2739
2741
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2740
- </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2742
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2743
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2744
+ <xsl:sort select="@displayorder" data-type="number"/>
2745
+ <xsl:apply-templates select="." mode="contents"/>
2746
+ </xsl:for-each>
2747
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2741
2748
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2742
2749
 
2743
2750
  <!-- Normative references -->
@@ -2750,13 +2757,33 @@
2750
2757
  <!-- Bibliography -->
2751
2758
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2752
2759
 
2753
- </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2760
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2761
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2762
+ <xsl:sort select="@displayorder" data-type="number"/>
2763
+ <xsl:apply-templates select="." mode="contents"/>
2764
+ </xsl:for-each>
2765
+
2766
+ <xsl:for-each select="/*/*[local-name()='annex']">
2767
+ <xsl:sort select="@displayorder" data-type="number"/>
2768
+ <xsl:apply-templates select="." mode="contents"/>
2769
+ </xsl:for-each>
2770
+
2771
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2772
+ <xsl:sort select="@displayorder" data-type="number"/>
2773
+ <xsl:apply-templates select="." mode="contents"/>
2774
+ </xsl:for-each>
2775
+ </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2754
2776
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2755
2777
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2756
2778
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2757
2779
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2758
2780
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2759
- </xsl:template><xsl:template name="processMainSectionsDefault">
2781
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2782
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2783
+ <xsl:sort select="@displayorder" data-type="number"/>
2784
+ <xsl:apply-templates select="."/>
2785
+ </xsl:for-each>
2786
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2760
2787
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2761
2788
 
2762
2789
  <!-- Normative references -->
@@ -2768,6 +2795,22 @@
2768
2795
  <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2769
2796
  <!-- Bibliography -->
2770
2797
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2798
+ </xsl:template><xsl:template name="processMainSectionsDefault">
2799
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2800
+ <xsl:sort select="@displayorder" data-type="number"/>
2801
+ <xsl:apply-templates select="."/>
2802
+
2803
+ </xsl:for-each>
2804
+
2805
+ <xsl:for-each select="/*/*[local-name()='annex']">
2806
+ <xsl:sort select="@displayorder" data-type="number"/>
2807
+ <xsl:apply-templates select="."/>
2808
+ </xsl:for-each>
2809
+
2810
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2811
+ <xsl:sort select="@displayorder" data-type="number"/>
2812
+ <xsl:apply-templates select="."/>
2813
+ </xsl:for-each>
2771
2814
  </xsl:template><xsl:template match="text()">
2772
2815
  <xsl:value-of select="."/>
2773
2816
  </xsl:template><xsl:template match="*[local-name()='br']">
@@ -5406,6 +5449,13 @@
5406
5449
  </xsl:attribute>
5407
5450
  <xsl:apply-templates mode="svg_update"/>
5408
5451
  </xsl:copy>
5452
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
5453
+ <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
5454
+ <xsl:for-each select="*[local-name() = 'svg']">
5455
+ <xsl:call-template name="image_svg">
5456
+ <xsl:with-param name="name" select="$name"/>
5457
+ </xsl:call-template>
5458
+ </xsl:for-each>
5409
5459
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
5410
5460
  <xsl:variable name="svg_content" select="document(@src)"/>
5411
5461
  <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
@@ -5510,7 +5560,7 @@
5510
5560
  </fo:basic-link>
5511
5561
  </fo:block>
5512
5562
  </fo:block-container>
5513
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
5563
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
5514
5564
  <xsl:apply-templates mode="contents"/>
5515
5565
  <xsl:text> </xsl:text>
5516
5566
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
@@ -6195,19 +6245,21 @@
6195
6245
  </xsl:if>
6196
6246
  </xsl:template><xsl:variable name="localized.source">
6197
6247
  <xsl:call-template name="getLocalizedString">
6198
- <xsl:with-param name="key">source</xsl:with-param>
6199
- </xsl:call-template>
6248
+ <xsl:with-param name="key">source</xsl:with-param>
6249
+ </xsl:call-template>
6200
6250
  </xsl:variable><xsl:template match="*[local-name() = 'origin']">
6201
6251
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
6202
6252
  <xsl:if test="normalize-space(@citeas) = ''">
6203
6253
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
6204
6254
  </xsl:if>
6205
6255
 
6256
+
6206
6257
  <fo:inline>
6207
6258
 
6208
6259
 
6209
6260
 
6210
6261
 
6262
+
6211
6263
  <xsl:value-of select="$localized.source"/>
6212
6264
  <xsl:text>: </xsl:text>
6213
6265
 
@@ -6219,6 +6271,7 @@
6219
6271
  <fo:inline xsl:use-attribute-sets="origin-style">
6220
6272
  <xsl:apply-templates/>
6221
6273
  </fo:inline>
6274
+
6222
6275
  </fo:basic-link>
6223
6276
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
6224
6277
  <fo:inline><xsl:apply-templates/></fo:inline>
@@ -6285,6 +6338,9 @@
6285
6338
 
6286
6339
  </xsl:if>
6287
6340
 
6341
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
6342
+ <xsl:variable name="text" select="normalize-space()"/>
6343
+
6288
6344
 
6289
6345
 
6290
6346
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -6297,7 +6353,9 @@
6297
6353
 
6298
6354
 
6299
6355
  </xsl:if>
6300
-
6356
+
6357
+
6358
+
6301
6359
  <xsl:apply-templates/>
6302
6360
  </fo:basic-link>
6303
6361
 
@@ -6830,9 +6888,97 @@
6830
6888
  <fo:block-container border="1pt solid black" width="50%">
6831
6889
  <fo:block> </fo:block>
6832
6890
  </fo:block-container>
6891
+ </xsl:template><xsl:template match="*[local-name() = 'toc']">
6892
+ <xsl:param name="colwidths"/>
6893
+ <xsl:variable name="colwidths_">
6894
+ <xsl:choose>
6895
+ <xsl:when test="not($colwidths)">
6896
+ <xsl:variable name="toc_table_simple">
6897
+ <tbody>
6898
+ <xsl:apply-templates mode="toc_table_width"/>
6899
+ </tbody>
6900
+ </xsl:variable>
6901
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
6902
+ <xsl:call-template name="calculate-column-widths">
6903
+ <xsl:with-param name="cols-count" select="$cols-count"/>
6904
+ <xsl:with-param name="table" select="$toc_table_simple"/>
6905
+ </xsl:call-template>
6906
+ </xsl:when>
6907
+ <xsl:otherwise>
6908
+ <xsl:copy-of select="$colwidths"/>
6909
+ </xsl:otherwise>
6910
+ </xsl:choose>
6911
+ </xsl:variable>
6912
+ <fo:block role="TOCI" space-after="16pt">
6913
+ <fo:table width="100%" table-layout="fixed">
6914
+ <xsl:for-each select="xalan:nodeset($colwidths_)/column">
6915
+ <fo:table-column column-width="proportional-column-width({.})"/>
6916
+ </xsl:for-each>
6917
+ <fo:table-body>
6918
+ <xsl:apply-templates/>
6919
+ </fo:table-body>
6920
+ </fo:table>
6921
+ </fo:block>
6922
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
6923
+ <fo:table-row min-height="5mm">
6924
+ <xsl:apply-templates/>
6925
+ </fo:table-row>
6926
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
6927
+ <xsl:apply-templates/>
6928
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
6929
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
6930
+ <xsl:variable name="target" select="@target"/>
6931
+ <xsl:for-each select="*[local-name() = 'tab']">
6932
+ <xsl:variable name="current_id" select="generate-id()"/>
6933
+ <fo:table-cell>
6934
+ <fo:block>
6935
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
6936
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
6937
+ <xsl:choose>
6938
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
6939
+ <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
6940
+ </xsl:choose>
6941
+ </xsl:for-each>
6942
+ </fo:basic-link>
6943
+ </fo:block>
6944
+ </fo:table-cell>
6945
+ </xsl:for-each>
6946
+ <!-- last column - for page numbers -->
6947
+ <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
6948
+ <fo:block>
6949
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
6950
+ <fo:page-number-citation ref-id="{$target}"/>
6951
+ </fo:basic-link>
6952
+ </fo:block>
6953
+ </fo:table-cell>
6954
+ </xsl:template><xsl:template match="*" mode="toc_table_width">
6955
+ <xsl:apply-templates mode="toc_table_width"/>
6956
+ </xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
6957
+ <tr>
6958
+ <xsl:apply-templates mode="toc_table_width"/>
6959
+ </tr>
6960
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
6961
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
6962
+ <xsl:for-each select="*[local-name() = 'tab']">
6963
+ <xsl:variable name="current_id" select="generate-id()"/>
6964
+ <td>
6965
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
6966
+ <xsl:copy-of select="."/>
6967
+ </xsl:for-each>
6968
+ </td>
6969
+ </xsl:for-each>
6970
+ <td>333</td> <!-- page number, just for fill -->
6833
6971
  </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6834
6972
  <fo:inline padding-right="5mm"> </fo:inline>
6835
6973
  <fo:inline><xsl:apply-templates/></fo:inline>
6974
+ </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
6975
+ <fo:inline padding-right="2.5mm" baseline-shift="5%">
6976
+ <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
6977
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 2 2">
6978
+ <rect x="0" y="0" width="2" height="2" fill="black"/>
6979
+ </svg>
6980
+ </fo:instream-foreign-object>
6981
+ </fo:inline>
6836
6982
  </xsl:template><xsl:template name="convertDate">
6837
6983
  <xsl:param name="date"/>
6838
6984
  <xsl:param name="format" select="'short'"/>
@@ -45,13 +45,15 @@ module IsoDoc
45
45
  prefix_name(node, "&nbsp;&mdash; ", lbl, "name")
46
46
  end
47
47
 
48
+ def eref_delim(delim, type)
49
+ if delim == ";" then ";"
50
+ else type == "list" ? "" : delim
51
+ end
52
+ end
53
+
48
54
  def eref_localities1_zh(target, type, from, upto, node, delim)
49
55
  subsection = from&.text&.match(/\./)
50
- ret = if delim == ";"
51
- ";"
52
- else
53
- type == "list" ? "" : delim
54
- end
56
+ ret = eref_delim(delim, type)
55
57
  ret += " 第#{from.text}" if from
56
58
  ret += "&ndash;#{upto.text}" if upto
57
59
  loc = (@i18n.locality[type] || type.sub(/^locality:/, "").capitalize)
@@ -70,10 +72,7 @@ module IsoDoc
70
72
  lang == "zh" and
71
73
  return l10n(eref_localities1_zh(target, type, from, upto, node,
72
74
  delim))
73
- ret = if delim == ";" then ";"
74
- else
75
- type == "list" ? "" : delim
76
- end
75
+ ret = eref_delim(delim, type)
77
76
  ret += eref_locality_populate(type, node) unless subsection &&
78
77
  type == "clause" || type == "list" ||
79
78
  target.match(/^IEV$|^IEC 60050-/)
@@ -114,7 +113,7 @@ module IsoDoc
114
113
  end
115
114
 
116
115
  def concept(docxml)
117
- docxml.xpath(ns("//terms//concept")).each_with_object({}) do |f, m|
116
+ docxml.xpath(ns("//term//concept")).each_with_object({}) do |f, m|
118
117
  concept_term(f, m)
119
118
  end
120
119
  docxml.xpath(ns("//concept")).each do |node|
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.9.4".freeze
3
+ VERSION = "1.9.5".freeze
4
4
  end
5
5
  end
@@ -5,60 +5,6 @@ RSpec.describe Asciidoctor::ISO do
5
5
  expect(Metanorma::ISO::VERSION).not_to be nil
6
6
  end
7
7
 
8
- it "processes a blank document" do
9
- input = <<~INPUT
10
- #{ASCIIDOC_BLANK_HDR}
11
- INPUT
12
- output = <<~OUTPUT
13
- #{BLANK_HDR}
14
- <sections/>
15
- </iso-standard>
16
- OUTPUT
17
- expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
18
- .to be_equivalent_to xmlpp(output)
19
- end
20
-
21
- it "converts a blank document" do
22
- input = <<~INPUT
23
- = Document title
24
- Author
25
- :docfile: test.adoc
26
- :novalid:
27
- :no-isobib:
28
- INPUT
29
- output = <<~OUTPUT
30
- #{BLANK_HDR}
31
- <sections/>
32
- </iso-standard>
33
- OUTPUT
34
- expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
35
- .to be_equivalent_to xmlpp(output)
36
- expect(File.exist?("test_alt.html")).to be true
37
- expect(File.exist?("test.html")).to be true
38
- expect(File.exist?("test.doc")).to be true
39
- expect(File.exist?("test.pdf")).to be true
40
- expect(File.exist?("htmlstyle.css")).to be false
41
- end
42
-
43
- it "converts a blank document in French" do
44
- input = <<~INPUT
45
- = Document title
46
- Author
47
- :docfile: test.adoc
48
- :novalid:
49
- :no-isobib:
50
- :no-pdf:
51
- :language: fr
52
- INPUT
53
- output = <<~OUTPUT
54
- #{BLANK_HDR_FR}
55
- <sections/>
56
- </iso-standard>
57
- OUTPUT
58
- expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
59
- .to be_equivalent_to xmlpp(output)
60
- end
61
-
62
8
  it "processes default metadata" do
63
9
  output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
64
10
  = Document title
@@ -0,0 +1,38 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Asciidoctor::ISO do
4
+ it "processes a blank document" do
5
+ input = <<~INPUT
6
+ #{ASCIIDOC_BLANK_HDR}
7
+ INPUT
8
+ output = <<~OUTPUT
9
+ #{BLANK_HDR}
10
+ <sections/>
11
+ </iso-standard>
12
+ OUTPUT
13
+ expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
14
+ .to be_equivalent_to xmlpp(output)
15
+ end
16
+
17
+ it "converts a blank document" do
18
+ input = <<~INPUT
19
+ = Document title
20
+ Author
21
+ :docfile: test.adoc
22
+ :novalid:
23
+ :no-isobib:
24
+ INPUT
25
+ output = <<~OUTPUT
26
+ #{BLANK_HDR}
27
+ <sections/>
28
+ </iso-standard>
29
+ OUTPUT
30
+ expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
31
+ .to be_equivalent_to xmlpp(output)
32
+ expect(File.exist?("test_alt.html")).to be true
33
+ expect(File.exist?("test.html")).to be true
34
+ expect(File.exist?("test.doc")).to be true
35
+ expect(File.exist?("test.pdf")).to be true
36
+ expect(File.exist?("htmlstyle.css")).to be false
37
+ end
38
+ end
@@ -399,6 +399,7 @@ RSpec.describe IsoDoc do
399
399
  <iso-standard xmlns="http://riboseinc.com/isoxml">
400
400
  <sections>
401
401
  <terms id="Terms">
402
+ <term id="B"><preferred>B</preferred>
402
403
  <p>
403
404
  <ul>
404
405
  <li><concept><refterm>term0</refterm>
@@ -476,6 +477,7 @@ RSpec.describe IsoDoc do
476
477
  </concept></li>
477
478
  </ul>
478
479
  </p>
480
+ </term>
479
481
  </terms>
480
482
  <clause id="clause1"><title>Clause 1</title></clause>
481
483
  </sections>
@@ -499,6 +501,9 @@ RSpec.describe IsoDoc do
499
501
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
500
502
  <sections>
501
503
  <terms id="Terms" displayorder="2"><title>2</title>
504
+ <term id='B'>
505
+ <name>2.1</name>
506
+ <preferred>B</preferred>
502
507
  <p>
503
508
  <ul>
504
509
  <li>
@@ -570,6 +575,7 @@ RSpec.describe IsoDoc do
570
575
  </li>
571
576
  </ul>
572
577
  </p>
578
+ </term>
573
579
  </terms>
574
580
  <clause id="clause1" displayorder="3"><title depth="1">3<tab/>Clause 1</title></clause>
575
581
  </sections>
@@ -608,6 +614,8 @@ RSpec.describe IsoDoc do
608
614
  </div>
609
615
  <div id='Terms'>
610
616
  <h1>2</h1>
617
+ <p class='TermNum' id='B'>2.1</p>
618
+ <p class='Terms' style='text-align:left;'>B</p>
611
619
  <p>
612
620
  <ul>
613
621
  <li>
@@ -698,6 +706,14 @@ RSpec.describe IsoDoc do
698
706
  </foreword></preface>
699
707
  <sections>
700
708
  <terms id="Terms">
709
+ <clause id="A">
710
+ <ul>
711
+ <li><concept><refterm>term1</refterm>
712
+ <renderterm>term</renderterm>
713
+ <xref target='clause1'/>
714
+ </concept></li>
715
+ </ul>
716
+ </clause>
701
717
  <term id="clause1">
702
718
  <ul>
703
719
  <li><concept><refterm>term1</refterm>
@@ -715,32 +731,38 @@ RSpec.describe IsoDoc do
715
731
  </iso-standard>
716
732
  INPUT
717
733
  presxml = <<~OUTPUT
718
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
719
- <preface>
720
- <foreword id='A' displayorder='1'>
721
- <ul>
722
- <li>term</li>
723
- </ul>
724
- </foreword>
725
- </preface>
726
- <sections>
727
- <terms id='Terms' displayorder='2'>
728
- <title>1</title>
729
- <term id='clause1'>
730
- <name>1.1</name>
731
- <ul>
732
- <li>
733
- <em>term</em>
734
- (
735
- <xref target='clause1'>1.1</xref>
736
- )
737
- </li>
738
- <li>term</li>
739
- </ul>
740
- </term>
741
- </terms>
742
- </sections>
743
- </iso-standard>
734
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
735
+ <preface>
736
+ <foreword id='A' displayorder='1'>
737
+ <ul>
738
+ <li>term</li>
739
+ </ul>
740
+ </foreword>
741
+ </preface>
742
+ <sections>
743
+ <terms id='Terms' displayorder='2'>
744
+ <title>1</title>
745
+ <clause id='A' inline-header='true'>
746
+ <title>1.1</title>
747
+ <ul>
748
+ <li> term </li>
749
+ </ul>
750
+ </clause>
751
+ <term id='clause1'>
752
+ <name>1.2</name>
753
+ <ul>
754
+ <li>
755
+ <em>term</em>
756
+ (
757
+ <xref target='clause1'>1.2</xref>
758
+ )
759
+ </li>
760
+ <li>term</li>
761
+ </ul>
762
+ </term>
763
+ </terms>
764
+ </sections>
765
+ </iso-standard>
744
766
  OUTPUT
745
767
  expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
746
768
  .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
@@ -752,6 +774,7 @@ RSpec.describe IsoDoc do
752
774
  <sections>
753
775
  <clause id="clause1"><title>Clause 1</title></clause>
754
776
  <terms id="A">
777
+ <term id="B"><preferred>B</preferred<
755
778
  <p>
756
779
  <ul>
757
780
  <li>
@@ -784,6 +807,7 @@ RSpec.describe IsoDoc do
784
807
  <li><concept ital="true" ref="true" linkmention="false" linkref="true"><refterm>term</refterm><renderterm>term</renderterm><xref target='clause1'/></concept></li>
785
808
  <li><concept ital="true" ref="true" linkmention="false" linkref="false"><refterm>term</refterm><renderterm>term</renderterm><xref target='clause1'/></concept></li>
786
809
  </ul></p>
810
+ </term>
787
811
  </terms>
788
812
  </sections>
789
813
  </iso-standard>
@@ -793,6 +817,9 @@ RSpec.describe IsoDoc do
793
817
  <sections>
794
818
  <clause id="clause1" displayorder="1"><title depth="1">1<tab/>Clause 1</title></clause>
795
819
  <terms id="A" displayorder="2"><title>2</title>
820
+ <term id='B'>
821
+ <name>2.1</name>
822
+ <preferred>B</preferred>
796
823
  <p>
797
824
  <ul>
798
825
  <li>
@@ -821,6 +848,7 @@ RSpec.describe IsoDoc do
821
848
  <li><em>term</em> (<xref target="clause1">Clause 1</xref>)</li>
822
849
  <li><em>term</em> (Clause 1)</li>
823
850
  </ul></p>
851
+ </term>
824
852
  </terms>
825
853
  </sections>
826
854
  </iso-standard>
@@ -833,6 +861,8 @@ RSpec.describe IsoDoc do
833
861
  </div>
834
862
  <div id='A'>
835
863
  <h1>2</h1>
864
+ <p class='TermNum' id='B'>2.1</p>
865
+ <p class='Terms' style='text-align:left;'>B</p>
836
866
  <p>
837
867
  <ul>
838
868
  <li>
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: 1.9.4
4
+ version: 1.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-13 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc
@@ -339,6 +339,7 @@ files:
339
339
  - metanorma-iso.gemspec
340
340
  - spec/asciidoctor/amd_spec.rb
341
341
  - spec/asciidoctor/base_spec.rb
342
+ - spec/asciidoctor/blank_spec.rb
342
343
  - spec/asciidoctor/blocks_spec.rb
343
344
  - spec/asciidoctor/cleanup_spec.rb
344
345
  - spec/asciidoctor/inline_spec.rb