metanorma-nist 1.2.2 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +63 -0
- data/.github/workflows/release.yml +36 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/nist/basicdoc.rng +23 -0
- data/lib/asciidoctor/nist/isodoc.rng +135 -58
- data/lib/asciidoctor/nist/nist.rng +8 -1
- data/lib/isodoc/nist/base_convert.rb +0 -1
- data/lib/isodoc/nist/html/htmlstyle.css +5 -1
- data/lib/isodoc/nist/html/nist.css +16 -4
- data/lib/isodoc/nist/html/nist.scss +18 -4
- data/lib/isodoc/nist/html/nist_cswp.css +15 -3
- data/lib/isodoc/nist/html/nist_cswp.scss +17 -3
- data/lib/isodoc/nist/html_convert.rb +8 -0
- data/lib/isodoc/nist/metadata.rb +1 -0
- data/lib/isodoc/nist/metadata_id.rb +2 -0
- data/lib/isodoc/nist/nist.cswp.xsl +881 -220
- data/lib/isodoc/nist/nist.sp.xsl +912 -221
- data/lib/isodoc/nist/render.rb +0 -4
- data/lib/isodoc/nist/render_contributors.rb +1 -1
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +1 -1
- metadata +6 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -34,7 +34,7 @@
|
|
34
34
|
<define name="preface">
|
35
35
|
<element name="preface">
|
36
36
|
<optional>
|
37
|
-
<ref name="
|
37
|
+
<ref name="abstract"/>
|
38
38
|
</optional>
|
39
39
|
<optional>
|
40
40
|
<ref name="foreword"/>
|
@@ -182,6 +182,13 @@
|
|
182
182
|
</define>
|
183
183
|
<define name="nist-standard">
|
184
184
|
<element name="nist-standard">
|
185
|
+
<attribute name="version"/>
|
186
|
+
<attribute name="type">
|
187
|
+
<choice>
|
188
|
+
<value>semantic</value>
|
189
|
+
<value>presentation</value>
|
190
|
+
</choice>
|
191
|
+
</attribute>
|
185
192
|
<ref name="bibdata"/>
|
186
193
|
<zeroOrMore>
|
187
194
|
<ref name="termdocsource"/>
|
@@ -9,7 +9,7 @@ fieldset, form, label, legend,
|
|
9
9
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
10
10
|
article, aside, canvas, details, embed,
|
11
11
|
figure, figcaption, footer, header, hgroup,
|
12
|
-
menu,
|
12
|
+
menu, output, ruby, section, summary,
|
13
13
|
time, mark, audio, video {
|
14
14
|
margin: 0;
|
15
15
|
padding: 0; }
|
@@ -104,6 +104,10 @@ b, strong {
|
|
104
104
|
div.document-stage-band, div.document-type-band {
|
105
105
|
background-color: #333333; }
|
106
106
|
|
107
|
+
a.FootnoteRef + a.FootnoteRef:before {
|
108
|
+
content: ", ";
|
109
|
+
vertical-align: super; }
|
110
|
+
|
107
111
|
#nist-sp-band {
|
108
112
|
background-color: #d8eca8; }
|
109
113
|
|
@@ -914,7 +914,7 @@ div.WordSection2 {
|
|
914
914
|
div.WordSection3 {
|
915
915
|
page: WordSection3; }
|
916
916
|
|
917
|
-
table.MsoISOTable {
|
917
|
+
table.MsoISOTable, table.MsoISOTableBig {
|
918
918
|
mso-style-name: "Table NIST";
|
919
919
|
mso-tstyle-rowband-size: 0;
|
920
920
|
mso-tstyle-colband-size: 0;
|
@@ -935,7 +935,7 @@ table.MsoISOTable {
|
|
935
935
|
font-size: 10.0pt;
|
936
936
|
font-family: {{bodyfont}}; }
|
937
937
|
|
938
|
-
table.MsoISOTable th {
|
938
|
+
table.MsoISOTable th, table.MsoISOTableBig th {
|
939
939
|
border: solid windowtext 1pt;
|
940
940
|
background: black;
|
941
941
|
color: white;
|
@@ -944,12 +944,12 @@ table.MsoISOTable th {
|
|
944
944
|
mso-border-alt: solid windowtext 1pt;
|
945
945
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
946
946
|
|
947
|
-
table.MsoISOTable td {
|
947
|
+
table.MsoISOTable td, table.MsoISOTableBig td {
|
948
948
|
border: solid windowtext 1pt;
|
949
949
|
mso-border-alt: solid windowtext 1pt;
|
950
950
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
951
951
|
|
952
|
-
table.MsoISOTable p {
|
952
|
+
table.MsoISOTable p, table.MsoISOTableBig p {
|
953
953
|
font-size: 10.0pt; }
|
954
954
|
|
955
955
|
table.MsoTableGrid {
|
@@ -1039,8 +1039,20 @@ div.example p.MsoListParagraph {
|
|
1039
1039
|
font-size: 10.0pt; }
|
1040
1040
|
|
1041
1041
|
div.Note p.MsoListParagraph {
|
1042
|
+
font-size: 10.0pt;
|
1043
|
+
margin-left: 1.0cm; }
|
1044
|
+
|
1045
|
+
div.Note span.stem {
|
1042
1046
|
font-size: 10.0pt; }
|
1043
1047
|
|
1048
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
1049
|
+
font-size: 8.0pt;
|
1050
|
+
margin-left: 1.0cm; }
|
1051
|
+
|
1052
|
+
div.Note table.dl {
|
1053
|
+
font-size: 10.0pt;
|
1054
|
+
margin-left: 1.0cm; }
|
1055
|
+
|
1044
1056
|
span.note_label, span.example_label, td.example_label, td.note_label {
|
1045
1057
|
font-size: 10.0pt;
|
1046
1058
|
font-family: {{bodyfont}}; }
|
@@ -868,7 +868,7 @@ div.WordSection2
|
|
868
868
|
mso-paper-source:0;}
|
869
869
|
div.WordSection3
|
870
870
|
{page:WordSection3;}
|
871
|
-
table.MsoISOTable
|
871
|
+
table.MsoISOTable, table.MsoISOTableBig
|
872
872
|
{mso-style-name:"Table NIST";
|
873
873
|
mso-tstyle-rowband-size:0;
|
874
874
|
mso-tstyle-colband-size:0;
|
@@ -888,7 +888,7 @@ table.MsoISOTable
|
|
888
888
|
mso-border-insidev:.75pt solid windowtext;
|
889
889
|
font-size:10.0pt;
|
890
890
|
font-family:$bodyfont;}
|
891
|
-
table.MsoISOTable th
|
891
|
+
table.MsoISOTable th, table.MsoISOTableBig th
|
892
892
|
{border:solid windowtext 1pt;
|
893
893
|
background: black;
|
894
894
|
color: white;
|
@@ -896,11 +896,11 @@ table.MsoISOTable th
|
|
896
896
|
font-family:$headerfont;
|
897
897
|
mso-border-alt:solid windowtext 1pt;
|
898
898
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
899
|
-
table.MsoISOTable td
|
899
|
+
table.MsoISOTable td, table.MsoISOTableBig td
|
900
900
|
{border:solid windowtext 1pt;
|
901
901
|
mso-border-alt:solid windowtext 1pt;
|
902
902
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
903
|
-
table.MsoISOTable p
|
903
|
+
table.MsoISOTable p, table.MsoISOTableBig p
|
904
904
|
{font-size:10.0pt; }
|
905
905
|
table.MsoTableGrid
|
906
906
|
{mso-style-name:"Table Grid";
|
@@ -990,6 +990,20 @@ div.example p.MsoListParagraph {
|
|
990
990
|
|
991
991
|
div.Note p.MsoListParagraph {
|
992
992
|
font-size: 10.0pt;
|
993
|
+
margin-left: 1.0cm;
|
994
|
+
}
|
995
|
+
|
996
|
+
div.Note span.stem {
|
997
|
+
font-size: 10.0pt; }
|
998
|
+
|
999
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
1000
|
+
font-size: 8.0pt;
|
1001
|
+
margin-left: 1.0cm;
|
1002
|
+
}
|
1003
|
+
|
1004
|
+
div.Note table.dl {
|
1005
|
+
font-size: 10.0pt;
|
1006
|
+
margin-left: 1.0cm;
|
993
1007
|
}
|
994
1008
|
|
995
1009
|
span.note_label, span.example_label, td.example_label, td.note_label
|
@@ -862,7 +862,7 @@ div.WordSection2 {
|
|
862
862
|
div.WordSection3 {
|
863
863
|
page: WordSection3; }
|
864
864
|
|
865
|
-
table.MsoISOTable {
|
865
|
+
table.MsoISOTable, table.MsoISOTableBig {
|
866
866
|
mso-style-name: "Table NIST";
|
867
867
|
mso-tstyle-rowband-size: 0;
|
868
868
|
mso-tstyle-colband-size: 0;
|
@@ -883,7 +883,7 @@ table.MsoISOTable {
|
|
883
883
|
font-size: 10.0pt;
|
884
884
|
font-family: {{bodyfont}}; }
|
885
885
|
|
886
|
-
table.MsoISOTable th {
|
886
|
+
table.MsoISOTable th, table.MsoISOTableBig th {
|
887
887
|
border: solid windowtext 1pt;
|
888
888
|
background: black;
|
889
889
|
color: white;
|
@@ -892,7 +892,7 @@ table.MsoISOTable th {
|
|
892
892
|
mso-border-alt: solid windowtext 1pt;
|
893
893
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
894
894
|
|
895
|
-
table.MsoISOTable td {
|
895
|
+
table.MsoISOTable td, table.MsoISOTableBig td {
|
896
896
|
border: solid windowtext 1pt;
|
897
897
|
mso-border-alt: solid windowtext 1pt;
|
898
898
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
@@ -980,8 +980,20 @@ div.example p.MsoListParagraph {
|
|
980
980
|
font-size: 10.0pt; }
|
981
981
|
|
982
982
|
div.Note p.MsoListParagraph {
|
983
|
+
font-size: 10.0pt;
|
984
|
+
margin-left: 1.0cm; }
|
985
|
+
|
986
|
+
div.Note span.stem {
|
983
987
|
font-size: 10.0pt; }
|
984
988
|
|
989
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
990
|
+
font-size: 8.0pt;
|
991
|
+
margin-left: 1.0cm; }
|
992
|
+
|
993
|
+
div.Note table.dl {
|
994
|
+
font-size: 10.0pt;
|
995
|
+
margin-left: 1.0cm; }
|
996
|
+
|
985
997
|
span.note_label, span.example_label, td.example_label, td.note_label {
|
986
998
|
font-size: 10.0pt;
|
987
999
|
font-family: {{bodyfont}}; }
|
@@ -820,7 +820,7 @@ div.WordSection2
|
|
820
820
|
mso-paper-source:0;}
|
821
821
|
div.WordSection3
|
822
822
|
{page:WordSection3;}
|
823
|
-
table.MsoISOTable
|
823
|
+
table.MsoISOTable, table.MsoISOTableBig
|
824
824
|
{mso-style-name:"Table NIST";
|
825
825
|
mso-tstyle-rowband-size:0;
|
826
826
|
mso-tstyle-colband-size:0;
|
@@ -840,7 +840,7 @@ table.MsoISOTable
|
|
840
840
|
mso-border-insidev:.75pt solid windowtext;
|
841
841
|
font-size:10.0pt;
|
842
842
|
font-family:$bodyfont;}
|
843
|
-
table.MsoISOTable th
|
843
|
+
table.MsoISOTable th, table.MsoISOTableBig th
|
844
844
|
{border:solid windowtext 1pt;
|
845
845
|
background: black;
|
846
846
|
color: white;
|
@@ -848,7 +848,7 @@ table.MsoISOTable th
|
|
848
848
|
font-family:$headerfont;
|
849
849
|
mso-border-alt:solid windowtext 1pt;
|
850
850
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
851
|
-
table.MsoISOTable td
|
851
|
+
table.MsoISOTable td, table.MsoISOTableBig td
|
852
852
|
{border:solid windowtext 1pt;
|
853
853
|
mso-border-alt:solid windowtext 1pt;
|
854
854
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
@@ -935,6 +935,20 @@ div.example p.MsoListParagraph {
|
|
935
935
|
|
936
936
|
div.Note p.MsoListParagraph {
|
937
937
|
font-size: 10.0pt;
|
938
|
+
margin-left: 1.0cm;
|
939
|
+
}
|
940
|
+
|
941
|
+
div.Note span.stem {
|
942
|
+
font-size: 10.0pt; }
|
943
|
+
|
944
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
945
|
+
font-size: 8.0pt;
|
946
|
+
margin-left: 1.0cm;
|
947
|
+
}
|
948
|
+
|
949
|
+
div.Note table.dl {
|
950
|
+
font-size: 10.0pt;
|
951
|
+
margin-left: 1.0cm;
|
938
952
|
}
|
939
953
|
|
940
954
|
span.note_label, span.example_label, td.example_label, td.note_label
|
@@ -46,6 +46,14 @@ module IsoDoc
|
|
46
46
|
HEAD
|
47
47
|
end
|
48
48
|
|
49
|
+
def html_head()
|
50
|
+
super + <<~HEAD.freeze
|
51
|
+
<link rel="stylesheet" href="https://pages.nist.gov/nist-header-footer/css/nist-combined.css">
|
52
|
+
<script src="https://pages.nist.gov/nist-header-footer/js/jquery-1.9.0.min.js" type="text/javascript" defer="defer"></script>
|
53
|
+
<script src="https://pages.nist.gov/nist-header-footer/js/nist-header-footer.js" type="text/javascript" defer="defer"></script>
|
54
|
+
HEAD
|
55
|
+
end
|
56
|
+
|
49
57
|
def toclevel
|
50
58
|
ret = toclevel_classes.map do |l|
|
51
59
|
"#{l}:not(:empty):not(.TermNum):not(.noTOC):not(.AbstractTitle):"\
|
data/lib/isodoc/nist/metadata.rb
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
|
52
52
|
<xsl:template match="/">
|
53
53
|
<xsl:call-template name="namespaceCheck"/>
|
54
|
-
<fo:root font-family="Times New Roman,
|
54
|
+
<fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
|
55
55
|
<fo:layout-master-set>
|
56
56
|
<!-- Cover pages -->
|
57
57
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -83,6 +83,10 @@
|
|
83
83
|
</fo:layout-master-set>
|
84
84
|
|
85
85
|
<xsl:call-template name="addPDFUAmeta"/>
|
86
|
+
|
87
|
+
<xsl:call-template name="addBookmarks">
|
88
|
+
<xsl:with-param name="contents" select="$contents"/>
|
89
|
+
</xsl:call-template>
|
86
90
|
|
87
91
|
<!-- cover page -->
|
88
92
|
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
@@ -429,9 +433,17 @@
|
|
429
433
|
<xsl:otherwise>true</xsl:otherwise>
|
430
434
|
</xsl:choose>
|
431
435
|
</xsl:variable>
|
436
|
+
|
437
|
+
|
438
|
+
<xsl:variable name="skip">
|
439
|
+
<xsl:choose>
|
440
|
+
<xsl:when test="ancestor-or-self::nist:bibitem">true</xsl:when>
|
441
|
+
<xsl:when test="ancestor-or-self::nist:term">true</xsl:when>
|
442
|
+
<xsl:otherwise>false</xsl:otherwise>
|
443
|
+
</xsl:choose>
|
444
|
+
</xsl:variable>
|
432
445
|
|
433
|
-
|
434
|
-
<xsl:if test="$display = 'true'">
|
446
|
+
<xsl:if test="$skip = 'false'">
|
435
447
|
|
436
448
|
<xsl:variable name="section">
|
437
449
|
<xsl:call-template name="getSection"/>
|
@@ -445,12 +457,13 @@
|
|
445
457
|
<xsl:value-of select="local-name()"/>
|
446
458
|
</xsl:variable>
|
447
459
|
|
448
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
449
|
-
<
|
460
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
461
|
+
<title>
|
462
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
463
|
+
</title>
|
464
|
+
<xsl:apply-templates mode="contents"/>
|
450
465
|
</item>
|
451
|
-
|
452
|
-
</xsl:if>
|
453
|
-
|
466
|
+
</xsl:if>
|
454
467
|
</xsl:template>
|
455
468
|
|
456
469
|
|
@@ -699,8 +712,13 @@
|
|
699
712
|
</xsl:choose>
|
700
713
|
</xsl:variable>
|
701
714
|
<xsl:element name="{$element-name}">
|
702
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
703
|
-
<xsl:attribute name="font-size">
|
715
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
716
|
+
<xsl:attribute name="font-size">
|
717
|
+
<xsl:choose>
|
718
|
+
<xsl:when test="ancestor::*[local-name()='note']">9pt</xsl:when>
|
719
|
+
<xsl:otherwise>10pt</xsl:otherwise>
|
720
|
+
</xsl:choose>
|
721
|
+
</xsl:attribute>
|
704
722
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
705
723
|
<xsl:apply-templates/>
|
706
724
|
</xsl:element>
|
@@ -779,7 +797,7 @@
|
|
779
797
|
<xsl:template match="nist:docidentifier"/>
|
780
798
|
|
781
799
|
|
782
|
-
<xsl:template match="nist:ul | nist:ol">
|
800
|
+
<xsl:template match="nist:ul | nist:ol" mode="ul_ol">
|
783
801
|
<fo:list-block>
|
784
802
|
<xsl:apply-templates/>
|
785
803
|
</fo:list-block>
|
@@ -787,13 +805,28 @@
|
|
787
805
|
</xsl:template>
|
788
806
|
|
789
807
|
<xsl:template match="nist:ul//nist:note | nist:ol//nist:note" priority="2"/>
|
790
|
-
<xsl:template match="nist:ul//nist:note
|
808
|
+
<xsl:template match="nist:ul//nist:note | nist:ol//nist:note" mode="process">
|
809
|
+
<fo:block id="{@id}">
|
810
|
+
<xsl:apply-templates mode="process"/>
|
811
|
+
</fo:block>
|
812
|
+
</xsl:template>
|
813
|
+
|
814
|
+
|
815
|
+
<xsl:template match="nist:ul//nist:note/nist:name | nist:ol//nist:note/nist:name" mode="process" priority="2"/>
|
816
|
+
|
817
|
+
<xsl:template match="nist:ul//nist:note/nist:p | nist:ol//nist:note/nist:p" mode="process" priority="2">
|
791
818
|
<fo:block font-size="11pt" margin-top="4pt">
|
792
819
|
<xsl:apply-templates select="../nist:name" mode="presentation"/>
|
793
820
|
<xsl:apply-templates/>
|
794
821
|
</fo:block>
|
795
822
|
</xsl:template>
|
796
823
|
|
824
|
+
<xsl:template match="nist:ul//nist:note/* | nist:ol//nist:note/*" mode="process">
|
825
|
+
<fo:block font-size="11pt">
|
826
|
+
<xsl:apply-templates select="."/>
|
827
|
+
</fo:block>
|
828
|
+
</xsl:template>
|
829
|
+
|
797
830
|
<xsl:template match="nist:li">
|
798
831
|
<xsl:variable name="level">
|
799
832
|
<xsl:variable name="numtmp">
|
@@ -945,10 +978,23 @@
|
|
945
978
|
|
946
979
|
|
947
980
|
|
948
|
-
<xsl:template match="nist:quote" priority="2">
|
949
|
-
<fo:block-container margin-left="
|
950
|
-
<xsl:
|
951
|
-
|
981
|
+
<xsl:template match="nist:quote" priority="2">
|
982
|
+
<fo:block-container margin-left="0mm">
|
983
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
984
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
985
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
986
|
+
</xsl:if>
|
987
|
+
</xsl:if>
|
988
|
+
<fo:block-container margin-left="0mm">
|
989
|
+
|
990
|
+
<fo:block-container margin-left="7mm" margin-right="7mm">
|
991
|
+
<fo:block>
|
992
|
+
<xsl:apply-templates/>
|
993
|
+
<xsl:apply-templates select="nist:author" mode="process"/>
|
994
|
+
</fo:block>
|
995
|
+
</fo:block-container>
|
996
|
+
|
997
|
+
</fo:block-container>
|
952
998
|
</fo:block-container>
|
953
999
|
</xsl:template>
|
954
1000
|
|
@@ -1057,6 +1103,12 @@
|
|
1057
1103
|
|
1058
1104
|
</title-edition>
|
1059
1105
|
|
1106
|
+
<title-edition lang="fr">
|
1107
|
+
|
1108
|
+
<xsl:text>Édition </xsl:text>
|
1109
|
+
|
1110
|
+
</title-edition>
|
1111
|
+
|
1060
1112
|
|
1061
1113
|
<title-toc lang="en">
|
1062
1114
|
|
@@ -1065,7 +1117,12 @@
|
|
1065
1117
|
|
1066
1118
|
|
1067
1119
|
</title-toc>
|
1068
|
-
<title-toc lang="fr">
|
1120
|
+
<title-toc lang="fr">
|
1121
|
+
|
1122
|
+
<xsl:text>Sommaire</xsl:text>
|
1123
|
+
|
1124
|
+
|
1125
|
+
</title-toc>
|
1069
1126
|
|
1070
1127
|
<title-toc lang="zh">Contents</title-toc>
|
1071
1128
|
|
@@ -1099,7 +1156,12 @@
|
|
1099
1156
|
|
1100
1157
|
|
1101
1158
|
|
1102
|
-
<title-source lang="en">
|
1159
|
+
<title-source lang="en">
|
1160
|
+
|
1161
|
+
<xsl:text>SOURCE</xsl:text>
|
1162
|
+
|
1163
|
+
|
1164
|
+
</title-source>
|
1103
1165
|
|
1104
1166
|
<title-keywords lang="en">Keywords</title-keywords>
|
1105
1167
|
|
@@ -1142,12 +1204,25 @@
|
|
1142
1204
|
<title-warning lang="zh">警告</title-warning>
|
1143
1205
|
|
1144
1206
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1207
|
+
|
1208
|
+
<title-continued lang="en">(continued)</title-continued>
|
1209
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1210
|
+
|
1145
1211
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1146
1212
|
<xsl:param name="name"/>
|
1147
|
-
<xsl:
|
1148
|
-
|
1213
|
+
<xsl:param name="lang"/>
|
1214
|
+
<xsl:variable name="lang_">
|
1215
|
+
<xsl:choose>
|
1216
|
+
<xsl:when test="$lang != ''">
|
1217
|
+
<xsl:value-of select="$lang"/>
|
1218
|
+
</xsl:when>
|
1219
|
+
<xsl:otherwise>
|
1220
|
+
<xsl:call-template name="getLang"/>
|
1221
|
+
</xsl:otherwise>
|
1222
|
+
</xsl:choose>
|
1149
1223
|
</xsl:variable>
|
1150
|
-
<xsl:variable name="
|
1224
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1225
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1151
1226
|
<xsl:choose>
|
1152
1227
|
<xsl:when test="normalize-space($title_) != ''">
|
1153
1228
|
<xsl:value-of select="$title_"/>
|
@@ -1156,7 +1231,10 @@
|
|
1156
1231
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1157
1232
|
</xsl:otherwise>
|
1158
1233
|
</xsl:choose>
|
1159
|
-
</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="
|
1234
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1235
|
+
|
1236
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1237
|
+
|
1160
1238
|
|
1161
1239
|
|
1162
1240
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -1167,14 +1245,14 @@
|
|
1167
1245
|
|
1168
1246
|
|
1169
1247
|
|
1170
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1171
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1248
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1172
1249
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1173
1250
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1174
1251
|
|
1175
1252
|
|
1176
1253
|
|
1177
1254
|
|
1255
|
+
|
1178
1256
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1179
1257
|
|
1180
1258
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1214,6 +1292,7 @@
|
|
1214
1292
|
|
1215
1293
|
|
1216
1294
|
|
1295
|
+
|
1217
1296
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1218
1297
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1219
1298
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1244,6 +1323,7 @@
|
|
1244
1323
|
|
1245
1324
|
|
1246
1325
|
|
1326
|
+
|
1247
1327
|
|
1248
1328
|
|
1249
1329
|
|
@@ -1288,6 +1368,7 @@
|
|
1288
1368
|
|
1289
1369
|
|
1290
1370
|
|
1371
|
+
|
1291
1372
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1292
1373
|
|
1293
1374
|
|
@@ -1301,11 +1382,13 @@
|
|
1301
1382
|
|
1302
1383
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1303
1384
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1304
|
-
|
1385
|
+
|
1386
|
+
|
1305
1387
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1306
1388
|
|
1307
1389
|
|
1308
1390
|
|
1391
|
+
|
1309
1392
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1310
1393
|
|
1311
1394
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
@@ -1326,8 +1409,10 @@
|
|
1326
1409
|
|
1327
1410
|
|
1328
1411
|
|
1412
|
+
</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">
|
1413
|
+
|
1414
|
+
|
1329
1415
|
|
1330
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1331
1416
|
|
1332
1417
|
|
1333
1418
|
|
@@ -1336,7 +1421,6 @@
|
|
1336
1421
|
|
1337
1422
|
|
1338
1423
|
|
1339
|
-
|
1340
1424
|
|
1341
1425
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1342
1426
|
|
@@ -1362,6 +1446,8 @@
|
|
1362
1446
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1363
1447
|
|
1364
1448
|
|
1449
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1450
|
+
|
1365
1451
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1366
1452
|
|
1367
1453
|
|
@@ -1382,6 +1468,7 @@
|
|
1382
1468
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1383
1469
|
|
1384
1470
|
|
1471
|
+
|
1385
1472
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1386
1473
|
|
1387
1474
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1393,6 +1480,7 @@
|
|
1393
1480
|
|
1394
1481
|
|
1395
1482
|
|
1483
|
+
|
1396
1484
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1397
1485
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1398
1486
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1431,11 +1519,14 @@
|
|
1431
1519
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1432
1520
|
|
1433
1521
|
|
1522
|
+
|
1434
1523
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1435
1524
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1436
1525
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1437
1526
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1438
1527
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1528
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1529
|
+
|
1439
1530
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1440
1531
|
|
1441
1532
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1499,6 +1590,10 @@
|
|
1499
1590
|
|
1500
1591
|
|
1501
1592
|
|
1593
|
+
|
1594
|
+
|
1595
|
+
<!-- $namespace = 'iso' or -->
|
1596
|
+
|
1502
1597
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1503
1598
|
|
1504
1599
|
|
@@ -1532,6 +1627,7 @@
|
|
1532
1627
|
<xsl:with-param name="table" select="$simple-table"/>
|
1533
1628
|
</xsl:call-template>
|
1534
1629
|
</xsl:variable>
|
1630
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1535
1631
|
|
1536
1632
|
<!-- <xsl:variable name="colwidths2">
|
1537
1633
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1552,38 +1648,62 @@
|
|
1552
1648
|
|
1553
1649
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1554
1650
|
|
1651
|
+
|
1555
1652
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1556
1653
|
|
1654
|
+
|
1655
|
+
|
1656
|
+
|
1557
1657
|
|
1558
1658
|
|
1659
|
+
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
1660
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1661
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1662
|
+
</xsl:if>
|
1663
|
+
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
1664
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1665
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1666
|
+
</xsl:if>
|
1667
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1559
1668
|
|
1669
|
+
|
1560
1670
|
|
1561
1671
|
|
1562
1672
|
|
1563
1673
|
|
1564
1674
|
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1675
|
+
|
1676
|
+
|
1677
|
+
<xsl:variable name="table_attributes">
|
1678
|
+
<attribute name="table-layout">fixed</attribute>
|
1679
|
+
<attribute name="width">100%</attribute>
|
1680
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1681
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1570
1682
|
|
1571
1683
|
|
1572
|
-
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
1573
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1574
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1575
|
-
</xsl:if>
|
1576
|
-
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
1577
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1578
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1579
|
-
</xsl:if>
|
1580
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1581
1684
|
|
1582
1685
|
|
1686
|
+
|
1687
|
+
|
1688
|
+
|
1583
1689
|
|
1690
|
+
|
1584
1691
|
|
1692
|
+
</xsl:variable>
|
1693
|
+
|
1694
|
+
|
1695
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1585
1696
|
|
1697
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1698
|
+
<xsl:attribute name="{@name}">
|
1699
|
+
<xsl:value-of select="."/>
|
1700
|
+
</xsl:attribute>
|
1701
|
+
</xsl:for-each>
|
1586
1702
|
|
1703
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1704
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1705
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1706
|
+
</xsl:if>
|
1587
1707
|
|
1588
1708
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1589
1709
|
<xsl:choose>
|
@@ -1607,6 +1727,33 @@
|
|
1607
1727
|
|
1608
1728
|
</fo:table>
|
1609
1729
|
|
1730
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1731
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1732
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1733
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1734
|
+
</xsl:call-template>
|
1735
|
+
</xsl:for-each>
|
1736
|
+
|
1737
|
+
<!-- insert footer as table -->
|
1738
|
+
<!-- <fo:table>
|
1739
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1740
|
+
<xsl:attribute name="{@name}">
|
1741
|
+
<xsl:value-of select="."/>
|
1742
|
+
</xsl:attribute>
|
1743
|
+
</xsl:for-each>
|
1744
|
+
|
1745
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1746
|
+
<xsl:choose>
|
1747
|
+
<xsl:when test=". = 1 or . = 0">
|
1748
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1749
|
+
</xsl:when>
|
1750
|
+
<xsl:otherwise>
|
1751
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1752
|
+
</xsl:otherwise>
|
1753
|
+
</xsl:choose>
|
1754
|
+
</xsl:for-each>
|
1755
|
+
</fo:table>-->
|
1756
|
+
|
1610
1757
|
|
1611
1758
|
|
1612
1759
|
|
@@ -1615,8 +1762,9 @@
|
|
1615
1762
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1616
1763
|
<xsl:if test="normalize-space() != ''">
|
1617
1764
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1618
|
-
|
1619
|
-
|
1765
|
+
|
1766
|
+
<xsl:apply-templates/>
|
1767
|
+
</fo:block>
|
1620
1768
|
</xsl:if>
|
1621
1769
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1622
1770
|
<xsl:param name="table-row"/>
|
@@ -1670,6 +1818,13 @@
|
|
1670
1818
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1671
1819
|
<xsl:variable name="td_text">
|
1672
1820
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1821
|
+
|
1822
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1823
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1824
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1825
|
+
</xsl:for-each>
|
1826
|
+
</xsl:if> -->
|
1827
|
+
|
1673
1828
|
</xsl:variable>
|
1674
1829
|
<xsl:variable name="words">
|
1675
1830
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1729,13 +1884,31 @@
|
|
1729
1884
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1730
1885
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1731
1886
|
<xsl:value-of select="@target"/>
|
1887
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1888
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1889
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1732
1890
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1733
1891
|
<xsl:param name="cols-count"/>
|
1734
1892
|
<!-- font-weight="bold" -->
|
1735
|
-
<fo:table-header>
|
1893
|
+
<fo:table-header>
|
1736
1894
|
|
1737
1895
|
<xsl:apply-templates/>
|
1738
1896
|
</fo:table-header>
|
1897
|
+
</xsl:template><xsl:template name="table-header-title">
|
1898
|
+
<xsl:param name="cols-count"/>
|
1899
|
+
<!-- row for title -->
|
1900
|
+
<fo:table-row>
|
1901
|
+
<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">
|
1902
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1903
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1904
|
+
<xsl:call-template name="fn_name_display"/>
|
1905
|
+
</xsl:for-each>
|
1906
|
+
<fo:block text-align="right" font-style="italic">
|
1907
|
+
<xsl:text> </xsl:text>
|
1908
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1909
|
+
</fo:block>
|
1910
|
+
</fo:table-cell>
|
1911
|
+
</fo:table-row>
|
1739
1912
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1740
1913
|
<fo:table-body>
|
1741
1914
|
<xsl:apply-templates/>
|
@@ -1743,6 +1916,13 @@
|
|
1743
1916
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1744
1917
|
<xsl:apply-templates/>
|
1745
1918
|
</xsl:template><xsl:template name="insertTableFooter">
|
1919
|
+
<xsl:param name="cols-count"/>
|
1920
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1921
|
+
<fo:table-footer>
|
1922
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1923
|
+
</fo:table-footer>
|
1924
|
+
</xsl:if>
|
1925
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1746
1926
|
<xsl:param name="cols-count"/>
|
1747
1927
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1748
1928
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1764,11 +1944,29 @@
|
|
1764
1944
|
<!-- fn will be processed inside 'note' processing -->
|
1765
1945
|
|
1766
1946
|
|
1947
|
+
|
1948
|
+
|
1949
|
+
|
1950
|
+
|
1767
1951
|
<!-- except gb -->
|
1768
1952
|
|
1769
1953
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1770
1954
|
|
1771
1955
|
|
1956
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1957
|
+
<!-- empty, because notes show at page side in main sections -->
|
1958
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1959
|
+
<xsl:choose>
|
1960
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1961
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1962
|
+
</xsl:when>
|
1963
|
+
<xsl:otherwise>
|
1964
|
+
<fo:block/>
|
1965
|
+
</xsl:otherwise>
|
1966
|
+
</xsl:choose>
|
1967
|
+
</xsl:if> -->
|
1968
|
+
|
1969
|
+
|
1772
1970
|
<!-- horizontal row separator -->
|
1773
1971
|
|
1774
1972
|
|
@@ -1782,6 +1980,88 @@
|
|
1782
1980
|
</fo:table-footer>
|
1783
1981
|
|
1784
1982
|
</xsl:if>
|
1983
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1984
|
+
<xsl:param name="table_attributes"/>
|
1985
|
+
<xsl:param name="colwidths"/>
|
1986
|
+
|
1987
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1988
|
+
|
1989
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1990
|
+
|
1991
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1992
|
+
|
1993
|
+
<fo:table keep-with-previous="always">
|
1994
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1995
|
+
<xsl:choose>
|
1996
|
+
<xsl:when test="@name = 'border-top'">
|
1997
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1998
|
+
</xsl:when>
|
1999
|
+
<xsl:when test="@name = 'border'">
|
2000
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2001
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2002
|
+
</xsl:when>
|
2003
|
+
<xsl:otherwise>
|
2004
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2005
|
+
</xsl:otherwise>
|
2006
|
+
</xsl:choose>
|
2007
|
+
</xsl:for-each>
|
2008
|
+
|
2009
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2010
|
+
<xsl:choose>
|
2011
|
+
<xsl:when test=". = 1 or . = 0">
|
2012
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2013
|
+
</xsl:when>
|
2014
|
+
<xsl:otherwise>
|
2015
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2016
|
+
</xsl:otherwise>
|
2017
|
+
</xsl:choose>
|
2018
|
+
</xsl:for-each>
|
2019
|
+
|
2020
|
+
<fo:table-body>
|
2021
|
+
<fo:table-row>
|
2022
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2023
|
+
|
2024
|
+
|
2025
|
+
|
2026
|
+
<!-- fn will be processed inside 'note' processing -->
|
2027
|
+
|
2028
|
+
|
2029
|
+
|
2030
|
+
|
2031
|
+
|
2032
|
+
|
2033
|
+
|
2034
|
+
<!-- except gb -->
|
2035
|
+
|
2036
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2037
|
+
|
2038
|
+
|
2039
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2040
|
+
<xsl:choose>
|
2041
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2042
|
+
show Note under table in preface (ex. abstract) sections
|
2043
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2044
|
+
</xsl:when>
|
2045
|
+
<xsl:otherwise>
|
2046
|
+
empty, because notes show at page side in main sections
|
2047
|
+
<fo:block/>
|
2048
|
+
</xsl:otherwise>
|
2049
|
+
</xsl:choose>
|
2050
|
+
</xsl:if> -->
|
2051
|
+
|
2052
|
+
|
2053
|
+
<!-- horizontal row separator -->
|
2054
|
+
|
2055
|
+
|
2056
|
+
<!-- fn processing -->
|
2057
|
+
<xsl:call-template name="fn_display"/>
|
2058
|
+
|
2059
|
+
</fo:table-cell>
|
2060
|
+
</fo:table-row>
|
2061
|
+
</fo:table-body>
|
2062
|
+
|
2063
|
+
</fo:table>
|
2064
|
+
</xsl:if>
|
1785
2065
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1786
2066
|
|
1787
2067
|
<xsl:variable name="cols-count">
|
@@ -1799,6 +2079,8 @@
|
|
1799
2079
|
</xsl:choose>
|
1800
2080
|
</xsl:variable>
|
1801
2081
|
|
2082
|
+
|
2083
|
+
|
1802
2084
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1803
2085
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1804
2086
|
</xsl:apply-templates>
|
@@ -1808,6 +2090,8 @@
|
|
1808
2090
|
</xsl:call-template>
|
1809
2091
|
|
1810
2092
|
<fo:table-body>
|
2093
|
+
|
2094
|
+
|
1811
2095
|
<xsl:apply-templates/>
|
1812
2096
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1813
2097
|
|
@@ -1834,6 +2118,11 @@
|
|
1834
2118
|
</xsl:if>
|
1835
2119
|
|
1836
2120
|
|
2121
|
+
|
2122
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2123
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2124
|
+
</xsl:if> -->
|
2125
|
+
|
1837
2126
|
<xsl:apply-templates/>
|
1838
2127
|
</fo:table-row>
|
1839
2128
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1859,6 +2148,8 @@
|
|
1859
2148
|
|
1860
2149
|
|
1861
2150
|
|
2151
|
+
|
2152
|
+
|
1862
2153
|
<xsl:if test="@colspan">
|
1863
2154
|
<xsl:attribute name="number-columns-spanned">
|
1864
2155
|
<xsl:value-of select="@colspan"/>
|
@@ -1869,10 +2160,22 @@
|
|
1869
2160
|
<xsl:value-of select="@rowspan"/>
|
1870
2161
|
</xsl:attribute>
|
1871
2162
|
</xsl:if>
|
2163
|
+
<xsl:call-template name="display-align"/>
|
1872
2164
|
<fo:block>
|
1873
2165
|
<xsl:apply-templates/>
|
1874
2166
|
</fo:block>
|
1875
2167
|
</fo:table-cell>
|
2168
|
+
</xsl:template><xsl:template name="display-align">
|
2169
|
+
<xsl:if test="@valign">
|
2170
|
+
<xsl:attribute name="display-align">
|
2171
|
+
<xsl:choose>
|
2172
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2173
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2174
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2175
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2176
|
+
</xsl:choose>
|
2177
|
+
</xsl:attribute>
|
2178
|
+
</xsl:if>
|
1876
2179
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1877
2180
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1878
2181
|
<xsl:attribute name="text-align">
|
@@ -1886,7 +2189,8 @@
|
|
1886
2189
|
|
1887
2190
|
|
1888
2191
|
|
1889
|
-
|
2192
|
+
|
2193
|
+
|
1890
2194
|
|
1891
2195
|
|
1892
2196
|
|
@@ -1896,6 +2200,7 @@
|
|
1896
2200
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1897
2201
|
</xsl:if>
|
1898
2202
|
|
2203
|
+
|
1899
2204
|
<xsl:if test="@colspan">
|
1900
2205
|
<xsl:attribute name="number-columns-spanned">
|
1901
2206
|
<xsl:value-of select="@colspan"/>
|
@@ -1906,8 +2211,8 @@
|
|
1906
2211
|
<xsl:value-of select="@rowspan"/>
|
1907
2212
|
</xsl:attribute>
|
1908
2213
|
</xsl:if>
|
1909
|
-
<
|
1910
|
-
|
2214
|
+
<xsl:call-template name="display-align"/>
|
2215
|
+
<fo:block>
|
1911
2216
|
<xsl:apply-templates/>
|
1912
2217
|
</fo:block>
|
1913
2218
|
</fo:table-cell>
|
@@ -1919,14 +2224,17 @@
|
|
1919
2224
|
|
1920
2225
|
|
1921
2226
|
|
2227
|
+
|
2228
|
+
|
1922
2229
|
<fo:inline padding-right="2mm">
|
1923
2230
|
|
1924
2231
|
|
1925
2232
|
|
1926
|
-
|
2233
|
+
|
1927
2234
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1928
2235
|
|
1929
2236
|
</fo:inline>
|
2237
|
+
|
1930
2238
|
<xsl:apply-templates mode="process"/>
|
1931
2239
|
</fo:block>
|
1932
2240
|
|
@@ -1950,6 +2258,7 @@
|
|
1950
2258
|
|
1951
2259
|
|
1952
2260
|
|
2261
|
+
|
1953
2262
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1954
2263
|
|
1955
2264
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1961,14 +2270,17 @@
|
|
1961
2270
|
|
1962
2271
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1963
2272
|
|
2273
|
+
|
1964
2274
|
<xsl:value-of select="@reference"/>
|
1965
2275
|
|
2276
|
+
|
1966
2277
|
</fo:inline>
|
1967
2278
|
<fo:inline>
|
1968
2279
|
|
1969
2280
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1970
2281
|
|
1971
|
-
<xsl:apply-templates/>
|
2282
|
+
<!-- <xsl:apply-templates /> -->
|
2283
|
+
<xsl:copy-of select="./node()"/>
|
1972
2284
|
</fo:inline>
|
1973
2285
|
</fo:block>
|
1974
2286
|
</xsl:if>
|
@@ -2005,7 +2317,20 @@
|
|
2005
2317
|
<xsl:variable name="following_dl_colwidths">
|
2006
2318
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2007
2319
|
<xsl:variable name="html-table">
|
2008
|
-
<xsl:variable name="
|
2320
|
+
<xsl:variable name="doc_ns">
|
2321
|
+
|
2322
|
+
</xsl:variable>
|
2323
|
+
<xsl:variable name="ns">
|
2324
|
+
<xsl:choose>
|
2325
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2326
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2327
|
+
</xsl:when>
|
2328
|
+
<xsl:otherwise>
|
2329
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2330
|
+
</xsl:otherwise>
|
2331
|
+
</xsl:choose>
|
2332
|
+
</xsl:variable>
|
2333
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2009
2334
|
<xsl:element name="{$ns}:table">
|
2010
2335
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2011
2336
|
<tbody>
|
@@ -2070,7 +2395,8 @@
|
|
2070
2395
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2071
2396
|
</xsl:if>
|
2072
2397
|
|
2073
|
-
<xsl:apply-templates/>
|
2398
|
+
<!-- <xsl:apply-templates /> -->
|
2399
|
+
<xsl:copy-of select="./node()"/>
|
2074
2400
|
</fo:block>
|
2075
2401
|
</fo:table-cell>
|
2076
2402
|
</fo:table-row>
|
@@ -2087,15 +2413,19 @@
|
|
2087
2413
|
|
2088
2414
|
|
2089
2415
|
|
2416
|
+
|
2090
2417
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2091
2418
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2092
2419
|
|
2093
2420
|
|
2094
2421
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2095
2422
|
|
2423
|
+
|
2096
2424
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2097
2425
|
|
2426
|
+
|
2098
2427
|
<xsl:value-of select="@reference"/>
|
2428
|
+
|
2099
2429
|
</fo:basic-link>
|
2100
2430
|
</fo:inline>
|
2101
2431
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2103,123 +2433,150 @@
|
|
2103
2433
|
<xsl:apply-templates/>
|
2104
2434
|
</fo:inline>
|
2105
2435
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2106
|
-
<
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2436
|
+
<fo:block-container margin-left="0mm">
|
2437
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2438
|
+
<xsl:attribute name="margin-left">
|
2439
|
+
<xsl:choose>
|
2440
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2441
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2442
|
+
</xsl:choose>
|
2443
|
+
</xsl:attribute>
|
2114
2444
|
|
2445
|
+
</xsl:if>
|
2446
|
+
<fo:block-container margin-left="0mm">
|
2447
|
+
|
2448
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2115
2449
|
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
<xsl:call-template name="getTitle">
|
2120
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2121
|
-
</xsl:call-template>
|
2122
|
-
</xsl:variable>
|
2123
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2124
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2125
|
-
<xsl:text/>
|
2126
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2127
|
-
</fo:block>
|
2128
|
-
|
2129
|
-
</xsl:when>
|
2130
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2131
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2136
|
-
<xsl:variable name="title-where">
|
2137
|
-
<xsl:call-template name="getTitle">
|
2138
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2139
|
-
</xsl:call-template>
|
2140
|
-
</xsl:variable>
|
2141
|
-
<xsl:value-of select="$title-where"/>
|
2142
|
-
</fo:block>
|
2143
|
-
</xsl:when>
|
2144
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2145
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2146
|
-
|
2147
|
-
|
2148
|
-
|
2149
|
-
<xsl:variable name="title-key">
|
2150
|
-
<xsl:call-template name="getTitle">
|
2151
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2152
|
-
</xsl:call-template>
|
2153
|
-
</xsl:variable>
|
2154
|
-
<xsl:value-of select="$title-key"/>
|
2155
|
-
</fo:block>
|
2156
|
-
</xsl:when>
|
2157
|
-
</xsl:choose>
|
2158
|
-
|
2159
|
-
<!-- a few components -->
|
2160
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2161
|
-
<fo:block>
|
2162
|
-
|
2163
|
-
|
2164
|
-
|
2165
|
-
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
2166
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
2167
|
-
</xsl:if>
|
2450
|
+
<xsl:variable name="key_iso">
|
2451
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2452
|
+
</xsl:variable>
|
2168
2453
|
|
2454
|
+
<xsl:choose>
|
2455
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2456
|
+
|
2457
|
+
|
2458
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2459
|
+
|
2460
|
+
<xsl:variable name="title-where">
|
2461
|
+
<xsl:call-template name="getTitle">
|
2462
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2463
|
+
</xsl:call-template>
|
2464
|
+
</xsl:variable>
|
2465
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2466
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2467
|
+
<xsl:text/>
|
2468
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2469
|
+
</fo:block>
|
2470
|
+
|
2471
|
+
</xsl:when>
|
2472
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2473
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2474
|
+
|
2475
|
+
|
2476
|
+
|
2477
|
+
|
2478
|
+
<xsl:variable name="title-where">
|
2479
|
+
<xsl:call-template name="getTitle">
|
2480
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2481
|
+
</xsl:call-template>
|
2482
|
+
</xsl:variable>
|
2483
|
+
<xsl:value-of select="$title-where"/>
|
2484
|
+
</fo:block>
|
2485
|
+
</xsl:when>
|
2486
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2487
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2488
|
+
|
2489
|
+
|
2490
|
+
|
2491
|
+
<xsl:variable name="title-key">
|
2492
|
+
<xsl:call-template name="getTitle">
|
2493
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2494
|
+
</xsl:call-template>
|
2495
|
+
</xsl:variable>
|
2496
|
+
<xsl:value-of select="$title-key"/>
|
2497
|
+
</fo:block>
|
2498
|
+
</xsl:when>
|
2499
|
+
</xsl:choose>
|
2169
2500
|
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
2174
|
-
</xsl:if>
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
<fo:table width="95%" table-layout="fixed">
|
2501
|
+
<!-- a few components -->
|
2502
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2503
|
+
<fo:block>
|
2180
2504
|
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2505
|
+
|
2506
|
+
|
2507
|
+
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
2508
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
2509
|
+
</xsl:if>
|
2510
|
+
|
2511
|
+
|
2512
|
+
<fo:block>
|
2513
|
+
|
2514
|
+
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
2515
|
+
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
2516
|
+
</xsl:if>
|
2517
|
+
|
2518
|
+
|
2519
|
+
|
2520
|
+
|
2521
|
+
<fo:table width="95%" table-layout="fixed">
|
2187
2522
|
|
2188
|
-
|
2189
|
-
|
2190
|
-
|
2191
|
-
|
2192
|
-
|
2193
|
-
|
2194
|
-
|
2195
|
-
|
2196
|
-
</
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2200
|
-
|
2201
|
-
|
2202
|
-
|
2203
|
-
|
2204
|
-
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
|
2211
|
-
|
2212
|
-
|
2213
|
-
|
2214
|
-
|
2215
|
-
|
2216
|
-
|
2217
|
-
|
2218
|
-
|
2219
|
-
|
2220
|
-
|
2221
|
-
|
2222
|
-
|
2523
|
+
<xsl:choose>
|
2524
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2525
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2526
|
+
</xsl:when>
|
2527
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2528
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2529
|
+
|
2530
|
+
</xsl:when>
|
2531
|
+
</xsl:choose>
|
2532
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2533
|
+
<xsl:variable name="html-table">
|
2534
|
+
<xsl:variable name="doc_ns">
|
2535
|
+
|
2536
|
+
</xsl:variable>
|
2537
|
+
<xsl:variable name="ns">
|
2538
|
+
<xsl:choose>
|
2539
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2540
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2541
|
+
</xsl:when>
|
2542
|
+
<xsl:otherwise>
|
2543
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2544
|
+
</xsl:otherwise>
|
2545
|
+
</xsl:choose>
|
2546
|
+
</xsl:variable>
|
2547
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2548
|
+
<xsl:element name="{$ns}:table">
|
2549
|
+
<tbody>
|
2550
|
+
<xsl:apply-templates mode="dl"/>
|
2551
|
+
</tbody>
|
2552
|
+
</xsl:element>
|
2553
|
+
</xsl:variable>
|
2554
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2555
|
+
<xsl:variable name="colwidths">
|
2556
|
+
<xsl:call-template name="calculate-column-widths">
|
2557
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2558
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2559
|
+
</xsl:call-template>
|
2560
|
+
</xsl:variable>
|
2561
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2562
|
+
<xsl:variable name="maxlength_dt">
|
2563
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2564
|
+
</xsl:variable>
|
2565
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2566
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2567
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2568
|
+
</xsl:call-template>
|
2569
|
+
<fo:table-body>
|
2570
|
+
<xsl:apply-templates>
|
2571
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2572
|
+
</xsl:apply-templates>
|
2573
|
+
</fo:table-body>
|
2574
|
+
</fo:table>
|
2575
|
+
</fo:block>
|
2576
|
+
</fo:block>
|
2577
|
+
</xsl:if>
|
2578
|
+
</fo:block-container>
|
2579
|
+
</fo:block-container>
|
2223
2580
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2224
2581
|
<xsl:param name="colwidths"/>
|
2225
2582
|
<xsl:param name="maxlength_dt"/>
|
@@ -2329,6 +2686,7 @@
|
|
2329
2686
|
<xsl:param name="key_iso"/>
|
2330
2687
|
|
2331
2688
|
<fo:table-row>
|
2689
|
+
|
2332
2690
|
<fo:table-cell>
|
2333
2691
|
|
2334
2692
|
<fo:block margin-top="6pt">
|
@@ -2346,6 +2704,7 @@
|
|
2346
2704
|
|
2347
2705
|
|
2348
2706
|
|
2707
|
+
|
2349
2708
|
<xsl:apply-templates/>
|
2350
2709
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2351
2710
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2411,6 +2770,31 @@
|
|
2411
2770
|
</fo:inline>
|
2412
2771
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2413
2772
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2773
|
+
<xsl:variable name="_font-size">
|
2774
|
+
|
2775
|
+
|
2776
|
+
|
2777
|
+
|
2778
|
+
|
2779
|
+
|
2780
|
+
|
2781
|
+
|
2782
|
+
|
2783
|
+
|
2784
|
+
|
2785
|
+
|
2786
|
+
|
2787
|
+
|
2788
|
+
</xsl:variable>
|
2789
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2790
|
+
<xsl:if test="$font-size != ''">
|
2791
|
+
<xsl:attribute name="font-size">
|
2792
|
+
<xsl:choose>
|
2793
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2794
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2795
|
+
</xsl:choose>
|
2796
|
+
</xsl:attribute>
|
2797
|
+
</xsl:if>
|
2414
2798
|
<xsl:apply-templates/>
|
2415
2799
|
</fo:inline>
|
2416
2800
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2736,11 +3120,24 @@
|
|
2736
3120
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2737
3121
|
<xsl:value-of select="substring($str, 2)"/>
|
2738
3122
|
</xsl:template><xsl:template match="mathml:math">
|
2739
|
-
<fo:inline font-family="
|
2740
|
-
<
|
2741
|
-
<xsl:
|
2742
|
-
</
|
3123
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3124
|
+
<xsl:variable name="mathml">
|
3125
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3126
|
+
</xsl:variable>
|
3127
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3128
|
+
<!-- <xsl:copy-of select="."/> -->
|
3129
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3130
|
+
</fo:instream-foreign-object>
|
2743
3131
|
</fo:inline>
|
3132
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3133
|
+
<xsl:copy>
|
3134
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3135
|
+
</xsl:copy>
|
3136
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3137
|
+
<xsl:copy>
|
3138
|
+
<!-- replace start and end spaces to non-break space -->
|
3139
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3140
|
+
</xsl:copy>
|
2744
3141
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2745
3142
|
<xsl:variable name="target">
|
2746
3143
|
<xsl:choose>
|
@@ -2817,13 +3214,26 @@
|
|
2817
3214
|
<xsl:apply-templates/>
|
2818
3215
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2819
3216
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2820
|
-
|
3217
|
+
|
2821
3218
|
<xsl:apply-templates/>
|
2822
3219
|
</fo:basic-link>
|
2823
3220
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2824
|
-
<fo:block
|
2825
|
-
<xsl:
|
2826
|
-
|
3221
|
+
<fo:block-container margin-left="0mm">
|
3222
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3223
|
+
<xsl:attribute name="margin-left">
|
3224
|
+
<xsl:choose>
|
3225
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3226
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3227
|
+
</xsl:choose>
|
3228
|
+
</xsl:attribute>
|
3229
|
+
|
3230
|
+
</xsl:if>
|
3231
|
+
<fo:block-container margin-left="0mm">
|
3232
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3233
|
+
<xsl:apply-templates/>
|
3234
|
+
</fo:block>
|
3235
|
+
</fo:block-container>
|
3236
|
+
</fo:block-container>
|
2827
3237
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2828
3238
|
<fo:inline>
|
2829
3239
|
<xsl:apply-templates/>
|
@@ -2857,6 +3267,8 @@
|
|
2857
3267
|
|
2858
3268
|
|
2859
3269
|
|
3270
|
+
|
3271
|
+
|
2860
3272
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2861
3273
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2862
3274
|
</fo:inline>
|
@@ -2883,7 +3295,9 @@
|
|
2883
3295
|
</xsl:choose>
|
2884
3296
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2885
3297
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2886
|
-
<xsl:
|
3298
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3299
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3300
|
+
</fo:inline>
|
2887
3301
|
<xsl:apply-templates/>
|
2888
3302
|
</fo:block>
|
2889
3303
|
</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">
|
@@ -2982,19 +3396,113 @@
|
|
2982
3396
|
|
2983
3397
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2984
3398
|
</fo:block>
|
2985
|
-
</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">
|
3399
|
+
</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">
|
2986
3400
|
<xsl:apply-templates mode="contents"/>
|
2987
3401
|
<xsl:text> </xsl:text>
|
2988
|
-
</xsl:template><xsl:template match="
|
3402
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
3403
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3404
|
+
<xsl:text> </xsl:text>
|
3405
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2989
3406
|
<xsl:value-of select="."/>
|
2990
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3407
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3408
|
+
<xsl:value-of select="."/>
|
3409
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3410
|
+
<xsl:apply-templates mode="contents"/>
|
3411
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3412
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3413
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3414
|
+
<xsl:apply-templates select="."/>
|
3415
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3416
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3417
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3418
|
+
<xsl:param name="contents"/>
|
3419
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3420
|
+
<fo:bookmark-tree>
|
3421
|
+
<xsl:choose>
|
3422
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3423
|
+
<xsl:choose>
|
3424
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3425
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3426
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3427
|
+
<fo:bookmark-title>
|
3428
|
+
<xsl:variable name="bookmark-title_">
|
3429
|
+
<xsl:call-template name="getLangVersion">
|
3430
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3431
|
+
</xsl:call-template>
|
3432
|
+
</xsl:variable>
|
3433
|
+
<xsl:choose>
|
3434
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3435
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3436
|
+
</xsl:when>
|
3437
|
+
<xsl:otherwise>
|
3438
|
+
<xsl:choose>
|
3439
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3440
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3441
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3442
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3443
|
+
</xsl:choose>
|
3444
|
+
</xsl:otherwise>
|
3445
|
+
</xsl:choose>
|
3446
|
+
</fo:bookmark-title>
|
3447
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3448
|
+
</fo:bookmark>
|
3449
|
+
|
3450
|
+
</xsl:for-each>
|
3451
|
+
</xsl:when>
|
3452
|
+
<xsl:otherwise>
|
3453
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3454
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3455
|
+
</xsl:for-each>
|
3456
|
+
</xsl:otherwise>
|
3457
|
+
</xsl:choose>
|
3458
|
+
</xsl:when>
|
3459
|
+
<xsl:otherwise>
|
3460
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3461
|
+
</xsl:otherwise>
|
3462
|
+
</xsl:choose>
|
3463
|
+
|
3464
|
+
|
3465
|
+
|
3466
|
+
|
3467
|
+
|
3468
|
+
|
3469
|
+
|
3470
|
+
|
3471
|
+
</fo:bookmark-tree>
|
3472
|
+
</xsl:if>
|
3473
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3474
|
+
<xsl:param name="lang"/>
|
3475
|
+
<xsl:choose>
|
3476
|
+
<xsl:when test="$lang = 'en'">
|
3477
|
+
|
3478
|
+
|
3479
|
+
</xsl:when>
|
3480
|
+
<xsl:when test="$lang = 'fr'">
|
3481
|
+
|
3482
|
+
|
3483
|
+
</xsl:when>
|
3484
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3485
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3486
|
+
</xsl:choose>
|
3487
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3488
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3489
|
+
<fo:bookmark-title>
|
3490
|
+
<xsl:if test="@section != ''">
|
3491
|
+
<xsl:value-of select="@section"/>
|
3492
|
+
<xsl:text> </xsl:text>
|
3493
|
+
</xsl:if>
|
3494
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3495
|
+
</fo:bookmark-title>
|
3496
|
+
<xsl:apply-templates mode="bookmark"/>
|
3497
|
+
</fo:bookmark>
|
3498
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2991
3499
|
<xsl:if test="normalize-space() != ''">
|
2992
3500
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2993
3501
|
|
2994
3502
|
<xsl:if test="nist:dl">
|
2995
3503
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
2996
3504
|
</xsl:if>
|
2997
|
-
|
3505
|
+
|
2998
3506
|
<xsl:apply-templates/>
|
2999
3507
|
</fo:block>
|
3000
3508
|
</xsl:if>
|
@@ -3049,7 +3557,7 @@
|
|
3049
3557
|
<xsl:apply-templates/>
|
3050
3558
|
</xsl:otherwise>
|
3051
3559
|
</xsl:choose>
|
3052
|
-
</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">
|
3560
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3053
3561
|
<xsl:text> </xsl:text>
|
3054
3562
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3055
3563
|
<xsl:copy>
|
@@ -3058,21 +3566,61 @@
|
|
3058
3566
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3059
3567
|
<xsl:text> </xsl:text>
|
3060
3568
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3061
|
-
|
3062
|
-
|
3063
|
-
|
3064
|
-
|
3065
|
-
|
3569
|
+
|
3570
|
+
<fo:block-container margin-left="0mm">
|
3571
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3572
|
+
<xsl:attribute name="margin-left">
|
3573
|
+
<xsl:choose>
|
3574
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3575
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3576
|
+
</xsl:choose>
|
3577
|
+
</xsl:attribute>
|
3578
|
+
|
3579
|
+
</xsl:if>
|
3580
|
+
<fo:block-container margin-left="0mm">
|
3581
|
+
|
3582
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3583
|
+
<xsl:variable name="_font-size">
|
3584
|
+
|
3585
|
+
|
3586
|
+
|
3587
|
+
|
3588
|
+
|
3589
|
+
|
3590
|
+
|
3591
|
+
|
3592
|
+
|
3593
|
+
10
|
3594
|
+
|
3595
|
+
|
3596
|
+
|
3597
|
+
|
3598
|
+
</xsl:variable>
|
3599
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3600
|
+
<xsl:if test="$font-size != ''">
|
3601
|
+
<xsl:attribute name="font-size">
|
3602
|
+
<xsl:choose>
|
3603
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3604
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3605
|
+
</xsl:choose>
|
3606
|
+
</xsl:attribute>
|
3607
|
+
</xsl:if>
|
3608
|
+
<xsl:apply-templates/>
|
3609
|
+
</fo:block>
|
3610
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3611
|
+
|
3612
|
+
</fo:block-container>
|
3613
|
+
</fo:block-container>
|
3614
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3066
3615
|
<xsl:variable name="text">
|
3067
3616
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3068
3617
|
</xsl:variable>
|
3069
|
-
<xsl:call-template name="add-zero-spaces">
|
3618
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3070
3619
|
<xsl:with-param name="text" select="$text"/>
|
3071
3620
|
</xsl:call-template>
|
3072
3621
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3073
3622
|
<xsl:if test="normalize-space() != ''">
|
3074
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3075
|
-
|
3623
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3076
3624
|
<xsl:apply-templates/>
|
3077
3625
|
</fo:block>
|
3078
3626
|
</xsl:if>
|
@@ -3146,9 +3694,9 @@
|
|
3146
3694
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3147
3695
|
</xsl:if>
|
3148
3696
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3149
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black"
|
3697
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3150
3698
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3151
|
-
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
3699
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3152
3700
|
</xsl:if>
|
3153
3701
|
<xsl:variable name="simple-table">
|
3154
3702
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -3157,8 +3705,8 @@
|
|
3157
3705
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3158
3706
|
<!-- <fo:table-column column-width="35mm"/>
|
3159
3707
|
<fo:table-column column-width="115mm"/> -->
|
3160
|
-
<fo:table-column column-width="
|
3161
|
-
<fo:table-column column-width="
|
3708
|
+
<fo:table-column column-width="30%"/>
|
3709
|
+
<fo:table-column column-width="70%"/>
|
3162
3710
|
</xsl:if>
|
3163
3711
|
<xsl:apply-templates mode="requirement"/>
|
3164
3712
|
</fo:table>
|
@@ -3181,14 +3729,21 @@
|
|
3181
3729
|
<xsl:apply-templates mode="requirement"/>
|
3182
3730
|
</fo:table-body>
|
3183
3731
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3184
|
-
<fo:table-row height="7mm">
|
3185
|
-
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])
|
3186
|
-
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
3732
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3733
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3734
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3735
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3736
|
+
</xsl:if>
|
3737
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3738
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3739
|
+
</xsl:if>
|
3740
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3741
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3187
3742
|
</xsl:if>
|
3188
3743
|
<xsl:apply-templates mode="requirement"/>
|
3189
3744
|
</fo:table-row>
|
3190
3745
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3191
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3746
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3192
3747
|
<xsl:attribute name="text-align">
|
3193
3748
|
<xsl:choose>
|
3194
3749
|
<xsl:when test="@align">
|
@@ -3207,6 +3762,7 @@
|
|
3207
3762
|
<xsl:value-of select="@rowspan"/>
|
3208
3763
|
</xsl:attribute>
|
3209
3764
|
</xsl:if>
|
3765
|
+
<xsl:call-template name="display-align"/>
|
3210
3766
|
|
3211
3767
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3212
3768
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -3222,7 +3778,7 @@
|
|
3222
3778
|
</fo:block>
|
3223
3779
|
</fo:table-cell>
|
3224
3780
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3225
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3781
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3226
3782
|
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3227
3783
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3228
3784
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -3235,6 +3791,9 @@
|
|
3235
3791
|
<xsl:otherwise>left</xsl:otherwise>
|
3236
3792
|
</xsl:choose>
|
3237
3793
|
</xsl:attribute>
|
3794
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3795
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3796
|
+
</xsl:if>
|
3238
3797
|
<xsl:if test="@colspan">
|
3239
3798
|
<xsl:attribute name="number-columns-spanned">
|
3240
3799
|
<xsl:value-of select="@colspan"/>
|
@@ -3245,6 +3804,7 @@
|
|
3245
3804
|
<xsl:value-of select="@rowspan"/>
|
3246
3805
|
</xsl:attribute>
|
3247
3806
|
</xsl:if>
|
3807
|
+
<xsl:call-template name="display-align"/>
|
3248
3808
|
|
3249
3809
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3250
3810
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
@@ -3260,7 +3820,7 @@
|
|
3260
3820
|
</fo:block>
|
3261
3821
|
</fo:table-cell>
|
3262
3822
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3263
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3823
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3264
3824
|
<xsl:apply-templates/>
|
3265
3825
|
</fo:block>
|
3266
3826
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -3286,12 +3846,13 @@
|
|
3286
3846
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3287
3847
|
|
3288
3848
|
<xsl:variable name="element">
|
3289
|
-
block
|
3849
|
+
block
|
3290
3850
|
|
3851
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3291
3852
|
</xsl:variable>
|
3292
3853
|
|
3293
3854
|
<xsl:choose>
|
3294
|
-
<xsl:when test="normalize-space($element)
|
3855
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3295
3856
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3296
3857
|
<xsl:apply-templates/>
|
3297
3858
|
</fo:block>
|
@@ -3328,30 +3889,49 @@
|
|
3328
3889
|
</xsl:otherwise>
|
3329
3890
|
</xsl:choose>
|
3330
3891
|
|
3331
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3332
|
-
|
3333
|
-
|
3334
|
-
|
3335
|
-
<xsl:if test="$num = 1">
|
3336
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3337
|
-
</xsl:if>
|
3892
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3893
|
+
|
3894
|
+
<xsl:variable name="element">
|
3895
|
+
block
|
3338
3896
|
|
3339
|
-
|
3340
|
-
|
3897
|
+
</xsl:variable>
|
3898
|
+
<xsl:choose>
|
3899
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3900
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3901
|
+
|
3902
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3903
|
+
<xsl:if test="$num = 1">
|
3904
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3905
|
+
</xsl:if>
|
3906
|
+
|
3907
|
+
<xsl:apply-templates/>
|
3908
|
+
</fo:block>
|
3909
|
+
</xsl:when>
|
3910
|
+
<xsl:otherwise>
|
3911
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3912
|
+
<xsl:apply-templates/>
|
3913
|
+
</fo:inline>
|
3914
|
+
</xsl:otherwise>
|
3915
|
+
</xsl:choose>
|
3341
3916
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3342
3917
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3343
3918
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3344
3919
|
<xsl:variable name="termsource_text">
|
3345
3920
|
<xsl:apply-templates/>
|
3346
3921
|
</xsl:variable>
|
3922
|
+
|
3347
3923
|
<xsl:choose>
|
3348
3924
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3349
3925
|
<xsl:apply-templates/>
|
3350
3926
|
</xsl:when>
|
3351
|
-
<xsl:otherwise>
|
3352
|
-
|
3353
|
-
|
3354
|
-
|
3927
|
+
<xsl:otherwise>
|
3928
|
+
|
3929
|
+
<xsl:text>[</xsl:text>
|
3930
|
+
|
3931
|
+
<xsl:apply-templates/>
|
3932
|
+
|
3933
|
+
<xsl:text>]</xsl:text>
|
3934
|
+
|
3355
3935
|
</xsl:otherwise>
|
3356
3936
|
</xsl:choose>
|
3357
3937
|
</fo:block>
|
@@ -3372,18 +3952,29 @@
|
|
3372
3952
|
<xsl:if test="normalize-space() != ''">
|
3373
3953
|
<xsl:value-of select="."/>
|
3374
3954
|
</xsl:if>
|
3375
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3955
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3956
|
+
<fo:block-container margin-left="0mm">
|
3957
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3958
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3959
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3960
|
+
</xsl:if>
|
3961
|
+
</xsl:if>
|
3962
|
+
|
3963
|
+
<fo:block-container margin-left="0mm">
|
3376
3964
|
|
3377
|
-
|
3378
|
-
|
3379
|
-
|
3380
|
-
|
3381
|
-
|
3382
|
-
|
3383
|
-
|
3384
|
-
|
3385
|
-
|
3386
|
-
|
3965
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3966
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3967
|
+
</fo:block>
|
3968
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3969
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3970
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3971
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3972
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3973
|
+
</fo:block>
|
3974
|
+
</xsl:if>
|
3975
|
+
|
3976
|
+
</fo:block-container>
|
3977
|
+
</fo:block-container>
|
3387
3978
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3388
3979
|
<xsl:if test="../*[local-name() = 'author']">
|
3389
3980
|
<xsl:text>, </xsl:text>
|
@@ -3411,6 +4002,7 @@
|
|
3411
4002
|
<xsl:if test="@type = 'inline'">
|
3412
4003
|
|
3413
4004
|
|
4005
|
+
|
3414
4006
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3415
4007
|
|
3416
4008
|
</xsl:if>
|
@@ -3450,6 +4042,7 @@
|
|
3450
4042
|
|
3451
4043
|
|
3452
4044
|
|
4045
|
+
|
3453
4046
|
</xsl:variable>
|
3454
4047
|
|
3455
4048
|
<xsl:variable name="padding-right">
|
@@ -3544,6 +4137,7 @@
|
|
3544
4137
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3545
4138
|
<fo:block>
|
3546
4139
|
<xsl:call-template name="setId"/>
|
4140
|
+
|
3547
4141
|
<xsl:apply-templates/>
|
3548
4142
|
</fo:block>
|
3549
4143
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3570,6 +4164,31 @@
|
|
3570
4164
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3571
4165
|
<!-- 0xA0 to space replacement -->
|
3572
4166
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4167
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4168
|
+
<xsl:choose>
|
4169
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4170
|
+
<fo:block-container>
|
4171
|
+
<xsl:attribute name="margin-left">
|
4172
|
+
<xsl:choose>
|
4173
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4174
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4175
|
+
</xsl:choose>
|
4176
|
+
</xsl:attribute>
|
4177
|
+
|
4178
|
+
|
4179
|
+
<fo:block-container margin-left="0mm">
|
4180
|
+
<fo:block>
|
4181
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4182
|
+
</fo:block>
|
4183
|
+
</fo:block-container>
|
4184
|
+
</fo:block-container>
|
4185
|
+
</xsl:when>
|
4186
|
+
<xsl:otherwise>
|
4187
|
+
<fo:block>
|
4188
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4189
|
+
</fo:block>
|
4190
|
+
</xsl:otherwise>
|
4191
|
+
</xsl:choose>
|
3573
4192
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3574
4193
|
<!-- <row>
|
3575
4194
|
<date>05-07-2013</date>
|
@@ -3602,7 +4221,28 @@
|
|
3602
4221
|
<fo:block><xsl:apply-templates/></fo:block>
|
3603
4222
|
</fo:table-cell>
|
3604
4223
|
</xsl:template><xsl:template name="processBibitem">
|
4224
|
+
|
4225
|
+
|
3605
4226
|
|
4227
|
+
|
4228
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4229
|
+
<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')]"/>
|
4230
|
+
<xsl:choose>
|
4231
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4232
|
+
<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"/>
|
4233
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4234
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4235
|
+
</xsl:if>
|
4236
|
+
<xsl:value-of select="$_doc_ident"/>
|
4237
|
+
</xsl:when>
|
4238
|
+
<xsl:otherwise>
|
4239
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4240
|
+
<xsl:if test="$type != ''">
|
4241
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4242
|
+
</xsl:if>
|
4243
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4244
|
+
</xsl:otherwise>
|
4245
|
+
</xsl:choose>
|
3606
4246
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
3607
4247
|
<xsl:choose>
|
3608
4248
|
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
@@ -3721,6 +4361,7 @@
|
|
3721
4361
|
|
3722
4362
|
|
3723
4363
|
|
4364
|
+
|
3724
4365
|
|
3725
4366
|
</xsl:variable>
|
3726
4367
|
<xsl:choose>
|
@@ -3735,6 +4376,7 @@
|
|
3735
4376
|
<dc:creator>
|
3736
4377
|
|
3737
4378
|
|
4379
|
+
|
3738
4380
|
<xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
3739
4381
|
<xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
3740
4382
|
<xsl:if test="position() != last()">; </xsl:if>
|
@@ -3749,6 +4391,7 @@
|
|
3749
4391
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
3750
4392
|
|
3751
4393
|
|
4394
|
+
|
3752
4395
|
</xsl:variable>
|
3753
4396
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3754
4397
|
</dc:description>
|
@@ -3849,6 +4492,7 @@
|
|
3849
4492
|
|
3850
4493
|
|
3851
4494
|
|
4495
|
+
|
3852
4496
|
</xsl:variable>
|
3853
4497
|
<xsl:if test="$documentNS != $XSLNS">
|
3854
4498
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3874,4 +4518,21 @@
|
|
3874
4518
|
</xsl:otherwise>
|
3875
4519
|
</xsl:choose>
|
3876
4520
|
</xsl:attribute>
|
4521
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4522
|
+
<xsl:param name="text"/>
|
4523
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4524
|
+
<xsl:if test="string-length($text) > 0">
|
4525
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4526
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4527
|
+
<xsl:if test="$char = '®'">
|
4528
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4529
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4530
|
+
</xsl:if>
|
4531
|
+
<xsl:value-of select="$char"/>
|
4532
|
+
</fo:inline>
|
4533
|
+
<xsl:call-template name="add-letter-spacing">
|
4534
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4535
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4536
|
+
</xsl:call-template>
|
4537
|
+
</xsl:if>
|
3877
4538
|
</xsl:template></xsl:stylesheet>
|