metanorma-cc 2.6.9 → 2.7.0

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output version="1.0" 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
 
@@ -28,6 +28,128 @@
28
28
  </xsl:variable>
29
29
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
30
30
 
31
+ <xsl:template name="layout-master-set">
32
+ <fo:layout-master-set>
33
+ <!-- Cover page -->
34
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
35
+ <fo:region-body margin-top="23.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
36
+ <fo:region-before region-name="cover-page-header" extent="23.5mm"/>
37
+ <fo:region-after extent="10mm"/>
38
+ <fo:region-start extent="19mm"/>
39
+ <fo:region-end extent="19mm"/>
40
+ </fo:simple-page-master>
41
+
42
+ <!-- Document pages -->
43
+
44
+ <xsl:variable name="prefaceMarginTop">17</xsl:variable>
45
+ <xsl:variable name="prefaceMarginBottom">10</xsl:variable>
46
+ <!-- Preface odd pages -->
47
+ <fo:simple-page-master master-name="odd-preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
48
+ <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
49
+ <fo:region-before region-name="header-odd" extent="{$prefaceMarginTop}mm"/>
50
+ <fo:region-after region-name="footer-odd" extent="{$prefaceMarginBottom}mm"/>
51
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
52
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
53
+ </fo:simple-page-master>
54
+ <fo:simple-page-master master-name="odd-preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
55
+ <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
56
+ <fo:region-before region-name="header-odd" extent="{$prefaceMarginTop}mm"/>
57
+ <fo:region-after region-name="footer-odd" extent="{$prefaceMarginBottom}mm"/>
58
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
59
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
60
+ </fo:simple-page-master>
61
+ <!-- Preface even pages -->
62
+ <fo:simple-page-master master-name="even-preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
63
+ <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
64
+ <fo:region-before region-name="header-even" extent="{$prefaceMarginTop}mm"/>
65
+ <fo:region-after region-name="footer-even" extent="{$prefaceMarginBottom}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="even-preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
70
+ <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
71
+ <fo:region-before region-name="header-even" extent="{$prefaceMarginTop}mm"/>
72
+ <fo:region-after region-name="footer-even" extent="{$prefaceMarginBottom}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="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
77
+ <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
78
+ <fo:region-before region-name="header" extent="{$prefaceMarginTop}mm"/>
79
+ <fo:region-after region-name="footer" extent="{$prefaceMarginBottom}mm"/>
80
+ <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
81
+ <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
82
+ </fo:simple-page-master>
83
+ <fo:simple-page-master master-name="blankpage-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
84
+ <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
85
+ <fo:region-before region-name="header" extent="{$prefaceMarginTop}mm"/>
86
+ <fo:region-after region-name="footer" extent="{$prefaceMarginBottom}mm"/>
87
+ <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
88
+ <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
89
+ </fo:simple-page-master>
90
+ <fo:page-sequence-master master-name="preface">
91
+ <fo:repeatable-page-master-alternatives>
92
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
93
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-preface"/>
94
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-preface"/>
95
+ </fo:repeatable-page-master-alternatives>
96
+ </fo:page-sequence-master>
97
+ <fo:page-sequence-master master-name="preface-landscape">
98
+ <fo:repeatable-page-master-alternatives>
99
+ <fo:conditional-page-master-reference master-reference="blankpage-landscape" blank-or-not-blank="blank"/>
100
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-preface-landscape"/>
101
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-preface-landscape"/>
102
+ </fo:repeatable-page-master-alternatives>
103
+ </fo:page-sequence-master>
104
+
105
+ <!-- Document odd pages -->
106
+ <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
107
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
108
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
109
+ <fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
110
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
111
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
112
+ </fo:simple-page-master>
113
+ <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
114
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
115
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
116
+ <fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
117
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
118
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
119
+ </fo:simple-page-master>
120
+ <!-- Preface even pages -->
121
+ <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
122
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
123
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
124
+ <fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
125
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
126
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
127
+ </fo:simple-page-master>
128
+ <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
129
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
130
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
131
+ <fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
132
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
133
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
134
+ </fo:simple-page-master>
135
+ <fo:page-sequence-master master-name="document">
136
+ <fo:repeatable-page-master-alternatives>
137
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
138
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
139
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
140
+ </fo:repeatable-page-master-alternatives>
141
+ </fo:page-sequence-master>
142
+ <fo:page-sequence-master master-name="document-landscape">
143
+ <fo:repeatable-page-master-alternatives>
144
+ <fo:conditional-page-master-reference master-reference="blankpage-landscape" blank-or-not-blank="blank"/>
145
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
146
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
147
+ </fo:repeatable-page-master-alternatives>
148
+ </fo:page-sequence-master>
149
+
150
+ </fo:layout-master-set>
151
+ </xsl:template> <!-- END: layout-master-set -->
152
+
31
153
  <xsl:template match="/">
32
154
  <fo:root xml:lang="{$lang}">
33
155
  <xsl:variable name="root-style">
@@ -36,125 +158,8 @@
36
158
  <xsl:call-template name="insertRootStyle">
37
159
  <xsl:with-param name="root-style" select="$root-style"/>
38
160
  </xsl:call-template>
39
- <fo:layout-master-set>
40
- <!-- Cover page -->
41
- <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
42
- <fo:region-body margin-top="23.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
43
- <fo:region-before region-name="cover-page-header" extent="23.5mm"/>
44
- <fo:region-after extent="10mm"/>
45
- <fo:region-start extent="19mm"/>
46
- <fo:region-end extent="19mm"/>
47
- </fo:simple-page-master>
48
-
49
- <!-- Document pages -->
50
-
51
- <xsl:variable name="prefaceMarginTop">17</xsl:variable>
52
- <xsl:variable name="prefaceMarginBottom">10</xsl:variable>
53
- <!-- Preface odd pages -->
54
- <fo:simple-page-master master-name="odd-preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
55
- <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
56
- <fo:region-before region-name="header-odd" extent="{$prefaceMarginTop}mm"/>
57
- <fo:region-after region-name="footer-odd" extent="{$prefaceMarginBottom}mm"/>
58
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
59
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
60
- </fo:simple-page-master>
61
- <fo:simple-page-master master-name="odd-preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
62
- <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
63
- <fo:region-before region-name="header-odd" extent="{$prefaceMarginTop}mm"/>
64
- <fo:region-after region-name="footer-odd" extent="{$prefaceMarginBottom}mm"/>
65
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
66
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
67
- </fo:simple-page-master>
68
- <!-- Preface even pages -->
69
- <fo:simple-page-master master-name="even-preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
70
- <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
71
- <fo:region-before region-name="header-even" extent="{$prefaceMarginTop}mm"/>
72
- <fo:region-after region-name="footer-even" extent="{$prefaceMarginBottom}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-preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
77
- <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
78
- <fo:region-before region-name="header-even" extent="{$prefaceMarginTop}mm"/>
79
- <fo:region-after region-name="footer-even" extent="{$prefaceMarginBottom}mm"/>
80
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
81
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
82
- </fo:simple-page-master>
83
- <fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
84
- <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
85
- <fo:region-before region-name="header" extent="{$prefaceMarginTop}mm"/>
86
- <fo:region-after region-name="footer" extent="{$prefaceMarginBottom}mm"/>
87
- <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
88
- <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
89
- </fo:simple-page-master>
90
- <fo:simple-page-master master-name="blankpage-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
91
- <fo:region-body margin-top="{$prefaceMarginTop}mm" margin-bottom="{$prefaceMarginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
92
- <fo:region-before region-name="header" extent="{$prefaceMarginTop}mm"/>
93
- <fo:region-after region-name="footer" extent="{$prefaceMarginBottom}mm"/>
94
- <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
95
- <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
96
- </fo:simple-page-master>
97
- <fo:page-sequence-master master-name="preface">
98
- <fo:repeatable-page-master-alternatives>
99
- <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
100
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-preface"/>
101
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-preface"/>
102
- </fo:repeatable-page-master-alternatives>
103
- </fo:page-sequence-master>
104
- <fo:page-sequence-master master-name="preface-landscape">
105
- <fo:repeatable-page-master-alternatives>
106
- <fo:conditional-page-master-reference master-reference="blankpage-landscape" blank-or-not-blank="blank"/>
107
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-preface-landscape"/>
108
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-preface-landscape"/>
109
- </fo:repeatable-page-master-alternatives>
110
- </fo:page-sequence-master>
111
-
112
- <!-- Document odd pages -->
113
- <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
114
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
115
- <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
116
- <fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
117
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
118
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
119
- </fo:simple-page-master>
120
- <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
121
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
122
- <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
123
- <fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
124
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
125
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
126
- </fo:simple-page-master>
127
- <!-- Preface even pages -->
128
- <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
129
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
130
- <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
131
- <fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
132
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
133
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
134
- </fo:simple-page-master>
135
- <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
136
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
137
- <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
138
- <fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
139
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
140
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
141
- </fo:simple-page-master>
142
- <fo:page-sequence-master master-name="document">
143
- <fo:repeatable-page-master-alternatives>
144
- <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
145
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
146
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
147
- </fo:repeatable-page-master-alternatives>
148
- </fo:page-sequence-master>
149
- <fo:page-sequence-master master-name="document-landscape">
150
- <fo:repeatable-page-master-alternatives>
151
- <fo:conditional-page-master-reference master-reference="blankpage-landscape" blank-or-not-blank="blank"/>
152
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
153
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
154
- </fo:repeatable-page-master-alternatives>
155
- </fo:page-sequence-master>
156
-
157
- </fo:layout-master-set>
161
+
162
+ <xsl:call-template name="layout-master-set"/>
158
163
 
159
164
  <fo:declarations>
160
165
  <xsl:call-template name="addPDFUAmeta"/>
@@ -164,70 +169,7 @@
164
169
  <xsl:with-param name="contents" select="$contents"/>
165
170
  </xsl:call-template>
166
171
 
167
- <!-- Cover Page -->
168
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
169
- <xsl:call-template name="insertFootnoteSeparatorCommon"/>
170
-
171
- <fo:static-content flow-name="cover-page-header" font-size="10pt">
172
- <fo:block-container height="23.5mm" display-align="before">
173
- <fo:block padding-top="12.5mm">
174
- <xsl:value-of select="$copyright"/>
175
- </fo:block>
176
- </fo:block-container>
177
- </fo:static-content>
178
-
179
- <fo:flow flow-name="xsl-region-body">
180
-
181
- <fo:block text-align="right">
182
- <!-- CC/FDS 18011:2018 -->
183
- <fo:block font-size="14pt" font-weight="bold" margin-bottom="10pt">
184
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'csd']"/><xsl:text> </xsl:text>
185
- </fo:block>
186
- <fo:block margin-bottom="12pt">
187
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name"/>
188
- <xsl:text> TC </xsl:text>
189
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/>
190
- <xsl:text> </xsl:text>
191
- </fo:block>
192
- </fo:block>
193
- <fo:block font-size="24pt" font-weight="bold" text-align="center" role="H1">
194
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']"/>
195
- <xsl:value-of select="$linebreak"/>
196
- </fo:block>
197
- <fo:block> </fo:block>
198
- <fo:block margin-bottom="12pt"> </fo:block>
199
- <fo:block-container font-size="16pt" text-align="center" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
200
- <fo:block-container margin-left="0mm" margin-right="0mm">
201
- <fo:block padding-top="1mm">
202
- <xsl:call-template name="capitalizeWords">
203
- <!-- ex: final-draft -->
204
- <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage"/>
205
- </xsl:call-template>
206
- <xsl:text> </xsl:text>
207
- <xsl:call-template name="capitalizeWords">
208
- <!-- ex: standard -->
209
- <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
210
- </xsl:call-template>
211
- </fo:block>
212
- </fo:block-container>
213
- </fo:block-container>
214
- <fo:block margin-bottom="10pt"> </fo:block>
215
- <fo:block-container font-size="10pt" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
216
- <fo:block-container margin-left="0mm" margin-right="0mm">
217
- <fo:block text-align="center" font-weight="bold" padding-top="1mm" margin-bottom="6pt">Warning for drafts</fo:block>
218
- <fo:block margin-left="2mm" margin-right="2mm">
219
- <fo:block margin-bottom="6pt">This document is not a CalConnect Standard. It is distributed for review and comment, and is subject to change without notice and may not be referred to as a Standard. Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
220
- <fo:block margin-bottom="10pt">Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
221
- </fo:block>
222
- </fo:block-container>
223
- </fo:block-container>
224
- <fo:block text-align="center">
225
- <xsl:text>The Calendaring and Scheduling Consortium, Inc.  </xsl:text>
226
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:from"/>
227
- </fo:block>
228
- </fo:flow>
229
- </fo:page-sequence>
230
- <!-- End Cover Page -->
172
+ <xsl:call-template name="cover-page"/>
231
173
 
