metanorma-itu 1.3.10 → 1.4.0
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/converter.rb +3 -7
- data/lib/asciidoctor/itu/front.rb +5 -61
- data/lib/asciidoctor/itu/front_id.rb +67 -0
- data/lib/asciidoctor/itu/isodoc.rng +435 -78
- 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/htmlstyle.css +6 -0
- data/lib/isodoc/itu/html/htmlstyle.scss +7 -0
- 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 +175 -14
- data/lib/isodoc/itu/itu.in-force.xsl +175 -14
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +175 -14
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +175 -14
- data/lib/isodoc/itu/itu.recommendation.xsl +175 -14
- data/lib/isodoc/itu/itu.resolution.xsl +175 -14
- data/lib/isodoc/itu/itu.service-publication.xsl +175 -14
- data/lib/isodoc/itu/itu.technical-paper.xsl +175 -14
- data/lib/isodoc/itu/itu.technical-report.xsl +175 -14
- 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
- metadata +4 -3
data/lib/isodoc/itu/i18n.rb
CHANGED
data/lib/isodoc/itu/init.rb
CHANGED
@@ -10,7 +10,7 @@ module IsoDoc
|
|
10
10
|
@meta = Metadata.new(lang, script, i18n)
|
11
11
|
end
|
12
12
|
|
13
|
-
def xref_init(lang, script,
|
13
|
+
def xref_init(lang, script, _klass, i18n, options)
|
14
14
|
html = HtmlConvert.new(language: lang, script: script)
|
15
15
|
options = options.merge(hierarchical_assets: @hierarchical_assets)
|
16
16
|
@xrefs = Xref.new(lang, script, html, i18n, options)
|
@@ -26,4 +26,3 @@ module IsoDoc
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
29
|
-
|
@@ -125,10 +125,10 @@
|
|
125
125
|
|
126
126
|
<xsl:template match="/">
|
127
127
|
<xsl:call-template name="namespaceCheck"/>
|
128
|
-
<fo:root xsl:use-attribute-sets="root-style">
|
129
|
-
<xsl:if test="$lang != 'ar'">
|
128
|
+
<fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
|
129
|
+
<!-- <xsl:if test="$lang != 'ar'">
|
130
130
|
<xsl:attribute name="xml:lang"><xsl:value-of select="$lang"/></xsl:attribute>
|
131
|
-
</xsl:if>
|
131
|
+
</xsl:if> -->
|
132
132
|
<xsl:if test="$doctype = 'resolution'">
|
133
133
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
134
134
|
</xsl:if>
|
@@ -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
|
|
@@ -6752,6 +6824,7 @@
|
|
6752
6824
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
6753
6825
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
6754
6826
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
6827
|
+
|
6755
6828
|
<xsl:apply-templates/>
|
6756
6829
|
</fo:block>
|
6757
6830
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -6920,9 +6993,97 @@
|
|
6920
6993
|
<fo:block-container border="1pt solid black" width="50%">
|
6921
6994
|
<fo:block> </fo:block>
|
6922
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 -->
|
6923
7076
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6924
7077
|
<fo:inline padding-right="5mm"> </fo:inline>
|
6925
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>
|
6926
7087
|
</xsl:template><xsl:template name="convertDate">
|
6927
7088
|
<xsl:param name="date"/>
|
6928
7089
|
<xsl:param name="format" select="'short'"/>
|