metanorma-mpfa 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asciidoctor/mpfa/basicdoc.rng +31 -1
- data/lib/asciidoctor/mpfa/converter.rb +5 -0
- data/lib/asciidoctor/mpfa/isodoc.rng +108 -8
- data/lib/isodoc/mpfa/html/rsd.css +16 -4
- data/lib/isodoc/mpfa/html/rsd.scss +18 -4
- data/lib/isodoc/mpfa/mpfd.circular.xsl +3776 -0
- data/lib/isodoc/mpfa/mpfd.compliance-standards-for-mpf-trustees.xsl +3776 -0
- data/lib/isodoc/mpfa/mpfd.guidelines.xsl +3776 -0
- data/lib/isodoc/mpfa/mpfd.standards.xsl +3776 -0
- data/lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl +3776 -0
- data/lib/isodoc/mpfa/pdf_convert.rb +23 -0
- data/lib/metanorma-mpfa.rb +1 -0
- data/lib/metanorma/mpfa/processor.rb +4 -1
- data/lib/metanorma/mpfa/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae4dfa96623980717b0d0aa5cab95bb85b8e2783cc3f2f7d150bfbd935fc9f34
|
|
4
|
+
data.tar.gz: 8821d201deb2309b37fa71a1dd11201fe40e4341302750209d22cd1972f6f081
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 360c28eb4430f1decbf67e28afa792958ae2bb191757efc1e11259e64000e86d926c35c082313357c65d120e27d2ac3e1c2224b522b9275c5572310e3b39aec3
|
|
7
|
+
data.tar.gz: 2d6839910d73e8da3b1b7549cc4baffbddb347695acff7619f361f4c4660848bfa3389d4c23da945ac6567097130bcba959752db0b1570cdd0dfd867bbaa4148
|
|
@@ -158,7 +158,17 @@
|
|
|
158
158
|
<data type="ID"/>
|
|
159
159
|
</attribute>
|
|
160
160
|
<oneOrMore>
|
|
161
|
-
<
|
|
161
|
+
<choice>
|
|
162
|
+
<ref name="formula"/>
|
|
163
|
+
<ref name="ul"/>
|
|
164
|
+
<ref name="ol"/>
|
|
165
|
+
<ref name="dl"/>
|
|
166
|
+
<ref name="quote"/>
|
|
167
|
+
<ref name="sourcecode"/>
|
|
168
|
+
<ref name="paragraph"/>
|
|
169
|
+
<ref name="table"/>
|
|
170
|
+
<ref name="figure"/>
|
|
171
|
+
</choice>
|
|
162
172
|
</oneOrMore>
|
|
163
173
|
</element>
|
|
164
174
|
</define>
|
|
@@ -402,6 +412,16 @@
|
|
|
402
412
|
</choice>
|
|
403
413
|
</attribute>
|
|
404
414
|
</optional>
|
|
415
|
+
<optional>
|
|
416
|
+
<attribute name="valign">
|
|
417
|
+
<choice>
|
|
418
|
+
<value>top</value>
|
|
419
|
+
<value>middle</value>
|
|
420
|
+
<value>bottom</value>
|
|
421
|
+
<value>baseline</value>
|
|
422
|
+
</choice>
|
|
423
|
+
</attribute>
|
|
424
|
+
</optional>
|
|
405
425
|
<choice>
|
|
406
426
|
<zeroOrMore>
|
|
407
427
|
<ref name="TextElement"/>
|
|
@@ -429,6 +449,16 @@
|
|
|
429
449
|
</choice>
|
|
430
450
|
</attribute>
|
|
431
451
|
</optional>
|
|
452
|
+
<optional>
|
|
453
|
+
<attribute name="valign">
|
|
454
|
+
<choice>
|
|
455
|
+
<value>top</value>
|
|
456
|
+
<value>middle</value>
|
|
457
|
+
<value>bottom</value>
|
|
458
|
+
<value>baseline</value>
|
|
459
|
+
</choice>
|
|
460
|
+
</attribute>
|
|
461
|
+
</optional>
|
|
432
462
|
<choice>
|
|
433
463
|
<zeroOrMore>
|
|
434
464
|
<ref name="TextElement"/>
|
|
@@ -56,6 +56,7 @@ module Asciidoctor
|
|
|
56
56
|
presentation_xml_converter(node).convert(@filename + ".xml")
|
|
57
57
|
html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
|
|
58
58
|
doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
|
|
59
|
+
pdf_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
|
|
59
60
|
end
|
|
60
61
|
|
|
61
62
|
def validate(doc)
|
|
@@ -79,6 +80,10 @@ module Asciidoctor
|
|
|
79
80
|
def doc_converter(node)
|
|
80
81
|
IsoDoc::MPFA::WordConvert.new(doc_extract_attributes(node))
|
|
81
82
|
end
|
|
83
|
+
|
|
84
|
+
def pdf_converter(node)
|
|
85
|
+
IsoDoc::MPFA::PdfConvert.new(doc_extract_attributes(node))
|
|
86
|
+
end
|
|
82
87
|
end
|
|
83
88
|
end
|
|
84
89
|
end
|
|
@@ -581,6 +581,8 @@
|
|
|
581
581
|
<ref name="ol"/>
|
|
582
582
|
<ref name="dl"/>
|
|
583
583
|
<ref name="formula"/>
|
|
584
|
+
<ref name="quote"/>
|
|
585
|
+
<ref name="sourcecode"/>
|
|
584
586
|
</choice>
|
|
585
587
|
</oneOrMore>
|
|
586
588
|
</element>
|
|
@@ -664,6 +666,16 @@
|
|
|
664
666
|
</choice>
|
|
665
667
|
</attribute>
|
|
666
668
|
</optional>
|
|
669
|
+
<optional>
|
|
670
|
+
<attribute name="valign">
|
|
671
|
+
<choice>
|
|
672
|
+
<value>top</value>
|
|
673
|
+
<value>middle</value>
|
|
674
|
+
<value>bottom</value>
|
|
675
|
+
<value>baseline</value>
|
|
676
|
+
</choice>
|
|
677
|
+
</attribute>
|
|
678
|
+
</optional>
|
|
667
679
|
<choice>
|
|
668
680
|
<zeroOrMore>
|
|
669
681
|
<choice>
|
|
@@ -700,6 +712,16 @@
|
|
|
700
712
|
</choice>
|
|
701
713
|
</attribute>
|
|
702
714
|
</optional>
|
|
715
|
+
<optional>
|
|
716
|
+
<attribute name="valign">
|
|
717
|
+
<choice>
|
|
718
|
+
<value>top</value>
|
|
719
|
+
<value>middle</value>
|
|
720
|
+
<value>bottom</value>
|
|
721
|
+
<value>baseline</value>
|
|
722
|
+
</choice>
|
|
723
|
+
</attribute>
|
|
724
|
+
</optional>
|
|
703
725
|
<choice>
|
|
704
726
|
<zeroOrMore>
|
|
705
727
|
<choice>
|
|
@@ -1052,14 +1074,17 @@
|
|
|
1052
1074
|
<ref name="section-title"/>
|
|
1053
1075
|
</optional>
|
|
1054
1076
|
<group>
|
|
1055
|
-
<
|
|
1056
|
-
<
|
|
1057
|
-
<
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
<
|
|
1061
|
-
|
|
1062
|
-
|
|
1077
|
+
<choice>
|
|
1078
|
+
<group>
|
|
1079
|
+
<zeroOrMore>
|
|
1080
|
+
<ref name="BasicBlock"/>
|
|
1081
|
+
</zeroOrMore>
|
|
1082
|
+
<zeroOrMore>
|
|
1083
|
+
<ref name="note"/>
|
|
1084
|
+
</zeroOrMore>
|
|
1085
|
+
</group>
|
|
1086
|
+
<ref name="amend"/>
|
|
1087
|
+
</choice>
|
|
1063
1088
|
<zeroOrMore>
|
|
1064
1089
|
<choice>
|
|
1065
1090
|
<ref name="clause-subsection"/>
|
|
@@ -1510,4 +1535,79 @@
|
|
|
1510
1535
|
<ref name="CitationType"/>
|
|
1511
1536
|
</element>
|
|
1512
1537
|
</define>
|
|
1538
|
+
<define name="amend">
|
|
1539
|
+
<element name="amend">
|
|
1540
|
+
<optional>
|
|
1541
|
+
<attribute name="id">
|
|
1542
|
+
<data type="ID"/>
|
|
1543
|
+
</attribute>
|
|
1544
|
+
</optional>
|
|
1545
|
+
<attribute name="change">
|
|
1546
|
+
<choice>
|
|
1547
|
+
<value>add</value>
|
|
1548
|
+
<value>modify</value>
|
|
1549
|
+
<value>delete</value>
|
|
1550
|
+
</choice>
|
|
1551
|
+
</attribute>
|
|
1552
|
+
<optional>
|
|
1553
|
+
<attribute name="path"/>
|
|
1554
|
+
</optional>
|
|
1555
|
+
<optional>
|
|
1556
|
+
<attribute name="path_end"/>
|
|
1557
|
+
</optional>
|
|
1558
|
+
<optional>
|
|
1559
|
+
<attribute name="title"/>
|
|
1560
|
+
</optional>
|
|
1561
|
+
<optional>
|
|
1562
|
+
<element name="location">
|
|
1563
|
+
<zeroOrMore>
|
|
1564
|
+
<ref name="locality"/>
|
|
1565
|
+
</zeroOrMore>
|
|
1566
|
+
</element>
|
|
1567
|
+
</optional>
|
|
1568
|
+
<zeroOrMore>
|
|
1569
|
+
<ref name="autonumber"/>
|
|
1570
|
+
</zeroOrMore>
|
|
1571
|
+
<optional>
|
|
1572
|
+
<element name="description">
|
|
1573
|
+
<zeroOrMore>
|
|
1574
|
+
<ref name="BasicBlock"/>
|
|
1575
|
+
</zeroOrMore>
|
|
1576
|
+
</element>
|
|
1577
|
+
</optional>
|
|
1578
|
+
<optional>
|
|
1579
|
+
<element name="newcontent">
|
|
1580
|
+
<zeroOrMore>
|
|
1581
|
+
<ref name="BasicBlock"/>
|
|
1582
|
+
</zeroOrMore>
|
|
1583
|
+
</element>
|
|
1584
|
+
</optional>
|
|
1585
|
+
<optional>
|
|
1586
|
+
<element name="description">
|
|
1587
|
+
<zeroOrMore>
|
|
1588
|
+
<ref name="BasicBlock"/>
|
|
1589
|
+
</zeroOrMore>
|
|
1590
|
+
</element>
|
|
1591
|
+
</optional>
|
|
1592
|
+
</element>
|
|
1593
|
+
</define>
|
|
1594
|
+
<define name="autonumber">
|
|
1595
|
+
<element name="autonumber">
|
|
1596
|
+
<attribute name="type">
|
|
1597
|
+
<choice>
|
|
1598
|
+
<value>requirement</value>
|
|
1599
|
+
<value>recommendation</value>
|
|
1600
|
+
<value>permission</value>
|
|
1601
|
+
<value>table</value>
|
|
1602
|
+
<value>figure</value>
|
|
1603
|
+
<value>admonition</value>
|
|
1604
|
+
<value>formula</value>
|
|
1605
|
+
<value>sourcecode</value>
|
|
1606
|
+
<value>example</value>
|
|
1607
|
+
<value>note</value>
|
|
1608
|
+
</choice>
|
|
1609
|
+
</attribute>
|
|
1610
|
+
<text/>
|
|
1611
|
+
</element>
|
|
1612
|
+
</define>
|
|
1513
1613
|
</grammar>
|
|
@@ -670,7 +670,7 @@ div.WordSection2 {
|
|
|
670
670
|
div.WordSection3 {
|
|
671
671
|
page: WordSection3; }
|
|
672
672
|
|
|
673
|
-
table.MsoISOTable {
|
|
673
|
+
table.MsoISOTable, table.MsoISOTableBig {
|
|
674
674
|
mso-style-name: "Table ISO";
|
|
675
675
|
mso-tstyle-rowband-size: 0;
|
|
676
676
|
mso-tstyle-colband-size: 0;
|
|
@@ -691,17 +691,17 @@ table.MsoISOTable {
|
|
|
691
691
|
font-size: 10.0pt;
|
|
692
692
|
font-family: {{bodyfont}}; }
|
|
693
693
|
|
|
694
|
-
table.MsoISOTable th {
|
|
694
|
+
table.MsoISOTable th, table.MsoISOTableBig th {
|
|
695
695
|
border: solid windowtext 1pt;
|
|
696
696
|
mso-border-alt: solid windowtext 1pt;
|
|
697
697
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
|
698
698
|
|
|
699
|
-
table.MsoISOTable td {
|
|
699
|
+
table.MsoISOTable td, table.MsoISOTableBig td {
|
|
700
700
|
border: solid windowtext 1pt;
|
|
701
701
|
mso-border-alt: solid windowtext 1pt;
|
|
702
702
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
|
703
703
|
|
|
704
|
-
table.MsoISOTable p {
|
|
704
|
+
table.MsoISOTable p, table.MsoISOTableBig p {
|
|
705
705
|
font-size: 10.0pt; }
|
|
706
706
|
|
|
707
707
|
table.MsoTableGrid {
|
|
@@ -788,8 +788,20 @@ div.example p.MsoListParagraph {
|
|
|
788
788
|
font-size: 10.0pt; }
|
|
789
789
|
|
|
790
790
|
div.Note p.MsoListParagraph {
|
|
791
|
+
font-size: 10.0pt;
|
|
792
|
+
margin-left: 1.0cm; }
|
|
793
|
+
|
|
794
|
+
div.Note span.stem {
|
|
791
795
|
font-size: 10.0pt; }
|
|
792
796
|
|
|
797
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
|
798
|
+
font-size: 8.0pt;
|
|
799
|
+
margin-left: 1.0cm; }
|
|
800
|
+
|
|
801
|
+
div.Note table.dl {
|
|
802
|
+
font-size: 10.0pt;
|
|
803
|
+
margin-left: 1.0cm; }
|
|
804
|
+
|
|
793
805
|
span.note_label, span.example_label, td.example_label, td.note_label {
|
|
794
806
|
font-size: 10.0pt;
|
|
795
807
|
font-family: {{bodyfont}}; }
|
|
@@ -633,7 +633,7 @@ div.WordSection2
|
|
|
633
633
|
mso-paper-source:0;}
|
|
634
634
|
div.WordSection3
|
|
635
635
|
{page:WordSection3;}
|
|
636
|
-
table.MsoISOTable
|
|
636
|
+
table.MsoISOTable, table.MsoISOTableBig
|
|
637
637
|
{mso-style-name:"Table ISO";
|
|
638
638
|
mso-tstyle-rowband-size:0;
|
|
639
639
|
mso-tstyle-colband-size:0;
|
|
@@ -653,15 +653,15 @@ table.MsoISOTable
|
|
|
653
653
|
mso-border-insidev:.75pt solid windowtext;
|
|
654
654
|
font-size:10.0pt;
|
|
655
655
|
font-family:$bodyfont;}
|
|
656
|
-
table.MsoISOTable th
|
|
656
|
+
table.MsoISOTable th, table.MsoISOTableBig th
|
|
657
657
|
{border:solid windowtext 1pt;
|
|
658
658
|
mso-border-alt:solid windowtext 1pt;
|
|
659
659
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
|
660
|
-
table.MsoISOTable td
|
|
660
|
+
table.MsoISOTable td, table.MsoISOTableBig td
|
|
661
661
|
{border:solid windowtext 1pt;
|
|
662
662
|
mso-border-alt:solid windowtext 1pt;
|
|
663
663
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
|
664
|
-
table.MsoISOTable p
|
|
664
|
+
table.MsoISOTable p, table.MsoISOTableBig p
|
|
665
665
|
{font-size:10.0pt; }
|
|
666
666
|
table.MsoTableGrid
|
|
667
667
|
{mso-style-name:"Table Grid";
|
|
@@ -747,6 +747,20 @@ div.example p.MsoListParagraph {
|
|
|
747
747
|
|
|
748
748
|
div.Note p.MsoListParagraph {
|
|
749
749
|
font-size: 10.0pt;
|
|
750
|
+
margin-left: 1.0cm;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
div.Note span.stem {
|
|
754
|
+
font-size: 10.0pt; }
|
|
755
|
+
|
|
756
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
|
757
|
+
font-size: 8.0pt;
|
|
758
|
+
margin-left: 1.0cm;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
div.Note table.dl {
|
|
762
|
+
font-size: 10.0pt;
|
|
763
|
+
margin-left: 1.0cm;
|
|
750
764
|
}
|
|
751
765
|
|
|
752
766
|
span.note_label, span.example_label, td.example_label, td.note_label
|
|
@@ -0,0 +1,3776 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:mpfd="https://www.metanorma.org/ns/mpfd" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
|
|
2
|
+
|
|
3
|
+
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
|
4
|
+
|
|
5
|
+
<xsl:param name="svg_images"/>
|
|
6
|
+
<xsl:variable name="images" select="document($svg_images)"/>
|
|
7
|
+
|
|
8
|
+
<xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<xsl:variable name="debug">false</xsl:variable>
|
|
13
|
+
<xsl:variable name="pageWidth" select="'210mm'"/>
|
|
14
|
+
<xsl:variable name="pageHeight" select="'297mm'"/>
|
|
15
|
+
|
|
16
|
+
<xsl:variable name="copyrightHolder">Ribose Group Inc.</xsl:variable>
|
|
17
|
+
|
|
18
|
+
<xsl:variable name="copyright">
|
|
19
|
+
<xsl:text>© </xsl:text>
|
|
20
|
+
<xsl:value-of select="$copyrightHolder"/>
|
|
21
|
+
<xsl:text> </xsl:text>
|
|
22
|
+
<xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:copyright/mpfd:from"/>
|
|
23
|
+
<xsl:text> – All rights reserved</xsl:text>
|
|
24
|
+
</xsl:variable>
|
|
25
|
+
|
|
26
|
+
<xsl:variable name="docidentifier" select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:docidentifier"/>
|
|
27
|
+
<xsl:variable name="copyrightShort">
|
|
28
|
+
<xsl:value-of select="$copyrightHolder"/>
|
|
29
|
+
<xsl:text> </xsl:text>
|
|
30
|
+
<xsl:value-of select="$docidentifier"/>
|
|
31
|
+
<xsl:text>:</xsl:text>
|
|
32
|
+
<xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:copyright/mpfd:from"/>
|
|
33
|
+
</xsl:variable>
|
|
34
|
+
|
|
35
|
+
<xsl:variable name="title-en" select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:title[@language = 'en']"/>
|
|
36
|
+
<!-- Example:
|
|
37
|
+
<item level="1" id="Foreword" display="true">Foreword</item>
|
|
38
|
+
<item id="term-script" display="false">3.2</item>
|
|
39
|
+
-->
|
|
40
|
+
<xsl:variable name="contents">
|
|
41
|
+
<contents>
|
|
42
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/*[not(local-name() = 'terms')]" mode="contents"/>
|
|
43
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/mpfd:terms" mode="contents"/>
|
|
44
|
+
|
|
45
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:sections/*" mode="contents"/>
|
|
46
|
+
|
|
47
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:annex" mode="contents"/>
|
|
48
|
+
|
|
49
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:bibliography" mode="contents"/>
|
|
50
|
+
|
|
51
|
+
</contents>
|
|
52
|
+
</xsl:variable>
|
|
53
|
+
|
|
54
|
+
<xsl:variable name="lang">
|
|
55
|
+
<xsl:call-template name="getLang"/>
|
|
56
|
+
</xsl:variable>
|
|
57
|
+
|
|
58
|
+
<xsl:template match="/">
|
|
59
|
+
<xsl:call-template name="namespaceCheck"/>
|
|
60
|
+
<fo:root font-family="Arial" font-size="10.5pt" xml:lang="{$lang}">
|
|
61
|
+
<fo:layout-master-set>
|
|
62
|
+
|
|
63
|
+
<!-- cover page -->
|
|
64
|
+
<fo:simple-page-master master-name="cover" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
65
|
+
<fo:region-body margin-top="24mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
|
|
66
|
+
<fo:region-before region-name="cover-header" extent="24mm"/>
|
|
67
|
+
<fo:region-after region-name="footer" extent="10mm"/>
|
|
68
|
+
<fo:region-start region-name="left-region" extent="19mm"/>
|
|
69
|
+
<fo:region-end region-name="right-region" extent="19mm"/>
|
|
70
|
+
</fo:simple-page-master>
|
|
71
|
+
|
|
72
|
+
<!-- document pages -->
|
|
73
|
+
<fo:simple-page-master master-name="odd" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
74
|
+
<fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
|
|
75
|
+
<fo:region-before region-name="header-odd" extent="16.5mm"/>
|
|
76
|
+
<fo:region-after region-name="footer-odd" extent="10mm"/>
|
|
77
|
+
<fo:region-start region-name="left-region" extent="19mm"/>
|
|
78
|
+
<fo:region-end region-name="right-region" extent="19mm"/>
|
|
79
|
+
</fo:simple-page-master>
|
|
80
|
+
<fo:simple-page-master master-name="even" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
81
|
+
<fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
|
|
82
|
+
<fo:region-before region-name="header-even" extent="16.5mm"/>
|
|
83
|
+
<fo:region-after region-name="footer-even" extent="10mm"/>
|
|
84
|
+
<fo:region-start region-name="left-region" extent="19mm"/>
|
|
85
|
+
<fo:region-end region-name="right-region" extent="19mm"/>
|
|
86
|
+
</fo:simple-page-master>
|
|
87
|
+
|
|
88
|
+
<fo:page-sequence-master master-name="document">
|
|
89
|
+
<fo:repeatable-page-master-alternatives>
|
|
90
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
|
91
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
|
92
|
+
</fo:repeatable-page-master-alternatives>
|
|
93
|
+
</fo:page-sequence-master>
|
|
94
|
+
|
|
95
|
+
</fo:layout-master-set>
|
|
96
|
+
|
|
97
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
|
98
|
+
|
|
99
|
+
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
|
100
|
+
<fo:static-content flow-name="cover-header">
|
|
101
|
+
<fo:block-container height="100%">
|
|
102
|
+
<fo:block font-size="10pt" padding-top="12.5mm">
|
|
103
|
+
<xsl:value-of select="$copyright"/>
|
|
104
|
+
</fo:block>
|
|
105
|
+
</fo:block-container>
|
|
106
|
+
</fo:static-content>
|
|
107
|
+
<fo:flow flow-name="xsl-region-body">
|
|
108
|
+
<xsl:if test="normalize-space($docidentifier) != ''">
|
|
109
|
+
<fo:block font-size="14pt" text-align="right" font-weight="bold" margin-bottom="12pt">
|
|
110
|
+
<xsl:value-of select="$docidentifier"/>
|
|
111
|
+
<xsl:if test="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:draft">
|
|
112
|
+
<xsl:text> (</xsl:text>
|
|
113
|
+
<xsl:text>draft </xsl:text>
|
|
114
|
+
<xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:draft"/>
|
|
115
|
+
<xsl:text>, </xsl:text>
|
|
116
|
+
<xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:revision-date"/>
|
|
117
|
+
<xsl:text>)</xsl:text>
|
|
118
|
+
</xsl:if>
|
|
119
|
+
</fo:block>
|
|
120
|
+
</xsl:if>
|
|
121
|
+
<fo:block>
|
|
122
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-MPFD-Logo))}" width="13.2mm" content-height="13mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image MPFD Logo"/>
|
|
123
|
+
</fo:block>
|
|
124
|
+
<fo:block-container text-align="center">
|
|
125
|
+
<fo:block>
|
|
126
|
+
<fo:inline font-size="24pt" font-weight="bold">
|
|
127
|
+
<xsl:call-template name="capitalizeWords">
|
|
128
|
+
<xsl:with-param name="str" select="java:replaceAll(java:java.lang.String.new(/mpfd:mpfd-standard/mpfd:bibdata/mpfd:ext/mpfd:doctype),'MPF','')"/>
|
|
129
|
+
</xsl:call-template>
|
|
130
|
+
</fo:inline>
|
|
131
|
+
<xsl:value-of select="$linebreak"/>
|
|
132
|
+
<fo:inline font-size="16pt"><xsl:value-of select="$title-en"/></fo:inline>
|
|
133
|
+
</fo:block>
|
|
134
|
+
</fo:block-container>
|
|
135
|
+
<fo:block margin-bottom="12pt"> </fo:block>
|
|
136
|
+
<fo:block-container text-align="center" border="0.5pt solid black" margin-bottom="12pt">
|
|
137
|
+
<fo:block font-size="16pt" margin-bottom="12pt" padding-top="1mm">
|
|
138
|
+
<xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:edition"/>
|
|
139
|
+
<xsl:text> </xsl:text>
|
|
140
|
+
<xsl:call-template name="getTitle">
|
|
141
|
+
<xsl:with-param name="name" select="'title-edition'"/>
|
|
142
|
+
</xsl:call-template>
|
|
143
|
+
<xsl:value-of select="$linebreak"/>
|
|
144
|
+
<xsl:call-template name="formatDate">
|
|
145
|
+
<xsl:with-param name="date" select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:revision-date"/>
|
|
146
|
+
</xsl:call-template>
|
|
147
|
+
</fo:block>
|
|
148
|
+
<fo:block>Hong Kong</fo:block>
|
|
149
|
+
</fo:block-container>
|
|
150
|
+
<fo:block margin-bottom="12pt"> </fo:block>
|
|
151
|
+
<fo:block text-align="center">Ribose Group Inc. <xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:copyright/mpfd:from"/></fo:block>
|
|
152
|
+
</fo:flow>
|
|
153
|
+
</fo:page-sequence>
|
|
154
|
+
|
|
155
|
+
<fo:page-sequence master-reference="document" initial-page-number="2" format="i" force-page-count="no-force">
|
|
156
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
|
157
|
+
<fo:flow flow-name="xsl-region-body">
|
|
158
|
+
|
|
159
|
+
<xsl:if test="$debug = 'true'">
|
|
160
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
|
161
|
+
DEBUG
|
|
162
|
+
contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
|
|
163
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
|
164
|
+
</xsl:if>
|
|
165
|
+
<!-- Table of content -->
|
|
166
|
+
<fo:block-container font-weight="bold">
|
|
167
|
+
<xsl:variable name="title-toc">
|
|
168
|
+
<xsl:call-template name="getTitle">
|
|
169
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
|
170
|
+
</xsl:call-template>
|
|
171
|
+
</xsl:variable>
|
|
172
|
+
<fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
|
173
|
+
<fo:block line-height="115%">
|
|
174
|
+
<xsl:for-each select="xalan:nodeset($contents)//item">
|
|
175
|
+
<fo:block>
|
|
176
|
+
<xsl:if test="@level = 1">
|
|
177
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
178
|
+
</xsl:if>
|
|
179
|
+
<fo:list-block provisional-label-separation="3mm">
|
|
180
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
|
181
|
+
<xsl:choose>
|
|
182
|
+
<xsl:when test="@section != ''">7mm</xsl:when>
|
|
183
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
|
184
|
+
</xsl:choose>
|
|
185
|
+
</xsl:attribute>
|
|
186
|
+
<fo:list-item>
|
|
187
|
+
<fo:list-item-label end-indent="label-end()">
|
|
188
|
+
<fo:block>
|
|
189
|
+
<xsl:if test="@section">
|
|
190
|
+
<xsl:value-of select="@section"/>
|
|
191
|
+
</xsl:if>
|
|
192
|
+
</fo:block>
|
|
193
|
+
</fo:list-item-label>
|
|
194
|
+
<fo:list-item-body start-indent="body-start()">
|
|
195
|
+
<fo:block text-align-last="justify">
|
|
196
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="text()">
|
|
197
|
+
<xsl:apply-templates/>
|
|
198
|
+
<fo:inline keep-together.within-line="always">
|
|
199
|
+
<fo:leader leader-pattern="dots"/>
|
|
200
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
|
201
|
+
</fo:inline>
|
|
202
|
+
</fo:basic-link>
|
|
203
|
+
</fo:block>
|
|
204
|
+
</fo:list-item-body>
|
|
205
|
+
</fo:list-item>
|
|
206
|
+
</fo:list-block>
|
|
207
|
+
</fo:block>
|
|
208
|
+
</xsl:for-each>
|
|
209
|
+
</fo:block>
|
|
210
|
+
</fo:block-container>
|
|
211
|
+
<xsl:if test="/mpfd:mpfd-standard/mpfd:preface/*">
|
|
212
|
+
<fo:block break-after="page"/>
|
|
213
|
+
<!-- Foreword, Introduction -->
|
|
214
|
+
<fo:block>
|
|
215
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/*[not(local-name() = 'terms')]"/>
|
|
216
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/mpfd:terms"/>
|
|
217
|
+
</fo:block>
|
|
218
|
+
</xsl:if>
|
|
219
|
+
</fo:flow>
|
|
220
|
+
</fo:page-sequence>
|
|
221
|
+
|
|
222
|
+
<fo:page-sequence master-reference="document" initial-page-number="1" format="1" force-page-count="no-force">
|
|
223
|
+
<xsl:call-template name="insertHeaderFooter">
|
|
224
|
+
<xsl:with-param name="font-weight">bold</xsl:with-param>
|
|
225
|
+
</xsl:call-template>
|
|
226
|
+
<fo:flow flow-name="xsl-region-body">
|
|
227
|
+
<fo:block-container>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt">
|
|
232
|
+
<xsl:value-of select="$title-en"/>
|
|
233
|
+
</fo:block>
|
|
234
|
+
|
|
235
|
+
<!-- Main sections -->
|
|
236
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:sections/*"/>
|
|
237
|
+
|
|
238
|
+
<!-- Annex(s) -->
|
|
239
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:annex"/>
|
|
240
|
+
|
|
241
|
+
<!-- Bibliography -->
|
|
242
|
+
<xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:bibliography"/>
|
|
243
|
+
</fo:block-container>
|
|
244
|
+
</fo:flow>
|
|
245
|
+
</fo:page-sequence>
|
|
246
|
+
</fo:root>
|
|
247
|
+
</xsl:template>
|
|
248
|
+
|
|
249
|
+
<xsl:template match="node()">
|
|
250
|
+
<xsl:apply-templates/>
|
|
251
|
+
</xsl:template>
|
|
252
|
+
|
|
253
|
+
<!-- ============================= -->
|
|
254
|
+
<!-- CONTENTS -->
|
|
255
|
+
<!-- ============================= -->
|
|
256
|
+
<xsl:template match="node()" mode="contents">
|
|
257
|
+
<xsl:apply-templates mode="contents"/>
|
|
258
|
+
</xsl:template>
|
|
259
|
+
|
|
260
|
+
<!-- element with title -->
|
|
261
|
+
<xsl:template match="*[mpfd:title]" mode="contents">
|
|
262
|
+
<xsl:variable name="level">
|
|
263
|
+
<xsl:call-template name="getLevel">
|
|
264
|
+
<xsl:with-param name="depth" select="mpfd:title/@depth"/>
|
|
265
|
+
</xsl:call-template>
|
|
266
|
+
</xsl:variable>
|
|
267
|
+
|
|
268
|
+
<xsl:variable name="section">
|
|
269
|
+
<xsl:call-template name="getSection"/>
|
|
270
|
+
</xsl:variable>
|
|
271
|
+
|
|
272
|
+
<xsl:variable name="type">
|
|
273
|
+
<xsl:value-of select="local-name()"/>
|
|
274
|
+
</xsl:variable>
|
|
275
|
+
|
|
276
|
+
<xsl:variable name="display">
|
|
277
|
+
<xsl:choose>
|
|
278
|
+
<xsl:when test="ancestor-or-self::mpfd:bibitem">false</xsl:when>
|
|
279
|
+
<xsl:when test="ancestor-or-self::mpfd:term">false</xsl:when>
|
|
280
|
+
<xsl:when test="$level >= 3">false</xsl:when>
|
|
281
|
+
<xsl:otherwise>true</xsl:otherwise>
|
|
282
|
+
</xsl:choose>
|
|
283
|
+
</xsl:variable>
|
|
284
|
+
|
|
285
|
+
<xsl:if test="$display = 'true'">
|
|
286
|
+
|
|
287
|
+
<xsl:variable name="title">
|
|
288
|
+
<xsl:call-template name="getName"/>
|
|
289
|
+
</xsl:variable>
|
|
290
|
+
|
|
291
|
+
<item level="{$level}" section="{$section}" type="{$type}">
|
|
292
|
+
<xsl:call-template name="setId"/>
|
|
293
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
|
294
|
+
</item>
|
|
295
|
+
<xsl:apply-templates mode="contents"/>
|
|
296
|
+
</xsl:if>
|
|
297
|
+
|
|
298
|
+
</xsl:template>
|
|
299
|
+
|
|
300
|
+
<xsl:template match="mpfd:br" mode="contents_item" priority="2">
|
|
301
|
+
<fo:inline> </fo:inline>
|
|
302
|
+
</xsl:template>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
<xsl:template match="mpfd:bibitem" mode="contents"/>
|
|
306
|
+
|
|
307
|
+
<xsl:template match="mpfd:references" mode="contents">
|
|
308
|
+
<xsl:apply-templates mode="contents"/>
|
|
309
|
+
</xsl:template>
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
<xsl:template name="getListItemFormat">
|
|
313
|
+
<xsl:choose>
|
|
314
|
+
<xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!--• dash -->
|
|
315
|
+
<xsl:otherwise> <!-- for ordered lists -->
|
|
316
|
+
<xsl:choose>
|
|
317
|
+
<xsl:when test="../@type = 'arabic'">
|
|
318
|
+
<xsl:number format="a)"/>
|
|
319
|
+
</xsl:when>
|
|
320
|
+
<xsl:when test="../@type = 'roman'">
|
|
321
|
+
<xsl:number format="1)"/>
|
|
322
|
+
</xsl:when>
|
|
323
|
+
<xsl:when test="../@type = 'alphabet'">
|
|
324
|
+
<xsl:number format="a)"/>
|
|
325
|
+
</xsl:when>
|
|
326
|
+
<xsl:otherwise>
|
|
327
|
+
<xsl:number format="a)"/>
|
|
328
|
+
</xsl:otherwise>
|
|
329
|
+
</xsl:choose>
|
|
330
|
+
</xsl:otherwise>
|
|
331
|
+
</xsl:choose>
|
|
332
|
+
</xsl:template>
|
|
333
|
+
|
|
334
|
+
<!-- ============================= -->
|
|
335
|
+
<!-- ============================= -->
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
<xsl:template match="mpfd:title">
|
|
340
|
+
|
|
341
|
+
<xsl:variable name="level">
|
|
342
|
+
<xsl:call-template name="getLevel"/>
|
|
343
|
+
</xsl:variable>
|
|
344
|
+
|
|
345
|
+
<xsl:variable name="font-size">
|
|
346
|
+
<xsl:choose>
|
|
347
|
+
<xsl:when test="$level = 1">13pt</xsl:when>
|
|
348
|
+
<xsl:when test="$level = 2">11pt</xsl:when>
|
|
349
|
+
<xsl:when test="$level >= 3">12pt</xsl:when>
|
|
350
|
+
<xsl:otherwise>12pt</xsl:otherwise>
|
|
351
|
+
</xsl:choose>
|
|
352
|
+
</xsl:variable>
|
|
353
|
+
|
|
354
|
+
<xsl:variable name="space-before">
|
|
355
|
+
<xsl:choose>
|
|
356
|
+
<xsl:when test="parent::mpfd:annex">0pt</xsl:when>
|
|
357
|
+
<xsl:when test="$level = 1">13.5pt</xsl:when>
|
|
358
|
+
<xsl:when test="$level >= 2">3pt</xsl:when>
|
|
359
|
+
<xsl:otherwise>6pt</xsl:otherwise>
|
|
360
|
+
</xsl:choose>
|
|
361
|
+
</xsl:variable>
|
|
362
|
+
|
|
363
|
+
<xsl:variable name="space-after">
|
|
364
|
+
<xsl:choose>
|
|
365
|
+
<xsl:when test="$level = 1">12pt</xsl:when>
|
|
366
|
+
<xsl:when test="$level >= 2">12pt</xsl:when>
|
|
367
|
+
<xsl:otherwise>6pt</xsl:otherwise>
|
|
368
|
+
</xsl:choose>
|
|
369
|
+
</xsl:variable>
|
|
370
|
+
|
|
371
|
+
<fo:block font-size="{$font-size}" color="rgb(14, 26, 133)" font-weight="bold" space-before="{$space-before}" space-after="{$space-after}" keep-with-next="always">
|
|
372
|
+
<xsl:if test="parent::mpfd:annex">
|
|
373
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
374
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
375
|
+
</xsl:if>
|
|
376
|
+
<xsl:apply-templates/>
|
|
377
|
+
</fo:block>
|
|
378
|
+
|
|
379
|
+
</xsl:template>
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
<xsl:template match="mpfd:p">
|
|
383
|
+
<xsl:param name="inline" select="'false'"/>
|
|
384
|
+
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
|
385
|
+
<xsl:variable name="element-name">
|
|
386
|
+
<xsl:choose>
|
|
387
|
+
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
|
|
388
|
+
<xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
|
389
|
+
<!-- <xsl:when test="local-name(..) = 'admonition'">fo:inline</xsl:when> -->
|
|
390
|
+
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
391
|
+
</xsl:choose>
|
|
392
|
+
</xsl:variable>
|
|
393
|
+
<xsl:element name="{$element-name}">
|
|
394
|
+
<xsl:attribute name="text-align">
|
|
395
|
+
<xsl:choose>
|
|
396
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
|
397
|
+
<xsl:when test="ancestor::mpfd:td/@align"><xsl:value-of select="ancestor::mpfd:td/@align"/></xsl:when>
|
|
398
|
+
<xsl:when test="ancestor::mpfd:th/@align"><xsl:value-of select="ancestor::mpfd:th/@align"/></xsl:when>
|
|
399
|
+
<xsl:otherwise>left</xsl:otherwise><!-- left. justify -->
|
|
400
|
+
</xsl:choose>
|
|
401
|
+
</xsl:attribute>
|
|
402
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
403
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
404
|
+
<xsl:if test="parent::mpfd:li">
|
|
405
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
406
|
+
</xsl:if>
|
|
407
|
+
<xsl:attribute name="line-height">115%</xsl:attribute>
|
|
408
|
+
<xsl:apply-templates/>
|
|
409
|
+
</xsl:element>
|
|
410
|
+
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
|
411
|
+
<xsl:choose>
|
|
412
|
+
<xsl:when test="ancestor::mpfd:annex">
|
|
413
|
+
<xsl:value-of select="$linebreak"/>
|
|
414
|
+
</xsl:when>
|
|
415
|
+
<xsl:otherwise>
|
|
416
|
+
<fo:block margin-bottom="12pt">
|
|
417
|
+
<xsl:value-of select="$linebreak"/>
|
|
418
|
+
</fo:block>
|
|
419
|
+
</xsl:otherwise>
|
|
420
|
+
</xsl:choose>
|
|
421
|
+
</xsl:if>
|
|
422
|
+
<xsl:if test="$inline = 'true'">
|
|
423
|
+
<fo:block> </fo:block>
|
|
424
|
+
</xsl:if>
|
|
425
|
+
</xsl:template>
|
|
426
|
+
|
|
427
|
+
<xsl:template match="mpfd:li//mpfd:p//text()">
|
|
428
|
+
<xsl:choose>
|
|
429
|
+
<xsl:when test="contains(., '	')">
|
|
430
|
+
<fo:inline white-space="pre"><xsl:value-of select="."/></fo:inline>
|
|
431
|
+
</xsl:when>
|
|
432
|
+
<xsl:otherwise>
|
|
433
|
+
<xsl:value-of select="."/>
|
|
434
|
+
</xsl:otherwise>
|
|
435
|
+
</xsl:choose>
|
|
436
|
+
|
|
437
|
+
</xsl:template>
|
|
438
|
+
|
|
439
|
+
<!--
|
|
440
|
+
<fn reference="1">
|
|
441
|
+
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
|
442
|
+
</fn>
|
|
443
|
+
-->
|
|
444
|
+
|
|
445
|
+
<xsl:variable name="p_fn">
|
|
446
|
+
<xsl:for-each select="//mpfd:p/mpfd:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
|
447
|
+
<!-- copy unique fn -->
|
|
448
|
+
<fn gen_id="{generate-id(.)}">
|
|
449
|
+
<xsl:copy-of select="@*"/>
|
|
450
|
+
<xsl:copy-of select="node()"/>
|
|
451
|
+
</fn>
|
|
452
|
+
</xsl:for-each>
|
|
453
|
+
</xsl:variable>
|
|
454
|
+
|
|
455
|
+
<xsl:template match="mpfd:p/mpfd:fn" priority="2">
|
|
456
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
|
457
|
+
<xsl:variable name="reference" select="@reference"/>
|
|
458
|
+
<xsl:variable name="number">
|
|
459
|
+
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
|
460
|
+
</xsl:variable>
|
|
461
|
+
<xsl:choose>
|
|
462
|
+
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
|
463
|
+
<fo:footnote>
|
|
464
|
+
<fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
|
|
465
|
+
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
|
466
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
|
467
|
+
<xsl:value-of select="$number + count(//mpfd:bibitem[ancestor::mpfd:references[@id='_normative_references' or not(preceding-sibling::mpfd:references)]]/mpfd:note)"/>
|
|
468
|
+
</fo:basic-link>
|
|
469
|
+
</fo:inline>
|
|
470
|
+
<fo:footnote-body>
|
|
471
|
+
<fo:block font-size="9pt" margin-bottom="12pt">
|
|
472
|
+
<fo:inline font-size="6pt" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super" padding-right="1mm">
|
|
473
|
+
<xsl:value-of select="$number + count(//mpfd:bibitem[ancestor::mpfd:references[@id='_normative_references' or not(preceding-sibling::mpfd:references)]]/mpfd:note)"/>
|
|
474
|
+
</fo:inline>
|
|
475
|
+
<xsl:for-each select="mpfd:p">
|
|
476
|
+
<xsl:apply-templates/>
|
|
477
|
+
</xsl:for-each>
|
|
478
|
+
</fo:block>
|
|
479
|
+
</fo:footnote-body>
|
|
480
|
+
</fo:footnote>
|
|
481
|
+
</xsl:when>
|
|
482
|
+
<xsl:otherwise>
|
|
483
|
+
<fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
|
|
484
|
+
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
|
485
|
+
<xsl:value-of select="$number + count(//mpfd:bibitem/mpfd:note)"/>
|
|
486
|
+
</fo:basic-link>
|
|
487
|
+
</fo:inline>
|
|
488
|
+
</xsl:otherwise>
|
|
489
|
+
</xsl:choose>
|
|
490
|
+
</xsl:template>
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
<xsl:template match="mpfd:bibitem">
|
|
497
|
+
<fo:block id="{@id}" margin-bottom="12pt" text-indent="-11.7mm" margin-left="11.7mm"> <!-- 12 pt -->
|
|
498
|
+
<!-- mpfd:docidentifier -->
|
|
499
|
+
<xsl:if test="mpfd:docidentifier">
|
|
500
|
+
<xsl:choose>
|
|
501
|
+
<xsl:when test="mpfd:docidentifier/@type = 'metanorma'"/>
|
|
502
|
+
<xsl:otherwise><fo:inline><xsl:value-of select="mpfd:docidentifier"/></fo:inline></xsl:otherwise>
|
|
503
|
+
</xsl:choose>
|
|
504
|
+
</xsl:if>
|
|
505
|
+
<xsl:apply-templates select="mpfd:note"/>
|
|
506
|
+
<xsl:if test="mpfd:docidentifier">, </xsl:if>
|
|
507
|
+
<fo:inline font-style="italic">
|
|
508
|
+
<xsl:choose>
|
|
509
|
+
<xsl:when test="mpfd:title[@type = 'main' and @language = 'en']">
|
|
510
|
+
<xsl:value-of select="mpfd:title[@type = 'main' and @language = 'en']"/>
|
|
511
|
+
</xsl:when>
|
|
512
|
+
<xsl:otherwise>
|
|
513
|
+
<xsl:value-of select="mpfd:title"/>
|
|
514
|
+
</xsl:otherwise>
|
|
515
|
+
</xsl:choose>
|
|
516
|
+
</fo:inline>
|
|
517
|
+
</fo:block>
|
|
518
|
+
</xsl:template>
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
<xsl:template match="mpfd:bibitem/mpfd:note">
|
|
522
|
+
<fo:footnote>
|
|
523
|
+
<xsl:variable name="number">
|
|
524
|
+
<xsl:number level="any" count="mpfd:bibitem/mpfd:note"/>
|
|
525
|
+
</xsl:variable>
|
|
526
|
+
<fo:inline font-size="7pt" keep-with-previous.within-line="always" baseline-shift="30%">
|
|
527
|
+
<fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
|
|
528
|
+
<xsl:value-of select="$number"/>
|
|
529
|
+
</fo:basic-link>
|
|
530
|
+
</fo:inline>
|
|
531
|
+
<fo:footnote-body>
|
|
532
|
+
<fo:block font-size="9pt" margin-bottom="4pt" start-indent="0pt">
|
|
533
|
+
<fo:inline font-size="6pt" id="{generate-id()}" keep-with-next.within-line="always" baseline-shift="30%" padding-right="1mm"><!-- alignment-baseline="hanging" font-size="60%" -->
|
|
534
|
+
<xsl:value-of select="$number"/>
|
|
535
|
+
</fo:inline>
|
|
536
|
+
<xsl:apply-templates/>
|
|
537
|
+
</fo:block>
|
|
538
|
+
</fo:footnote-body>
|
|
539
|
+
</fo:footnote>
|
|
540
|
+
</xsl:template>
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
<xsl:template match="mpfd:ul | mpfd:ol" mode="ul_ol">
|
|
545
|
+
<fo:block-container margin-left="0mm">
|
|
546
|
+
<xsl:variable name="margin-left">
|
|
547
|
+
<xsl:variable name="countAncestorLists" select="count(ancestor::mpfd:ul) + count(ancestor::mpfd:ol)"/>
|
|
548
|
+
<xsl:value-of select="$countAncestorLists * 7"/>
|
|
549
|
+
</xsl:variable>
|
|
550
|
+
<xsl:attribute name="margin-left">
|
|
551
|
+
<xsl:value-of select="concat(normalize-space($margin-left),'mm')"/>
|
|
552
|
+
</xsl:attribute>
|
|
553
|
+
|
|
554
|
+
<fo:block-container margin-left="0mm">
|
|
555
|
+
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="6mm">
|
|
556
|
+
<xsl:if test="local-name() = 'ol'">
|
|
557
|
+
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
|
558
|
+
</xsl:if>
|
|
559
|
+
<xsl:apply-templates/>
|
|
560
|
+
</fo:list-block>
|
|
561
|
+
<xsl:for-each select="./mpfd:note//mpfd:p">
|
|
562
|
+
<xsl:call-template name="note"/>
|
|
563
|
+
</xsl:for-each>
|
|
564
|
+
</fo:block-container>
|
|
565
|
+
</fo:block-container>
|
|
566
|
+
</xsl:template>
|
|
567
|
+
|
|
568
|
+
<xsl:template match="mpfd:ul//mpfd:note | mpfd:ol//mpfd:note" priority="2"/>
|
|
569
|
+
|
|
570
|
+
<xsl:template match="mpfd:li">
|
|
571
|
+
<fo:list-item id="{@id}">
|
|
572
|
+
<fo:list-item-label end-indent="label-end()">
|
|
573
|
+
<fo:block>
|
|
574
|
+
<!-- to vertical align big dot -->
|
|
575
|
+
<!-- <xsl:if test="local-name(..) = 'ul'">
|
|
576
|
+
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
|
577
|
+
<xsl:attribute name="margin-top">-0.5mm</xsl:attribute>
|
|
578
|
+
</xsl:if> -->
|
|
579
|
+
<xsl:call-template name="getListItemFormat"/>
|
|
580
|
+
</fo:block>
|
|
581
|
+
</fo:list-item-label>
|
|
582
|
+
<fo:list-item-body start-indent="body-start()">
|
|
583
|
+
<xsl:apply-templates/>
|
|
584
|
+
<xsl:apply-templates select=".//mpfd:note" mode="process"/>
|
|
585
|
+
</fo:list-item-body>
|
|
586
|
+
</fo:list-item>
|
|
587
|
+
</xsl:template>
|
|
588
|
+
|
|
589
|
+
<xsl:template match="mpfd:note" mode="process">
|
|
590
|
+
<xsl:call-template name="note"/>
|
|
591
|
+
</xsl:template>
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
<xsl:template match="mpfd:preferred">
|
|
595
|
+
<fo:inline font-weight="bold">
|
|
596
|
+
<xsl:apply-templates/>
|
|
597
|
+
</fo:inline>
|
|
598
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'preferred'])">
|
|
599
|
+
<xsl:value-of select="$linebreak"/>
|
|
600
|
+
</xsl:if>
|
|
601
|
+
</xsl:template>
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
<xsl:template match="mpfd:annex">
|
|
605
|
+
<fo:block break-after="page"/>
|
|
606
|
+
<fo:block id="{@id}">
|
|
607
|
+
<xsl:apply-templates/>
|
|
608
|
+
</fo:block>
|
|
609
|
+
</xsl:template>
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
<xsl:template match="mpfd:references">
|
|
613
|
+
<fo:block break-after="page"/>
|
|
614
|
+
<xsl:apply-templates/>
|
|
615
|
+
<fo:block id="{@id}">
|
|
616
|
+
<xsl:apply-templates/>
|
|
617
|
+
</fo:block>
|
|
618
|
+
</xsl:template>
|
|
619
|
+
|
|
620
|
+
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
|
621
|
+
<xsl:template match="mpfd:references/mpfd:bibitem">
|
|
622
|
+
<fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
|
623
|
+
<fo:list-item>
|
|
624
|
+
<fo:list-item-label end-indent="label-end()">
|
|
625
|
+
<fo:block>
|
|
626
|
+
<fo:inline>
|
|
627
|
+
<xsl:number format="[1]"/>
|
|
628
|
+
</fo:inline>
|
|
629
|
+
</fo:block>
|
|
630
|
+
</fo:list-item-label>
|
|
631
|
+
<fo:list-item-body start-indent="body-start()">
|
|
632
|
+
<fo:block text-align="justify">
|
|
633
|
+
<xsl:variable name="docidentifier">
|
|
634
|
+
<xsl:if test="mpfd:docidentifier">
|
|
635
|
+
<xsl:choose>
|
|
636
|
+
<xsl:when test="mpfd:docidentifier/@type = 'metanorma'"/>
|
|
637
|
+
<xsl:otherwise><xsl:value-of select="mpfd:docidentifier"/></xsl:otherwise>
|
|
638
|
+
</xsl:choose>
|
|
639
|
+
</xsl:if>
|
|
640
|
+
</xsl:variable>
|
|
641
|
+
<fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
|
|
642
|
+
<xsl:apply-templates select="mpfd:note"/>
|
|
643
|
+
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
|
644
|
+
<xsl:choose>
|
|
645
|
+
<xsl:when test="mpfd:title[@type = 'main' and @language = 'en']">
|
|
646
|
+
<xsl:apply-templates select="mpfd:title[@type = 'main' and @language = 'en']"/>
|
|
647
|
+
</xsl:when>
|
|
648
|
+
<xsl:otherwise>
|
|
649
|
+
<xsl:apply-templates select="mpfd:title"/>
|
|
650
|
+
</xsl:otherwise>
|
|
651
|
+
</xsl:choose>
|
|
652
|
+
<xsl:apply-templates select="mpfd:formattedref"/>
|
|
653
|
+
</fo:block>
|
|
654
|
+
</fo:list-item-body>
|
|
655
|
+
</fo:list-item>
|
|
656
|
+
</fo:list-block>
|
|
657
|
+
</xsl:template>
|
|
658
|
+
|
|
659
|
+
<xsl:template match="mpfd:references[not(@normative='true')]/mpfd:bibitem" mode="contents"/>
|
|
660
|
+
|
|
661
|
+
<xsl:template match="mpfd:references[not(@normative='true')]/mpfd:bibitem/mpfd:title">
|
|
662
|
+
<fo:inline font-style="italic">
|
|
663
|
+
<xsl:apply-templates/>
|
|
664
|
+
</fo:inline>
|
|
665
|
+
</xsl:template>
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
<xsl:template match="mpfd:admonition">
|
|
669
|
+
<fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
|
|
670
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
|
|
671
|
+
</fo:block>
|
|
672
|
+
<fo:block font-weight="bold">
|
|
673
|
+
<xsl:apply-templates/>
|
|
674
|
+
</fo:block>
|
|
675
|
+
</xsl:template>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
<xsl:template match="mpfd:formula/mpfd:stem">
|
|
679
|
+
<fo:block margin-top="14pt" margin-bottom="14pt" text-align-last="justify">
|
|
680
|
+
<fo:inline padding-left="5mm"><xsl:apply-templates/></fo:inline>
|
|
681
|
+
<fo:inline keep-together.within-line="always">
|
|
682
|
+
<fo:leader leader-pattern="space"/>
|
|
683
|
+
<xsl:apply-templates select="../mpfd:name" mode="presentation"/>
|
|
684
|
+
</fo:inline>
|
|
685
|
+
</fo:block>
|
|
686
|
+
</xsl:template>
|
|
687
|
+
|
|
688
|
+
<xsl:variable name="Image-MPFD-Logo">
|
|
689
|
+
<xsl:text>iVBORw0KGgoAAAANSUhEUgAAAZEAAAGQCAYAAABvfV3yAAAACXBIWXMAACxKAAAsSgF3enRNAAAgAElEQVR4nO2dX4hkWZ7Xf720u7o4m3dxYVdwqGhmcQWHqWjxSdftaFzYRcGOFkRfdioKFxQftqJEH7Uz33yazvTJF6lIQXTwT2c+CCs+dMaysE/SmaMPDoxUhvOgPiydmb0wqw6U3Onf6Tl1OyIz/t1zfr9zPh9IMqsqK/PEjXvP9/z+v/Hq1SsBAADYhp/gqgEAwLYgIgAAsDWICAAAbA0iAgAAW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y8AAAAAElFTkSuQmCC</xsl:text>
|
|
690
|
+
</xsl:variable>
|
|
691
|
+
|
|
692
|
+
<!-- convert date from format 2007-04-01 to 1 April 2007-->
|
|
693
|
+
<xsl:template name="formatDate">
|
|
694
|
+
<xsl:param name="date"/>
|
|
695
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
|
696
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
|
697
|
+
<xsl:variable name="day" select="number(substring($date, 9, 2))"/>
|
|
698
|
+
<xsl:variable name="monthStr">
|
|
699
|
+
<xsl:choose>
|
|
700
|
+
<xsl:when test="$month = '01'">January</xsl:when>
|
|
701
|
+
<xsl:when test="$month = '02'">February</xsl:when>
|
|
702
|
+
<xsl:when test="$month = '03'">March</xsl:when>
|
|
703
|
+
<xsl:when test="$month = '04'">April</xsl:when>
|
|
704
|
+
<xsl:when test="$month = '05'">May</xsl:when>
|
|
705
|
+
<xsl:when test="$month = '06'">June</xsl:when>
|
|
706
|
+
<xsl:when test="$month = '07'">July</xsl:when>
|
|
707
|
+
<xsl:when test="$month = '08'">August</xsl:when>
|
|
708
|
+
<xsl:when test="$month = '09'">September</xsl:when>
|
|
709
|
+
<xsl:when test="$month = '10'">October</xsl:when>
|
|
710
|
+
<xsl:when test="$month = '11'">November</xsl:when>
|
|
711
|
+
<xsl:when test="$month = '12'">December</xsl:when>
|
|
712
|
+
</xsl:choose>
|
|
713
|
+
</xsl:variable>
|
|
714
|
+
<xsl:value-of select="normalize-space(concat($day, ' ', $monthStr, ' ', $year))"/>
|
|
715
|
+
</xsl:template>
|
|
716
|
+
|
|
717
|
+
<xsl:template name="insertHeaderFooter">
|
|
718
|
+
<xsl:param name="font-weight">normal</xsl:param>
|
|
719
|
+
<fo:static-content flow-name="header-even">
|
|
720
|
+
<fo:block-container height="100%" display-align="before">
|
|
721
|
+
<fo:block padding-top="12.5mm">
|
|
722
|
+
<xsl:value-of select="$copyrightShort"/>
|
|
723
|
+
</fo:block>
|
|
724
|
+
</fo:block-container>
|
|
725
|
+
</fo:static-content>
|
|
726
|
+
<fo:static-content flow-name="footer-even">
|
|
727
|
+
<fo:block-container font-size="10pt" height="100%" display-align="after">
|
|
728
|
+
<fo:table table-layout="fixed" width="100%">
|
|
729
|
+
<fo:table-column column-width="10%"/>
|
|
730
|
+
<fo:table-column column-width="90%"/>
|
|
731
|
+
<fo:table-body>
|
|
732
|
+
<fo:table-row>
|
|
733
|
+
<fo:table-cell font-weight="{$font-weight}">
|
|
734
|
+
<fo:block padding-bottom="5mm"><fo:page-number/></fo:block>
|
|
735
|
+
</fo:table-cell>
|
|
736
|
+
<fo:table-cell padding-right="2mm">
|
|
737
|
+
<fo:block padding-bottom="5mm" text-align="right"><xsl:value-of select="$copyright"/></fo:block>
|
|
738
|
+
</fo:table-cell>
|
|
739
|
+
</fo:table-row>
|
|
740
|
+
</fo:table-body>
|
|
741
|
+
</fo:table>
|
|
742
|
+
</fo:block-container>
|
|
743
|
+
</fo:static-content>
|
|
744
|
+
<fo:static-content flow-name="header-odd">
|
|
745
|
+
<fo:block-container height="100%" display-align="before">
|
|
746
|
+
<fo:block text-align="right" padding-top="12.5mm">
|
|
747
|
+
<xsl:value-of select="$copyrightShort"/>
|
|
748
|
+
</fo:block>
|
|
749
|
+
</fo:block-container>
|
|
750
|
+
</fo:static-content>
|
|
751
|
+
<fo:static-content flow-name="footer-odd">
|
|
752
|
+
<fo:block-container font-size="10pt" height="100%" display-align="after">
|
|
753
|
+
<fo:table table-layout="fixed" width="100%">
|
|
754
|
+
<fo:table-column column-width="90%"/>
|
|
755
|
+
<fo:table-column column-width="10%"/>
|
|
756
|
+
<fo:table-body>
|
|
757
|
+
<fo:table-row>
|
|
758
|
+
<fo:table-cell>
|
|
759
|
+
<fo:block padding-bottom="5mm"><xsl:value-of select="$copyright"/></fo:block>
|
|
760
|
+
</fo:table-cell>
|
|
761
|
+
<fo:table-cell font-weight="{$font-weight}" padding-right="2mm">
|
|
762
|
+
<fo:block padding-bottom="5mm" text-align="right"><fo:page-number/></fo:block>
|
|
763
|
+
</fo:table-cell>
|
|
764
|
+
</fo:table-row>
|
|
765
|
+
</fo:table-body>
|
|
766
|
+
</fo:table>
|
|
767
|
+
</fo:block-container>
|
|
768
|
+
</fo:static-content>
|
|
769
|
+
</xsl:template>
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
|
773
|
+
|
|
774
|
+
<title-annex lang="en">Annex </title-annex>
|
|
775
|
+
<title-annex lang="fr">Annexe </title-annex>
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
<title-edition lang="en">
|
|
780
|
+
|
|
781
|
+
<xsl:text>Edition </xsl:text>
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
</title-edition>
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
<title-toc lang="en">
|
|
788
|
+
|
|
789
|
+
<xsl:text>Contents</xsl:text>
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
</title-toc>
|
|
794
|
+
<title-toc lang="fr">Sommaire</title-toc>
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
<title-page lang="en">Page</title-page>
|
|
799
|
+
<title-page lang="fr">Page</title-page>
|
|
800
|
+
|
|
801
|
+
<title-key lang="en">Key</title-key>
|
|
802
|
+
<title-key lang="fr">Légende</title-key>
|
|
803
|
+
|
|
804
|
+
<title-where lang="en">where</title-where>
|
|
805
|
+
<title-where lang="fr">où</title-where>
|
|
806
|
+
|
|
807
|
+
<title-descriptors lang="en">Descriptors</title-descriptors>
|
|
808
|
+
|
|
809
|
+
<title-part lang="en">
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
</title-part>
|
|
813
|
+
<title-part lang="fr">
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
</title-part>
|
|
817
|
+
<title-part lang="zh">第 # 部分:</title-part>
|
|
818
|
+
|
|
819
|
+
<title-modified lang="en">modified</title-modified>
|
|
820
|
+
<title-modified lang="fr">modifiée</title-modified>
|
|
821
|
+
|
|
822
|
+
<title-modified lang="zh">modified</title-modified>
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
<title-source lang="en">
|
|
827
|
+
|
|
828
|
+
<xsl:text>SOURCE</xsl:text>
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
</title-source>
|
|
832
|
+
|
|
833
|
+
<title-keywords lang="en">Keywords</title-keywords>
|
|
834
|
+
|
|
835
|
+
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
|
836
|
+
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
|
837
|
+
|
|
838
|
+
<title-list-tables lang="en">List of Tables</title-list-tables>
|
|
839
|
+
|
|
840
|
+
<title-list-figures lang="en">List of Figures</title-list-figures>
|
|
841
|
+
|
|
842
|
+
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
|
843
|
+
|
|
844
|
+
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
|
845
|
+
|
|
846
|
+
<title-abstract lang="en">Abstract</title-abstract>
|
|
847
|
+
|
|
848
|
+
<title-summary lang="en">Summary</title-summary>
|
|
849
|
+
|
|
850
|
+
<title-in lang="en">in </title-in>
|
|
851
|
+
|
|
852
|
+
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
|
853
|
+
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
|
854
|
+
|
|
855
|
+
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
|
856
|
+
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
|
857
|
+
|
|
858
|
+
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
|
859
|
+
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
|
860
|
+
|
|
861
|
+
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
|
862
|
+
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
|
863
|
+
|
|
864
|
+
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
|
865
|
+
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
|
866
|
+
|
|
867
|
+
<title-caution lang="en">CAUTION</title-caution>
|
|
868
|
+
<title-caution lang="zh">注意</title-caution>
|
|
869
|
+
|
|
870
|
+
<title-warning lang="en">WARNING</title-warning>
|
|
871
|
+
<title-warning lang="zh">警告</title-warning>
|
|
872
|
+
|
|
873
|
+
<title-amendment lang="en">AMENDMENT</title-amendment>
|
|
874
|
+
|
|
875
|
+
<title-continued lang="en">(continued)</title-continued>
|
|
876
|
+
<title-continued lang="fr">(continué)</title-continued>
|
|
877
|
+
|
|
878
|
+
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
|
879
|
+
<xsl:param name="name"/>
|
|
880
|
+
<xsl:variable name="lang">
|
|
881
|
+
<xsl:call-template name="getLang"/>
|
|
882
|
+
</xsl:variable>
|
|
883
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
|
|
884
|
+
<xsl:choose>
|
|
885
|
+
<xsl:when test="normalize-space($title_) != ''">
|
|
886
|
+
<xsl:value-of select="$title_"/>
|
|
887
|
+
</xsl:when>
|
|
888
|
+
<xsl:otherwise>
|
|
889
|
+
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
|
890
|
+
</xsl:otherwise>
|
|
891
|
+
</xsl:choose>
|
|
892
|
+
</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="link-style">
|
|
893
|
+
|
|
894
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
|
895
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
|
900
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
|
901
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
|
912
|
+
|
|
913
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
|
914
|
+
|
|
915
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-label-style">
|
|
916
|
+
|
|
917
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
|
|
918
|
+
|
|
919
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
|
|
920
|
+
|
|
921
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
|
922
|
+
|
|
923
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
|
|
924
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
|
|
925
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
|
|
932
|
+
|
|
933
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-style">
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
|
958
|
+
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
959
|
+
|
|
960
|
+
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
979
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
980
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
981
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
982
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
|
1007
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
1020
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1021
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
1022
|
+
|
|
1023
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
|
1035
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
|
1042
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
</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">
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
|
1094
|
+
|
|
1095
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
1103
|
+
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
1104
|
+
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
1105
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
|
1106
|
+
|
|
1107
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
|
1122
|
+
|
|
1123
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
1142
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1143
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
1144
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
1145
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1146
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
1147
|
+
|
|
1148
|
+
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
|
1149
|
+
|
|
1150
|
+
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
|
1151
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
|
1158
|
+
|
|
1159
|
+
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
|
1160
|
+
|
|
1161
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
|
1162
|
+
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
|
1163
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
|
1174
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
1175
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1176
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
1177
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1178
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
1179
|
+
|
|
1180
|
+
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
|
1181
|
+
|
|
1182
|
+
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
|
1186
|
+
|
|
1187
|
+
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1191
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1192
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1193
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1194
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1195
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1196
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1197
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1198
|
+
|
|
1199
|
+
<!-- Normative references -->
|
|
1200
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
|
1201
|
+
<!-- Terms and definitions -->
|
|
1202
|
+
<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"/>
|
|
1203
|
+
<!-- Another main sections -->
|
|
1204
|
+
<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"/>
|
|
1205
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
|
1206
|
+
<!-- Bibliography -->
|
|
1207
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
|
1208
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1209
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1210
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1211
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1212
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1213
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1214
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1215
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1216
|
+
|
|
1217
|
+
<!-- Normative references -->
|
|
1218
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
|
1219
|
+
<!-- Terms and definitions -->
|
|
1220
|
+
<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']]"/>
|
|
1221
|
+
<!-- Another main sections -->
|
|
1222
|
+
<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'])]"/>
|
|
1223
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1224
|
+
<!-- Bibliography -->
|
|
1225
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1226
|
+
</xsl:template><xsl:template match="text()">
|
|
1227
|
+
<xsl:value-of select="."/>
|
|
1228
|
+
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
1229
|
+
<xsl:value-of select="$linebreak"/>
|
|
1230
|
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
|
1231
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
|
1232
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
|
1233
|
+
</xsl:template><xsl:template match="*[local-name()='table']">
|
|
1234
|
+
|
|
1235
|
+
<xsl:variable name="simple-table">
|
|
1236
|
+
<xsl:call-template name="getSimpleTable"/>
|
|
1237
|
+
</xsl:variable>
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
<!-- $namespace = 'iso' or -->
|
|
1244
|
+
|
|
1245
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
<xsl:call-template name="fn_name_display"/>
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
|
1254
|
+
|
|
1255
|
+
<!-- <xsl:variable name="cols-count">
|
|
1256
|
+
<xsl:choose>
|
|
1257
|
+
<xsl:when test="*[local-name()='thead']">
|
|
1258
|
+
<xsl:call-template name="calculate-columns-numbers">
|
|
1259
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
|
1260
|
+
</xsl:call-template>
|
|
1261
|
+
</xsl:when>
|
|
1262
|
+
<xsl:otherwise>
|
|
1263
|
+
<xsl:call-template name="calculate-columns-numbers">
|
|
1264
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
|
1265
|
+
</xsl:call-template>
|
|
1266
|
+
</xsl:otherwise>
|
|
1267
|
+
</xsl:choose>
|
|
1268
|
+
</xsl:variable> -->
|
|
1269
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
|
1270
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
<xsl:variable name="colwidths">
|
|
1275
|
+
<xsl:call-template name="calculate-column-widths">
|
|
1276
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1277
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
|
1278
|
+
</xsl:call-template>
|
|
1279
|
+
</xsl:variable>
|
|
1280
|
+
|
|
1281
|
+
<!-- <xsl:variable name="colwidths2">
|
|
1282
|
+
<xsl:call-template name="calculate-column-widths">
|
|
1283
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1284
|
+
</xsl:call-template>
|
|
1285
|
+
</xsl:variable> -->
|
|
1286
|
+
|
|
1287
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
|
1288
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
|
1289
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
|
1290
|
+
|
|
1291
|
+
<xsl:variable name="margin-left">
|
|
1292
|
+
<xsl:choose>
|
|
1293
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
|
1294
|
+
<xsl:otherwise>0</xsl:otherwise>
|
|
1295
|
+
</xsl:choose>
|
|
1296
|
+
</xsl:variable>
|
|
1297
|
+
|
|
1298
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
|
1309
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
1310
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
1311
|
+
|
|
1312
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
<xsl:attribute name="border-top">2pt solid black</xsl:attribute>
|
|
1327
|
+
<xsl:attribute name="border-bottom">2pt solid black</xsl:attribute>
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
|
1331
|
+
<xsl:choose>
|
|
1332
|
+
<xsl:when test=". = 1 or . = 0">
|
|
1333
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
|
1334
|
+
</xsl:when>
|
|
1335
|
+
<xsl:otherwise>
|
|
1336
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
1337
|
+
</xsl:otherwise>
|
|
1338
|
+
</xsl:choose>
|
|
1339
|
+
</xsl:for-each>
|
|
1340
|
+
|
|
1341
|
+
<xsl:choose>
|
|
1342
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
|
1343
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
|
1344
|
+
</xsl:when>
|
|
1345
|
+
<xsl:otherwise>
|
|
1346
|
+
<xsl:apply-templates/>
|
|
1347
|
+
</xsl:otherwise>
|
|
1348
|
+
</xsl:choose>
|
|
1349
|
+
|
|
1350
|
+
</fo:table>
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
</fo:block-container>
|
|
1357
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
|
1358
|
+
<xsl:if test="normalize-space() != ''">
|
|
1359
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
|
1360
|
+
|
|
1361
|
+
<xsl:apply-templates/>
|
|
1362
|
+
</fo:block>
|
|
1363
|
+
</xsl:if>
|
|
1364
|
+
</xsl:template><xsl:template name="calculate-columns-numbers">
|
|
1365
|
+
<xsl:param name="table-row"/>
|
|
1366
|
+
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
|
1367
|
+
<xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
|
|
1368
|
+
<xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
|
|
1369
|
+
<xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
|
|
1370
|
+
</xsl:template><xsl:template name="calculate-column-widths">
|
|
1371
|
+
<xsl:param name="table"/>
|
|
1372
|
+
<xsl:param name="cols-count"/>
|
|
1373
|
+
<xsl:param name="curr-col" select="1"/>
|
|
1374
|
+
<xsl:param name="width" select="0"/>
|
|
1375
|
+
|
|
1376
|
+
<xsl:if test="$curr-col <= $cols-count">
|
|
1377
|
+
<xsl:variable name="widths">
|
|
1378
|
+
<xsl:choose>
|
|
1379
|
+
<xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
|
|
1380
|
+
<xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
|
|
1381
|
+
<xsl:variable name="words">
|
|
1382
|
+
<xsl:call-template name="tokenize">
|
|
1383
|
+
<xsl:with-param name="text" select="translate(*[local-name()='th'][$curr-col],'- —:', ' ')"/>
|
|
1384
|
+
</xsl:call-template>
|
|
1385
|
+
</xsl:variable>
|
|
1386
|
+
<xsl:variable name="max_length">
|
|
1387
|
+
<xsl:call-template name="max_length">
|
|
1388
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
|
1389
|
+
</xsl:call-template>
|
|
1390
|
+
</xsl:variable>
|
|
1391
|
+
<width>
|
|
1392
|
+
<xsl:value-of select="$max_length"/>
|
|
1393
|
+
</width>
|
|
1394
|
+
</xsl:for-each>
|
|
1395
|
+
<xsl:for-each select="*[local-name()='tbody']//*[local-name()='tr']">
|
|
1396
|
+
<xsl:variable name="words">
|
|
1397
|
+
<xsl:call-template name="tokenize">
|
|
1398
|
+
<xsl:with-param name="text" select="translate(*[local-name()='td'][$curr-col],'- —:', ' ')"/>
|
|
1399
|
+
</xsl:call-template>
|
|
1400
|
+
</xsl:variable>
|
|
1401
|
+
<xsl:variable name="max_length">
|
|
1402
|
+
<xsl:call-template name="max_length">
|
|
1403
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
|
1404
|
+
</xsl:call-template>
|
|
1405
|
+
</xsl:variable>
|
|
1406
|
+
<width>
|
|
1407
|
+
<xsl:value-of select="$max_length"/>
|
|
1408
|
+
</width>
|
|
1409
|
+
|
|
1410
|
+
</xsl:for-each>
|
|
1411
|
+
</xsl:when>
|
|
1412
|
+
<xsl:otherwise>
|
|
1413
|
+
<xsl:for-each select="xalan:nodeset($table)//tr">
|
|
1414
|
+
<xsl:variable name="td_text">
|
|
1415
|
+
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
|
1416
|
+
</xsl:variable>
|
|
1417
|
+
<xsl:variable name="words">
|
|
1418
|
+
<xsl:variable name="string_with_added_zerospaces">
|
|
1419
|
+
<xsl:call-template name="add-zero-spaces-java">
|
|
1420
|
+
<xsl:with-param name="text" select="$td_text"/>
|
|
1421
|
+
</xsl:call-template>
|
|
1422
|
+
</xsl:variable>
|
|
1423
|
+
<xsl:call-template name="tokenize">
|
|
1424
|
+
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
|
1425
|
+
<!-- 2009 thinspace -->
|
|
1426
|
+
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
|
1427
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
|
|
1428
|
+
</xsl:call-template>
|
|
1429
|
+
</xsl:variable>
|
|
1430
|
+
<xsl:variable name="max_length">
|
|
1431
|
+
<xsl:call-template name="max_length">
|
|
1432
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
|
1433
|
+
</xsl:call-template>
|
|
1434
|
+
</xsl:variable>
|
|
1435
|
+
<width>
|
|
1436
|
+
<xsl:variable name="divider">
|
|
1437
|
+
<xsl:choose>
|
|
1438
|
+
<xsl:when test="td[$curr-col]/@divide">
|
|
1439
|
+
<xsl:value-of select="td[$curr-col]/@divide"/>
|
|
1440
|
+
</xsl:when>
|
|
1441
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
1442
|
+
</xsl:choose>
|
|
1443
|
+
</xsl:variable>
|
|
1444
|
+
<xsl:value-of select="$max_length div $divider"/>
|
|
1445
|
+
</width>
|
|
1446
|
+
|
|
1447
|
+
</xsl:for-each>
|
|
1448
|
+
|
|
1449
|
+
</xsl:otherwise>
|
|
1450
|
+
</xsl:choose>
|
|
1451
|
+
</xsl:variable>
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
<column>
|
|
1455
|
+
<xsl:for-each select="xalan:nodeset($widths)//width">
|
|
1456
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
|
1457
|
+
<xsl:if test="position()=1">
|
|
1458
|
+
<xsl:value-of select="."/>
|
|
1459
|
+
</xsl:if>
|
|
1460
|
+
</xsl:for-each>
|
|
1461
|
+
</column>
|
|
1462
|
+
<xsl:call-template name="calculate-column-widths">
|
|
1463
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1464
|
+
<xsl:with-param name="curr-col" select="$curr-col +1"/>
|
|
1465
|
+
<xsl:with-param name="table" select="$table"/>
|
|
1466
|
+
</xsl:call-template>
|
|
1467
|
+
</xsl:if>
|
|
1468
|
+
</xsl:template><xsl:template match="text()" mode="td_text">
|
|
1469
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
|
1470
|
+
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
|
1471
|
+
</xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
|
|
1472
|
+
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
|
1473
|
+
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
|
1474
|
+
<xsl:value-of select="@target"/>
|
|
1475
|
+
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
|
1476
|
+
<xsl:param name="cols-count"/>
|
|
1477
|
+
<!-- font-weight="bold" -->
|
|
1478
|
+
<fo:table-header>
|
|
1479
|
+
|
|
1480
|
+
<xsl:apply-templates/>
|
|
1481
|
+
</fo:table-header>
|
|
1482
|
+
</xsl:template><xsl:template name="table-header-title">
|
|
1483
|
+
<xsl:param name="cols-count"/>
|
|
1484
|
+
<!-- row for title -->
|
|
1485
|
+
<fo:table-row>
|
|
1486
|
+
<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">
|
|
1487
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
|
1488
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
|
1489
|
+
<xsl:call-template name="fn_name_display"/>
|
|
1490
|
+
</xsl:for-each>
|
|
1491
|
+
<fo:block text-align="right" font-style="italic">
|
|
1492
|
+
<xsl:text> </xsl:text>
|
|
1493
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
|
1494
|
+
</fo:block>
|
|
1495
|
+
</fo:table-cell>
|
|
1496
|
+
</fo:table-row>
|
|
1497
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
|
1498
|
+
<fo:table-body>
|
|
1499
|
+
<xsl:apply-templates/>
|
|
1500
|
+
</fo:table-body>
|
|
1501
|
+
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
|
1502
|
+
<xsl:apply-templates/>
|
|
1503
|
+
</xsl:template><xsl:template name="insertTableFooter">
|
|
1504
|
+
<xsl:param name="cols-count"/>
|
|
1505
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
|
1506
|
+
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
|
1507
|
+
|
|
1508
|
+
<fo:table-footer>
|
|
1509
|
+
|
|
1510
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
|
1511
|
+
|
|
1512
|
+
<!-- if there are note(s) or fn(s) then create footer row -->
|
|
1513
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
<fo:table-row>
|
|
1518
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
<!-- fn will be processed inside 'note' processing -->
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
<!-- except gb -->
|
|
1526
|
+
|
|
1527
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
<!-- horizontal row separator -->
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
<!-- fn processing -->
|
|
1534
|
+
<xsl:call-template name="fn_display"/>
|
|
1535
|
+
|
|
1536
|
+
</fo:table-cell>
|
|
1537
|
+
</fo:table-row>
|
|
1538
|
+
|
|
1539
|
+
</xsl:if>
|
|
1540
|
+
</fo:table-footer>
|
|
1541
|
+
|
|
1542
|
+
</xsl:if>
|
|
1543
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
|
1544
|
+
|
|
1545
|
+
<xsl:variable name="cols-count">
|
|
1546
|
+
<xsl:choose>
|
|
1547
|
+
<xsl:when test="../*[local-name()='thead']">
|
|
1548
|
+
<xsl:call-template name="calculate-columns-numbers">
|
|
1549
|
+
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
|
1550
|
+
</xsl:call-template>
|
|
1551
|
+
</xsl:when>
|
|
1552
|
+
<xsl:otherwise>
|
|
1553
|
+
<xsl:call-template name="calculate-columns-numbers">
|
|
1554
|
+
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
|
1555
|
+
</xsl:call-template>
|
|
1556
|
+
</xsl:otherwise>
|
|
1557
|
+
</xsl:choose>
|
|
1558
|
+
</xsl:variable>
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
|
1563
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1564
|
+
</xsl:apply-templates>
|
|
1565
|
+
|
|
1566
|
+
<xsl:call-template name="insertTableFooter">
|
|
1567
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1568
|
+
</xsl:call-template>
|
|
1569
|
+
|
|
1570
|
+
<fo:table-body>
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
<xsl:apply-templates/>
|
|
1574
|
+
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
|
1575
|
+
|
|
1576
|
+
</fo:table-body>
|
|
1577
|
+
|
|
1578
|
+
</xsl:template><xsl:template match="*[local-name()='tr']">
|
|
1579
|
+
<xsl:variable name="parent-name" select="local-name(..)"/>
|
|
1580
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
|
1581
|
+
<fo:table-row min-height="4mm">
|
|
1582
|
+
<xsl:if test="$parent-name = 'thead'">
|
|
1583
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
</xsl:if>
|
|
1590
|
+
<xsl:if test="$parent-name = 'tfoot'">
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
</xsl:if>
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
<xsl:apply-templates/>
|
|
1599
|
+
</fo:table-row>
|
|
1600
|
+
</xsl:template><xsl:template match="*[local-name()='th']">
|
|
1601
|
+
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
|
1602
|
+
<xsl:attribute name="text-align">
|
|
1603
|
+
<xsl:choose>
|
|
1604
|
+
<xsl:when test="@align">
|
|
1605
|
+
<xsl:value-of select="@align"/>
|
|
1606
|
+
</xsl:when>
|
|
1607
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
1608
|
+
</xsl:choose>
|
|
1609
|
+
</xsl:attribute>
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
<xsl:attribute name="border-top">solid black 2pt</xsl:attribute>
|
|
1621
|
+
<xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
|
|
1622
|
+
|
|
1623
|
+
<xsl:if test="@colspan">
|
|
1624
|
+
<xsl:attribute name="number-columns-spanned">
|
|
1625
|
+
<xsl:value-of select="@colspan"/>
|
|
1626
|
+
</xsl:attribute>
|
|
1627
|
+
</xsl:if>
|
|
1628
|
+
<xsl:if test="@rowspan">
|
|
1629
|
+
<xsl:attribute name="number-rows-spanned">
|
|
1630
|
+
<xsl:value-of select="@rowspan"/>
|
|
1631
|
+
</xsl:attribute>
|
|
1632
|
+
</xsl:if>
|
|
1633
|
+
<xsl:call-template name="display-align"/>
|
|
1634
|
+
<fo:block>
|
|
1635
|
+
<xsl:apply-templates/>
|
|
1636
|
+
</fo:block>
|
|
1637
|
+
</fo:table-cell>
|
|
1638
|
+
</xsl:template><xsl:template name="display-align">
|
|
1639
|
+
<xsl:if test="@valign">
|
|
1640
|
+
<xsl:attribute name="display-align">
|
|
1641
|
+
<xsl:choose>
|
|
1642
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
|
1643
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
|
1644
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
|
1645
|
+
<xsl:otherwise>before</xsl:otherwise>
|
|
1646
|
+
</xsl:choose>
|
|
1647
|
+
</xsl:attribute>
|
|
1648
|
+
</xsl:if>
|
|
1649
|
+
</xsl:template><xsl:template match="*[local-name()='td']">
|
|
1650
|
+
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
|
1651
|
+
<xsl:attribute name="text-align">
|
|
1652
|
+
<xsl:choose>
|
|
1653
|
+
<xsl:when test="@align">
|
|
1654
|
+
<xsl:value-of select="@align"/>
|
|
1655
|
+
</xsl:when>
|
|
1656
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
1657
|
+
</xsl:choose>
|
|
1658
|
+
</xsl:attribute>
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
<xsl:if test="@colspan">
|
|
1670
|
+
<xsl:attribute name="number-columns-spanned">
|
|
1671
|
+
<xsl:value-of select="@colspan"/>
|
|
1672
|
+
</xsl:attribute>
|
|
1673
|
+
</xsl:if>
|
|
1674
|
+
<xsl:if test="@rowspan">
|
|
1675
|
+
<xsl:attribute name="number-rows-spanned">
|
|
1676
|
+
<xsl:value-of select="@rowspan"/>
|
|
1677
|
+
</xsl:attribute>
|
|
1678
|
+
</xsl:if>
|
|
1679
|
+
<xsl:call-template name="display-align"/>
|
|
1680
|
+
<fo:block>
|
|
1681
|
+
<xsl:apply-templates/>
|
|
1682
|
+
</fo:block>
|
|
1683
|
+
</fo:table-cell>
|
|
1684
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
<fo:block font-size="10pt" margin-bottom="12pt">
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
|
|
1692
|
+
<fo:inline padding-right="2mm">
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
1698
|
+
|
|
1699
|
+
</fo:inline>
|
|
1700
|
+
<xsl:apply-templates mode="process"/>
|
|
1701
|
+
</fo:block>
|
|
1702
|
+
|
|
1703
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
|
1704
|
+
<xsl:apply-templates/>
|
|
1705
|
+
</xsl:template><xsl:template name="fn_display">
|
|
1706
|
+
<xsl:variable name="references">
|
|
1707
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
|
1708
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
<xsl:apply-templates/>
|
|
1712
|
+
</fn>
|
|
1713
|
+
</xsl:for-each>
|
|
1714
|
+
</xsl:variable>
|
|
1715
|
+
<xsl:for-each select="xalan:nodeset($references)//fn">
|
|
1716
|
+
<xsl:variable name="reference" select="@reference"/>
|
|
1717
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
|
1718
|
+
<fo:block margin-bottom="12pt">
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
<xsl:value-of select="@reference"/>
|
|
1731
|
+
|
|
1732
|
+
</fo:inline>
|
|
1733
|
+
<fo:inline>
|
|
1734
|
+
|
|
1735
|
+
<xsl:apply-templates/>
|
|
1736
|
+
</fo:inline>
|
|
1737
|
+
</fo:block>
|
|
1738
|
+
</xsl:if>
|
|
1739
|
+
</xsl:for-each>
|
|
1740
|
+
</xsl:template><xsl:template name="fn_name_display">
|
|
1741
|
+
<!-- <xsl:variable name="references">
|
|
1742
|
+
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
|
1743
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
|
1744
|
+
<xsl:apply-templates />
|
|
1745
|
+
</fn>
|
|
1746
|
+
</xsl:for-each>
|
|
1747
|
+
</xsl:variable>
|
|
1748
|
+
$references=<xsl:copy-of select="$references"/> -->
|
|
1749
|
+
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
|
1750
|
+
<xsl:variable name="reference" select="@reference"/>
|
|
1751
|
+
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
|
1752
|
+
<fo:block margin-bottom="12pt">
|
|
1753
|
+
<xsl:apply-templates/>
|
|
1754
|
+
</fo:block>
|
|
1755
|
+
</xsl:for-each>
|
|
1756
|
+
</xsl:template><xsl:template name="fn_display_figure">
|
|
1757
|
+
<xsl:variable name="key_iso">
|
|
1758
|
+
<!-- and (not(@class) or @class !='pseudocode') -->
|
|
1759
|
+
</xsl:variable>
|
|
1760
|
+
<xsl:variable name="references">
|
|
1761
|
+
<xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
|
|
1762
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
|
1763
|
+
<xsl:apply-templates/>
|
|
1764
|
+
</fn>
|
|
1765
|
+
</xsl:for-each>
|
|
1766
|
+
</xsl:variable>
|
|
1767
|
+
|
|
1768
|
+
<!-- current hierarchy is 'figure' element -->
|
|
1769
|
+
<xsl:variable name="following_dl_colwidths">
|
|
1770
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
|
1771
|
+
<xsl:variable name="html-table">
|
|
1772
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
|
1773
|
+
<xsl:element name="{$ns}:table">
|
|
1774
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
|
1775
|
+
<tbody>
|
|
1776
|
+
<xsl:apply-templates mode="dl"/>
|
|
1777
|
+
</tbody>
|
|
1778
|
+
</xsl:for-each>
|
|
1779
|
+
</xsl:element>
|
|
1780
|
+
</xsl:variable>
|
|
1781
|
+
|
|
1782
|
+
<xsl:call-template name="calculate-column-widths">
|
|
1783
|
+
<xsl:with-param name="cols-count" select="2"/>
|
|
1784
|
+
<xsl:with-param name="table" select="$html-table"/>
|
|
1785
|
+
</xsl:call-template>
|
|
1786
|
+
|
|
1787
|
+
</xsl:if>
|
|
1788
|
+
</xsl:variable>
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
<xsl:variable name="maxlength_dt">
|
|
1792
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
|
1793
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
|
1794
|
+
</xsl:for-each>
|
|
1795
|
+
</xsl:variable>
|
|
1796
|
+
|
|
1797
|
+
<xsl:if test="xalan:nodeset($references)//fn">
|
|
1798
|
+
<fo:block>
|
|
1799
|
+
<fo:table width="95%" table-layout="fixed">
|
|
1800
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
1801
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1802
|
+
|
|
1803
|
+
</xsl:if>
|
|
1804
|
+
<xsl:choose>
|
|
1805
|
+
<!-- if there 'dl', then set same columns width -->
|
|
1806
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
|
1807
|
+
<xsl:call-template name="setColumnWidth_dl">
|
|
1808
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
|
1809
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
|
1810
|
+
</xsl:call-template>
|
|
1811
|
+
</xsl:when>
|
|
1812
|
+
<xsl:otherwise>
|
|
1813
|
+
<fo:table-column column-width="15%"/>
|
|
1814
|
+
<fo:table-column column-width="85%"/>
|
|
1815
|
+
</xsl:otherwise>
|
|
1816
|
+
</xsl:choose>
|
|
1817
|
+
<fo:table-body>
|
|
1818
|
+
<xsl:for-each select="xalan:nodeset($references)//fn">
|
|
1819
|
+
<xsl:variable name="reference" select="@reference"/>
|
|
1820
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
|
1821
|
+
<fo:table-row>
|
|
1822
|
+
<fo:table-cell>
|
|
1823
|
+
<fo:block>
|
|
1824
|
+
<fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
|
|
1825
|
+
|
|
1826
|
+
<xsl:value-of select="@reference"/>
|
|
1827
|
+
</fo:inline>
|
|
1828
|
+
</fo:block>
|
|
1829
|
+
</fo:table-cell>
|
|
1830
|
+
<fo:table-cell>
|
|
1831
|
+
<fo:block text-align="justify" margin-bottom="12pt">
|
|
1832
|
+
|
|
1833
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
1834
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
|
1835
|
+
</xsl:if>
|
|
1836
|
+
|
|
1837
|
+
<xsl:apply-templates/>
|
|
1838
|
+
</fo:block>
|
|
1839
|
+
</fo:table-cell>
|
|
1840
|
+
</fo:table-row>
|
|
1841
|
+
</xsl:if>
|
|
1842
|
+
</xsl:for-each>
|
|
1843
|
+
</fo:table-body>
|
|
1844
|
+
</fo:table>
|
|
1845
|
+
</fo:block>
|
|
1846
|
+
</xsl:if>
|
|
1847
|
+
|
|
1848
|
+
</xsl:template><xsl:template match="*[local-name()='fn']">
|
|
1849
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
|
1850
|
+
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
|
1857
|
+
|
|
1858
|
+
<xsl:value-of select="@reference"/>
|
|
1859
|
+
</fo:basic-link>
|
|
1860
|
+
</fo:inline>
|
|
1861
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
|
1862
|
+
<fo:inline>
|
|
1863
|
+
<xsl:apply-templates/>
|
|
1864
|
+
</fo:inline>
|
|
1865
|
+
</xsl:template><xsl:template match="*[local-name()='dl']">
|
|
1866
|
+
<fo:block-container margin-left="0mm">
|
|
1867
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
1868
|
+
<xsl:attribute name="margin-left">
|
|
1869
|
+
<xsl:choose>
|
|
1870
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
1871
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
1872
|
+
</xsl:choose>
|
|
1873
|
+
</xsl:attribute>
|
|
1874
|
+
|
|
1875
|
+
</xsl:if>
|
|
1876
|
+
<fo:block-container margin-left="0mm">
|
|
1877
|
+
|
|
1878
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
|
1879
|
+
|
|
1880
|
+
<xsl:variable name="key_iso">
|
|
1881
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
|
1882
|
+
</xsl:variable>
|
|
1883
|
+
|
|
1884
|
+
<xsl:choose>
|
|
1885
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
|
1886
|
+
|
|
1887
|
+
|
|
1888
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
|
1889
|
+
|
|
1890
|
+
<xsl:variable name="title-where">
|
|
1891
|
+
<xsl:call-template name="getTitle">
|
|
1892
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
|
1893
|
+
</xsl:call-template>
|
|
1894
|
+
</xsl:variable>
|
|
1895
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
|
1896
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
|
1897
|
+
<xsl:text/>
|
|
1898
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
|
1899
|
+
</fo:block>
|
|
1900
|
+
|
|
1901
|
+
</xsl:when>
|
|
1902
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
|
1903
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
<xsl:variable name="title-where">
|
|
1909
|
+
<xsl:call-template name="getTitle">
|
|
1910
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
|
1911
|
+
</xsl:call-template>
|
|
1912
|
+
</xsl:variable>
|
|
1913
|
+
<xsl:value-of select="$title-where"/>
|
|
1914
|
+
</fo:block>
|
|
1915
|
+
</xsl:when>
|
|
1916
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
|
1917
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
|
|
1921
|
+
<xsl:variable name="title-key">
|
|
1922
|
+
<xsl:call-template name="getTitle">
|
|
1923
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
|
1924
|
+
</xsl:call-template>
|
|
1925
|
+
</xsl:variable>
|
|
1926
|
+
<xsl:value-of select="$title-key"/>
|
|
1927
|
+
</fo:block>
|
|
1928
|
+
</xsl:when>
|
|
1929
|
+
</xsl:choose>
|
|
1930
|
+
|
|
1931
|
+
<!-- a few components -->
|
|
1932
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
|
1933
|
+
<fo:block>
|
|
1934
|
+
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
<fo:block>
|
|
1939
|
+
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
<fo:table width="95%" table-layout="fixed">
|
|
1944
|
+
|
|
1945
|
+
<xsl:choose>
|
|
1946
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
|
1947
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
|
1948
|
+
</xsl:when>
|
|
1949
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
|
1950
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1951
|
+
|
|
1952
|
+
</xsl:when>
|
|
1953
|
+
</xsl:choose>
|
|
1954
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
|
1955
|
+
<xsl:variable name="html-table">
|
|
1956
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
|
1957
|
+
<xsl:element name="{$ns}:table">
|
|
1958
|
+
<tbody>
|
|
1959
|
+
<xsl:apply-templates mode="dl"/>
|
|
1960
|
+
</tbody>
|
|
1961
|
+
</xsl:element>
|
|
1962
|
+
</xsl:variable>
|
|
1963
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
|
1964
|
+
<xsl:variable name="colwidths">
|
|
1965
|
+
<xsl:call-template name="calculate-column-widths">
|
|
1966
|
+
<xsl:with-param name="cols-count" select="2"/>
|
|
1967
|
+
<xsl:with-param name="table" select="$html-table"/>
|
|
1968
|
+
</xsl:call-template>
|
|
1969
|
+
</xsl:variable>
|
|
1970
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
|
1971
|
+
<xsl:variable name="maxlength_dt">
|
|
1972
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
|
1973
|
+
</xsl:variable>
|
|
1974
|
+
<xsl:call-template name="setColumnWidth_dl">
|
|
1975
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
|
1976
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
|
1977
|
+
</xsl:call-template>
|
|
1978
|
+
<fo:table-body>
|
|
1979
|
+
<xsl:apply-templates>
|
|
1980
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
|
1981
|
+
</xsl:apply-templates>
|
|
1982
|
+
</fo:table-body>
|
|
1983
|
+
</fo:table>
|
|
1984
|
+
</fo:block>
|
|
1985
|
+
</fo:block>
|
|
1986
|
+
</xsl:if>
|
|
1987
|
+
</fo:block-container>
|
|
1988
|
+
</fo:block-container>
|
|
1989
|
+
</xsl:template><xsl:template name="setColumnWidth_dl">
|
|
1990
|
+
<xsl:param name="colwidths"/>
|
|
1991
|
+
<xsl:param name="maxlength_dt"/>
|
|
1992
|
+
<xsl:choose>
|
|
1993
|
+
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
|
1994
|
+
<fo:table-column column-width="50%"/>
|
|
1995
|
+
<fo:table-column column-width="50%"/>
|
|
1996
|
+
</xsl:when>
|
|
1997
|
+
<xsl:otherwise>
|
|
1998
|
+
<xsl:choose>
|
|
1999
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
|
2000
|
+
<fo:table-column column-width="5%"/>
|
|
2001
|
+
<fo:table-column column-width="95%"/>
|
|
2002
|
+
</xsl:when>
|
|
2003
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like t90, a, etc -->
|
|
2004
|
+
<fo:table-column column-width="10%"/>
|
|
2005
|
+
<fo:table-column column-width="90%"/>
|
|
2006
|
+
</xsl:when>
|
|
2007
|
+
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
|
2008
|
+
<fo:table-column column-width="60%"/>
|
|
2009
|
+
<fo:table-column column-width="40%"/>
|
|
2010
|
+
</xsl:when> -->
|
|
2011
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.3">
|
|
2012
|
+
<fo:table-column column-width="50%"/>
|
|
2013
|
+
<fo:table-column column-width="50%"/>
|
|
2014
|
+
</xsl:when>
|
|
2015
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 0.5">
|
|
2016
|
+
<fo:table-column column-width="40%"/>
|
|
2017
|
+
<fo:table-column column-width="60%"/>
|
|
2018
|
+
</xsl:when>
|
|
2019
|
+
<xsl:otherwise>
|
|
2020
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
|
2021
|
+
<xsl:choose>
|
|
2022
|
+
<xsl:when test=". = 1 or . = 0">
|
|
2023
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
|
2024
|
+
</xsl:when>
|
|
2025
|
+
<xsl:otherwise>
|
|
2026
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
2027
|
+
</xsl:otherwise>
|
|
2028
|
+
</xsl:choose>
|
|
2029
|
+
</xsl:for-each>
|
|
2030
|
+
</xsl:otherwise>
|
|
2031
|
+
</xsl:choose>
|
|
2032
|
+
<!-- <fo:table-column column-width="15%"/>
|
|
2033
|
+
<fo:table-column column-width="85%"/> -->
|
|
2034
|
+
</xsl:otherwise>
|
|
2035
|
+
</xsl:choose>
|
|
2036
|
+
</xsl:template><xsl:template name="getMaxLength_dt">
|
|
2037
|
+
<xsl:for-each select="*[local-name()='dt']">
|
|
2038
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
|
2039
|
+
<xsl:if test="position() = 1">
|
|
2040
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
|
2041
|
+
</xsl:if>
|
|
2042
|
+
</xsl:for-each>
|
|
2043
|
+
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
|
2044
|
+
<xsl:param name="key_iso"/>
|
|
2045
|
+
|
|
2046
|
+
<!-- <tr>
|
|
2047
|
+
<td>NOTE</td>
|
|
2048
|
+
<td>
|
|
2049
|
+
<xsl:apply-templates />
|
|
2050
|
+
</td>
|
|
2051
|
+
</tr>
|
|
2052
|
+
-->
|
|
2053
|
+
<fo:table-row>
|
|
2054
|
+
<fo:table-cell>
|
|
2055
|
+
<fo:block margin-top="6pt">
|
|
2056
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
2057
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
|
2058
|
+
</xsl:if>
|
|
2059
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2060
|
+
</fo:block>
|
|
2061
|
+
</fo:table-cell>
|
|
2062
|
+
<fo:table-cell>
|
|
2063
|
+
<fo:block>
|
|
2064
|
+
<xsl:apply-templates/>
|
|
2065
|
+
</fo:block>
|
|
2066
|
+
</fo:table-cell>
|
|
2067
|
+
</fo:table-row>
|
|
2068
|
+
</xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
|
|
2069
|
+
<tr>
|
|
2070
|
+
<td>
|
|
2071
|
+
<xsl:apply-templates/>
|
|
2072
|
+
</td>
|
|
2073
|
+
<td>
|
|
2074
|
+
|
|
2075
|
+
|
|
2076
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
|
2077
|
+
|
|
2078
|
+
</td>
|
|
2079
|
+
</tr>
|
|
2080
|
+
|
|
2081
|
+
</xsl:template><xsl:template match="*[local-name()='dt']">
|
|
2082
|
+
<xsl:param name="key_iso"/>
|
|
2083
|
+
|
|
2084
|
+
<fo:table-row>
|
|
2085
|
+
|
|
2086
|
+
<fo:table-cell>
|
|
2087
|
+
|
|
2088
|
+
<fo:block margin-top="6pt">
|
|
2089
|
+
|
|
2090
|
+
|
|
2091
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
2092
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
|
2093
|
+
|
|
2094
|
+
</xsl:if>
|
|
2095
|
+
|
|
2096
|
+
|
|
2097
|
+
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
<xsl:apply-templates/>
|
|
2101
|
+
<!-- <xsl:if test="$namespace = 'gb'">
|
|
2102
|
+
<xsl:if test="ancestor::*[local-name()='formula']">
|
|
2103
|
+
<xsl:text>—</xsl:text>
|
|
2104
|
+
</xsl:if>
|
|
2105
|
+
</xsl:if> -->
|
|
2106
|
+
</fo:block>
|
|
2107
|
+
</fo:table-cell>
|
|
2108
|
+
<fo:table-cell>
|
|
2109
|
+
<fo:block>
|
|
2110
|
+
|
|
2111
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
|
2112
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
|
2113
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
|
2114
|
+
</xsl:if>
|
|
2115
|
+
</xsl:if> -->
|
|
2116
|
+
|
|
2117
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
|
2118
|
+
|
|
2119
|
+
</fo:block>
|
|
2120
|
+
</fo:table-cell>
|
|
2121
|
+
</fo:table-row>
|
|
2122
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
|
2123
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
|
2124
|
+
<fo:table-row>
|
|
2125
|
+
<fo:table-cell>
|
|
2126
|
+
<fo:block margin-top="6pt">
|
|
2127
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
2128
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
|
2129
|
+
</xsl:if>
|
|
2130
|
+
<xsl:text> </xsl:text>
|
|
2131
|
+
</fo:block>
|
|
2132
|
+
</fo:table-cell>
|
|
2133
|
+
<fo:table-cell>
|
|
2134
|
+
<fo:block>
|
|
2135
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
|
2136
|
+
</fo:block>
|
|
2137
|
+
</fo:table-cell>
|
|
2138
|
+
</fo:table-row>
|
|
2139
|
+
</xsl:if>
|
|
2140
|
+
</xsl:if> -->
|
|
2141
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
|
2142
|
+
<xsl:apply-templates/>
|
|
2143
|
+
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
|
2144
|
+
<xsl:apply-templates/>
|
|
2145
|
+
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
|
2146
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
|
2147
|
+
</xsl:template><xsl:template match="*[local-name()='em']">
|
|
2148
|
+
<fo:inline font-style="italic">
|
|
2149
|
+
<xsl:apply-templates/>
|
|
2150
|
+
</fo:inline>
|
|
2151
|
+
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
|
2152
|
+
<fo:inline font-weight="bold">
|
|
2153
|
+
<xsl:apply-templates/>
|
|
2154
|
+
</fo:inline>
|
|
2155
|
+
</xsl:template><xsl:template match="*[local-name()='sup']">
|
|
2156
|
+
<fo:inline font-size="80%" vertical-align="super">
|
|
2157
|
+
<xsl:apply-templates/>
|
|
2158
|
+
</fo:inline>
|
|
2159
|
+
</xsl:template><xsl:template match="*[local-name()='sub']">
|
|
2160
|
+
<fo:inline font-size="80%" vertical-align="sub">
|
|
2161
|
+
<xsl:apply-templates/>
|
|
2162
|
+
</fo:inline>
|
|
2163
|
+
</xsl:template><xsl:template match="*[local-name()='tt']">
|
|
2164
|
+
<fo:inline xsl:use-attribute-sets="tt-style">
|
|
2165
|
+
<xsl:variable name="_font-size">
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
|
|
2169
|
+
|
|
2170
|
+
|
|
2171
|
+
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
|
|
2180
|
+
</xsl:variable>
|
|
2181
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
|
2182
|
+
<xsl:if test="$font-size != ''">
|
|
2183
|
+
<xsl:attribute name="font-size">
|
|
2184
|
+
<xsl:choose>
|
|
2185
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
|
2186
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
|
2187
|
+
</xsl:choose>
|
|
2188
|
+
</xsl:attribute>
|
|
2189
|
+
</xsl:if>
|
|
2190
|
+
<xsl:apply-templates/>
|
|
2191
|
+
</fo:inline>
|
|
2192
|
+
</xsl:template><xsl:template match="*[local-name()='del']">
|
|
2193
|
+
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
|
2194
|
+
<xsl:apply-templates/>
|
|
2195
|
+
</fo:inline>
|
|
2196
|
+
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
|
2197
|
+
<xsl:variable name="text" select="normalize-space(.)"/>
|
|
2198
|
+
<fo:inline font-size="75%">
|
|
2199
|
+
<xsl:if test="string-length($text) > 0">
|
|
2200
|
+
<xsl:call-template name="recursiveSmallCaps">
|
|
2201
|
+
<xsl:with-param name="text" select="$text"/>
|
|
2202
|
+
</xsl:call-template>
|
|
2203
|
+
</xsl:if>
|
|
2204
|
+
</fo:inline>
|
|
2205
|
+
</xsl:template><xsl:template name="recursiveSmallCaps">
|
|
2206
|
+
<xsl:param name="text"/>
|
|
2207
|
+
<xsl:variable name="char" select="substring($text,1,1)"/>
|
|
2208
|
+
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
|
2209
|
+
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
|
2210
|
+
<xsl:choose>
|
|
2211
|
+
<xsl:when test="$char=$upperCase">
|
|
2212
|
+
<fo:inline font-size="{100 div 0.75}%">
|
|
2213
|
+
<xsl:value-of select="$upperCase"/>
|
|
2214
|
+
</fo:inline>
|
|
2215
|
+
</xsl:when>
|
|
2216
|
+
<xsl:otherwise>
|
|
2217
|
+
<xsl:value-of select="$upperCase"/>
|
|
2218
|
+
</xsl:otherwise>
|
|
2219
|
+
</xsl:choose>
|
|
2220
|
+
<xsl:if test="string-length($text) > 1">
|
|
2221
|
+
<xsl:call-template name="recursiveSmallCaps">
|
|
2222
|
+
<xsl:with-param name="text" select="substring($text,2)"/>
|
|
2223
|
+
</xsl:call-template>
|
|
2224
|
+
</xsl:if>
|
|
2225
|
+
</xsl:template><xsl:template name="tokenize">
|
|
2226
|
+
<xsl:param name="text"/>
|
|
2227
|
+
<xsl:param name="separator" select="' '"/>
|
|
2228
|
+
<xsl:choose>
|
|
2229
|
+
<xsl:when test="not(contains($text, $separator))">
|
|
2230
|
+
<word>
|
|
2231
|
+
<xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
|
|
2232
|
+
<xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
|
|
2233
|
+
<xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
|
|
2234
|
+
<xsl:variable name="len_str">
|
|
2235
|
+
<xsl:choose>
|
|
2236
|
+
<xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
|
|
2237
|
+
<xsl:value-of select="$len_str_tmp * 1.5"/>
|
|
2238
|
+
</xsl:when>
|
|
2239
|
+
<xsl:otherwise>
|
|
2240
|
+
<xsl:value-of select="$len_str_tmp"/>
|
|
2241
|
+
</xsl:otherwise>
|
|
2242
|
+
</xsl:choose>
|
|
2243
|
+
</xsl:variable>
|
|
2244
|
+
|
|
2245
|
+
<!-- <xsl:if test="$len_str_no_en_chars div $len_str > 0.8">
|
|
2246
|
+
<xsl:message>
|
|
2247
|
+
div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
|
|
2248
|
+
len_str=<xsl:value-of select="$len_str"/>
|
|
2249
|
+
len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
|
|
2250
|
+
</xsl:message>
|
|
2251
|
+
</xsl:if> -->
|
|
2252
|
+
<!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
|
|
2253
|
+
<len_str><xsl:value-of select="$len_str"/></len_str> -->
|
|
2254
|
+
<xsl:choose>
|
|
2255
|
+
<xsl:when test="$len_str_no_en_chars div $len_str > 0.8"> <!-- means non-english string -->
|
|
2256
|
+
<xsl:value-of select="$len_str - $len_str_no_en_chars"/>
|
|
2257
|
+
</xsl:when>
|
|
2258
|
+
<xsl:otherwise>
|
|
2259
|
+
<xsl:value-of select="$len_str"/>
|
|
2260
|
+
</xsl:otherwise>
|
|
2261
|
+
</xsl:choose>
|
|
2262
|
+
</word>
|
|
2263
|
+
</xsl:when>
|
|
2264
|
+
<xsl:otherwise>
|
|
2265
|
+
<word>
|
|
2266
|
+
<xsl:value-of select="string-length(normalize-space(substring-before($text, $separator)))"/>
|
|
2267
|
+
</word>
|
|
2268
|
+
<xsl:call-template name="tokenize">
|
|
2269
|
+
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
|
2270
|
+
</xsl:call-template>
|
|
2271
|
+
</xsl:otherwise>
|
|
2272
|
+
</xsl:choose>
|
|
2273
|
+
</xsl:template><xsl:template name="max_length">
|
|
2274
|
+
<xsl:param name="words"/>
|
|
2275
|
+
<xsl:for-each select="$words//word">
|
|
2276
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
|
2277
|
+
<xsl:if test="position()=1">
|
|
2278
|
+
<xsl:value-of select="."/>
|
|
2279
|
+
</xsl:if>
|
|
2280
|
+
</xsl:for-each>
|
|
2281
|
+
</xsl:template><xsl:template name="add-zero-spaces-java">
|
|
2282
|
+
<xsl:param name="text" select="."/>
|
|
2283
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
|
2284
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
|
2285
|
+
</xsl:template><xsl:template name="add-zero-spaces">
|
|
2286
|
+
<xsl:param name="text" select="."/>
|
|
2287
|
+
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
|
2288
|
+
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
|
2289
|
+
<xsl:variable name="zero-space-after-colon">:</xsl:variable>
|
|
2290
|
+
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
|
2291
|
+
<xsl:variable name="zero-space-after-underscore">_</xsl:variable>
|
|
2292
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
|
2293
|
+
<xsl:choose>
|
|
2294
|
+
<xsl:when test="contains($text, $zero-space-after-chars)">
|
|
2295
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-chars)"/>
|
|
2296
|
+
<xsl:value-of select="$zero-space-after-chars"/>
|
|
2297
|
+
<xsl:value-of select="$zero-space"/>
|
|
2298
|
+
<xsl:call-template name="add-zero-spaces">
|
|
2299
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-chars)"/>
|
|
2300
|
+
</xsl:call-template>
|
|
2301
|
+
</xsl:when>
|
|
2302
|
+
<xsl:when test="contains($text, $zero-space-after-dot)">
|
|
2303
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-dot)"/>
|
|
2304
|
+
<xsl:value-of select="$zero-space-after-dot"/>
|
|
2305
|
+
<xsl:value-of select="$zero-space"/>
|
|
2306
|
+
<xsl:call-template name="add-zero-spaces">
|
|
2307
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-dot)"/>
|
|
2308
|
+
</xsl:call-template>
|
|
2309
|
+
</xsl:when>
|
|
2310
|
+
<xsl:when test="contains($text, $zero-space-after-colon)">
|
|
2311
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-colon)"/>
|
|
2312
|
+
<xsl:value-of select="$zero-space-after-colon"/>
|
|
2313
|
+
<xsl:value-of select="$zero-space"/>
|
|
2314
|
+
<xsl:call-template name="add-zero-spaces">
|
|
2315
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-colon)"/>
|
|
2316
|
+
</xsl:call-template>
|
|
2317
|
+
</xsl:when>
|
|
2318
|
+
<xsl:when test="contains($text, $zero-space-after-equal)">
|
|
2319
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
|
2320
|
+
<xsl:value-of select="$zero-space-after-equal"/>
|
|
2321
|
+
<xsl:value-of select="$zero-space"/>
|
|
2322
|
+
<xsl:call-template name="add-zero-spaces">
|
|
2323
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
|
2324
|
+
</xsl:call-template>
|
|
2325
|
+
</xsl:when>
|
|
2326
|
+
<xsl:when test="contains($text, $zero-space-after-underscore)">
|
|
2327
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
|
|
2328
|
+
<xsl:value-of select="$zero-space-after-underscore"/>
|
|
2329
|
+
<xsl:value-of select="$zero-space"/>
|
|
2330
|
+
<xsl:call-template name="add-zero-spaces">
|
|
2331
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
|
|
2332
|
+
</xsl:call-template>
|
|
2333
|
+
</xsl:when>
|
|
2334
|
+
<xsl:otherwise>
|
|
2335
|
+
<xsl:value-of select="$text"/>
|
|
2336
|
+
</xsl:otherwise>
|
|
2337
|
+
</xsl:choose>
|
|
2338
|
+
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
|
2339
|
+
<xsl:param name="text" select="."/>
|
|
2340
|
+
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
|
2341
|
+
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
|
2342
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
|
2343
|
+
<xsl:choose>
|
|
2344
|
+
<xsl:when test="contains($text, $zero-space-after-equals)">
|
|
2345
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
|
2346
|
+
<xsl:value-of select="$zero-space-after-equals"/>
|
|
2347
|
+
<xsl:value-of select="$zero-space"/>
|
|
2348
|
+
<xsl:call-template name="add-zero-spaces-equal">
|
|
2349
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
|
2350
|
+
</xsl:call-template>
|
|
2351
|
+
</xsl:when>
|
|
2352
|
+
<xsl:when test="contains($text, $zero-space-after-equal)">
|
|
2353
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
|
2354
|
+
<xsl:value-of select="$zero-space-after-equal"/>
|
|
2355
|
+
<xsl:value-of select="$zero-space"/>
|
|
2356
|
+
<xsl:call-template name="add-zero-spaces-equal">
|
|
2357
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
|
2358
|
+
</xsl:call-template>
|
|
2359
|
+
</xsl:when>
|
|
2360
|
+
<xsl:otherwise>
|
|
2361
|
+
<xsl:value-of select="$text"/>
|
|
2362
|
+
</xsl:otherwise>
|
|
2363
|
+
</xsl:choose>
|
|
2364
|
+
</xsl:template><xsl:template name="getSimpleTable">
|
|
2365
|
+
<xsl:variable name="simple-table">
|
|
2366
|
+
|
|
2367
|
+
<!-- Step 1. colspan processing -->
|
|
2368
|
+
<xsl:variable name="simple-table-colspan">
|
|
2369
|
+
<tbody>
|
|
2370
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
|
2371
|
+
</tbody>
|
|
2372
|
+
</xsl:variable>
|
|
2373
|
+
|
|
2374
|
+
<!-- Step 2. rowspan processing -->
|
|
2375
|
+
<xsl:variable name="simple-table-rowspan">
|
|
2376
|
+
<xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
|
|
2377
|
+
</xsl:variable>
|
|
2378
|
+
|
|
2379
|
+
<xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
|
|
2380
|
+
|
|
2381
|
+
<!-- <xsl:choose>
|
|
2382
|
+
<xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
|
|
2383
|
+
|
|
2384
|
+
</xsl:when>
|
|
2385
|
+
<xsl:otherwise>
|
|
2386
|
+
<xsl:copy-of select="current()"/>
|
|
2387
|
+
</xsl:otherwise>
|
|
2388
|
+
</xsl:choose> -->
|
|
2389
|
+
</xsl:variable>
|
|
2390
|
+
<xsl:copy-of select="$simple-table"/>
|
|
2391
|
+
</xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
|
2392
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
|
2393
|
+
</xsl:template><xsl:template match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
|
|
2394
|
+
<xsl:choose>
|
|
2395
|
+
<xsl:when test="@colspan">
|
|
2396
|
+
<xsl:variable name="td">
|
|
2397
|
+
<xsl:element name="td">
|
|
2398
|
+
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
|
2399
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
|
2400
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
|
2401
|
+
</xsl:element>
|
|
2402
|
+
</xsl:variable>
|
|
2403
|
+
<xsl:call-template name="repeatNode">
|
|
2404
|
+
<xsl:with-param name="count" select="@colspan"/>
|
|
2405
|
+
<xsl:with-param name="node" select="$td"/>
|
|
2406
|
+
</xsl:call-template>
|
|
2407
|
+
</xsl:when>
|
|
2408
|
+
<xsl:otherwise>
|
|
2409
|
+
<xsl:element name="td">
|
|
2410
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
|
2411
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
|
2412
|
+
</xsl:element>
|
|
2413
|
+
</xsl:otherwise>
|
|
2414
|
+
</xsl:choose>
|
|
2415
|
+
</xsl:template><xsl:template match="@colspan" mode="simple-table-colspan"/><xsl:template match="*[local-name()='tr']" mode="simple-table-colspan">
|
|
2416
|
+
<xsl:element name="tr">
|
|
2417
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
|
2418
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
|
2419
|
+
</xsl:element>
|
|
2420
|
+
</xsl:template><xsl:template match="@*|node()" mode="simple-table-colspan">
|
|
2421
|
+
<xsl:copy>
|
|
2422
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
|
|
2423
|
+
</xsl:copy>
|
|
2424
|
+
</xsl:template><xsl:template name="repeatNode">
|
|
2425
|
+
<xsl:param name="count"/>
|
|
2426
|
+
<xsl:param name="node"/>
|
|
2427
|
+
|
|
2428
|
+
<xsl:if test="$count > 0">
|
|
2429
|
+
<xsl:call-template name="repeatNode">
|
|
2430
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
|
2431
|
+
<xsl:with-param name="node" select="$node"/>
|
|
2432
|
+
</xsl:call-template>
|
|
2433
|
+
<xsl:copy-of select="$node"/>
|
|
2434
|
+
</xsl:if>
|
|
2435
|
+
</xsl:template><xsl:template match="@*|node()" mode="simple-table-rowspan">
|
|
2436
|
+
<xsl:copy>
|
|
2437
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
|
|
2438
|
+
</xsl:copy>
|
|
2439
|
+
</xsl:template><xsl:template match="tbody" mode="simple-table-rowspan">
|
|
2440
|
+
<xsl:copy>
|
|
2441
|
+
<xsl:copy-of select="tr[1]"/>
|
|
2442
|
+
<xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
|
|
2443
|
+
<xsl:with-param name="previousRow" select="tr[1]"/>
|
|
2444
|
+
</xsl:apply-templates>
|
|
2445
|
+
</xsl:copy>
|
|
2446
|
+
</xsl:template><xsl:template match="tr" mode="simple-table-rowspan">
|
|
2447
|
+
<xsl:param name="previousRow"/>
|
|
2448
|
+
<xsl:variable name="currentRow" select="."/>
|
|
2449
|
+
|
|
2450
|
+
<xsl:variable name="normalizedTDs">
|
|
2451
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//td">
|
|
2452
|
+
<xsl:choose>
|
|
2453
|
+
<xsl:when test="@rowspan > 1">
|
|
2454
|
+
<xsl:copy>
|
|
2455
|
+
<xsl:attribute name="rowspan">
|
|
2456
|
+
<xsl:value-of select="@rowspan - 1"/>
|
|
2457
|
+
</xsl:attribute>
|
|
2458
|
+
<xsl:copy-of select="@*[not(name() = 'rowspan')]"/>
|
|
2459
|
+
<xsl:copy-of select="node()"/>
|
|
2460
|
+
</xsl:copy>
|
|
2461
|
+
</xsl:when>
|
|
2462
|
+
<xsl:otherwise>
|
|
2463
|
+
<xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
|
|
2464
|
+
</xsl:otherwise>
|
|
2465
|
+
</xsl:choose>
|
|
2466
|
+
</xsl:for-each>
|
|
2467
|
+
</xsl:variable>
|
|
2468
|
+
|
|
2469
|
+
<xsl:variable name="newRow">
|
|
2470
|
+
<xsl:copy>
|
|
2471
|
+
<xsl:copy-of select="$currentRow/@*"/>
|
|
2472
|
+
<xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
|
|
2473
|
+
</xsl:copy>
|
|
2474
|
+
</xsl:variable>
|
|
2475
|
+
<xsl:copy-of select="$newRow"/>
|
|
2476
|
+
|
|
2477
|
+
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
|
2478
|
+
<xsl:with-param name="previousRow" select="$newRow"/>
|
|
2479
|
+
</xsl:apply-templates>
|
|
2480
|
+
</xsl:template><xsl:template name="getLang">
|
|
2481
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
|
2482
|
+
<xsl:choose>
|
|
2483
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
|
2484
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
|
2485
|
+
</xsl:choose>
|
|
2486
|
+
</xsl:template><xsl:template name="capitalizeWords">
|
|
2487
|
+
<xsl:param name="str"/>
|
|
2488
|
+
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
|
2489
|
+
<xsl:choose>
|
|
2490
|
+
<xsl:when test="contains($str2, ' ')">
|
|
2491
|
+
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
|
2492
|
+
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
|
2493
|
+
<xsl:value-of select="substring($substr, 2)"/> -->
|
|
2494
|
+
<xsl:call-template name="capitalize">
|
|
2495
|
+
<xsl:with-param name="str" select="$substr"/>
|
|
2496
|
+
</xsl:call-template>
|
|
2497
|
+
<xsl:text> </xsl:text>
|
|
2498
|
+
<xsl:call-template name="capitalizeWords">
|
|
2499
|
+
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
|
2500
|
+
</xsl:call-template>
|
|
2501
|
+
</xsl:when>
|
|
2502
|
+
<xsl:otherwise>
|
|
2503
|
+
<!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
|
2504
|
+
<xsl:value-of select="substring($str2, 2)"/> -->
|
|
2505
|
+
<xsl:call-template name="capitalize">
|
|
2506
|
+
<xsl:with-param name="str" select="$str2"/>
|
|
2507
|
+
</xsl:call-template>
|
|
2508
|
+
</xsl:otherwise>
|
|
2509
|
+
</xsl:choose>
|
|
2510
|
+
</xsl:template><xsl:template name="capitalize">
|
|
2511
|
+
<xsl:param name="str"/>
|
|
2512
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
|
2513
|
+
<xsl:value-of select="substring($str, 2)"/>
|
|
2514
|
+
</xsl:template><xsl:template match="mathml:math">
|
|
2515
|
+
<fo:inline font-family="STIX2Math">
|
|
2516
|
+
<xsl:variable name="mathml">
|
|
2517
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
|
2518
|
+
</xsl:variable>
|
|
2519
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
|
2520
|
+
<!-- <xsl:copy-of select="."/> -->
|
|
2521
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
|
2522
|
+
</fo:instream-foreign-object>
|
|
2523
|
+
</fo:inline>
|
|
2524
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
|
2525
|
+
<xsl:copy>
|
|
2526
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
|
2527
|
+
</xsl:copy>
|
|
2528
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
|
2529
|
+
<xsl:copy>
|
|
2530
|
+
<!-- replace start and end spaces to non-break space -->
|
|
2531
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
|
2532
|
+
</xsl:copy>
|
|
2533
|
+
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
|
2534
|
+
<xsl:variable name="target">
|
|
2535
|
+
<xsl:choose>
|
|
2536
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
|
2537
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
|
2538
|
+
</xsl:when>
|
|
2539
|
+
<xsl:otherwise>
|
|
2540
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
|
2541
|
+
</xsl:otherwise>
|
|
2542
|
+
</xsl:choose>
|
|
2543
|
+
</xsl:variable>
|
|
2544
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
|
2545
|
+
<xsl:choose>
|
|
2546
|
+
<xsl:when test="$target = ''">
|
|
2547
|
+
<xsl:apply-templates/>
|
|
2548
|
+
</xsl:when>
|
|
2549
|
+
<xsl:otherwise>
|
|
2550
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
|
2551
|
+
<xsl:choose>
|
|
2552
|
+
<xsl:when test="normalize-space(.) = ''">
|
|
2553
|
+
<xsl:value-of select="$target"/>
|
|
2554
|
+
</xsl:when>
|
|
2555
|
+
<xsl:otherwise>
|
|
2556
|
+
<xsl:apply-templates/>
|
|
2557
|
+
</xsl:otherwise>
|
|
2558
|
+
</xsl:choose>
|
|
2559
|
+
</fo:basic-link>
|
|
2560
|
+
</xsl:otherwise>
|
|
2561
|
+
</xsl:choose>
|
|
2562
|
+
</fo:inline>
|
|
2563
|
+
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
|
2564
|
+
<fo:inline id="{@id}"/>
|
|
2565
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
|
2566
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
|
2567
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
|
2568
|
+
</fo:block>
|
|
2569
|
+
<xsl:apply-templates/>
|
|
2570
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
|
2571
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
2572
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
|
2573
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
|
2574
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2575
|
+
</fo:block>
|
|
2576
|
+
<xsl:apply-templates/>
|
|
2577
|
+
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
|
2578
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
|
2579
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
|
2580
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
|
2581
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
|
2582
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
|
2583
|
+
<fo:inline>
|
|
2584
|
+
<xsl:apply-templates>
|
|
2585
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
|
2586
|
+
</xsl:apply-templates>
|
|
2587
|
+
</fo:inline>
|
|
2588
|
+
</fo:block>
|
|
2589
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
|
2590
|
+
<xsl:param name="callout"/>
|
|
2591
|
+
<fo:inline id="{@id}">
|
|
2592
|
+
<!-- for first p in annotation, put <x> -->
|
|
2593
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
|
2594
|
+
<xsl:apply-templates/>
|
|
2595
|
+
</fo:inline>
|
|
2596
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
|
2597
|
+
<xsl:variable name="title-modified">
|
|
2598
|
+
<xsl:call-template name="getTitle">
|
|
2599
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
|
2600
|
+
</xsl:call-template>
|
|
2601
|
+
</xsl:variable>
|
|
2602
|
+
<xsl:choose>
|
|
2603
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
|
2604
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
|
2605
|
+
</xsl:choose>
|
|
2606
|
+
<xsl:apply-templates/>
|
|
2607
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
|
2608
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
2609
|
+
|
|
2610
|
+
<xsl:apply-templates/>
|
|
2611
|
+
</fo:basic-link>
|
|
2612
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
|
2613
|
+
<fo:block-container margin-left="0mm">
|
|
2614
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
2615
|
+
<xsl:attribute name="margin-left">
|
|
2616
|
+
<xsl:choose>
|
|
2617
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
2618
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
2619
|
+
</xsl:choose>
|
|
2620
|
+
</xsl:attribute>
|
|
2621
|
+
|
|
2622
|
+
</xsl:if>
|
|
2623
|
+
<fo:block-container margin-left="0mm">
|
|
2624
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
|
2625
|
+
<xsl:apply-templates/>
|
|
2626
|
+
</fo:block>
|
|
2627
|
+
</fo:block-container>
|
|
2628
|
+
</fo:block-container>
|
|
2629
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
|
2630
|
+
<fo:inline>
|
|
2631
|
+
<xsl:apply-templates/>
|
|
2632
|
+
</fo:inline>
|
|
2633
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
|
|
2634
|
+
<fo:inline>
|
|
2635
|
+
<xsl:apply-templates/>
|
|
2636
|
+
</fo:inline>
|
|
2637
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
|
|
2638
|
+
<xsl:if test="normalize-space() != ''">
|
|
2639
|
+
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
|
2640
|
+
</xsl:if>
|
|
2641
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
|
|
2642
|
+
|
|
2643
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
|
2644
|
+
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
<fo:block-container margin-left="0mm">
|
|
2649
|
+
|
|
2650
|
+
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
|
|
2655
|
+
|
|
2656
|
+
|
|
2657
|
+
<fo:block>
|
|
2658
|
+
|
|
2659
|
+
|
|
2660
|
+
|
|
2661
|
+
|
|
2662
|
+
<fo:inline xsl:use-attribute-sets="note-name-style">
|
|
2663
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2664
|
+
</fo:inline>
|
|
2665
|
+
<xsl:apply-templates/>
|
|
2666
|
+
</fo:block>
|
|
2667
|
+
|
|
2668
|
+
|
|
2669
|
+
</fo:block-container>
|
|
2670
|
+
</fo:block-container>
|
|
2671
|
+
|
|
2672
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
|
2673
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
|
2674
|
+
<xsl:choose>
|
|
2675
|
+
<xsl:when test="$num = 1">
|
|
2676
|
+
<fo:inline xsl:use-attribute-sets="note-p-style">
|
|
2677
|
+
<xsl:apply-templates/>
|
|
2678
|
+
</fo:inline>
|
|
2679
|
+
</xsl:when>
|
|
2680
|
+
<xsl:otherwise>
|
|
2681
|
+
<fo:block xsl:use-attribute-sets="note-p-style">
|
|
2682
|
+
<xsl:apply-templates/>
|
|
2683
|
+
</fo:block>
|
|
2684
|
+
</xsl:otherwise>
|
|
2685
|
+
</xsl:choose>
|
|
2686
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
|
2687
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
|
2688
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
|
2689
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2690
|
+
</fo:inline>
|
|
2691
|
+
<xsl:apply-templates/>
|
|
2692
|
+
</fo:block>
|
|
2693
|
+
</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">
|
|
2694
|
+
<xsl:param name="sfx"/>
|
|
2695
|
+
<xsl:variable name="suffix">
|
|
2696
|
+
<xsl:choose>
|
|
2697
|
+
<xsl:when test="$sfx != ''">
|
|
2698
|
+
<xsl:value-of select="$sfx"/>
|
|
2699
|
+
</xsl:when>
|
|
2700
|
+
<xsl:otherwise>
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
</xsl:otherwise>
|
|
2704
|
+
</xsl:choose>
|
|
2705
|
+
</xsl:variable>
|
|
2706
|
+
<xsl:if test="normalize-space() != ''">
|
|
2707
|
+
<xsl:apply-templates/>
|
|
2708
|
+
<xsl:value-of select="$suffix"/>
|
|
2709
|
+
</xsl:if>
|
|
2710
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
|
|
2711
|
+
<xsl:param name="sfx"/>
|
|
2712
|
+
<xsl:variable name="suffix">
|
|
2713
|
+
<xsl:choose>
|
|
2714
|
+
<xsl:when test="$sfx != ''">
|
|
2715
|
+
<xsl:value-of select="$sfx"/>
|
|
2716
|
+
</xsl:when>
|
|
2717
|
+
<xsl:otherwise>
|
|
2718
|
+
|
|
2719
|
+
|
|
2720
|
+
</xsl:otherwise>
|
|
2721
|
+
</xsl:choose>
|
|
2722
|
+
</xsl:variable>
|
|
2723
|
+
<xsl:if test="normalize-space() != ''">
|
|
2724
|
+
<xsl:apply-templates/>
|
|
2725
|
+
<xsl:value-of select="$suffix"/>
|
|
2726
|
+
</xsl:if>
|
|
2727
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
|
2728
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
2729
|
+
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
|
2730
|
+
<fo:block id="{@id}">
|
|
2731
|
+
<xsl:apply-templates/>
|
|
2732
|
+
</fo:block>
|
|
2733
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
|
2734
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
|
|
2738
|
+
<xsl:apply-templates/>
|
|
2739
|
+
</fo:block>
|
|
2740
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
|
2741
|
+
<xsl:if test="normalize-space() != ''">
|
|
2742
|
+
<fo:inline>
|
|
2743
|
+
<xsl:apply-templates/>
|
|
2744
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
|
2745
|
+
<xsl:text>.</xsl:text>
|
|
2746
|
+
</xsl:if> -->
|
|
2747
|
+
</fo:inline>
|
|
2748
|
+
</xsl:if>
|
|
2749
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
|
2750
|
+
<fo:block-container id="{@id}">
|
|
2751
|
+
<fo:block>
|
|
2752
|
+
<xsl:apply-templates/>
|
|
2753
|
+
</fo:block>
|
|
2754
|
+
<xsl:call-template name="fn_display_figure"/>
|
|
2755
|
+
<xsl:for-each select="*[local-name() = 'note']">
|
|
2756
|
+
<xsl:call-template name="note"/>
|
|
2757
|
+
</xsl:for-each>
|
|
2758
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2759
|
+
</fo:block-container>
|
|
2760
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
|
2761
|
+
<fo:block id="{@id}">
|
|
2762
|
+
<xsl:apply-templates/>
|
|
2763
|
+
</fo:block>
|
|
2764
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
|
2765
|
+
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
|
2766
|
+
<xsl:apply-templates/>
|
|
2767
|
+
</fo:block>
|
|
2768
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
|
2769
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
|
2770
|
+
|
|
2771
|
+
|
|
2772
|
+
<xsl:variable name="src">
|
|
2773
|
+
<xsl:choose>
|
|
2774
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
|
2775
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
|
2776
|
+
</xsl:when>
|
|
2777
|
+
<xsl:otherwise>
|
|
2778
|
+
<xsl:value-of select="@src"/>
|
|
2779
|
+
</xsl:otherwise>
|
|
2780
|
+
</xsl:choose>
|
|
2781
|
+
</xsl:variable>
|
|
2782
|
+
|
|
2783
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
|
2784
|
+
</fo:block>
|
|
2785
|
+
</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">
|
|
2786
|
+
<xsl:apply-templates mode="contents"/>
|
|
2787
|
+
<xsl:text> </xsl:text>
|
|
2788
|
+
</xsl:template><xsl:template match="text()" mode="contents">
|
|
2789
|
+
<xsl:value-of select="."/>
|
|
2790
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
|
2791
|
+
<xsl:if test="normalize-space() != ''">
|
|
2792
|
+
<fo:block xsl:use-attribute-sets="figure-name-style">
|
|
2793
|
+
|
|
2794
|
+
<xsl:apply-templates/>
|
|
2795
|
+
</fo:block>
|
|
2796
|
+
</xsl:if>
|
|
2797
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
|
2798
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
2799
|
+
<!-- <xsl:text> </xsl:text> -->
|
|
2800
|
+
</xsl:template><xsl:template name="getSection">
|
|
2801
|
+
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
|
2802
|
+
</xsl:template><xsl:template name="getName">
|
|
2803
|
+
<xsl:choose>
|
|
2804
|
+
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
|
2805
|
+
<xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
|
2806
|
+
</xsl:when>
|
|
2807
|
+
<xsl:otherwise>
|
|
2808
|
+
<xsl:copy-of select="*[local-name() = 'title']/node()"/>
|
|
2809
|
+
</xsl:otherwise>
|
|
2810
|
+
</xsl:choose>
|
|
2811
|
+
</xsl:template><xsl:template name="insertTitleAsListItem">
|
|
2812
|
+
<xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
|
|
2813
|
+
<xsl:variable name="section">
|
|
2814
|
+
<xsl:for-each select="..">
|
|
2815
|
+
<xsl:call-template name="getSection"/>
|
|
2816
|
+
</xsl:for-each>
|
|
2817
|
+
</xsl:variable>
|
|
2818
|
+
<fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
|
|
2819
|
+
<fo:list-item>
|
|
2820
|
+
<fo:list-item-label end-indent="label-end()">
|
|
2821
|
+
<fo:block>
|
|
2822
|
+
<xsl:value-of select="$section"/>
|
|
2823
|
+
</fo:block>
|
|
2824
|
+
</fo:list-item-label>
|
|
2825
|
+
<fo:list-item-body start-indent="body-start()">
|
|
2826
|
+
<fo:block>
|
|
2827
|
+
<xsl:choose>
|
|
2828
|
+
<xsl:when test="*[local-name() = 'tab']">
|
|
2829
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
|
2830
|
+
</xsl:when>
|
|
2831
|
+
<xsl:otherwise>
|
|
2832
|
+
<xsl:apply-templates/>
|
|
2833
|
+
</xsl:otherwise>
|
|
2834
|
+
</xsl:choose>
|
|
2835
|
+
</fo:block>
|
|
2836
|
+
</fo:list-item-body>
|
|
2837
|
+
</fo:list-item>
|
|
2838
|
+
</fo:list-block>
|
|
2839
|
+
</xsl:template><xsl:template name="extractTitle">
|
|
2840
|
+
<xsl:choose>
|
|
2841
|
+
<xsl:when test="*[local-name() = 'tab']">
|
|
2842
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
|
2843
|
+
</xsl:when>
|
|
2844
|
+
<xsl:otherwise>
|
|
2845
|
+
<xsl:apply-templates/>
|
|
2846
|
+
</xsl:otherwise>
|
|
2847
|
+
</xsl:choose>
|
|
2848
|
+
</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">
|
|
2849
|
+
<xsl:text> </xsl:text>
|
|
2850
|
+
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
|
2851
|
+
<xsl:copy>
|
|
2852
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
2853
|
+
</xsl:copy>
|
|
2854
|
+
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
|
2855
|
+
<xsl:text> </xsl:text>
|
|
2856
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
|
2857
|
+
|
|
2858
|
+
<fo:block-container margin-left="0mm">
|
|
2859
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
2860
|
+
<xsl:attribute name="margin-left">
|
|
2861
|
+
<xsl:choose>
|
|
2862
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
2863
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
2864
|
+
</xsl:choose>
|
|
2865
|
+
</xsl:attribute>
|
|
2866
|
+
|
|
2867
|
+
</xsl:if>
|
|
2868
|
+
<fo:block-container margin-left="0mm">
|
|
2869
|
+
|
|
2870
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
2871
|
+
<xsl:variable name="_font-size">
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
|
+
|
|
2880
|
+
|
|
2881
|
+
|
|
2882
|
+
|
|
2883
|
+
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
|
+
</xsl:variable>
|
|
2887
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
|
2888
|
+
<xsl:if test="$font-size != ''">
|
|
2889
|
+
<xsl:attribute name="font-size">
|
|
2890
|
+
<xsl:choose>
|
|
2891
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
|
2892
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
|
2893
|
+
</xsl:choose>
|
|
2894
|
+
</xsl:attribute>
|
|
2895
|
+
</xsl:if>
|
|
2896
|
+
<xsl:apply-templates/>
|
|
2897
|
+
</fo:block>
|
|
2898
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2899
|
+
|
|
2900
|
+
</fo:block-container>
|
|
2901
|
+
</fo:block-container>
|
|
2902
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
|
2903
|
+
<xsl:variable name="text">
|
|
2904
|
+
<xsl:call-template name="add-zero-spaces-equal"/>
|
|
2905
|
+
</xsl:variable>
|
|
2906
|
+
<xsl:call-template name="add-zero-spaces-java">
|
|
2907
|
+
<xsl:with-param name="text" select="$text"/>
|
|
2908
|
+
</xsl:call-template>
|
|
2909
|
+
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
|
2910
|
+
<xsl:if test="normalize-space() != ''">
|
|
2911
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
|
2912
|
+
<xsl:apply-templates/>
|
|
2913
|
+
</fo:block>
|
|
2914
|
+
</xsl:if>
|
|
2915
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']">
|
|
2916
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
|
2917
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2918
|
+
<xsl:apply-templates/>
|
|
2919
|
+
</fo:block>
|
|
2920
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
|
|
2921
|
+
<xsl:if test="normalize-space() != ''">
|
|
2922
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
|
2923
|
+
<xsl:apply-templates/>
|
|
2924
|
+
|
|
2925
|
+
</fo:block>
|
|
2926
|
+
</xsl:if>
|
|
2927
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
|
|
2928
|
+
<fo:block xsl:use-attribute-sets="permission-label-style">
|
|
2929
|
+
<xsl:apply-templates/>
|
|
2930
|
+
</fo:block>
|
|
2931
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']">
|
|
2932
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
|
2933
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2934
|
+
<xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
|
|
2935
|
+
<xsl:apply-templates select="@obligation" mode="presentation"/>
|
|
2936
|
+
<xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
|
|
2937
|
+
<xsl:apply-templates/>
|
|
2938
|
+
</fo:block>
|
|
2939
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
|
|
2940
|
+
<xsl:if test="normalize-space() != ''">
|
|
2941
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
|
2942
|
+
|
|
2943
|
+
<xsl:apply-templates/>
|
|
2944
|
+
|
|
2945
|
+
</fo:block>
|
|
2946
|
+
</xsl:if>
|
|
2947
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
|
|
2948
|
+
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
|
2949
|
+
<xsl:apply-templates/>
|
|
2950
|
+
</fo:block>
|
|
2951
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
|
|
2952
|
+
<fo:block>
|
|
2953
|
+
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
|
2954
|
+
</fo:block>
|
|
2955
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
|
2956
|
+
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
|
2957
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
|
2958
|
+
</fo:block>
|
|
2959
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
|
2960
|
+
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
|
2961
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
|
2962
|
+
</fo:block>
|
|
2963
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
|
2964
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
|
2965
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2966
|
+
<xsl:apply-templates/>
|
|
2967
|
+
</fo:block>
|
|
2968
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
|
|
2969
|
+
<xsl:if test="normalize-space() != ''">
|
|
2970
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
|
2971
|
+
<xsl:apply-templates/>
|
|
2972
|
+
|
|
2973
|
+
</fo:block>
|
|
2974
|
+
</xsl:if>
|
|
2975
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
|
|
2976
|
+
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
|
2977
|
+
<xsl:apply-templates/>
|
|
2978
|
+
</fo:block>
|
|
2979
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
2980
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
|
2981
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
2982
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
2983
|
+
</xsl:if>
|
|
2984
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
|
2985
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
|
2986
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
2987
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
|
2988
|
+
</xsl:if>
|
|
2989
|
+
<xsl:variable name="simple-table">
|
|
2990
|
+
<xsl:call-template name="getSimpleTable"/>
|
|
2991
|
+
</xsl:variable>
|
|
2992
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
|
2993
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
|
2994
|
+
<!-- <fo:table-column column-width="35mm"/>
|
|
2995
|
+
<fo:table-column column-width="115mm"/> -->
|
|
2996
|
+
<fo:table-column column-width="30%"/>
|
|
2997
|
+
<fo:table-column column-width="70%"/>
|
|
2998
|
+
</xsl:if>
|
|
2999
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3000
|
+
</fo:table>
|
|
3001
|
+
<!-- fn processing -->
|
|
3002
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
|
3003
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
|
3004
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
|
3005
|
+
<xsl:call-template name="fn_display"/>
|
|
3006
|
+
</fo:block>
|
|
3007
|
+
</xsl:for-each>
|
|
3008
|
+
</xsl:if>
|
|
3009
|
+
</fo:block-container>
|
|
3010
|
+
</fo:block-container>
|
|
3011
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
|
3012
|
+
<fo:table-header>
|
|
3013
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3014
|
+
</fo:table-header>
|
|
3015
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
|
3016
|
+
<fo:table-body>
|
|
3017
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3018
|
+
</fo:table-body>
|
|
3019
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
|
3020
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
|
3021
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
|
3022
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
|
3023
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
|
3024
|
+
</xsl:if>
|
|
3025
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
|
3026
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
|
3027
|
+
</xsl:if>
|
|
3028
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
|
3029
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
|
3030
|
+
</xsl:if>
|
|
3031
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3032
|
+
</fo:table-row>
|
|
3033
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
|
3034
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
|
3035
|
+
<xsl:attribute name="text-align">
|
|
3036
|
+
<xsl:choose>
|
|
3037
|
+
<xsl:when test="@align">
|
|
3038
|
+
<xsl:value-of select="@align"/>
|
|
3039
|
+
</xsl:when>
|
|
3040
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
3041
|
+
</xsl:choose>
|
|
3042
|
+
</xsl:attribute>
|
|
3043
|
+
<xsl:if test="@colspan">
|
|
3044
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3045
|
+
<xsl:value-of select="@colspan"/>
|
|
3046
|
+
</xsl:attribute>
|
|
3047
|
+
</xsl:if>
|
|
3048
|
+
<xsl:if test="@rowspan">
|
|
3049
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3050
|
+
<xsl:value-of select="@rowspan"/>
|
|
3051
|
+
</xsl:attribute>
|
|
3052
|
+
</xsl:if>
|
|
3053
|
+
<xsl:call-template name="display-align"/>
|
|
3054
|
+
|
|
3055
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3056
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3057
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
|
3058
|
+
</xsl:if>
|
|
3059
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
|
3060
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3061
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3062
|
+
</xsl:if> -->
|
|
3063
|
+
|
|
3064
|
+
<fo:block>
|
|
3065
|
+
<xsl:apply-templates/>
|
|
3066
|
+
</fo:block>
|
|
3067
|
+
</fo:table-cell>
|
|
3068
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
|
3069
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
|
3070
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3071
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
|
3072
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
|
3073
|
+
</xsl:if>
|
|
3074
|
+
<xsl:attribute name="text-align">
|
|
3075
|
+
<xsl:choose>
|
|
3076
|
+
<xsl:when test="@align">
|
|
3077
|
+
<xsl:value-of select="@align"/>
|
|
3078
|
+
</xsl:when>
|
|
3079
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
3080
|
+
</xsl:choose>
|
|
3081
|
+
</xsl:attribute>
|
|
3082
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
|
3083
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
3084
|
+
</xsl:if>
|
|
3085
|
+
<xsl:if test="@colspan">
|
|
3086
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3087
|
+
<xsl:value-of select="@colspan"/>
|
|
3088
|
+
</xsl:attribute>
|
|
3089
|
+
</xsl:if>
|
|
3090
|
+
<xsl:if test="@rowspan">
|
|
3091
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3092
|
+
<xsl:value-of select="@rowspan"/>
|
|
3093
|
+
</xsl:attribute>
|
|
3094
|
+
</xsl:if>
|
|
3095
|
+
<xsl:call-template name="display-align"/>
|
|
3096
|
+
|
|
3097
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3098
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
|
3099
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3100
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
|
3101
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3102
|
+
</xsl:if>
|
|
3103
|
+
</xsl:if> -->
|
|
3104
|
+
<!-- 2nd line and below -->
|
|
3105
|
+
|
|
3106
|
+
<fo:block>
|
|
3107
|
+
<xsl:apply-templates/>
|
|
3108
|
+
</fo:block>
|
|
3109
|
+
</fo:table-cell>
|
|
3110
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
|
3111
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
|
3112
|
+
<xsl:apply-templates/>
|
|
3113
|
+
</fo:block>
|
|
3114
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
|
3115
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
|
3116
|
+
<xsl:apply-templates/>
|
|
3117
|
+
</fo:block>
|
|
3118
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
|
3119
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
|
3120
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
3121
|
+
<xsl:apply-templates/>
|
|
3122
|
+
</fo:block>
|
|
3123
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
|
|
3124
|
+
<xsl:if test="normalize-space() != ''">
|
|
3125
|
+
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
|
3126
|
+
<xsl:apply-templates/>
|
|
3127
|
+
</fo:inline>
|
|
3128
|
+
</xsl:if>
|
|
3129
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
|
3130
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
3131
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
|
3132
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
|
3133
|
+
|
|
3134
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
3135
|
+
|
|
3136
|
+
<xsl:variable name="element">
|
|
3137
|
+
block
|
|
3138
|
+
|
|
3139
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
|
3140
|
+
</xsl:variable>
|
|
3141
|
+
|
|
3142
|
+
<xsl:choose>
|
|
3143
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
|
3144
|
+
<fo:block xsl:use-attribute-sets="example-body-style">
|
|
3145
|
+
<xsl:apply-templates/>
|
|
3146
|
+
</fo:block>
|
|
3147
|
+
</xsl:when>
|
|
3148
|
+
<xsl:otherwise>
|
|
3149
|
+
<fo:inline>
|
|
3150
|
+
<xsl:apply-templates/>
|
|
3151
|
+
</fo:inline>
|
|
3152
|
+
</xsl:otherwise>
|
|
3153
|
+
</xsl:choose>
|
|
3154
|
+
|
|
3155
|
+
</fo:block>
|
|
3156
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
|
|
3157
|
+
|
|
3158
|
+
<xsl:variable name="element">
|
|
3159
|
+
block
|
|
3160
|
+
|
|
3161
|
+
</xsl:variable>
|
|
3162
|
+
<xsl:choose>
|
|
3163
|
+
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
|
3164
|
+
<fo:inline>
|
|
3165
|
+
<xsl:apply-templates/>
|
|
3166
|
+
</fo:inline>
|
|
3167
|
+
</xsl:when>
|
|
3168
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
|
3169
|
+
<fo:block xsl:use-attribute-sets="example-name-style">
|
|
3170
|
+
<xsl:apply-templates/>
|
|
3171
|
+
</fo:block>
|
|
3172
|
+
</xsl:when>
|
|
3173
|
+
<xsl:otherwise>
|
|
3174
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
|
3175
|
+
<xsl:apply-templates/>
|
|
3176
|
+
</fo:inline>
|
|
3177
|
+
</xsl:otherwise>
|
|
3178
|
+
</xsl:choose>
|
|
3179
|
+
|
|
3180
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
|
3181
|
+
|
|
3182
|
+
<xsl:variable name="element">
|
|
3183
|
+
block
|
|
3184
|
+
|
|
3185
|
+
</xsl:variable>
|
|
3186
|
+
<xsl:choose>
|
|
3187
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
|
3188
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
|
3189
|
+
|
|
3190
|
+
<xsl:apply-templates/>
|
|
3191
|
+
</fo:block>
|
|
3192
|
+
</xsl:when>
|
|
3193
|
+
<xsl:otherwise>
|
|
3194
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
|
3195
|
+
<xsl:apply-templates/>
|
|
3196
|
+
</fo:inline>
|
|
3197
|
+
</xsl:otherwise>
|
|
3198
|
+
</xsl:choose>
|
|
3199
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
|
3200
|
+
<fo:block xsl:use-attribute-sets="termsource-style">
|
|
3201
|
+
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
|
3202
|
+
<xsl:variable name="termsource_text">
|
|
3203
|
+
<xsl:apply-templates/>
|
|
3204
|
+
</xsl:variable>
|
|
3205
|
+
|
|
3206
|
+
<xsl:choose>
|
|
3207
|
+
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
|
3208
|
+
<xsl:apply-templates/>
|
|
3209
|
+
</xsl:when>
|
|
3210
|
+
<xsl:otherwise>
|
|
3211
|
+
|
|
3212
|
+
<xsl:apply-templates/>
|
|
3213
|
+
|
|
3214
|
+
</xsl:otherwise>
|
|
3215
|
+
</xsl:choose>
|
|
3216
|
+
</fo:block>
|
|
3217
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
|
3218
|
+
<xsl:if test="normalize-space() != ''">
|
|
3219
|
+
<xsl:value-of select="."/>
|
|
3220
|
+
</xsl:if>
|
|
3221
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
|
3222
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
3223
|
+
|
|
3224
|
+
<fo:inline>
|
|
3225
|
+
|
|
3226
|
+
<xsl:call-template name="getTitle">
|
|
3227
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
|
3228
|
+
</xsl:call-template>
|
|
3229
|
+
<xsl:text>: </xsl:text>
|
|
3230
|
+
</fo:inline>
|
|
3231
|
+
|
|
3232
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
3233
|
+
<xsl:apply-templates/>
|
|
3234
|
+
</fo:inline>
|
|
3235
|
+
</fo:basic-link>
|
|
3236
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
|
3237
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
3238
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
|
3239
|
+
<xsl:if test="normalize-space() != ''">
|
|
3240
|
+
<xsl:value-of select="."/>
|
|
3241
|
+
</xsl:if>
|
|
3242
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
|
3243
|
+
<fo:block-container margin-left="0mm">
|
|
3244
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
3245
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
|
3246
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
3247
|
+
</xsl:if>
|
|
3248
|
+
</xsl:if>
|
|
3249
|
+
|
|
3250
|
+
<fo:block-container margin-left="0mm">
|
|
3251
|
+
|
|
3252
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
|
3253
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
|
3254
|
+
</fo:block>
|
|
3255
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
|
3256
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
3257
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
3258
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
|
3259
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
|
3260
|
+
</fo:block>
|
|
3261
|
+
</xsl:if>
|
|
3262
|
+
|
|
3263
|
+
</fo:block-container>
|
|
3264
|
+
</fo:block-container>
|
|
3265
|
+
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
|
3266
|
+
<xsl:if test="../*[local-name() = 'author']">
|
|
3267
|
+
<xsl:text>, </xsl:text>
|
|
3268
|
+
</xsl:if>
|
|
3269
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
3270
|
+
<xsl:apply-templates/>
|
|
3271
|
+
</fo:basic-link>
|
|
3272
|
+
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
|
3273
|
+
<xsl:text>— </xsl:text>
|
|
3274
|
+
<xsl:apply-templates/>
|
|
3275
|
+
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
|
3276
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
|
3277
|
+
<xsl:if test="@type = 'footnote'">
|
|
3278
|
+
|
|
3279
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
3280
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
3281
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
3282
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
3283
|
+
|
|
3284
|
+
|
|
3285
|
+
</xsl:if>
|
|
3286
|
+
|
|
3287
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
3288
|
+
|
|
3289
|
+
<xsl:if test="@type = 'inline'">
|
|
3290
|
+
|
|
3291
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
|
3292
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
3293
|
+
|
|
3294
|
+
|
|
3295
|
+
|
|
3296
|
+
</xsl:if>
|
|
3297
|
+
|
|
3298
|
+
|
|
3299
|
+
<xsl:apply-templates/>
|
|
3300
|
+
</fo:basic-link>
|
|
3301
|
+
</fo:inline>
|
|
3302
|
+
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
|
3303
|
+
<!-- zero-space char -->
|
|
3304
|
+
<xsl:variable name="depth">
|
|
3305
|
+
<xsl:call-template name="getLevel">
|
|
3306
|
+
<xsl:with-param name="depth" select="../@depth"/>
|
|
3307
|
+
</xsl:call-template>
|
|
3308
|
+
</xsl:variable>
|
|
3309
|
+
|
|
3310
|
+
<xsl:variable name="padding">
|
|
3311
|
+
|
|
3312
|
+
|
|
3313
|
+
|
|
3314
|
+
|
|
3315
|
+
|
|
3316
|
+
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
|
|
3320
|
+
|
|
3321
|
+
|
|
3322
|
+
|
|
3323
|
+
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
|
|
3327
|
+
3
|
|
3328
|
+
|
|
3329
|
+
</xsl:variable>
|
|
3330
|
+
|
|
3331
|
+
<xsl:variable name="padding-right">
|
|
3332
|
+
<xsl:choose>
|
|
3333
|
+
<xsl:when test="normalize-space($padding) = ''">0</xsl:when>
|
|
3334
|
+
<xsl:otherwise>
|
|
3335
|
+
<xsl:value-of select="normalize-space($padding)"/>
|
|
3336
|
+
</xsl:otherwise>
|
|
3337
|
+
</xsl:choose>
|
|
3338
|
+
</xsl:variable>
|
|
3339
|
+
|
|
3340
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
|
3341
|
+
|
|
3342
|
+
<xsl:choose>
|
|
3343
|
+
<xsl:when test="$language = 'zh'">
|
|
3344
|
+
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
|
3345
|
+
</xsl:when>
|
|
3346
|
+
<xsl:when test="../../@inline-header = 'true'">
|
|
3347
|
+
<fo:inline font-size="90%">
|
|
3348
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
|
3349
|
+
<xsl:with-param name="count" select="$padding-right"/>
|
|
3350
|
+
</xsl:call-template>
|
|
3351
|
+
</fo:inline>
|
|
3352
|
+
</xsl:when>
|
|
3353
|
+
<xsl:otherwise>
|
|
3354
|
+
<fo:inline padding-right="{$padding-right}mm"></fo:inline>
|
|
3355
|
+
</xsl:otherwise>
|
|
3356
|
+
</xsl:choose>
|
|
3357
|
+
|
|
3358
|
+
</xsl:template><xsl:template name="insertNonBreakSpaces">
|
|
3359
|
+
<xsl:param name="count"/>
|
|
3360
|
+
<xsl:if test="$count > 0">
|
|
3361
|
+
<xsl:text> </xsl:text>
|
|
3362
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
|
3363
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
|
3364
|
+
</xsl:call-template>
|
|
3365
|
+
</xsl:if>
|
|
3366
|
+
</xsl:template><xsl:template match="*[local-name() = 'domain']">
|
|
3367
|
+
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
|
3368
|
+
<xsl:text> </xsl:text>
|
|
3369
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']">
|
|
3370
|
+
<fo:block xsl:use-attribute-sets="admitted-style">
|
|
3371
|
+
<xsl:apply-templates/>
|
|
3372
|
+
</fo:block>
|
|
3373
|
+
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
|
3374
|
+
<xsl:variable name="title-deprecated">
|
|
3375
|
+
<xsl:call-template name="getTitle">
|
|
3376
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
|
3377
|
+
</xsl:call-template>
|
|
3378
|
+
</xsl:variable>
|
|
3379
|
+
<fo:block xsl:use-attribute-sets="deprecates-style">
|
|
3380
|
+
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
|
3381
|
+
</fo:block>
|
|
3382
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
|
3383
|
+
<fo:block xsl:use-attribute-sets="definition-style">
|
|
3384
|
+
<xsl:apply-templates/>
|
|
3385
|
+
</fo:block>
|
|
3386
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
|
3387
|
+
<xsl:apply-templates/>
|
|
3388
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
|
3389
|
+
<fo:inline> <xsl:apply-templates/></fo:inline>
|
|
3390
|
+
<fo:block> </fo:block>
|
|
3391
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
|
3392
|
+
|
|
3393
|
+
<fo:block>
|
|
3394
|
+
<xsl:call-template name="setId"/>
|
|
3395
|
+
|
|
3396
|
+
|
|
3397
|
+
|
|
3398
|
+
|
|
3399
|
+
|
|
3400
|
+
|
|
3401
|
+
|
|
3402
|
+
|
|
3403
|
+
|
|
3404
|
+
|
|
3405
|
+
<xsl:apply-templates/>
|
|
3406
|
+
</fo:block>
|
|
3407
|
+
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
|
|
3411
|
+
<fo:block break-after="page"/>
|
|
3412
|
+
<fo:block>
|
|
3413
|
+
<xsl:call-template name="setId"/>
|
|
3414
|
+
<xsl:apply-templates/>
|
|
3415
|
+
</fo:block>
|
|
3416
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
|
3417
|
+
<fo:block>
|
|
3418
|
+
<xsl:call-template name="setId"/>
|
|
3419
|
+
<xsl:apply-templates/>
|
|
3420
|
+
</fo:block>
|
|
3421
|
+
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
|
3422
|
+
<fo:block id="{@id}">
|
|
3423
|
+
<xsl:apply-templates/>
|
|
3424
|
+
</fo:block>
|
|
3425
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
|
3426
|
+
|
|
3427
|
+
<fo:block id="{@id}">
|
|
3428
|
+
<xsl:apply-templates/>
|
|
3429
|
+
</fo:block>
|
|
3430
|
+
</xsl:template><xsl:template match="*[local-name() = 'annex']">
|
|
3431
|
+
<fo:block break-after="page"/>
|
|
3432
|
+
<fo:block id="{@id}">
|
|
3433
|
+
|
|
3434
|
+
</fo:block>
|
|
3435
|
+
<xsl:apply-templates/>
|
|
3436
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']">
|
|
3437
|
+
<!-- comment 2019-11-29 -->
|
|
3438
|
+
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
|
3439
|
+
<xsl:apply-templates /> -->
|
|
3440
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
|
3441
|
+
<!-- 0xA0 to space replacement -->
|
|
3442
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
|
3443
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
|
3444
|
+
<fo:block-container margin-left="0mm">
|
|
3445
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
3446
|
+
<xsl:attribute name="margin-left">
|
|
3447
|
+
<xsl:choose>
|
|
3448
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
3449
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
3450
|
+
</xsl:choose>
|
|
3451
|
+
</xsl:attribute>
|
|
3452
|
+
|
|
3453
|
+
</xsl:if>
|
|
3454
|
+
<fo:block-container margin-left="0mm">
|
|
3455
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
|
3456
|
+
</fo:block-container>
|
|
3457
|
+
</fo:block-container>
|
|
3458
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
|
3459
|
+
<!-- <row>
|
|
3460
|
+
<date>05-07-2013</date>
|
|
3461
|
+
<type>Editorial</type>
|
|
3462
|
+
<change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
|
|
3463
|
+
<pages>D-3</pages>
|
|
3464
|
+
</row>
|
|
3465
|
+
-->
|
|
3466
|
+
<fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
|
|
3467
|
+
<fo:table-column column-width="20mm"/>
|
|
3468
|
+
<fo:table-column column-width="23mm"/>
|
|
3469
|
+
<fo:table-column column-width="107mm"/>
|
|
3470
|
+
<fo:table-column column-width="15mm"/>
|
|
3471
|
+
<fo:table-body>
|
|
3472
|
+
<fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
|
|
3473
|
+
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
|
3474
|
+
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
|
3475
|
+
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
|
3476
|
+
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
|
3477
|
+
</fo:table-row>
|
|
3478
|
+
<xsl:apply-templates/>
|
|
3479
|
+
</fo:table-body>
|
|
3480
|
+
</fo:table>
|
|
3481
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
|
|
3482
|
+
<fo:table-row>
|
|
3483
|
+
<xsl:apply-templates/>
|
|
3484
|
+
</fo:table-row>
|
|
3485
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
|
3486
|
+
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
|
3487
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
|
3488
|
+
</fo:table-cell>
|
|
3489
|
+
</xsl:template><xsl:template name="processBibitem">
|
|
3490
|
+
|
|
3491
|
+
|
|
3492
|
+
|
|
3493
|
+
|
|
3494
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
|
3495
|
+
<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')]"/>
|
|
3496
|
+
<xsl:choose>
|
|
3497
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
|
3498
|
+
<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"/>
|
|
3499
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
|
3500
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
|
3501
|
+
</xsl:if>
|
|
3502
|
+
<xsl:value-of select="$_doc_ident"/>
|
|
3503
|
+
</xsl:when>
|
|
3504
|
+
<xsl:otherwise>
|
|
3505
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
|
3506
|
+
<xsl:if test="$type != ''">
|
|
3507
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
|
3508
|
+
</xsl:if>
|
|
3509
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
|
3510
|
+
</xsl:otherwise>
|
|
3511
|
+
</xsl:choose>
|
|
3512
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
|
3513
|
+
<xsl:choose>
|
|
3514
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
|
3515
|
+
<author>
|
|
3516
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
|
3517
|
+
</author>
|
|
3518
|
+
</xsl:when>
|
|
3519
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
|
3520
|
+
<author>
|
|
3521
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
|
3522
|
+
<xsl:text> </xsl:text>
|
|
3523
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
|
3524
|
+
</author>
|
|
3525
|
+
</xsl:when>
|
|
3526
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
|
3527
|
+
<author>
|
|
3528
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
|
3529
|
+
<xsl:text> </xsl:text>
|
|
3530
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
|
3531
|
+
</author>
|
|
3532
|
+
</xsl:when>
|
|
3533
|
+
<xsl:otherwise>
|
|
3534
|
+
<xsl:apply-templates/>
|
|
3535
|
+
</xsl:otherwise>
|
|
3536
|
+
</xsl:choose>
|
|
3537
|
+
</xsl:template><xsl:template name="renderDate">
|
|
3538
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
|
3539
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
|
3540
|
+
</xsl:if>
|
|
3541
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
|
3542
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
|
3543
|
+
</xsl:if>
|
|
3544
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
|
3545
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
|
3546
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
|
3547
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
|
3548
|
+
</xsl:template><xsl:template name="convertDate">
|
|
3549
|
+
<xsl:param name="date"/>
|
|
3550
|
+
<xsl:param name="format" select="'short'"/>
|
|
3551
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
|
3552
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
|
3553
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
|
3554
|
+
<xsl:variable name="monthStr">
|
|
3555
|
+
<xsl:choose>
|
|
3556
|
+
<xsl:when test="$month = '01'">January</xsl:when>
|
|
3557
|
+
<xsl:when test="$month = '02'">February</xsl:when>
|
|
3558
|
+
<xsl:when test="$month = '03'">March</xsl:when>
|
|
3559
|
+
<xsl:when test="$month = '04'">April</xsl:when>
|
|
3560
|
+
<xsl:when test="$month = '05'">May</xsl:when>
|
|
3561
|
+
<xsl:when test="$month = '06'">June</xsl:when>
|
|
3562
|
+
<xsl:when test="$month = '07'">July</xsl:when>
|
|
3563
|
+
<xsl:when test="$month = '08'">August</xsl:when>
|
|
3564
|
+
<xsl:when test="$month = '09'">September</xsl:when>
|
|
3565
|
+
<xsl:when test="$month = '10'">October</xsl:when>
|
|
3566
|
+
<xsl:when test="$month = '11'">November</xsl:when>
|
|
3567
|
+
<xsl:when test="$month = '12'">December</xsl:when>
|
|
3568
|
+
</xsl:choose>
|
|
3569
|
+
</xsl:variable>
|
|
3570
|
+
<xsl:variable name="result">
|
|
3571
|
+
<xsl:choose>
|
|
3572
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
|
3573
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
|
3574
|
+
</xsl:when>
|
|
3575
|
+
<xsl:otherwise>
|
|
3576
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
|
3577
|
+
</xsl:otherwise>
|
|
3578
|
+
</xsl:choose>
|
|
3579
|
+
</xsl:variable>
|
|
3580
|
+
<xsl:value-of select="$result"/>
|
|
3581
|
+
</xsl:template><xsl:template name="insertKeywords">
|
|
3582
|
+
<xsl:param name="sorting" select="'true'"/>
|
|
3583
|
+
<xsl:param name="charAtEnd" select="'.'"/>
|
|
3584
|
+
<xsl:param name="charDelim" select="', '"/>
|
|
3585
|
+
<xsl:choose>
|
|
3586
|
+
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
|
3587
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
|
3588
|
+
<xsl:sort data-type="text" order="ascending"/>
|
|
3589
|
+
<xsl:call-template name="insertKeyword">
|
|
3590
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
|
3591
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
|
3592
|
+
</xsl:call-template>
|
|
3593
|
+
</xsl:for-each>
|
|
3594
|
+
</xsl:when>
|
|
3595
|
+
<xsl:otherwise>
|
|
3596
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
|
3597
|
+
<xsl:call-template name="insertKeyword">
|
|
3598
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
|
3599
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
|
3600
|
+
</xsl:call-template>
|
|
3601
|
+
</xsl:for-each>
|
|
3602
|
+
</xsl:otherwise>
|
|
3603
|
+
</xsl:choose>
|
|
3604
|
+
</xsl:template><xsl:template name="insertKeyword">
|
|
3605
|
+
<xsl:param name="charAtEnd"/>
|
|
3606
|
+
<xsl:param name="charDelim"/>
|
|
3607
|
+
<xsl:apply-templates/>
|
|
3608
|
+
<xsl:choose>
|
|
3609
|
+
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
|
|
3610
|
+
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
|
3611
|
+
</xsl:choose>
|
|
3612
|
+
</xsl:template><xsl:template name="addPDFUAmeta">
|
|
3613
|
+
<fo:declarations>
|
|
3614
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
|
3615
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
|
3616
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
|
3617
|
+
</pdf:dictionary>
|
|
3618
|
+
</pdf:catalog>
|
|
3619
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
|
3620
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
3621
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
|
3622
|
+
<!-- Dublin Core properties go here -->
|
|
3623
|
+
<dc:title>
|
|
3624
|
+
<xsl:variable name="title">
|
|
3625
|
+
|
|
3626
|
+
|
|
3627
|
+
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
|
|
3628
|
+
|
|
3629
|
+
|
|
3630
|
+
|
|
3631
|
+
</xsl:variable>
|
|
3632
|
+
<xsl:choose>
|
|
3633
|
+
<xsl:when test="normalize-space($title) != ''">
|
|
3634
|
+
<xsl:value-of select="$title"/>
|
|
3635
|
+
</xsl:when>
|
|
3636
|
+
<xsl:otherwise>
|
|
3637
|
+
<xsl:text> </xsl:text>
|
|
3638
|
+
</xsl:otherwise>
|
|
3639
|
+
</xsl:choose>
|
|
3640
|
+
</dc:title>
|
|
3641
|
+
<dc:creator>
|
|
3642
|
+
|
|
3643
|
+
|
|
3644
|
+
</dc:creator>
|
|
3645
|
+
<dc:description>
|
|
3646
|
+
<xsl:variable name="abstract">
|
|
3647
|
+
|
|
3648
|
+
|
|
3649
|
+
|
|
3650
|
+
|
|
3651
|
+
</xsl:variable>
|
|
3652
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
|
3653
|
+
</dc:description>
|
|
3654
|
+
<pdf:Keywords>
|
|
3655
|
+
<xsl:call-template name="insertKeywords"/>
|
|
3656
|
+
</pdf:Keywords>
|
|
3657
|
+
</rdf:Description>
|
|
3658
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
|
3659
|
+
<!-- XMP properties go here -->
|
|
3660
|
+
<xmp:CreatorTool/>
|
|
3661
|
+
</rdf:Description>
|
|
3662
|
+
</rdf:RDF>
|
|
3663
|
+
</x:xmpmeta>
|
|
3664
|
+
</fo:declarations>
|
|
3665
|
+
</xsl:template><xsl:template name="getId">
|
|
3666
|
+
<xsl:choose>
|
|
3667
|
+
<xsl:when test="../@id">
|
|
3668
|
+
<xsl:value-of select="../@id"/>
|
|
3669
|
+
</xsl:when>
|
|
3670
|
+
<xsl:otherwise>
|
|
3671
|
+
<!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
|
|
3672
|
+
<xsl:value-of select="concat(generate-id(..), '_', text())"/>
|
|
3673
|
+
</xsl:otherwise>
|
|
3674
|
+
</xsl:choose>
|
|
3675
|
+
</xsl:template><xsl:template name="getLevel">
|
|
3676
|
+
<xsl:param name="depth"/>
|
|
3677
|
+
<xsl:choose>
|
|
3678
|
+
<xsl:when test="normalize-space(@depth) != ''">
|
|
3679
|
+
<xsl:value-of select="@depth"/>
|
|
3680
|
+
</xsl:when>
|
|
3681
|
+
<xsl:when test="normalize-space($depth) != ''">
|
|
3682
|
+
<xsl:value-of select="$depth"/>
|
|
3683
|
+
</xsl:when>
|
|
3684
|
+
<xsl:otherwise>
|
|
3685
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
|
3686
|
+
<xsl:variable name="level">
|
|
3687
|
+
<xsl:choose>
|
|
3688
|
+
<xsl:when test="parent::*[local-name() = 'preface']">
|
|
3689
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3690
|
+
</xsl:when>
|
|
3691
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
|
3692
|
+
<xsl:value-of select="$level_total - 2"/>
|
|
3693
|
+
</xsl:when>
|
|
3694
|
+
<!-- <xsl:when test="parent::*[local-name() = 'sections']">
|
|
3695
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3696
|
+
</xsl:when> -->
|
|
3697
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
|
3698
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3699
|
+
</xsl:when>
|
|
3700
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
|
3701
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3702
|
+
</xsl:when>
|
|
3703
|
+
<xsl:when test="parent::*[local-name() = 'annex']">
|
|
3704
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3705
|
+
</xsl:when>
|
|
3706
|
+
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
|
3707
|
+
<xsl:value-of select="$level_total"/>
|
|
3708
|
+
</xsl:when>
|
|
3709
|
+
<xsl:when test="local-name() = 'annex'">1</xsl:when>
|
|
3710
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
|
3711
|
+
<xsl:otherwise>
|
|
3712
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3713
|
+
</xsl:otherwise>
|
|
3714
|
+
</xsl:choose>
|
|
3715
|
+
</xsl:variable>
|
|
3716
|
+
<xsl:value-of select="$level"/>
|
|
3717
|
+
</xsl:otherwise>
|
|
3718
|
+
</xsl:choose>
|
|
3719
|
+
</xsl:template><xsl:template name="split">
|
|
3720
|
+
<xsl:param name="pText" select="."/>
|
|
3721
|
+
<xsl:param name="sep" select="','"/>
|
|
3722
|
+
<xsl:if test="string-length($pText) >0">
|
|
3723
|
+
<item>
|
|
3724
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, ','), $sep))"/>
|
|
3725
|
+
</item>
|
|
3726
|
+
<xsl:call-template name="split">
|
|
3727
|
+
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
|
3728
|
+
<xsl:with-param name="sep" select="$sep"/>
|
|
3729
|
+
</xsl:call-template>
|
|
3730
|
+
</xsl:if>
|
|
3731
|
+
</xsl:template><xsl:template name="getDocumentId">
|
|
3732
|
+
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
|
3733
|
+
</xsl:template><xsl:template name="namespaceCheck">
|
|
3734
|
+
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
|
3735
|
+
<xsl:variable name="XSLNS">
|
|
3736
|
+
|
|
3737
|
+
|
|
3738
|
+
|
|
3739
|
+
|
|
3740
|
+
|
|
3741
|
+
|
|
3742
|
+
|
|
3743
|
+
|
|
3744
|
+
|
|
3745
|
+
|
|
3746
|
+
|
|
3747
|
+
|
|
3748
|
+
|
|
3749
|
+
<xsl:value-of select="document('')//*/namespace::mpfd"/>
|
|
3750
|
+
|
|
3751
|
+
</xsl:variable>
|
|
3752
|
+
<xsl:if test="$documentNS != $XSLNS">
|
|
3753
|
+
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
|
3754
|
+
</xsl:if>
|
|
3755
|
+
</xsl:template><xsl:template name="getLanguage">
|
|
3756
|
+
<xsl:param name="lang"/>
|
|
3757
|
+
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
|
3758
|
+
<xsl:choose>
|
|
3759
|
+
<xsl:when test="$language = 'en'">English</xsl:when>
|
|
3760
|
+
<xsl:when test="$language = 'fr'">French</xsl:when>
|
|
3761
|
+
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
|
3762
|
+
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
|
3763
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
|
3764
|
+
</xsl:choose>
|
|
3765
|
+
</xsl:template><xsl:template name="setId">
|
|
3766
|
+
<xsl:attribute name="id">
|
|
3767
|
+
<xsl:choose>
|
|
3768
|
+
<xsl:when test="@id">
|
|
3769
|
+
<xsl:value-of select="@id"/>
|
|
3770
|
+
</xsl:when>
|
|
3771
|
+
<xsl:otherwise>
|
|
3772
|
+
<xsl:value-of select="generate-id()"/>
|
|
3773
|
+
</xsl:otherwise>
|
|
3774
|
+
</xsl:choose>
|
|
3775
|
+
</xsl:attribute>
|
|
3776
|
+
</xsl:template></xsl:stylesheet>
|