metanorma-gb 1.5.1 → 1.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/gb/basicdoc.rng +23 -0
- data/lib/asciidoctor/gb/front_id.rb +1 -1
- data/lib/asciidoctor/gb/gbstandard.rng +7 -0
- data/lib/asciidoctor/gb/isodoc.rng +125 -15
- data/lib/asciidoctor/gb/isostandard.rng +8 -1
- data/lib/isodoc/gb/gb.recommendation.xsl +868 -248
- data/lib/isodoc/gb/html/gb.css +16 -4
- data/lib/isodoc/gb/html/gb.scss +18 -4
- data/lib/isodoc/gb/html/wordstyle.css +0 -1
- data/lib/isodoc/gb/html/wordstyle.scss +0 -1
- data/lib/metanorma/gb/version.rb +1 -1
- data/metanorma-gb.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a63c4effd68819deb875d70cb1f6fbe71ac5a5dafe0aa573d7584ef9185d9667
|
4
|
+
data.tar.gz: 2be102605c20765a7f56ce2f9ad1ef4d3c0c52bb9c47368ba30e7ad60d200087
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8de3847076209208804802807521dadeb1cf9735a08abae7d1623b31fc21e8cc9325030d3245e670ef1c9003c9ff68d94895d915be49dcdd059858050697d399
|
7
|
+
data.tar.gz: 3265e0eebc1f9a75f6a9d0ba5ef2688795a9637183980984ee26774d29adc82d62fe0b645466792da2df7ea70e1d28b6d574e1dc046b16e9af9a999a5df5feb8
|
@@ -402,6 +402,16 @@
|
|
402
402
|
</choice>
|
403
403
|
</attribute>
|
404
404
|
</optional>
|
405
|
+
<optional>
|
406
|
+
<attribute name="valign">
|
407
|
+
<choice>
|
408
|
+
<value>top</value>
|
409
|
+
<value>middle</value>
|
410
|
+
<value>bottom</value>
|
411
|
+
<value>baseline</value>
|
412
|
+
</choice>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
405
415
|
<choice>
|
406
416
|
<zeroOrMore>
|
407
417
|
<ref name="TextElement"/>
|
@@ -429,6 +439,16 @@
|
|
429
439
|
</choice>
|
430
440
|
</attribute>
|
431
441
|
</optional>
|
442
|
+
<optional>
|
443
|
+
<attribute name="valign">
|
444
|
+
<choice>
|
445
|
+
<value>top</value>
|
446
|
+
<value>middle</value>
|
447
|
+
<value>bottom</value>
|
448
|
+
<value>baseline</value>
|
449
|
+
</choice>
|
450
|
+
</attribute>
|
451
|
+
</optional>
|
432
452
|
<choice>
|
433
453
|
<zeroOrMore>
|
434
454
|
<ref name="TextElement"/>
|
@@ -998,6 +1018,9 @@
|
|
998
1018
|
<value>alphabet_upper</value>
|
999
1019
|
</choice>
|
1000
1020
|
</attribute>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="start"/>
|
1023
|
+
</optional>
|
1001
1024
|
<oneOrMore>
|
1002
1025
|
<ref name="li"/>
|
1003
1026
|
</oneOrMore>
|
@@ -45,7 +45,7 @@ module Asciidoctor
|
|
45
45
|
if node.attr("docstage") && node.attr("docstage").to_i < 60
|
46
46
|
abbr = IsoDoc::Gb::Metadata.new("en", "Latn", @i18n).
|
47
47
|
status_abbrev(node.attr("docstage"), nil, node.attr("iteration"),
|
48
|
-
node.attr("draft"), node
|
48
|
+
node.attr("draft"), doctype(node))
|
49
49
|
dn = "/#{abbr} #{dn}" # prefixes added in cleanup
|
50
50
|
else
|
51
51
|
dn += "-#{node.attr("copyright-year")}" if node.attr("copyright-year")
|
@@ -183,6 +183,13 @@
|
|
183
183
|
<!-- identical structure to iso-standard -->
|
184
184
|
<define name="gb-standard">
|
185
185
|
<element name="gb-standard">
|
186
|
+
<attribute name="version"/>
|
187
|
+
<attribute name="type">
|
188
|
+
<choice>
|
189
|
+
<value>semantic</value>
|
190
|
+
<value>presentation</value>
|
191
|
+
</choice>
|
192
|
+
</attribute>
|
186
193
|
<ref name="bibdata"/>
|
187
194
|
<zeroOrMore>
|
188
195
|
<ref name="termdocsource"/>
|
@@ -42,8 +42,11 @@
|
|
42
42
|
</define>
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
|
+
<!-- attribute target { xsd:IDREF }, -->
|
45
46
|
<attribute name="target">
|
46
|
-
<data type="
|
47
|
+
<data type="string">
|
48
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
49
|
+
</data>
|
47
50
|
</attribute>
|
48
51
|
<optional>
|
49
52
|
<attribute name="type">
|
@@ -61,6 +64,11 @@
|
|
61
64
|
</choice>
|
62
65
|
</attribute>
|
63
66
|
</optional>
|
67
|
+
<optional>
|
68
|
+
<attribute name="droploc">
|
69
|
+
<data type="boolean"/>
|
70
|
+
</attribute>
|
71
|
+
</optional>
|
64
72
|
<text/>
|
65
73
|
</element>
|
66
74
|
</define>
|
@@ -578,6 +586,8 @@
|
|
578
586
|
<ref name="ol"/>
|
579
587
|
<ref name="dl"/>
|
580
588
|
<ref name="formula"/>
|
589
|
+
<ref name="quote"/>
|
590
|
+
<ref name="sourcecode"/>
|
581
591
|
</choice>
|
582
592
|
</oneOrMore>
|
583
593
|
</element>
|
@@ -661,6 +671,16 @@
|
|
661
671
|
</choice>
|
662
672
|
</attribute>
|
663
673
|
</optional>
|
674
|
+
<optional>
|
675
|
+
<attribute name="valign">
|
676
|
+
<choice>
|
677
|
+
<value>top</value>
|
678
|
+
<value>middle</value>
|
679
|
+
<value>bottom</value>
|
680
|
+
<value>baseline</value>
|
681
|
+
</choice>
|
682
|
+
</attribute>
|
683
|
+
</optional>
|
664
684
|
<choice>
|
665
685
|
<zeroOrMore>
|
666
686
|
<choice>
|
@@ -697,6 +717,16 @@
|
|
697
717
|
</choice>
|
698
718
|
</attribute>
|
699
719
|
</optional>
|
720
|
+
<optional>
|
721
|
+
<attribute name="valign">
|
722
|
+
<choice>
|
723
|
+
<value>top</value>
|
724
|
+
<value>middle</value>
|
725
|
+
<value>bottom</value>
|
726
|
+
<value>baseline</value>
|
727
|
+
</choice>
|
728
|
+
</attribute>
|
729
|
+
</optional>
|
700
730
|
<choice>
|
701
731
|
<zeroOrMore>
|
702
732
|
<choice>
|
@@ -834,6 +864,13 @@
|
|
834
864
|
</define>
|
835
865
|
<define name="standard-document">
|
836
866
|
<element name="standard-document">
|
867
|
+
<attribute name="version"/>
|
868
|
+
<attribute name="type">
|
869
|
+
<choice>
|
870
|
+
<value>semantic</value>
|
871
|
+
<value>presentation</value>
|
872
|
+
</choice>
|
873
|
+
</attribute>
|
837
874
|
<ref name="bibdata"/>
|
838
875
|
<optional>
|
839
876
|
<ref name="boilerplate"/>
|
@@ -855,7 +892,7 @@
|
|
855
892
|
<oneOrMore>
|
856
893
|
<choice>
|
857
894
|
<ref name="content"/>
|
858
|
-
<ref name="
|
895
|
+
<ref name="abstract"/>
|
859
896
|
<ref name="foreword"/>
|
860
897
|
<ref name="introduction"/>
|
861
898
|
<ref name="acknowledgements"/>
|
@@ -1049,14 +1086,17 @@
|
|
1049
1086
|
<ref name="section-title"/>
|
1050
1087
|
</optional>
|
1051
1088
|
<group>
|
1052
|
-
<
|
1053
|
-
<
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
1089
|
+
<choice>
|
1090
|
+
<group>
|
1091
|
+
<zeroOrMore>
|
1092
|
+
<ref name="BasicBlock"/>
|
1093
|
+
</zeroOrMore>
|
1094
|
+
<zeroOrMore>
|
1095
|
+
<ref name="note"/>
|
1096
|
+
</zeroOrMore>
|
1097
|
+
</group>
|
1098
|
+
<ref name="amend"/>
|
1099
|
+
</choice>
|
1060
1100
|
<zeroOrMore>
|
1061
1101
|
<choice>
|
1062
1102
|
<ref name="clause-subsection"/>
|
@@ -1453,11 +1493,6 @@
|
|
1453
1493
|
</optional>
|
1454
1494
|
</element>
|
1455
1495
|
</define>
|
1456
|
-
<define name="preface_abstract">
|
1457
|
-
<element name="abstract">
|
1458
|
-
<ref name="Basic-Section"/>
|
1459
|
-
</element>
|
1460
|
-
</define>
|
1461
1496
|
<define name="term-clause">
|
1462
1497
|
<element name="clause">
|
1463
1498
|
<optional>
|
@@ -1507,4 +1542,79 @@
|
|
1507
1542
|
<ref name="CitationType"/>
|
1508
1543
|
</element>
|
1509
1544
|
</define>
|
1545
|
+
<define name="amend">
|
1546
|
+
<element name="amend">
|
1547
|
+
<optional>
|
1548
|
+
<attribute name="id">
|
1549
|
+
<data type="ID"/>
|
1550
|
+
</attribute>
|
1551
|
+
</optional>
|
1552
|
+
<attribute name="change">
|
1553
|
+
<choice>
|
1554
|
+
<value>add</value>
|
1555
|
+
<value>modify</value>
|
1556
|
+
<value>delete</value>
|
1557
|
+
</choice>
|
1558
|
+
</attribute>
|
1559
|
+
<optional>
|
1560
|
+
<attribute name="path"/>
|
1561
|
+
</optional>
|
1562
|
+
<optional>
|
1563
|
+
<attribute name="path_end"/>
|
1564
|
+
</optional>
|
1565
|
+
<optional>
|
1566
|
+
<attribute name="title"/>
|
1567
|
+
</optional>
|
1568
|
+
<optional>
|
1569
|
+
<element name="location">
|
1570
|
+
<zeroOrMore>
|
1571
|
+
<ref name="locality"/>
|
1572
|
+
</zeroOrMore>
|
1573
|
+
</element>
|
1574
|
+
</optional>
|
1575
|
+
<zeroOrMore>
|
1576
|
+
<ref name="autonumber"/>
|
1577
|
+
</zeroOrMore>
|
1578
|
+
<optional>
|
1579
|
+
<element name="description">
|
1580
|
+
<zeroOrMore>
|
1581
|
+
<ref name="BasicBlock"/>
|
1582
|
+
</zeroOrMore>
|
1583
|
+
</element>
|
1584
|
+
</optional>
|
1585
|
+
<optional>
|
1586
|
+
<element name="newcontent">
|
1587
|
+
<zeroOrMore>
|
1588
|
+
<ref name="BasicBlock"/>
|
1589
|
+
</zeroOrMore>
|
1590
|
+
</element>
|
1591
|
+
</optional>
|
1592
|
+
<optional>
|
1593
|
+
<element name="description">
|
1594
|
+
<zeroOrMore>
|
1595
|
+
<ref name="BasicBlock"/>
|
1596
|
+
</zeroOrMore>
|
1597
|
+
</element>
|
1598
|
+
</optional>
|
1599
|
+
</element>
|
1600
|
+
</define>
|
1601
|
+
<define name="autonumber">
|
1602
|
+
<element name="autonumber">
|
1603
|
+
<attribute name="type">
|
1604
|
+
<choice>
|
1605
|
+
<value>requirement</value>
|
1606
|
+
<value>recommendation</value>
|
1607
|
+
<value>permission</value>
|
1608
|
+
<value>table</value>
|
1609
|
+
<value>figure</value>
|
1610
|
+
<value>admonition</value>
|
1611
|
+
<value>formula</value>
|
1612
|
+
<value>sourcecode</value>
|
1613
|
+
<value>example</value>
|
1614
|
+
<value>note</value>
|
1615
|
+
</choice>
|
1616
|
+
</attribute>
|
1617
|
+
<text/>
|
1618
|
+
</element>
|
1619
|
+
</define>
|
1510
1620
|
</grammar>
|
@@ -253,7 +253,7 @@
|
|
253
253
|
<define name="preface">
|
254
254
|
<element name="preface">
|
255
255
|
<optional>
|
256
|
-
<ref name="
|
256
|
+
<ref name="abstract"/>
|
257
257
|
</optional>
|
258
258
|
<ref name="foreword"/>
|
259
259
|
<optional>
|
@@ -405,6 +405,13 @@
|
|
405
405
|
-->
|
406
406
|
<define name="iso-standard">
|
407
407
|
<element name="iso-standard">
|
408
|
+
<attribute name="version"/>
|
409
|
+
<attribute name="type">
|
410
|
+
<choice>
|
411
|
+
<value>semantic</value>
|
412
|
+
<value>presentation</value>
|
413
|
+
</choice>
|
414
|
+
</attribute>
|
408
415
|
<ref name="bibdata"/>
|
409
416
|
<zeroOrMore>
|
410
417
|
<ref name="termdocsource"/>
|
@@ -37,20 +37,8 @@
|
|
37
37
|
-->
|
38
38
|
<xsl:variable name="contents">
|
39
39
|
<contents>
|
40
|
-
<xsl:
|
41
|
-
|
42
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:sections/gb:clause[1]" mode="contents"/> <!-- [@id = '_scope'] -->
|
43
|
-
|
44
|
-
<!-- Normative references -->
|
45
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[1]" mode="contents"/> <!-- [@id = '_normative_references'] -->
|
46
|
-
|
47
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:sections/*[position() > 1]" mode="contents"/> <!-- @id != '_scope' -->
|
48
|
-
|
49
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:annex" mode="contents"/>
|
50
|
-
|
51
|
-
<!-- Bibliography -->
|
52
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
53
|
-
|
40
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
41
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
54
42
|
</contents>
|
55
43
|
</xsl:variable>
|
56
44
|
|
@@ -125,6 +113,10 @@
|
|
125
113
|
</fo:layout-master-set>
|
126
114
|
|
127
115
|
<xsl:call-template name="addPDFUAmeta"/>
|
116
|
+
|
117
|
+
<xsl:call-template name="addBookmarks">
|
118
|
+
<xsl:with-param name="contents" select="$contents"/>
|
119
|
+
</xsl:call-template>
|
128
120
|
|
129
121
|
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
130
122
|
<fo:flow flow-name="xsl-region-body">
|
@@ -341,19 +333,19 @@
|
|
341
333
|
|
342
334
|
<fo:block line-height="220%">
|
343
335
|
<xsl:variable name="margin-left">12</xsl:variable>
|
344
|
-
<xsl:for-each select="xalan:nodeset($contents)//item"><!-- [@display = 'true'][not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
336
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [@display = 'true'][not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
345
337
|
<fo:block text-align-last="justify">
|
346
338
|
<xsl:if test="@level =2">
|
347
339
|
<xsl:attribute name="margin-left">3.7mm</xsl:attribute>
|
348
340
|
</xsl:if>
|
349
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
341
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
350
342
|
<xsl:if test="normalize-space(@section) != ''">
|
351
343
|
<fo:inline>
|
352
344
|
<xsl:value-of select="@section"/>
|
353
345
|
</fo:inline>
|
354
346
|
<xsl:value-of select="$tab_zh"/>
|
355
347
|
</xsl:if>
|
356
|
-
<xsl:apply-templates/>
|
348
|
+
<xsl:apply-templates select="title"/>
|
357
349
|
<fo:inline keep-together.within-line="always">
|
358
350
|
<fo:leader font-weight="normal" leader-pattern="dots"/>
|
359
351
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
@@ -367,8 +359,8 @@
|
|
367
359
|
</fo:block-container>
|
368
360
|
|
369
361
|
<!-- Foreword, Introduction -->
|
370
|
-
<fo:block line-height="150%">
|
371
|
-
<xsl:
|
362
|
+
<fo:block line-height="150%">
|
363
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
372
364
|
</fo:block>
|
373
365
|
|
374
366
|
</fo:flow>
|
@@ -391,19 +383,7 @@
|
|
391
383
|
</xsl:call-template>
|
392
384
|
</fo:block>
|
393
385
|
|
394
|
-
<xsl:
|
395
|
-
|
396
|
-
<!-- Normative references -->
|
397
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[1]"/>
|
398
|
-
|
399
|
-
<!-- Main sections -->
|
400
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:sections/*[position() > 1]"/>
|
401
|
-
|
402
|
-
<!-- Annex(s) -->
|
403
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:annex"/>
|
404
|
-
|
405
|
-
<!-- Bibliography -->
|
406
|
-
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[position() > 1]"/>
|
386
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
407
387
|
|
408
388
|
</fo:block>
|
409
389
|
</fo:flow>
|
@@ -480,15 +460,21 @@
|
|
480
460
|
</xsl:variable>
|
481
461
|
|
482
462
|
<xsl:variable name="display">
|
483
|
-
<xsl:choose>
|
484
|
-
<xsl:when test="ancestor-or-self::gb:bibitem">false</xsl:when>
|
485
|
-
<xsl:when test="ancestor-or-self::gb:term">false</xsl:when>
|
463
|
+
<xsl:choose>
|
486
464
|
<xsl:when test="$level <= 2">true</xsl:when>
|
487
465
|
<xsl:otherwise>false</xsl:otherwise>
|
488
466
|
</xsl:choose>
|
489
467
|
</xsl:variable>
|
490
468
|
|
491
|
-
<xsl:
|
469
|
+
<xsl:variable name="skip">
|
470
|
+
<xsl:choose>
|
471
|
+
<xsl:when test="ancestor-or-self::gb:bibitem">true</xsl:when>
|
472
|
+
<xsl:when test="ancestor-or-self::gb:term">true</xsl:when>
|
473
|
+
<xsl:otherwise>false</xsl:otherwise>
|
474
|
+
</xsl:choose>
|
475
|
+
</xsl:variable>
|
476
|
+
|
477
|
+
<xsl:if test="$skip = 'false'">
|
492
478
|
|
493
479
|
<xsl:variable name="section">
|
494
480
|
<xsl:call-template name="getSection"/>
|
@@ -502,10 +488,13 @@
|
|
502
488
|
<xsl:value-of select="local-name()"/>
|
503
489
|
</xsl:variable>
|
504
490
|
|
505
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
506
|
-
<
|
491
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
492
|
+
<title>
|
493
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
494
|
+
</title>
|
495
|
+
<xsl:apply-templates mode="contents"/>
|
507
496
|
</item>
|
508
|
-
|
497
|
+
|
509
498
|
</xsl:if>
|
510
499
|
|
511
500
|
</xsl:template>
|
@@ -603,7 +592,7 @@
|
|
603
592
|
</xsl:template>
|
604
593
|
|
605
594
|
<!-- Bibliography -->
|
606
|
-
<xsl:template match="gb:references[
|
595
|
+
<xsl:template match="gb:references[not(@normative='true')]/gb:title">
|
607
596
|
<fo:block font-family="SimHei" text-align="center" margin-top="6pt" margin-bottom="16pt" keep-with-next="always">
|
608
597
|
<xsl:apply-templates/>
|
609
598
|
</fo:block>
|
@@ -721,17 +710,7 @@
|
|
721
710
|
<xsl:apply-templates/>
|
722
711
|
</xsl:element>
|
723
712
|
<xsl:if test="$element-name = 'fo:inline' and not(local-name(..) = 'admonition')">
|
724
|
-
<xsl:value-of select="$linebreak"/>
|
725
|
-
<!-- <xsl:choose>
|
726
|
-
<xsl:when test="ancestor::gb:annex">
|
727
|
-
<xsl:value-of select="$linebreak"/>
|
728
|
-
</xsl:when>
|
729
|
-
<xsl:otherwise>
|
730
|
-
<fo:block margin-bottom="12pt">
|
731
|
-
<xsl:value-of select="$linebreak"/>
|
732
|
-
</fo:block>
|
733
|
-
</xsl:otherwise>
|
734
|
-
</xsl:choose> -->
|
713
|
+
<xsl:value-of select="$linebreak"/>
|
735
714
|
</xsl:if>
|
736
715
|
</xsl:template>
|
737
716
|
|
@@ -775,13 +754,13 @@
|
|
775
754
|
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
776
755
|
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
777
756
|
<!-- <xsl:value-of select="@reference"/> -->
|
778
|
-
<xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@
|
757
|
+
<xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@normative='true' or not(preceding-sibling::gb:references)]]/gb:note)"/>
|
779
758
|
</fo:basic-link>
|
780
759
|
</fo:inline>
|
781
760
|
<fo:footnote-body>
|
782
761
|
<fo:block font-size="9pt" margin-bottom="12pt">
|
783
762
|
<fo:inline font-size="50%" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super">
|
784
|
-
<xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@
|
763
|
+
<xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@normative='true' or not(preceding-sibling::gb:references)]]/gb:note)"/>
|
785
764
|
</fo:inline>
|
786
765
|
<xsl:for-each select="gb:p">
|
787
766
|
<xsl:apply-templates/>
|
@@ -854,7 +833,7 @@
|
|
854
833
|
|
855
834
|
|
856
835
|
|
857
|
-
<xsl:template match="gb:ul | gb:ol">
|
836
|
+
<xsl:template match="gb:ul | gb:ol" mode="ul_ol">
|
858
837
|
<fo:list-block margin-bottom="12pt" margin-left="7.4mm" provisional-distance-between-starts="4mm"> <!-- margin-bottom="8pt" -->
|
859
838
|
<xsl:if test="local-name() = 'ol'">
|
860
839
|
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
@@ -884,6 +863,9 @@
|
|
884
863
|
</fo:list-item>
|
885
864
|
</xsl:template>
|
886
865
|
|
866
|
+
<xsl:template match="gb:note" mode="process">
|
867
|
+
<xsl:call-template name="note"/>
|
868
|
+
</xsl:template>
|
887
869
|
|
888
870
|
|
889
871
|
<xsl:template match="gb:preferred" priority="2">
|
@@ -965,7 +947,7 @@
|
|
965
947
|
|
966
948
|
|
967
949
|
<!-- <xsl:template match="gb:references[@id = '_bibliography']"> -->
|
968
|
-
<xsl:template match="gb:references[
|
950
|
+
<xsl:template match="gb:references[not(@normative='true')]">
|
969
951
|
<fo:block break-after="page"/>
|
970
952
|
<fo:block id="{@id}">
|
971
953
|
<xsl:apply-templates/>
|
@@ -980,7 +962,7 @@
|
|
980
962
|
|
981
963
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
982
964
|
<!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem"> -->
|
983
|
-
<xsl:template match="gb:references[
|
965
|
+
<xsl:template match="gb:references[not(@normative='true')]/gb:bibitem">
|
984
966
|
<fo:list-block font-size="11pt" margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
985
967
|
<fo:list-item>
|
986
968
|
<fo:list-item-label end-indent="label-end()">
|
@@ -1019,10 +1001,10 @@
|
|
1019
1001
|
</xsl:template>
|
1020
1002
|
|
1021
1003
|
<!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem" mode="contents"/> -->
|
1022
|
-
<xsl:template match="gb:references[
|
1004
|
+
<xsl:template match="gb:references[not(@normative='true')]/gb:bibitem" mode="contents"/>
|
1023
1005
|
|
1024
1006
|
<!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem/gb:title"> -->
|
1025
|
-
<xsl:template match="gb:references[
|
1007
|
+
<xsl:template match="gb:references[not(@normative='true')]/gb:bibitem/gb:title">
|
1026
1008
|
<fo:inline font-style="italic">
|
1027
1009
|
<xsl:apply-templates/>
|
1028
1010
|
</fo:inline>
|
@@ -1031,8 +1013,12 @@
|
|
1031
1013
|
|
1032
1014
|
<xsl:template match="mathml:math" priority="2">
|
1033
1015
|
<fo:inline font-family="Cambria Math">
|
1016
|
+
<xsl:variable name="mathml">
|
1017
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1018
|
+
</xsl:variable>
|
1034
1019
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1035
|
-
<xsl:copy-of select="."/>
|
1020
|
+
<!-- <xsl:copy-of select="."/> -->
|
1021
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1036
1022
|
</fo:instream-foreign-object>
|
1037
1023
|
</fo:inline>
|
1038
1024
|
</xsl:template>
|
@@ -1065,10 +1051,13 @@
|
|
1065
1051
|
|
1066
1052
|
|
1067
1053
|
<xsl:template match="gb:formula/gb:stem">
|
1068
|
-
<fo:block
|
1069
|
-
<
|
1070
|
-
<
|
1071
|
-
|
1054
|
+
<fo:block margin-top="14pt" margin-bottom="14pt">
|
1055
|
+
<xsl:if test="not(ancestor::*[local-name()='note'])">
|
1056
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1057
|
+
</xsl:if>
|
1058
|
+
<fo:table table-layout="fixed" width="100%"> <!-- width="170mm" -->
|
1059
|
+
<fo:table-column column-width="95%"/><!-- 165mm -->
|
1060
|
+
<fo:table-column column-width="5%"/> <!-- 5mm -->
|
1072
1061
|
<fo:table-body>
|
1073
1062
|
<fo:table-row>
|
1074
1063
|
<fo:table-cell display-align="center">
|
@@ -1146,6 +1135,10 @@
|
|
1146
1135
|
<title-edition lang="en">
|
1147
1136
|
|
1148
1137
|
|
1138
|
+
</title-edition>
|
1139
|
+
|
1140
|
+
<title-edition lang="fr">
|
1141
|
+
|
1149
1142
|
</title-edition>
|
1150
1143
|
|
1151
1144
|
|
@@ -1194,7 +1187,12 @@
|
|
1194
1187
|
<title-modified lang="zh">改写</title-modified>
|
1195
1188
|
|
1196
1189
|
|
1197
|
-
<title-source lang="en">
|
1190
|
+
<title-source lang="en">
|
1191
|
+
|
1192
|
+
<xsl:text>SOURCE</xsl:text>
|
1193
|
+
|
1194
|
+
|
1195
|
+
</title-source>
|
1198
1196
|
|
1199
1197
|
<title-keywords lang="en">Keywords</title-keywords>
|
1200
1198
|
|
@@ -1237,6 +1235,10 @@
|
|
1237
1235
|
<title-warning lang="zh">警告</title-warning>
|
1238
1236
|
|
1239
1237
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1238
|
+
|
1239
|
+
<title-continued lang="en">(continued)</title-continued>
|
1240
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1241
|
+
|
1240
1242
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1241
1243
|
<xsl:param name="name"/>
|
1242
1244
|
<xsl:variable name="lang">
|
@@ -1251,15 +1253,17 @@
|
|
1251
1253
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1252
1254
|
</xsl:otherwise>
|
1253
1255
|
</xsl:choose>
|
1254
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
1256
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1257
|
+
|
1258
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1259
|
+
|
1255
1260
|
|
1256
1261
|
|
1257
1262
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1258
1263
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1259
1264
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1260
1265
|
|
1261
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1262
|
-
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1266
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1263
1267
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1264
1268
|
|
1265
1269
|
|
@@ -1269,6 +1273,7 @@
|
|
1269
1273
|
|
1270
1274
|
|
1271
1275
|
|
1276
|
+
|
1272
1277
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1273
1278
|
|
1274
1279
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1319,9 +1324,11 @@
|
|
1319
1324
|
|
1320
1325
|
|
1321
1326
|
|
1327
|
+
|
1322
1328
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1323
1329
|
|
1324
1330
|
|
1331
|
+
|
1325
1332
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1326
1333
|
|
1327
1334
|
|
@@ -1339,6 +1346,9 @@
|
|
1339
1346
|
|
1340
1347
|
|
1341
1348
|
|
1349
|
+
|
1350
|
+
|
1351
|
+
|
1342
1352
|
|
1343
1353
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
1344
1354
|
|
@@ -1356,6 +1366,8 @@
|
|
1356
1366
|
|
1357
1367
|
|
1358
1368
|
|
1369
|
+
|
1370
|
+
|
1359
1371
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1360
1372
|
|
1361
1373
|
|
@@ -1381,6 +1393,7 @@
|
|
1381
1393
|
|
1382
1394
|
|
1383
1395
|
|
1396
|
+
|
1384
1397
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1385
1398
|
|
1386
1399
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1400,11 +1413,13 @@
|
|
1400
1413
|
|
1401
1414
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1402
1415
|
|
1403
|
-
|
1416
|
+
|
1417
|
+
|
1404
1418
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1405
1419
|
|
1406
1420
|
|
1407
1421
|
|
1422
|
+
|
1408
1423
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1409
1424
|
|
1410
1425
|
|
@@ -1425,20 +1440,20 @@
|
|
1425
1440
|
|
1426
1441
|
|
1427
1442
|
|
1443
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1428
1444
|
|
1429
1445
|
|
1430
|
-
|
1446
|
+
|
1447
|
+
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1431
1448
|
|
1432
1449
|
|
1433
1450
|
|
1434
|
-
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1435
1451
|
|
1436
1452
|
|
1437
1453
|
|
1438
1454
|
|
1439
1455
|
|
1440
1456
|
|
1441
|
-
|
1442
1457
|
|
1443
1458
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1444
1459
|
|
@@ -1464,6 +1479,8 @@
|
|
1464
1479
|
|
1465
1480
|
|
1466
1481
|
|
1482
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1483
|
+
|
1467
1484
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1468
1485
|
|
1469
1486
|
|
@@ -1492,6 +1509,7 @@
|
|
1492
1509
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1493
1510
|
|
1494
1511
|
|
1512
|
+
|
1495
1513
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1496
1514
|
|
1497
1515
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1499,6 +1517,7 @@
|
|
1499
1517
|
|
1500
1518
|
|
1501
1519
|
|
1520
|
+
|
1502
1521
|
|
1503
1522
|
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1504
1523
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1516,7 +1535,7 @@
|
|
1516
1535
|
|
1517
1536
|
|
1518
1537
|
|
1519
|
-
|
1538
|
+
|
1520
1539
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1521
1540
|
|
1522
1541
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
@@ -1542,14 +1561,16 @@
|
|
1542
1561
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1543
1562
|
|
1544
1563
|
|
1545
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1546
|
-
|
1564
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1565
|
+
|
1547
1566
|
|
1548
1567
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1549
1568
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1550
1569
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1551
1570
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1552
1571
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1572
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1573
|
+
|
1553
1574
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1554
1575
|
|
1555
1576
|
<xsl:attribute name="padding-left">7.4mm</xsl:attribute>
|
@@ -1562,7 +1583,43 @@
|
|
1562
1583
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1563
1584
|
|
1564
1585
|
|
1565
|
-
</xsl:attribute-set><xsl:template
|
1586
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1587
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1588
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1589
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1590
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1591
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1592
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1593
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1594
|
+
|
1595
|
+
<!-- Normative references -->
|
1596
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1597
|
+
<!-- Terms and definitions -->
|
1598
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1599
|
+
<!-- Another main sections -->
|
1600
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1601
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1602
|
+
<!-- Bibliography -->
|
1603
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1604
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1605
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1606
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1607
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1608
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1609
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1610
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1611
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1612
|
+
|
1613
|
+
<!-- Normative references -->
|
1614
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1615
|
+
<!-- Terms and definitions -->
|
1616
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1617
|
+
<!-- Another main sections -->
|
1618
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1619
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1620
|
+
<!-- Bibliography -->
|
1621
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1622
|
+
</xsl:template><xsl:template match="text()">
|
1566
1623
|
<xsl:value-of select="."/>
|
1567
1624
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1568
1625
|
<xsl:value-of select="$linebreak"/>
|
@@ -1579,6 +1636,8 @@
|
|
1579
1636
|
|
1580
1637
|
|
1581
1638
|
|
1639
|
+
<!-- $namespace = 'iso' or -->
|
1640
|
+
|
1582
1641
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1583
1642
|
|
1584
1643
|
|
@@ -1638,6 +1697,7 @@
|
|
1638
1697
|
|
1639
1698
|
|
1640
1699
|
|
1700
|
+
|
1641
1701
|
|
1642
1702
|
|
1643
1703
|
|
@@ -1655,6 +1715,9 @@
|
|
1655
1715
|
|
1656
1716
|
|
1657
1717
|
|
1718
|
+
|
1719
|
+
|
1720
|
+
|
1658
1721
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1659
1722
|
<xsl:choose>
|
1660
1723
|
<xsl:when test=". = 1 or . = 0">
|
@@ -1687,8 +1750,9 @@
|
|
1687
1750
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1688
1751
|
<xsl:if test="normalize-space() != ''">
|
1689
1752
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1690
|
-
|
1691
|
-
|
1753
|
+
|
1754
|
+
<xsl:apply-templates/>
|
1755
|
+
</fo:block>
|
1692
1756
|
</xsl:if>
|
1693
1757
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1694
1758
|
<xsl:param name="table-row"/>
|
@@ -1804,10 +1868,25 @@
|
|
1804
1868
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1805
1869
|
<xsl:param name="cols-count"/>
|
1806
1870
|
<!-- font-weight="bold" -->
|
1807
|
-
<fo:table-header>
|
1808
|
-
|
1871
|
+
<fo:table-header>
|
1872
|
+
|
1809
1873
|
<xsl:apply-templates/>
|
1810
1874
|
</fo:table-header>
|
1875
|
+
</xsl:template><xsl:template name="table-header-title">
|
1876
|
+
<xsl:param name="cols-count"/>
|
1877
|
+
<!-- row for title -->
|
1878
|
+
<fo:table-row>
|
1879
|
+
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
1880
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1881
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1882
|
+
<xsl:call-template name="fn_name_display"/>
|
1883
|
+
</xsl:for-each>
|
1884
|
+
<fo:block text-align="right" font-style="italic">
|
1885
|
+
<xsl:text> </xsl:text>
|
1886
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1887
|
+
</fo:block>
|
1888
|
+
</fo:table-cell>
|
1889
|
+
</fo:table-row>
|
1811
1890
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1812
1891
|
<fo:table-body>
|
1813
1892
|
<xsl:apply-templates/>
|
@@ -1871,6 +1950,8 @@
|
|
1871
1950
|
</xsl:choose>
|
1872
1951
|
</xsl:variable>
|
1873
1952
|
|
1953
|
+
|
1954
|
+
|
1874
1955
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1875
1956
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1876
1957
|
</xsl:apply-templates>
|
@@ -1880,6 +1961,8 @@
|
|
1880
1961
|
</xsl:call-template>
|
1881
1962
|
|
1882
1963
|
<fo:table-body>
|
1964
|
+
|
1965
|
+
|
1883
1966
|
<xsl:apply-templates/>
|
1884
1967
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1885
1968
|
|
@@ -1905,11 +1988,23 @@
|
|
1905
1988
|
<xsl:attribute name="min-height">0mm</xsl:attribute>
|
1906
1989
|
<xsl:attribute name="line-height">110%</xsl:attribute>
|
1907
1990
|
|
1991
|
+
|
1992
|
+
|
1908
1993
|
|
1909
1994
|
<xsl:apply-templates/>
|
1910
1995
|
</fo:table-row>
|
1911
1996
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
1912
1997
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
1998
|
+
<xsl:attribute name="text-align">
|
1999
|
+
<xsl:choose>
|
2000
|
+
<xsl:when test="@align">
|
2001
|
+
<xsl:value-of select="@align"/>
|
2002
|
+
</xsl:when>
|
2003
|
+
<xsl:otherwise>center</xsl:otherwise>
|
2004
|
+
</xsl:choose>
|
2005
|
+
</xsl:attribute>
|
2006
|
+
|
2007
|
+
|
1913
2008
|
|
1914
2009
|
|
1915
2010
|
|
@@ -1928,12 +2023,32 @@
|
|
1928
2023
|
<xsl:value-of select="@rowspan"/>
|
1929
2024
|
</xsl:attribute>
|
1930
2025
|
</xsl:if>
|
2026
|
+
<xsl:call-template name="display-align"/>
|
1931
2027
|
<fo:block>
|
1932
2028
|
<xsl:apply-templates/>
|
1933
2029
|
</fo:block>
|
1934
2030
|
</fo:table-cell>
|
2031
|
+
</xsl:template><xsl:template name="display-align">
|
2032
|
+
<xsl:if test="@valign">
|
2033
|
+
<xsl:attribute name="display-align">
|
2034
|
+
<xsl:choose>
|
2035
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2036
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2037
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2038
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2039
|
+
</xsl:choose>
|
2040
|
+
</xsl:attribute>
|
2041
|
+
</xsl:if>
|
1935
2042
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1936
2043
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2044
|
+
<xsl:attribute name="text-align">
|
2045
|
+
<xsl:choose>
|
2046
|
+
<xsl:when test="@align">
|
2047
|
+
<xsl:value-of select="@align"/>
|
2048
|
+
</xsl:when>
|
2049
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2050
|
+
</xsl:choose>
|
2051
|
+
</xsl:attribute>
|
1937
2052
|
|
1938
2053
|
|
1939
2054
|
|
@@ -1947,6 +2062,7 @@
|
|
1947
2062
|
|
1948
2063
|
|
1949
2064
|
|
2065
|
+
|
1950
2066
|
<xsl:if test="@colspan">
|
1951
2067
|
<xsl:attribute name="number-columns-spanned">
|
1952
2068
|
<xsl:value-of select="@colspan"/>
|
@@ -1957,8 +2073,8 @@
|
|
1957
2073
|
<xsl:value-of select="@rowspan"/>
|
1958
2074
|
</xsl:attribute>
|
1959
2075
|
</xsl:if>
|
1960
|
-
<
|
1961
|
-
|
2076
|
+
<xsl:call-template name="display-align"/>
|
2077
|
+
<fo:block>
|
1962
2078
|
<xsl:apply-templates/>
|
1963
2079
|
</fo:block>
|
1964
2080
|
</fo:table-cell>
|
@@ -2151,6 +2267,7 @@
|
|
2151
2267
|
|
2152
2268
|
|
2153
2269
|
|
2270
|
+
|
2154
2271
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2155
2272
|
|
2156
2273
|
<xsl:value-of select="@reference"/>
|
@@ -2161,139 +2278,155 @@
|
|
2161
2278
|
<xsl:apply-templates/>
|
2162
2279
|
</fo:inline>
|
2163
2280
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2164
|
-
<
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2169
|
-
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2281
|
+
<fo:block-container margin-left="0mm">
|
2282
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2283
|
+
<xsl:attribute name="margin-left">
|
2284
|
+
<xsl:choose>
|
2285
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2286
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2287
|
+
</xsl:choose>
|
2288
|
+
</xsl:attribute>
|
2289
|
+
|
2290
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2291
|
+
|
2292
|
+
</xsl:if>
|
2293
|
+
<fo:block-container margin-left="0mm">
|
2294
|
+
|
2295
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2174
2296
|
|
2175
|
-
|
2297
|
+
<xsl:variable name="key_iso">
|
2298
|
+
|
2299
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
2300
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2301
|
+
</xsl:variable>
|
2302
|
+
|
2303
|
+
<xsl:choose>
|
2304
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2176
2305
|
|
2306
|
+
<fo:block text-align="left">
|
2307
|
+
|
2308
|
+
|
2309
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2310
|
+
|
2311
|
+
<xsl:variable name="title-where">
|
2312
|
+
<xsl:call-template name="getTitle">
|
2313
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2314
|
+
</xsl:call-template>
|
2315
|
+
</xsl:variable>
|
2316
|
+
<xsl:value-of select="$title-where"/>
|
2317
|
+
</fo:block>
|
2318
|
+
<fo:block>
|
2319
|
+
|
2320
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2321
|
+
|
2322
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2323
|
+
—
|
2324
|
+
<xsl:text> </xsl:text>
|
2325
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2326
|
+
</fo:block>
|
2177
2327
|
|
2178
|
-
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2179
2328
|
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2329
|
+
</xsl:when>
|
2330
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2331
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2332
|
+
|
2333
|
+
|
2334
|
+
|
2335
|
+
|
2336
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2337
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2338
|
+
|
2339
|
+
<xsl:variable name="title-where">
|
2340
|
+
<xsl:call-template name="getTitle">
|
2341
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2342
|
+
</xsl:call-template>
|
2343
|
+
</xsl:variable>
|
2344
|
+
<xsl:value-of select="$title-where"/>
|
2345
|
+
</fo:block>
|
2346
|
+
</xsl:when>
|
2347
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2348
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2349
|
+
|
2350
|
+
|
2351
|
+
|
2352
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2353
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2354
|
+
|
2355
|
+
<xsl:variable name="title-key">
|
2356
|
+
<xsl:call-template name="getTitle">
|
2357
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2358
|
+
</xsl:call-template>
|
2359
|
+
</xsl:variable>
|
2360
|
+
<xsl:value-of select="$title-key"/>
|
2361
|
+
</fo:block>
|
2362
|
+
</xsl:when>
|
2363
|
+
</xsl:choose>
|
2364
|
+
|
2365
|
+
<!-- a few components -->
|
2366
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2187
2367
|
<fo:block>
|
2188
2368
|
|
2189
|
-
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2190
2369
|
|
2191
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2192
|
-
—
|
2193
|
-
<xsl:text> </xsl:text>
|
2194
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2195
|
-
</fo:block>
|
2196
|
-
|
2197
|
-
|
2198
|
-
</xsl:when>
|
2199
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2200
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2201
|
-
|
2202
|
-
|
2203
|
-
|
2204
|
-
|
2205
|
-
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2206
|
-
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2207
|
-
|
2208
|
-
<xsl:variable name="title-where">
|
2209
|
-
<xsl:call-template name="getTitle">
|
2210
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2211
|
-
</xsl:call-template>
|
2212
|
-
</xsl:variable>
|
2213
|
-
<xsl:value-of select="$title-where"/>
|
2214
|
-
</fo:block>
|
2215
|
-
</xsl:when>
|
2216
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2217
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2218
|
-
|
2219
|
-
|
2220
|
-
|
2221
|
-
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2222
|
-
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2223
|
-
|
2224
|
-
<xsl:variable name="title-key">
|
2225
|
-
<xsl:call-template name="getTitle">
|
2226
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2227
|
-
</xsl:call-template>
|
2228
|
-
</xsl:variable>
|
2229
|
-
<xsl:value-of select="$title-key"/>
|
2230
|
-
</fo:block>
|
2231
|
-
</xsl:when>
|
2232
|
-
</xsl:choose>
|
2233
|
-
|
2234
|
-
<!-- a few components -->
|
2235
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2236
|
-
<fo:block>
|
2237
|
-
|
2238
|
-
|
2239
|
-
|
2240
|
-
|
2241
|
-
<fo:block>
|
2242
|
-
|
2243
|
-
|
2244
|
-
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2245
|
-
<xsl:if test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2246
|
-
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
2247
|
-
</xsl:if>
|
2248
|
-
|
2249
|
-
|
2250
|
-
|
2251
|
-
<fo:table width="95%" table-layout="fixed">
|
2252
2370
|
|
2253
|
-
<xsl:attribute name="margin-left">-3.7mm</xsl:attribute>
|
2254
2371
|
|
2255
|
-
<
|
2256
|
-
|
2257
|
-
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2372
|
+
<fo:block>
|
2373
|
+
|
2374
|
+
|
2375
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2376
|
+
<xsl:if test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2377
|
+
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
2378
|
+
</xsl:if>
|
2379
|
+
|
2380
|
+
|
2381
|
+
|
2382
|
+
<fo:table width="95%" table-layout="fixed">
|
2261
2383
|
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
<xsl:
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2384
|
+
<xsl:attribute name="margin-left">-3.7mm</xsl:attribute>
|
2385
|
+
|
2386
|
+
<xsl:choose>
|
2387
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2388
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2389
|
+
</xsl:when>
|
2390
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2391
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2392
|
+
|
2393
|
+
</xsl:when>
|
2394
|
+
</xsl:choose>
|
2395
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2396
|
+
<xsl:variable name="html-table">
|
2397
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
2398
|
+
<xsl:element name="{$ns}:table">
|
2399
|
+
<tbody>
|
2400
|
+
<xsl:apply-templates mode="dl"/>
|
2401
|
+
</tbody>
|
2402
|
+
</xsl:element>
|
2403
|
+
</xsl:variable>
|
2404
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2405
|
+
<xsl:variable name="colwidths">
|
2406
|
+
<xsl:call-template name="calculate-column-widths">
|
2407
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2408
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2409
|
+
</xsl:call-template>
|
2410
|
+
</xsl:variable>
|
2411
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2412
|
+
<xsl:variable name="maxlength_dt">
|
2413
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2414
|
+
</xsl:variable>
|
2415
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2416
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2417
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2418
|
+
</xsl:call-template>
|
2419
|
+
<fo:table-body>
|
2420
|
+
<xsl:apply-templates>
|
2421
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2422
|
+
</xsl:apply-templates>
|
2423
|
+
</fo:table-body>
|
2424
|
+
</fo:table>
|
2425
|
+
</fo:block>
|
2426
|
+
</fo:block>
|
2427
|
+
</xsl:if>
|
2428
|
+
</fo:block-container>
|
2429
|
+
</fo:block-container>
|
2297
2430
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2298
2431
|
<xsl:param name="colwidths"/>
|
2299
2432
|
<xsl:param name="maxlength_dt"/>
|
@@ -2390,6 +2523,7 @@
|
|
2390
2523
|
<xsl:param name="key_iso"/>
|
2391
2524
|
|
2392
2525
|
<fo:table-row>
|
2526
|
+
|
2393
2527
|
<fo:table-cell>
|
2394
2528
|
|
2395
2529
|
<fo:block margin-top="6pt">
|
@@ -2415,14 +2549,36 @@
|
|
2415
2549
|
<fo:table-cell>
|
2416
2550
|
<fo:block>
|
2417
2551
|
|
2418
|
-
|
2552
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2553
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2554
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2555
|
+
</xsl:if>
|
2556
|
+
</xsl:if> -->
|
2419
2557
|
|
2420
2558
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2421
2559
|
|
2422
2560
|
</fo:block>
|
2423
2561
|
</fo:table-cell>
|
2424
2562
|
</fo:table-row>
|
2425
|
-
|
2563
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2564
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2565
|
+
<fo:table-row>
|
2566
|
+
<fo:table-cell>
|
2567
|
+
<fo:block margin-top="6pt">
|
2568
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2569
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2570
|
+
</xsl:if>
|
2571
|
+
<xsl:text> </xsl:text>
|
2572
|
+
</fo:block>
|
2573
|
+
</fo:table-cell>
|
2574
|
+
<fo:table-cell>
|
2575
|
+
<fo:block>
|
2576
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2577
|
+
</fo:block>
|
2578
|
+
</fo:table-cell>
|
2579
|
+
</fo:table-row>
|
2580
|
+
</xsl:if>
|
2581
|
+
</xsl:if> -->
|
2426
2582
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2427
2583
|
<xsl:apply-templates/>
|
2428
2584
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2447,6 +2603,31 @@
|
|
2447
2603
|
</fo:inline>
|
2448
2604
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2449
2605
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2606
|
+
<xsl:variable name="_font-size">
|
2607
|
+
|
2608
|
+
|
2609
|
+
10
|
2610
|
+
|
2611
|
+
|
2612
|
+
|
2613
|
+
|
2614
|
+
|
2615
|
+
|
2616
|
+
|
2617
|
+
|
2618
|
+
|
2619
|
+
|
2620
|
+
|
2621
|
+
</xsl:variable>
|
2622
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2623
|
+
<xsl:if test="$font-size != ''">
|
2624
|
+
<xsl:attribute name="font-size">
|
2625
|
+
<xsl:choose>
|
2626
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2627
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2628
|
+
</xsl:choose>
|
2629
|
+
</xsl:attribute>
|
2630
|
+
</xsl:if>
|
2450
2631
|
<xsl:apply-templates/>
|
2451
2632
|
</fo:inline>
|
2452
2633
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2773,10 +2954,23 @@
|
|
2773
2954
|
<xsl:value-of select="substring($str, 2)"/>
|
2774
2955
|
</xsl:template><xsl:template match="mathml:math">
|
2775
2956
|
<fo:inline font-family="STIX2Math">
|
2776
|
-
<
|
2777
|
-
<xsl:
|
2778
|
-
</
|
2957
|
+
<xsl:variable name="mathml">
|
2958
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
2959
|
+
</xsl:variable>
|
2960
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2961
|
+
<!-- <xsl:copy-of select="."/> -->
|
2962
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2963
|
+
</fo:instream-foreign-object>
|
2779
2964
|
</fo:inline>
|
2965
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
2966
|
+
<xsl:copy>
|
2967
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2968
|
+
</xsl:copy>
|
2969
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
2970
|
+
<xsl:copy>
|
2971
|
+
<!-- replace start and end spaces to non-break space -->
|
2972
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2973
|
+
</xsl:copy>
|
2780
2974
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2781
2975
|
<xsl:variable name="target">
|
2782
2976
|
<xsl:choose>
|
@@ -2857,9 +3051,24 @@
|
|
2857
3051
|
<xsl:apply-templates/>
|
2858
3052
|
</fo:basic-link>
|
2859
3053
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2860
|
-
<fo:block
|
2861
|
-
<xsl:
|
2862
|
-
|
3054
|
+
<fo:block-container margin-left="0mm">
|
3055
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3056
|
+
<xsl:attribute name="margin-left">
|
3057
|
+
<xsl:choose>
|
3058
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3059
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3060
|
+
</xsl:choose>
|
3061
|
+
</xsl:attribute>
|
3062
|
+
|
3063
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3064
|
+
|
3065
|
+
</xsl:if>
|
3066
|
+
<fo:block-container margin-left="0mm">
|
3067
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3068
|
+
<xsl:apply-templates/>
|
3069
|
+
</fo:block>
|
3070
|
+
</fo:block-container>
|
3071
|
+
</fo:block-container>
|
2863
3072
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2864
3073
|
<fo:inline>
|
2865
3074
|
<xsl:apply-templates/>
|
@@ -2927,7 +3136,9 @@
|
|
2927
3136
|
</xsl:choose>
|
2928
3137
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2929
3138
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2930
|
-
<xsl:
|
3139
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3140
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3141
|
+
</fo:inline>
|
2931
3142
|
<xsl:apply-templates/>
|
2932
3143
|
</fo:block>
|
2933
3144
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -3030,12 +3241,101 @@
|
|
3030
3241
|
|
3031
3242
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3032
3243
|
</fo:block>
|
3033
|
-
</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">
|
3244
|
+
</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">
|
3034
3245
|
<xsl:apply-templates mode="contents"/>
|
3035
3246
|
<xsl:text> </xsl:text>
|
3036
|
-
</xsl:template><xsl:template match="
|
3247
|
+
</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">
|
3248
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3249
|
+
<xsl:text> </xsl:text>
|
3250
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3251
|
+
<xsl:value-of select="."/>
|
3252
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3037
3253
|
<xsl:value-of select="."/>
|
3038
|
-
</xsl:template><xsl:template match="
|
3254
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3255
|
+
<xsl:apply-templates mode="contents"/>
|
3256
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3257
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3258
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3259
|
+
<xsl:apply-templates select="."/>
|
3260
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3261
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3262
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3263
|
+
<xsl:param name="contents"/>
|
3264
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3265
|
+
<fo:bookmark-tree>
|
3266
|
+
<xsl:choose>
|
3267
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3268
|
+
<xsl:choose>
|
3269
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3270
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3271
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3272
|
+
<fo:bookmark-title>
|
3273
|
+
<xsl:variable name="bookmark-title_">
|
3274
|
+
<xsl:choose>
|
3275
|
+
<xsl:when test="@lang = 'en'">
|
3276
|
+
|
3277
|
+
|
3278
|
+
</xsl:when>
|
3279
|
+
<xsl:when test="@lang = 'fr'">
|
3280
|
+
|
3281
|
+
|
3282
|
+
</xsl:when>
|
3283
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3284
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3285
|
+
</xsl:choose>
|
3286
|
+
</xsl:variable>
|
3287
|
+
<xsl:choose>
|
3288
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3289
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3290
|
+
</xsl:when>
|
3291
|
+
<xsl:otherwise>
|
3292
|
+
<xsl:choose>
|
3293
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3294
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3295
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3296
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3297
|
+
</xsl:choose>
|
3298
|
+
</xsl:otherwise>
|
3299
|
+
</xsl:choose>
|
3300
|
+
</fo:bookmark-title>
|
3301
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3302
|
+
</fo:bookmark>
|
3303
|
+
|
3304
|
+
</xsl:for-each>
|
3305
|
+
</xsl:when>
|
3306
|
+
<xsl:otherwise>
|
3307
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3308
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3309
|
+
</xsl:for-each>
|
3310
|
+
</xsl:otherwise>
|
3311
|
+
</xsl:choose>
|
3312
|
+
</xsl:when>
|
3313
|
+
<xsl:otherwise>
|
3314
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3315
|
+
</xsl:otherwise>
|
3316
|
+
</xsl:choose>
|
3317
|
+
|
3318
|
+
|
3319
|
+
|
3320
|
+
|
3321
|
+
|
3322
|
+
|
3323
|
+
|
3324
|
+
|
3325
|
+
</fo:bookmark-tree>
|
3326
|
+
</xsl:if>
|
3327
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3328
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3329
|
+
<fo:bookmark-title>
|
3330
|
+
<xsl:if test="@section != ''">
|
3331
|
+
<xsl:value-of select="@section"/>
|
3332
|
+
<xsl:text> </xsl:text>
|
3333
|
+
</xsl:if>
|
3334
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3335
|
+
</fo:bookmark-title>
|
3336
|
+
<xsl:apply-templates mode="bookmark"/>
|
3337
|
+
</fo:bookmark>
|
3338
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
3039
3339
|
<xsl:if test="normalize-space() != ''">
|
3040
3340
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3041
3341
|
|
@@ -3093,7 +3393,7 @@
|
|
3093
3393
|
<xsl:apply-templates/>
|
3094
3394
|
</xsl:otherwise>
|
3095
3395
|
</xsl:choose>
|
3096
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3396
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3097
3397
|
<xsl:text> </xsl:text>
|
3098
3398
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3099
3399
|
<xsl:copy>
|
@@ -3102,21 +3402,63 @@
|
|
3102
3402
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3103
3403
|
<xsl:text> </xsl:text>
|
3104
3404
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3105
|
-
|
3106
|
-
|
3107
|
-
|
3108
|
-
|
3109
|
-
|
3405
|
+
|
3406
|
+
<fo:block-container margin-left="0mm">
|
3407
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3408
|
+
<xsl:attribute name="margin-left">
|
3409
|
+
<xsl:choose>
|
3410
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3411
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3412
|
+
</xsl:choose>
|
3413
|
+
</xsl:attribute>
|
3414
|
+
|
3415
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3416
|
+
|
3417
|
+
</xsl:if>
|
3418
|
+
<fo:block-container margin-left="0mm">
|
3419
|
+
|
3420
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3421
|
+
<xsl:variable name="_font-size">
|
3422
|
+
|
3423
|
+
|
3424
|
+
9
|
3425
|
+
|
3426
|
+
|
3427
|
+
|
3428
|
+
|
3429
|
+
|
3430
|
+
|
3431
|
+
|
3432
|
+
|
3433
|
+
|
3434
|
+
|
3435
|
+
|
3436
|
+
</xsl:variable>
|
3437
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3438
|
+
<xsl:if test="$font-size != ''">
|
3439
|
+
<xsl:attribute name="font-size">
|
3440
|
+
<xsl:choose>
|
3441
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3442
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3443
|
+
</xsl:choose>
|
3444
|
+
</xsl:attribute>
|
3445
|
+
</xsl:if>
|
3446
|
+
<xsl:apply-templates/>
|
3447
|
+
</fo:block>
|
3448
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3449
|
+
|
3450
|
+
</fo:block-container>
|
3451
|
+
</fo:block-container>
|
3452
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3110
3453
|
<xsl:variable name="text">
|
3111
3454
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3112
3455
|
</xsl:variable>
|
3113
|
-
<xsl:call-template name="add-zero-spaces">
|
3456
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3114
3457
|
<xsl:with-param name="text" select="$text"/>
|
3115
3458
|
</xsl:call-template>
|
3116
3459
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3117
3460
|
<xsl:if test="normalize-space() != ''">
|
3118
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3119
|
-
|
3461
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3120
3462
|
<xsl:apply-templates/>
|
3121
3463
|
</fo:block>
|
3122
3464
|
</xsl:if>
|
@@ -3184,6 +3526,145 @@
|
|
3184
3526
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3185
3527
|
<xsl:apply-templates/>
|
3186
3528
|
</fo:block>
|
3529
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3530
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3531
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3532
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3533
|
+
</xsl:if>
|
3534
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3535
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3536
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3537
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3538
|
+
</xsl:if>
|
3539
|
+
<xsl:variable name="simple-table">
|
3540
|
+
<xsl:call-template name="getSimpleTable"/>
|
3541
|
+
</xsl:variable>
|
3542
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3543
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3544
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3545
|
+
<fo:table-column column-width="115mm"/> -->
|
3546
|
+
<fo:table-column column-width="30%"/>
|
3547
|
+
<fo:table-column column-width="70%"/>
|
3548
|
+
</xsl:if>
|
3549
|
+
<xsl:apply-templates mode="requirement"/>
|
3550
|
+
</fo:table>
|
3551
|
+
<!-- fn processing -->
|
3552
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3553
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3554
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3555
|
+
<xsl:call-template name="fn_display"/>
|
3556
|
+
</fo:block>
|
3557
|
+
</xsl:for-each>
|
3558
|
+
</xsl:if>
|
3559
|
+
</fo:block-container>
|
3560
|
+
</fo:block-container>
|
3561
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3562
|
+
<fo:table-header>
|
3563
|
+
<xsl:apply-templates mode="requirement"/>
|
3564
|
+
</fo:table-header>
|
3565
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3566
|
+
<fo:table-body>
|
3567
|
+
<xsl:apply-templates mode="requirement"/>
|
3568
|
+
</fo:table-body>
|
3569
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3570
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3571
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3572
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3573
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3574
|
+
</xsl:if>
|
3575
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3576
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3577
|
+
</xsl:if>
|
3578
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3579
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3580
|
+
</xsl:if>
|
3581
|
+
<xsl:apply-templates mode="requirement"/>
|
3582
|
+
</fo:table-row>
|
3583
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3584
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3585
|
+
<xsl:attribute name="text-align">
|
3586
|
+
<xsl:choose>
|
3587
|
+
<xsl:when test="@align">
|
3588
|
+
<xsl:value-of select="@align"/>
|
3589
|
+
</xsl:when>
|
3590
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3591
|
+
</xsl:choose>
|
3592
|
+
</xsl:attribute>
|
3593
|
+
<xsl:if test="@colspan">
|
3594
|
+
<xsl:attribute name="number-columns-spanned">
|
3595
|
+
<xsl:value-of select="@colspan"/>
|
3596
|
+
</xsl:attribute>
|
3597
|
+
</xsl:if>
|
3598
|
+
<xsl:if test="@rowspan">
|
3599
|
+
<xsl:attribute name="number-rows-spanned">
|
3600
|
+
<xsl:value-of select="@rowspan"/>
|
3601
|
+
</xsl:attribute>
|
3602
|
+
</xsl:if>
|
3603
|
+
<xsl:call-template name="display-align"/>
|
3604
|
+
|
3605
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3606
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3607
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3608
|
+
</xsl:if>
|
3609
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3610
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3611
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3612
|
+
</xsl:if> -->
|
3613
|
+
|
3614
|
+
<fo:block>
|
3615
|
+
<xsl:apply-templates/>
|
3616
|
+
</fo:block>
|
3617
|
+
</fo:table-cell>
|
3618
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3619
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3620
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3621
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3622
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3623
|
+
</xsl:if>
|
3624
|
+
<xsl:attribute name="text-align">
|
3625
|
+
<xsl:choose>
|
3626
|
+
<xsl:when test="@align">
|
3627
|
+
<xsl:value-of select="@align"/>
|
3628
|
+
</xsl:when>
|
3629
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3630
|
+
</xsl:choose>
|
3631
|
+
</xsl:attribute>
|
3632
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3633
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3634
|
+
</xsl:if>
|
3635
|
+
<xsl:if test="@colspan">
|
3636
|
+
<xsl:attribute name="number-columns-spanned">
|
3637
|
+
<xsl:value-of select="@colspan"/>
|
3638
|
+
</xsl:attribute>
|
3639
|
+
</xsl:if>
|
3640
|
+
<xsl:if test="@rowspan">
|
3641
|
+
<xsl:attribute name="number-rows-spanned">
|
3642
|
+
<xsl:value-of select="@rowspan"/>
|
3643
|
+
</xsl:attribute>
|
3644
|
+
</xsl:if>
|
3645
|
+
<xsl:call-template name="display-align"/>
|
3646
|
+
|
3647
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3648
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3649
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3650
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3651
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3652
|
+
</xsl:if>
|
3653
|
+
</xsl:if> -->
|
3654
|
+
<!-- 2nd line and below -->
|
3655
|
+
|
3656
|
+
<fo:block>
|
3657
|
+
<xsl:apply-templates/>
|
3658
|
+
</fo:block>
|
3659
|
+
</fo:table-cell>
|
3660
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3661
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3662
|
+
<xsl:apply-templates/>
|
3663
|
+
</fo:block>
|
3664
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3665
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3666
|
+
<xsl:apply-templates/>
|
3667
|
+
</fo:block>
|
3187
3668
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
3188
3669
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
3189
3670
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3203,12 +3684,13 @@
|
|
3203
3684
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3204
3685
|
|
3205
3686
|
<xsl:variable name="element">
|
3206
|
-
block
|
3687
|
+
block
|
3207
3688
|
|
3689
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3208
3690
|
</xsl:variable>
|
3209
3691
|
|
3210
3692
|
<xsl:choose>
|
3211
|
-
<xsl:when test="normalize-space($element)
|
3693
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3212
3694
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3213
3695
|
<xsl:apply-templates/>
|
3214
3696
|
</fo:block>
|
@@ -3245,25 +3727,44 @@
|
|
3245
3727
|
</xsl:otherwise>
|
3246
3728
|
</xsl:choose>
|
3247
3729
|
|
3248
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3249
|
-
|
3730
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3731
|
+
|
3732
|
+
<xsl:variable name="element">
|
3733
|
+
block
|
3250
3734
|
|
3251
|
-
|
3252
|
-
|
3735
|
+
</xsl:variable>
|
3736
|
+
<xsl:choose>
|
3737
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3738
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3739
|
+
|
3740
|
+
<xsl:apply-templates/>
|
3741
|
+
</fo:block>
|
3742
|
+
</xsl:when>
|
3743
|
+
<xsl:otherwise>
|
3744
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3745
|
+
<xsl:apply-templates/>
|
3746
|
+
</fo:inline>
|
3747
|
+
</xsl:otherwise>
|
3748
|
+
</xsl:choose>
|
3253
3749
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3254
3750
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3255
3751
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3256
3752
|
<xsl:variable name="termsource_text">
|
3257
3753
|
<xsl:apply-templates/>
|
3258
3754
|
</xsl:variable>
|
3755
|
+
|
3259
3756
|
<xsl:choose>
|
3260
3757
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3261
3758
|
<xsl:apply-templates/>
|
3262
3759
|
</xsl:when>
|
3263
|
-
<xsl:otherwise>
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3760
|
+
<xsl:otherwise>
|
3761
|
+
|
3762
|
+
<xsl:text>[</xsl:text>
|
3763
|
+
|
3764
|
+
<xsl:apply-templates/>
|
3765
|
+
|
3766
|
+
<xsl:text>]</xsl:text>
|
3767
|
+
|
3267
3768
|
</xsl:otherwise>
|
3268
3769
|
</xsl:choose>
|
3269
3770
|
</fo:block>
|
@@ -3284,18 +3785,31 @@
|
|
3284
3785
|
<xsl:if test="normalize-space() != ''">
|
3285
3786
|
<xsl:value-of select="."/>
|
3286
3787
|
</xsl:if>
|
3287
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3788
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3789
|
+
<fo:block-container margin-left="0mm">
|
3790
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3791
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3792
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3793
|
+
</xsl:if>
|
3794
|
+
</xsl:if>
|
3795
|
+
|
3796
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3797
|
+
|
3798
|
+
<fo:block-container margin-left="0mm">
|
3288
3799
|
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
|
3293
|
-
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3297
|
-
|
3298
|
-
|
3800
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3801
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3802
|
+
</fo:block>
|
3803
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3804
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3805
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3806
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3807
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3808
|
+
</fo:block>
|
3809
|
+
</xsl:if>
|
3810
|
+
|
3811
|
+
</fo:block-container>
|
3812
|
+
</fo:block-container>
|
3299
3813
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3300
3814
|
<xsl:if test="../*[local-name() = 'author']">
|
3301
3815
|
<xsl:text>, </xsl:text>
|
@@ -3323,6 +3837,7 @@
|
|
3323
3837
|
<xsl:if test="@type = 'inline'">
|
3324
3838
|
|
3325
3839
|
|
3840
|
+
|
3326
3841
|
</xsl:if>
|
3327
3842
|
|
3328
3843
|
|
@@ -3355,6 +3870,7 @@
|
|
3355
3870
|
|
3356
3871
|
|
3357
3872
|
|
3873
|
+
|
3358
3874
|
</xsl:variable>
|
3359
3875
|
|
3360
3876
|
<xsl:variable name="padding-right">
|
@@ -3456,7 +3972,7 @@
|
|
3456
3972
|
<fo:block id="{@id}">
|
3457
3973
|
<xsl:apply-templates/>
|
3458
3974
|
</fo:block>
|
3459
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
3975
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3460
3976
|
|
3461
3977
|
<fo:block id="{@id}">
|
3462
3978
|
<xsl:apply-templates/>
|
@@ -3474,6 +3990,32 @@
|
|
3474
3990
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3475
3991
|
<!-- 0xA0 to space replacement -->
|
3476
3992
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3993
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3994
|
+
<xsl:choose>
|
3995
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3996
|
+
<fo:block-container>
|
3997
|
+
<xsl:attribute name="margin-left">
|
3998
|
+
<xsl:choose>
|
3999
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4000
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4001
|
+
</xsl:choose>
|
4002
|
+
</xsl:attribute>
|
4003
|
+
|
4004
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4005
|
+
|
4006
|
+
<fo:block-container margin-left="0mm">
|
4007
|
+
<fo:block>
|
4008
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4009
|
+
</fo:block>
|
4010
|
+
</fo:block-container>
|
4011
|
+
</fo:block-container>
|
4012
|
+
</xsl:when>
|
4013
|
+
<xsl:otherwise>
|
4014
|
+
<fo:block>
|
4015
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4016
|
+
</fo:block>
|
4017
|
+
</xsl:otherwise>
|
4018
|
+
</xsl:choose>
|
3477
4019
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3478
4020
|
<!-- <row>
|
3479
4021
|
<date>05-07-2013</date>
|
@@ -3505,6 +4047,65 @@
|
|
3505
4047
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3506
4048
|
<fo:block><xsl:apply-templates/></fo:block>
|
3507
4049
|
</fo:table-cell>
|
4050
|
+
</xsl:template><xsl:template name="processBibitem">
|
4051
|
+
|
4052
|
+
|
4053
|
+
|
4054
|
+
|
4055
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4056
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
4057
|
+
<xsl:choose>
|
4058
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4059
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4060
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4061
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4062
|
+
</xsl:if>
|
4063
|
+
<xsl:value-of select="$_doc_ident"/>
|
4064
|
+
</xsl:when>
|
4065
|
+
<xsl:otherwise>
|
4066
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4067
|
+
<xsl:if test="$type != ''">
|
4068
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4069
|
+
</xsl:if>
|
4070
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4071
|
+
</xsl:otherwise>
|
4072
|
+
</xsl:choose>
|
4073
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4074
|
+
<xsl:choose>
|
4075
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4076
|
+
<author>
|
4077
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4078
|
+
</author>
|
4079
|
+
</xsl:when>
|
4080
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4081
|
+
<author>
|
4082
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4083
|
+
<xsl:text> </xsl:text>
|
4084
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4085
|
+
</author>
|
4086
|
+
</xsl:when>
|
4087
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4088
|
+
<author>
|
4089
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4090
|
+
<xsl:text> </xsl:text>
|
4091
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4092
|
+
</author>
|
4093
|
+
</xsl:when>
|
4094
|
+
<xsl:otherwise>
|
4095
|
+
<xsl:apply-templates/>
|
4096
|
+
</xsl:otherwise>
|
4097
|
+
</xsl:choose>
|
4098
|
+
</xsl:template><xsl:template name="renderDate">
|
4099
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4100
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4101
|
+
</xsl:if>
|
4102
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4103
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4104
|
+
</xsl:if>
|
4105
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4106
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4107
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4108
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3508
4109
|
</xsl:template><xsl:template name="convertDate">
|
3509
4110
|
<xsl:param name="date"/>
|
3510
4111
|
<xsl:param name="format" select="'short'"/>
|
@@ -3710,7 +4311,9 @@
|
|
3710
4311
|
|
3711
4312
|
|
3712
4313
|
<xsl:value-of select="document('')//*/namespace::gb"/>
|
3713
|
-
|
4314
|
+
|
4315
|
+
|
4316
|
+
|
3714
4317
|
</xsl:variable>
|
3715
4318
|
<xsl:if test="$documentNS != $XSLNS">
|
3716
4319
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3736,4 +4339,21 @@
|
|
3736
4339
|
</xsl:otherwise>
|
3737
4340
|
</xsl:choose>
|
3738
4341
|
</xsl:attribute>
|
4342
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4343
|
+
<xsl:param name="text"/>
|
4344
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4345
|
+
<xsl:if test="string-length($text) > 0">
|
4346
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4347
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4348
|
+
<xsl:if test="$char = '®'">
|
4349
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4350
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4351
|
+
</xsl:if>
|
4352
|
+
<xsl:value-of select="$char"/>
|
4353
|
+
</fo:inline>
|
4354
|
+
<xsl:call-template name="add-letter-spacing">
|
4355
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4356
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4357
|
+
</xsl:call-template>
|
4358
|
+
</xsl:if>
|
3739
4359
|
</xsl:template></xsl:stylesheet>
|