232
174
  <xsl:variable name="updated_xml">
233
175
  <xsl:call-template name="updateXML"/>
@@ -335,29 +277,95 @@
335
277
  </fo:root>
336
278
  </xsl:template>
337
279
 
280
+ <xsl:template name="cover-page">
281
+ <!-- Cover Page -->
282
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
283
+ <xsl:call-template name="insertFootnoteSeparatorCommon"/>
284
+
285
+ <fo:static-content flow-name="cover-page-header" font-size="10pt">
286
+ <fo:block-container height="23.5mm" display-align="before">
287
+ <fo:block padding-top="12.5mm">
288
+ <xsl:value-of select="$copyright"/>
289
+ </fo:block>
290
+ </fo:block-container>
291
+ </fo:static-content>
292
+
293
+ <fo:flow flow-name="xsl-region-body">
294
+
295
+ <fo:block text-align="right">
296
+ <!-- CC/FDS 18011:2018 -->
297
+ <fo:block font-size="14pt" font-weight="bold" margin-bottom="10pt">
298
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'csd']"/><xsl:text> </xsl:text>
299
+ </fo:block>
300
+ <fo:block margin-bottom="12pt">
301
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name"/>
302
+ <xsl:text> TC </xsl:text>
303
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/>
304
+ <xsl:text> </xsl:text>
305
+ </fo:block>
306
+ </fo:block>
307
+ <fo:block font-size="24pt" font-weight="bold" text-align="center" role="H1">
308
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']"/>
309
+ <xsl:value-of select="$linebreak"/>
310
+ </fo:block>
311
+ <fo:block> </fo:block>
312
+ <fo:block margin-bottom="12pt"> </fo:block>
313
+ <fo:block-container font-size="16pt" text-align="center" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
314
+ <fo:block-container margin-left="0mm" margin-right="0mm">
315
+ <fo:block padding-top="1mm">
316
+ <xsl:call-template name="capitalizeWords">
317
+ <!-- ex: final-draft -->
318
+ <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage"/>
319
+ </xsl:call-template>
320
+ <xsl:text> </xsl:text>
321
+ <xsl:call-template name="capitalizeWords">
322
+ <!-- ex: standard -->
323
+ <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
324
+ </xsl:call-template>
325
+ </fo:block>
326
+ </fo:block-container>
327
+ </fo:block-container>
328
+ <fo:block margin-bottom="10pt"> </fo:block>
329
+ <fo:block-container font-size="10pt" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
330
+ <fo:block-container margin-left="0mm" margin-right="0mm">
331
+ <fo:block text-align="center" font-weight="bold" padding-top="1mm" margin-bottom="6pt">Warning for drafts</fo:block>
332
+ <fo:block margin-left="2mm" margin-right="2mm">
333
+ <fo:block margin-bottom="6pt">This document is not a CalConnect Standard. It is distributed for review and comment, and is subject to change without notice and may not be referred to as a Standard. Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
334
+ <fo:block margin-bottom="10pt">Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
335
+ </fo:block>
336
+ </fo:block-container>
337
+ </fo:block-container>
338
+ <fo:block text-align="center">
339
+ <xsl:text>The Calendaring and Scheduling Consortium, Inc.  </xsl:text>
340
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:from"/>
341
+ </fo:block>
342
+ </fo:flow>
343
+ </fo:page-sequence>
344
+ </xsl:template> <!-- END: cover-page -->
345
+
338
346
  <xsl:template name="insertListOf_Title">
339
347
  <xsl:param name="title"/>
340
- <fo:block role="TOCI" margin-top="6pt" keep-with-next="always">
348
+ <fo:block xsl:use-attribute-sets="toc-listof-title-style">
341
349
  <xsl:value-of select="$title"/>
342
350
  </fo:block>
343
351
  </xsl:template>
344
352
 
345
353
  <xsl:template name="insertListOf_Item">
346
354
  <fo:block role="TOCI">
347
- <fo:list-block provisional-distance-between-starts="8mm" role="SKIP">
355
+ <fo:list-block xsl:use-attribute-sets="toc-listof-item-block-style">
348
356
  <fo:list-item role="SKIP">
349
357
  <fo:list-item-label end-indent="label-end()" role="SKIP">
350
358
  <fo:block/>
351
359
  </fo:list-item-label>
352
360
  <fo:list-item-body start-indent="body-start()" role="SKIP">
353
- <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm" role="SKIP">
361
+ <fo:block xsl:use-attribute-sets="toc-listof-item-style">
354
362
  <fo:basic-link internal-destination="{@id}">
355
363
  <xsl:call-template name="setAltText">
356
364
  <xsl:with-param name="value" select="@alt-text"/>
357
365
  </xsl:call-template>
358
366
  <xsl:apply-templates select="." mode="contents"/>
359
367
  <fo:inline keep-together.within-line="always" role="SKIP">
360
- <fo:leader leader-pattern="dots"/>
368
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
361
369
  <fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
362
370
  </fo:inline>
363
371
  </fo:basic-link>
@@ -368,22 +376,21 @@
368
376
  </fo:block>
369
377
  </xsl:template>
370
378
 
371
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="3">
372
- <fo:block-container font-weight="bold" line-height="115%" role="SKIP">
379
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="3">
380
+ <fo:block-container xsl:use-attribute-sets="toc-style">
373
381
  <!-- render 'Contents' outside if role="TOC" -->
374
- <xsl:apply-templates select="mn:title"/>
382
+ <xsl:apply-templates select="mn:fmt-title"/>
375
383
  <fo:block role="TOC">
376
384
 
377
- <xsl:apply-templates select="node()[not(self::mn:title)]"/>
385
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
378
386
 
379
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
387
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
380
388
 
381
389
  <xsl:for-each select="$contents//mnx:item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
382
390
 
383
- <fo:block role="TOCI">
384
- <xsl:if test="@level = 1">
385
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
386
- </xsl:if>
391
+ <fo:block xsl:use-attribute-sets="toc-item-style">
392
+
393
+ <xsl:call-template name="refine_toc-item-style"/>
387
394
 
388
395
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{@section} {mnx:title}"> <!-- link at this level needs for PDF structure tags -->
389
396
  <fo:list-block role="SKIP">
@@ -405,7 +412,7 @@
405
412
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}" role="SKIP">
406
413
  <xsl:apply-templates select="mnx:title"/>
407
414
  <fo:inline keep-together.within-line="always" role="SKIP">
408
- <fo:leader leader-pattern="dots"/>
415
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
409
416
  <fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
410
417
  </fo:inline>
411
418
  </fo:basic-link>
@@ -418,37 +425,31 @@
418
425
  </xsl:for-each>
419
426
 
420
427
  <!-- List of Tables -->
421
- <xsl:if test="$contents//mnx:tables/mnx:table">
422
- <xsl:call-template name="insertListOf_Title">
423
- <xsl:with-param name="title" select="$title-list-tables"/>
424
- </xsl:call-template>
425
- <xsl:for-each select="$contents//mnx:tables/mnx:table">
426
- <xsl:call-template name="insertListOf_Item"/>
427
- </xsl:for-each>
428
- </xsl:if>
428
+ <xsl:for-each select="$contents//mnx:tables/mnx:table">
429
+ <xsl:if test="position() = 1">
430
+ <xsl:call-template name="insertListOf_Title">
431
+ <xsl:with-param name="title" select="$title-list-tables"/>
432
+ </xsl:call-template>
433
+ </xsl:if>
434
+ <xsl:call-template name="insertListOf_Item"/>
435
+ </xsl:for-each>
429
436
 
430
437
  <!-- List of Figures -->
431
- <xsl:if test="$contents//mnx:figures/mnx:figure">
432
- <xsl:call-template name="insertListOf_Title">
433
- <xsl:with-param name="title" select="$title-list-figures"/>
434
- </xsl:call-template>
435
- <xsl:for-each select="$contents//mnx:figures/mnx:figure">
436
- <xsl:call-template name="insertListOf_Item"/>
437
- </xsl:for-each>
438
- </xsl:if>
438
+ <xsl:for-each select="$contents//mnx:figures/mnx:figure">
439
+ <xsl:if test="position() = 1">
440
+ <xsl:call-template name="insertListOf_Title">
441
+ <xsl:with-param name="title" select="$title-list-figures"/>
442
+ </xsl:call-template>
443
+ </xsl:if>
444
+ <xsl:call-template name="insertListOf_Item"/>
445
+ </xsl:for-each>
439
446
  </xsl:if>
440
447
  </fo:block>
441
448
  </fo:block-container>
442
449
  </xsl:template>
443
450
 
444
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
445
- <!-- <xsl:variable name="title-toc">
446
- <xsl:call-template name="getTitle">
447
- <xsl:with-param name="name" select="'title-toc'"/>
448
- </xsl:call-template>
449
- </xsl:variable> -->
450
- <fo:block font-size="14pt" margin-bottom="15.5pt" role="H1">
451
- <!-- <xsl:value-of select="$title-toc"/> -->
451
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
452
+ <fo:block xsl:use-attribute-sets="toc-title-style">
452
453
  <xsl:apply-templates/>
453
454
  </fo:block>
454
455
  </xsl:template>
@@ -514,7 +515,7 @@
514
515
  </fo:block>
515
516
  </xsl:template>
516
517
 
517
- <xsl:template match="mn:title" name="title">
518
+ <xsl:template match="mn:fmt-title" name="title">
518
519
 
519
520
  <xsl:variable name="level">
520
521
  <xsl:call-template name="getLevel"/>
@@ -561,7 +562,7 @@
561
562
  <xsl:variable name="element-name">
562
563
  <xsl:choose>
563
564
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
564
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
565
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
565
566
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
566
567
  <xsl:when test="@id = 'boilerplate-name'">fo:inline</xsl:when>
567
568
  <xsl:otherwise>fo:block</xsl:otherwise>
@@ -595,7 +596,7 @@
595
596
  </xsl:if>
596
597
  </xsl:template>
597
598
 
598
- <xsl:template match="mn:xref" priority="2">
599
+ <xsl:template match="mn:fmt-xref" priority="2">
599
600
  <xsl:call-template name="insert_basic_link">
600
601
  <xsl:with-param name="element">
601
602
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
@@ -802,10 +803,6 @@
802
803
  <title-part lang="ru">
803
804
  </title-part>
804
805
  <title-part lang="zh">第 # 部分:</title-part>
805
-
806
- <title-subpart lang="en">Sub-part #</title-subpart>
807
- <title-subpart lang="fr">Partie de sub #</title-subpart>
808
-
809
806
  </xsl:variable>
810
807
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
811
808
 
@@ -1258,7 +1255,8 @@
1258
1255
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
1259
1256
 
1260
1257
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
1261
- <xsl:element name="stem" namespace="{$namespace_full}">
1258
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1259
+ <xsl:copy>
1262
1260
  <xsl:copy-of select="@*"/>
1263
1261
  <xsl:choose>
1264
1262
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1282,7 +1280,8 @@
1282
1280
  </xsl:choose>
1283
1281
  </xsl:otherwise>
1284
1282
  </xsl:choose>
1285
- </xsl:element>
1283
+ </xsl:copy>
1284
+ <!-- </xsl:element> -->
1286
1285
  </xsl:template>
1287
1286
 
1288
1287
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -1444,12 +1443,14 @@
1444
1443
  </xsl:template>
1445
1444
 
1446
1445
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
1447
- <xsl:element name="title" namespace="{$namespace_full}">
1446
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
1447
+ <xsl:copy>
1448
1448
  <xsl:copy-of select="@*"/>
