metanorma-itu 1.3.11 → 1.3.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad435d6188b9f2e881c84f0d43a6c35fd2bb4d6c993d1d796b830f755a2d3e33
4
- data.tar.gz: 95409047e659d65a1c4b0102ebf910d69fe062ab4731511060625ed78ddb362c
3
+ metadata.gz: bee1431e0c6b0cd88e3a8a835f2cc912c30e6541a8e5c00400c869f215d9c0af
4
+ data.tar.gz: 2a591666e4d19a0c787610832d2fb6412223870b1811252894a611e73859f9a0
5
5
  SHA512:
6
- metadata.gz: 8a3db12e7809503cd242cb1c1f3b6d1b1a579ebbed62fb7ba91c357bdc264b601aefa5e64dee6c0aa2d3cf0a2afd2a01c5e6f43c98343dbc5d0b742aa3472c96
7
- data.tar.gz: bd64d897084265a9be463d56dcf31dde685b7e36ab56f75016d89d2ad7dc486816e393557c8c84a013e4fd06567c4b8ce4ffcd695d15597ada66b12295f5c006
6
+ metadata.gz: 87f1e8df611c7b3b7c8d2c5d240373c8b6e716f84729432a36c1370e9aa025a6b8949618c5689f16963ff4336c8cd2745d7a49d60223c83cb534dd68ecb84268
7
+ data.tar.gz: 565ddfa0f32450b576592feb7e54aed6fbb99ece041c83b412f6627ec16b8bf534e3b82d1b0ff71668ca69123ec14a3046895f0dd20a9f00de273b993eed1779
@@ -1,6 +1,7 @@
1
1
  require "asciidoctor"
2
2
  require "asciidoctor/standoc/converter"
3
3
  require "fileutils"
4
+ require_relative "./front_id"
4
5
 
5
6
  module Asciidoctor
6
7
  module ITU
@@ -13,6 +14,10 @@ module Asciidoctor
13
14
  end
14
15
  end
15
16
 
17
+ def relaton_relations
18
+ super + %w(complements)
19
+ end
20
+
16
21
  def title_attr(type, lang = "en")
17
22
  { language: lang, format: "text/plain", type: type }
18
23
  end
@@ -109,55 +114,6 @@ module Asciidoctor
109
114
  end
110
115
  end
111
116
 
112
- def metadata_id(node, xml)
113
- provisional_id(node, xml)
114
- itu_id(node, xml)
115
- recommendation_id(node, xml)
116
- end
117
-
118
- def provisional_id(node, xml)
119
- return unless node.attr("provisional-name")
120
-
121
- xml.docidentifier **{ type: "ITU-provisional" } do |i|
122
- i << node.attr("provisional-name")
123
- end
124
- end
125
-
126
- ITULANG = { "en" => "E", "fr" => "F", "ar" => "A", "es" => "S",
127
- "zh" => "C", "ru" => "R" }.freeze
128
-
129
- def itu_id1(node, lang)
130
- bureau = node.attr("bureau") || "T"
131
- id = if doctype(node) == "service-publication"
132
- @i18n.annex_to_itu_ob_abbrev.sub(/%/, node.attr("docnumber"))
133
- else
134
- "ITU-#{bureau} #{node.attr('docnumber')}"
135
- end
136
- id + (lang ? "-#{ITULANG[@lang]}" : "")
137
- end
138
-
139
- def itu_id(node, xml)
140
- return unless node.attr("docnumber")
141
-
142
- xml.docidentifier **{ type: "ITU" } do |i|
143
- i << itu_id1(node, false)
144
- end
145
- xml.docidentifier **{ type: "ITU-lang" } do |i|
146
- i << itu_id1(node, true)
147
- end
148
- xml.docnumber { |i| i << node.attr("docnumber") }
149
- end
150
-
151
- def recommendation_id(node, xml)
152
- return unless node.attr("recommendationnumber")
153
-
154
- node.attr("recommendationnumber").split("/").each do |s|
155
- xml.docidentifier **{ type: "ITU-Recommendation" } do |i|
156
- i << s
157
- end
158
- end
159
- end
160
-
161
117
  def metadata_series(node, xml)
162
118
  node.attr("series") and
163
119
  xml.series **{ type: "main" } do |s|
