metanorma-iho 1.1.9 → 1.2.1
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/isodoc/iho/iho.specification.xsl +709 -505
- data/lib/isodoc/iho/iho.standard.xsl +709 -505
- data/lib/isodoc/iho/metadata.rb +13 -0
- data/lib/isodoc/iho/presentation_xml_convert.rb +3 -2
- data/lib/metanorma/iho/basicdoc.rng +5 -5
- data/lib/metanorma/iho/cleanup.rb +46 -0
- data/lib/metanorma/iho/converter.rb +2 -72
- data/lib/metanorma/iho/front.rb +142 -0
- data/lib/metanorma/iho/isodoc.rng +57 -6
- data/lib/metanorma/iho/relaton-iho.rng +27 -0
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- data/metanorma.yml +12 -0
- metadata +6 -4
@@ -2,14 +2,27 @@
|
|
2
2
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
|
-
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:name))]" use="@reference"/>
|
5
|
+
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
9
|
-
<xsl:variable name="title-en">
|
10
|
-
|
9
|
+
<xsl:variable name="title-en"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']/node()"/></xsl:variable>
|
10
|
+
<xsl:variable name="title-main_"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'main']/node()"/></xsl:variable>
|
11
|
+
<xsl:variable name="title-main"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-main']/node()"/></xsl:variable>
|
12
|
+
<xsl:variable name="title-appendix"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-appendix']/node()"/></xsl:variable>
|
13
|
+
<xsl:variable name="title-annex"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-annex']/node()"/></xsl:variable>
|
14
|
+
<xsl:variable name="title-part"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-part']/node()"/></xsl:variable>
|
15
|
+
<xsl:variable name="title-supplement"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-supplement']/node()"/></xsl:variable>
|
16
|
+
<xsl:variable name="title_header">
|
17
|
+
<xsl:copy-of select="$title-main_"/>
|
18
|
+
<xsl:if test="normalize-space($title-main_) = ''"><xsl:copy-of select="$title-en"/></xsl:if>
|
11
19
|
</xsl:variable>
|
12
|
-
|
20
|
+
|
21
|
+
<xsl:variable name="docidentifier_parent" select="normalize-space(/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO-parent-document'])"/>
|
22
|
+
<xsl:variable name="docidentifier">
|
23
|
+
<xsl:value-of select="$docidentifier_parent"/>
|
24
|
+
<xsl:if test="$docidentifier_parent = ''"><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO']"/></xsl:if>
|
25
|
+
</xsl:variable>
|
13
26
|
<xsl:variable name="copyrightText" select="concat('© International Hydrographic Association ', /mn:metanorma/mn:bibdata/mn:copyright/mn:from ,' – All rights reserved')"/>
|
14
27
|
<xsl:variable name="edition">
|
15
28
|
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
|
@@ -32,6 +45,96 @@
|
|
32
45
|
</xsl:variable>
|
33
46
|
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
34
47
|
|
48
|
+
<xsl:template name="layout-master-set">
|
49
|
+
<fo:layout-master-set>
|
50
|
+
<!-- cover page -->
|
51
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
52
|
+
<fo:region-body margin-top="0mm" margin-bottom="5mm" margin-left="0mm" margin-right="5mm"/>
|
53
|
+
</fo:simple-page-master>
|
54
|
+
|
55
|
+
<fo:simple-page-master master-name="first" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
56
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
57
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
58
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
59
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
60
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
61
|
+
</fo:simple-page-master>
|
62
|
+
<fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
63
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
64
|
+
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
|
65
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
66
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
67
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
68
|
+
</fo:simple-page-master>
|
69
|
+
<fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
70
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
71
|
+
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
|
72
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
73
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
74
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
75
|
+
</fo:simple-page-master>
|
76
|
+
<fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
77
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
78
|
+
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
79
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
80
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
81
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
82
|
+
</fo:simple-page-master>
|
83
|
+
<fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
84
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
85
|
+
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
86
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
87
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
88
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
89
|
+
</fo:simple-page-master>
|
90
|
+
<fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
91
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
92
|
+
<fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
|
93
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
94
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
95
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
96
|
+
</fo:simple-page-master>
|
97
|
+
<!-- Preface pages -->
|
98
|
+
<fo:page-sequence-master master-name="preface">
|
99
|
+
<fo:repeatable-page-master-alternatives>
|
100
|
+
<!-- <fo:conditional-page-master-reference master-reference="first" page-position="first"/> -->
|
101
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
102
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
103
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
104
|
+
</fo:repeatable-page-master-alternatives>
|
105
|
+
</fo:page-sequence-master>
|
106
|
+
<fo:page-sequence-master master-name="preface-landscape">
|
107
|
+
<fo:repeatable-page-master-alternatives>
|
108
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
109
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
|
110
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
|
111
|
+
</fo:repeatable-page-master-alternatives>
|
112
|
+
</fo:page-sequence-master>
|
113
|
+
<!-- Document pages -->
|
114
|
+
<fo:page-sequence-master master-name="document">
|
115
|
+
<fo:repeatable-page-master-alternatives>
|
116
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
117
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
118
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
119
|
+
</fo:repeatable-page-master-alternatives>
|
120
|
+
</fo:page-sequence-master>
|
121
|
+
<fo:page-sequence-master master-name="document-portrait">
|
122
|
+
<fo:repeatable-page-master-alternatives>
|
123
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
124
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
125
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
126
|
+
</fo:repeatable-page-master-alternatives>
|
127
|
+
</fo:page-sequence-master>
|
128
|
+
<fo:page-sequence-master master-name="document-landscape">
|
129
|
+
<fo:repeatable-page-master-alternatives>
|
130
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
131
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
|
132
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
|
133
|
+
</fo:repeatable-page-master-alternatives>
|
134
|
+
</fo:page-sequence-master>
|
135
|
+
</fo:layout-master-set>
|
136
|
+
</xsl:template> <!-- END: layout-master-set -->
|
137
|
+
|
35
138
|
<xsl:template match="/">
|
36
139
|
|
37
140
|
<fo:root xml:lang="{$lang}">
|
@@ -41,93 +144,8 @@
|
|
41
144
|
<xsl:call-template name="insertRootStyle">
|
42
145
|
<xsl:with-param name="root-style" select="$root-style"/>
|
43
146
|
</xsl:call-template>
|
44
|
-
|
45
|
-
|
46
|
-
<fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
47
|
-
<fo:region-body margin-top="0mm" margin-bottom="5mm" margin-left="0mm" margin-right="5mm"/>
|
48
|
-
</fo:simple-page-master>
|
49
|
-
|
50
|
-
<fo:simple-page-master master-name="first" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
51
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
52
|
-
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
53
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
54
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
55
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
56
|
-
</fo:simple-page-master>
|
57
|
-
<fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
58
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
59
|
-
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
|
60
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
61
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
62
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
63
|
-
</fo:simple-page-master>
|
64
|
-
<fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
65
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
66
|
-
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
|
67
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
68
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
69
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
70
|
-
</fo:simple-page-master>
|
71
|
-
<fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
72
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
73
|
-
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
74
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
75
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
76
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
77
|
-
</fo:simple-page-master>
|
78
|
-
<fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
79
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
80
|
-
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
81
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
82
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
83
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
84
|
-
</fo:simple-page-master>
|
85
|
-
<fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
86
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
87
|
-
<fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
|
88
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
89
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
90
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
91
|
-
</fo:simple-page-master>
|
92
|
-
<!-- Preface pages -->
|
93
|
-
<fo:page-sequence-master master-name="preface">
|
94
|
-
<fo:repeatable-page-master-alternatives>
|
95
|
-
<!-- <fo:conditional-page-master-reference master-reference="first" page-position="first"/> -->
|
96
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
97
|
-
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
98
|
-
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
99
|
-
</fo:repeatable-page-master-alternatives>
|
100
|
-
</fo:page-sequence-master>
|
101
|
-
<fo:page-sequence-master master-name="preface-landscape">
|
102
|
-
<fo:repeatable-page-master-alternatives>
|
103
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
104
|
-
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
|
105
|
-
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
|
106
|
-
</fo:repeatable-page-master-alternatives>
|
107
|
-
</fo:page-sequence-master>
|
108
|
-
<!-- Document pages -->
|
109
|
-
<fo:page-sequence-master master-name="document">
|
110
|
-
<fo:repeatable-page-master-alternatives>
|
111
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
112
|
-
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
113
|
-
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
114
|
-
</fo:repeatable-page-master-alternatives>
|
115
|
-
</fo:page-sequence-master>
|
116
|
-
<fo:page-sequence-master master-name="document-portrait">
|
117
|
-
<fo:repeatable-page-master-alternatives>
|
118
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
119
|
-
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
120
|
-
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
121
|
-
</fo:repeatable-page-master-alternatives>
|
122
|
-
</fo:page-sequence-master>
|
123
|
-
<fo:page-sequence-master master-name="document-landscape">
|
124
|
-
<fo:repeatable-page-master-alternatives>
|
125
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
126
|
-
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
|
127
|
-
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
|
128
|
-
</fo:repeatable-page-master-alternatives>
|
129
|
-
</fo:page-sequence-master>
|
130
|
-
</fo:layout-master-set>
|
147
|
+
|
148
|
+
<xsl:call-template name="layout-master-set"/>
|
131
149
|
|
132
150
|
<fo:declarations>
|
133
151
|
<xsl:call-template name="addPDFUAmeta"/>
|
@@ -149,160 +167,7 @@
|
|
149
167
|
|
150
168
|
<xsl:for-each select="xalan:nodeset($updated_xml)/*">
|
151
169
|
|
152
|
-
|
153
|
-
<!-- Cover Page -->
|
154
|
-
<fo:page-sequence master-reference="cover">
|
155
|
-
<fo:flow flow-name="xsl-region-body">
|
156
|
-
|
157
|
-
<xsl:variable name="isCoverPageImage" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and 1 = 1)"/>
|
158
|
-
|
159
|
-
<xsl:variable name="document_scheme" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'document-scheme']/mn:value)"/>
|
160
|
-
|
161
|
-
<xsl:choose>
|
162
|
-
<xsl:when test="$document_scheme != '' and $document_scheme != '2019' and $isCoverPageImage = 'true'">
|
163
|
-
<xsl:call-template name="insertBackgroundPageImage"/>
|
164
|
-
</xsl:when>
|
165
|
-
<xsl:otherwise>
|
166
|
-
|
167
|
-
<fo:block-container position="absolute" left="14.25mm" top="12mm" id="__internal_layout__coverpage_{generate-id()}">
|
168
|
-
<fo:table table-layout="fixed" width="181.1mm">
|
169
|
-
<fo:table-column column-width="26mm"/>
|
170
|
-
<fo:table-column column-width="19.4mm"/>
|
171
|
-
<fo:table-column column-width="135.7mm"/>
|
172
|
-
<fo:table-body>
|
173
|
-
<fo:table-row>
|
174
|
-
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
175
|
-
<fo:table-cell>
|
176
|
-
<fo:block-container width="19.4mm" height="21mm" background-color="rgb(241, 234, 202)" border-bottom="0.05pt solid rgb(0, 21, 50)" text-align="center" display-align="center" font-size="10pt" font-weight="bold">
|
177
|
-
<xsl:if test="$isCoverPageImage = 'true'">
|
178
|
-
<xsl:attribute name="width">42.5mm</xsl:attribute>
|
179
|
-
</xsl:if>
|
180
|
-
<fo:block>
|
181
|
-
<xsl:value-of select="$docidentifier"/>
|
182
|
-
<xsl:if test="$isCoverPageImage = 'true'">
|
183
|
-
<xsl:text> </xsl:text><xsl:value-of select="$edition"/>
|
184
|
-
</xsl:if>
|
185
|
-
</fo:block>
|
186
|
-
</fo:block-container>
|
187
|
-
</fo:table-cell>
|
188
|
-
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
189
|
-
</fo:table-row>
|
190
|
-
<fo:table-row>
|
191
|
-
<fo:table-cell display-align="after" text-align="right">
|
192
|
-
<fo:block font-size="1">
|
193
|
-
<fo:instream-foreign-object content-width="25.9mm" fox:alt-text="Image IHO">
|
194
|
-
<xsl:copy-of select="$Image-IHO-SVG"/>
|
195
|
-
</fo:instream-foreign-object>
|
196
|
-
</fo:block>
|
197
|
-
</fo:table-cell>
|
198
|
-
|
199
|
-
<!-- https://github.com/metanorma/metanorma-iho/issues/288 -->
|
200
|
-
<xsl:choose>
|
201
|
-
<xsl:when test="$isCoverPageImage = 'true'">
|
202
|
-
<fo:table-cell number-columns-spanned="2">
|
203
|
-
<fo:block-container font-size="0"> <!-- height="168mm" width="115mm" -->
|
204
|
-
<fo:block>
|
205
|
-
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image'][1]/mn:value/mn:image[1]">
|
206
|
-
<xsl:choose>
|
207
|
-
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
208
|
-
<fo:instream-foreign-object fox:alt-text="Image Front">
|
209
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
210
|
-
<xsl:call-template name="getSVG"/>
|
211
|
-
</fo:instream-foreign-object>
|
212
|
-
</xsl:when>
|
213
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
214
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
215
|
-
</xsl:when>
|
216
|
-
<xsl:otherwise> <!-- bitmap image -->
|
217
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
218
|
-
<xsl:if test="$coverimage_src != ''">
|
219
|
-
<xsl:variable name="coverpage">
|
220
|
-
<xsl:call-template name="getImageURL">
|
221
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
222
|
-
</xsl:call-template>
|
223
|
-
</xsl:variable>
|
224
|
-
<fo:external-graphic src="{$coverpage}" width="155.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
225
|
-
</xsl:if>
|
226
|
-
</xsl:otherwise>
|
227
|
-
</xsl:choose>
|
228
|
-
</xsl:for-each>
|
229
|
-
</fo:block>
|
230
|
-
</fo:block-container>
|
231
|
-
</fo:table-cell>
|
232
|
-
</xsl:when>
|
233
|
-
<xsl:otherwise>
|
234
|
-
<fo:table-cell number-columns-spanned="2" border="0.5pt solid rgb(0, 21, 50)" font-weight="bold" color="rgb(0, 0, 76)" padding-top="3mm">
|
235
|
-
<fo:block-container height="165mm" width="115mm">
|
236
|
-
<fo:block-container margin-left="10mm">
|
237
|
-
<fo:block-container margin-left="0mm">
|
238
|
-
<fo:block-container display-align="center" height="90mm">
|
239
|
-
<fo:block font-size="28pt" role="H1" line-height="115%">
|
240
|
-
<xsl:copy-of select="$title-en"/>
|
241
|
-
</fo:block>
|
242
|
-
</fo:block-container>
|
243
|
-
<fo:block font-size="14pt">
|
244
|
-
<xsl:value-of select="$edition"/>
|
245
|
-
<xsl:if test="normalize-space($month_year) != ''">
|
246
|
-
<xsl:text> – </xsl:text>
|
247
|
-
<xsl:value-of select="$month_year"/>
|
248
|
-
</xsl:if>
|
249
|
-
</fo:block>
|
250
|
-
</fo:block-container>
|
251
|
-
</fo:block-container>
|
252
|
-
</fo:block-container>
|
253
|
-
</fo:table-cell>
|
254
|
-
</xsl:otherwise>
|
255
|
-
</xsl:choose>
|
256
|
-
</fo:table-row>
|
257
|
-
<fo:table-row>
|
258
|
-
<fo:table-cell>
|
259
|
-
<fo:block font-size="1">
|
260
|
-
<fo:instream-foreign-object content-width="25.9mm" fox:alt-text="Image Logo IHO">
|
261
|
-
<xsl:copy-of select="$Image-Logo-IHO-SVG"/>
|
262
|
-
</fo:instream-foreign-object>
|
263
|
-
</fo:block>
|
264
|
-
</fo:table-cell>
|
265
|
-
<fo:table-cell>
|
266
|
-
<fo:block font-size="1">
|
267
|
-
<fo:instream-foreign-object content-width="25.8mm" fox:alt-text="Image Logo IHO">
|
268
|
-
<xsl:copy-of select="$Image-Text-IHO-SVG"/>
|
269
|
-
</fo:instream-foreign-object>
|
270
|
-
</fo:block>
|
271
|
-
</fo:table-cell>
|
272
|
-
<fo:table-cell number-rows-spanned="2">
|
273
|
-
<fo:block-container width="79mm" height="72mm" margin-left="56.8mm" background-color="rgb(0, 172, 158)" text-align="right" display-align="after">
|
274
|
-
<fo:block-container margin-left="0mm">
|
275
|
-
<fo:block font-size="8pt" color="white" margin-right="5mm" margin-bottom="5mm" line-height-shift-adjustment="disregard-shifts">
|
276
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/>
|
277
|
-
</fo:block>
|
278
|
-
</fo:block-container>
|
279
|
-
</fo:block-container>
|
280
|
-
</fo:table-cell>
|
281
|
-
</fo:table-row>
|
282
|
-
<fo:table-row>
|
283
|
-
<fo:table-cell number-columns-spanned="2" padding-top="2mm">
|
284
|
-
<fo:block-container width="51.5mm">
|
285
|
-
<fo:block>
|
286
|
-
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type = 'publisher']/mn:organization[not(mn:abbreviation = 'IHO')]">
|
287
|
-
<xsl:apply-templates select="mn:logo/mn:image">
|
288
|
-
<xsl:with-param name="logo_width">25.8mm</xsl:with-param>
|
289
|
-
</xsl:apply-templates>
|
290
|
-
<xsl:if test="position() != last()"><fo:inline> </fo:inline></xsl:if>
|
291
|
-
</xsl:for-each>
|
292
|
-
</fo:block>
|
293
|
-
</fo:block-container>
|
294
|
-
</fo:table-cell>
|
295
|
-
</fo:table-row>
|
296
|
-
</fo:table-body>
|
297
|
-
</fo:table>
|
298
|
-
</fo:block-container>
|
299
|
-
</xsl:otherwise>
|
300
|
-
</xsl:choose>
|
301
|
-
</fo:flow>
|
302
|
-
</fo:page-sequence>
|
303
|
-
<!-- End Cover Page -->
|
304
|
-
<!-- =========================== -->
|
305
|
-
<!-- =========================== -->
|
170
|
+
<xsl:call-template name="cover-page"/>
|
306
171
|
|
307
172
|
<xsl:choose>
|
308
173
|
<xsl:when test="/mn:metanorma/mn:boilerplate/*[not(self::mn:feedback-statement)]">
|
@@ -496,6 +361,191 @@
|
|
496
361
|
</fo:root>
|
497
362
|
</xsl:template>
|
498
363
|
|
364
|
+
<xsl:template name="cover-page">
|
365
|
+
<!-- =========================== -->
|
366
|
+
<!-- Cover Page -->
|
367
|
+
<fo:page-sequence master-reference="cover-page">
|
368
|
+
<fo:flow flow-name="xsl-region-body">
|
369
|
+
|
370
|
+
<xsl:variable name="isCoverPageImage" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and 1 = 1)"/>
|
371
|
+
|
372
|
+
<xsl:variable name="document_scheme" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'document-scheme']/mn:value)"/>
|
373
|
+
|
374
|
+
<xsl:choose>
|
375
|
+
<xsl:when test="$document_scheme != '' and $document_scheme != '2019' and $isCoverPageImage = 'true'">
|
376
|
+
<xsl:call-template name="insertBackgroundPageImage"/>
|
377
|
+
</xsl:when>
|
378
|
+
<xsl:otherwise>
|
379
|
+
|
380
|
+
<fo:block-container position="absolute" left="14.25mm" top="12mm" id="__internal_layout__coverpage_{generate-id()}">
|
381
|
+
<fo:table table-layout="fixed" width="181.1mm">
|
382
|
+
<fo:table-column column-width="26mm"/>
|
383
|
+
<fo:table-column column-width="19.4mm"/>
|
384
|
+
<fo:table-column column-width="135.7mm"/>
|
385
|
+
<fo:table-body>
|
386
|
+
<fo:table-row>
|
387
|
+
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
388
|
+
<fo:table-cell>
|
389
|
+
<fo:block-container width="19.4mm" height="21mm" background-color="rgb(241, 234, 202)" border-bottom="0.05pt solid rgb(0, 21, 50)" text-align="center" display-align="center" font-size="10pt" font-weight="bold">
|
390
|
+
<xsl:if test="$isCoverPageImage = 'true'">
|
391
|
+
<xsl:attribute name="width">42.5mm</xsl:attribute>
|
392
|
+
</xsl:if>
|
393
|
+
<fo:block>
|
394
|
+
<xsl:value-of select="$docidentifier"/>
|
395
|
+
<xsl:if test="$isCoverPageImage = 'true'">
|
396
|
+
<xsl:text> </xsl:text><xsl:value-of select="$edition"/>
|
397
|
+
</xsl:if>
|
398
|
+
</fo:block>
|
399
|
+
</fo:block-container>
|
400
|
+
</fo:table-cell>
|
401
|
+
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
402
|
+
</fo:table-row>
|
403
|
+
<fo:table-row>
|
404
|
+
<fo:table-cell display-align="after" text-align="right">
|
405
|
+
<fo:block font-size="1">
|
406
|
+
<fo:instream-foreign-object content-width="25.9mm" fox:alt-text="Image IHO">
|
407
|
+
<xsl:copy-of select="$Image-IHO-SVG"/>
|
408
|
+
</fo:instream-foreign-object>
|
409
|
+
</fo:block>
|
410
|
+
</fo:table-cell>
|
411
|
+
|
412
|
+
<!-- https://github.com/metanorma/metanorma-iho/issues/288 -->
|
413
|
+
<xsl:choose>
|
414
|
+
<xsl:when test="$isCoverPageImage = 'true'">
|
415
|
+
<fo:table-cell number-columns-spanned="2">
|
416
|
+
<fo:block-container font-size="0"> <!-- height="168mm" width="115mm" -->
|
417
|
+
<fo:block>
|
418
|
+
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image'][1]/mn:value/mn:image[1]">
|
419
|
+
<xsl:choose>
|
420
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
421
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
422
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
423
|
+
<xsl:call-template name="getSVG"/>
|
424
|
+
</fo:instream-foreign-object>
|
425
|
+
</xsl:when>
|
426
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
427
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
428
|
+
</xsl:when>
|
429
|
+
<xsl:otherwise> <!-- bitmap image -->
|
430
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
431
|
+
<xsl:if test="$coverimage_src != ''">
|
432
|
+
<xsl:variable name="coverpage">
|
433
|
+
<xsl:call-template name="getImageURL">
|
434
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
435
|
+
</xsl:call-template>
|
436
|
+
</xsl:variable>
|
437
|
+
<fo:external-graphic src="{$coverpage}" width="155.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
438
|
+
</xsl:if>
|
439
|
+
</xsl:otherwise>
|
440
|
+
</xsl:choose>
|
441
|
+
</xsl:for-each>
|
442
|
+
</fo:block>
|
443
|
+
</fo:block-container>
|
444
|
+
</fo:table-cell>
|
445
|
+
</xsl:when>
|
446
|
+
<xsl:otherwise>
|
447
|
+
<fo:table-cell number-columns-spanned="2" border="0.5pt solid rgb(0, 21, 50)" font-weight="bold" color="rgb(0, 0, 76)" padding-top="3mm">
|
448
|
+
<fo:block-container height="165mm" width="115mm">
|
449
|
+
<fo:block-container margin-left="10mm">
|
450
|
+
<fo:block-container margin-left="0mm">
|
451
|
+
|
452
|
+
<!-- <fo:block-container display-align="center" height="90mm"> -->
|
453
|
+
<fo:table table-layout="fixed" width="100%">
|
454
|
+
<fo:table-body>
|
455
|
+
<fo:table-row min-height="90mm"> <!-- for debug: border="1pt solid blue" -->
|
456
|
+
<fo:table-cell display-align="center">
|
457
|
+
<xsl:if test="normalize-space($title-annex) != '' or normalize-space($title-appendix) != '' or normalize-space($title-supplement) != ''">
|
458
|
+
<fo:block font-size="14pt" role="H1" line-height="115%" margin-top="35mm">
|
459
|
+
<fo:block><xsl:copy-of select="$title-annex"/></fo:block>
|
460
|
+
<fo:block><xsl:copy-of select="$title-appendix"/></fo:block>
|
461
|
+
<fo:block><xsl:copy-of select="$title-supplement"/></fo:block>
|
462
|
+
</fo:block>
|
463
|
+
<fo:block font-size="28pt" role="SKIP" line-height="115%"> </fo:block>
|
464
|
+
</xsl:if>
|
465
|
+
<fo:block font-size="28pt" role="H1" line-height="115%">
|
466
|
+
<xsl:copy-of select="$title-main"/>
|
467
|
+
<xsl:if test="normalize-space($title-main) = ''">
|
468
|
+
<xsl:copy-of select="$title-main_"/>
|
469
|
+
<xsl:if test="normalize-space($title-main_) = ''"><xsl:copy-of select="$title-en"/></xsl:if>
|
470
|
+
</xsl:if>
|
471
|
+
</fo:block>
|
472
|
+
<xsl:if test="normalize-space($title-part) != ''">
|
473
|
+
<fo:block font-size="28pt" role="SKIP" line-height="115%"> </fo:block>
|
474
|
+
<fo:block font-size="18pt" role="H2" line-height="115%" margin-bottom="10mm">
|
475
|
+
<xsl:copy-of select="$title-part"/>
|
476
|
+
</fo:block>
|
477
|
+
</xsl:if>
|
478
|
+
</fo:table-cell>
|
479
|
+
</fo:table-row>
|
480
|
+
</fo:table-body>
|
481
|
+
</fo:table>
|
482
|
+
<!-- </fo:block-container> -->
|
483
|
+
|
484
|
+
<fo:block font-size="14pt">
|
485
|
+
<xsl:value-of select="$edition"/>
|
486
|
+
<xsl:if test="normalize-space($month_year) != ''">
|
487
|
+
<xsl:text> – </xsl:text>
|
488
|
+
<xsl:value-of select="$month_year"/>
|
489
|
+
</xsl:if>
|
490
|
+
</fo:block>
|
491
|
+
</fo:block-container>
|
492
|
+
</fo:block-container>
|
493
|
+
</fo:block-container>
|
494
|
+
</fo:table-cell>
|
495
|
+
</xsl:otherwise>
|
496
|
+
</xsl:choose>
|
497
|
+
</fo:table-row>
|
498
|
+
<fo:table-row>
|
499
|
+
<fo:table-cell>
|
500
|
+
<fo:block font-size="1">
|
501
|
+
<fo:instream-foreign-object content-width="25.9mm" fox:alt-text="Image Logo IHO">
|
502
|
+
<xsl:copy-of select="$Image-Logo-IHO-SVG"/>
|
503
|
+
</fo:instream-foreign-object>
|
504
|
+
</fo:block>
|
505
|
+
</fo:table-cell>
|
506
|
+
<fo:table-cell>
|
507
|
+
<fo:block font-size="1">
|
508
|
+
<fo:instream-foreign-object content-width="25.8mm" fox:alt-text="Image Logo IHO">
|
509
|
+
<xsl:copy-of select="$Image-Text-IHO-SVG"/>
|
510
|
+
</fo:instream-foreign-object>
|
511
|
+
</fo:block>
|
512
|
+
</fo:table-cell>
|
513
|
+
<fo:table-cell number-rows-spanned="2">
|
514
|
+
<fo:block-container width="79mm" height="72mm" margin-left="56.8mm" background-color="rgb(0, 172, 158)" text-align="right" display-align="after">
|
515
|
+
<fo:block-container margin-left="0mm">
|
516
|
+
<fo:block font-size="8pt" color="white" margin-right="5mm" margin-bottom="5mm" line-height-shift-adjustment="disregard-shifts">
|
517
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/>
|
518
|
+
</fo:block>
|
519
|
+
</fo:block-container>
|
520
|
+
</fo:block-container>
|
521
|
+
</fo:table-cell>
|
522
|
+
</fo:table-row>
|
523
|
+
<fo:table-row>
|
524
|
+
<fo:table-cell number-columns-spanned="2" padding-top="2mm">
|
525
|
+
<fo:block-container width="51.5mm">
|
526
|
+
<fo:block>
|
527
|
+
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type = 'publisher']/mn:organization[not(mn:abbreviation = 'IHO')]">
|
528
|
+
<xsl:apply-templates select="mn:logo/mn:image">
|
529
|
+
<xsl:with-param name="logo_width">25.8mm</xsl:with-param>
|
530
|
+
</xsl:apply-templates>
|
531
|
+
<xsl:if test="position() != last()"><fo:inline> </fo:inline></xsl:if>
|
532
|
+
</xsl:for-each>
|
533
|
+
</fo:block>
|
534
|
+
</fo:block-container>
|
535
|
+
</fo:table-cell>
|
536
|
+
</fo:table-row>
|
537
|
+
</fo:table-body>
|
538
|
+
</fo:table>
|
539
|
+
</fo:block-container>
|
540
|
+
</xsl:otherwise>
|
541
|
+
</xsl:choose>
|
542
|
+
</fo:flow>
|
543
|
+
</fo:page-sequence>
|
544
|
+
<!-- End Cover Page -->
|
545
|
+
<!-- =========================== -->
|
546
|
+
<!-- =========================== -->
|
547
|
+
</xsl:template>
|
548
|
+
|
499
549
|
<xsl:template name="insertListOf_Title">
|
500
550
|
<xsl:param name="title"/>
|
501
551
|
<fo:block role="TOCI" font-weight="bold" margin-top="6pt" keep-with-next="always">
|
@@ -566,7 +616,7 @@
|
|
566
616
|
</redirect:write>
|
567
617
|
</xsl:if>
|
568
618
|
|
569
|
-
<xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
|
619
|
+
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
570
620
|
|
571
621
|
<fo:block line-height="115%" role="TOC">
|
572
622
|
|
@@ -635,7 +685,7 @@
|
|
635
685
|
</fo:block>
|
636
686
|
</xsl:template>
|
637
687
|
|
638
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
|
688
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
639
689
|
<fo:block font-weight="bold" margin-bottom="7.5pt" font-size="12pt" margin-top="4pt" role="SKIP">
|
640
690
|
<fo:block-container width="18.3mm" border-bottom="1.25pt solid black" role="SKIP">
|
641
691
|
<fo:block line-height="75%">
|
@@ -782,14 +832,14 @@
|
|
782
832
|
<!-- title -->
|
783
833
|
<!-- ====== -->
|
784
834
|
|
785
|
-
<xsl:template match="mn:annex/mn:title">
|
835
|
+
<xsl:template match="mn:annex/mn:fmt-title">
|
786
836
|
<fo:block font-size="12pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always" role="H1">
|
787
837
|
<xsl:apply-templates/>
|
788
838
|
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
789
839
|
</fo:block>
|
790
840
|
</xsl:template>
|
791
841
|
|
792
|
-
<xsl:template match="mn:bibliography/mn:references[not(@normative='true')]/mn:title">
|
842
|
+
<xsl:template match="mn:bibliography/mn:references[not(@normative='true')]/mn:fmt-title">
|
793
843
|
<fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always" role="H1">
|
794
844
|
<xsl:apply-templates/>
|
795
845
|
</fo:block>
|
@@ -800,7 +850,7 @@
|
|
800
850
|
<fo:block break-after="page"/>
|
801
851
|
</xsl:if>
|
802
852
|
<xsl:choose>
|
803
|
-
<xsl:when test="mn:title">
|
853
|
+
<xsl:when test="mn:fmt-title">
|
804
854
|
<xsl:apply-templates/>
|
805
855
|
</xsl:when>
|
806
856
|
<xsl:otherwise>
|
@@ -813,7 +863,7 @@
|
|
813
863
|
</xsl:choose>
|
814
864
|
</xsl:template>
|
815
865
|
|
816
|
-
<xsl:template match="mn:title" name="title">
|
866
|
+
<xsl:template match="mn:fmt-title" name="title">
|
817
867
|
|
818
868
|
<xsl:variable name="level">
|
819
869
|
<xsl:call-template name="getLevel"/>
|
@@ -844,7 +894,7 @@
|
|
844
894
|
<xsl:attribute name="space-before">
|
845
895
|
<xsl:choose>
|
846
896
|
<xsl:when test="$level = 1">24pt</xsl:when>
|
847
|
-
<xsl:when test="$level = 2 and ../preceding-sibling::*[1][self::mn:title]">10pt</xsl:when>
|
897
|
+
<xsl:when test="$level = 2 and ../preceding-sibling::*[1][self::mn:fmt-title]">10pt</xsl:when>
|
848
898
|
<xsl:when test="$level = 2">24pt</xsl:when>
|
849
899
|
<xsl:when test="$level >= 3">6pt</xsl:when>
|
850
900
|
<xsl:when test="ancestor::mn:preface">8pt</xsl:when>
|
@@ -889,7 +939,7 @@
|
|
889
939
|
<xsl:variable name="element-name">
|
890
940
|
<xsl:choose>
|
891
941
|
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
|
892
|
-
<xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
942
|
+
<xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
893
943
|
<xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
|
894
944
|
<xsl:when test="ancestor::*[self::mn:recommendation or self::mn:requirement or self::mn:permission] and not(preceding-sibling::mn:p)">fo:inline</xsl:when>
|
895
945
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
@@ -1005,7 +1055,7 @@
|
|
1005
1055
|
<fo:table-body>
|
1006
1056
|
<fo:table-row>
|
1007
1057
|
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
1008
|
-
<fo:table-cell text-align="center"><fo:block><xsl:copy-of select="$
|
1058
|
+
<fo:table-cell text-align="center"><fo:block><xsl:copy-of select="$title_header"/></fo:block></fo:table-cell>
|
1009
1059
|
<fo:table-cell text-align="right"><fo:block><fo:page-number/></fo:block></fo:table-cell>
|
1010
1060
|
</fo:table-row>
|
1011
1061
|
</fo:table-body>
|
@@ -1023,7 +1073,7 @@
|
|
1023
1073
|
<fo:table-body>
|
1024
1074
|
<fo:table-row>
|
1025
1075
|
<fo:table-cell><fo:block><fo:page-number/></fo:block></fo:table-cell>
|
1026
|
-
<fo:table-cell text-align="center"><fo:block><xsl:copy-of select="$
|
1076
|
+
<fo:table-cell text-align="center"><fo:block><xsl:copy-of select="$title_header"/></fo:block></fo:table-cell>
|
1027
1077
|
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
1028
1078
|
</fo:table-row>
|
1029
1079
|
</fo:table-body>
|
@@ -1045,7 +1095,7 @@
|
|
1045
1095
|
<fo:table-body>
|
1046
1096
|
<fo:table-row>
|
1047
1097
|
<fo:table-cell><fo:block><fo:page-number/></fo:block></fo:table-cell>
|
1048
|
-
<fo:table-cell text-align="center"><fo:block><xsl:copy-of select="$
|
1098
|
+
<fo:table-cell text-align="center"><fo:block><xsl:copy-of select="$title_header"/></fo:block></fo:table-cell>
|
1049
1099
|
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
1050
1100
|
</fo:table-row>
|
1051
1101
|
</fo:table-body>
|
@@ -1317,10 +1367,6 @@
|
|
1317
1367
|
<title-part lang="ru">
|
1318
1368
|
</title-part>
|
1319
1369
|
<title-part lang="zh">第 # 部分:</title-part>
|
1320
|
-
|
1321
|
-
<title-subpart lang="en">Sub-part #</title-subpart>
|
1322
|
-
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
1323
|
-
|
1324
1370
|
</xsl:variable>
|
1325
1371
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1326
1372
|
|
@@ -1773,7 +1819,8 @@
|
|
1773
1819
|
<xsl:template match="mn:stem" mode="update_xml_step1"/>
|
1774
1820
|
|
1775
1821
|
<xsl:template match="mn:fmt-stem" mode="update_xml_step1">
|
1776
|
-
<xsl:element name="stem" namespace="{$namespace_full}">
|
1822
|
+
<!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
|
1823
|
+
<xsl:copy>
|
1777
1824
|
<xsl:copy-of select="@*"/>
|
1778
1825
|
<xsl:choose>
|
1779
1826
|
<xsl:when test="mn:semx and count(node()) = 1">
|
@@ -1797,7 +1844,8 @@
|
|
1797
1844
|
</xsl:choose>
|
1798
1845
|
</xsl:otherwise>
|
1799
1846
|
</xsl:choose>
|
1800
|
-
</xsl:
|
1847
|
+
</xsl:copy>
|
1848
|
+
<!-- </xsl:element> -->
|
1801
1849
|
</xsl:template>
|
1802
1850
|
|
1803
1851
|
<xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
|
@@ -1959,12 +2007,14 @@
|
|
1959
2007
|
</xsl:template>
|
1960
2008
|
|
1961
2009
|
<xsl:template match="mn:fmt-title" mode="update_xml_step1">
|
1962
|
-
<xsl:element name="title" namespace="{$namespace_full}">
|
2010
|
+
<!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
|
2011
|
+
<xsl:copy>
|
1963
2012
|
<xsl:copy-of select="@*"/>
|
1964
2013
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
1965
2014
|
|
1966
2015
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1967
|
-
</xsl:
|
2016
|
+
</xsl:copy>
|
2017
|
+
<!-- </xsl:element> -->
|
1968
2018
|
</xsl:template>
|
1969
2019
|
|
1970
2020
|
<xsl:template name="addNamedDestinationAttribute">
|
@@ -1976,12 +2026,14 @@
|
|
1976
2026
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1977
2027
|
</xsl:when>
|
1978
2028
|
<xsl:otherwise>
|
1979
|
-
<xsl:element name="name" namespace="{$namespace_full}">
|
2029
|
+
<!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
|
2030
|
+
<xsl:copy>
|
1980
2031
|
<xsl:copy-of select="@*"/>
|
1981
2032
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
1982
2033
|
|
1983
2034
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1984
|
-
</xsl:
|
2035
|
+
</xsl:copy>
|
2036
|
+
<!-- </xsl:element> -->
|
1985
2037
|
</xsl:otherwise>
|
1986
2038
|
</xsl:choose>
|
1987
2039
|
</xsl:template>
|
@@ -1996,7 +2048,7 @@
|
|
1996
2048
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1997
2049
|
</xsl:template>
|
1998
2050
|
<xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
|
1999
|
-
<xsl:element name="preferred" namespace="{$namespace_full}">
|
2051
|
+
<xsl:element name="fmt-preferred" namespace="{$namespace_full}">
|
2000
2052
|
<xsl:copy-of select="@*"/>
|
2001
2053
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2002
2054
|
</xsl:element>
|
@@ -2006,7 +2058,7 @@
|
|
2006
2058
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2007
2059
|
</xsl:template>
|
2008
2060
|
<xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
|
2009
|
-
<xsl:element name="admitted" namespace="{$namespace_full}">
|
2061
|
+
<xsl:element name="fmt-admitted" namespace="{$namespace_full}">
|
2010
2062
|
<xsl:copy-of select="@*"/>
|
2011
2063
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2012
2064
|
</xsl:element>
|
@@ -2016,32 +2068,32 @@
|
|
2016
2068
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2017
2069
|
</xsl:template>
|
2018
2070
|
<xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
|
2019
|
-
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
2071
|
+
<xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
|
2020
2072
|
<xsl:copy-of select="@*"/>
|
2021
2073
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2022
2074
|
</xsl:element>
|
2023
2075
|
</xsl:template>
|
2024
2076
|
|
2025
|
-
<xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
2077
|
+
<!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
2026
2078
|
<xsl:element name="definition" namespace="{$namespace_full}">
|
2027
2079
|
<xsl:copy-of select="@*"/>
|
2028
2080
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2029
2081
|
</xsl:element>
|
2030
2082
|
</xsl:template>
|
2031
|
-
|
2083
|
+
|
2032
2084
|
<xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
|
2033
2085
|
<xsl:element name="termsource" namespace="{$namespace_full}">
|
2034
2086
|
<xsl:copy-of select="@*"/>
|
2035
2087
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2036
2088
|
</xsl:element>
|
2037
2089
|
</xsl:template>
|
2038
|
-
|
2090
|
+
|
2039
2091
|
<xsl:template match="mn:fmt-source" mode="update_xml_step1">
|
2040
2092
|
<xsl:element name="source" namespace="{$namespace_full}">
|
2041
2093
|
<xsl:copy-of select="@*"/>
|
2042
2094
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2043
2095
|
</xsl:element>
|
2044
|
-
</xsl:template>
|
2096
|
+
</xsl:template> -->
|
2045
2097
|
|
2046
2098
|
<xsl:template match="mn:span[ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
2047
2099
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -2064,12 +2116,12 @@
|
|
2064
2116
|
</xsl:template>
|
2065
2117
|
|
2066
2118
|
<xsl:template match="mn:identifier" mode="update_xml_step1"/>
|
2067
|
-
<xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
2119
|
+
<!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
2068
2120
|
<xsl:element name="identifier" namespace="{$namespace_full}">
|
2069
2121
|
<xsl:copy-of select="@*"/>
|
2070
2122
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2071
2123
|
</xsl:element>
|
2072
|
-
</xsl:template>
|
2124
|
+
</xsl:template> -->
|
2073
2125
|
|
2074
2126
|
<xsl:template match="mn:concept" mode="update_xml_step1"/>
|
2075
2127
|
|
@@ -2079,51 +2131,53 @@
|
|
2079
2131
|
|
2080
2132
|
<xsl:template match="mn:eref" mode="update_xml_step1"/>
|
2081
2133
|
|
2082
|
-
<xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
2134
|
+
<!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
2083
2135
|
<xsl:element name="eref" namespace="{$namespace_full}">
|
2084
2136
|
<xsl:copy-of select="@*"/>
|
2085
2137
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2086
2138
|
</xsl:element>
|
2087
|
-
</xsl:template>
|
2139
|
+
</xsl:template> -->
|
2088
2140
|
|
2089
2141
|
<xsl:template match="mn:xref" mode="update_xml_step1"/>
|
2090
2142
|
|
2091
|
-
<xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
2143
|
+
<!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
2092
2144
|
<xsl:element name="xref" namespace="{$namespace_full}">
|
2093
2145
|
<xsl:copy-of select="@*"/>
|
2094
2146
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2095
2147
|
</xsl:element>
|
2096
|
-
</xsl:template>
|
2148
|
+
</xsl:template> -->
|
2097
2149
|
|
2098
2150
|
<xsl:template match="mn:link" mode="update_xml_step1"/>
|
2099
2151
|
|
2100
|
-
<xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
2152
|
+
<!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
2101
2153
|
<xsl:element name="link" namespace="{$namespace_full}">
|
2102
2154
|
<xsl:copy-of select="@*"/>
|
2103
2155
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2104
2156
|
</xsl:element>
|
2105
|
-
</xsl:template>
|
2157
|
+
</xsl:template> -->
|
2106
2158
|
|
2107
2159
|
<xsl:template match="mn:origin" mode="update_xml_step1"/>
|
2108
2160
|
|
2109
|
-
<xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
2161
|
+
<!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
2110
2162
|
<xsl:element name="origin" namespace="{$namespace_full}">
|
2111
2163
|
<xsl:copy-of select="@*"/>
|
2112
2164
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2113
2165
|
</xsl:element>
|
2114
|
-
</xsl:template>
|
2166
|
+
</xsl:template> -->
|
2115
2167
|
|
2116
2168
|
<xsl:template match="mn:erefstack" mode="update_xml_step1"/>
|
2117
2169
|
|
2118
2170
|
<xsl:template match="mn:svgmap" mode="update_xml_step1"/>
|
2119
2171
|
|
2120
|
-
<xsl:template match="mn:
|
2172
|
+
<xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
|
2121
2173
|
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2174
|
+
<xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
|
2175
|
+
<xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
|
2176
|
+
<xsl:value-of select="."/>
|
2177
|
+
</xsl:element>
|
2178
|
+
</xsl:template>
|
2179
|
+
|
2180
|
+
<xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
|
2127
2181
|
|
2128
2182
|
<!-- END: update new Presentation XML -->
|
2129
2183
|
|
@@ -2319,7 +2373,7 @@
|
|
2319
2373
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
2320
2374
|
<xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
|
2321
2375
|
|
2322
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:link[not(contains(
|
2376
|
+
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
2323
2377
|
|
2324
2378
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2325
2379
|
|
@@ -2438,7 +2492,7 @@
|
|
2438
2492
|
</xsl:if>
|
2439
2493
|
</xsl:template>
|
2440
2494
|
|
2441
|
-
<xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
2495
|
+
<xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
2442
2496
|
<xsl:copy-of select="."/>
|
2443
2497
|
</xsl:template>
|
2444
2498
|
|
@@ -2765,7 +2819,7 @@
|
|
2765
2819
|
</fo:block>
|
2766
2820
|
</xsl:template> <!-- copyright-statement -->
|
2767
2821
|
|
2768
|
-
<xsl:template match="mn:copyright-statement//mn:title">
|
2822
|
+
<xsl:template match="mn:copyright-statement//mn:fmt-title">
|
2769
2823
|
<!-- process in the template 'title' -->
|
2770
2824
|
<xsl:call-template name="title"/>
|
2771
2825
|
</xsl:template> <!-- copyright-statement//title -->
|
@@ -2781,7 +2835,7 @@
|
|
2781
2835
|
</fo:block>
|
2782
2836
|
</xsl:template> <!-- license-statement -->
|
2783
2837
|
|
2784
|
-
<xsl:template match="mn:license-statement//mn:title">
|
2838
|
+
<xsl:template match="mn:license-statement//mn:fmt-title">
|
2785
2839
|
<!-- process in the template 'title' -->
|
2786
2840
|
<xsl:call-template name="title"/>
|
2787
2841
|
</xsl:template> <!-- license-statement/title -->
|
@@ -2798,7 +2852,7 @@
|
|
2798
2852
|
</fo:block>
|
2799
2853
|
</xsl:template> <!-- legal-statement -->
|
2800
2854
|
|
2801
|
-
<xsl:template match="mn:legal-statement//mn:title">
|
2855
|
+
<xsl:template match="mn:legal-statement//mn:fmt-title">
|
2802
2856
|
<!-- process in the template 'title' -->
|
2803
2857
|
<xsl:call-template name="title"/>
|
2804
2858
|
|
@@ -2818,7 +2872,7 @@
|
|
2818
2872
|
</fo:block>
|
2819
2873
|
</xsl:template> <!-- feedback-statement -->
|
2820
2874
|
|
2821
|
-
<xsl:template match="mn:feedback-statement//mn:title">
|
2875
|
+
<xsl:template match="mn:feedback-statement//mn:fmt-title">
|
2822
2876
|
<!-- process in the template 'title' -->
|
2823
2877
|
<xsl:call-template name="title"/>
|
2824
2878
|
</xsl:template>
|
@@ -2843,7 +2897,7 @@
|
|
2843
2897
|
<xsl:template name="refine_link-style">
|
2844
2898
|
</xsl:template> <!-- refine_link-style -->
|
2845
2899
|
|
2846
|
-
<xsl:template match="mn:link" name="link">
|
2900
|
+
<xsl:template match="mn:fmt-link" name="link">
|
2847
2901
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
2848
2902
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
2849
2903
|
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
@@ -3065,7 +3119,7 @@
|
|
3065
3119
|
<xsl:value-of select="."/>
|
3066
3120
|
</xsl:attribute>
|
3067
3121
|
</xsl:for-each>
|
3068
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
3122
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3069
3123
|
</xsl:when>
|
3070
3124
|
|
3071
3125
|
<xsl:otherwise>
|
@@ -3107,11 +3161,11 @@
|
|
3107
3161
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3108
3162
|
</xsl:if>
|
3109
3163
|
|
3110
|
-
<xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
|
3164
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
|
3111
3165
|
</fo:block>
|
3112
3166
|
|
3113
3167
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
3114
|
-
<xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
|
3168
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
3115
3169
|
|
3116
3170
|
</fo:block-container>
|
3117
3171
|
</fo:block-container>
|
@@ -3412,7 +3466,7 @@
|
|
3412
3466
|
|
3413
3467
|
<!-- end mode="syntax_highlight" -->
|
3414
3468
|
|
3415
|
-
<xsl:template match="mn:sourcecode/mn:name">
|
3469
|
+
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
3416
3470
|
<xsl:if test="normalize-space() != ''">
|
3417
3471
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3418
3472
|
<xsl:apply-templates/>
|
@@ -3430,7 +3484,7 @@
|
|
3430
3484
|
</xsl:choose>
|
3431
3485
|
</xsl:template>
|
3432
3486
|
|
3433
|
-
<xsl:template match="mn:annotation">
|
3487
|
+
<xsl:template match="mn:callout-annotation">
|
3434
3488
|
<xsl:variable name="annotation-id" select="@id"/>
|
3435
3489
|
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
3436
3490
|
<fo:block id="{$annotation-id}" white-space="nowrap">
|
@@ -3442,7 +3496,7 @@
|
|
3442
3496
|
</fo:block>
|
3443
3497
|
</xsl:template>
|
3444
3498
|
|
3445
|
-
<xsl:template match="mn:annotation/mn:p">
|
3499
|
+
<xsl:template match="mn:callout-annotation/mn:p">
|
3446
3500
|
<xsl:param name="callout"/>
|
3447
3501
|
<fo:inline id="{@id}">
|
3448
3502
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -3595,7 +3649,7 @@
|
|
3595
3649
|
<xsl:when test="starts-with(., $ace_tag) or self::mn:change-open-tag or self::mn:change-close-tag"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
3596
3650
|
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
3597
3651
|
<xsl:choose>
|
3598
|
-
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (
|
3652
|
+
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (parent::mn:fmt-title and preceding-sibling::node()[1][self::mn:tab]) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][self::mn:add][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
3599
3653
|
<xsl:otherwise>
|
3600
3654
|
<xsl:variable name="tag">
|
3601
3655
|
<xsl:call-template name="insertTag">
|
@@ -4000,12 +4054,12 @@
|
|
4000
4054
|
<xsl:template match="mn:permission">
|
4001
4055
|
<xsl:call-template name="setNamedDestination"/>
|
4002
4056
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
4003
|
-
<xsl:apply-templates select="mn:name"/>
|
4004
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4057
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4058
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4005
4059
|
</fo:block>
|
4006
4060
|
</xsl:template>
|
4007
4061
|
|
4008
|
-
<xsl:template match="mn:permission/mn:name">
|
4062
|
+
<xsl:template match="mn:permission/mn:fmt-name">
|
4009
4063
|
<xsl:if test="normalize-space() != ''">
|
4010
4064
|
<fo:inline xsl:use-attribute-sets="permission-name-style">
|
4011
4065
|
<xsl:apply-templates/><xsl:text>:</xsl:text>
|
@@ -4028,15 +4082,15 @@
|
|
4028
4082
|
<xsl:template match="mn:requirement">
|
4029
4083
|
<xsl:call-template name="setNamedDestination"/>
|
4030
4084
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
4031
|
-
<xsl:apply-templates select="mn:name"/>
|
4085
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4032
4086
|
<xsl:apply-templates select="mn:label"/>
|
4033
4087
|
<xsl:apply-templates select="@obligation"/>
|
4034
4088
|
<xsl:apply-templates select="mn:subject"/>
|
4035
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
4089
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
4036
4090
|
</fo:block>
|
4037
4091
|
</xsl:template>
|
4038
4092
|
|
4039
|
-
<xsl:template match="mn:requirement/mn:name">
|
4093
|
+
<xsl:template match="mn:requirement/mn:fmt-name">
|
4040
4094
|
<xsl:if test="normalize-space() != ''">
|
4041
4095
|
<fo:inline xsl:use-attribute-sets="requirement-name-style">
|
4042
4096
|
<xsl:apply-templates/><xsl:text>:</xsl:text>
|
@@ -4072,12 +4126,12 @@
|
|
4072
4126
|
<xsl:template match="mn:recommendation">
|
4073
4127
|
<xsl:call-template name="setNamedDestination"/>
|
4074
4128
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4075
|
-
<xsl:apply-templates select="mn:name"/>
|
4076
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4129
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4130
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4077
4131
|
</fo:block>
|
4078
4132
|
</xsl:template>
|
4079
4133
|
|
4080
|
-
<xsl:template match="mn:recommendation/mn:name">
|
4134
|
+
<xsl:template match="mn:recommendation/mn:fmt-name">
|
4081
4135
|
<xsl:if test="normalize-space() != ''">
|
4082
4136
|
<fo:inline xsl:use-attribute-sets="recommendation-name-style">
|
4083
4137
|
<xsl:apply-templates/><xsl:text>:</xsl:text>
|
@@ -4332,11 +4386,11 @@
|
|
4332
4386
|
|
4333
4387
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
4334
4388
|
</xsl:if>
|
4335
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4389
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4336
4390
|
</fo:block>
|
4337
4391
|
</xsl:template>
|
4338
4392
|
|
4339
|
-
<xsl:template match="mn:term/mn:name">
|
4393
|
+
<xsl:template match="mn:term/mn:fmt-name">
|
4340
4394
|
<xsl:if test="normalize-space() != ''">
|
4341
4395
|
<!-- <xsl:variable name="level">
|
4342
4396
|
<xsl:call-template name="getLevelTermName"/>
|
@@ -4355,7 +4409,7 @@
|
|
4355
4409
|
<!-- origin -->
|
4356
4410
|
<!-- modification -->
|
4357
4411
|
<!-- ====== -->
|
4358
|
-
<xsl:template match="mn:termsource" name="termsource">
|
4412
|
+
<xsl:template match="mn:fmt-termsource" name="termsource">
|
4359
4413
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4360
4414
|
|
4361
4415
|
<xsl:call-template name="refine_termsource-style"/>
|
@@ -4394,24 +4448,24 @@
|
|
4394
4448
|
</fo:block>
|
4395
4449
|
</xsl:template>
|
4396
4450
|
|
4397
|
-
<xsl:template match="mn:termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
4451
|
+
<xsl:template match="mn:fmt-termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
4398
4452
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
4399
4453
|
</xsl:template>
|
4400
4454
|
|
4401
|
-
<xsl:template match="mn:termsource/text()">
|
4455
|
+
<xsl:template match="mn:fmt-termsource/text()">
|
4402
4456
|
<xsl:if test="normalize-space() != ''">
|
4403
4457
|
<xsl:value-of select="."/>
|
4404
4458
|
</xsl:if>
|
4405
4459
|
</xsl:template>
|
4406
4460
|
|
4407
4461
|
<!-- text SOURCE: -->
|
4408
|
-
<xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
|
4462
|
+
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
4409
4463
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4410
4464
|
<xsl:value-of select="."/>
|
4411
4465
|
</fo:inline>
|
4412
4466
|
</xsl:template>
|
4413
4467
|
|
4414
|
-
<xsl:template match="mn:origin">
|
4468
|
+
<xsl:template match="mn:fmt-origin">
|
4415
4469
|
<xsl:call-template name="insert_basic_link">
|
4416
4470
|
<xsl:with-param name="element">
|
4417
4471
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4457,7 +4511,7 @@
|
|
4457
4511
|
<!-- ====== -->
|
4458
4512
|
|
4459
4513
|
<!-- Preferred, admitted, deprecated -->
|
4460
|
-
<xsl:template match="mn:preferred">
|
4514
|
+
<xsl:template match="mn:fmt-preferred">
|
4461
4515
|
<xsl:variable name="level">
|
4462
4516
|
<xsl:call-template name="getLevel"/>
|
4463
4517
|
</xsl:variable>
|
@@ -4468,15 +4522,15 @@
|
|
4468
4522
|
</xsl:variable>
|
4469
4523
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
4470
4524
|
|
4471
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
|
4525
|
+
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
4472
4526
|
|
4473
4527
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
4474
4528
|
|
4475
|
-
<xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
|
4529
|
+
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
4476
4530
|
<xsl:call-template name="setIDforNamedDestination"/>
|
4477
4531
|
</xsl:for-each>
|
4478
4532
|
|
4479
|
-
<xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
|
4533
|
+
<xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
|
4480
4534
|
</fo:block>
|
4481
4535
|
</xsl:if>
|
4482
4536
|
|
@@ -4500,13 +4554,13 @@
|
|
4500
4554
|
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
4501
4555
|
<xsl:template match="mn:domain"/>
|
4502
4556
|
|
4503
|
-
<xsl:template match="mn:admitted">
|
4557
|
+
<xsl:template match="mn:fmt-admitted">
|
4504
4558
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
4505
4559
|
<xsl:apply-templates/>
|
4506
4560
|
</fo:block>
|
4507
4561
|
</xsl:template>
|
4508
4562
|
|
4509
|
-
<xsl:template match="mn:deprecates">
|
4563
|
+
<xsl:template match="mn:fmt-deprecates">
|
4510
4564
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4511
4565
|
<xsl:apply-templates/>
|
4512
4566
|
</fo:block>
|
@@ -4520,7 +4574,7 @@
|
|
4520
4574
|
|
4521
4575
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
4522
4576
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
4523
|
-
<xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
|
4577
|
+
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
4524
4578
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
4525
4579
|
</xsl:template>
|
4526
4580
|
<!-- End Preferred, admitted, deprecated -->
|
@@ -4539,16 +4593,16 @@
|
|
4539
4593
|
<!-- ========== -->
|
4540
4594
|
<!-- definition -->
|
4541
4595
|
<!-- ========== -->
|
4542
|
-
<xsl:template match="mn:definition">
|
4596
|
+
<xsl:template match="mn:fmt-definition">
|
4543
4597
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
4544
4598
|
<xsl:apply-templates/>
|
4545
4599
|
</fo:block>
|
4546
4600
|
</xsl:template>
|
4547
4601
|
|
4548
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]">
|
4602
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
|
4549
4603
|
<xsl:apply-templates/>
|
4550
4604
|
</xsl:template>
|
4551
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
|
4605
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
|
4552
4606
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
4553
4607
|
<fo:block/>
|
4554
4608
|
</xsl:template>
|
@@ -4621,12 +4675,12 @@
|
|
4621
4675
|
<xsl:call-template name="refine_termexample-style"/>
|
4622
4676
|
<xsl:call-template name="setBlockSpanAll"/>
|
4623
4677
|
|
4624
|
-
<xsl:apply-templates select="mn:name"/>
|
4625
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4678
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4679
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4626
4680
|
</fo:block>
|
4627
4681
|
</xsl:template>
|
4628
4682
|
|
4629
|
-
<xsl:template match="mn:termexample/mn:name">
|
4683
|
+
<xsl:template match="mn:termexample/mn:fmt-name">
|
4630
4684
|
<xsl:if test="normalize-space() != ''">
|
4631
4685
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
4632
4686
|
<xsl:call-template name="refine_termexample-name-style"/>
|
@@ -4677,7 +4731,7 @@
|
|
4677
4731
|
<xsl:call-template name="refine_example-style"/>
|
4678
4732
|
|
4679
4733
|
<xsl:variable name="fo_element">
|
4680
|
-
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>inline
|
4734
|
+
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
|
4681
4735
|
</xsl:variable>
|
4682
4736
|
|
4683
4737
|
<fo:block-container margin-left="0mm" role="SKIP">
|
@@ -4688,7 +4742,7 @@
|
|
4688
4742
|
|
4689
4743
|
<!-- display name 'EXAMPLE' in a separate block -->
|
4690
4744
|
<fo:block>
|
4691
|
-
<xsl:apply-templates select="mn:name">
|
4745
|
+
<xsl:apply-templates select="mn:fmt-name">
|
4692
4746
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4693
4747
|
</xsl:apply-templates>
|
4694
4748
|
</fo:block>
|
@@ -4696,7 +4750,7 @@
|
|
4696
4750
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4697
4751
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4698
4752
|
<xsl:variable name="example_body">
|
4699
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
4753
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
4700
4754
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4701
4755
|
</xsl:apply-templates>
|
4702
4756
|
</xsl:variable>
|
@@ -4723,14 +4777,14 @@
|
|
4723
4777
|
<fo:list-item>
|
4724
4778
|
<fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
|
4725
4779
|
<fo:block>
|
4726
|
-
<xsl:apply-templates select="mn:name">
|
4780
|
+
<xsl:apply-templates select="mn:fmt-name">
|
4727
4781
|
<xsl:with-param name="fo_element">block</xsl:with-param>
|
4728
4782
|
</xsl:apply-templates>
|
4729
4783
|
</fo:block>
|
4730
4784
|
</fo:list-item-label>
|
4731
4785
|
<fo:list-item-body start-indent="body-start()">
|
4732
4786
|
<fo:block>
|
4733
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
4787
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
4734
4788
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4735
4789
|
</xsl:apply-templates>
|
4736
4790
|
</fo:block>
|
@@ -4743,21 +4797,21 @@
|
|
4743
4797
|
|
4744
4798
|
<!-- display 'EXAMPLE' and first element in the same line -->
|
4745
4799
|
<fo:block>
|
4746
|
-
<xsl:apply-templates select="mn:name">
|
4800
|
+
<xsl:apply-templates select="mn:fmt-name">
|
4747
4801
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4748
4802
|
</xsl:apply-templates>
|
4749
4803
|
<fo:inline>
|
4750
|
-
<xsl:apply-templates select="*[not(self::mn:name)][1]">
|
4804
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
|
4751
4805
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4752
4806
|
</xsl:apply-templates>
|
4753
4807
|
</fo:inline>
|
4754
4808
|
</fo:block>
|
4755
4809
|
|
4756
|
-
<xsl:if test="*[not(self::mn:name)][position() > 1]">
|
4810
|
+
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
4757
4811
|
<!-- display further elements in blocks -->
|
4758
4812
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4759
4813
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4760
|
-
<xsl:apply-templates select="*[not(self::mn:name)][position() > 1]">
|
4814
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
4761
4815
|
<xsl:with-param name="fo_element" select="'block'"/>
|
4762
4816
|
</xsl:apply-templates>
|
4763
4817
|
</fo:block-container>
|
@@ -4771,7 +4825,7 @@
|
|
4771
4825
|
</xsl:template>
|
4772
4826
|
|
4773
4827
|
<!-- example/name -->
|
4774
|
-
<xsl:template match="mn:example/mn:name">
|
4828
|
+
<xsl:template match="mn:example/mn:fmt-name">
|
4775
4829
|
<xsl:param name="fo_element">block</xsl:param>
|
4776
4830
|
|
4777
4831
|
<xsl:choose>
|
@@ -4796,7 +4850,7 @@
|
|
4796
4850
|
</xsl:template>
|
4797
4851
|
|
4798
4852
|
<!-- table/example/name, table/tfoot//example/name -->
|
4799
|
-
<xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
|
4853
|
+
<xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
|
4800
4854
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
4801
4855
|
<xsl:apply-templates/>
|
4802
4856
|
</fo:inline>
|
@@ -5076,7 +5130,7 @@
|
|
5076
5130
|
|
5077
5131
|
<!-- Display table's name before table as standalone block -->
|
5078
5132
|
<!-- $namespace = 'iso' or -->
|
5079
|
-
<xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
|
5133
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
|
5080
5134
|
<xsl:call-template name="table_name_fn_display"/>
|
5081
5135
|
|
5082
5136
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
|
@@ -5118,7 +5172,7 @@
|
|
5118
5172
|
|
5119
5173
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
5120
5174
|
|
5121
|
-
<xsl:for-each select="mn:name">
|
5175
|
+
<xsl:for-each select="mn:fmt-name">
|
5122
5176
|
<xsl:call-template name="setIDforNamedDestination"/>
|
5123
5177
|
</xsl:for-each>
|
5124
5178
|
|
@@ -5148,6 +5202,10 @@
|
|
5148
5202
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
5149
5203
|
</xsl:call-template>
|
5150
5204
|
|
5205
|
+
<xsl:call-template name="setTableStyles">
|
5206
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
5207
|
+
</xsl:call-template>
|
5208
|
+
|
5151
5209
|
</xsl:element>
|
5152
5210
|
</xsl:variable>
|
5153
5211
|
|
@@ -5168,7 +5226,7 @@
|
|
5168
5226
|
</xsl:attribute>
|
5169
5227
|
</xsl:for-each>
|
5170
5228
|
|
5171
|
-
<xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[
|
5229
|
+
<xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[not(parent::mn:fmt-name)] or ./mn:fmt-source"/>
|
5172
5230
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5173
5231
|
<!-- <xsl:choose>
|
5174
5232
|
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
@@ -5224,7 +5282,7 @@
|
|
5224
5282
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
5225
5283
|
</xsl:when>
|
5226
5284
|
<xsl:otherwise>
|
5227
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5285
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5228
5286
|
</xsl:otherwise>
|
5229
5287
|
</xsl:choose>
|
5230
5288
|
|
@@ -5321,7 +5379,7 @@
|
|
5321
5379
|
</xsl:template>
|
5322
5380
|
|
5323
5381
|
<!-- table/name-->
|
5324
|
-
<xsl:template match="*[local-name()='table']/mn:name">
|
5382
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-name">
|
5325
5383
|
<xsl:param name="continued"/>
|
5326
5384
|
<xsl:param name="cols-count"/>
|
5327
5385
|
<xsl:if test="normalize-space() != ''">
|
@@ -5386,7 +5444,7 @@
|
|
5386
5444
|
</xsl:template>
|
5387
5445
|
|
5388
5446
|
<!-- SOURCE: ... -->
|
5389
|
-
<xsl:template match="*[local-name()='table']/mn:source" priority="2">
|
5447
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
|
5390
5448
|
<xsl:call-template name="termsource"/>
|
5391
5449
|
</xsl:template>
|
5392
5450
|
|
@@ -5551,11 +5609,11 @@
|
|
5551
5609
|
<xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
|
5552
5610
|
</xsl:template>
|
5553
5611
|
|
5554
|
-
<xsl:template match="mn:termsource" mode="td_text">
|
5555
|
-
<xsl:value-of select="
|
5612
|
+
<xsl:template match="mn:fmt-termsource" mode="td_text">
|
5613
|
+
<xsl:value-of select="mn:fmt-origin/@citeas"/>
|
5556
5614
|
</xsl:template>
|
5557
5615
|
|
5558
|
-
<xsl:template match="mn:link" mode="td_text">
|
5616
|
+
<xsl:template match="mn:fmt-link" mode="td_text">
|
5559
5617
|
<xsl:value-of select="@target"/>
|
5560
5618
|
</xsl:template>
|
5561
5619
|
|
@@ -5757,12 +5815,12 @@
|
|
5757
5815
|
|
5758
5816
|
<xsl:call-template name="refine_table-header-title-style"/>
|
5759
5817
|
|
5760
|
-
<xsl:apply-templates select="ancestor::mn:table/mn:name">
|
5818
|
+
<xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
|
5761
5819
|
<xsl:with-param name="continued">true</xsl:with-param>
|
5762
5820
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5763
5821
|
</xsl:apply-templates>
|
5764
5822
|
|
5765
|
-
<xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
5823
|
+
<xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
5766
5824
|
<fo:block role="SKIP"/>
|
5767
5825
|
</xsl:if>
|
5768
5826
|
|
@@ -5797,7 +5855,7 @@
|
|
5797
5855
|
<xsl:param name="colwidths"/>
|
5798
5856
|
<xsl:param name="colgroup"/>
|
5799
5857
|
|
5800
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[
|
5858
|
+
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
|
5801
5859
|
|
5802
5860
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
5803
5861
|
</xsl:variable>
|
@@ -5838,6 +5896,12 @@
|
|
5838
5896
|
</xsl:choose>
|
5839
5897
|
</xsl:for-each>
|
5840
5898
|
|
5899
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5900
|
+
<xsl:call-template name="setTableStyles">
|
5901
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
5902
|
+
</xsl:call-template>
|
5903
|
+
</xsl:for-each>
|
5904
|
+
|
5841
5905
|
<xsl:choose>
|
5842
5906
|
<xsl:when test="xalan:nodeset($colgroup)//mn:col">
|
5843
5907
|
<xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
|
@@ -5854,10 +5918,22 @@
|
|
5854
5918
|
|
5855
5919
|
<fo:table-body role="SKIP">
|
5856
5920
|
<fo:table-row role="SKIP">
|
5921
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5922
|
+
<xsl:call-template name="setTableStyles">
|
5923
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
5924
|
+
</xsl:call-template>
|
5925
|
+
</xsl:for-each>
|
5926
|
+
|
5857
5927
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
5858
5928
|
|
5859
5929
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
5860
5930
|
|
5931
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5932
|
+
<xsl:call-template name="setTableStyles">
|
5933
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
5934
|
+
</xsl:call-template>
|
5935
|
+
</xsl:for-each>
|
5936
|
+
|
5861
5937
|
<xsl:call-template name="setBordersTableArray"/>
|
5862
5938
|
|
5863
5939
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -5865,7 +5941,7 @@
|
|
5865
5941
|
<xsl:apply-templates select="../mn:dl"/>
|
5866
5942
|
<xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
|
5867
5943
|
<xsl:apply-templates select="../mn:example"/>
|
5868
|
-
<xsl:apply-templates select="../mn:source"/>
|
5944
|
+
<xsl:apply-templates select="../mn:fmt-source"/>
|
5869
5945
|
|
5870
5946
|
<xsl:variable name="isDisplayRowSeparator">
|
5871
5947
|
</xsl:variable>
|
@@ -6054,7 +6130,12 @@
|
|
6054
6130
|
|
6055
6131
|
<xsl:template name="setTableRowAttributes">
|
6056
6132
|
|
6057
|
-
<xsl:
|
6133
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6134
|
+
<xsl:call-template name="setTableStyles">
|
6135
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
6136
|
+
</xsl:call-template>
|
6137
|
+
</xsl:for-each>
|
6138
|
+
<xsl:call-template name="setTableStyles"/>
|
6058
6139
|
|
6059
6140
|
</xsl:template> <!-- setTableRowAttributes -->
|
6060
6141
|
<!-- ===================== -->
|
@@ -6107,7 +6188,13 @@
|
|
6107
6188
|
</xsl:attribute>
|
6108
6189
|
</xsl:if>
|
6109
6190
|
<xsl:call-template name="display-align"/>
|
6110
|
-
|
6191
|
+
|
6192
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6193
|
+
<xsl:call-template name="setTableStyles">
|
6194
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
6195
|
+
</xsl:call-template>
|
6196
|
+
</xsl:for-each>
|
6197
|
+
<xsl:call-template name="setTableStyles"/>
|
6111
6198
|
</xsl:template>
|
6112
6199
|
|
6113
6200
|
<xsl:template name="display-align">
|
@@ -6123,7 +6210,8 @@
|
|
6123
6210
|
</xsl:if>
|
6124
6211
|
</xsl:template>
|
6125
6212
|
|
6126
|
-
<xsl:template name="
|
6213
|
+
<xsl:template name="setTableStyles">
|
6214
|
+
<xsl:param name="scope">cell</xsl:param>
|
6127
6215
|
<xsl:variable name="styles__">
|
6128
6216
|
<xsl:call-template name="split">
|
6129
6217
|
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
@@ -6132,19 +6220,35 @@
|
|
6132
6220
|
</xsl:variable>
|
6133
6221
|
<xsl:variable name="quot">"</xsl:variable>
|
6134
6222
|
<xsl:variable name="styles_">
|
6223
|
+
<!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
|
6224
|
+
<xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
|
6225
|
+
<style name="border-top">none</style>
|
6226
|
+
<style name="border-right">none</style>
|
6227
|
+
<style name="border-left">none</style>
|
6228
|
+
<style name="border-bottom">none</style>
|
6229
|
+
<style name="color">inherit</style>
|
6230
|
+
<style name="background-color">transparent</style>
|
6231
|
+
</xsl:if>
|
6232
|
+
|
6135
6233
|
<xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
|
6136
6234
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
6137
6235
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
6138
|
-
<xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
6236
|
+
<xsl:if test="($key = 'color' and ($scope = 'cell' or $scope = 'table')) or ($key = 'background-color' and ($scope = 'cell' or $scope = 'ancestor_table')) or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
6139
6237
|
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
6140
6238
|
</xsl:if>
|
6239
|
+
<xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
|
6240
|
+
<style name="{$key}-top"><xsl:value-of select="$value"/></style>
|
6241
|
+
<style name="{$key}-right"><xsl:value-of select="$value"/></style>
|
6242
|
+
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
6243
|
+
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
6244
|
+
</xsl:if>
|
6141
6245
|
</xsl:for-each>
|
6142
6246
|
</xsl:variable>
|
6143
6247
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
6144
6248
|
<xsl:for-each select="$styles/style">
|
6145
6249
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
6146
6250
|
</xsl:for-each>
|
6147
|
-
</xsl:template> <!--
|
6251
|
+
</xsl:template> <!-- setTableStyles -->
|
6148
6252
|
|
6149
6253
|
<!-- cell in table body, footer -->
|
6150
6254
|
<xsl:template match="*[local-name()='td']" name="td">
|
@@ -6208,11 +6312,11 @@
|
|
6208
6312
|
|
6209
6313
|
<xsl:call-template name="refine_table-note-name-style"/>
|
6210
6314
|
|
6211
|
-
<xsl:apply-templates select="mn:name"/>
|
6315
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
6212
6316
|
|
6213
6317
|
</fo:inline>
|
6214
6318
|
|
6215
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
6319
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
6216
6320
|
</fo:block>
|
6217
6321
|
</xsl:template> <!-- table/note -->
|
6218
6322
|
|
@@ -6351,7 +6455,7 @@
|
|
6351
6455
|
|
6352
6456
|
<!-- footnotes for table's name rendering -->
|
6353
6457
|
<xsl:template name="table_name_fn_display">
|
6354
|
-
<xsl:for-each select="mn:name//mn:fn">
|
6458
|
+
<xsl:for-each select="mn:fmt-name//mn:fn">
|
6355
6459
|
<xsl:variable name="reference" select="@reference"/>
|
6356
6460
|
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
6357
6461
|
<fo:block margin-bottom="12pt">
|
@@ -7008,7 +7112,7 @@
|
|
7008
7112
|
</xsl:if> -->
|
7009
7113
|
|
7010
7114
|
<xsl:variable name="words">
|
7011
|
-
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
7115
|
+
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
|
7012
7116
|
<word>
|
7013
7117
|
<xsl:copy-of select="."/>
|
7014
7118
|
</word>
|
@@ -7067,7 +7171,7 @@
|
|
7067
7171
|
</xsl:copy>
|
7068
7172
|
</xsl:template>
|
7069
7173
|
|
7070
|
-
<xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
7174
|
+
<xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
7071
7175
|
|
7072
7176
|
<xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
|
7073
7177
|
<xsl:variable name="formatting_tags">
|
@@ -7102,7 +7206,7 @@
|
|
7102
7206
|
</xsl:call-template>
|
7103
7207
|
</xsl:template>
|
7104
7208
|
|
7105
|
-
<xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
|
7209
|
+
<xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
|
7106
7210
|
<xsl:variable name="link">
|
7107
7211
|
<link_updated>
|
7108
7212
|
<xsl:variable name="target_text">
|
@@ -7317,7 +7421,7 @@
|
|
7317
7421
|
|
7318
7422
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
7319
7423
|
|
7320
|
-
<xsl:apply-templates select="mn:name">
|
7424
|
+
<xsl:apply-templates select="mn:fmt-name">
|
7321
7425
|
<xsl:with-param name="process">true</xsl:with-param>
|
7322
7426
|
</xsl:apply-templates>
|
7323
7427
|
|
@@ -7503,7 +7607,7 @@
|
|
7503
7607
|
</xsl:template> <!-- refine_multicomponent_block_style -->
|
7504
7608
|
|
7505
7609
|
<!-- dl/name -->
|
7506
|
-
<xsl:template match="mn:dl/mn:name">
|
7610
|
+
<xsl:template match="mn:dl/mn:fmt-name">
|
7507
7611
|
<xsl:param name="process">false</xsl:param>
|
7508
7612
|
<xsl:if test="$process = 'true'">
|
7509
7613
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
@@ -7914,12 +8018,12 @@
|
|
7914
8018
|
<xsl:template match="mn:appendix">
|
7915
8019
|
<xsl:call-template name="setNamedDestination"/>
|
7916
8020
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
7917
|
-
<xsl:apply-templates select="mn:title"/>
|
8021
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
7918
8022
|
</fo:block>
|
7919
|
-
<xsl:apply-templates select="node()[not(
|
8023
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
7920
8024
|
</xsl:template>
|
7921
8025
|
|
7922
|
-
<xsl:template match="mn:appendix/mn:title" priority="2">
|
8026
|
+
<xsl:template match="mn:appendix/mn:fmt-title" priority="2">
|
7923
8027
|
<xsl:variable name="level">
|
7924
8028
|
<xsl:call-template name="getLevel"/>
|
7925
8029
|
</xsl:variable>
|
@@ -7932,9 +8036,9 @@
|
|
7932
8036
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
7933
8037
|
<xsl:call-template name="setNamedDestination"/>
|
7934
8038
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
7935
|
-
<xsl:apply-templates select="mn:name"/>
|
8039
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
7936
8040
|
</fo:block>
|
7937
|
-
<xsl:apply-templates select="node()[not(
|
8041
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7938
8042
|
</xsl:template>
|
7939
8043
|
|
7940
8044
|
<xsl:attribute-set name="xref-style">
|
@@ -7942,7 +8046,7 @@
|
|
7942
8046
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
7943
8047
|
</xsl:attribute-set>
|
7944
8048
|
|
7945
|
-
<xsl:template match="mn:xref">
|
8049
|
+
<xsl:template match="mn:fmt-xref">
|
7946
8050
|
<xsl:call-template name="insert_basic_link">
|
7947
8051
|
<xsl:with-param name="element">
|
7948
8052
|
<xsl:variable name="alt_text">
|
@@ -7962,7 +8066,7 @@
|
|
7962
8066
|
</xsl:template> <!-- xref -->
|
7963
8067
|
|
7964
8068
|
<!-- command between two xref points to non-standard bibitem -->
|
7965
|
-
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']]]"><xsl:value-of select="."/>
|
8069
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']]]"><xsl:value-of select="."/>
|
7966
8070
|
</xsl:template>
|
7967
8071
|
|
7968
8072
|
<xsl:attribute-set name="eref-style">
|
@@ -7993,7 +8097,7 @@
|
|
7993
8097
|
<!-- ====== -->
|
7994
8098
|
<!-- eref -->
|
7995
8099
|
<!-- ====== -->
|
7996
|
-
<xsl:template match="mn:eref" name="eref">
|
8100
|
+
<xsl:template match="mn:fmt-eref" name="eref">
|
7997
8101
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
7998
8102
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
|
7999
8103
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
|
@@ -8124,7 +8228,10 @@
|
|
8124
8228
|
|
8125
8229
|
<xsl:call-template name="setNamedDestination"/>
|
8126
8230
|
|
8127
|
-
<fo:block-container
|
8231
|
+
<fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
|
8232
|
+
<xsl:if test="not(parent::mn:references)">
|
8233
|
+
<xsl:copy-of select="@id"/>
|
8234
|
+
</xsl:if>
|
8128
8235
|
|
8129
8236
|
<xsl:call-template name="setBlockSpanAll"/>
|
8130
8237
|
|
@@ -8137,28 +8244,28 @@
|
|
8137
8244
|
|
8138
8245
|
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
8139
8246
|
|
8140
|
-
<xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
|
8247
|
+
<xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
|
8141
8248
|
|
8142
8249
|
<xsl:call-template name="refine_note-name-style"/>
|
8143
8250
|
|
8144
8251
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
8145
8252
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
8146
|
-
<xsl:if test="*[not(
|
8253
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
8147
8254
|
<xsl:call-template name="append_add-style"/>
|
8148
8255
|
</xsl:if>
|
8149
8256
|
|
8150
8257
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
8151
|
-
<xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
|
8152
|
-
<xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
8258
|
+
<xsl:if test="count(*[not(self::mn:fmt-name)]) = 1 and *[not(self::mn:fmt-name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
|
8259
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
8153
8260
|
<xsl:with-param name="skip">false</xsl:with-param>
|
8154
8261
|
</xsl:apply-templates>
|
8155
8262
|
</xsl:if>
|
8156
8263
|
|
8157
|
-
<xsl:apply-templates select="mn:name"/>
|
8264
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
8158
8265
|
|
8159
8266
|
</fo:inline>
|
8160
8267
|
|
8161
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
8268
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8162
8269
|
</fo:block>
|
8163
8270
|
</fo:block-container>
|
8164
8271
|
</fo:block-container>
|
@@ -8197,19 +8304,19 @@
|
|
8197
8304
|
|
8198
8305
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
8199
8306
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
8200
|
-
<xsl:if test="*[not(
|
8307
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
8201
8308
|
<xsl:call-template name="append_add-style"/>
|
8202
8309
|
</xsl:if>
|
8203
8310
|
|
8204
|
-
<xsl:apply-templates select="mn:name"/>
|
8311
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
8205
8312
|
|
8206
8313
|
</fo:inline>
|
8207
8314
|
|
8208
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
8315
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8209
8316
|
</fo:block>
|
8210
8317
|
</xsl:template>
|
8211
8318
|
|
8212
|
-
<xsl:template match="mn:note/mn:name">
|
8319
|
+
<xsl:template match="mn:note/mn:fmt-name">
|
8213
8320
|
<xsl:param name="sfx"/>
|
8214
8321
|
<xsl:variable name="suffix">
|
8215
8322
|
<xsl:choose>
|
@@ -8236,7 +8343,7 @@
|
|
8236
8343
|
</xsl:if>
|
8237
8344
|
</xsl:template>
|
8238
8345
|
|
8239
|
-
<xsl:template match="mn:termnote/mn:name">
|
8346
|
+
<xsl:template match="mn:termnote/mn:fmt-name">
|
8240
8347
|
<xsl:param name="sfx"/>
|
8241
8348
|
<xsl:variable name="suffix">
|
8242
8349
|
<xsl:choose>
|
@@ -8319,15 +8426,15 @@
|
|
8319
8426
|
|
8320
8427
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8321
8428
|
<fo:block role="BlockQuote">
|
8322
|
-
<xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
|
8429
|
+
<xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:fmt-source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
|
8323
8430
|
</fo:block>
|
8324
8431
|
</fo:block-container>
|
8325
8432
|
</fo:block-container>
|
8326
|
-
<xsl:if test="mn:author or mn:source or mn:attribution">
|
8433
|
+
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
8327
8434
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
8328
8435
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
8329
8436
|
<xsl:apply-templates select="mn:author"/>
|
8330
|
-
<xsl:apply-templates select="mn:source"/>
|
8437
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
8331
8438
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
8332
8439
|
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
8333
8440
|
</fo:block>
|
@@ -8337,17 +8444,32 @@
|
|
8337
8444
|
</fo:block-container>
|
8338
8445
|
</xsl:template>
|
8339
8446
|
|
8340
|
-
<xsl:template match="mn:source">
|
8447
|
+
<xsl:template match="mn:fmt-source">
|
8341
8448
|
<xsl:if test="../mn:author">
|
8342
8449
|
<xsl:text>, </xsl:text>
|
8343
8450
|
</xsl:if>
|
8344
|
-
<xsl:
|
8345
|
-
<xsl:
|
8346
|
-
<fo:
|
8347
|
-
<xsl:
|
8348
|
-
|
8349
|
-
|
8350
|
-
|
8451
|
+
<xsl:choose>
|
8452
|
+
<xsl:when test="not(parent::quote)">
|
8453
|
+
<fo:block>
|
8454
|
+
<xsl:call-template name="insert_basic_link">
|
8455
|
+
<xsl:with-param name="element">
|
8456
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8457
|
+
<xsl:apply-templates/>
|
8458
|
+
</fo:basic-link>
|
8459
|
+
</xsl:with-param>
|
8460
|
+
</xsl:call-template>
|
8461
|
+
</fo:block>
|
8462
|
+
</xsl:when>
|
8463
|
+
<xsl:otherwise>
|
8464
|
+
<xsl:call-template name="insert_basic_link">
|
8465
|
+
<xsl:with-param name="element">
|
8466
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8467
|
+
<xsl:apply-templates/>
|
8468
|
+
</fo:basic-link>
|
8469
|
+
</xsl:with-param>
|
8470
|
+
</xsl:call-template>
|
8471
|
+
</xsl:otherwise>
|
8472
|
+
</xsl:choose>
|
8351
8473
|
</xsl:template>
|
8352
8474
|
|
8353
8475
|
<xsl:template match="mn:author">
|
@@ -8424,7 +8546,7 @@
|
|
8424
8546
|
<ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
|
8425
8547
|
<xsl:choose>
|
8426
8548
|
<!-- skip figure/name/fn -->
|
8427
|
-
<xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
8549
|
+
<xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
8428
8550
|
<xsl:otherwise>
|
8429
8551
|
<xsl:element name="figure" namespace="{$namespace_full}">
|
8430
8552
|
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
@@ -8620,17 +8742,17 @@
|
|
8620
8742
|
|
8621
8743
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
8622
8744
|
|
8623
|
-
<xsl:for-each select="mn:name"> <!-- set context -->
|
8745
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
8624
8746
|
<xsl:call-template name="setIDforNamedDestination"/>
|
8625
8747
|
</xsl:for-each>
|
8626
8748
|
|
8627
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
|
8749
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
|
8628
8750
|
</fo:block>
|
8629
8751
|
|
8630
8752
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
8631
8753
|
<xsl:call-template name="showFigureKey"/>
|
8632
8754
|
</xsl:if>
|
8633
|
-
<xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
|
8755
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
8634
8756
|
|
8635
8757
|
</fo:block-container>
|
8636
8758
|
</xsl:template>
|
@@ -8656,9 +8778,9 @@
|
|
8656
8778
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
8657
8779
|
<xsl:call-template name="setNamedDestination"/>
|
8658
8780
|
<fo:block id="{@id}">
|
8659
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
8781
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8660
8782
|
</fo:block>
|
8661
|
-
<xsl:apply-templates select="mn:name"/>
|
8783
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
8662
8784
|
</xsl:template>
|
8663
8785
|
|
8664
8786
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
@@ -8669,7 +8791,7 @@
|
|
8669
8791
|
|
8670
8792
|
<!-- SOURCE: ... -->
|
8671
8793
|
<!-- figure/source -->
|
8672
|
-
<xsl:template match="mn:figure/mn:source" priority="2">
|
8794
|
+
<xsl:template match="mn:figure/mn:fmt-source" priority="2">
|
8673
8795
|
<xsl:call-template name="termsource"/>
|
8674
8796
|
</xsl:template>
|
8675
8797
|
|
@@ -8679,7 +8801,7 @@
|
|
8679
8801
|
<xsl:variable name="isAdded" select="../@added"/>
|
8680
8802
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
8681
8803
|
<xsl:choose>
|
8682
|
-
<xsl:when test="ancestor::mn:title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
8804
|
+
<xsl:when test="ancestor::mn:fmt-title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
8683
8805
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
8684
8806
|
<xsl:if test="not(parent::mn:figure) or parent::mn:p">
|
8685
8807
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -8700,13 +8822,26 @@
|
|
8700
8822
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
8701
8823
|
|
8702
8824
|
<xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
|
8703
|
-
<xsl:attribute name="
|
8825
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
8826
|
+
<xsl:choose>
|
8827
|
+
<xsl:when test="@width and not(@height)">
|
8828
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
8829
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8830
|
+
</xsl:when>
|
8831
|
+
<xsl:when test="@height and not(@width)">
|
8832
|
+
<xsl:attribute name="height">100%</xsl:attribute>
|
8833
|
+
<xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
|
8834
|
+
</xsl:when>
|
8835
|
+
<xsl:when test="not(@width) and not(@height)">
|
8836
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8837
|
+
</xsl:when>
|
8838
|
+
</xsl:choose>
|
8839
|
+
|
8704
8840
|
<xsl:if test="normalize-space($logo_width) != ''">
|
8705
8841
|
<xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
|
8706
8842
|
</xsl:if>
|
8707
|
-
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8708
8843
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
8709
|
-
<xsl:attribute name="
|
8844
|
+
<xsl:attribute name="vertical-align">top</xsl:attribute>
|
8710
8845
|
</xsl:if>
|
8711
8846
|
|
8712
8847
|
<xsl:variable name="width">
|
@@ -8995,7 +9130,7 @@
|
|
8995
9130
|
<xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
|
8996
9131
|
<xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
|
8997
9132
|
|
8998
|
-
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
|
9133
|
+
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
|
8999
9134
|
<xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
9000
9135
|
<xsl:param name="name"/>
|
9001
9136
|
|
@@ -9005,8 +9140,8 @@
|
|
9005
9140
|
|
9006
9141
|
<xsl:variable name="alt-text">
|
9007
9142
|
<xsl:choose>
|
9008
|
-
<xsl:when test="normalize-space(../mn:name) != ''">
|
9009
|
-
<xsl:value-of select="../mn:name"/>
|
9143
|
+
<xsl:when test="normalize-space(../mn:fmt-name) != ''">
|
9144
|
+
<xsl:value-of select="../mn:fmt-name"/>
|
9010
9145
|
</xsl:when>
|
9011
9146
|
<xsl:when test="normalize-space($name) != ''">
|
9012
9147
|
<xsl:value-of select="$name"/>
|
@@ -9015,7 +9150,7 @@
|
|
9015
9150
|
</xsl:choose>
|
9016
9151
|
</xsl:variable>
|
9017
9152
|
|
9018
|
-
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
|
9153
|
+
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
|
9019
9154
|
|
9020
9155
|
<xsl:choose>
|
9021
9156
|
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
@@ -9064,9 +9199,9 @@
|
|
9064
9199
|
<fo:table-cell column-number="2">
|
9065
9200
|
<fo:block>
|
9066
9201
|
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
9067
|
-
<xsl:if test="../mn:name/mn:bookmark">
|
9202
|
+
<xsl:if test="../mn:fmt-name/mn:bookmark">
|
9068
9203
|
<fo:block line-height="0" font-size="0">
|
9069
|
-
<xsl:for-each select="../mn:name/mn:bookmark">
|
9204
|
+
<xsl:for-each select="../mn:fmt-name/mn:bookmark">
|
9070
9205
|
<xsl:call-template name="bookmark"/>
|
9071
9206
|
</xsl:for-each>
|
9072
9207
|
</fo:block>
|
@@ -9306,7 +9441,7 @@
|
|
9306
9441
|
|
9307
9442
|
<!-- image with svg and emf -->
|
9308
9443
|
<xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
|
9309
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
9444
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
9310
9445
|
<xsl:for-each select="*[local-name() = 'svg']">
|
9311
9446
|
<xsl:call-template name="image_svg">
|
9312
9447
|
<xsl:with-param name="name" select="$name"/>
|
@@ -9323,7 +9458,7 @@
|
|
9323
9458
|
|
9324
9459
|
<xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
9325
9460
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
9326
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
9461
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
9327
9462
|
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
9328
9463
|
<xsl:call-template name="image_svg">
|
9329
9464
|
<xsl:with-param name="name" select="$name"/>
|
@@ -9446,7 +9581,7 @@
|
|
9446
9581
|
<xsl:template match="mn:emf"/>
|
9447
9582
|
|
9448
9583
|
<!-- figure/name -->
|
9449
|
-
<xsl:template match="mn:figure/mn:name | mn:image/mn:name">
|
9584
|
+
<xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
|
9450
9585
|
<xsl:if test="normalize-space() != ''">
|
9451
9586
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
9452
9587
|
|
@@ -9516,25 +9651,25 @@
|
|
9516
9651
|
<fo:block-container margin-left="0mm" role="SKIP">
|
9517
9652
|
<xsl:call-template name="setNamedDestination"/>
|
9518
9653
|
<fo:block id="{@id}">
|
9519
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
|
9654
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
|
9520
9655
|
</fo:block>
|
9521
9656
|
</fo:block-container>
|
9522
9657
|
</fo:block-container>
|
9523
9658
|
</xsl:template>
|
9524
9659
|
|
9525
|
-
<xsl:template match="mn:formula/mn:dt/mn:stem">
|
9660
|
+
<xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
|
9526
9661
|
<fo:inline>
|
9527
9662
|
<xsl:apply-templates/>
|
9528
9663
|
</fo:inline>
|
9529
9664
|
</xsl:template>
|
9530
9665
|
|
9531
|
-
<xsl:template match="mn:admitted/mn:stem">
|
9666
|
+
<xsl:template match="mn:fmt-admitted/mn:fmt-stem">
|
9532
9667
|
<fo:inline>
|
9533
9668
|
<xsl:apply-templates/>
|
9534
9669
|
</fo:inline>
|
9535
9670
|
</xsl:template>
|
9536
9671
|
|
9537
|
-
<xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
|
9672
|
+
<xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
|
9538
9673
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
9539
9674
|
<xsl:if test="normalize-space() != ''">
|
9540
9675
|
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
@@ -9543,7 +9678,7 @@
|
|
9543
9678
|
</xsl:template>
|
9544
9679
|
|
9545
9680
|
<!-- stem inside formula with name (with formula's number) -->
|
9546
|
-
<xsl:template match="mn:formula[mn:name]/mn:stem">
|
9681
|
+
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
9547
9682
|
<fo:block xsl:use-attribute-sets="formula-style">
|
9548
9683
|
|
9549
9684
|
<fo:table table-layout="fixed" width="100%">
|
@@ -9563,13 +9698,13 @@
|
|
9563
9698
|
|
9564
9699
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
9565
9700
|
|
9566
|
-
<xsl:for-each select="../mn:name">
|
9701
|
+
<xsl:for-each select="../mn:fmt-name">
|
9567
9702
|
<xsl:call-template name="setIDforNamedDestination"/>
|
9568
9703
|
</xsl:for-each>
|
9569
9704
|
|
9570
9705
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
9571
9706
|
|
9572
|
-
<xsl:apply-templates select="../mn:name"/>
|
9707
|
+
<xsl:apply-templates select="../mn:fmt-name"/>
|
9573
9708
|
</fo:block>
|
9574
9709
|
</fo:table-cell>
|
9575
9710
|
</fo:table-row>
|
@@ -9579,7 +9714,7 @@
|
|
9579
9714
|
</xsl:template>
|
9580
9715
|
|
9581
9716
|
<!-- stem inside formula without name (without formula's number) -->
|
9582
|
-
<xsl:template match="mn:formula[not(mn:name)]/mn:stem">
|
9717
|
+
<xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
|
9583
9718
|
<fo:block xsl:use-attribute-sets="formula-style">
|
9584
9719
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
9585
9720
|
<xsl:apply-templates/>
|
@@ -9933,7 +10068,7 @@
|
|
9933
10068
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
9934
10069
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
9935
10070
|
-->
|
9936
|
-
<xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
10071
|
+
<xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
9937
10072
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
9938
10073
|
|
9939
10074
|
<xsl:call-template name="refine_mathml-style"/>
|
@@ -10201,7 +10336,7 @@
|
|
10201
10336
|
|
10202
10337
|
<xsl:template match="mn:ul | mn:ol" mode="list" name="list">
|
10203
10338
|
|
10204
|
-
<xsl:apply-templates select="mn:name">
|
10339
|
+
<xsl:apply-templates select="mn:fmt-name">
|
10205
10340
|
<xsl:with-param name="process">true</xsl:with-param>
|
10206
10341
|
</xsl:apply-templates>
|
10207
10342
|
|
@@ -10247,7 +10382,7 @@
|
|
10247
10382
|
|
10248
10383
|
<xsl:call-template name="refine_list-style"/>
|
10249
10384
|
|
10250
|
-
<xsl:if test="mn:name">
|
10385
|
+
<xsl:if test="mn:fmt-name">
|
10251
10386
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
10252
10387
|
</xsl:if>
|
10253
10388
|
|
@@ -10262,7 +10397,7 @@
|
|
10262
10397
|
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
10263
10398
|
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
10264
10399
|
|
10265
|
-
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
|
10400
|
+
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
|
10266
10401
|
<xsl:param name="process">false</xsl:param>
|
10267
10402
|
<xsl:if test="$process = 'true'">
|
10268
10403
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
@@ -10390,7 +10525,7 @@
|
|
10390
10525
|
-->
|
10391
10526
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
10392
10527
|
<!-- fn in text -->
|
10393
|
-
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
|
10528
|
+
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
|
10394
10529
|
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
10395
10530
|
|
10396
10531
|
<!-- list of unique footnotes -->
|
@@ -10514,7 +10649,7 @@
|
|
10514
10649
|
<!-- commented:
|
10515
10650
|
.//mn:bibitem[ancestor::mn:references]/mn:note |
|
10516
10651
|
because 'fn' there is in biblio-tag -->
|
10517
|
-
<xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
10652
|
+
<xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
10518
10653
|
<!-- copy unique fn -->
|
10519
10654
|
<fn gen_id="{generate-id(.)}">
|
10520
10655
|
<xsl:copy-of select="@*"/>
|
@@ -10594,7 +10729,7 @@
|
|
10594
10729
|
<xsl:call-template name="displayAdmonitionName"/>
|
10595
10730
|
</fo:block>
|
10596
10731
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
10597
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
10732
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
10598
10733
|
</fo:block>
|
10599
10734
|
|
10600
10735
|
</fo:block-container>
|
@@ -10620,7 +10755,7 @@
|
|
10620
10755
|
</xsl:otherwise>
|
10621
10756
|
</xsl:choose> -->
|
10622
10757
|
<xsl:variable name="name">
|
10623
|
-
<xsl:apply-templates select="mn:name"/>
|
10758
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
10624
10759
|
</xsl:variable>
|
10625
10760
|
<xsl:copy-of select="$name"/>
|
10626
10761
|
<xsl:if test="normalize-space($name) != ''">
|
@@ -10628,7 +10763,7 @@
|
|
10628
10763
|
</xsl:if>
|
10629
10764
|
</xsl:template>
|
10630
10765
|
|
10631
|
-
<xsl:template match="mn:admonition/mn:name">
|
10766
|
+
<xsl:template match="mn:admonition/mn:fmt-name">
|
10632
10767
|
<xsl:apply-templates/>
|
10633
10768
|
</xsl:template>
|
10634
10769
|
|
@@ -10750,10 +10885,10 @@
|
|
10750
10885
|
<xsl:call-template name="setNamedDestination"/>
|
10751
10886
|
<fo:block id="{@id}"/>
|
10752
10887
|
|
10753
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
10888
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
10754
10889
|
|
10755
10890
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
10756
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
10891
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
10757
10892
|
</fo:block>
|
10758
10893
|
</xsl:template> <!-- references -->
|
10759
10894
|
|
@@ -10802,8 +10937,8 @@
|
|
10802
10937
|
</xsl:template> <!-- bibitem -->
|
10803
10938
|
|
10804
10939
|
<!-- Bibliography (non-normative references) -->
|
10805
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
10806
|
-
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
10940
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
|
10941
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
10807
10942
|
<xsl:call-template name="bibitem"/>
|
10808
10943
|
|
10809
10944
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
@@ -10833,7 +10968,7 @@
|
|
10833
10968
|
</fo:list-item>
|
10834
10969
|
</xsl:otherwise>
|
10835
10970
|
</xsl:choose>
|
10836
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]
|
10971
|
+
<xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
|
10837
10972
|
<xsl:with-param name="skip">false</xsl:with-param>
|
10838
10973
|
</xsl:apply-templates>
|
10839
10974
|
</xsl:template>
|
@@ -10850,8 +10985,26 @@
|
|
10850
10985
|
</xsl:apply-templates>
|
10851
10986
|
<xsl:apply-templates select="mn:formattedref"/>
|
10852
10987
|
<!-- end bibitem processing -->
|
10988
|
+
|
10989
|
+
<xsl:call-template name="processBibliographyNote"/>
|
10853
10990
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10854
10991
|
|
10992
|
+
<xsl:template name="processBibliographyNote">
|
10993
|
+
<xsl:if test="self::mn:note">
|
10994
|
+
<xsl:variable name="note_node">
|
10995
|
+
<xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
|
10996
|
+
<xsl:copy> <!-- skip @id -->
|
10997
|
+
<xsl:copy-of select="node()"/>
|
10998
|
+
</xsl:copy>
|
10999
|
+
</xsl:element>
|
11000
|
+
</xsl:variable>
|
11001
|
+
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
11002
|
+
<xsl:call-template name="note"/>
|
11003
|
+
</xsl:for-each> -->
|
11004
|
+
<xsl:call-template name="note"/>
|
11005
|
+
</xsl:if>
|
11006
|
+
</xsl:template>
|
11007
|
+
|
10855
11008
|
<xsl:template match="mn:title" mode="title">
|
10856
11009
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
10857
11010
|
</xsl:template>
|
@@ -11077,7 +11230,8 @@
|
|
11077
11230
|
</xsl:copy>
|
11078
11231
|
</xsl:template>
|
11079
11232
|
|
11080
|
-
<xsl:template match="mn:xref" mode="index_add_id"
|
11233
|
+
<xsl:template match="mn:xref" mode="index_add_id"/>
|
11234
|
+
<xsl:template match="mn:fmt-xref" mode="index_add_id">
|
11081
11235
|
<xsl:param name="docid"/>
|
11082
11236
|
<xsl:variable name="id">
|
11083
11237
|
<xsl:call-template name="generateIndexXrefId">
|
@@ -11119,7 +11273,7 @@
|
|
11119
11273
|
<xsl:template match="mn:indexsect//mn:li" mode="index_update">
|
11120
11274
|
<xsl:copy>
|
11121
11275
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
11122
|
-
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
11276
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
|
11123
11277
|
</xsl:copy>
|
11124
11278
|
</xsl:template>
|
11125
11279
|
|
@@ -11140,11 +11294,11 @@
|
|
11140
11294
|
<xsl:value-of select="."/>
|
11141
11295
|
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
11142
11296
|
</xsl:when>
|
11143
|
-
<xsl:when test="self::* and local-name(.) = 'xref'">
|
11297
|
+
<xsl:when test="self::* and local-name(.) = 'fmt-xref'">
|
11144
11298
|
<xsl:variable name="id" select="@id"/>
|
11145
11299
|
|
11146
|
-
<xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
|
11147
|
-
<xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
|
11300
|
+
<xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
|
11301
|
+
<xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
|
11148
11302
|
|
11149
11303
|
<xsl:variable name="pages_">
|
11150
11304
|
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
@@ -11240,18 +11394,18 @@
|
|
11240
11394
|
<xsl:variable name="item_number">
|
11241
11395
|
<xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
|
11242
11396
|
</xsl:variable>
|
11243
|
-
<xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
|
11397
|
+
<xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
|
11244
11398
|
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
11245
11399
|
</xsl:template>
|
11246
11400
|
|
11247
|
-
<xsl:template match="mn:indexsect/mn:title" priority="4">
|
11401
|
+
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
11248
11402
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
11249
11403
|
<!-- Index -->
|
11250
11404
|
<xsl:apply-templates/>
|
11251
11405
|
</fo:block>
|
11252
11406
|
</xsl:template>
|
11253
11407
|
|
11254
|
-
<xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
|
11408
|
+
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
11255
11409
|
<!-- Letter A, B, C, ... -->
|
11256
11410
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
11257
11411
|
<xsl:apply-templates/>
|
@@ -11292,12 +11446,12 @@
|
|
11292
11446
|
<fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
|
11293
11447
|
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
11294
11448
|
<fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
|
11295
|
-
<xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-
|
11449
|
+
<xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]">
|
11296
11450
|
<!-- skip here, see the template 'fmt-review-start' -->
|
11297
11451
|
</xsl:when>
|
11298
11452
|
<xsl:otherwise>
|
11299
11453
|
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
11300
|
-
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-
|
11454
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
11301
11455
|
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
11302
11456
|
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
11303
11457
|
</xsl:otherwise>
|
@@ -11396,6 +11550,48 @@
|
|
11396
11550
|
<!-- End Form's elements processing -->
|
11397
11551
|
<!-- =================== -->
|
11398
11552
|
|
11553
|
+
<xsl:attribute-set name="toc-style">
|
11554
|
+
</xsl:attribute-set>
|
11555
|
+
|
11556
|
+
<xsl:template name="refine_toc-style">
|
11557
|
+
</xsl:template>
|
11558
|
+
|
11559
|
+
<xsl:attribute-set name="toc-title-style">
|
11560
|
+
</xsl:attribute-set>
|
11561
|
+
|
11562
|
+
<xsl:attribute-set name="toc-title-page-style">
|
11563
|
+
</xsl:attribute-set> <!-- toc-title-page-style -->
|
11564
|
+
|
11565
|
+
<xsl:attribute-set name="toc-item-block-style">
|
11566
|
+
</xsl:attribute-set>
|
11567
|
+
|
11568
|
+
<xsl:template name="refine_toc-item-block-style">
|
11569
|
+
</xsl:template>
|
11570
|
+
|
11571
|
+
<xsl:attribute-set name="toc-item-style">
|
11572
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11573
|
+
</xsl:attribute-set> <!-- END: toc-item-style -->
|
11574
|
+
|
11575
|
+
<xsl:template name="refine_toc-item-style">
|
11576
|
+
</xsl:template> <!-- END: refine_toc-item-style -->
|
11577
|
+
|
11578
|
+
<xsl:attribute-set name="toc-leader-style">
|
11579
|
+
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
11580
|
+
|
11581
|
+
<xsl:attribute-set name="toc-pagenumber-style">
|
11582
|
+
</xsl:attribute-set>
|
11583
|
+
|
11584
|
+
<!-- List of Figures, Tables -->
|
11585
|
+
<xsl:attribute-set name="toc-listof-title-style">
|
11586
|
+
</xsl:attribute-set>
|
11587
|
+
|
11588
|
+
<xsl:attribute-set name="toc-listof-item-block-style">
|
11589
|
+
</xsl:attribute-set>
|
11590
|
+
|
11591
|
+
<xsl:attribute-set name="toc-listof-item-style">
|
11592
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11593
|
+
</xsl:attribute-set>
|
11594
|
+
|
11399
11595
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
11400
11596
|
<xsl:variable name="nodes_preface_">
|
11401
11597
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -11461,7 +11657,7 @@
|
|
11461
11657
|
|
11462
11658
|
<xsl:template name="processTables_Contents">
|
11463
11659
|
<mnx:tables>
|
11464
|
-
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
|
11660
|
+
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
|
11465
11661
|
<xsl:choose>
|
11466
11662
|
<xsl:when test="mn:fmt-name">
|
11467
11663
|
<xsl:variable name="fmt_name">
|
@@ -11483,7 +11679,7 @@
|
|
11483
11679
|
|
11484
11680
|
<xsl:template name="processFigures_Contents">
|
11485
11681
|
<mnx:figures>
|
11486
|
-
<xsl:for-each select="//mn:figure[@id and mn:name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
|
11682
|
+
<xsl:for-each select="//mn:figure[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
|
11487
11683
|
<xsl:choose>
|
11488
11684
|
<xsl:when test="mn:fmt-name">
|
11489
11685
|
<xsl:variable name="fmt_name">
|
@@ -11512,7 +11708,7 @@
|
|
11512
11708
|
|
11513
11709
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
|
11514
11710
|
|
11515
|
-
<xsl:template match="mn:figure/mn:fmt-name |
|
11711
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
|
11516
11712
|
<xsl:apply-templates mode="contents"/>
|
11517
11713
|
<xsl:text> </xsl:text>
|
11518
11714
|
</xsl:template>
|
@@ -11524,7 +11720,7 @@
|
|
11524
11720
|
</xsl:if>
|
11525
11721
|
</xsl:template>
|
11526
11722
|
|
11527
|
-
<xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name |
|
11723
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
|
11528
11724
|
<xsl:apply-templates mode="bookmarks"/>
|
11529
11725
|
<xsl:text> </xsl:text>
|
11530
11726
|
</xsl:template>
|
@@ -11535,7 +11731,7 @@
|
|
11535
11731
|
</xsl:if>
|
11536
11732
|
</xsl:template>
|
11537
11733
|
|
11538
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
11734
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
11539
11735
|
<xsl:value-of select="."/>
|
11540
11736
|
</xsl:template>
|
11541
11737
|
|
@@ -11545,7 +11741,7 @@
|
|
11545
11741
|
</xsl:if>
|
11546
11742
|
</xsl:template>
|
11547
11743
|
|
11548
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
11744
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
11549
11745
|
<xsl:value-of select="."/>
|
11550
11746
|
</xsl:template>
|
11551
11747
|
|
@@ -12006,7 +12202,7 @@
|
|
12006
12202
|
<xsl:value-of select="."/>
|
12007
12203
|
</xsl:template>
|
12008
12204
|
|
12009
|
-
<xsl:template match="mn:
|
12205
|
+
<xsl:template match="mn:annotation" mode="contents_item"/>
|
12010
12206
|
|
12011
12207
|
<xsl:template match="mn:tab" mode="contents_item">
|
12012
12208
|
<xsl:text> </xsl:text>
|
@@ -12161,7 +12357,7 @@
|
|
12161
12357
|
<xsl:apply-templates/>
|
12162
12358
|
</xsl:template>
|
12163
12359
|
|
12164
|
-
<xsl:template match="mn:toc//mn:xref" priority="3">
|
12360
|
+
<xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
|
12165
12361
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12166
12362
|
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12167
12363
|
<!-- <test><xsl:copy-of select="."/></test> -->
|
@@ -12229,8 +12425,8 @@
|
|
12229
12425
|
<xsl:apply-templates mode="toc_table_width"/>
|
12230
12426
|
</xsl:template>
|
12231
12427
|
|
12232
|
-
<xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
|
12233
|
-
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
|
12428
|
+
<xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
|
12429
|
+
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
|
12234
12430
|
|
12235
12431
|
<xsl:template match="mn:li" mode="toc_table_width">
|
12236
12432
|
<mn:tr>
|
@@ -12238,7 +12434,7 @@
|
|
12238
12434
|
</mn:tr>
|
12239
12435
|
</xsl:template>
|
12240
12436
|
|
12241
|
-
<xsl:template match="mn:xref" mode="toc_table_width">
|
12437
|
+
<xsl:template match="mn:fmt-xref" mode="toc_table_width">
|
12242
12438
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12243
12439
|
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12244
12440
|
<xsl:for-each select="mn:tab">
|
@@ -12317,10 +12513,10 @@
|
|
12317
12513
|
|
12318
12514
|
</xsl:template> <!-- tab -->
|
12319
12515
|
|
12320
|
-
<xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
|
12321
|
-
<xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
|
12516
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
|
12517
|
+
<xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
|
12322
12518
|
|
12323
|
-
<xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
|
12519
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
|
12324
12520
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
12325
12521
|
</xsl:template>
|
12326
12522
|
|
@@ -12335,13 +12531,13 @@
|
|
12335
12531
|
</xsl:template>
|
12336
12532
|
|
12337
12533
|
<xsl:variable name="reviews_">
|
12338
|
-
<xsl:for-each select="//mn:
|
12534
|
+
<xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
|
12339
12535
|
<xsl:copy>
|
12340
12536
|
<xsl:copy-of select="@from"/>
|
12341
12537
|
<xsl:copy-of select="@id"/>
|
12342
12538
|
</xsl:copy>
|
12343
12539
|
</xsl:for-each>
|
12344
|
-
<xsl:for-each select="//mn:fmt-
|
12540
|
+
<xsl:for-each select="//mn:fmt-annotation-start[@source]">
|
12345
12541
|
<xsl:copy>
|
12346
12542
|
<xsl:copy-of select="@source"/>
|
12347
12543
|
<xsl:copy-of select="@id"/>
|
@@ -12355,7 +12551,7 @@
|
|
12355
12551
|
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
12356
12552
|
<xsl:variable name="curr_id" select="@id"/>
|
12357
12553
|
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
12358
|
-
<xsl:for-each select="$reviews//mn:
|
12554
|
+
<xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
|
12359
12555
|
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
12360
12556
|
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
12361
12557
|
<fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
@@ -12370,7 +12566,7 @@
|
|
12370
12566
|
|
12371
12567
|
<!-- document text (not figures, or tables) footnotes -->
|
12372
12568
|
<xsl:variable name="reviews_container_">
|
12373
|
-
<xsl:for-each select="//mn:
|
12569
|
+
<xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
|
12374
12570
|
<xsl:variable name="update_xml_step1">
|
12375
12571
|
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
12376
12572
|
</xsl:variable>
|
@@ -12379,10 +12575,10 @@
|
|
12379
12575
|
</xsl:variable>
|
12380
12576
|
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
12381
12577
|
|
12382
|
-
<xsl:template match="mn:
|
12578
|
+
<xsl:template match="mn:annotation-container"/>
|
12383
12579
|
|
12384
12580
|
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
12385
|
-
<xsl:template match="mn:
|
12581
|
+
<xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12386
12582
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
12387
12583
|
<xsl:if test="$isGenerateTableIF = 'false'">
|
12388
12584
|
<xsl:choose>
|
@@ -12402,7 +12598,7 @@
|
|
12402
12598
|
</xsl:template>
|
12403
12599
|
|
12404
12600
|
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
12405
|
-
<xsl:template match="mn:fmt-
|
12601
|
+
<xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12406
12602
|
<!-- comment 2019-11-29 -->
|
12407
12603
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
12408
12604
|
<xsl:apply-templates /> -->
|
@@ -12458,7 +12654,7 @@
|
|
12458
12654
|
</xsl:template>
|
12459
12655
|
|
12460
12656
|
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
12461
|
-
<xsl:template match="mn:
|
12657
|
+
<xsl:template match="mn:annotation[@type = 'other']"/>
|
12462
12658
|
|
12463
12659
|
<!-- ============ -->
|
12464
12660
|
<!-- errata -->
|
@@ -12851,9 +13047,12 @@
|
|
12851
13047
|
<xsl:choose>
|
12852
13048
|
<xsl:when test="mn:fmt-title">
|
12853
13049
|
<xsl:variable name="fmt_title_section">
|
12854
|
-
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:
|
13050
|
+
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
|
12855
13051
|
</xsl:variable>
|
12856
13052
|
<xsl:value-of select="normalize-space($fmt_title_section)"/>
|
13053
|
+
<xsl:if test="normalize-space($fmt_title_section) = ''">
|
13054
|
+
<xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
|
13055
|
+
</xsl:if>
|
12857
13056
|
</xsl:when>
|
12858
13057
|
<xsl:otherwise>
|
12859
13058
|
<xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
|
@@ -12866,6 +13065,9 @@
|
|
12866
13065
|
<xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
|
12867
13066
|
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
|
12868
13067
|
</xsl:when>
|
13068
|
+
<xsl:when test="mn:fmt-title/mn:tab">
|
13069
|
+
<xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
|
13070
|
+
</xsl:when>
|
12869
13071
|
<xsl:when test="mn:fmt-title">
|
12870
13072
|
<xsl:copy-of select="mn:fmt-title/node()"/>
|
12871
13073
|
</xsl:when>
|
@@ -13003,10 +13205,10 @@
|
|
13003
13205
|
|
13004
13206
|
</fo:block>
|
13005
13207
|
|
13006
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
13208
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
13007
13209
|
|
13008
13210
|
<fo:block>
|
13009
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
13211
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
13010
13212
|
</fo:block>
|
13011
13213
|
</xsl:otherwise>
|
13012
13214
|
</xsl:choose>
|
@@ -13015,7 +13217,7 @@
|
|
13015
13217
|
<xsl:template name="refine_annex_style">
|
13016
13218
|
</xsl:template>
|
13017
13219
|
|
13018
|
-
<xsl:template match="mn:name/text()">
|
13220
|
+
<xsl:template match="mn:name/text() | mn:fmt-name/text()">
|
13019
13221
|
<!-- 0xA0 to space replacement -->
|
13020
13222
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
13021
13223
|
</xsl:template>
|
@@ -13071,28 +13273,28 @@
|
|
13071
13273
|
<xsl:template match="mn:amend"/>
|
13072
13274
|
|
13073
13275
|
<!-- fmt-title renamed to title in update_xml_step1 -->
|
13074
|
-
<xsl:template match="mn:fmt-title"/>
|
13276
|
+
<!-- <xsl:template match="mn:fmt-title" /> -->
|
13075
13277
|
|
13076
13278
|
<!-- fmt-name renamed to name in update_xml_step1 -->
|
13077
|
-
<xsl:template match="mn:fmt-name"/>
|
13279
|
+
<!-- <xsl:template match="mn:fmt-name" /> -->
|
13078
13280
|
|
13079
13281
|
<!-- fmt-preferred renamed to preferred in update_xml_step1 -->
|
13080
|
-
<xsl:template match="mn:fmt-preferred"/>
|
13282
|
+
<!-- <xsl:template match="mn:fmt-preferred" /> -->
|
13081
13283
|
|
13082
13284
|
<!-- fmt-admitted renamed to admitted in update_xml_step1 -->
|
13083
|
-
<xsl:template match="mn:fmt-admitted"/>
|
13285
|
+
<!-- <xsl:template match="mn:fmt-admitted" /> -->
|
13084
13286
|
|
13085
13287
|
<!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
|
13086
|
-
<xsl:template match="mn:fmt-deprecates"/>
|
13288
|
+
<!-- <xsl:template match="mn:fmt-deprecates" /> -->
|
13087
13289
|
|
13088
13290
|
<!-- fmt-definition renamed to definition in update_xml_step1 -->
|
13089
|
-
<xsl:template match="mn:fmt-definition"/>
|
13291
|
+
<!-- <xsl:template match="mn:fmt-definition" /> -->
|
13090
13292
|
|
13091
13293
|
<!-- fmt-termsource renamed to termsource in update_xml_step1 -->
|
13092
|
-
<xsl:template match="mn:fmt-termsource"/>
|
13294
|
+
<!-- <xsl:template match="mn:fmt-termsource" /> -->
|
13093
13295
|
|
13094
13296
|
<!-- fmt-source renamed to source in update_xml_step1 -->
|
13095
|
-
<xsl:template match="mn:fmt-source"/>
|
13297
|
+
<!-- <xsl:template match="mn:fmt-source" /> -->
|
13096
13298
|
|
13097
13299
|
<xsl:template match="mn:semx">
|
13098
13300
|
<xsl:apply-templates/>
|
@@ -13537,12 +13739,12 @@
|
|
13537
13739
|
<xsl:when test="ancestor::mn:preface">
|
13538
13740
|
<xsl:value-of select="$level_total - 2"/>
|
13539
13741
|
</xsl:when>
|
13540
|
-
<xsl:when test="ancestor::mn:sections and self::mn:title">
|
13742
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
|
13541
13743
|
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
13542
13744
|
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
13543
|
-
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
|
13745
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
|
13544
13746
|
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
13545
|
-
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
|
13747
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
|
13546
13748
|
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
13547
13749
|
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
13548
13750
|
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
@@ -13558,8 +13760,8 @@
|
|
13558
13760
|
</xsl:otherwise>
|
13559
13761
|
</xsl:choose>
|
13560
13762
|
</xsl:when>
|
13561
|
-
<xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
|
13562
|
-
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
|
13763
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
|
13764
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
|
13563
13765
|
<xsl:choose>
|
13564
13766
|
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
13565
13767
|
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
@@ -13570,7 +13772,7 @@
|
|
13570
13772
|
</xsl:choose>
|
13571
13773
|
</xsl:when>
|
13572
13774
|
<xsl:when test="ancestor::mn:sections">
|
13573
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
|
13775
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
|
13574
13776
|
<xsl:choose>
|
13575
13777
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13576
13778
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -13586,8 +13788,8 @@
|
|
13586
13788
|
<xsl:when test="parent::mn:annex">
|
13587
13789
|
<xsl:value-of select="$level_total - 1"/>
|
13588
13790
|
</xsl:when>
|
13589
|
-
<xsl:when test="ancestor::mn:annex and self::mn:title">
|
13590
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
|
13791
|
+
<xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
|
13792
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
|
13591
13793
|
<xsl:choose>
|
13592
13794
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13593
13795
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -13620,7 +13822,7 @@
|
|
13620
13822
|
</xsl:when>
|
13621
13823
|
<xsl:otherwise>
|
13622
13824
|
<xsl:variable name="title_level_">
|
13623
|
-
<xsl:for-each select="../preceding-sibling::mn:title[1]">
|
13825
|
+
<xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
|
13624
13826
|
<xsl:call-template name="getLevel"/>
|
13625
13827
|
</xsl:for-each>
|
13626
13828
|
</xsl:variable>
|
@@ -13697,15 +13899,17 @@
|
|
13697
13899
|
</xsl:template>
|
13698
13900
|
|
13699
13901
|
<xsl:template name="setNamedDestination">
|
13700
|
-
|
13701
|
-
|
13702
|
-
<
|
13703
|
-
|
13704
|
-
<xsl:for-each select=". | mn:title | mn:name">
|
13705
|
-
<xsl:if test="@named_dest">
|
13706
|
-
<fox:destination internal-destination="{@named_dest}"/>
|
13902
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
13903
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
13904
|
+
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
13905
|
+
<fox:destination internal-destination="{@id}"/>
|
13707
13906
|
</xsl:if>
|
13708
|
-
|
13907
|
+
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
13908
|
+
<xsl:if test="@named_dest">
|
13909
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
13910
|
+
</xsl:if>
|
13911
|
+
</xsl:for-each>
|
13912
|
+
</xsl:if>
|
13709
13913
|
</xsl:template>
|
13710
13914
|
|
13711
13915
|
<xsl:template name="add-letter-spacing">
|
@@ -14053,7 +14257,7 @@
|
|
14053
14257
|
</xsl:when>
|
14054
14258
|
<xsl:otherwise>
|
14055
14259
|
<!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
|
14056
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
14260
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
14057
14261
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14058
14262
|
</xsl:if>
|
14059
14263
|
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP" text-align-last="center">
|
@@ -14087,7 +14291,7 @@
|
|
14087
14291
|
</fo:block>
|
14088
14292
|
</fo:block-container>
|
14089
14293
|
</fo:inline-container>
|
14090
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
|
14294
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
|
14091
14295
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14092
14296
|
</xsl:if>
|
14093
14297
|
</xsl:otherwise>
|