1449
1449
  <xsl:call-template name="addNamedDestinationAttribute"/>
1450
1450
 
1451
1451
  <xsl:apply-templates mode="update_xml_step1"/>
1452
- </xsl:element>
1452
+ </xsl:copy>
1453
+ <!-- </xsl:element> -->
1453
1454
  </xsl:template>
1454
1455
 
1455
1456
  <xsl:template name="addNamedDestinationAttribute">
@@ -1461,12 +1462,14 @@
1461
1462
  <xsl:apply-templates mode="update_xml_step1"/>
1462
1463
  </xsl:when>
1463
1464
  <xsl:otherwise>
1464
- <xsl:element name="name" namespace="{$namespace_full}">
1465
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
1466
+ <xsl:copy>
1465
1467
  <xsl:copy-of select="@*"/>
1466
1468
  <xsl:call-template name="addNamedDestinationAttribute"/>
1467
1469
 
1468
1470
  <xsl:apply-templates mode="update_xml_step1"/>
1469
- </xsl:element>
1471
+ </xsl:copy>
1472
+ <!-- </xsl:element> -->
1470
1473
  </xsl:otherwise>
1471
1474
  </xsl:choose>
1472
1475
  </xsl:template>
@@ -1481,7 +1484,7 @@
1481
1484
  <xsl:apply-templates mode="update_xml_step1"/>
1482
1485
  </xsl:template>
1483
1486
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
1484
- <xsl:element name="preferred" namespace="{$namespace_full}">
1487
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
1485
1488
  <xsl:copy-of select="@*"/>
1486
1489
  <xsl:apply-templates mode="update_xml_step1"/>
1487
1490
  </xsl:element>
@@ -1491,7 +1494,7 @@
1491
1494
  <xsl:apply-templates mode="update_xml_step1"/>
1492
1495
  </xsl:template>
1493
1496
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
1494
- <xsl:element name="admitted" namespace="{$namespace_full}">
1497
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
1495
1498
  <xsl:copy-of select="@*"/>
1496
1499
  <xsl:apply-templates mode="update_xml_step1"/>
1497
1500
  </xsl:element>
@@ -1501,32 +1504,32 @@
1501
1504
  <xsl:apply-templates mode="update_xml_step1"/>
1502
1505
  </xsl:template>
1503
1506
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
1504
- <xsl:element name="deprecates" namespace="{$namespace_full}">
1507
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
1505
1508
  <xsl:copy-of select="@*"/>
1506
1509
  <xsl:apply-templates mode="update_xml_step1"/>
1507
1510
  </xsl:element>
1508
1511
  </xsl:template>
1509
1512
 
1510
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1513
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1511
1514
  <xsl:element name="definition" namespace="{$namespace_full}">
1512
1515
  <xsl:copy-of select="@*"/>
1513
1516
  <xsl:apply-templates mode="update_xml_step1"/>
1514
1517
  </xsl:element>
1515
1518
  </xsl:template>
1516
-
1519
+
1517
1520
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
1518
1521
  <xsl:element name="termsource" namespace="{$namespace_full}">
1519
1522
  <xsl:copy-of select="@*"/>
1520
1523
  <xsl:apply-templates mode="update_xml_step1"/>
1521
1524
  </xsl:element>
1522
1525
  </xsl:template>
1523
-
1526
+
1524
1527
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
1525
1528
  <xsl:element name="source" namespace="{$namespace_full}">
1526
1529
  <xsl:copy-of select="@*"/>
1527
1530
  <xsl:apply-templates mode="update_xml_step1"/>
1528
1531
  </xsl:element>
1529
- </xsl:template>
1532
+ </xsl:template> -->
1530
1533
 
1531
1534
  <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">
1532
1535
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -1549,12 +1552,12 @@
1549
1552
  </xsl:template>
1550
1553
 
1551
1554
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
1552
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1555
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1553
1556
  <xsl:element name="identifier" namespace="{$namespace_full}">
1554
1557
  <xsl:copy-of select="@*"/>
1555
1558
  <xsl:apply-templates mode="update_xml_step1"/>
1556
1559
  </xsl:element>
1557
- </xsl:template>
1560
+ </xsl:template> -->
1558
1561
 
1559
1562
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
1560
1563
 
@@ -1564,51 +1567,53 @@
1564
1567
 
1565
1568
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
1566
1569
 
1567
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1570
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1568
1571
  <xsl:element name="eref" namespace="{$namespace_full}">
1569
1572
  <xsl:copy-of select="@*"/>
1570
1573
  <xsl:apply-templates mode="update_xml_step1"/>
1571
1574
  </xsl:element>
1572
- </xsl:template>
1575
+ </xsl:template> -->
1573
1576
 
1574
1577
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
1575
1578
 
1576
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1579
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1577
1580
  <xsl:element name="xref" namespace="{$namespace_full}">
1578
1581
  <xsl:copy-of select="@*"/>
1579
1582
  <xsl:apply-templates mode="update_xml_step1"/>
1580
1583
  </xsl:element>
1581
- </xsl:template>
1584
+ </xsl:template> -->
1582
1585
 
1583
1586
  <xsl:template match="mn:link" mode="update_xml_step1"/>
1584
1587
 
1585
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1588
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1586
1589
  <xsl:element name="link" namespace="{$namespace_full}">
1587
1590
  <xsl:copy-of select="@*"/>
1588
1591
  <xsl:apply-templates mode="update_xml_step1"/>
1589
1592
  </xsl:element>
1590
- </xsl:template>
1593
+ </xsl:template> -->
1591
1594
 
1592
1595
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
1593
1596
 
1594
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1597
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1595
1598
  <xsl:element name="origin" namespace="{$namespace_full}">
1596
1599
  <xsl:copy-of select="@*"/>
1597
1600
  <xsl:apply-templates mode="update_xml_step1"/>
1598
1601
  </xsl:element>
1599
- </xsl:template>
1602
+ </xsl:template> -->
1600
1603
 
1601
1604
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
1602
1605
 
1603
1606
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
1604
1607
 
1605
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
1608
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
1606
1609
 
1607
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1608
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1609
- <xsl:value-of select="."/>
1610
- </xsl:element>
1611
- </xsl:template>
1610
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1611
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1612
+ <xsl:value-of select="."/>
1613
+ </xsl:element>
1614
+ </xsl:template>
1615
+
1616
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
1612
1617
 
1613
1618
  <!-- END: update new Presentation XML -->
1614
1619
 
@@ -1804,7 +1809,7 @@
1804
1809
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
1805
1810
  <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>
1806
1811
 
