metanorma-iso 1.9.3 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/basicdoc.rng +21 -4
- data/lib/asciidoctor/iso/front.rb +9 -1
- data/lib/asciidoctor/iso/isodoc.rng +435 -78
- data/lib/asciidoctor/iso/isostandard.rng +7 -23
- data/lib/asciidoctor/iso/reqt.rng +23 -2
- data/lib/asciidoctor/iso/validate.rb +7 -7
- data/lib/asciidoctor/iso/validate_section.rb +1 -1
- data/lib/isodoc/iso/html/isodoc.css +1 -2
- data/lib/isodoc/iso/html/isodoc.scss +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +16 -4
- data/lib/isodoc/iso/html/wordstyle.scss +16 -4
- data/lib/isodoc/iso/iso.amendment.xsl +174 -11
- data/lib/isodoc/iso/iso.international-standard.xsl +174 -11
- data/lib/isodoc/iso/presentation_xml_convert.rb +30 -22
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -3
- data/spec/asciidoctor/base_spec.rb +351 -178
- data/spec/asciidoctor/blank_spec.rb +38 -0
- data/spec/asciidoctor/blocks_spec.rb +28 -14
- data/spec/asciidoctor/cleanup_spec.rb +34 -20
- data/spec/asciidoctor/inline_spec.rb +10 -2
- data/spec/asciidoctor/section_spec.rb +3 -3
- data/spec/isodoc/i18n_spec.rb +4 -4
- data/spec/isodoc/inline_spec.rb +306 -245
- data/spec/isodoc/section_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +11 -11
- data/spec/isodoc/xref_spec.rb +1397 -1376
- data/spec/metanorma/processor_spec.rb +4 -1
- data/spec/spec_helper.rb +14 -1
- metadata +34 -19
@@ -2260,6 +2260,8 @@
|
|
2260
2260
|
|
2261
2261
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
2262
2262
|
|
2263
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
2264
|
+
|
2263
2265
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
2264
2266
|
|
2265
2267
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -2558,6 +2560,11 @@
|
|
2558
2560
|
|
2559
2561
|
|
2560
2562
|
|
2563
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
2564
|
+
|
2565
|
+
|
2566
|
+
|
2567
|
+
|
2561
2568
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2562
2569
|
|
2563
2570
|
|
@@ -2731,13 +2738,20 @@
|
|
2731
2738
|
|
2732
2739
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2733
2740
|
|
2734
|
-
</xsl:attribute-set><xsl:
|
2741
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2742
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2743
|
+
</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
2744
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2736
2745
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2737
2746
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
2738
2747
|
<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
2748
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
2740
|
-
</xsl:template><xsl:template name="
|
2749
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2750
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2751
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2752
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2753
|
+
</xsl:for-each>
|
2754
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
2741
2755
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
2742
2756
|
|
2743
2757
|
<!-- Normative references -->
|
@@ -2750,13 +2764,33 @@
|
|
2750
2764
|
<!-- Bibliography -->
|
2751
2765
|
<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
2766
|
|
2753
|
-
</xsl:template><xsl:template name="
|
2767
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2768
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2769
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2770
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2771
|
+
</xsl:for-each>
|
2772
|
+
|
2773
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2774
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2775
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2776
|
+
</xsl:for-each>
|
2777
|
+
|
2778
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2779
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2780
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2781
|
+
</xsl:for-each>
|
2782
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
2754
2783
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
2755
2784
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
2756
2785
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
2757
2786
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
2758
2787
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
2759
|
-
</xsl:template><xsl:template name="
|
2788
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
2789
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2790
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2791
|
+
<xsl:apply-templates select="."/>
|
2792
|
+
</xsl:for-each>
|
2793
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
2760
2794
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
2761
2795
|
|
2762
2796
|
<!-- Normative references -->
|
@@ -2768,6 +2802,22 @@
|
|
2768
2802
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
2769
2803
|
<!-- Bibliography -->
|
2770
2804
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
2805
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
2806
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2807
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2808
|
+
<xsl:apply-templates select="."/>
|
2809
|
+
|
2810
|
+
</xsl:for-each>
|
2811
|
+
|
2812
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2813
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2814
|
+
<xsl:apply-templates select="."/>
|
2815
|
+
</xsl:for-each>
|
2816
|
+
|
2817
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2818
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2819
|
+
<xsl:apply-templates select="."/>
|
2820
|
+
</xsl:for-each>
|
2771
2821
|
</xsl:template><xsl:template match="text()">
|
2772
2822
|
<xsl:value-of select="."/>
|
2773
2823
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -3714,9 +3764,8 @@
|
|
3714
3764
|
|
3715
3765
|
<!-- Table's note name (NOTE, for example) -->
|
3716
3766
|
|
3717
|
-
<fo:inline padding-right="2mm">
|
3767
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
3718
3768
|
|
3719
|
-
|
3720
3769
|
|
3721
3770
|
|
3722
3771
|
|
@@ -4351,6 +4400,8 @@
|
|
4351
4400
|
<xsl:if test="$font-size != ''">
|
4352
4401
|
<xsl:attribute name="font-size">
|
4353
4402
|
<xsl:choose>
|
4403
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4404
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4354
4405
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4355
4406
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4356
4407
|
</xsl:choose>
|
@@ -5159,6 +5210,7 @@
|
|
5159
5210
|
<xsl:otherwise>
|
5160
5211
|
<fo:block xsl:use-attribute-sets="image-style">
|
5161
5212
|
|
5213
|
+
|
5162
5214
|
<xsl:variable name="src">
|
5163
5215
|
<xsl:call-template name="image_src"/>
|
5164
5216
|
</xsl:variable>
|
@@ -5406,6 +5458,13 @@
|
|
5406
5458
|
</xsl:attribute>
|
5407
5459
|
<xsl:apply-templates mode="svg_update"/>
|
5408
5460
|
</xsl:copy>
|
5461
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
5462
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
5463
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
5464
|
+
<xsl:call-template name="image_svg">
|
5465
|
+
<xsl:with-param name="name" select="$name"/>
|
5466
|
+
</xsl:call-template>
|
5467
|
+
</xsl:for-each>
|
5409
5468
|
</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
5469
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
5411
5470
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -5510,7 +5569,7 @@
|
|
5510
5569
|
</fo:basic-link>
|
5511
5570
|
</fo:block>
|
5512
5571
|
</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">
|
5572
|
+
</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
5573
|
<xsl:apply-templates mode="contents"/>
|
5515
5574
|
<xsl:text> </xsl:text>
|
5516
5575
|
</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">
|
@@ -5518,7 +5577,7 @@
|
|
5518
5577
|
<xsl:text> </xsl:text>
|
5519
5578
|
</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">
|
5520
5579
|
<xsl:value-of select="."/>
|
5521
|
-
</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']
|
5580
|
+
</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">
|
5522
5581
|
<xsl:value-of select="."/>
|
5523
5582
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5524
5583
|
<xsl:apply-templates mode="contents"/>
|
@@ -5616,6 +5675,8 @@
|
|
5616
5675
|
|
5617
5676
|
|
5618
5677
|
|
5678
|
+
|
5679
|
+
|
5619
5680
|
</fo:bookmark-tree>
|
5620
5681
|
</xsl:if>
|
5621
5682
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -5809,12 +5870,16 @@
|
|
5809
5870
|
<xsl:if test="$font-size != ''">
|
5810
5871
|
<xsl:attribute name="font-size">
|
5811
5872
|
<xsl:choose>
|
5873
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
5874
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
5812
5875
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
5813
5876
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
5814
5877
|
</xsl:choose>
|
5815
5878
|
</xsl:attribute>
|
5816
5879
|
</xsl:if>
|
5817
5880
|
|
5881
|
+
|
5882
|
+
|
5818
5883
|
<xsl:apply-templates/>
|
5819
5884
|
</fo:block>
|
5820
5885
|
|
@@ -6167,6 +6232,7 @@
|
|
6167
6232
|
</xsl:choose>
|
6168
6233
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
6169
6234
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
6235
|
+
|
6170
6236
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
6171
6237
|
<xsl:variable name="termsource_text">
|
6172
6238
|
<xsl:apply-templates/>
|
@@ -6195,19 +6261,21 @@
|
|
6195
6261
|
</xsl:if>
|
6196
6262
|
</xsl:template><xsl:variable name="localized.source">
|
6197
6263
|
<xsl:call-template name="getLocalizedString">
|
6198
|
-
|
6199
|
-
|
6264
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
6265
|
+
</xsl:call-template>
|
6200
6266
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
6201
6267
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6202
6268
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6203
6269
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
6204
6270
|
</xsl:if>
|
6205
6271
|
|
6272
|
+
|
6206
6273
|
<fo:inline>
|
6207
6274
|
|
6208
6275
|
|
6209
6276
|
|
6210
6277
|
|
6278
|
+
|
6211
6279
|
<xsl:value-of select="$localized.source"/>
|
6212
6280
|
<xsl:text>: </xsl:text>
|
6213
6281
|
|
@@ -6219,6 +6287,7 @@
|
|
6219
6287
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6220
6288
|
<xsl:apply-templates/>
|
6221
6289
|
</fo:inline>
|
6290
|
+
|
6222
6291
|
</fo:basic-link>
|
6223
6292
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6224
6293
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -6285,6 +6354,9 @@
|
|
6285
6354
|
|
6286
6355
|
</xsl:if>
|
6287
6356
|
|
6357
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
6358
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
6359
|
+
|
6288
6360
|
|
6289
6361
|
|
6290
6362
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -6297,7 +6369,9 @@
|
|
6297
6369
|
|
6298
6370
|
|
6299
6371
|
</xsl:if>
|
6300
|
-
|
6372
|
+
|
6373
|
+
|
6374
|
+
|
6301
6375
|
<xsl:apply-templates/>
|
6302
6376
|
</fo:basic-link>
|
6303
6377
|
|
@@ -6635,6 +6709,7 @@
|
|
6635
6709
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
6636
6710
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
6637
6711
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
6712
|
+
|
6638
6713
|
<xsl:apply-templates/>
|
6639
6714
|
</fo:block>
|
6640
6715
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -6829,9 +6904,97 @@
|
|
6829
6904
|
<fo:block-container border="1pt solid black" width="50%">
|
6830
6905
|
<fo:block> </fo:block>
|
6831
6906
|
</fo:block-container>
|
6907
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
6908
|
+
<xsl:param name="colwidths"/>
|
6909
|
+
<xsl:variable name="colwidths_">
|
6910
|
+
<xsl:choose>
|
6911
|
+
<xsl:when test="not($colwidths)">
|
6912
|
+
<xsl:variable name="toc_table_simple">
|
6913
|
+
<tbody>
|
6914
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6915
|
+
</tbody>
|
6916
|
+
</xsl:variable>
|
6917
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
6918
|
+
<xsl:call-template name="calculate-column-widths">
|
6919
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
6920
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
6921
|
+
</xsl:call-template>
|
6922
|
+
</xsl:when>
|
6923
|
+
<xsl:otherwise>
|
6924
|
+
<xsl:copy-of select="$colwidths"/>
|
6925
|
+
</xsl:otherwise>
|
6926
|
+
</xsl:choose>
|
6927
|
+
</xsl:variable>
|
6928
|
+
<fo:block role="TOCI" space-after="16pt">
|
6929
|
+
<fo:table width="100%" table-layout="fixed">
|
6930
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
6931
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
6932
|
+
</xsl:for-each>
|
6933
|
+
<fo:table-body>
|
6934
|
+
<xsl:apply-templates/>
|
6935
|
+
</fo:table-body>
|
6936
|
+
</fo:table>
|
6937
|
+
</fo:block>
|
6938
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
6939
|
+
<fo:table-row min-height="5mm">
|
6940
|
+
<xsl:apply-templates/>
|
6941
|
+
</fo:table-row>
|
6942
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
6943
|
+
<xsl:apply-templates/>
|
6944
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
6945
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
6946
|
+
<xsl:variable name="target" select="@target"/>
|
6947
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
6948
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
6949
|
+
<fo:table-cell>
|
6950
|
+
<fo:block>
|
6951
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
6952
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
6953
|
+
<xsl:choose>
|
6954
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
6955
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
6956
|
+
</xsl:choose>
|
6957
|
+
</xsl:for-each>
|
6958
|
+
</fo:basic-link>
|
6959
|
+
</fo:block>
|
6960
|
+
</fo:table-cell>
|
6961
|
+
</xsl:for-each>
|
6962
|
+
<!-- last column - for page numbers -->
|
6963
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
6964
|
+
<fo:block>
|
6965
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
6966
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
6967
|
+
</fo:basic-link>
|
6968
|
+
</fo:block>
|
6969
|
+
</fo:table-cell>
|
6970
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
6971
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6972
|
+
</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">
|
6973
|
+
<tr>
|
6974
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6975
|
+
</tr>
|
6976
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
6977
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
6978
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
6979
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
6980
|
+
<td>
|
6981
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
6982
|
+
<xsl:copy-of select="."/>
|
6983
|
+
</xsl:for-each>
|
6984
|
+
</td>
|
6985
|
+
</xsl:for-each>
|
6986
|
+
<td>333</td> <!-- page number, just for fill -->
|
6832
6987
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6833
6988
|
<fo:inline padding-right="5mm"> </fo:inline>
|
6834
6989
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6990
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
6991
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
6992
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
6993
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 2 2">
|
6994
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
6995
|
+
</svg>
|
6996
|
+
</fo:instream-foreign-object>
|
6997
|
+
</fo:inline>
|
6835
6998
|
</xsl:template><xsl:template name="convertDate">
|
6836
6999
|
<xsl:param name="date"/>
|
6837
7000
|
<xsl:param name="format" select="'short'"/>
|