@@ -191,18 +147,6 @@ module Asciidoctor
191
147
  xml.ip_notice_received (node.attr("ip-notice-received") || "false")
192
148
  end
193
149
 
194
- def structured_id(node, xml)
195
- return unless node.attr("docnumber")
196
-
197
- xml.structuredidentifier do |i|
198
- i.bureau node.attr("bureau") || "T"
199
- i.docnumber node.attr("docnumber")
200
- a = node.attr("annexid") and i.annexid a
201
- a = node.attr("amendment-number") and i.amendment a
202
- a = node.attr("corrigendum-number") and i.corrigendum a
203
- end
204
- end
205
-
206
150
  def metadata_techreport(node, xml)
207
151
  a = node.attr("meeting") and
208
152
  metadata_meeting(a, node.attr("meeting-acronym"), xml)
@@ -0,0 +1,67 @@
1
+ module Asciidoctor
2
+ module ITU
3
+ class Converter < Standoc::Converter
4
+ def metadata_id(node, xml)
5
+ provisional_id(node, xml)
6
+ itu_id(node, xml)
7
+ recommendation_id(node, xml)
8
+ end
9
+
10
+ def provisional_id(node, xml)
11
+ return unless node.attr("provisional-name")
12
+
13
+ xml.docidentifier **{ type: "ITU-provisional" } do |i|
14
+ i << node.attr("provisional-name")
15
+ end
16
+ end
17
+
18
+ ITULANG = { "en" => "E", "fr" => "F", "ar" => "A", "es" => "S",
19
+ "zh" => "C", "ru" => "R" }.freeze
20
+
21
+ def itu_id1(node, lang)
22
+ bureau = node.attr("bureau") || "T"
23
+ id = if doctype(node) == "service-publication"
24
+ @i18n.annex_to_itu_ob_abbrev.sub(/%/,
25
+ node.attr("docnumber"))
26
+ else
27
+ "ITU-#{bureau} #{node.attr('docnumber')}"
28
+ end
29
+ id + (lang ? "-#{ITULANG[@lang]}" : "")
30
+ end
31
+
32
+ def itu_id(node, xml)
33
+ return unless node.attr("docnumber")
34
+
35
+ xml.docidentifier **{ type: "ITU" } do |i|
36
+ i << itu_id1(node, false)
37
+ end
38
+ xml.docidentifier **{ type: "ITU-lang" } do |i|
39
+ i << itu_id1(node, true)
40
+ end
41
+ xml.docnumber { |i| i << node.attr("docnumber") }
42
+ end
43
+
44
+ def recommendation_id(node, xml)
45
+ return unless node.attr("recommendationnumber")
46
+
47
+ node.attr("recommendationnumber").split("/").each do |s|
48
+ xml.docidentifier **{ type: "ITU-Recommendation" } do |i|
49
+ i << s
50
+ end
51
+ end
52
+ end
53
+
54
+ def structured_id(node, xml)
55
+ return unless node.attr("docnumber")
56
+
57
+ xml.structuredidentifier do |i|
58
+ i.bureau node.attr("bureau") || "T"
59
+ i.docnumber node.attr("docnumber")
60
+ a = node.attr("annexid") and i.annexid a
61
+ a = node.attr("amendment-number") and i.amendment a
62
+ a = node.attr("corrigendum-number") and i.corrigendum a
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -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">
@@ -2888,13 +2888,20 @@
2888
2888
 
2889
2889
  </xsl:attribute-set><xsl:attribute-set name="list-style">
2890
2890
 
2891
- </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">
2891
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
2892
+ <xsl:attribute name="line-height">135%</xsl:attribute>
2893
+ </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
2894
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2893
2895
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2894
2896
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2895
2897
  <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
2898
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2897
- </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2899
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2900
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2901
+ <xsl:sort select="@displayorder" data-type="number"/>
2902
+ <xsl:apply-templates select="." mode="contents"/>
2903
+ </xsl:for-each>
2904
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2898
2905
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2899
2906
 
2900
2907
  <!-- Normative references -->
@@ -2907,13 +2914,33 @@
2907
2914
  <!-- Bibliography -->
2908
2915
  <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
2916
 