1807
- <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:link[not(contains(.,' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn: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">
1812
+ <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">
1808
1813
 
1809
1814
  <xsl:variable name="parent" select="local-name(..)"/>
1810
1815
 
@@ -1923,7 +1928,7 @@
1923
1928
  </xsl:if>
1924
1929
  </xsl:template>
1925
1930
 
1926
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1931
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1927
1932
  <xsl:copy-of select="."/>
1928
1933
  </xsl:template>
1929
1934
 
@@ -2250,7 +2255,7 @@
2250
2255
  </fo:block>
2251
2256
  </xsl:template> <!-- copyright-statement -->
2252
2257
 
2253
- <xsl:template match="mn:copyright-statement//mn:title">
2258
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
2254
2259
  <!-- process in the template 'title' -->
2255
2260
  <xsl:call-template name="title"/>
2256
2261
  </xsl:template> <!-- copyright-statement//title -->
@@ -2266,7 +2271,7 @@
2266
2271
  </fo:block>
2267
2272
  </xsl:template> <!-- license-statement -->
2268
2273
 
2269
- <xsl:template match="mn:license-statement//mn:title">
2274
+ <xsl:template match="mn:license-statement//mn:fmt-title">
2270
2275
  <!-- process in the template 'title' -->
2271
2276
  <xsl:call-template name="title"/>
2272
2277
  </xsl:template> <!-- license-statement/title -->
@@ -2283,7 +2288,7 @@
2283
2288
  </fo:block>
2284
2289
  </xsl:template> <!-- legal-statement -->
2285
2290
 
2286
- <xsl:template match="mn:legal-statement//mn:title">
2291
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
2287
2292
  <!-- process in the template 'title' -->
2288
2293
  <xsl:call-template name="title"/>
2289
2294
 
@@ -2303,7 +2308,7 @@
2303
2308
  </fo:block>
2304
2309
  </xsl:template> <!-- feedback-statement -->
2305
2310
 
2306
- <xsl:template match="mn:feedback-statement//mn:title">
2311
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
2307
2312
  <!-- process in the template 'title' -->
2308
2313
  <xsl:call-template name="title"/>
2309
2314
  </xsl:template>
@@ -2328,7 +2333,7 @@
2328
2333
  <xsl:template name="refine_link-style">
2329
2334
  </xsl:template> <!-- refine_link-style -->
2330
2335
 
2331
- <xsl:template match="mn:link" name="link">
2336
+ <xsl:template match="mn:fmt-link" name="link">
2332
2337
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
2333
2338
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
2334
2339
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -2549,7 +2554,7 @@
2549
2554
  <xsl:value-of select="."/>
2550
2555
  </xsl:attribute>
2551
2556
  </xsl:for-each>
2552
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
2557
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
2553
2558
  </xsl:when>
2554
2559
 
2555
2560
  <xsl:otherwise>
@@ -2591,11 +2596,11 @@
2591
2596
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2592
2597
  </xsl:if>
2593
2598
 
2594
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
2599
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
2595
2600
  </fo:block>
2596
2601
 
2597
2602
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
2598
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
2603
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
2599
2604
 
2600
2605
  </fo:block-container>
2601
2606
  </fo:block-container>
@@ -2896,7 +2901,7 @@
2896
2901
 
2897
2902
  <!-- end mode="syntax_highlight" -->
2898
2903
 
2899
- <xsl:template match="mn:sourcecode/mn:name">
2904
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
2900
2905
  <xsl:if test="normalize-space() != ''">
2901
2906
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2902
2907
  <xsl:apply-templates/>
@@ -2914,7 +2919,7 @@
2914
2919
  </xsl:choose>
2915
2920
  </xsl:template>
2916
2921
 
2917
- <xsl:template match="mn:annotation">
2922
+ <xsl:template match="mn:callout-annotation">
2918
2923
  <xsl:variable name="annotation-id" select="@id"/>
2919
2924
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2920
2925
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -2926,7 +2931,7 @@
2926
2931
  </fo:block>
2927
2932
  </xsl:template>
2928
2933
 
2929
- <xsl:template match="mn:annotation/mn:p">
2934
+ <xsl:template match="mn:callout-annotation/mn:p">
2930
2935
  <xsl:param name="callout"/>
2931
2936
  <fo:inline id="{@id}">
2932
2937
  <xsl:call-template name="setNamedDestination"/>
@@ -3078,7 +3083,7 @@
3078
3083
  <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
3079
3084
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
3080
3085
  <xsl:choose>
3081
- <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = '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>
3086
+ <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>
3082
3087
  <xsl:otherwise>
3083
3088
  <xsl:variable name="tag">
3084
3089
  <xsl:call-template name="insertTag">
@@ -3479,12 +3484,12 @@
3479
3484
  <xsl:template match="mn:permission">
3480
3485
  <xsl:call-template name="setNamedDestination"/>
3481
3486
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3482
- <xsl:apply-templates select="mn:name"/>
3483
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3487
+ <xsl:apply-templates select="mn:fmt-name"/>
3488
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3484
3489
  </fo:block>
3485
3490
  </xsl:template>
3486
3491
 
3487
- <xsl:template match="mn:permission/mn:name">
3492
+ <xsl:template match="mn:permission/mn:fmt-name">
3488
3493
  <xsl:if test="normalize-space() != ''">
3489
3494
  <fo:block xsl:use-attribute-sets="permission-name-style">
3490
3495
  <xsl:apply-templates/>
@@ -3506,15 +3511,15 @@
3506
3511
  <xsl:template match="mn:requirement">
3507
3512
  <xsl:call-template name="setNamedDestination"/>
3508
3513
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3509
- <xsl:apply-templates select="mn:name"/>
3514
+ <xsl:apply-templates select="mn:fmt-name"/>
3510
3515
  <xsl:apply-templates select="mn:label"/>
3511
3516
  <xsl:apply-templates select="@obligation"/>
3512
3517
  <xsl:apply-templates select="mn:subject"/>
3513
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
3518
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
3514
3519
  </fo:block>
3515
3520
  </xsl:template>
3516
3521
 
3517
- <xsl:template match="mn:requirement/mn:name">
3522
+ <xsl:template match="mn:requirement/mn:fmt-name">
3518
3523
  <xsl:if test="normalize-space() != ''">
3519
3524
 
3520
3525
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -3550,12 +3555,12 @@
3550
3555
  <xsl:template match="mn:recommendation">
3551
3556
  <xsl:call-template name="setNamedDestination"/>
3552
3557
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3553
- <xsl:apply-templates select="mn:name"/>
3554
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3558
+ <xsl:apply-templates select="mn:fmt-name"/>
3559
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3555
3560
  </fo:block>
3556
3561
  </xsl:template>
3557
3562
 
3558
- <xsl:template match="mn:recommendation/mn:name">
3563
+ <xsl:template match="mn:recommendation/mn:fmt-name">
3559
3564
  <xsl:if test="normalize-space() != ''">
3560
3565
 
3561
3566
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -3808,11 +3813,11 @@
3808
3813
 
3809
3814
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
3810
3815
  </xsl:if>
3811
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3816
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3812
3817
  </fo:block>
3813
3818
  </xsl:template>
3814
3819
 
3815
- <xsl:template match="mn:term/mn:name">
3820
+ <xsl:template match="mn:term/mn:fmt-name">
3816
3821
  <xsl:if test="normalize-space() != ''">
3817
3822
  <!-- <xsl:variable name="level">
3818
3823
  <xsl:call-template name="getLevelTermName"/>
@@ -3831,7 +3836,7 @@
3831
3836
  <!-- origin -->
3832
3837
  <!-- modification -->
3833
3838
  <!-- ====== -->
3834
- <xsl:template match="mn:termsource" name="termsource">
3839
+ <xsl:template match="mn:fmt-termsource" name="termsource">
3835
3840
  <fo:block xsl:use-attribute-sets="termsource-style">
3836
3841
 
3837
3842
  <xsl:call-template name="refine_termsource-style"/>
@@ -3870,24 +3875,24 @@
3870
3875
  </fo:block>
3871
3876
  </xsl:template>
3872
3877
 
3873
- <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">
3878
+ <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">
3874
3879
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
3875
3880
  </xsl:template>
3876
3881
 
3877
- <xsl:template match="mn:termsource/text()">
3882
+ <xsl:template match="mn:fmt-termsource/text()">
3878
3883
  <xsl:if test="normalize-space() != ''">
3879
3884
  <xsl:value-of select="."/>
3880
3885
  </xsl:if>
3881
3886
  </xsl:template>
3882
3887
 
3883
3888
  <!-- text SOURCE: -->
3884
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
3889
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
3885
3890
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
3886
3891
  <xsl:value-of select="."/>
3887
3892
  </fo:inline>
3888
3893
  </xsl:template>
3889
3894
 
3890
- <xsl:template match="mn:origin">
3895
+ <xsl:template match="mn:fmt-origin">
3891
3896
  <xsl:call-template name="insert_basic_link">
3892
3897
  <xsl:with-param name="element">
3893
3898
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -3933,7 +3938,7 @@
3933
3938
  <!-- ====== -->
3934
3939
 
3935
3940
  <!-- Preferred, admitted, deprecated -->
3936
- <xsl:template match="mn:preferred">
3941
+ <xsl:template match="mn:fmt-preferred">
3937
3942
  <xsl:variable name="level">
3938
3943
  <xsl:call-template name="getLevel"/>
3939
3944
  </xsl:variable>
@@ -3949,15 +3954,15 @@
3949
3954
  </xsl:variable>
3950
3955
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
3951
3956
 
3952
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
3957
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
3953
3958
 
3954
3959
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
3955
3960
 
3956
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
3961
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
3957
3962
  <xsl:call-template name="setIDforNamedDestination"/>
3958
3963
  </xsl:for-each>
3959
3964
 
3960
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
3965
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
3961
3966
  </fo:block>
3962
3967
  </xsl:if>
3963
3968
 
@@ -3981,13 +3986,13 @@
3981
3986
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
3982
3987
  <xsl:template match="mn:domain"/>
3983
3988
 
3984
- <xsl:template match="mn:admitted">
3989
+ <xsl:template match="mn:fmt-admitted">
3985
3990
  <fo:block xsl:use-attribute-sets="admitted-style">
3986
3991
  <xsl:apply-templates/>
3987
3992
  </fo:block>
3988
3993
  </xsl:template>
3989
3994
 
3990
- <xsl:template match="mn:deprecates">
3995
+ <xsl:template match="mn:fmt-deprecates">
3991
3996
  <fo:block xsl:use-attribute-sets="deprecates-style">
3992
3997
  <xsl:apply-templates/>
3993
3998
  </fo:block>
@@ -4001,7 +4006,7 @@
4001
4006
 
4002
4007
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
4003
4008
  <!-- in metanorma xml preferred terms delimited by semicolons -->
4004
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
4009
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
4005
4010
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
4006
4011
  </xsl:template>
4007
4012
  <!-- End Preferred, admitted, deprecated -->
@@ -4020,16 +4025,16 @@
4020
4025
  <!-- ========== -->
4021
4026
  <!-- definition -->
4022
4027
  <!-- ========== -->
4023
- <xsl:template match="mn:definition">
4028
+ <xsl:template match="mn:fmt-definition">
4024
4029
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4025
4030
  <xsl:apply-templates/>
4026
4031
  </fo:block>
4027
4032
  </xsl:template>
4028
4033
 
4029
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
4034
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
4030
4035
  <xsl:apply-templates/>
4031
4036
  </xsl:template>
4032
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
4037
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
4033
4038
  <fo:inline> <xsl:apply-templates/></fo:inline>
4034
4039
  <fo:block/>
4035
4040
  </xsl:template>
@@ -4096,12 +4101,12 @@
4096
4101
  <xsl:call-template name="refine_termexample-style"/>
4097
4102
  <xsl:call-template name="setBlockSpanAll"/>
4098
4103
 
4099
- <xsl:apply-templates select="mn:name"/>
4100
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4104
+ <xsl:apply-templates select="mn:fmt-name"/>
4105
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4101
4106
  </fo:block>
4102
4107
  </xsl:template>
4103
4108
 
4104
- <xsl:template match="mn:termexample/mn:name">
4109
+ <xsl:template match="mn:termexample/mn:fmt-name">
4105
4110
  <xsl:if test="normalize-space() != ''">
4106
4111
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4107
4112
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -4152,7 +4157,7 @@
4152
4157
  <xsl:call-template name="refine_example-style"/>
4153
4158
 
4154
4159
  <xsl:variable name="fo_element">
4155
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>block
4160
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
4156
4161
  </xsl:variable>
4157
4162
 
4158
4163
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -4163,7 +4168,7 @@
4163
4168
 
4164
4169
  <!-- display name 'EXAMPLE' in a separate block -->
4165
4170
  <fo:block>
4166
- <xsl:apply-templates select="mn:name">
4171
+ <xsl:apply-templates select="mn:fmt-name">
4167
4172
  <xsl:with-param name="fo_element" select="$fo_element"/>
4168
4173
  </xsl:apply-templates>
4169
4174
  </fo:block>
@@ -4171,7 +4176,7 @@
4171
4176
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4172
4177
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4173
4178
  <xsl:variable name="example_body">
4174
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4179
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4175
4180
  <xsl:with-param name="fo_element" select="$fo_element"/>
4176
4181
  </xsl:apply-templates>
4177
4182
  </xsl:variable>
@@ -4198,14 +4203,14 @@
4198
4203
  <fo:list-item>
4199
4204
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
4200
4205
  <fo:block>
4201
- <xsl:apply-templates select="mn:name">
4206
+ <xsl:apply-templates select="mn:fmt-name">
4202
4207
  <xsl:with-param name="fo_element">block</xsl:with-param>
4203
4208
  </xsl:apply-templates>
4204
4209
  </fo:block>
4205
4210
  </fo:list-item-label>
4206
4211
  <fo:list-item-body start-indent="body-start()">
4207
4212
  <fo:block>
4208
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4213
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4209
4214
  <xsl:with-param name="fo_element" select="$fo_element"/>
4210
4215
  </xsl:apply-templates>
4211
4216
  </fo:block>
@@ -4218,21 +4223,21 @@
4218
4223
 
4219
4224
  <!-- display 'EXAMPLE' and first element in the same line -->
4220
4225
  <fo:block>
4221
- <xsl:apply-templates select="mn:name">
4226
+ <xsl:apply-templates select="mn:fmt-name">
4222
4227
  <xsl:with-param name="fo_element" select="$fo_element"/>
4223
4228
  </xsl:apply-templates>
4224
4229
  <fo:inline>
4225
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
4230
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
4226
4231
  <xsl:with-param name="fo_element" select="$fo_element"/>
4227
4232
  </xsl:apply-templates>
4228
4233
  </fo:inline>
4229
4234
  </fo:block>
4230
4235
 
4231
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
4236
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4232
4237
  <!-- display further elements in blocks -->
4233
4238
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4234
4239
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4235
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
4240
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4236
4241
  <xsl:with-param name="fo_element" select="'block'"/>
4237
4242
  </xsl:apply-templates>
4238
4243
  </fo:block-container>
@@ -4246,7 +4251,7 @@
4246
4251
  </xsl:template>
4247
4252
 
4248
4253
  <!-- example/name -->
4249
- <xsl:template match="mn:example/mn:name">
4254
+ <xsl:template match="mn:example/mn:fmt-name">
4250
4255
  <xsl:param name="fo_element">block</xsl:param>
4251
4256
 
4252
4257
  <xsl:choose>
@@ -4271,7 +4276,7 @@
4271
4276
  </xsl:template>
4272
4277
 
4273
4278
  <!-- table/example/name, table/tfoot//example/name -->
4274
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
4279
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
4275
4280
  <fo:inline xsl:use-attribute-sets="example-name-style">
4276
4281
  <xsl:apply-templates/>
4277
4282
  </fo:inline>
@@ -4538,7 +4543,7 @@
4538
4543
 
4539
4544
  <!-- Display table's name before table as standalone block -->
4540
4545
  <!-- $namespace = 'iso' or -->
4541
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
4546
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
4542
4547
  <xsl:call-template name="table_name_fn_display"/>
4543
4548
 
4544
4549
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -4580,7 +4585,7 @@
4580
4585
 
4581
4586
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4582
4587
 
4583
- <xsl:for-each select="mn:name">
4588
+ <xsl:for-each select="mn:fmt-name">
4584
4589
  <xsl:call-template name="setIDforNamedDestination"/>
4585
4590
  </xsl:for-each>
4586
4591
 
@@ -4610,6 +4615,10 @@
4610
4615
  <xsl:with-param name="margin-side" select="$margin-side"/>
4611
4616
  </xsl:call-template>
4612
4617
 
4618
+ <xsl:call-template name="setTableStyles">
4619
+ <xsl:with-param name="scope">table</xsl:with-param>
4620
+ </xsl:call-template>
4621
+
4613
4622
  </xsl:element>
4614
4623
  </xsl:variable>
4615
4624
 
@@ -4630,7 +4639,7 @@
4630
4639
  </xsl:attribute>
4631
4640
  </xsl:for-each>
4632
4641
 
4633
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
4642
+ <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"/>
4634
4643
  <xsl:if test="$isNoteOrFnExist = 'true'">
4635
4644
  <!-- <xsl:choose>
4636
4645
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -4686,7 +4695,7 @@
4686
4695
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
4687
4696
  </xsl:when>
4688
4697
  <xsl:otherwise>
4689
- <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 -->
4698
+ <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 -->
4690
4699
  </xsl:otherwise>
4691
4700
  </xsl:choose>
4692
4701
 
@@ -4783,7 +4792,7 @@
4783
4792
  </xsl:template>
4784
4793
 
4785
4794
  <!-- table/name-->
4786
- <xsl:template match="*[local-name()='table']/mn:name">
4795
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
4787
4796
  <xsl:param name="continued"/>
4788
4797
  <xsl:param name="cols-count"/>
4789
4798
  <xsl:if test="normalize-space() != ''">
@@ -4848,7 +4857,7 @@
4848
4857
  </xsl:template>
4849
4858
 
4850
4859
  <!-- SOURCE: ... -->
4851
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
4860
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
4852
4861
  <xsl:call-template name="termsource"/>
4853
4862
  </xsl:template>
4854
4863
 
@@ -5013,11 +5022,11 @@
5013
5022
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
5014
5023
  </xsl:template>
5015
5024
 
5016
- <xsl:template match="mn:termsource" mode="td_text">
5017
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
5025
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
5026
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
5018
5027
  </xsl:template>
5019
5028
 
5020
- <xsl:template match="mn:link" mode="td_text">
5029
+ <xsl:template match="mn:fmt-link" mode="td_text">
5021
5030
  <xsl:value-of select="@target"/>
5022
5031
  </xsl:template>
5023
5032
 
@@ -5219,12 +5228,12 @@
5219
5228
 
5220
5229
  <xsl:call-template name="refine_table-header-title-style"/>
5221
5230
 
5222
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
5231
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
5223
5232
  <xsl:with-param name="continued">true</xsl:with-param>
5224
5233
  <xsl:with-param name="cols-count" select="$cols-count"/>
5225
5234
  </xsl:apply-templates>
5226
5235
 
5227
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5236
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5228
5237
  <fo:block role="SKIP"/>
5229
5238
  </xsl:if>
5230
5239
 
@@ -5259,7 +5268,7 @@
5259
5268
  <xsl:param name="colwidths"/>
5260
5269
  <xsl:param name="colgroup"/>
5261
5270
 
5262
- <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[local-name(..) != 'name'] or ../mn:source or ../mn:p"/>
5271
+ <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"/>
5263
5272
 
5264
5273
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5265
5274
  </xsl:variable>
@@ -5300,6 +5309,12 @@
5300
5309
  </xsl:choose>
5301
5310
  </xsl:for-each>
5302
5311
 
5312
+ <xsl:for-each select="ancestor::mn:table[1]">
5313
+ <xsl:call-template name="setTableStyles">
5314
+ <xsl:with-param name="scope">table</xsl:with-param>
5315
+ </xsl:call-template>
5316
+ </xsl:for-each>
5317
+
5303
5318
  <xsl:choose>
5304
5319
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
5305
5320
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -5316,10 +5331,22 @@
5316
5331
 
5317
5332
  <fo:table-body role="SKIP">
5318
5333
  <fo:table-row role="SKIP">
5334
+ <xsl:for-each select="ancestor::mn:table[1]">
5335
+ <xsl:call-template name="setTableStyles">
5336
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5337
+ </xsl:call-template>
5338
+ </xsl:for-each>
5339
+
5319
5340
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
5320
5341
 
5321
5342
  <xsl:call-template name="refine_table-footer-cell-style"/>
5322
5343
 
5344
+ <xsl:for-each select="ancestor::mn:table[1]">
5345
+ <xsl:call-template name="setTableStyles">
5346
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5347
+ </xsl:call-template>
5348
+ </xsl:for-each>
5349
+
5323
5350
  <xsl:call-template name="setBordersTableArray"/>
5324
5351
 
5325
5352
  <!-- fn will be processed inside 'note' processing -->
@@ -5327,7 +5354,7 @@
5327
5354
  <xsl:apply-templates select="../mn:dl"/>
5328
5355
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
5329
5356
  <xsl:apply-templates select="../mn:example"/>
5330
- <xsl:apply-templates select="../mn:source"/>
5357
+ <xsl:apply-templates select="../mn:fmt-source"/>
5331
5358
 
5332
5359
  <xsl:variable name="isDisplayRowSeparator">
5333
5360
  </xsl:variable>
@@ -5516,7 +5543,12 @@
5516
5543
 
5517
5544
  <xsl:template name="setTableRowAttributes">
5518
5545
 
5519
- <xsl:call-template name="setColors"/>
5546
+ <xsl:for-each select="ancestor::mn:table[1]">
5547
+ <xsl:call-template name="setTableStyles">
5548
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5549
+ </xsl:call-template>
5550
+ </xsl:for-each>
5551
+ <xsl:call-template name="setTableStyles"/>
5520
5552
 
5521
5553
  </xsl:template> <!-- setTableRowAttributes -->
5522
5554
  <!-- ===================== -->
@@ -5569,7 +5601,13 @@
5569
5601
  </xsl:attribute>
5570
5602
  </xsl:if>
5571
5603
  <xsl:call-template name="display-align"/>
5572
- <xsl:call-template name="setColors"/>
5604
+
5605
+ <xsl:for-each select="ancestor::mn:table[1]">
5606
+ <xsl:call-template name="setTableStyles">
5607
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5608
+ </xsl:call-template>
5609
+ </xsl:for-each>
5610
+ <xsl:call-template name="setTableStyles"/>
5573
5611
  </xsl:template>
5574
5612
 
5575
5613
  <xsl:template name="display-align">
@@ -5585,7 +5623,8 @@
5585
5623
  </xsl:if>
5586
5624
  </xsl:template>
5587
5625
 
5588
- <xsl:template name="setColors">
5626
+ <xsl:template name="setTableStyles">
5627
+ <xsl:param name="scope">cell</xsl:param>
5589
5628
  <xsl:variable name="styles__">
5590
5629
  <xsl:call-template name="split">
5591
5630
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -5594,19 +5633,35 @@
5594
5633
  </xsl:variable>
5595
5634
  <xsl:variable name="quot">"</xsl:variable>
5596
5635
  <xsl:variable name="styles_">
5636
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
5637
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
5638
+ <style name="border-top">none</style>
5639
+ <style name="border-right">none</style>
5640
+ <style name="border-left">none</style>
5641
+ <style name="border-bottom">none</style>
5642
+ <style name="color">inherit</style>
5643
+ <style name="background-color">transparent</style>
5644
+ </xsl:if>
5645
+
5597
5646
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
5598
5647
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5599
5648
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5600
- <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'">
5649
+ <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'">
5601
5650
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
5602
5651
  </xsl:if>
5652
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
5653
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
5654
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
5655
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
5656
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
5657
+ </xsl:if>
5603
5658
  </xsl:for-each>
5604
5659
  </xsl:variable>
5605
5660
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
5606
5661
  <xsl:for-each select="$styles/style">
5607
5662
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
5608
5663
  </xsl:for-each>
5609
- </xsl:template> <!-- setColors -->
5664
+ </xsl:template> <!-- setTableStyles -->
5610
5665
 
5611
5666
  <!-- cell in table body, footer -->
5612
5667
  <xsl:template match="*[local-name()='td']" name="td">
@@ -5670,11 +5725,11 @@
5670
5725
 
5671
5726
  <xsl:call-template name="refine_table-note-name-style"/>
5672
5727
 
5673
- <xsl:apply-templates select="mn:name"/>
5728
+ <xsl:apply-templates select="mn:fmt-name"/>
5674
5729
 
5675
5730
  </fo:inline>
5676
5731
 
5677
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5732
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5678
5733
  </fo:block>
5679
5734
  </xsl:template> <!-- table/note -->
5680
5735
 
@@ -5813,7 +5868,7 @@
5813
5868
 
5814
5869
  <!-- footnotes for table's name rendering -->
5815
5870
  <xsl:template name="table_name_fn_display">
5816
- <xsl:for-each select="mn:name//mn:fn">
5871
+ <xsl:for-each select="mn:fmt-name//mn:fn">
5817
5872
  <xsl:variable name="reference" select="@reference"/>
5818
5873
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
5819
5874
  <fo:block margin-bottom="12pt">
@@ -6470,7 +6525,7 @@
6470
6525
  </xsl:if> -->
6471
6526
 
6472
6527
  <xsl:variable name="words">
6473
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6528
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
6474
6529
  <word>
6475
6530
  <xsl:copy-of select="."/>
6476
6531
  </word>
@@ -6529,7 +6584,7 @@
6529
6584
  </xsl:copy>
6530
6585
  </xsl:template>
6531
6586
 
6532
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6587
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6533
6588
 
6534
6589
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
6535
6590
  <xsl:variable name="formatting_tags">
@@ -6564,7 +6619,7 @@
6564
6619
  </xsl:call-template>
6565
6620
  </xsl:template>
6566
6621
 
6567
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
6622
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
6568
6623
  <xsl:variable name="link">
6569
6624
  <link_updated>
6570
6625
  <xsl:variable name="target_text">
@@ -6779,7 +6834,7 @@
6779
6834
 
6780
6835
  <xsl:call-template name="refine_multicomponent_block_style"/>
6781
6836
 
6782
- <xsl:apply-templates select="mn:name">
6837
+ <xsl:apply-templates select="mn:fmt-name">
6783
6838
  <xsl:with-param name="process">true</xsl:with-param>
6784
6839
  </xsl:apply-templates>
6785
6840
 
@@ -6962,7 +7017,7 @@
6962
7017
  </xsl:template> <!-- refine_multicomponent_block_style -->
6963
7018
 
6964
7019
  <!-- dl/name -->
6965
- <xsl:template match="mn:dl/mn:name">
7020
+ <xsl:template match="mn:dl/mn:fmt-name">
6966
7021
  <xsl:param name="process">false</xsl:param>
6967
7022
  <xsl:if test="$process = 'true'">
6968
7023
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -7380,12 +7435,12 @@
7380
7435
  <xsl:template match="mn:appendix">
7381
7436
  <xsl:call-template name="setNamedDestination"/>
7382
7437
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
7383
- <xsl:apply-templates select="mn:title"/>
7438
+ <xsl:apply-templates select="mn:fmt-title"/>
7384
7439
  </fo:block>
7385
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
7440
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
7386
7441
  </xsl:template>
7387
7442
 
7388
- <xsl:template match="mn:appendix/mn:title" priority="2">
7443
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
7389
7444
  <xsl:variable name="level">
7390
7445
  <xsl:call-template name="getLevel"/>
7391
7446
  </xsl:variable>
@@ -7398,15 +7453,15 @@
7398
7453
  <xsl:template match="mn:appendix//mn:example" priority="2">
7399
7454
  <xsl:call-template name="setNamedDestination"/>
7400
7455
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7401
- <xsl:apply-templates select="mn:name"/>
7456
+ <xsl:apply-templates select="mn:fmt-name"/>
7402
7457
  </fo:block>
7403
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
7458
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7404
7459
  </xsl:template>
7405
7460
 
7406
7461
  <xsl:attribute-set name="xref-style">
7407
7462
  </xsl:attribute-set>
7408
7463
 
7409
- <xsl:template match="mn:xref">
7464
+ <xsl:template match="mn:fmt-xref">
7410
7465
  <xsl:call-template name="insert_basic_link">
7411
7466
  <xsl:with-param name="element">
7412
7467
  <xsl:variable name="alt_text">
@@ -7426,7 +7481,7 @@
7426
7481
  </xsl:template> <!-- xref -->
7427
7482
 
7428
7483
  <!-- command between two xref points to non-standard bibitem -->
7429
- <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="."/>
7484
+ <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="."/>
7430
7485
  </xsl:template>
7431
7486
 
7432
7487
  <xsl:attribute-set name="eref-style">
@@ -7459,7 +7514,7 @@
7459
7514
  <!-- ====== -->
7460
7515
  <!-- eref -->
7461
7516
  <!-- ====== -->
7462
- <xsl:template match="mn:eref" name="eref">
7517
+ <xsl:template match="mn:fmt-eref" name="eref">
7463
7518
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7464
7519
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
7465
7520
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -7583,7 +7638,10 @@
7583
7638
 
7584
7639
  <xsl:call-template name="setNamedDestination"/>
7585
7640
 
7586
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7641
+ <fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
7642
+ <xsl:if test="not(parent::mn:references)">
7643
+ <xsl:copy-of select="@id"/>
7644
+ </xsl:if>
7587
7645
 
7588
7646
  <xsl:call-template name="setBlockSpanAll"/>
7589
7647
 
@@ -7596,28 +7654,28 @@
7596
7654
 
7597
7655
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7598
7656
 
7599
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
7657
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
7600
7658
 
7601
7659
  <xsl:call-template name="refine_note-name-style"/>
7602
7660
 
7603
7661
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7604
7662
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7605
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7663
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7606
7664
  <xsl:call-template name="append_add-style"/>
7607
7665
  </xsl:if>
7608
7666
 
7609
7667
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7610
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
7611
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7668
+ <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)]">
7669
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7612
7670
  <xsl:with-param name="skip">false</xsl:with-param>
7613
7671
  </xsl:apply-templates>
7614
7672
  </xsl:if>
7615
7673
 
7616
- <xsl:apply-templates select="mn:name"/>
7674
+ <xsl:apply-templates select="mn:fmt-name"/>
7617
7675
 
7618
7676
  </fo:inline>
7619
7677
 
7620
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7678
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7621
7679
  </fo:block>
7622
7680
  </fo:block-container>
7623
7681
  </fo:block-container>
@@ -7656,19 +7714,19 @@
7656
7714
 
7657
7715
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7658
7716
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7659
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7717
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7660
7718
  <xsl:call-template name="append_add-style"/>
7661
7719
  </xsl:if>
7662
7720
 
7663
- <xsl:apply-templates select="mn:name"/>
7721
+ <xsl:apply-templates select="mn:fmt-name"/>
7664
7722
 
7665
7723
  </fo:inline>
7666
7724
 
7667
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7725
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7668
7726
  </fo:block>
7669
7727
  </xsl:template>
7670
7728
 
7671
- <xsl:template match="mn:note/mn:name">
7729
+ <xsl:template match="mn:note/mn:fmt-name">
7672
7730
  <xsl:param name="sfx"/>
7673
7731
  <xsl:variable name="suffix">
7674
7732
  <xsl:choose>
@@ -7695,7 +7753,7 @@
7695
7753
  </xsl:if>
7696
7754
  </xsl:template>
7697
7755
 
7698
- <xsl:template match="mn:termnote/mn:name">
7756
+ <xsl:template match="mn:termnote/mn:fmt-name">
7699
7757
  <xsl:param name="sfx"/>
7700
7758
  <xsl:variable name="suffix">
7701
7759
  <xsl:choose>
@@ -7776,15 +7834,15 @@
7776
7834
 
7777
7835
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7778
7836
  <fo:block role="BlockQuote">
7779
- <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 -->
7837
+ <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 -->
7780
7838
  </fo:block>
7781
7839
  </fo:block-container>
7782
7840
  </fo:block-container>
7783
- <xsl:if test="mn:author or mn:source or mn:attribution">
7841
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
7784
7842
  <fo:block xsl:use-attribute-sets="quote-source-style">
7785
7843
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
7786
7844
  <xsl:apply-templates select="mn:author"/>
7787
- <xsl:apply-templates select="mn:source"/>
7845
+ <xsl:apply-templates select="mn:fmt-source"/>
7788
7846
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
7789
7847
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
7790
7848
  </fo:block>
@@ -7794,17 +7852,32 @@
7794
7852
  </fo:block-container>
7795
7853
  </xsl:template>
7796
7854
 
7797
- <xsl:template match="mn:source">
7855
+ <xsl:template match="mn:fmt-source">
7798
7856
  <xsl:if test="../mn:author">
7799
7857
  <xsl:text>, </xsl:text>
7800
7858
  </xsl:if>
7801
- <xsl:call-template name="insert_basic_link">
7802
- <xsl:with-param name="element">
7803
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7804
- <xsl:apply-templates/>
7805
- </fo:basic-link>
7806
- </xsl:with-param>
7807
- </xsl:call-template>
7859
+ <xsl:choose>
7860
+ <xsl:when test="not(parent::quote)">
7861
+ <fo:block>
7862
+ <xsl:call-template name="insert_basic_link">
7863
+ <xsl:with-param name="element">
7864
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7865
+ <xsl:apply-templates/>
7866
+ </fo:basic-link>
7867
+ </xsl:with-param>
7868
+ </xsl:call-template>
7869
+ </fo:block>
7870
+ </xsl:when>
7871
+ <xsl:otherwise>
7872
+ <xsl:call-template name="insert_basic_link">
7873
+ <xsl:with-param name="element">
7874
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7875
+ <xsl:apply-templates/>
7876
+ </fo:basic-link>
7877
+ </xsl:with-param>
7878
+ </xsl:call-template>
7879
+ </xsl:otherwise>
7880
+ </xsl:choose>
7808
7881
  </xsl:template>
7809
7882
 
7810
7883
  <xsl:template match="mn:author">
@@ -7880,7 +7953,7 @@
7880
7953
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
7881
7954
  <xsl:choose>
7882
7955
  <!-- skip figure/name/fn -->
7883
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7956
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7884
7957
  <xsl:otherwise>
7885
7958
  <xsl:element name="figure" namespace="{$namespace_full}">
7886
7959
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -8076,17 +8149,17 @@
8076
8149
 
8077
8150
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8078
8151
 
8079
- <xsl:for-each select="mn:name"> <!-- set context -->
8152
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8080
8153
  <xsl:call-template name="setIDforNamedDestination"/>
8081
8154
  </xsl:for-each>
8082
8155
 
8083
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
8156
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
8084
8157
  </fo:block>
8085
8158
 
8086
8159
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
8087
8160
  <xsl:call-template name="showFigureKey"/>
8088
8161
  </xsl:if>
8089
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
8162
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
8090
8163
 
8091
8164
  </fo:block-container>
8092
8165
  </xsl:template>
@@ -8112,9 +8185,9 @@
8112
8185
  <xsl:template match="mn:figure[@class = 'pseudocode']">
8113
8186
  <xsl:call-template name="setNamedDestination"/>
8114
8187
  <fo:block id="{@id}">
8115
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8188
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8116
8189
  </fo:block>
8117
- <xsl:apply-templates select="mn:name"/>
8190
+ <xsl:apply-templates select="mn:fmt-name"/>
8118
8191
  </xsl:template>
8119
8192
 
8120
8193
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -8125,7 +8198,7 @@
8125
8198
 
8126
8199
  <!-- SOURCE: ... -->
8127
8200
  <!-- figure/source -->
8128
- <xsl:template match="mn:figure/mn:source" priority="2">
8201
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
8129
8202
  <xsl:call-template name="termsource"/>
8130
8203
  </xsl:template>
8131
8204
 
@@ -8135,7 +8208,7 @@
8135
8208
  <xsl:variable name="isAdded" select="../@added"/>
8136
8209
  <xsl:variable name="isDeleted" select="../@deleted"/>
8137
8210
  <xsl:choose>
8138
- <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) -->
8211
+ <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) -->
8139
8212
  <fo:inline padding-left="1mm" padding-right="1mm">
