metanorma-cc 1.7.10 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/quickstart.adoc +2 -2
- data/lib/asciidoctor/cc/basicdoc.rng +21 -4
- data/lib/asciidoctor/cc/converter.rb +14 -12
- data/lib/asciidoctor/cc/isodoc.rng +435 -78
- data/lib/asciidoctor/cc/reqt.rng +23 -2
- data/lib/isodoc/cc/cc.standard.xsl +174 -11
- data/lib/isodoc/cc/html/wordstyle.css +11 -0
- data/lib/isodoc/cc/html/wordstyle.scss +13 -2
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +1 -1
- metadata +5 -5
data/lib/asciidoctor/cc/reqt.rng
CHANGED
@@ -58,6 +58,14 @@
|
|
58
58
|
<optional>
|
59
59
|
<attribute name="type"/>
|
60
60
|
</optional>
|
61
|
+
<optional>
|
62
|
+
<attribute name="tag"/>
|
63
|
+
</optional>
|
64
|
+
<optional>
|
65
|
+
<attribute name="multilingual-rendering">
|
66
|
+
<ref name="MultilingualRenderingType"/>
|
67
|
+
</attribute>
|
68
|
+
</optional>
|
61
69
|
<optional>
|
62
70
|
<ref name="reqtitle"/>
|
63
71
|
</optional>
|
@@ -101,7 +109,9 @@
|
|
101
109
|
</define>
|
102
110
|
<define name="label">
|
103
111
|
<element name="label">
|
104
|
-
<
|
112
|
+
<oneOrMore>
|
113
|
+
<ref name="TextElement"/>
|
114
|
+
</oneOrMore>
|
105
115
|
</element>
|
106
116
|
</define>
|
107
117
|
<define name="subject">
|
@@ -175,8 +185,19 @@
|
|
175
185
|
<data type="boolean"/>
|
176
186
|
</attribute>
|
177
187
|
</optional>
|
188
|
+
<optional>
|
189
|
+
<attribute name="tag"/>
|
190
|
+
</optional>
|
191
|
+
<optional>
|
192
|
+
<attribute name="multilingual-rendering">
|
193
|
+
<ref name="MultilingualRenderingType"/>
|
194
|
+
</attribute>
|
195
|
+
</optional>
|
178
196
|
<oneOrMore>
|
179
|
-
<
|
197
|
+
<choice>
|
198
|
+
<ref name="BasicBlock"/>
|
199
|
+
<ref name="component"/>
|
200
|
+
</choice>
|
180
201
|
</oneOrMore>
|
181
202
|
</define>
|
182
203
|
<define name="ObligationType">
|
@@ -911,6 +911,8 @@
|
|
911
911
|
|
912
912
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
913
913
|
|
914
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
915
|
+
|
914
916
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
915
917
|
|
916
918
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -1201,6 +1203,11 @@
|
|
1201
1203
|
|
1202
1204
|
|
1203
1205
|
|
1206
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1207
|
+
|
1208
|
+
|
1209
|
+
|
1210
|
+
|
1204
1211
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1205
1212
|
|
1206
1213
|
|
@@ -1368,13 +1375,20 @@
|
|
1368
1375
|
|
1369
1376
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1370
1377
|
|
1371
|
-
</xsl:attribute-set><xsl:
|
1378
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1379
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1380
|
+
</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">
|
1372
1381
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1373
1382
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1374
1383
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1375
1384
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1376
1385
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1377
|
-
</xsl:template><xsl:template name="
|
1386
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1387
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1388
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1389
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1390
|
+
</xsl:for-each>
|
1391
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1378
1392
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1379
1393
|
|
1380
1394
|
<!-- Normative references -->
|
@@ -1387,13 +1401,33 @@
|
|
1387
1401
|
<!-- Bibliography -->
|
1388
1402
|
<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"/>
|
1389
1403
|
|
1390
|
-
</xsl:template><xsl:template name="
|
1404
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1405
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1406
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1407
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1408
|
+
</xsl:for-each>
|
1409
|
+
|
1410
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1411
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1412
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1413
|
+
</xsl:for-each>
|
1414
|
+
|
1415
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1416
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1417
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1418
|
+
</xsl:for-each>
|
1419
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1391
1420
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1392
1421
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1393
1422
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1394
1423
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1395
1424
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1396
|
-
</xsl:template><xsl:template name="
|
1425
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1426
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1427
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1428
|
+
<xsl:apply-templates select="."/>
|
1429
|
+
</xsl:for-each>
|
1430
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1397
1431
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1398
1432
|
|
1399
1433
|
<!-- Normative references -->
|
@@ -1405,6 +1439,22 @@
|
|
1405
1439
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1406
1440
|
<!-- Bibliography -->
|
1407
1441
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1442
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1443
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1444
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1445
|
+
<xsl:apply-templates select="."/>
|
1446
|
+
|
1447
|
+
</xsl:for-each>
|
1448
|
+
|
1449
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1450
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1451
|
+
<xsl:apply-templates select="."/>
|
1452
|
+
</xsl:for-each>
|
1453
|
+
|
1454
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1455
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1456
|
+
<xsl:apply-templates select="."/>
|
1457
|
+
</xsl:for-each>
|
1408
1458
|
</xsl:template><xsl:template match="text()">
|
1409
1459
|
<xsl:value-of select="."/>
|
1410
1460
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2241,9 +2291,8 @@
|
|
2241
2291
|
|
2242
2292
|
<!-- Table's note name (NOTE, for example) -->
|
2243
2293
|
|
2244
|
-
<fo:inline padding-right="2mm">
|
2294
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2245
2295
|
|
2246
|
-
|
2247
2296
|
|
2248
2297
|
|
2249
2298
|
|
@@ -2855,6 +2904,8 @@
|
|
2855
2904
|
<xsl:if test="$font-size != ''">
|
2856
2905
|
<xsl:attribute name="font-size">
|
2857
2906
|
<xsl:choose>
|
2907
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
2908
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
2858
2909
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2859
2910
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2860
2911
|
</xsl:choose>
|
@@ -3654,6 +3705,7 @@
|
|
3654
3705
|
<xsl:otherwise>
|
3655
3706
|
<fo:block xsl:use-attribute-sets="image-style">
|
3656
3707
|
|
3708
|
+
|
3657
3709
|
<xsl:variable name="src">
|
3658
3710
|
<xsl:call-template name="image_src"/>
|
3659
3711
|
</xsl:variable>
|
@@ -3901,6 +3953,13 @@
|
|
3901
3953
|
</xsl:attribute>
|
3902
3954
|
<xsl:apply-templates mode="svg_update"/>
|
3903
3955
|
</xsl:copy>
|
3956
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
3957
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
3958
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
3959
|
+
<xsl:call-template name="image_svg">
|
3960
|
+
<xsl:with-param name="name" select="$name"/>
|
3961
|
+
</xsl:call-template>
|
3962
|
+
</xsl:for-each>
|
3904
3963
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3905
3964
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3906
3965
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4005,7 +4064,7 @@
|
|
4005
4064
|
</fo:basic-link>
|
4006
4065
|
</fo:block>
|
4007
4066
|
</fo:block-container>
|
4008
|
-
</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">
|
4067
|
+
</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">
|
4009
4068
|
<xsl:apply-templates mode="contents"/>
|
4010
4069
|
<xsl:text> </xsl:text>
|
4011
4070
|
</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">
|
@@ -4013,7 +4072,7 @@
|
|
4013
4072
|
<xsl:text> </xsl:text>
|
4014
4073
|
</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">
|
4015
4074
|
<xsl:value-of select="."/>
|
4016
|
-
</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']
|
4075
|
+
</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">
|
4017
4076
|
<xsl:value-of select="."/>
|
4018
4077
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4019
4078
|
<xsl:apply-templates mode="contents"/>
|
@@ -4111,6 +4170,8 @@
|
|
4111
4170
|
|
4112
4171
|
|
4113
4172
|
|
4173
|
+
|
4174
|
+
|
4114
4175
|
</fo:bookmark-tree>
|
4115
4176
|
</xsl:if>
|
4116
4177
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4304,12 +4365,16 @@
|
|
4304
4365
|
<xsl:if test="$font-size != ''">
|
4305
4366
|
<xsl:attribute name="font-size">
|
4306
4367
|
<xsl:choose>
|
4368
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4369
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4307
4370
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4308
4371
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4309
4372
|
</xsl:choose>
|
4310
4373
|
</xsl:attribute>
|
4311
4374
|
</xsl:if>
|
4312
4375
|
|
4376
|
+
|
4377
|
+
|
4313
4378
|
<xsl:apply-templates/>
|
4314
4379
|
</fo:block>
|
4315
4380
|
|
@@ -4657,6 +4722,7 @@
|
|
4657
4722
|
</xsl:choose>
|
4658
4723
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4659
4724
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4725
|
+
|
4660
4726
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4661
4727
|
<xsl:variable name="termsource_text">
|
4662
4728
|
<xsl:apply-templates/>
|
@@ -4685,14 +4751,15 @@
|
|
4685
4751
|
</xsl:if>
|
4686
4752
|
</xsl:template><xsl:variable name="localized.source">
|
4687
4753
|
<xsl:call-template name="getLocalizedString">
|
4688
|
-
|
4689
|
-
|
4754
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4755
|
+
</xsl:call-template>
|
4690
4756
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4691
4757
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4692
4758
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4693
4759
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4694
4760
|
</xsl:if>
|
4695
4761
|
|
4762
|
+
|
4696
4763
|
<fo:inline>
|
4697
4764
|
|
4698
4765
|
|
@@ -4700,6 +4767,7 @@
|
|
4700
4767
|
|
4701
4768
|
|
4702
4769
|
|
4770
|
+
|
4703
4771
|
<xsl:call-template name="getTitle">
|
4704
4772
|
<xsl:with-param name="name" select="'title-source'"/>
|
4705
4773
|
</xsl:call-template>
|
@@ -4711,6 +4779,7 @@
|
|
4711
4779
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4712
4780
|
<xsl:apply-templates/>
|
4713
4781
|
</fo:inline>
|
4782
|
+
|
4714
4783
|
</fo:basic-link>
|
4715
4784
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4716
4785
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4777,6 +4846,9 @@
|
|
4777
4846
|
|
4778
4847
|
</xsl:if>
|
4779
4848
|
|
4849
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4850
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4851
|
+
|
4780
4852
|
|
4781
4853
|
|
4782
4854
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4792,7 +4864,9 @@
|
|
4792
4864
|
|
4793
4865
|
|
4794
4866
|
</xsl:if>
|
4795
|
-
|
4867
|
+
|
4868
|
+
|
4869
|
+
|
4796
4870
|
<xsl:apply-templates/>
|
4797
4871
|
</fo:basic-link>
|
4798
4872
|
|
@@ -5131,6 +5205,7 @@
|
|
5131
5205
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5132
5206
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5133
5207
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5208
|
+
|
5134
5209
|
<xsl:apply-templates/>
|
5135
5210
|
</fo:block>
|
5136
5211
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5299,9 +5374,97 @@
|
|
5299
5374
|
<fo:block-container border="1pt solid black" width="50%">
|
5300
5375
|
<fo:block> </fo:block>
|
5301
5376
|
</fo:block-container>
|
5377
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5378
|
+
<xsl:param name="colwidths"/>
|
5379
|
+
<xsl:variable name="colwidths_">
|
5380
|
+
<xsl:choose>
|
5381
|
+
<xsl:when test="not($colwidths)">
|
5382
|
+
<xsl:variable name="toc_table_simple">
|
5383
|
+
<tbody>
|
5384
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5385
|
+
</tbody>
|
5386
|
+
</xsl:variable>
|
5387
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5388
|
+
<xsl:call-template name="calculate-column-widths">
|
5389
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5390
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5391
|
+
</xsl:call-template>
|
5392
|
+
</xsl:when>
|
5393
|
+
<xsl:otherwise>
|
5394
|
+
<xsl:copy-of select="$colwidths"/>
|
5395
|
+
</xsl:otherwise>
|
5396
|
+
</xsl:choose>
|
5397
|
+
</xsl:variable>
|
5398
|
+
<fo:block role="TOCI" space-after="16pt">
|
5399
|
+
<fo:table width="100%" table-layout="fixed">
|
5400
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5401
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5402
|
+
</xsl:for-each>
|
5403
|
+
<fo:table-body>
|
5404
|
+
<xsl:apply-templates/>
|
5405
|
+
</fo:table-body>
|
5406
|
+
</fo:table>
|
5407
|
+
</fo:block>
|
5408
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5409
|
+
<fo:table-row min-height="5mm">
|
5410
|
+
<xsl:apply-templates/>
|
5411
|
+
</fo:table-row>
|
5412
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5413
|
+
<xsl:apply-templates/>
|
5414
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5415
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5416
|
+
<xsl:variable name="target" select="@target"/>
|
5417
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5418
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5419
|
+
<fo:table-cell>
|
5420
|
+
<fo:block>
|
5421
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5422
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5423
|
+
<xsl:choose>
|
5424
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5425
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5426
|
+
</xsl:choose>
|
5427
|
+
</xsl:for-each>
|
5428
|
+
</fo:basic-link>
|
5429
|
+
</fo:block>
|
5430
|
+
</fo:table-cell>
|
5431
|
+
</xsl:for-each>
|
5432
|
+
<!-- last column - for page numbers -->
|
5433
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5434
|
+
<fo:block>
|
5435
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5436
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5437
|
+
</fo:basic-link>
|
5438
|
+
</fo:block>
|
5439
|
+
</fo:table-cell>
|
5440
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5441
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5442
|
+
</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">
|
5443
|
+
<tr>
|
5444
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5445
|
+
</tr>
|
5446
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5447
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5448
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5449
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5450
|
+
<td>
|
5451
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5452
|
+
<xsl:copy-of select="."/>
|
5453
|
+
</xsl:for-each>
|
5454
|
+
</td>
|
5455
|
+
</xsl:for-each>
|
5456
|
+
<td>333</td> <!-- page number, just for fill -->
|
5302
5457
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5303
5458
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5304
5459
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5460
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5461
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5462
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5463
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5464
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5465
|
+
</svg>
|
5466
|
+
</fo:instream-foreign-object>
|
5467
|
+
</fo:inline>
|
5305
5468
|
</xsl:template><xsl:template name="convertDate">
|
5306
5469
|
<xsl:param name="date"/>
|
5307
5470
|
<xsl:param name="format" select="'short'"/>
|
@@ -152,6 +152,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
152
152
|
|
153
153
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText {
|
154
154
|
mso-style-noshow: yes;
|
155
|
+
mso-style-name: "Comment Text";
|
155
156
|
mso-style-unhide: no;
|
156
157
|
margin: 0cm;
|
157
158
|
margin-bottom: .0001pt;
|
@@ -371,6 +372,7 @@ div.figure, p.figure {
|
|
371
372
|
|
372
373
|
h1 {
|
373
374
|
mso-style-priority: 1;
|
375
|
+
mso-style-name: "Heading 1";
|
374
376
|
mso-style-unhide: no;
|
375
377
|
mso-style-qformat: yes;
|
376
378
|
mso-style-link: "Heading 1 Char";
|
@@ -457,6 +459,7 @@ h1.Annex {
|
|
457
459
|
|
458
460
|
h2 {
|
459
461
|
mso-style-priority: 2;
|
462
|
+
mso-style-name: "Heading 2";
|
460
463
|
mso-style-unhide: no;
|
461
464
|
mso-style-qformat: yes;
|
462
465
|
mso-style-parent: "Heading 1";
|
@@ -485,6 +488,7 @@ h2 {
|
|
485
488
|
|
486
489
|
h3 {
|
487
490
|
mso-style-priority: 3;
|
491
|
+
mso-style-name: "Heading 3";
|
488
492
|
mso-style-unhide: no;
|
489
493
|
mso-style-qformat: yes;
|
490
494
|
mso-style-parent: "Heading 1";
|
@@ -512,6 +516,7 @@ h3 {
|
|
512
516
|
|
513
517
|
h4 {
|
514
518
|
mso-style-priority: 4;
|
519
|
+
mso-style-name: "Heading 4";
|
515
520
|
mso-style-unhide: no;
|
516
521
|
mso-style-qformat: yes;
|
517
522
|
mso-style-parent: "Heading 3";
|
@@ -539,6 +544,7 @@ h4 {
|
|
539
544
|
|
540
545
|
h5 {
|
541
546
|
mso-style-priority: 5;
|
547
|
+
mso-style-name: "Heading 5";
|
542
548
|
mso-style-unhide: no;
|
543
549
|
mso-style-qformat: yes;
|
544
550
|
mso-style-parent: "Heading 4";
|
@@ -566,6 +572,7 @@ h5 {
|
|
566
572
|
|
567
573
|
h6 {
|
568
574
|
mso-style-priority: 6;
|
575
|
+
mso-style-name: "Heading 6";
|
569
576
|
mso-style-unhide: no;
|
570
577
|
mso-style-qformat: yes;
|
571
578
|
mso-style-parent: "Heading 5";
|
@@ -593,6 +600,7 @@ h6 {
|
|
593
600
|
|
594
601
|
p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
595
602
|
mso-style-priority: 39;
|
603
|
+
mso-style-name: "TOC 1";
|
596
604
|
mso-style-unhide: no;
|
597
605
|
mso-style-next: Normal;
|
598
606
|
margin-top: 6.0pt;
|
@@ -615,6 +623,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
|
615
623
|
|
616
624
|
p.MsoToc2, li.MsoToc2, div.MsoToc2 {
|
617
625
|
mso-style-noshow: yes;
|
626
|
+
mso-style-name: "TOC 2";
|
618
627
|
mso-style-priority: 39;
|
619
628
|
mso-style-unhide: no;
|
620
629
|
mso-style-parent: "TOC 1";
|
@@ -639,6 +648,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2 {
|
|
639
648
|
|
640
649
|
p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
641
650
|
mso-style-noshow: yes;
|
651
|
+
mso-style-name: "TOC 3";
|
642
652
|
mso-style-priority: 39;
|
643
653
|
mso-style-unhide: no;
|
644
654
|
mso-style-parent: "TOC 2";
|
@@ -662,6 +672,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
|
662
672
|
mso-bidi-font-weight: normal; }
|
663
673
|
|
664
674
|
span.MsoFootnoteReference {
|
675
|
+
mso-style-name: "Footnote Reference";
|
665
676
|
mso-style-priority: 99;
|
666
677
|
vertical-align: super; }
|
667
678
|
|
@@ -138,6 +138,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
138
138
|
|
139
139
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
|
140
140
|
{mso-style-noshow:yes;
|
141
|
+
mso-style-name:"Comment Text";
|
141
142
|
mso-style-unhide:no;
|
142
143
|
margin:0cm;
|
143
144
|
margin-bottom:.0001pt;
|
@@ -341,6 +342,7 @@ div.figure, p.figure
|
|
341
342
|
|
342
343
|
h1
|
343
344
|
{mso-style-priority:1;
|
345
|
+
mso-style-name:"Heading 1";
|
344
346
|
mso-style-unhide:no;
|
345
347
|
mso-style-qformat:yes;
|
346
348
|
mso-style-link:"Heading 1 Char";
|
@@ -424,6 +426,7 @@ h1.Annex
|
|
424
426
|
mso-bidi-font-weight:normal;}
|
425
427
|
h2
|
426
428
|
{mso-style-priority:2;
|
429
|
+
mso-style-name:"Heading 2";
|
427
430
|
mso-style-unhide:no;
|
428
431
|
mso-style-qformat:yes;
|
429
432
|
mso-style-parent:"Heading 1";
|
@@ -451,6 +454,7 @@ h2
|
|
451
454
|
mso-bidi-font-weight:normal;}
|
452
455
|
h3
|
453
456
|
{mso-style-priority:3;
|
457
|
+
mso-style-name:"Heading 3";
|
454
458
|
mso-style-unhide:no;
|
455
459
|
mso-style-qformat:yes;
|
456
460
|
mso-style-parent:"Heading 1";
|
@@ -477,6 +481,7 @@ h3
|
|
477
481
|
mso-bidi-font-weight:normal;}
|
478
482
|
h4
|
479
483
|
{mso-style-priority:4;
|
484
|
+
mso-style-name:"Heading 4";
|
480
485
|
mso-style-unhide:no;
|
481
486
|
mso-style-qformat:yes;
|
482
487
|
mso-style-parent:"Heading 3";
|
@@ -503,6 +508,7 @@ h4
|
|
503
508
|
mso-bidi-font-weight:normal;}
|
504
509
|
h5
|
505
510
|
{mso-style-priority:5;
|
511
|
+
mso-style-name:"Heading 5";
|
506
512
|
mso-style-unhide:no;
|
507
513
|
mso-style-qformat:yes;
|
508
514
|
mso-style-parent:"Heading 4";
|
@@ -529,6 +535,7 @@ h5
|
|
529
535
|
mso-bidi-font-weight:normal;}
|
530
536
|
h6
|
531
537
|
{mso-style-priority:6;
|
538
|
+
mso-style-name:"Heading 6";
|
532
539
|
mso-style-unhide:no;
|
533
540
|
mso-style-qformat:yes;
|
534
541
|
mso-style-parent:"Heading 5";
|
@@ -555,6 +562,7 @@ h6
|
|
555
562
|
mso-bidi-font-weight:normal;}
|
556
563
|
p.MsoToc1, li.MsoToc1, div.MsoToc1
|
557
564
|
{mso-style-priority:39;
|
565
|
+
mso-style-name:"TOC 1";
|
558
566
|
mso-style-unhide:no;
|
559
567
|
mso-style-next:Normal;
|
560
568
|
margin-top:6.0pt;
|
@@ -576,6 +584,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
|
|
576
584
|
mso-bidi-font-weight:normal;}
|
577
585
|
p.MsoToc2, li.MsoToc2, div.MsoToc2
|
578
586
|
{mso-style-noshow:yes;
|
587
|
+
mso-style-name:"TOC 2";
|
579
588
|
mso-style-priority:39;
|
580
589
|
mso-style-unhide:no;
|
581
590
|
mso-style-parent:"TOC 1";
|
@@ -599,6 +608,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
|
|
599
608
|
mso-bidi-font-weight:normal;}
|
600
609
|
p.MsoToc3, li.MsoToc3, div.MsoToc3
|
601
610
|
{mso-style-noshow:yes;
|
611
|
+
mso-style-name:"TOC 3";
|
602
612
|
mso-style-priority:39;
|
603
613
|
mso-style-unhide:no;
|
604
614
|
mso-style-parent:"TOC 2";
|
@@ -620,8 +630,9 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
620
630
|
mso-ansi-language:EN-GB;
|
621
631
|
font-weight:bold;
|
622
632
|
mso-bidi-font-weight:normal;}
|
623
|
-
span.MsoFootnoteReference
|
624
|
-
|
633
|
+
span.MsoFootnoteReference {
|
634
|
+
mso-style-name:"Footnote Reference";
|
635
|
+
mso-style-priority:99;
|
625
636
|
vertical-align:super;}
|
626
637
|
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
|
627
638
|
{mso-style-noshow:yes;
|
data/lib/metanorma/cc/version.rb
CHANGED
data/metanorma-cc.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
30
30
|
|
31
|
-
spec.add_dependency "metanorma-generic", "~> 1.
|
31
|
+
spec.add_dependency "metanorma-generic", "~> 1.11.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "byebug", "~> 9.1"
|
34
34
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
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: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.11.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.11.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -251,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
rubygems_version: 3.
|
254
|
+
rubygems_version: 3.2.22
|
255
255
|
signing_key:
|
256
256
|
specification_version: 4
|
257
257
|
summary: metanorma-cc lets you write CalConnect standards in AsciiDoc.
|