2910
- </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2917
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2918
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2919
+ <xsl:sort select="@displayorder" data-type="number"/>
2920
+ <xsl:apply-templates select="." mode="contents"/>
2921
+ </xsl:for-each>
2922
+
2923
+ <xsl:for-each select="/*/*[local-name()='annex']">
2924
+ <xsl:sort select="@displayorder" data-type="number"/>
2925
+ <xsl:apply-templates select="." mode="contents"/>
2926
+ </xsl:for-each>
2927
+
2928
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2929
+ <xsl:sort select="@displayorder" data-type="number"/>
2930
+ <xsl:apply-templates select="." mode="contents"/>
2931
+ </xsl:for-each>
2932
+ </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2911
2933
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2912
2934
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2913
2935
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2914
2936
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2915
2937
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2916
- </xsl:template><xsl:template name="processMainSectionsDefault">
2938
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2939
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2940
+ <xsl:sort select="@displayorder" data-type="number"/>
2941
+ <xsl:apply-templates select="."/>
2942
+ </xsl:for-each>
2943
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2917
2944
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2918
2945
 
2919
2946
  <!-- Normative references -->
@@ -2925,6 +2952,22 @@
2925
2952
  <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2926
2953
  <!-- Bibliography -->
2927
2954
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2955
+ </xsl:template><xsl:template name="processMainSectionsDefault">
2956
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2957
+ <xsl:sort select="@displayorder" data-type="number"/>
2958
+ <xsl:apply-templates select="."/>
2959
+
2960
+ </xsl:for-each>
2961
+
2962
+ <xsl:for-each select="/*/*[local-name()='annex']">
2963
+ <xsl:sort select="@displayorder" data-type="number"/>
2964
+ <xsl:apply-templates select="."/>
2965
+ </xsl:for-each>
2966
+
2967
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2968
+ <xsl:sort select="@displayorder" data-type="number"/>
2969
+ <xsl:apply-templates select="."/>
2970
+ </xsl:for-each>
2928
2971
  </xsl:template><xsl:template match="text()">
2929
2972
  <xsl:value-of select="."/>
2930
2973
  </xsl:template><xsl:template match="*[local-name()='br']">
@@ -5532,6 +5575,13 @@
5532
5575
  </xsl:attribute>
5533
5576
  <xsl:apply-templates mode="svg_update"/>
5534
5577
  </xsl:copy>
5578
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
5579
+ <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
5580
+ <xsl:for-each select="*[local-name() = 'svg']">
5581
+ <xsl:call-template name="image_svg">
5582
+ <xsl:with-param name="name" select="$name"/>
5583
+ </xsl:call-template>
5584
+ </xsl:for-each>
5535
5585
  </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
5586
  <xsl:variable name="svg_content" select="document(@src)"/>
5537
5587
  <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
@@ -5636,7 +5686,7 @@
5636
5686
  </fo:basic-link>
5637
5687
  </fo:block>
5638
5688
  </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">
5689
+ </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
5690
  <xsl:apply-templates mode="contents"/>
5641
5691
  <xsl:text> </xsl:text>
5642
5692
  </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">
@@ -6316,8 +6366,8 @@
6316
6366
  </xsl:if>
6317
6367
  </xsl:template><xsl:variable name="localized.source">
6318
6368
  <xsl:call-template name="getLocalizedString">
6319
- <xsl:with-param name="key">source</xsl:with-param>
6320
- </xsl:call-template>
6369
+ <xsl:with-param name="key">source</xsl:with-param>
6370
+ </xsl:call-template>
6321
6371
  </xsl:variable><xsl:template match="*[local-name() = 'origin']">
6322
6372
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
6323
6373
  <xsl:if test="normalize-space(@citeas) = ''">
@@ -6327,6 +6377,7 @@
6327
6377
  <fo:inline xsl:use-attribute-sets="origin-style">
6328
6378
  <xsl:apply-templates/>
6329
6379
  </fo:inline>
6380
+
6330
6381
  </fo:basic-link>
6331
6382
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
6332
6383
  <fo:inline><xsl:apply-templates/></fo:inline>
@@ -6393,6 +6444,9 @@
6393
6444
 
6394
6445
  </xsl:if>
6395
6446
 
6447
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
6448
+ <xsl:variable name="text" select="normalize-space()"/>
6449
+
6396
6450
 
6397
6451
 
6398
6452
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -6405,7 +6459,9 @@
6405
6459
 
6406
6460
 
6407
6461
  </xsl:if>
6408
-
6462
+
6463
+
6464
+
6409
6465
  <xsl:apply-templates/>