8140
8213
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
8141
8214
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8156,13 +8229,26 @@
8156
8229
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8157
8230
 
8158
8231
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
8159
- <xsl:attribute name="width">100%</xsl:attribute>
8232
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8233
+ <xsl:choose>
8234
+ <xsl:when test="@width and not(@height)">
8235
+ <xsl:attribute name="width">100%</xsl:attribute>
8236
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8237
+ </xsl:when>
8238
+ <xsl:when test="@height and not(@width)">
8239
+ <xsl:attribute name="height">100%</xsl:attribute>
8240
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
8241
+ </xsl:when>
8242
+ <xsl:when test="not(@width) and not(@height)">
8243
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8244
+ </xsl:when>
8245
+ </xsl:choose>
8246
+
8160
8247
  <xsl:if test="normalize-space($logo_width) != ''">
8161
8248
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8162
8249
  </xsl:if>
8163
- <xsl:attribute name="content-height">100%</xsl:attribute>
8164
8250
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8165
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8251
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
8166
8252
  </xsl:if>
8167
8253
 
8168
8254
  <xsl:variable name="width">
@@ -8451,7 +8537,7 @@
8451
8537
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
8452
8538
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
8453
8539
 
8454
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
8540
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
8455
8541
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
8456
8542
  <xsl:param name="name"/>
