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
@@ -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
|
|
@@ -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'"/>
|