metanorma-m3aawg 1.7.11 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/m3aawg/basicdoc.rng +21 -4
- data/lib/asciidoctor/m3aawg/converter.rb +3 -2
- data/lib/asciidoctor/m3aawg/isodoc.rng +429 -76
- data/lib/asciidoctor/m3aawg/reqt.rng +23 -2
- data/lib/isodoc/m3aawg/html/wordstyle.css +12 -1
- data/lib/isodoc/m3aawg/html/wordstyle.scss +12 -1
- data/lib/isodoc/m3aawg/m3aawg.policy.xsl +201 -19
- data/lib/isodoc/m3aawg/m3aawg.report.xsl +201 -19
- data/lib/metanorma/m3aawg/version.rb +1 -1
- data/metanorma-m3d.gemspec +1 -1
- metadata +5 -5
@@ -995,6 +995,8 @@
|
|
995
995
|
|
996
996
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
997
997
|
|
998
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
999
|
+
|
998
1000
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
999
1001
|
|
1000
1002
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -1285,6 +1287,11 @@
|
|
1285
1287
|
|
1286
1288
|
|
1287
1289
|
|
1290
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1291
|
+
|
1292
|
+
|
1293
|
+
|
1294
|
+
|
1288
1295
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1289
1296
|
|
1290
1297
|
|
@@ -1445,13 +1452,20 @@
|
|
1445
1452
|
|
1446
1453
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1447
1454
|
|
1448
|
-
</xsl:attribute-set><xsl:
|
1455
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1456
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1457
|
+
</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">
|
1449
1458
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1450
1459
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1451
1460
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1452
1461
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1453
1462
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1454
|
-
</xsl:template><xsl:template name="
|
1463
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1464
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1465
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1466
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1467
|
+
</xsl:for-each>
|
1468
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1455
1469
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1456
1470
|
|
1457
1471
|
<!-- Normative references -->
|
@@ -1464,13 +1478,33 @@
|
|
1464
1478
|
<!-- Bibliography -->
|
1465
1479
|
<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"/>
|
1466
1480
|
|
1467
|
-
</xsl:template><xsl:template name="
|
1481
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1482
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1483
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1484
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1485
|
+
</xsl:for-each>
|
1486
|
+
|
1487
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1488
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1489
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1490
|
+
</xsl:for-each>
|
1491
|
+
|
1492
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1493
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1494
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1495
|
+
</xsl:for-each>
|
1496
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1468
1497
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1469
1498
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1470
1499
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1471
1500
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1472
1501
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1473
|
-
</xsl:template><xsl:template name="
|
1502
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1503
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1504
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1505
|
+
<xsl:apply-templates select="."/>
|
1506
|
+
</xsl:for-each>
|
1507
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1474
1508
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1475
1509
|
|
1476
1510
|
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -1486,6 +1520,28 @@
|
|
1486
1520
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1487
1521
|
<!-- Bibliography -->
|
1488
1522
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1523
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1524
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1525
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1526
|
+
<xsl:apply-templates select="."/>
|
1527
|
+
|
1528
|
+
<xsl:if test="local-name()='clause' and @type='scope'">
|
1529
|
+
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1530
|
+
<fo:block break-after="page"/>
|
1531
|
+
</xsl:if>
|
1532
|
+
</xsl:if>
|
1533
|
+
|
1534
|
+
</xsl:for-each>
|
1535
|
+
|
1536
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1537
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1538
|
+
<xsl:apply-templates select="."/>
|
1539
|
+
</xsl:for-each>
|
1540
|
+
|
1541
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1542
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1543
|
+
<xsl:apply-templates select="."/>
|
1544
|
+
</xsl:for-each>
|
1489
1545
|
</xsl:template><xsl:template match="text()">
|
1490
1546
|
<xsl:value-of select="."/>
|
1491
1547
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2320,9 +2376,8 @@
|
|
2320
2376
|
|
2321
2377
|
<!-- Table's note name (NOTE, for example) -->
|
2322
2378
|
|
2323
|
-
<fo:inline padding-right="2mm">
|
2379
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2324
2380
|
|
2325
|
-
|
2326
2381
|
|
2327
2382
|
|
2328
2383
|
|
@@ -2829,6 +2884,7 @@
|
|
2829
2884
|
<fo:table-cell>
|
2830
2885
|
|
2831
2886
|
<fo:block margin-top="6pt">
|
2887
|
+
<xsl:copy-of select="@id"/>
|
2832
2888
|
|
2833
2889
|
|
2834
2890
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -2937,6 +2993,8 @@
|
|
2937
2993
|
<xsl:if test="$font-size != ''">
|
2938
2994
|
<xsl:attribute name="font-size">
|
2939
2995
|
<xsl:choose>
|
2996
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
2997
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
2940
2998
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2941
2999
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2942
3000
|
</xsl:choose>
|
@@ -3669,10 +3727,12 @@
|
|
3669
3727
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
3670
3728
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
3671
3729
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
3730
|
+
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
3672
3731
|
<fo:block id="{@id}">
|
3673
3732
|
<xsl:apply-templates/>
|
3674
3733
|
</fo:block>
|
3675
3734
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
3735
|
+
<!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
|
3676
3736
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
3677
3737
|
|
3678
3738
|
|
@@ -3680,7 +3740,9 @@
|
|
3680
3740
|
<xsl:apply-templates select="m3d:name" mode="presentation"/>
|
3681
3741
|
</fo:block>
|
3682
3742
|
|
3683
|
-
|
3743
|
+
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
3744
|
+
|
3745
|
+
</xsl:if>
|
3684
3746
|
<xsl:apply-templates/>
|
3685
3747
|
</fo:block>
|
3686
3748
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
@@ -3742,6 +3804,7 @@
|
|
3742
3804
|
<xsl:otherwise>
|
3743
3805
|
<fo:block xsl:use-attribute-sets="image-style">
|
3744
3806
|
|
3807
|
+
|
3745
3808
|
<xsl:variable name="src">
|
3746
3809
|
<xsl:call-template name="image_src"/>
|
3747
3810
|
</xsl:variable>
|
@@ -3989,6 +4052,13 @@
|
|
3989
4052
|
</xsl:attribute>
|
3990
4053
|
<xsl:apply-templates mode="svg_update"/>
|
3991
4054
|
</xsl:copy>
|
4055
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4056
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4057
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4058
|
+
<xsl:call-template name="image_svg">
|
4059
|
+
<xsl:with-param name="name" select="$name"/>
|
4060
|
+
</xsl:call-template>
|
4061
|
+
</xsl:for-each>
|
3992
4062
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3993
4063
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3994
4064
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4093,7 +4163,7 @@
|
|
4093
4163
|
</fo:basic-link>
|
4094
4164
|
</fo:block>
|
4095
4165
|
</fo:block-container>
|
4096
|
-
</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">
|
4166
|
+
</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">
|
4097
4167
|
<xsl:apply-templates mode="contents"/>
|
4098
4168
|
<xsl:text> </xsl:text>
|
4099
4169
|
</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">
|
@@ -4101,7 +4171,7 @@
|
|
4101
4171
|
<xsl:text> </xsl:text>
|
4102
4172
|
</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">
|
4103
4173
|
<xsl:value-of select="."/>
|
4104
|
-
</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']
|
4174
|
+
</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">
|
4105
4175
|
<xsl:value-of select="."/>
|
4106
4176
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4107
4177
|
<xsl:apply-templates mode="contents"/>
|
@@ -4199,6 +4269,8 @@
|
|
4199
4269
|
|
4200
4270
|
|
4201
4271
|
|
4272
|
+
|
4273
|
+
|
4202
4274
|
</fo:bookmark-tree>
|
4203
4275
|
</xsl:if>
|
4204
4276
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4392,12 +4464,16 @@
|
|
4392
4464
|
<xsl:if test="$font-size != ''">
|
4393
4465
|
<xsl:attribute name="font-size">
|
4394
4466
|
<xsl:choose>
|
4467
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4468
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4395
4469
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4396
4470
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4397
4471
|
</xsl:choose>
|
4398
4472
|
</xsl:attribute>
|
4399
4473
|
</xsl:if>
|
4400
4474
|
|
4475
|
+
|
4476
|
+
|
4401
4477
|
<xsl:apply-templates/>
|
4402
4478
|
</fo:block>
|
4403
4479
|
|
@@ -4640,7 +4716,8 @@
|
|
4640
4716
|
</fo:block>
|
4641
4717
|
</fo:table-cell>
|
4642
4718
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4643
|
-
<fo:block font-size="11pt"
|
4719
|
+
<fo:block font-size="11pt">
|
4720
|
+
|
4644
4721
|
<xsl:apply-templates/>
|
4645
4722
|
</fo:block>
|
4646
4723
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -4745,6 +4822,7 @@
|
|
4745
4822
|
</xsl:choose>
|
4746
4823
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4747
4824
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4825
|
+
|
4748
4826
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4749
4827
|
<xsl:variable name="termsource_text">
|
4750
4828
|
<xsl:apply-templates/>
|
@@ -4755,13 +4833,15 @@
|
|
4755
4833
|
<!-- <xsl:apply-templates /> -->
|
4756
4834
|
<xsl:copy-of select="$termsource_text"/>
|
4757
4835
|
</xsl:when>
|
4758
|
-
<xsl:otherwise>
|
4836
|
+
<xsl:otherwise>
|
4837
|
+
|
4759
4838
|
|
4760
4839
|
<xsl:text>[</xsl:text>
|
4761
4840
|
|
4762
4841
|
<!-- <xsl:apply-templates /> -->
|
4763
4842
|
<xsl:copy-of select="$termsource_text"/>
|
4764
4843
|
|
4844
|
+
|
4765
4845
|
<xsl:text>]</xsl:text>
|
4766
4846
|
|
4767
4847
|
</xsl:otherwise>
|
@@ -4773,8 +4853,8 @@
|
|
4773
4853
|
</xsl:if>
|
4774
4854
|
</xsl:template><xsl:variable name="localized.source">
|
4775
4855
|
<xsl:call-template name="getLocalizedString">
|
4776
|
-
|
4777
|
-
|
4856
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4857
|
+
</xsl:call-template>
|
4778
4858
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4779
4859
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4780
4860
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -4784,6 +4864,7 @@
|
|
4784
4864
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4785
4865
|
<xsl:apply-templates/>
|
4786
4866
|
</fo:inline>
|
4867
|
+
|
4787
4868
|
</fo:basic-link>
|
4788
4869
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4789
4870
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4827,12 +4908,20 @@
|
|
4827
4908
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
4828
4909
|
<xsl:text>— </xsl:text>
|
4829
4910
|
<xsl:apply-templates/>
|
4830
|
-
</xsl:template><xsl:
|
4911
|
+
</xsl:template><xsl:variable name="bibitem_hidden_">
|
4912
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
4913
|
+
<xsl:copy-of select="."/>
|
4914
|
+
</xsl:for-each>
|
4915
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
|
4916
|
+
<xsl:copy-of select="."/>
|
4917
|
+
</xsl:for-each>
|
4918
|
+
</xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
4831
4919
|
|
4832
4920
|
<xsl:variable name="bibitemid">
|
4833
4921
|
<xsl:choose>
|
4834
|
-
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"
|
4835
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"
|
4922
|
+
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
4923
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
4924
|
+
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
4836
4925
|
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
4837
4926
|
</xsl:choose>
|
4838
4927
|
</xsl:variable>
|
@@ -4850,6 +4939,9 @@
|
|
4850
4939
|
|
4851
4940
|
</xsl:if>
|
4852
4941
|
|
4942
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4943
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4944
|
+
|
4853
4945
|
|
4854
4946
|
|
4855
4947
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4862,7 +4954,9 @@
|
|
4862
4954
|
|
4863
4955
|
|
4864
4956
|
</xsl:if>
|
4865
|
-
|
4957
|
+
|
4958
|
+
|
4959
|
+
|
4866
4960
|
<xsl:apply-templates/>
|
4867
4961
|
</fo:basic-link>
|
4868
4962
|
|
@@ -4919,10 +5013,10 @@
|
|
4919
5013
|
</xsl:choose>
|
4920
5014
|
</xsl:variable>
|
4921
5015
|
|
4922
|
-
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
5016
|
+
<!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
|
4923
5017
|
|
4924
5018
|
<xsl:choose>
|
4925
|
-
<xsl:when test="$
|
5019
|
+
<xsl:when test="$lang = 'zh'">
|
4926
5020
|
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
4927
5021
|
</xsl:when>
|
4928
5022
|
<xsl:when test="../../@inline-header = 'true'">
|
@@ -5374,9 +5468,97 @@
|
|
5374
5468
|
<fo:block-container border="1pt solid black" width="50%">
|
5375
5469
|
<fo:block> </fo:block>
|
5376
5470
|
</fo:block-container>
|
5471
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5472
|
+
<xsl:param name="colwidths"/>
|
5473
|
+
<xsl:variable name="colwidths_">
|
5474
|
+
<xsl:choose>
|
5475
|
+
<xsl:when test="not($colwidths)">
|
5476
|
+
<xsl:variable name="toc_table_simple">
|
5477
|
+
<tbody>
|
5478
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5479
|
+
</tbody>
|
5480
|
+
</xsl:variable>
|
5481
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5482
|
+
<xsl:call-template name="calculate-column-widths">
|
5483
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5484
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5485
|
+
</xsl:call-template>
|
5486
|
+
</xsl:when>
|
5487
|
+
<xsl:otherwise>
|
5488
|
+
<xsl:copy-of select="$colwidths"/>
|
5489
|
+
</xsl:otherwise>
|
5490
|
+
</xsl:choose>
|
5491
|
+
</xsl:variable>
|
5492
|
+
<fo:block role="TOCI" space-after="16pt">
|
5493
|
+
<fo:table width="100%" table-layout="fixed">
|
5494
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5495
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5496
|
+
</xsl:for-each>
|
5497
|
+
<fo:table-body>
|
5498
|
+
<xsl:apply-templates/>
|
5499
|
+
</fo:table-body>
|
5500
|
+
</fo:table>
|
5501
|
+
</fo:block>
|
5502
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5503
|
+
<fo:table-row min-height="5mm">
|
5504
|
+
<xsl:apply-templates/>
|
5505
|
+
</fo:table-row>
|
5506
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5507
|
+
<xsl:apply-templates/>
|
5508
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5509
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5510
|
+
<xsl:variable name="target" select="@target"/>
|
5511
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5512
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5513
|
+
<fo:table-cell>
|
5514
|
+
<fo:block>
|
5515
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5516
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5517
|
+
<xsl:choose>
|
5518
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5519
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5520
|
+
</xsl:choose>
|
5521
|
+
</xsl:for-each>
|
5522
|
+
</fo:basic-link>
|
5523
|
+
</fo:block>
|
5524
|
+
</fo:table-cell>
|
5525
|
+
</xsl:for-each>
|
5526
|
+
<!-- last column - for page numbers -->
|
5527
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5528
|
+
<fo:block>
|
5529
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5530
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5531
|
+
</fo:basic-link>
|
5532
|
+
</fo:block>
|
5533
|
+
</fo:table-cell>
|
5534
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5535
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5536
|
+
</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">
|
5537
|
+
<tr>
|
5538
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5539
|
+
</tr>
|
5540
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5541
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5542
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5543
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5544
|
+
<td>
|
5545
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5546
|
+
<xsl:copy-of select="."/>
|
5547
|
+
</xsl:for-each>
|
5548
|
+
</td>
|
5549
|
+
</xsl:for-each>
|
5550
|
+
<td>333</td> <!-- page number, just for fill -->
|
5377
5551
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5378
5552
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5379
5553
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5554
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5555
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5556
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5557
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5558
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5559
|
+
</svg>
|
5560
|
+
</fo:instream-foreign-object>
|
5561
|
+
</fo:inline>
|
5380
5562
|
</xsl:template><xsl:template name="convertDate">
|
5381
5563
|
<xsl:param name="date"/>
|
5382
5564
|
<xsl:param name="format" select="'short'"/>
|
data/metanorma-m3d.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
32
32
|
spec.add_dependency "thread_safe"
|
33
33
|
|
34
|
-
spec.add_dependency "metanorma-generic", "~> 1.
|
34
|
+
spec.add_dependency "metanorma-generic", "~> 1.11.0"
|
35
35
|
|
36
36
|
spec.add_development_dependency "byebug", "~> 9.1"
|
37
37
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-m3aawg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.11.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.11.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
279
|
requirements: []
|
280
|
-
rubygems_version: 3.
|
280
|
+
rubygems_version: 3.2.22
|
281
281
|
signing_key:
|
282
282
|
specification_version: 4
|
283
283
|
summary: metanorma-m3d lets you write M3AAWG Documents in AsciiDoc.
|