8457
8543
 
@@ -8461,8 +8547,8 @@
8461
8547
 
8462
8548
  <xsl:variable name="alt-text">
8463
8549
  <xsl:choose>
8464
- <xsl:when test="normalize-space(../mn:name) != ''">
8465
- <xsl:value-of select="../mn:name"/>
8550
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
8551
+ <xsl:value-of select="../mn:fmt-name"/>
8466
8552
  </xsl:when>
8467
8553
  <xsl:when test="normalize-space($name) != ''">
8468
8554
  <xsl:value-of select="$name"/>
@@ -8471,7 +8557,7 @@
8471
8557
  </xsl:choose>
8472
8558
  </xsl:variable>
8473
8559
 
8474
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
8560
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
8475
8561
 
8476
8562
  <xsl:choose>
8477
8563
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -8520,9 +8606,9 @@
8520
8606
  <fo:table-cell column-number="2">
8521
8607
  <fo:block>
8522
8608
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
8523
- <xsl:if test="../mn:name/mn:bookmark">
8609
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
8524
8610
  <fo:block line-height="0" font-size="0">
8525
- <xsl:for-each select="../mn:name/mn:bookmark">
8611
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
8526
8612
  <xsl:call-template name="bookmark"/>
8527
8613
  </xsl:for-each>
8528
8614
  </fo:block>
@@ -8762,7 +8848,7 @@
8762
8848
 
8763
8849
  <!-- image with svg and emf -->
8764
8850
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
8765
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8851
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8766
8852
  <xsl:for-each select="*[local-name() = 'svg']">
8767
8853
  <xsl:call-template name="image_svg">
8768
8854
  <xsl:with-param name="name" select="$name"/>
@@ -8779,7 +8865,7 @@
8779
8865
 
8780
8866
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
8781
8867
  <xsl:variable name="svg_content" select="document(@src)"/>
8782
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8868
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8783
8869
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
8784
8870
  <xsl:call-template name="image_svg">
8785
8871
  <xsl:with-param name="name" select="$name"/>
@@ -8902,7 +8988,7 @@
8902
8988
  <xsl:template match="mn:emf"/>
8903
8989
 
8904
8990
  <!-- figure/name -->
8905
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
8991
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
8906
8992
  <xsl:if test="normalize-space() != ''">
8907
8993
  <fo:block xsl:use-attribute-sets="figure-name-style">
8908
8994
 
@@ -8974,25 +9060,25 @@
8974
9060
  <fo:block-container margin-left="0mm" role="SKIP">
8975
9061
  <xsl:call-template name="setNamedDestination"/>
8976
9062
  <fo:block id="{@id}">
8977
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
9063
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
8978
9064
  </fo:block>
8979
9065
  </fo:block-container>
8980
9066
  </fo:block-container>
8981
9067
  </xsl:template>
8982
9068
 
8983
- <xsl:template match="mn:formula/mn:dt/mn:stem">
9069
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
8984
9070
  <fo:inline>
8985
9071
  <xsl:apply-templates/>
8986
9072
  </fo:inline>
8987
9073
  </xsl:template>
8988
9074
 
8989
- <xsl:template match="mn:admitted/mn:stem">
9075
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
8990
9076
  <fo:inline>
8991
9077
  <xsl:apply-templates/>
8992
9078
  </fo:inline>
8993
9079
  </xsl:template>
8994
9080
 
8995
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
9081
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
8996
9082
  <!-- https://github.com/metanorma/isodoc/issues/607
8997
9083
  <xsl:if test="normalize-space() != ''">
8998
9084
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -9001,7 +9087,7 @@
9001
9087
  </xsl:template>
9002
9088
 