6410
6466
  </fo:basic-link>
6411
6467
 
@@ -6921,9 +6977,97 @@
6921
6977
  <fo:block-container border="1pt solid black" width="50%">
6922
6978
  <fo:block> </fo:block>
6923
6979
  </fo:block-container>
6980
+ </xsl:template><xsl:template match="*[local-name() = 'toc']">
6981
+ <xsl:param name="colwidths"/>
6982
+ <xsl:variable name="colwidths_">
6983
+ <xsl:choose>
6984
+ <xsl:when test="not($colwidths)">
6985
+ <xsl:variable name="toc_table_simple">
6986
+ <tbody>
6987
+ <xsl:apply-templates mode="toc_table_width"/>
6988
+ </tbody>
6989
+ </xsl:variable>
6990
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
6991
+ <xsl:call-template name="calculate-column-widths">
6992
+ <xsl:with-param name="cols-count" select="$cols-count"/>
6993
+ <xsl:with-param name="table" select="$toc_table_simple"/>
6994
+ </xsl:call-template>
6995
+ </xsl:when>
6996
+ <xsl:otherwise>
6997
+ <xsl:copy-of select="$colwidths"/>
6998
+ </xsl:otherwise>
6999
+ </xsl:choose>
7000
+ </xsl:variable>
7001
+ <fo:block role="TOCI" space-after="16pt">
7002
+ <fo:table width="100%" table-layout="fixed">
7003
+ <xsl:for-each select="xalan:nodeset($colwidths_)/column">
7004
+ <fo:table-column column-width="proportional-column-width({.})"/>
7005
+ </xsl:for-each>
7006
+ <fo:table-body>
7007
+ <xsl:apply-templates/>
7008
+ </fo:table-body>
7009
+ </fo:table>
7010
+ </fo:block>
7011
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
7012
+ <fo:table-row min-height="5mm">
7013
+ <xsl:apply-templates/>
7014
+ </fo:table-row>
7015
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
7016
+ <xsl:apply-templates/>
7017
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
7018
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
7019
+ <xsl:variable name="target" select="@target"/>
7020
+ <xsl:for-each select="*[local-name() = 'tab']">
7021
+ <xsl:variable name="current_id" select="generate-id()"/>
7022
+ <fo:table-cell>
7023
+ <fo:block>
7024
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
7025
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
7026
+ <xsl:choose>
7027
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
7028
+ <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
7029
+ </xsl:choose>
7030
+ </xsl:for-each>
7031
+ </fo:basic-link>
7032
+ </fo:block>
7033
+ </fo:table-cell>
7034
+ </xsl:for-each>
7035
+ <!-- last column - for page numbers -->
7036
+ <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
7037
+ <fo:block>
7038
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
7039
+ <fo:page-number-citation ref-id="{$target}"/>
7040
+ </fo:basic-link>
7041
+ </fo:block>
7042
+ </fo:table-cell>
7043
+ </xsl:template><xsl:template match="*" mode="toc_table_width">
7044
+ <xsl:apply-templates mode="toc_table_width"/>
7045
+ </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">
7046
+ <tr>
7047
+ <xsl:apply-templates mode="toc_table_width"/>
7048
+ </tr>
7049
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
7050
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
7051
+ <xsl:for-each select="*[local-name() = 'tab']">
7052
+ <xsl:variable name="current_id" select="generate-id()"/>
7053
+ <td>
7054
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
7055
+ <xsl:copy-of select="."/>
7056
+ </xsl:for-each>
7057
+ </td>
7058
+ </xsl:for-each>
7059
+ <td>333</td> <!-- page number, just for fill -->
6924
7060
  </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6925
7061
  <fo:inline padding-right="5mm"> </fo:inline>
6926
7062
  <fo:inline><xsl:apply-templates/></fo:inline>
7063
+ </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
7064
+ <fo:inline padding-right="2.5mm" baseline-shift="5%">
7065
+ <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
7066
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
7067
+ <rect x="0" y="0" width="2" height="2" fill="black"/>
7068
+ </svg>
7069
+ </fo:instream-foreign-object>
7070
+ </fo:inline>
6927
7071
  </xsl:template><xsl:template name="convertDate">
6928
7072
  <xsl:param name="date"/>
6929
7073
  <xsl:param name="format" select="'short'"/>