metanorma-itu 1.3.11 → 1.4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Rakefile +2 -2
- data/bin/rspec +1 -2
- data/lib/asciidoctor/itu/basicdoc.rng +21 -4
- data/lib/asciidoctor/itu/front.rb +5 -61
- data/lib/asciidoctor/itu/front_id.rb +67 -0
- data/lib/asciidoctor/itu/isodoc.rng +419 -77
- data/lib/asciidoctor/itu/itu.rng +3 -8
- data/lib/asciidoctor/itu/reqt.rng +23 -2
- data/lib/asciidoctor/itu/validate.rb +33 -31
- data/lib/asciidoctor/itu.rb +0 -1
- data/lib/isodoc/itu/base_convert.rb +5 -2
- data/lib/isodoc/itu/html/wordstyle.css +29 -8
- data/lib/isodoc/itu/html/wordstyle.scss +29 -8
- data/lib/isodoc/itu/i18n-ar.yaml +1 -0
- data/lib/isodoc/itu/i18n-de.yaml +1 -0
- data/lib/isodoc/itu/i18n-en.yaml +1 -0
- data/lib/isodoc/itu/i18n-es.yaml +1 -0
- data/lib/isodoc/itu/i18n-fr.yaml +1 -0
- data/lib/isodoc/itu/i18n-ru.yaml +1 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/itu/i18n.rb +1 -2
- data/lib/isodoc/itu/init.rb +1 -2
- data/lib/isodoc/itu/itu.implementers-guide.xsl +171 -11
- data/lib/isodoc/itu/itu.in-force.xsl +171 -11
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +171 -11
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +171 -11
- data/lib/isodoc/itu/itu.recommendation.xsl +171 -11
- data/lib/isodoc/itu/itu.resolution.xsl +171 -11
- data/lib/isodoc/itu/itu.service-publication.xsl +171 -11
- data/lib/isodoc/itu/itu.technical-paper.xsl +171 -11
- data/lib/isodoc/itu/itu.technical-report.xsl +171 -11
- data/lib/isodoc/itu/metadata.rb +3 -2
- data/lib/isodoc/itu/pdf_convert.rb +5 -4
- data/lib/isodoc/itu/terms.rb +9 -6
- data/lib/isodoc/itu.rb +0 -1
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +1 -2
- metadata +6 -19
@@ -2441,6 +2441,8 @@
|
|
2441
2441
|
|
2442
2442
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
2443
2443
|
|
2444
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
2445
|
+
|
2444
2446
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
2445
2447
|
|
2446
2448
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -2719,6 +2721,11 @@
|
|
2719
2721
|
|
2720
2722
|
|
2721
2723
|
|
2724
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
2725
|
+
|
2726
|
+
|
2727
|
+
|
2728
|
+
|
2722
2729
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2723
2730
|
|
2724
2731
|
|
@@ -2888,13 +2895,20 @@
|
|
2888
2895
|
|
2889
2896
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2890
2897
|
|
2891
|
-
</xsl:attribute-set><xsl:
|
2898
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2899
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2900
|
+
</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">
|
2892
2901
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2893
2902
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2894
2903
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
2895
2904
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
2896
2905
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
2897
|
-
</xsl:template><xsl:template name="
|
2906
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2907
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2908
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2909
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2910
|
+
</xsl:for-each>
|
2911
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
2898
2912
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
2899
2913
|
|
2900
2914
|
<!-- Normative references -->
|
@@ -2907,13 +2921,33 @@
|
|
2907
2921
|
<!-- Bibliography -->
|
2908
2922
|
<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"/>
|
2909
2923
|
|
2910
|
-
</xsl:template><xsl:template name="
|
2924
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2925
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2926
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2927
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2928
|
+
</xsl:for-each>
|
2929
|
+
|
2930
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2931
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2932
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2933
|
+
</xsl:for-each>
|
2934
|
+
|
2935
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2936
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2937
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2938
|
+
</xsl:for-each>
|
2939
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
2911
2940
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
2912
2941
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
2913
2942
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
2914
2943
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
2915
2944
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
2916
|
-
</xsl:template><xsl:template name="
|
2945
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
2946
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2947
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2948
|
+
<xsl:apply-templates select="."/>
|
2949
|
+
</xsl:for-each>
|
2950
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
2917
2951
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
2918
2952
|
|
2919
2953
|
<!-- Normative references -->
|
@@ -2925,6 +2959,22 @@
|
|
2925
2959
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
2926
2960
|
<!-- Bibliography -->
|
2927
2961
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
2962
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
2963
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2964
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2965
|
+
<xsl:apply-templates select="."/>
|
2966
|
+
|
2967
|
+
</xsl:for-each>
|
2968
|
+
|
2969
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2970
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2971
|
+
<xsl:apply-templates select="."/>
|
2972
|
+
</xsl:for-each>
|
2973
|
+
|
2974
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2975
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2976
|
+
<xsl:apply-templates select="."/>
|
2977
|
+
</xsl:for-each>
|
2928
2978
|
</xsl:template><xsl:template match="text()">
|
2929
2979
|
<xsl:value-of select="."/>
|
2930
2980
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -3828,9 +3878,8 @@
|
|
3828
3878
|
|
3829
3879
|
<!-- Table's note name (NOTE, for example) -->
|
3830
3880
|
|
3831
|
-
<fo:inline padding-right="2mm">
|
3881
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
3832
3882
|
|
3833
|
-
|
3834
3883
|
|
3835
3884
|
|
3836
3885
|
|
@@ -4478,6 +4527,8 @@
|
|
4478
4527
|
<xsl:if test="$font-size != ''">
|
4479
4528
|
<xsl:attribute name="font-size">
|
4480
4529
|
<xsl:choose>
|
4530
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4531
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4481
4532
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4482
4533
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4483
4534
|
</xsl:choose>
|
@@ -5285,6 +5336,7 @@
|
|
5285
5336
|
<xsl:otherwise>
|
5286
5337
|
<fo:block xsl:use-attribute-sets="image-style">
|
5287
5338
|
|
5339
|
+
|
5288
5340
|
<xsl:variable name="src">
|
5289
5341
|
<xsl:call-template name="image_src"/>
|
5290
5342
|
</xsl:variable>
|
@@ -5532,6 +5584,13 @@
|
|
5532
5584
|
</xsl:attribute>
|
5533
5585
|
<xsl:apply-templates mode="svg_update"/>
|
5534
5586
|
</xsl:copy>
|
5587
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
5588
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
5589
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
5590
|
+
<xsl:call-template name="image_svg">
|
5591
|
+
<xsl:with-param name="name" select="$name"/>
|
5592
|
+
</xsl:call-template>
|
5593
|
+
</xsl:for-each>
|
5535
5594
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
5536
5595
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
5537
5596
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -5636,7 +5695,7 @@
|
|
5636
5695
|
</fo:basic-link>
|
5637
5696
|
</fo:block>
|
5638
5697
|
</fo:block-container>
|
5639
|
-
</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">
|
5698
|
+
</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">
|
5640
5699
|
<xsl:apply-templates mode="contents"/>
|
5641
5700
|
<xsl:text> </xsl:text>
|
5642
5701
|
</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">
|
@@ -5644,7 +5703,7 @@
|
|
5644
5703
|
<xsl:text> </xsl:text>
|
5645
5704
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5646
5705
|
<xsl:value-of select="."/>
|
5647
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']
|
5706
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
5648
5707
|
<xsl:value-of select="."/>
|
5649
5708
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5650
5709
|
<xsl:apply-templates mode="contents"/>
|
@@ -5742,6 +5801,8 @@
|
|
5742
5801
|
|
5743
5802
|
|
5744
5803
|
|
5804
|
+
|
5805
|
+
|
5745
5806
|
</fo:bookmark-tree>
|
5746
5807
|
</xsl:if>
|
5747
5808
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -5935,12 +5996,16 @@
|
|
5935
5996
|
<xsl:if test="$font-size != ''">
|
5936
5997
|
<xsl:attribute name="font-size">
|
5937
5998
|
<xsl:choose>
|
5999
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
6000
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
5938
6001
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
5939
6002
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
5940
6003
|
</xsl:choose>
|
5941
6004
|
</xsl:attribute>
|
5942
6005
|
</xsl:if>
|
5943
6006
|
|
6007
|
+
|
6008
|
+
|
5944
6009
|
<xsl:apply-templates/>
|
5945
6010
|
</fo:block>
|
5946
6011
|
|
@@ -6288,6 +6353,7 @@
|
|
6288
6353
|
</xsl:choose>
|
6289
6354
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
6290
6355
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
6356
|
+
|
6291
6357
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
6292
6358
|
<xsl:variable name="termsource_text">
|
6293
6359
|
<xsl:apply-templates/>
|
@@ -6316,8 +6382,8 @@
|
|
6316
6382
|
</xsl:if>
|
6317
6383
|
</xsl:template><xsl:variable name="localized.source">
|
6318
6384
|
<xsl:call-template name="getLocalizedString">
|
6319
|
-
|
6320
|
-
|
6385
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
6386
|
+
</xsl:call-template>
|
6321
6387
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
6322
6388
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6323
6389
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -6327,6 +6393,7 @@
|
|
6327
6393
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6328
6394
|
<xsl:apply-templates/>
|
6329
6395
|
</fo:inline>
|
6396
|
+
|
6330
6397
|
</fo:basic-link>
|
6331
6398
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6332
6399
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -6393,6 +6460,9 @@
|
|
6393
6460
|
|
6394
6461
|
</xsl:if>
|
6395
6462
|
|
6463
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
6464
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
6465
|
+
|
6396
6466
|
|
6397
6467
|
|
6398
6468
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -6405,7 +6475,9 @@
|
|
6405
6475
|
|
6406
6476
|
|
6407
6477
|
</xsl:if>
|
6408
|
-
|
6478
|
+
|
6479
|
+
|
6480
|
+
|
6409
6481
|
<xsl:apply-templates/>
|
6410
6482
|
</fo:basic-link>
|
6411
6483
|
|
@@ -6921,9 +6993,97 @@
|
|
6921
6993
|
<fo:block-container border="1pt solid black" width="50%">
|
6922
6994
|
<fo:block> </fo:block>
|
6923
6995
|
</fo:block-container>
|
6996
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
6997
|
+
<xsl:param name="colwidths"/>
|
6998
|
+
<xsl:variable name="colwidths_">
|
6999
|
+
<xsl:choose>
|
7000
|
+
<xsl:when test="not($colwidths)">
|
7001
|
+
<xsl:variable name="toc_table_simple">
|
7002
|
+
<tbody>
|
7003
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7004
|
+
</tbody>
|
7005
|
+
</xsl:variable>
|
7006
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
7007
|
+
<xsl:call-template name="calculate-column-widths">
|
7008
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
7009
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
7010
|
+
</xsl:call-template>
|
7011
|
+
</xsl:when>
|
7012
|
+
<xsl:otherwise>
|
7013
|
+
<xsl:copy-of select="$colwidths"/>
|
7014
|
+
</xsl:otherwise>
|
7015
|
+
</xsl:choose>
|
7016
|
+
</xsl:variable>
|
7017
|
+
<fo:block role="TOCI" space-after="16pt">
|
7018
|
+
<fo:table width="100%" table-layout="fixed">
|
7019
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
7020
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
7021
|
+
</xsl:for-each>
|
7022
|
+
<fo:table-body>
|
7023
|
+
<xsl:apply-templates/>
|
7024
|
+
</fo:table-body>
|
7025
|
+
</fo:table>
|
7026
|
+
</fo:block>
|
7027
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
7028
|
+
<fo:table-row min-height="5mm">
|
7029
|
+
<xsl:apply-templates/>
|
7030
|
+
</fo:table-row>
|
7031
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
7032
|
+
<xsl:apply-templates/>
|
7033
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
7034
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7035
|
+
<xsl:variable name="target" select="@target"/>
|
7036
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7037
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7038
|
+
<fo:table-cell>
|
7039
|
+
<fo:block>
|
7040
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7041
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7042
|
+
<xsl:choose>
|
7043
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
7044
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
7045
|
+
</xsl:choose>
|
7046
|
+
</xsl:for-each>
|
7047
|
+
</fo:basic-link>
|
7048
|
+
</fo:block>
|
7049
|
+
</fo:table-cell>
|
7050
|
+
</xsl:for-each>
|
7051
|
+
<!-- last column - for page numbers -->
|
7052
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
7053
|
+
<fo:block>
|
7054
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7055
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
7056
|
+
</fo:basic-link>
|
7057
|
+
</fo:block>
|
7058
|
+
</fo:table-cell>
|
7059
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
7060
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7061
|
+
</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">
|
7062
|
+
<tr>
|
7063
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7064
|
+
</tr>
|
7065
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
7066
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7067
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7068
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7069
|
+
<td>
|
7070
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7071
|
+
<xsl:copy-of select="."/>
|
7072
|
+
</xsl:for-each>
|
7073
|
+
</td>
|
7074
|
+
</xsl:for-each>
|
7075
|
+
<td>333</td> <!-- page number, just for fill -->
|
6924
7076
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6925
7077
|
<fo:inline padding-right="5mm"> </fo:inline>
|
6926
7078
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
7079
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
7080
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
7081
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
7082
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
7083
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
7084
|
+
</svg>
|
7085
|
+
</fo:instream-foreign-object>
|
7086
|
+
</fo:inline>
|
6927
7087
|
</xsl:template><xsl:template name="convertDate">
|
6928
7088
|
<xsl:param name="date"/>
|
6929
7089
|
<xsl:param name="format" select="'short'"/>
|
data/lib/isodoc/itu/metadata.rb
CHANGED
@@ -139,9 +139,10 @@ module IsoDoc
|
|
139
139
|
if d == "recommendation-annex"
|
140
140
|
set(:doctype, "Recommendation")
|
141
141
|
set(:doctype_display, "Recommendation")
|
142
|
-
else
|
143
|
-
super
|
142
|
+
else super
|
144
143
|
end
|
144
|
+
d = get[:doctype] and
|
145
|
+
set(:draft_new_doctype, @labels["draft_new"].sub(/%/, d))
|
145
146
|
end
|
146
147
|
|
147
148
|
def ip_notice_received(isoxml, _out)
|
@@ -14,10 +14,11 @@ module IsoDoc
|
|
14
14
|
|
15
15
|
def pdf_stylesheet(docxml)
|
16
16
|
doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
if File.exist?(File.join(@libdir, "itu.#{doctype}.xsl"))
|
18
|
+
"itu.#{doctype}.xsl"
|
19
|
+
else
|
20
|
+
"itu.recommendation.xsl"
|
21
|
+
end
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
data/lib/isodoc/itu/terms.rb
CHANGED
@@ -11,7 +11,7 @@ module IsoDoc
|
|
11
11
|
p << ": "
|
12
12
|
source and p << "#{bracket_opt(source.value)} "
|
13
13
|
end
|
14
|
-
defn
|
14
|
+
defn&.children&.each { |n| parse(n, div) }
|
15
15
|
end
|
16
16
|
|
17
17
|
def termdef_parse(node, out)
|
@@ -21,16 +21,19 @@ module IsoDoc
|
|
21
21
|
termdef_parse1(node, div, defn, source)
|
22
22
|
set_termdomain("")
|
23
23
|
node.children.each do |n|
|
24
|
-
next if %w(preferred definition termsource title
|
24
|
+
next if %w(preferred definition termsource title
|
25
|
+
name).include? n.name
|
26
|
+
|
25
27
|
parse(n, out)
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
30
|
-
def bracket_opt(
|
31
|
-
return
|
32
|
-
return
|
33
|
-
|
32
|
+
def bracket_opt(text)
|
33
|
+
return text if text.nil?
|
34
|
+
return text if /^\[.+\]$/.match?(text)
|
35
|
+
|
36
|
+
"[#{text}]"
|
34
37
|
end
|
35
38
|
|
36
39
|
def termnote_delim
|
data/lib/isodoc/itu.rb
CHANGED
data/metanorma-itu.gemspec
CHANGED
@@ -25,8 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
26
26
|
|
27
27
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
28
|
-
spec.add_dependency "
|
29
|
-
spec.add_dependency "metanorma-standoc", "~> 1.10.0"
|
28
|
+
spec.add_dependency "metanorma-standoc", "~> 1.11.0"
|
30
29
|
spec.add_dependency "ruby-jing"
|
31
30
|
spec.add_dependency "twitter_cldr"
|
32
31
|
spec.add_dependency "tzinfo-data" # we need this for windows only
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -24,34 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.3.4
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: isodoc
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.7.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.7.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: metanorma-standoc
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
33
|
+
version: 1.11.0
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
40
|
+
version: 1.11.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: ruby-jing
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -290,6 +276,7 @@ files:
|
|
290
276
|
- lib/asciidoctor/itu/cleanup.rb
|
291
277
|
- lib/asciidoctor/itu/converter.rb
|
292
278
|
- lib/asciidoctor/itu/front.rb
|
279
|
+
- lib/asciidoctor/itu/front_id.rb
|
293
280
|
- lib/asciidoctor/itu/isodoc.rng
|
294
281
|
- lib/asciidoctor/itu/itu.rng
|
295
282
|
- lib/asciidoctor/itu/reqt.rng
|
@@ -369,7 +356,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
369
356
|
- !ruby/object:Gem::Version
|
370
357
|
version: '0'
|
371
358
|
requirements: []
|
372
|
-
rubygems_version: 3.
|
359
|
+
rubygems_version: 3.2.22
|
373
360
|
signing_key:
|
374
361
|
specification_version: 4
|
375
362
|
summary: Metanorma for the ITU
|