9003
9089
  <!-- stem inside formula with name (with formula's number) -->
9004
- <xsl:template match="mn:formula[mn:name]/mn:stem">
9090
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
9005
9091
  <fo:block xsl:use-attribute-sets="formula-style">
9006
9092
 
9007
9093
  <fo:table table-layout="fixed" width="100%">
@@ -9021,13 +9107,13 @@
9021
9107
 
9022
9108
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9023
9109
 
9024
- <xsl:for-each select="../mn:name">
9110
+ <xsl:for-each select="../mn:fmt-name">
9025
9111
  <xsl:call-template name="setIDforNamedDestination"/>
9026
9112
  </xsl:for-each>
9027
9113
 
9028
9114
  <xsl:call-template name="refine_formula-stem-number-style"/>
9029
9115
 
9030
- <xsl:apply-templates select="../mn:name"/>
9116
+ <xsl:apply-templates select="../mn:fmt-name"/>
9031
9117
  </fo:block>
9032
9118
  </fo:table-cell>
9033
9119
  </fo:table-row>
@@ -9037,7 +9123,7 @@
9037
9123
  </xsl:template>
9038
9124
 
9039
9125
  <!-- stem inside formula without name (without formula's number) -->
9040
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
9126
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
9041
9127
  <fo:block xsl:use-attribute-sets="formula-style">
9042
9128
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9043
9129
  <xsl:apply-templates/>
@@ -9391,7 +9477,7 @@
9391
9477
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
9392
9478
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
9393
9479
  -->
9394
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9480
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9395
9481
  <fo:inline xsl:use-attribute-sets="mathml-style">
9396
9482
 
9397
9483
  <xsl:call-template name="refine_mathml-style"/>
@@ -9658,7 +9744,7 @@
9658
9744
 
9659
9745
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
9660
9746
 
9661
- <xsl:apply-templates select="mn:name">
9747
+ <xsl:apply-templates select="mn:fmt-name">
9662
9748
  <xsl:with-param name="process">true</xsl:with-param>
9663
9749
  </xsl:apply-templates>
9664
9750
 
@@ -9704,7 +9790,7 @@
9704
9790
 
9705
9791
  <xsl:call-template name="refine_list-style"/>
9706
9792
 
9707
- <xsl:if test="mn:name">
9793
+ <xsl:if test="mn:fmt-name">
9708
9794
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
9709
9795
  </xsl:if>
9710
9796
 
@@ -9719,7 +9805,7 @@
9719
9805
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
9720
9806
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
9721
9807
 
9722
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
9808
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
9723
9809
  <xsl:param name="process">false</xsl:param>
9724
9810
  <xsl:if test="$process = 'true'">
9725
9811
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -9846,7 +9932,7 @@
9846
9932
  -->
9847
9933
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
9848
9934
  <!-- fn in text -->
9849
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
9935
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
9850
9936
  <xsl:param name="footnote_body_from_table">false</xsl:param>
9851
9937
 
9852
9938
  <!-- list of unique footnotes -->
@@ -9970,7 +10056,7 @@
9970
10056
  <!-- commented:
9971
10057
  .//mn:bibitem[ancestor::mn:references]/mn:note |
9972
10058
  because 'fn' there is in biblio-tag -->
9973
- <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])]">
10059
+ <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])]">
9974
10060
  <!-- copy unique fn -->
9975
10061
  <fn gen_id="{generate-id(.)}">
9976
10062
  <xsl:copy-of select="@*"/>
@@ -10048,7 +10134,7 @@
10048
10134
  <xsl:with-param name="sep"> — </xsl:with-param>
10049
10135
  </xsl:call-template>
10050
10136
 
10051
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10137
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10052
10138
  </fo:block>
10053
10139
 
10054
10140
  </xsl:template>
@@ -10072,7 +10158,7 @@
10072
10158
  </xsl:otherwise>
10073
10159
  </xsl:choose> -->
10074
10160
  <xsl:variable name="name">
10075
- <xsl:apply-templates select="mn:name"/>
10161
+ <xsl:apply-templates select="mn:fmt-name"/>
10076
10162
  </xsl:variable>
10077
10163
  <xsl:copy-of select="$name"/>
10078
10164
  <xsl:if test="normalize-space($name) != ''">
@@ -10080,7 +10166,7 @@
10080
10166
  </xsl:if>
10081
10167
  </xsl:template>
10082
10168
 
10083
- <xsl:template match="mn:admonition/mn:name">
10169
+ <xsl:template match="mn:admonition/mn:fmt-name">
10084
10170
  <xsl:apply-templates/>
10085
10171
  </xsl:template>
10086
10172
 
@@ -10201,10 +10287,10 @@
10201
10287
  <xsl:call-template name="setNamedDestination"/>
10202
10288
  <fo:block id="{@id}"/>
10203
10289
 
10204
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
10290
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10205
10291
 
10206
10292
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10207
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
10293
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10208
10294
  </fo:block>
10209
10295
  </xsl:template> <!-- references -->
10210
10296
 
@@ -10223,8 +10309,8 @@
10223
10309
  </xsl:template> <!-- bibitem -->
10224
10310
 
10225
10311
  <!-- Bibliography (non-normative references) -->
10226
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
10227
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10312
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
10313
+ <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 --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10228
10314
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
10229
10315
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
10230
10316
  <xsl:call-template name="setNamedDestination"/>
@@ -10276,7 +10362,7 @@
10276
10362
  </fo:list-item>
10277
10363
  </xsl:otherwise>
10278
10364
  </xsl:choose>
10279
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
10365
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
10280
10366
  <xsl:with-param name="skip">false</xsl:with-param>
10281
10367
  </xsl:apply-templates>
10282
10368
  </xsl:template>
@@ -10293,8 +10379,26 @@
10293
10379
  </xsl:apply-templates>
10294
10380
  <xsl:apply-templates select="mn:formattedref"/>
10295
10381
  <!-- end bibitem processing -->
10382
+
10383
+ <xsl:call-template name="processBibliographyNote"/>
10296
10384
  </xsl:template> <!-- processBibitem (bibitem) -->
10297
10385
 
10386
+ <xsl:template name="processBibliographyNote">
10387
+ <xsl:if test="self::mn:note">
10388
+ <xsl:variable name="note_node">
10389
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
10390
+ <xsl:copy> <!-- skip @id -->
10391
+ <xsl:copy-of select="node()"/>
10392
+ </xsl:copy>
10393
+ </xsl:element>
10394
+ </xsl:variable>
10395
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
10396
+ <xsl:call-template name="note"/>
10397
+ </xsl:for-each> -->
10398
+ <xsl:call-template name="note"/>
10399
+ </xsl:if>
10400
+ </xsl:template>
10401
+
10298
10402
  <xsl:template match="mn:title" mode="title">
10299
10403
  <fo:inline><xsl:apply-templates/></fo:inline>
10300
10404
  </xsl:template>
@@ -10520,7 +10624,8 @@
10520
10624
  </xsl:copy>
10521
10625
  </xsl:template>
10522
10626
 
10523
- <xsl:template match="mn:xref" mode="index_add_id">
10627
+ <xsl:template match="mn:xref" mode="index_add_id"/>
10628
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
10524
10629
  <xsl:param name="docid"/>
10525
10630
  <xsl:variable name="id">
10526
10631
  <xsl:call-template name="generateIndexXrefId">
@@ -10562,7 +10667,7 @@
10562
10667
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
10563
10668
  <xsl:copy>
10564
10669
  <xsl:apply-templates select="@*" mode="index_update"/>
10565
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
10670
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
10566
10671
  </xsl:copy>
10567
10672
  </xsl:template>
10568
10673
 
@@ -10583,11 +10688,11 @@
10583
10688
  <xsl:value-of select="."/>
10584
10689
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
10585
10690
  </xsl:when>
10586
- <xsl:when test="self::* and local-name(.) = 'xref'">
10691
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
10587
10692
  <xsl:variable name="id" select="@id"/>
10588
10693
 
10589
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
10590
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
10694
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
10695
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
10591
10696
 
10592
10697
  <xsl:variable name="pages_">
10593
10698
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -10683,18 +10788,18 @@
10683
10788
  <xsl:variable name="item_number">
10684
10789
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
10685
10790
  </xsl:variable>
10686
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
10791
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
10687
10792
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
10688
10793
  </xsl:template>
10689
10794
 
10690
- <xsl:template match="mn:indexsect/mn:title" priority="4">
10795
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
10691
10796
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
10692
10797
  <!-- Index -->
10693
10798
  <xsl:apply-templates/>
10694
10799
  </fo:block>
10695
10800
  </xsl:template>
10696
10801
 
10697
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
10802
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
10698
10803
  <!-- Letter A, B, C, ... -->
10699
10804
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
10700
10805
  <xsl:apply-templates/>
@@ -10735,12 +10840,12 @@
10735
10840
  <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"/>
10736
10841
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
10737
10842
  <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"/> -->
10738
- <xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-review-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-review-end][@source = $bookmark_id]">
10843
+ <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]">
10739
10844
  <!-- skip here, see the template 'fmt-review-start' -->
10740
10845
  </xsl:when>
10741
10846
  <xsl:otherwise>
10742
10847
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
10743
- <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-review-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-review-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
10848
+ <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>
10744
10849
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
10745
10850
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
10746
10851
  </xsl:otherwise>
@@ -10839,6 +10944,67 @@
10839
10944
  <!-- End Form's elements processing -->
10840
10945
  <!-- =================== -->
10841
10946
 
10947
+ <xsl:attribute-set name="toc-style">
10948
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
10949
+ <xsl:attribute name="line-height">115%</xsl:attribute>
10950
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10951
+ </xsl:attribute-set>
10952
+
10953
+ <xsl:template name="refine_toc-style">
10954
+ </xsl:template>
10955
+
10956
+ <xsl:attribute-set name="toc-title-style">
10957
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
10958
+ <xsl:attribute name="margin-bottom">15.5pt</xsl:attribute>
10959
+ <xsl:attribute name="role">H1</xsl:attribute>
10960
+ </xsl:attribute-set>
10961
+
10962
+ <xsl:attribute-set name="toc-title-page-style">
10963
+ </xsl:attribute-set> <!-- toc-title-page-style -->
10964
+
10965
+ <xsl:attribute-set name="toc-item-block-style">
10966
+ </xsl:attribute-set>
10967
+
10968
+ <xsl:template name="refine_toc-item-block-style">
10969
+ </xsl:template>
10970
+
10971
+ <xsl:attribute-set name="toc-item-style">
10972
+ <xsl:attribute name="role">TOCI</xsl:attribute>
10973
+ </xsl:attribute-set> <!-- END: toc-item-style -->
10974
+
10975
+ <xsl:template name="refine_toc-item-style">
10976
+ <xsl:if test="@level = 1">
10977
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
10978
+ </xsl:if>
10979
+ </xsl:template> <!-- END: refine_toc-item-style -->
10980
+
10981
+ <xsl:attribute-set name="toc-leader-style">
10982
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
10983
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
10984
+
10985
+ <xsl:attribute-set name="toc-pagenumber-style">
10986
+ </xsl:attribute-set>
10987
+
10988
+ <!-- List of Figures, Tables -->
10989
+ <xsl:attribute-set name="toc-listof-title-style">
10990
+ <xsl:attribute name="role">TOCI</xsl:attribute>
10991
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
10992
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
10993
+ </xsl:attribute-set>
10994
+
10995
+ <xsl:attribute-set name="toc-listof-item-block-style">
10996
+ <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
10997
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10998
+ </xsl:attribute-set>
10999
+
11000
+ <xsl:attribute-set name="toc-listof-item-style">
11001
+ <xsl:attribute name="role">TOCI</xsl:attribute>
11002
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
11003
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
11004
+ <xsl:attribute name="text-indent">-12mm</xsl:attribute>
11005
+ <xsl:attribute name="role">SKIP</xsl:attribute>
11006
+ </xsl:attribute-set>
11007
+
10842
11008
  <xsl:template name="processPrefaceSectionsDefault_Contents">
10843
11009
  <xsl:variable name="nodes_preface_">
10844
11010
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -10904,7 +11070,7 @@
10904
11070
 
10905
11071
  <xsl:template name="processTables_Contents">
10906
11072
  <mnx:tables>
10907
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
11073
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
10908
11074
  <xsl:choose>
10909
11075
  <xsl:when test="mn:fmt-name">
10910
11076
  <xsl:variable name="fmt_name">
@@ -10926,7 +11092,7 @@
10926
11092
 
10927
11093
  <xsl:template name="processFigures_Contents">
10928
11094
  <mnx:figures>
