metanorma-un 0.6.10 → 0.7.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/un/basicdoc.rng +21 -4
- data/lib/asciidoctor/un/isodoc.rng +435 -78
- data/lib/asciidoctor/un/reqt.rng +23 -2
- data/lib/asciidoctor/un/un.rng +6 -16
- data/lib/isodoc/un/html/htmlstyle.css +6 -0
- data/lib/isodoc/un/html/htmlstyle.scss +7 -0
- data/lib/isodoc/un/html/wordstyle.css +12 -1
- data/lib/isodoc/un/html/wordstyle.scss +12 -1
- data/lib/isodoc/un/un.plenary-attachment.xsl +173 -12
- data/lib/isodoc/un/un.plenary.xsl +173 -12
- data/lib/isodoc/un/un.recommendation.xsl +173 -12
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -2
- metadata +5 -19
data/lib/asciidoctor/un/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">
|
data/lib/asciidoctor/un/un.rng
CHANGED
@@ -178,14 +178,9 @@
|
|
178
178
|
<ref name="section-title"/>
|
179
179
|
</optional>
|
180
180
|
<group>
|
181
|
-
<
|
182
|
-
<
|
183
|
-
|
184
|
-
</zeroOrMore>
|
185
|
-
<zeroOrMore>
|
186
|
-
<ref name="note"/>
|
187
|
-
</zeroOrMore>
|
188
|
-
</group>
|
181
|
+
<zeroOrMore>
|
182
|
+
<ref name="BasicBlock"/>
|
183
|
+
</zeroOrMore>
|
189
184
|
<zeroOrMore>
|
190
185
|
<choice>
|
191
186
|
<ref name="clause-subsection"/>
|
@@ -229,14 +224,9 @@
|
|
229
224
|
<ref name="section-title"/>
|
230
225
|
</optional>
|
231
226
|
<group>
|
232
|
-
<
|
233
|
-
<
|
234
|
-
|
235
|
-
</zeroOrMore>
|
236
|
-
<zeroOrMore>
|
237
|
-
<ref name="note"/>
|
238
|
-
</zeroOrMore>
|
239
|
-
</group>
|
227
|
+
<zeroOrMore>
|
228
|
+
<ref name="BasicBlock"/>
|
229
|
+
</zeroOrMore>
|
240
230
|
<zeroOrMore>
|
241
231
|
<choice>
|
242
232
|
<ref name="annex-subsection"/>
|
@@ -149,6 +149,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
149
149
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText {
|
150
150
|
mso-style-noshow: yes;
|
151
151
|
mso-style-unhide: no;
|
152
|
+
mso-style-name: "Comment Text";
|
152
153
|
margin: 0cm;
|
153
154
|
margin-bottom: .0001pt;
|
154
155
|
mso-pagination: widow-orphan;
|
@@ -369,6 +370,7 @@ h1 {
|
|
369
370
|
mso-style-priority: 1;
|
370
371
|
mso-style-unhide: no;
|
371
372
|
mso-style-qformat: yes;
|
373
|
+
mso-style-name: "Heading 1";
|
372
374
|
mso-style-link: "Heading 1 Char";
|
373
375
|
mso-style-next: Normal;
|
374
376
|
margin-top: 13.5pt;
|
@@ -452,6 +454,7 @@ h2 {
|
|
452
454
|
mso-style-priority: 2;
|
453
455
|
mso-style-unhide: no;
|
454
456
|
mso-style-qformat: yes;
|
457
|
+
mso-style-name: "Heading 2";
|
455
458
|
mso-style-parent: "Heading 1";
|
456
459
|
mso-style-link: "Heading 2 Char";
|
457
460
|
mso-style-next: Normal;
|
@@ -478,7 +481,8 @@ h3 {
|
|
478
481
|
mso-style-priority: 3;
|
479
482
|
mso-style-unhide: no;
|
480
483
|
mso-style-qformat: yes;
|
481
|
-
mso-style-
|
484
|
+
mso-style-name: "Heading 3";
|
485
|
+
mso-style-parent: "Heading 2";
|
482
486
|
mso-style-link: "Heading 3 Char";
|
483
487
|
mso-style-next: Normal;
|
484
488
|
margin-top: 3.0pt;
|
@@ -504,6 +508,7 @@ h4 {
|
|
504
508
|
mso-style-priority: 4;
|
505
509
|
mso-style-unhide: no;
|
506
510
|
mso-style-qformat: yes;
|
511
|
+
mso-style-name: "Heading 4";
|
507
512
|
mso-style-parent: "Heading 3";
|
508
513
|
mso-style-link: "Heading 4 Char";
|
509
514
|
mso-style-next: Normal;
|
@@ -530,6 +535,7 @@ h5 {
|
|
530
535
|
mso-style-priority: 5;
|
531
536
|
mso-style-unhide: no;
|
532
537
|
mso-style-qformat: yes;
|
538
|
+
mso-style-name: "Heading 5";
|
533
539
|
mso-style-parent: "Heading 4";
|
534
540
|
mso-style-link: "Heading 5 Char";
|
535
541
|
mso-style-next: Normal;
|
@@ -556,6 +562,7 @@ h6 {
|
|
556
562
|
mso-style-priority: 6;
|
557
563
|
mso-style-unhide: no;
|
558
564
|
mso-style-qformat: yes;
|
565
|
+
mso-style-name: "Heading 6";
|
559
566
|
mso-style-parent: "Heading 5";
|
560
567
|
mso-style-link: "Heading 6 Char";
|
561
568
|
mso-style-next: Normal;
|
@@ -581,6 +588,7 @@ h6 {
|
|
581
588
|
p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
582
589
|
mso-style-priority: 39;
|
583
590
|
mso-style-unhide: no;
|
591
|
+
mso-style-name: "TOC 1";
|
584
592
|
mso-style-next: Normal;
|
585
593
|
margin-top: 6.0pt;
|
586
594
|
margin-right: 25.0pt;
|
@@ -603,6 +611,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2 {
|
|
603
611
|
mso-style-noshow: yes;
|
604
612
|
mso-style-priority: 39;
|
605
613
|
mso-style-unhide: no;
|
614
|
+
mso-style-name: "TOC 2";
|
606
615
|
mso-style-parent: "TOC 1";
|
607
616
|
mso-style-next: Normal;
|
608
617
|
margin-top: 0cm;
|
@@ -626,6 +635,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
|
626
635
|
mso-style-noshow: yes;
|
627
636
|
mso-style-priority: 39;
|
628
637
|
mso-style-unhide: no;
|
638
|
+
mso-style-name: "TOC 3";
|
629
639
|
mso-style-parent: "TOC 2";
|
630
640
|
mso-style-next: Normal;
|
631
641
|
margin-top: 0cm;
|
@@ -647,6 +657,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
|
647
657
|
|
648
658
|
span.MsoFootnoteReference {
|
649
659
|
mso-style-priority: 99;
|
660
|
+
mso-style-name: "Footnote Reference";
|
650
661
|
vertical-align: super; }
|
651
662
|
|
652
663
|
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText {
|
@@ -135,6 +135,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
135
135
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
|
136
136
|
{mso-style-noshow:yes;
|
137
137
|
mso-style-unhide:no;
|
138
|
+
mso-style-name:"Comment Text";
|
138
139
|
margin:0cm;
|
139
140
|
margin-bottom:.0001pt;
|
140
141
|
mso-pagination:widow-orphan;
|
@@ -338,6 +339,7 @@ h1
|
|
338
339
|
{mso-style-priority:1;
|
339
340
|
mso-style-unhide:no;
|
340
341
|
mso-style-qformat:yes;
|
342
|
+
mso-style-name:"Heading 1";
|
341
343
|
mso-style-link:"Heading 1 Char";
|
342
344
|
mso-style-next:Normal;
|
343
345
|
margin-top:13.5pt;
|
@@ -418,6 +420,7 @@ h2
|
|
418
420
|
{mso-style-priority:2;
|
419
421
|
mso-style-unhide:no;
|
420
422
|
mso-style-qformat:yes;
|
423
|
+
mso-style-name:"Heading 2";
|
421
424
|
mso-style-parent:"Heading 1";
|
422
425
|
mso-style-link:"Heading 2 Char";
|
423
426
|
mso-style-next:Normal;
|
@@ -443,7 +446,8 @@ h3
|
|
443
446
|
{mso-style-priority:3;
|
444
447
|
mso-style-unhide:no;
|
445
448
|
mso-style-qformat:yes;
|
446
|
-
mso-style-
|
449
|
+
mso-style-name:"Heading 3";
|
450
|
+
mso-style-parent:"Heading 2";
|
447
451
|
mso-style-link:"Heading 3 Char";
|
448
452
|
mso-style-next:Normal;
|
449
453
|
margin-top:3.0pt;
|
@@ -468,6 +472,7 @@ h4
|
|
468
472
|
{mso-style-priority:4;
|
469
473
|
mso-style-unhide:no;
|
470
474
|
mso-style-qformat:yes;
|
475
|
+
mso-style-name:"Heading 4";
|
471
476
|
mso-style-parent:"Heading 3";
|
472
477
|
mso-style-link:"Heading 4 Char";
|
473
478
|
mso-style-next:Normal;
|
@@ -493,6 +498,7 @@ h5
|
|
493
498
|
{mso-style-priority:5;
|
494
499
|
mso-style-unhide:no;
|
495
500
|
mso-style-qformat:yes;
|
501
|
+
mso-style-name:"Heading 5";
|
496
502
|
mso-style-parent:"Heading 4";
|
497
503
|
mso-style-link:"Heading 5 Char";
|
498
504
|
mso-style-next:Normal;
|
@@ -518,6 +524,7 @@ h6
|
|
518
524
|
{mso-style-priority:6;
|
519
525
|
mso-style-unhide:no;
|
520
526
|
mso-style-qformat:yes;
|
527
|
+
mso-style-name:"Heading 6";
|
521
528
|
mso-style-parent:"Heading 5";
|
522
529
|
mso-style-link:"Heading 6 Char";
|
523
530
|
mso-style-next:Normal;
|
@@ -542,6 +549,7 @@ h6
|
|
542
549
|
p.MsoToc1, li.MsoToc1, div.MsoToc1
|
543
550
|
{mso-style-priority:39;
|
544
551
|
mso-style-unhide:no;
|
552
|
+
mso-style-name:"TOC 1";
|
545
553
|
mso-style-next:Normal;
|
546
554
|
margin-top:6.0pt;
|
547
555
|
margin-right:25.0pt;
|
@@ -563,6 +571,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
|
|
563
571
|
{mso-style-noshow:yes;
|
564
572
|
mso-style-priority:39;
|
565
573
|
mso-style-unhide:no;
|
574
|
+
mso-style-name:"TOC 2";
|
566
575
|
mso-style-parent:"TOC 1";
|
567
576
|
mso-style-next:Normal;
|
568
577
|
margin-top:0cm;
|
@@ -585,6 +594,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
585
594
|
{mso-style-noshow:yes;
|
586
595
|
mso-style-priority:39;
|
587
596
|
mso-style-unhide:no;
|
597
|
+
mso-style-name:"TOC 3";
|
588
598
|
mso-style-parent:"TOC 2";
|
589
599
|
mso-style-next:Normal;
|
590
600
|
margin-top:0cm;
|
@@ -605,6 +615,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
605
615
|
mso-bidi-font-weight:normal;}
|
606
616
|
span.MsoFootnoteReference
|
607
617
|
{mso-style-priority:99;
|
618
|
+
mso-style-name:"Footnote Reference";
|
608
619
|
vertical-align:super;}
|
609
620
|
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
|
610
621
|
{mso-style-noshow:yes;
|
@@ -1205,6 +1205,8 @@
|
|
1205
1205
|
|
1206
1206
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
1207
1207
|
|
1208
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
1209
|
+
|
1208
1210
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1209
1211
|
|
1210
1212
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -1479,6 +1481,11 @@
|
|
1479
1481
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1480
1482
|
|
1481
1483
|
|
1484
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1485
|
+
|
1486
|
+
|
1487
|
+
|
1488
|
+
|
1482
1489
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1483
1490
|
|
1484
1491
|
|
@@ -1636,13 +1643,20 @@
|
|
1636
1643
|
|
1637
1644
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1638
1645
|
|
1639
|
-
</xsl:attribute-set><xsl:
|
1646
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1647
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1648
|
+
</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">
|
1640
1649
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1641
1650
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1642
1651
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1643
1652
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1644
1653
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1645
|
-
</xsl:template><xsl:template name="
|
1654
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1655
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1656
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1657
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1658
|
+
</xsl:for-each>
|
1659
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1646
1660
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1647
1661
|
|
1648
1662
|
<!-- Normative references -->
|
@@ -1655,13 +1669,33 @@
|
|
1655
1669
|
<!-- Bibliography -->
|
1656
1670
|
<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"/>
|
1657
1671
|
|
1658
|
-
</xsl:template><xsl:template name="
|
1672
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1673
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1674
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1675
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1676
|
+
</xsl:for-each>
|
1677
|
+
|
1678
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1679
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1680
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1681
|
+
</xsl:for-each>
|
1682
|
+
|
1683
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1684
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1685
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1686
|
+
</xsl:for-each>
|
1687
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1659
1688
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1660
1689
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1661
1690
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1662
1691
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1663
1692
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1664
|
-
</xsl:template><xsl:template name="
|
1693
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1694
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1695
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1696
|
+
<xsl:apply-templates select="."/>
|
1697
|
+
</xsl:for-each>
|
1698
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1665
1699
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1666
1700
|
|
1667
1701
|
<!-- Normative references -->
|
@@ -1673,6 +1707,22 @@
|
|
1673
1707
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1674
1708
|
<!-- Bibliography -->
|
1675
1709
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1710
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1711
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1712
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1713
|
+
<xsl:apply-templates select="."/>
|
1714
|
+
|
1715
|
+
</xsl:for-each>
|
1716
|
+
|
1717
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1718
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1719
|
+
<xsl:apply-templates select="."/>
|
1720
|
+
</xsl:for-each>
|
1721
|
+
|
1722
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1723
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1724
|
+
<xsl:apply-templates select="."/>
|
1725
|
+
</xsl:for-each>
|
1676
1726
|
</xsl:template><xsl:template match="text()">
|
1677
1727
|
<xsl:value-of select="."/>
|
1678
1728
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2536,9 +2586,7 @@
|
|
2536
2586
|
|
2537
2587
|
<!-- Table's note name (NOTE, for example) -->
|
2538
2588
|
|
2539
|
-
<fo:inline padding-right="2mm">
|
2540
|
-
|
2541
|
-
|
2589
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2542
2590
|
|
2543
2591
|
|
2544
2592
|
|
@@ -2553,6 +2601,7 @@
|
|
2553
2601
|
</xsl:if>
|
2554
2602
|
|
2555
2603
|
|
2604
|
+
|
2556
2605
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2557
2606
|
|
2558
2607
|
</fo:inline>
|
@@ -3158,6 +3207,8 @@
|
|
3158
3207
|
<xsl:if test="$font-size != ''">
|
3159
3208
|
<xsl:attribute name="font-size">
|
3160
3209
|
<xsl:choose>
|
3210
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3211
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3161
3212
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3162
3213
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3163
3214
|
</xsl:choose>
|
@@ -3970,6 +4021,7 @@
|
|
3970
4021
|
<xsl:otherwise>
|
3971
4022
|
<fo:block xsl:use-attribute-sets="image-style">
|
3972
4023
|
|
4024
|
+
|
3973
4025
|
<xsl:variable name="src">
|
3974
4026
|
<xsl:call-template name="image_src"/>
|
3975
4027
|
</xsl:variable>
|
@@ -4217,6 +4269,13 @@
|
|
4217
4269
|
</xsl:attribute>
|
4218
4270
|
<xsl:apply-templates mode="svg_update"/>
|
4219
4271
|
</xsl:copy>
|
4272
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4273
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4274
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4275
|
+
<xsl:call-template name="image_svg">
|
4276
|
+
<xsl:with-param name="name" select="$name"/>
|
4277
|
+
</xsl:call-template>
|
4278
|
+
</xsl:for-each>
|
4220
4279
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4221
4280
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4222
4281
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4321,7 +4380,7 @@
|
|
4321
4380
|
</fo:basic-link>
|
4322
4381
|
</fo:block>
|
4323
4382
|
</fo:block-container>
|
4324
|
-
</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">
|
4383
|
+
</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">
|
4325
4384
|
<xsl:apply-templates mode="contents"/>
|
4326
4385
|
<xsl:text> </xsl:text>
|
4327
4386
|
</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">
|
@@ -4329,7 +4388,7 @@
|
|
4329
4388
|
<xsl:text> </xsl:text>
|
4330
4389
|
</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">
|
4331
4390
|
<xsl:value-of select="."/>
|
4332
|
-
</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']
|
4391
|
+
</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">
|
4333
4392
|
<xsl:value-of select="."/>
|
4334
4393
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4335
4394
|
<xsl:apply-templates mode="contents"/>
|
@@ -4427,6 +4486,8 @@
|
|
4427
4486
|
|
4428
4487
|
|
4429
4488
|
|
4489
|
+
|
4490
|
+
|
4430
4491
|
</fo:bookmark-tree>
|
4431
4492
|
</xsl:if>
|
4432
4493
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4620,12 +4681,16 @@
|
|
4620
4681
|
<xsl:if test="$font-size != ''">
|
4621
4682
|
<xsl:attribute name="font-size">
|
4622
4683
|
<xsl:choose>
|
4684
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4685
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4623
4686
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4624
4687
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4625
4688
|
</xsl:choose>
|
4626
4689
|
</xsl:attribute>
|
4627
4690
|
</xsl:if>
|
4628
4691
|
|
4692
|
+
|
4693
|
+
|
4629
4694
|
<xsl:apply-templates/>
|
4630
4695
|
</fo:block>
|
4631
4696
|
|
@@ -4978,6 +5043,7 @@
|
|
4978
5043
|
</xsl:choose>
|
4979
5044
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4980
5045
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5046
|
+
|
4981
5047
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4982
5048
|
<xsl:variable name="termsource_text">
|
4983
5049
|
<xsl:apply-templates/>
|
@@ -5006,8 +5072,8 @@
|
|
5006
5072
|
</xsl:if>
|
5007
5073
|
</xsl:template><xsl:variable name="localized.source">
|
5008
5074
|
<xsl:call-template name="getLocalizedString">
|
5009
|
-
|
5010
|
-
|
5075
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5076
|
+
</xsl:call-template>
|
5011
5077
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5012
5078
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5013
5079
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -5017,6 +5083,7 @@
|
|
5017
5083
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5018
5084
|
<xsl:apply-templates/>
|
5019
5085
|
</fo:inline>
|
5086
|
+
|
5020
5087
|
</fo:basic-link>
|
5021
5088
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5022
5089
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5083,6 +5150,9 @@
|
|
5083
5150
|
|
5084
5151
|
</xsl:if>
|
5085
5152
|
|
5153
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5154
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5155
|
+
|
5086
5156
|
|
5087
5157
|
|
5088
5158
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5097,7 +5167,9 @@
|
|
5097
5167
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
5098
5168
|
|
5099
5169
|
</xsl:if>
|
5100
|
-
|
5170
|
+
|
5171
|
+
|
5172
|
+
|
5101
5173
|
<xsl:apply-templates/>
|
5102
5174
|
</fo:basic-link>
|
5103
5175
|
|
@@ -5440,6 +5512,7 @@
|
|
5440
5512
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5441
5513
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5442
5514
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5515
|
+
|
5443
5516
|
<xsl:apply-templates/>
|
5444
5517
|
</fo:block>
|
5445
5518
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5608,9 +5681,97 @@
|
|
5608
5681
|
<fo:block-container border="1pt solid black" width="50%">
|
5609
5682
|
<fo:block> </fo:block>
|
5610
5683
|
</fo:block-container>
|
5684
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5685
|
+
<xsl:param name="colwidths"/>
|
5686
|
+
<xsl:variable name="colwidths_">
|
5687
|
+
<xsl:choose>
|
5688
|
+
<xsl:when test="not($colwidths)">
|
5689
|
+
<xsl:variable name="toc_table_simple">
|
5690
|
+
<tbody>
|
5691
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5692
|
+
</tbody>
|
5693
|
+
</xsl:variable>
|
5694
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5695
|
+
<xsl:call-template name="calculate-column-widths">
|
5696
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5697
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5698
|
+
</xsl:call-template>
|
5699
|
+
</xsl:when>
|
5700
|
+
<xsl:otherwise>
|
5701
|
+
<xsl:copy-of select="$colwidths"/>
|
5702
|
+
</xsl:otherwise>
|
5703
|
+
</xsl:choose>
|
5704
|
+
</xsl:variable>
|
5705
|
+
<fo:block role="TOCI" space-after="16pt">
|
5706
|
+
<fo:table width="100%" table-layout="fixed">
|
5707
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5708
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5709
|
+
</xsl:for-each>
|
5710
|
+
<fo:table-body>
|
5711
|
+
<xsl:apply-templates/>
|
5712
|
+
</fo:table-body>
|
5713
|
+
</fo:table>
|
5714
|
+
</fo:block>
|
5715
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5716
|
+
<fo:table-row min-height="5mm">
|
5717
|
+
<xsl:apply-templates/>
|
5718
|
+
</fo:table-row>
|
5719
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5720
|
+
<xsl:apply-templates/>
|
5721
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5722
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5723
|
+
<xsl:variable name="target" select="@target"/>
|
5724
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5725
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5726
|
+
<fo:table-cell>
|
5727
|
+
<fo:block>
|
5728
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5729
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5730
|
+
<xsl:choose>
|
5731
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5732
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5733
|
+
</xsl:choose>
|
5734
|
+
</xsl:for-each>
|
5735
|
+
</fo:basic-link>
|
5736
|
+
</fo:block>
|
5737
|
+
</fo:table-cell>
|
5738
|
+
</xsl:for-each>
|
5739
|
+
<!-- last column - for page numbers -->
|
5740
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5741
|
+
<fo:block>
|
5742
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5743
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5744
|
+
</fo:basic-link>
|
5745
|
+
</fo:block>
|
5746
|
+
</fo:table-cell>
|
5747
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5748
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5749
|
+
</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">
|
5750
|
+
<tr>
|
5751
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5752
|
+
</tr>
|
5753
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5754
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5755
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5756
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5757
|
+
<td>
|
5758
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5759
|
+
<xsl:copy-of select="."/>
|
5760
|
+
</xsl:for-each>
|
5761
|
+
</td>
|
5762
|
+
</xsl:for-each>
|
5763
|
+
<td>333</td> <!-- page number, just for fill -->
|
5611
5764
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5612
5765
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5613
5766
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5767
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5768
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5769
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5770
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5771
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5772
|
+
</svg>
|
5773
|
+
</fo:instream-foreign-object>
|
5774
|
+
</fo:inline>
|
5614
5775
|
</xsl:template><xsl:template name="convertDate">
|
5615
5776
|
<xsl:param name="date"/>
|
5616
5777
|
<xsl:param name="format" select="'short'"/>
|