metanorma-m3aawg 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/lib/asciidoctor/m3aawg/basicdoc.rng +21 -4
- data/lib/asciidoctor/m3aawg/converter.rb +3 -2
- data/lib/asciidoctor/m3aawg/isodoc.rng +435 -78
- 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 +178 -11
- data/lib/isodoc/m3aawg/m3aawg.report.xsl +178 -11
- data/lib/metanorma/m3aawg/version.rb +1 -1
- data/metanorma-m3d.gemspec +1 -1
- metadata +5 -5
@@ -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">
|
@@ -152,6 +152,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
152
152
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText {
|
153
153
|
mso-style-noshow: yes;
|
154
154
|
mso-style-unhide: no;
|
155
|
+
mso-style-name: "Comment Text";
|
155
156
|
margin: 0cm;
|
156
157
|
margin-bottom: .0001pt;
|
157
158
|
mso-pagination: widow-orphan;
|
@@ -293,6 +294,7 @@ h1 {
|
|
293
294
|
mso-style-priority: 1;
|
294
295
|
mso-style-unhide: no;
|
295
296
|
mso-style-qformat: yes;
|
297
|
+
mso-style-name: "Heading 1";
|
296
298
|
mso-style-link: "Heading 1 Char";
|
297
299
|
mso-style-next: Normal;
|
298
300
|
margin-top: 13.5pt;
|
@@ -376,6 +378,7 @@ h2 {
|
|
376
378
|
mso-style-priority: 2;
|
377
379
|
mso-style-unhide: no;
|
378
380
|
mso-style-qformat: yes;
|
381
|
+
mso-style-name: "Heading 2";
|
379
382
|
mso-style-parent: "Heading 1";
|
380
383
|
mso-style-link: "Heading 2 Char";
|
381
384
|
mso-style-next: Normal;
|
@@ -403,7 +406,8 @@ h3 {
|
|
403
406
|
mso-style-priority: 3;
|
404
407
|
mso-style-unhide: no;
|
405
408
|
mso-style-qformat: yes;
|
406
|
-
mso-style-
|
409
|
+
mso-style-name: "Heading 3";
|
410
|
+
mso-style-parent: "Heading 2";
|
407
411
|
mso-style-link: "Heading 3 Char";
|
408
412
|
mso-style-next: Normal;
|
409
413
|
margin-top: 3.0pt;
|
@@ -429,6 +433,7 @@ h4 {
|
|
429
433
|
mso-style-priority: 4;
|
430
434
|
mso-style-unhide: no;
|
431
435
|
mso-style-qformat: yes;
|
436
|
+
mso-style-name: "Heading 4";
|
432
437
|
mso-style-parent: "Heading 3";
|
433
438
|
mso-style-link: "Heading 4 Char";
|
434
439
|
mso-style-next: Normal;
|
@@ -455,6 +460,7 @@ h5 {
|
|
455
460
|
mso-style-priority: 5;
|
456
461
|
mso-style-unhide: no;
|
457
462
|
mso-style-qformat: yes;
|
463
|
+
mso-style-name: "Heading 5";
|
458
464
|
mso-style-parent: "Heading 4";
|
459
465
|
mso-style-link: "Heading 5 Char";
|
460
466
|
mso-style-next: Normal;
|
@@ -481,6 +487,7 @@ h6 {
|
|
481
487
|
mso-style-priority: 6;
|
482
488
|
mso-style-unhide: no;
|
483
489
|
mso-style-qformat: yes;
|
490
|
+
mso-style-name: "Heading 6";
|
484
491
|
mso-style-parent: "Heading 5";
|
485
492
|
mso-style-link: "Heading 6 Char";
|
486
493
|
mso-style-next: Normal;
|
@@ -506,6 +513,7 @@ h6 {
|
|
506
513
|
p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
507
514
|
mso-style-priority: 39;
|
508
515
|
mso-style-unhide: no;
|
516
|
+
mso-style-name: "TOC 1";
|
509
517
|
mso-style-next: Normal;
|
510
518
|
margin-top: 6.0pt;
|
511
519
|
margin-right: 25.0pt;
|
@@ -529,6 +537,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2 {
|
|
529
537
|
mso-style-noshow: yes;
|
530
538
|
mso-style-priority: 39;
|
531
539
|
mso-style-unhide: no;
|
540
|
+
mso-style-name: "TOC 2";
|
532
541
|
mso-style-parent: "TOC 1";
|
533
542
|
mso-style-next: Normal;
|
534
543
|
margin-top: 0cm;
|
@@ -553,6 +562,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
|
553
562
|
mso-style-noshow: yes;
|
554
563
|
mso-style-priority: 39;
|
555
564
|
mso-style-unhide: no;
|
565
|
+
mso-style-name: "TOC 3";
|
556
566
|
mso-style-parent: "TOC 2";
|
557
567
|
mso-style-next: Normal;
|
558
568
|
margin-top: 0cm;
|
@@ -575,6 +585,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
|
575
585
|
|
576
586
|
span.MsoFootnoteReference {
|
577
587
|
mso-style-priority: 99;
|
588
|
+
mso-style-name: "Footnote Reference";
|
578
589
|
vertical-align: super; }
|
579
590
|
|
580
591
|
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText {
|
@@ -138,6 +138,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
138
138
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
|
139
139
|
{mso-style-noshow:yes;
|
140
140
|
mso-style-unhide:no;
|
141
|
+
mso-style-name:"Comment Text";
|
141
142
|
margin:0cm;
|
142
143
|
margin-bottom:.0001pt;
|
143
144
|
mso-pagination:widow-orphan;
|
@@ -267,6 +268,7 @@ h1
|
|
267
268
|
{mso-style-priority:1;
|
268
269
|
mso-style-unhide:no;
|
269
270
|
mso-style-qformat:yes;
|
271
|
+
mso-style-name:"Heading 1";
|
270
272
|
mso-style-link:"Heading 1 Char";
|
271
273
|
mso-style-next:Normal;
|
272
274
|
margin-top:13.5pt;
|
@@ -347,6 +349,7 @@ h2
|
|
347
349
|
{mso-style-priority:2;
|
348
350
|
mso-style-unhide:no;
|
349
351
|
mso-style-qformat:yes;
|
352
|
+
mso-style-name:"Heading 2";
|
350
353
|
mso-style-parent:"Heading 1";
|
351
354
|
mso-style-link:"Heading 2 Char";
|
352
355
|
mso-style-next:Normal;
|
@@ -373,7 +376,8 @@ h3
|
|
373
376
|
{mso-style-priority:3;
|
374
377
|
mso-style-unhide:no;
|
375
378
|
mso-style-qformat:yes;
|
376
|
-
mso-style-
|
379
|
+
mso-style-name:"Heading 3";
|
380
|
+
mso-style-parent:"Heading 2";
|
377
381
|
mso-style-link:"Heading 3 Char";
|
378
382
|
mso-style-next:Normal;
|
379
383
|
margin-top:3.0pt;
|
@@ -398,6 +402,7 @@ h4
|
|
398
402
|
{mso-style-priority:4;
|
399
403
|
mso-style-unhide:no;
|
400
404
|
mso-style-qformat:yes;
|
405
|
+
mso-style-name:"Heading 4";
|
401
406
|
mso-style-parent:"Heading 3";
|
402
407
|
mso-style-link:"Heading 4 Char";
|
403
408
|
mso-style-next:Normal;
|
@@ -423,6 +428,7 @@ h5
|
|
423
428
|
{mso-style-priority:5;
|
424
429
|
mso-style-unhide:no;
|
425
430
|
mso-style-qformat:yes;
|
431
|
+
mso-style-name:"Heading 5";
|
426
432
|
mso-style-parent:"Heading 4";
|
427
433
|
mso-style-link:"Heading 5 Char";
|
428
434
|
mso-style-next:Normal;
|
@@ -448,6 +454,7 @@ h6
|
|
448
454
|
{mso-style-priority:6;
|
449
455
|
mso-style-unhide:no;
|
450
456
|
mso-style-qformat:yes;
|
457
|
+
mso-style-name:"Heading 6";
|
451
458
|
mso-style-parent:"Heading 5";
|
452
459
|
mso-style-link:"Heading 6 Char";
|
453
460
|
mso-style-next:Normal;
|
@@ -472,6 +479,7 @@ h6
|
|
472
479
|
p.MsoToc1, li.MsoToc1, div.MsoToc1
|
473
480
|
{mso-style-priority:39;
|
474
481
|
mso-style-unhide:no;
|
482
|
+
mso-style-name:"TOC 1";
|
475
483
|
mso-style-next:Normal;
|
476
484
|
margin-top:6.0pt;
|
477
485
|
margin-right:25.0pt;
|
@@ -494,6 +502,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
|
|
494
502
|
{mso-style-noshow:yes;
|
495
503
|
mso-style-priority:39;
|
496
504
|
mso-style-unhide:no;
|
505
|
+
mso-style-name:"TOC 2";
|
497
506
|
mso-style-parent:"TOC 1";
|
498
507
|
mso-style-next:Normal;
|
499
508
|
margin-top:0cm;
|
@@ -517,6 +526,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
517
526
|
{mso-style-noshow:yes;
|
518
527
|
mso-style-priority:39;
|
519
528
|
mso-style-unhide:no;
|
529
|
+
mso-style-name:"TOC 3";
|
520
530
|
mso-style-parent:"TOC 2";
|
521
531
|
mso-style-next:Normal;
|
522
532
|
margin-top:0cm;
|
@@ -538,6 +548,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
538
548
|
mso-bidi-font-weight:normal;}
|
539
549
|
span.MsoFootnoteReference
|
540
550
|
{mso-style-priority:99;
|
551
|
+
mso-style-name:"Footnote Reference";
|
541
552
|
vertical-align:super;}
|
542
553
|
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
|
543
554
|
{mso-style-noshow:yes;
|
@@ -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
|
|
@@ -2937,6 +2992,8 @@
|
|
2937
2992
|
<xsl:if test="$font-size != ''">
|
2938
2993
|
<xsl:attribute name="font-size">
|
2939
2994
|
<xsl:choose>
|
2995
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
2996
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
2940
2997
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2941
2998
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2942
2999
|
</xsl:choose>
|
@@ -3742,6 +3799,7 @@
|
|
3742
3799
|
<xsl:otherwise>
|
3743
3800
|
<fo:block xsl:use-attribute-sets="image-style">
|
3744
3801
|
|
3802
|
+
|
3745
3803
|
<xsl:variable name="src">
|
3746
3804
|
<xsl:call-template name="image_src"/>
|
3747
3805
|
</xsl:variable>
|
@@ -3989,6 +4047,13 @@
|
|
3989
4047
|
</xsl:attribute>
|
3990
4048
|
<xsl:apply-templates mode="svg_update"/>
|
3991
4049
|
</xsl:copy>
|
4050
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4051
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4052
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4053
|
+
<xsl:call-template name="image_svg">
|
4054
|
+
<xsl:with-param name="name" select="$name"/>
|
4055
|
+
</xsl:call-template>
|
4056
|
+
</xsl:for-each>
|
3992
4057
|
</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
4058
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3994
4059
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4093,7 +4158,7 @@
|
|
4093
4158
|
</fo:basic-link>
|
4094
4159
|
</fo:block>
|
4095
4160
|
</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">
|
4161
|
+
</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
4162
|
<xsl:apply-templates mode="contents"/>
|
4098
4163
|
<xsl:text> </xsl:text>
|
4099
4164
|
</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 +4166,7 @@
|
|
4101
4166
|
<xsl:text> </xsl:text>
|
4102
4167
|
</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
4168
|
<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']
|
4169
|
+
</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
4170
|
<xsl:value-of select="."/>
|
4106
4171
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4107
4172
|
<xsl:apply-templates mode="contents"/>
|
@@ -4199,6 +4264,8 @@
|
|
4199
4264
|
|
4200
4265
|
|
4201
4266
|
|
4267
|
+
|
4268
|
+
|
4202
4269
|
</fo:bookmark-tree>
|
4203
4270
|
</xsl:if>
|
4204
4271
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4392,12 +4459,16 @@
|
|
4392
4459
|
<xsl:if test="$font-size != ''">
|
4393
4460
|
<xsl:attribute name="font-size">
|
4394
4461
|
<xsl:choose>
|
4462
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4463
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4395
4464
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4396
4465
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4397
4466
|
</xsl:choose>
|
4398
4467
|
</xsl:attribute>
|
4399
4468
|
</xsl:if>
|
4400
4469
|
|
4470
|
+
|
4471
|
+
|
4401
4472
|
<xsl:apply-templates/>
|
4402
4473
|
</fo:block>
|
4403
4474
|
|
@@ -4745,6 +4816,7 @@
|
|
4745
4816
|
</xsl:choose>
|
4746
4817
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4747
4818
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4819
|
+
|
4748
4820
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4749
4821
|
<xsl:variable name="termsource_text">
|
4750
4822
|
<xsl:apply-templates/>
|
@@ -4773,8 +4845,8 @@
|
|
4773
4845
|
</xsl:if>
|
4774
4846
|
</xsl:template><xsl:variable name="localized.source">
|
4775
4847
|
<xsl:call-template name="getLocalizedString">
|
4776
|
-
|
4777
|
-
|
4848
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4849
|
+
</xsl:call-template>
|
4778
4850
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4779
4851
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4780
4852
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -4784,6 +4856,7 @@
|
|
4784
4856
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4785
4857
|
<xsl:apply-templates/>
|
4786
4858
|
</fo:inline>
|
4859
|
+
|
4787
4860
|
</fo:basic-link>
|
4788
4861
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4789
4862
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4850,6 +4923,9 @@
|
|
4850
4923
|
|
4851
4924
|
</xsl:if>
|
4852
4925
|
|
4926
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4927
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4928
|
+
|
4853
4929
|
|
4854
4930
|
|
4855
4931
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4862,7 +4938,9 @@
|
|
4862
4938
|
|
4863
4939
|
|
4864
4940
|
</xsl:if>
|
4865
|
-
|
4941
|
+
|
4942
|
+
|
4943
|
+
|
4866
4944
|
<xsl:apply-templates/>
|
4867
4945
|
</fo:basic-link>
|
4868
4946
|
|
@@ -5205,6 +5283,7 @@
|
|
5205
5283
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5206
5284
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5207
5285
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5286
|
+
|
5208
5287
|
<xsl:apply-templates/>
|
5209
5288
|
</fo:block>
|
5210
5289
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5373,9 +5452,97 @@
|
|
5373
5452
|
<fo:block-container border="1pt solid black" width="50%">
|
5374
5453
|
<fo:block> </fo:block>
|
5375
5454
|
</fo:block-container>
|
5455
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5456
|
+
<xsl:param name="colwidths"/>
|
5457
|
+
<xsl:variable name="colwidths_">
|
5458
|
+
<xsl:choose>
|
5459
|
+
<xsl:when test="not($colwidths)">
|
5460
|
+
<xsl:variable name="toc_table_simple">
|
5461
|
+
<tbody>
|
5462
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5463
|
+
</tbody>
|
5464
|
+
</xsl:variable>
|
5465
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5466
|
+
<xsl:call-template name="calculate-column-widths">
|
5467
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5468
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5469
|
+
</xsl:call-template>
|
5470
|
+
</xsl:when>
|
5471
|
+
<xsl:otherwise>
|
5472
|
+
<xsl:copy-of select="$colwidths"/>
|
5473
|
+
</xsl:otherwise>
|
5474
|
+
</xsl:choose>
|
5475
|
+
</xsl:variable>
|
5476
|
+
<fo:block role="TOCI" space-after="16pt">
|
5477
|
+
<fo:table width="100%" table-layout="fixed">
|
5478
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5479
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5480
|
+
</xsl:for-each>
|
5481
|
+
<fo:table-body>
|
5482
|
+
<xsl:apply-templates/>
|
5483
|
+
</fo:table-body>
|
5484
|
+
</fo:table>
|
5485
|
+
</fo:block>
|
5486
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5487
|
+
<fo:table-row min-height="5mm">
|
5488
|
+
<xsl:apply-templates/>
|
5489
|
+
</fo:table-row>
|
5490
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5491
|
+
<xsl:apply-templates/>
|
5492
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5493
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5494
|
+
<xsl:variable name="target" select="@target"/>
|
5495
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5496
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5497
|
+
<fo:table-cell>
|
5498
|
+
<fo:block>
|
5499
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5500
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5501
|
+
<xsl:choose>
|
5502
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5503
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5504
|
+
</xsl:choose>
|
5505
|
+
</xsl:for-each>
|
5506
|
+
</fo:basic-link>
|
5507
|
+
</fo:block>
|
5508
|
+
</fo:table-cell>
|
5509
|
+
</xsl:for-each>
|
5510
|
+
<!-- last column - for page numbers -->
|
5511
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5512
|
+
<fo:block>
|
5513
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5514
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5515
|
+
</fo:basic-link>
|
5516
|
+
</fo:block>
|
5517
|
+
</fo:table-cell>
|
5518
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5519
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5520
|
+
</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">
|
5521
|
+
<tr>
|
5522
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5523
|
+
</tr>
|
5524
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5525
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5526
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5527
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5528
|
+
<td>
|
5529
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5530
|
+
<xsl:copy-of select="."/>
|
5531
|
+
</xsl:for-each>
|
5532
|
+
</td>
|
5533
|
+
</xsl:for-each>
|
5534
|
+
<td>333</td> <!-- page number, just for fill -->
|
5376
5535
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5377
5536
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5378
5537
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5538
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5539
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5540
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5541
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5542
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5543
|
+
</svg>
|
5544
|
+
</fo:instream-foreign-object>
|
5545
|
+
</fo:inline>
|
5379
5546
|
</xsl:template><xsl:template name="convertDate">
|
5380
5547
|
<xsl:param name="date"/>
|
5381
5548
|
<xsl:param name="format" select="'short'"/>
|