10929
- <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) != '']">
11095
+ <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) != '']">
10930
11096
  <xsl:choose>
10931
11097
  <xsl:when test="mn:fmt-name">
10932
11098
  <xsl:variable name="fmt_name">
@@ -10955,7 +11121,7 @@
10955
11121
 
10956
11122
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
10957
11123
 
10958
- <xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name | mn:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name" mode="contents">
11124
+ <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">
10959
11125
  <xsl:apply-templates mode="contents"/>
10960
11126
  <xsl:text> </xsl:text>
10961
11127
  </xsl:template>
@@ -10967,7 +11133,7 @@
10967
11133
  </xsl:if>
10968
11134
  </xsl:template>
10969
11135
 
10970
- <xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name | mn:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name" mode="bookmarks">
11136
+ <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">
10971
11137
  <xsl:apply-templates mode="bookmarks"/>
10972
11138
  <xsl:text> </xsl:text>
10973
11139
  </xsl:template>
@@ -10978,7 +11144,7 @@
10978
11144
  </xsl:if>
10979
11145
  </xsl:template>
10980
11146
 
10981
- <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">
11147
+ <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">
10982
11148
  <xsl:value-of select="."/>
10983
11149
  </xsl:template>
10984
11150
 
@@ -10988,7 +11154,7 @@
10988
11154
  </xsl:if>
10989
11155
  </xsl:template>
10990
11156
 
10991
- <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">
11157
+ <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">
10992
11158
  <xsl:value-of select="."/>
10993
11159
  </xsl:template>
10994
11160
 
@@ -11449,7 +11615,7 @@
11449
11615
  <xsl:value-of select="."/>
11450
11616
  </xsl:template>
11451
11617
 
11452
- <xsl:template match="mn:review" mode="contents_item"/>
11618
+ <xsl:template match="mn:annotation" mode="contents_item"/>
11453
11619
 
11454
11620
  <xsl:template match="mn:tab" mode="contents_item">
11455
11621
  <xsl:text> </xsl:text>
@@ -11604,7 +11770,7 @@
11604
11770
  <xsl:apply-templates/>
11605
11771
  </xsl:template>
11606
11772
 
11607
- <xsl:template match="mn:toc//mn:xref" priority="3">
11773
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
11608
11774
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11609
11775
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11610
11776
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -11672,8 +11838,8 @@
11672
11838
  <xsl:apply-templates mode="toc_table_width"/>
11673
11839
  </xsl:template>
11674
11840
 
11675
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
11676
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
11841
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
11842
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
11677
11843
 
11678
11844
  <xsl:template match="mn:li" mode="toc_table_width">
11679
11845
  <mn:tr>
@@ -11681,7 +11847,7 @@
11681
11847
  </mn:tr>
11682
11848
  </xsl:template>
11683
11849
 
11684
- <xsl:template match="mn:xref" mode="toc_table_width">
11850
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
11685
11851
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11686
11852
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11687
11853
  <xsl:for-each select="mn:tab">
@@ -11760,10 +11926,10 @@
11760
11926
 
11761
11927
  </xsl:template> <!-- tab -->
11762
11928
 
11763
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
11764
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
11929
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
11930
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
11765
11931
 
11766
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
11932
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
11767
11933
  <xsl:attribute name="padding-right">6mm</xsl:attribute>
11768
11934
  </xsl:template>
11769
11935
 
@@ -11778,13 +11944,13 @@
11778
11944
  </xsl:template>
11779
11945
 
11780
11946
  <xsl:variable name="reviews_">
11781
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
11947
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
11782
11948
  <xsl:copy>
11783
11949
  <xsl:copy-of select="@from"/>
11784
11950
  <xsl:copy-of select="@id"/>
11785
11951
  </xsl:copy>
11786
11952
  </xsl:for-each>
11787
- <xsl:for-each select="//mn:fmt-review-start[@source]">
11953
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
11788
11954
  <xsl:copy>
11789
11955
  <xsl:copy-of select="@source"/>
11790
11956
  <xsl:copy-of select="@id"/>
@@ -11798,7 +11964,7 @@
11798
11964
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11799
11965
  <xsl:variable name="curr_id" select="@id"/>
11800
11966
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
11801
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
11967
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
11802
11968
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
11803
11969
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11804
11970
  <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>
@@ -11813,7 +11979,7 @@
11813
11979
 
11814
11980
  <!-- document text (not figures, or tables) footnotes -->
11815
11981
  <xsl:variable name="reviews_container_">
11816
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
11982
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
11817
11983
  <xsl:variable name="update_xml_step1">
11818
11984
  <xsl:apply-templates select="." mode="update_xml_step1"/>
11819
11985
  </xsl:variable>
@@ -11822,10 +11988,10 @@
11822
11988
  </xsl:variable>
11823
11989
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
11824
11990
 
11825
- <xsl:template match="mn:review-container"/>
11991
+ <xsl:template match="mn:annotation-container"/>
11826
11992
 
11827
11993
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
11828
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11994
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11829
11995
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
11830
11996
  <xsl:if test="$isGenerateTableIF = 'false'">
11831
11997
  <xsl:choose>
@@ -11845,7 +12011,7 @@
11845
12011
  </xsl:template>
11846
12012
 
11847
12013
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
11848
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12014
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11849
12015
  <!-- comment 2019-11-29 -->
11850
12016
  <!-- <fo:block font-weight="bold">Review:</fo:block>
11851
12017
  <xsl:apply-templates /> -->
@@ -11901,7 +12067,7 @@
11901
12067
  </xsl:template>
11902
12068
 
11903
12069
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
11904
- <xsl:template match="mn:review[@type = 'other']"/>
12070
+ <xsl:template match="mn:annotation[@type = 'other']"/>
11905
12071
 
11906
12072
  <!-- ============ -->
11907
12073
  <!-- errata -->
@@ -12294,9 +12460,12 @@
12294
12460
  <xsl:choose>
12295
12461
  <xsl:when test="mn:fmt-title">
12296
12462
  <xsl:variable name="fmt_title_section">
12297
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
12463
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
12298
12464
  </xsl:variable>
12299
12465
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
12466
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
12467
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
12468
+ </xsl:if>
12300
12469
  </xsl:when>
12301
12470
  <xsl:otherwise>
12302
12471
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -12309,6 +12478,9 @@
12309
12478
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
12310
12479
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
12311
12480
  </xsl:when>
12481
+ <xsl:when test="mn:fmt-title/mn:tab">
12482
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
12483
+ </xsl:when>
12312
12484
  <xsl:when test="mn:fmt-title">
12313
12485
  <xsl:copy-of select="mn:fmt-title/node()"/>
12314
12486
  </xsl:when>
@@ -12450,10 +12622,10 @@
12450
12622
 
12451
12623
  </fo:block>
12452
12624
 
12453
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
12625
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
12454
12626
 
12455
12627
  <fo:block>
12456
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
12628
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
12457
12629
  </fo:block>
12458
12630
  </xsl:otherwise>
12459
12631
  </xsl:choose>
@@ -12462,7 +12634,7 @@
12462
12634
  <xsl:template name="refine_annex_style">
12463
12635
  </xsl:template>
12464
12636
 
12465
- <xsl:template match="mn:name/text()">
12637
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
12466
12638
  <!-- 0xA0 to space replacement -->
12467
12639
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
12468
12640
  </xsl:template>
@@ -12518,28 +12690,28 @@
12518
12690
  <xsl:template match="mn:amend"/>
12519
12691
 
12520
12692
  <!-- fmt-title renamed to title in update_xml_step1 -->
12521
- <xsl:template match="mn:fmt-title"/>
12693
+ <!-- <xsl:template match="mn:fmt-title" /> -->
12522
12694
 
12523
12695
  <!-- fmt-name renamed to name in update_xml_step1 -->
12524
- <xsl:template match="mn:fmt-name"/>
12696
+ <!-- <xsl:template match="mn:fmt-name" /> -->
12525
12697
 
12526
12698
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
12527
- <xsl:template match="mn:fmt-preferred"/>
12699
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
12528
12700
 
12529
12701
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
12530
- <xsl:template match="mn:fmt-admitted"/>
12702
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
12531
12703
 
12532
12704
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
12533
- <xsl:template match="mn:fmt-deprecates"/>
12705
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
12534
12706
 
12535
12707
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
12536
- <xsl:template match="mn:fmt-definition"/>
12708
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
12537
12709
 
12538
12710
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
12539
- <xsl:template match="mn:fmt-termsource"/>
12711
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
12540
12712
 
12541
12713
  <!-- fmt-source renamed to source in update_xml_step1 -->
12542
- <xsl:template match="mn:fmt-source"/>
12714
+ <!-- <xsl:template match="mn:fmt-source" /> -->
12543
12715
 
12544
12716
  <xsl:template match="mn:semx">
12545
12717
  <xsl:apply-templates/>
@@ -12984,12 +13156,12 @@
12984
13156
  <xsl:when test="ancestor::mn:preface">
12985
13157
  <xsl:value-of select="$level_total - 2"/>
12986
13158
  </xsl:when>
12987
- <xsl:when test="ancestor::mn:sections and self::mn:title">
13159
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
12988
13160
  <!-- determine 'depth' depends on upper clause with title/@depth -->
12989
13161
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
12990
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
13162
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
12991
13163
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
12992
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
13164
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
12993
13165
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
12994
13166
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
12995
13167
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -13005,8 +13177,8 @@
13005
13177
  </xsl:otherwise>
13006
13178
  </xsl:choose>
13007
13179
  </xsl:when>
13008
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
13009
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
13180
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
13181
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
13010
13182
  <xsl:choose>
13011
13183
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
13012
13184
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -13017,7 +13189,7 @@
13017
13189
  </xsl:choose>
13018
13190
  </xsl:when>
13019
13191
  <xsl:when test="ancestor::mn:sections">
13020
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
13192
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
13021
13193
  <xsl:choose>
13022
13194
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13023
13195
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13033,8 +13205,8 @@
13033
13205
  <xsl:when test="parent::mn:annex">
13034
13206
  <xsl:value-of select="$level_total - 1"/>
13035
13207
  </xsl:when>
13036
- <xsl:when test="ancestor::mn:annex and self::mn:title">
13037
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
13208
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
13209
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
13038
13210
  <xsl:choose>
13039
13211
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13040
13212
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13067,7 +13239,7 @@
13067
13239
  </xsl:when>
13068
13240
  <xsl:otherwise>
13069
13241
  <xsl:variable name="title_level_">
13070
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
13242
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
13071
13243
  <xsl:call-template name="getLevel"/>
13072
13244
  </xsl:for-each>
13073
13245
  </xsl:variable>
@@ -13144,15 +13316,17 @@
13144
13316
  </xsl:template>
13145
13317
 
13146
13318
  <xsl:template name="setNamedDestination">
13147
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13148
- <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'">
13149
- <fox:destination internal-destination="{@id}"/>
13150
- </xsl:if>
13151
- <xsl:for-each select=". | mn:title | mn:name">
13152
- <xsl:if test="@named_dest">
13153
- <fox:destination internal-destination="{@named_dest}"/>
13319
+ <xsl:if test="$isGenerateTableIF = 'false'">
13320
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13321
+ <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'">
13322
+ <fox:destination internal-destination="{@id}"/>
13154
13323
  </xsl:if>
13155
- </xsl:for-each>
13324
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
13325
+ <xsl:if test="@named_dest">
13326
+ <fox:destination internal-destination="{@named_dest}"/>
13327
+ </xsl:if>
13328
+ </xsl:for-each>
13329
+ </xsl:if>
13156
13330
  </xsl:template>
13157
13331
 
13158
13332
  <xsl:template name="add-letter-spacing">
@@ -13500,7 +13674,7 @@
13500
13674
  </xsl:when>
13501
13675
  <xsl:otherwise>
13502
13676
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
13503
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13677
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13504
13678
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13505
13679
  </xsl:if>
13506
13680
  <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">
@@ -13534,7 +13708,7 @@
13534
13708
  </fo:block>
13535
13709
  </fo:block-container>
13536
13710
  </fo:inline-container>
13537
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
13711
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
13538
13712
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13539
13713
  </xsl:if>
13540
13714
  </xsl:otherwise>