metanorma-cc 2.6.9 → 2.6.10

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,6 +277,72 @@
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
348
  <fo:block role="TOCI" margin-top="6pt" keep-with-next="always">
@@ -371,12 +379,12 @@
371
379
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="3">
372
380
  <fo:block-container font-weight="bold" line-height="115%" role="SKIP">
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
 
@@ -441,7 +449,7 @@
441
449
  </fo:block-container>
442
450
  </xsl:template>
443
451
 
444
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
452
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
445
453
  <!-- <xsl:variable name="title-toc">
446
454
  <xsl:call-template name="getTitle">
447
455
  <xsl:with-param name="name" select="'title-toc'"/>
@@ -514,7 +522,7 @@
514
522
  </fo:block>
515
523
  </xsl:template>
516
524
 
517
- <xsl:template match="mn:title" name="title">
525
+ <xsl:template match="mn:fmt-title" name="title">
518
526
 
519
527
  <xsl:variable name="level">
520
528
  <xsl:call-template name="getLevel"/>
@@ -561,7 +569,7 @@
561
569
  <xsl:variable name="element-name">
562
570
  <xsl:choose>
563
571
  <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 -->
572
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
565
573
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
566
574
  <xsl:when test="@id = 'boilerplate-name'">fo:inline</xsl:when>
567
575
  <xsl:otherwise>fo:block</xsl:otherwise>
@@ -595,7 +603,7 @@
595
603
  </xsl:if>
596
604
  </xsl:template>
597
605
 
598
- <xsl:template match="mn:xref" priority="2">
606
+ <xsl:template match="mn:fmt-xref" priority="2">
599
607
  <xsl:call-template name="insert_basic_link">
600
608
  <xsl:with-param name="element">
601
609
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
@@ -802,10 +810,6 @@
802
810
  <title-part lang="ru">
803
811
  </title-part>
804
812
  <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
813
  </xsl:variable>
810
814
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
811
815
 
@@ -1258,7 +1262,8 @@
1258
1262
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
1259
1263
 
1260
1264
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
1261
- <xsl:element name="stem" namespace="{$namespace_full}">
1265
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1266
+ <xsl:copy>
1262
1267
  <xsl:copy-of select="@*"/>
1263
1268
  <xsl:choose>
1264
1269
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1282,7 +1287,8 @@
1282
1287
  </xsl:choose>
1283
1288
  </xsl:otherwise>
1284
1289
  </xsl:choose>
1285
- </xsl:element>
1290
+ </xsl:copy>
1291
+ <!-- </xsl:element> -->
1286
1292
  </xsl:template>
1287
1293
 
1288
1294
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -1444,12 +1450,14 @@
1444
1450
  </xsl:template>
1445
1451
 
1446
1452
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
1447
- <xsl:element name="title" namespace="{$namespace_full}">
1453
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
1454
+ <xsl:copy>
1448
1455
  <xsl:copy-of select="@*"/>
1449
1456
  <xsl:call-template name="addNamedDestinationAttribute"/>
1450
1457
 
1451
1458
  <xsl:apply-templates mode="update_xml_step1"/>
1452
- </xsl:element>
1459
+ </xsl:copy>
1460
+ <!-- </xsl:element> -->
1453
1461
  </xsl:template>
1454
1462
 
1455
1463
  <xsl:template name="addNamedDestinationAttribute">
@@ -1461,12 +1469,14 @@
1461
1469
  <xsl:apply-templates mode="update_xml_step1"/>
1462
1470
  </xsl:when>
1463
1471
  <xsl:otherwise>
1464
- <xsl:element name="name" namespace="{$namespace_full}">
1472
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
1473
+ <xsl:copy>
1465
1474
  <xsl:copy-of select="@*"/>
1466
1475
  <xsl:call-template name="addNamedDestinationAttribute"/>
1467
1476
 
1468
1477
  <xsl:apply-templates mode="update_xml_step1"/>
1469
- </xsl:element>
1478
+ </xsl:copy>
1479
+ <!-- </xsl:element> -->
1470
1480
  </xsl:otherwise>
1471
1481
  </xsl:choose>
1472
1482
  </xsl:template>
@@ -1481,7 +1491,7 @@
1481
1491
  <xsl:apply-templates mode="update_xml_step1"/>
1482
1492
  </xsl:template>
1483
1493
  <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}">
1494
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
1485
1495
  <xsl:copy-of select="@*"/>
1486
1496
  <xsl:apply-templates mode="update_xml_step1"/>
1487
1497
  </xsl:element>
@@ -1491,7 +1501,7 @@
1491
1501
  <xsl:apply-templates mode="update_xml_step1"/>
1492
1502
  </xsl:template>
1493
1503
  <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}">
1504
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
1495
1505
  <xsl:copy-of select="@*"/>
1496
1506
  <xsl:apply-templates mode="update_xml_step1"/>
1497
1507
  </xsl:element>
@@ -1501,32 +1511,32 @@
1501
1511
  <xsl:apply-templates mode="update_xml_step1"/>
1502
1512
  </xsl:template>
1503
1513
  <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}">
1514
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
1505
1515
  <xsl:copy-of select="@*"/>
1506
1516
  <xsl:apply-templates mode="update_xml_step1"/>
1507
1517
  </xsl:element>
1508
1518
  </xsl:template>
1509
1519
 
1510
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1520
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1511
1521
  <xsl:element name="definition" namespace="{$namespace_full}">
1512
1522
  <xsl:copy-of select="@*"/>
1513
1523
  <xsl:apply-templates mode="update_xml_step1"/>
1514
1524
  </xsl:element>
1515
1525
  </xsl:template>
1516
-
1526
+
1517
1527
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
1518
1528
  <xsl:element name="termsource" namespace="{$namespace_full}">
1519
1529
  <xsl:copy-of select="@*"/>
1520
1530
  <xsl:apply-templates mode="update_xml_step1"/>
1521
1531
  </xsl:element>
1522
1532
  </xsl:template>
1523
-
1533
+
1524
1534
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
1525
1535
  <xsl:element name="source" namespace="{$namespace_full}">
1526
1536
  <xsl:copy-of select="@*"/>
1527
1537
  <xsl:apply-templates mode="update_xml_step1"/>
1528
1538
  </xsl:element>
1529
- </xsl:template>
1539
+ </xsl:template> -->
1530
1540
 
1531
1541
  <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
1542
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -1549,12 +1559,12 @@
1549
1559
  </xsl:template>
1550
1560
 
1551
1561
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
1552
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1562
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1553
1563
  <xsl:element name="identifier" namespace="{$namespace_full}">
1554
1564
  <xsl:copy-of select="@*"/>
1555
1565
  <xsl:apply-templates mode="update_xml_step1"/>
1556
1566
  </xsl:element>
1557
- </xsl:template>
1567
+ </xsl:template> -->
1558
1568
 
1559
1569
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
1560
1570
 
@@ -1564,51 +1574,53 @@
1564
1574
 
1565
1575
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
1566
1576
 
1567
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1577
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1568
1578
  <xsl:element name="eref" namespace="{$namespace_full}">
1569
1579
  <xsl:copy-of select="@*"/>
1570
1580
  <xsl:apply-templates mode="update_xml_step1"/>
1571
1581
  </xsl:element>
1572
- </xsl:template>
1582
+ </xsl:template> -->
1573
1583
 
1574
1584
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
1575
1585
 
1576
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1586
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1577
1587
  <xsl:element name="xref" namespace="{$namespace_full}">
1578
1588
  <xsl:copy-of select="@*"/>
1579
1589
  <xsl:apply-templates mode="update_xml_step1"/>
1580
1590
  </xsl:element>
1581
- </xsl:template>
1591
+ </xsl:template> -->
1582
1592
 
1583
1593
  <xsl:template match="mn:link" mode="update_xml_step1"/>
1584
1594
 
1585
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1595
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1586
1596
  <xsl:element name="link" namespace="{$namespace_full}">
1587
1597
  <xsl:copy-of select="@*"/>
1588
1598
  <xsl:apply-templates mode="update_xml_step1"/>
1589
1599
  </xsl:element>
1590
- </xsl:template>
1600
+ </xsl:template> -->
1591
1601
 
1592
1602
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
1593
1603
 
1594
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1604
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1595
1605
  <xsl:element name="origin" namespace="{$namespace_full}">
1596
1606
  <xsl:copy-of select="@*"/>
1597
1607
  <xsl:apply-templates mode="update_xml_step1"/>
1598
1608
  </xsl:element>
1599
- </xsl:template>
1609
+ </xsl:template> -->
1600
1610
 
1601
1611
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
1602
1612
 
1603
1613
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
1604
1614
 
1605
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
1615
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
1606
1616
 
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>
1617
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1618
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1619
+ <xsl:value-of select="."/>
1620
+ </xsl:element>
1621
+ </xsl:template>
1622
+
1623
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
1612
1624
 
1613
1625
  <!-- END: update new Presentation XML -->
1614
1626
 
@@ -1804,7 +1816,7 @@
1804
1816
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
1805
1817
  <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
1818
 
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">
1819
+ <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
1820
 
1809
1821
  <xsl:variable name="parent" select="local-name(..)"/>
1810
1822
 
@@ -1923,7 +1935,7 @@
1923
1935
  </xsl:if>
1924
1936
  </xsl:template>
1925
1937
 
1926
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1938
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1927
1939
  <xsl:copy-of select="."/>
1928
1940
  </xsl:template>
1929
1941
 
@@ -2250,7 +2262,7 @@
2250
2262
  </fo:block>
2251
2263
  </xsl:template> <!-- copyright-statement -->
2252
2264
 
2253
- <xsl:template match="mn:copyright-statement//mn:title">
2265
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
2254
2266
  <!-- process in the template 'title' -->
2255
2267
  <xsl:call-template name="title"/>
2256
2268
  </xsl:template> <!-- copyright-statement//title -->
@@ -2266,7 +2278,7 @@
2266
2278
  </fo:block>
2267
2279
  </xsl:template> <!-- license-statement -->
2268
2280
 
2269
- <xsl:template match="mn:license-statement//mn:title">
2281
+ <xsl:template match="mn:license-statement//mn:fmt-title">
2270
2282
  <!-- process in the template 'title' -->
2271
2283
  <xsl:call-template name="title"/>
2272
2284
  </xsl:template> <!-- license-statement/title -->
@@ -2283,7 +2295,7 @@
2283
2295
  </fo:block>
2284
2296
  </xsl:template> <!-- legal-statement -->
2285
2297
 
2286
- <xsl:template match="mn:legal-statement//mn:title">
2298
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
2287
2299
  <!-- process in the template 'title' -->
2288
2300
  <xsl:call-template name="title"/>
2289
2301
 
@@ -2303,7 +2315,7 @@
2303
2315
  </fo:block>
2304
2316
  </xsl:template> <!-- feedback-statement -->
2305
2317
 
2306
- <xsl:template match="mn:feedback-statement//mn:title">
2318
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
2307
2319
  <!-- process in the template 'title' -->
2308
2320
  <xsl:call-template name="title"/>
2309
2321
  </xsl:template>
@@ -2328,7 +2340,7 @@
2328
2340
  <xsl:template name="refine_link-style">
2329
2341
  </xsl:template> <!-- refine_link-style -->
2330
2342
 
2331
- <xsl:template match="mn:link" name="link">
2343
+ <xsl:template match="mn:fmt-link" name="link">
2332
2344
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
2333
2345
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
2334
2346
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -2549,7 +2561,7 @@
2549
2561
  <xsl:value-of select="."/>
2550
2562
  </xsl:attribute>
2551
2563
  </xsl:for-each>
2552
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
2564
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
2553
2565
  </xsl:when>
2554
2566
 
2555
2567
  <xsl:otherwise>
@@ -2591,11 +2603,11 @@
2591
2603
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2592
2604
  </xsl:if>
2593
2605
 
2594
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
2606
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
2595
2607
  </fo:block>
2596
2608
 
2597
2609
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
2598
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
2610
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
2599
2611
 
2600
2612
  </fo:block-container>
2601
2613
  </fo:block-container>
@@ -2896,7 +2908,7 @@
2896
2908
 
2897
2909
  <!-- end mode="syntax_highlight" -->
2898
2910
 
2899
- <xsl:template match="mn:sourcecode/mn:name">
2911
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
2900
2912
  <xsl:if test="normalize-space() != ''">
2901
2913
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2902
2914
  <xsl:apply-templates/>
@@ -2914,7 +2926,7 @@
2914
2926
  </xsl:choose>
2915
2927
  </xsl:template>
2916
2928
 
2917
- <xsl:template match="mn:annotation">
2929
+ <xsl:template match="mn:callout-annotation">
2918
2930
  <xsl:variable name="annotation-id" select="@id"/>
2919
2931
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2920
2932
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -2926,7 +2938,7 @@
2926
2938
  </fo:block>
2927
2939
  </xsl:template>
2928
2940
 
2929
- <xsl:template match="mn:annotation/mn:p">
2941
+ <xsl:template match="mn:callout-annotation/mn:p">
2930
2942
  <xsl:param name="callout"/>
2931
2943
  <fo:inline id="{@id}">
2932
2944
  <xsl:call-template name="setNamedDestination"/>
@@ -3078,7 +3090,7 @@
3078
3090
  <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
3091
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
3080
3092
  <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>
3093
+ <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
3094
  <xsl:otherwise>
3083
3095
  <xsl:variable name="tag">
3084
3096
  <xsl:call-template name="insertTag">
@@ -3479,12 +3491,12 @@
3479
3491
  <xsl:template match="mn:permission">
3480
3492
  <xsl:call-template name="setNamedDestination"/>
3481
3493
  <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)]"/>
3494
+ <xsl:apply-templates select="mn:fmt-name"/>
3495
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3484
3496
  </fo:block>
3485
3497
  </xsl:template>
3486
3498
 
3487
- <xsl:template match="mn:permission/mn:name">
3499
+ <xsl:template match="mn:permission/mn:fmt-name">
3488
3500
  <xsl:if test="normalize-space() != ''">
3489
3501
  <fo:block xsl:use-attribute-sets="permission-name-style">
3490
3502
  <xsl:apply-templates/>
@@ -3506,15 +3518,15 @@
3506
3518
  <xsl:template match="mn:requirement">
3507
3519
  <xsl:call-template name="setNamedDestination"/>
3508
3520
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3509
- <xsl:apply-templates select="mn:name"/>
3521
+ <xsl:apply-templates select="mn:fmt-name"/>
3510
3522
  <xsl:apply-templates select="mn:label"/>
3511
3523
  <xsl:apply-templates select="@obligation"/>
3512
3524
  <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)]"/>
3525
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
3514
3526
  </fo:block>
3515
3527
  </xsl:template>
3516
3528
 
3517
- <xsl:template match="mn:requirement/mn:name">
3529
+ <xsl:template match="mn:requirement/mn:fmt-name">
3518
3530
  <xsl:if test="normalize-space() != ''">
3519
3531
 
3520
3532
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -3550,12 +3562,12 @@
3550
3562
  <xsl:template match="mn:recommendation">
3551
3563
  <xsl:call-template name="setNamedDestination"/>
3552
3564
  <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)]"/>
3565
+ <xsl:apply-templates select="mn:fmt-name"/>
3566
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3555
3567
  </fo:block>
3556
3568
  </xsl:template>
3557
3569
 
3558
- <xsl:template match="mn:recommendation/mn:name">
3570
+ <xsl:template match="mn:recommendation/mn:fmt-name">
3559
3571
  <xsl:if test="normalize-space() != ''">
3560
3572
 
3561
3573
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -3808,11 +3820,11 @@
3808
3820
 
3809
3821
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
3810
3822
  </xsl:if>
3811
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3823
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3812
3824
  </fo:block>
3813
3825
  </xsl:template>
3814
3826
 
3815
- <xsl:template match="mn:term/mn:name">
3827
+ <xsl:template match="mn:term/mn:fmt-name">
3816
3828
  <xsl:if test="normalize-space() != ''">
3817
3829
  <!-- <xsl:variable name="level">
3818
3830
  <xsl:call-template name="getLevelTermName"/>
@@ -3831,7 +3843,7 @@
3831
3843
  <!-- origin -->
3832
3844
  <!-- modification -->
3833
3845
  <!-- ====== -->
3834
- <xsl:template match="mn:termsource" name="termsource">
3846
+ <xsl:template match="mn:fmt-termsource" name="termsource">
3835
3847
  <fo:block xsl:use-attribute-sets="termsource-style">
3836
3848
 
3837
3849
  <xsl:call-template name="refine_termsource-style"/>
@@ -3870,24 +3882,24 @@
3870
3882
  </fo:block>
3871
3883
  </xsl:template>
3872
3884
 
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">
3885
+ <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
3886
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
3875
3887
  </xsl:template>
3876
3888
 
3877
- <xsl:template match="mn:termsource/text()">
3889
+ <xsl:template match="mn:fmt-termsource/text()">
3878
3890
  <xsl:if test="normalize-space() != ''">
3879
3891
  <xsl:value-of select="."/>
3880
3892
  </xsl:if>
3881
3893
  </xsl:template>
3882
3894
 
3883
3895
  <!-- text SOURCE: -->
3884
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
3896
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
3885
3897
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
3886
3898
  <xsl:value-of select="."/>
3887
3899
  </fo:inline>
3888
3900
  </xsl:template>
3889
3901
 
3890
- <xsl:template match="mn:origin">
3902
+ <xsl:template match="mn:fmt-origin">
3891
3903
  <xsl:call-template name="insert_basic_link">
3892
3904
  <xsl:with-param name="element">
3893
3905
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -3933,7 +3945,7 @@
3933
3945
  <!-- ====== -->
3934
3946
 
3935
3947
  <!-- Preferred, admitted, deprecated -->
3936
- <xsl:template match="mn:preferred">
3948
+ <xsl:template match="mn:fmt-preferred">
3937
3949
  <xsl:variable name="level">
3938
3950
  <xsl:call-template name="getLevel"/>
3939
3951
  </xsl:variable>
@@ -3949,15 +3961,15 @@
3949
3961
  </xsl:variable>
3950
3962
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
3951
3963
 
3952
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
3964
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
3953
3965
 
3954
3966
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
3955
3967
 
3956
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
3968
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
3957
3969
  <xsl:call-template name="setIDforNamedDestination"/>
3958
3970
  </xsl:for-each>
3959
3971
 
3960
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
3972
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
3961
3973
  </fo:block>
3962
3974
  </xsl:if>
3963
3975
 
@@ -3981,13 +3993,13 @@
3981
3993
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
3982
3994
  <xsl:template match="mn:domain"/>
3983
3995
 
3984
- <xsl:template match="mn:admitted">
3996
+ <xsl:template match="mn:fmt-admitted">
3985
3997
  <fo:block xsl:use-attribute-sets="admitted-style">
3986
3998
  <xsl:apply-templates/>
3987
3999
  </fo:block>
3988
4000
  </xsl:template>
3989
4001
 
3990
- <xsl:template match="mn:deprecates">
4002
+ <xsl:template match="mn:fmt-deprecates">
3991
4003
  <fo:block xsl:use-attribute-sets="deprecates-style">
3992
4004
  <xsl:apply-templates/>
3993
4005
  </fo:block>
@@ -4001,7 +4013,7 @@
4001
4013
 
4002
4014
  <!-- 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
4015
  <!-- in metanorma xml preferred terms delimited by semicolons -->
4004
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
4016
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
4005
4017
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
4006
4018
  </xsl:template>
4007
4019
  <!-- End Preferred, admitted, deprecated -->
@@ -4020,16 +4032,16 @@
4020
4032
  <!-- ========== -->
4021
4033
  <!-- definition -->
4022
4034
  <!-- ========== -->
4023
- <xsl:template match="mn:definition">
4035
+ <xsl:template match="mn:fmt-definition">
4024
4036
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4025
4037
  <xsl:apply-templates/>
4026
4038
  </fo:block>
4027
4039
  </xsl:template>
4028
4040
 
4029
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
4041
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
4030
4042
  <xsl:apply-templates/>
4031
4043
  </xsl:template>
4032
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
4044
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
4033
4045
  <fo:inline> <xsl:apply-templates/></fo:inline>
4034
4046
  <fo:block/>
4035
4047
  </xsl:template>
@@ -4096,12 +4108,12 @@
4096
4108
  <xsl:call-template name="refine_termexample-style"/>
4097
4109
  <xsl:call-template name="setBlockSpanAll"/>
4098
4110
 
4099
- <xsl:apply-templates select="mn:name"/>
4100
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4111
+ <xsl:apply-templates select="mn:fmt-name"/>
4112
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4101
4113
  </fo:block>
4102
4114
  </xsl:template>
4103
4115
 
4104
- <xsl:template match="mn:termexample/mn:name">
4116
+ <xsl:template match="mn:termexample/mn:fmt-name">
4105
4117
  <xsl:if test="normalize-space() != ''">
4106
4118
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4107
4119
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -4152,7 +4164,7 @@
4152
4164
  <xsl:call-template name="refine_example-style"/>
4153
4165
 
4154
4166
  <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
4167
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
4156
4168
  </xsl:variable>
4157
4169
 
4158
4170
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -4163,7 +4175,7 @@
4163
4175
 
4164
4176
  <!-- display name 'EXAMPLE' in a separate block -->
4165
4177
  <fo:block>
4166
- <xsl:apply-templates select="mn:name">
4178
+ <xsl:apply-templates select="mn:fmt-name">
4167
4179
  <xsl:with-param name="fo_element" select="$fo_element"/>
4168
4180
  </xsl:apply-templates>
4169
4181
  </fo:block>
@@ -4171,7 +4183,7 @@
4171
4183
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4172
4184
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4173
4185
  <xsl:variable name="example_body">
4174
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4186
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4175
4187
  <xsl:with-param name="fo_element" select="$fo_element"/>
4176
4188
  </xsl:apply-templates>
4177
4189
  </xsl:variable>
@@ -4198,14 +4210,14 @@
4198
4210
  <fo:list-item>
4199
4211
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
4200
4212
  <fo:block>
4201
- <xsl:apply-templates select="mn:name">
4213
+ <xsl:apply-templates select="mn:fmt-name">
4202
4214
  <xsl:with-param name="fo_element">block</xsl:with-param>
4203
4215
  </xsl:apply-templates>
4204
4216
  </fo:block>
4205
4217
  </fo:list-item-label>
4206
4218
  <fo:list-item-body start-indent="body-start()">
4207
4219
  <fo:block>
4208
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4220
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4209
4221
  <xsl:with-param name="fo_element" select="$fo_element"/>
4210
4222
  </xsl:apply-templates>
4211
4223
  </fo:block>
@@ -4218,21 +4230,21 @@
4218
4230
 
4219
4231
  <!-- display 'EXAMPLE' and first element in the same line -->
4220
4232
  <fo:block>
4221
- <xsl:apply-templates select="mn:name">
4233
+ <xsl:apply-templates select="mn:fmt-name">
4222
4234
  <xsl:with-param name="fo_element" select="$fo_element"/>
4223
4235
  </xsl:apply-templates>
4224
4236
  <fo:inline>
4225
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
4237
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
4226
4238
  <xsl:with-param name="fo_element" select="$fo_element"/>
4227
4239
  </xsl:apply-templates>
4228
4240
  </fo:inline>
4229
4241
  </fo:block>
4230
4242
 
4231
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
4243
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4232
4244
  <!-- display further elements in blocks -->
4233
4245
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4234
4246
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4235
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
4247
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4236
4248
  <xsl:with-param name="fo_element" select="'block'"/>
4237
4249
  </xsl:apply-templates>
4238
4250
  </fo:block-container>
@@ -4246,7 +4258,7 @@
4246
4258
  </xsl:template>
4247
4259
 
4248
4260
  <!-- example/name -->
4249
- <xsl:template match="mn:example/mn:name">
4261
+ <xsl:template match="mn:example/mn:fmt-name">
4250
4262
  <xsl:param name="fo_element">block</xsl:param>
4251
4263
 
4252
4264
  <xsl:choose>
@@ -4271,7 +4283,7 @@
4271
4283
  </xsl:template>
4272
4284
 
4273
4285
  <!-- 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">
4286
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
4275
4287
  <fo:inline xsl:use-attribute-sets="example-name-style">
4276
4288
  <xsl:apply-templates/>
4277
4289
  </fo:inline>
@@ -4538,7 +4550,7 @@
4538
4550
 
4539
4551
  <!-- Display table's name before table as standalone block -->
4540
4552
  <!-- $namespace = 'iso' or -->
4541
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
4553
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
4542
4554
  <xsl:call-template name="table_name_fn_display"/>
4543
4555
 
4544
4556
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -4580,7 +4592,7 @@
4580
4592
 
4581
4593
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4582
4594
 
4583
- <xsl:for-each select="mn:name">
4595
+ <xsl:for-each select="mn:fmt-name">
4584
4596
  <xsl:call-template name="setIDforNamedDestination"/>
4585
4597
  </xsl:for-each>
4586
4598
 
@@ -4610,6 +4622,10 @@
4610
4622
  <xsl:with-param name="margin-side" select="$margin-side"/>
4611
4623
  </xsl:call-template>
4612
4624
 
4625
+ <xsl:call-template name="setTableStyles">
4626
+ <xsl:with-param name="scope">table</xsl:with-param>
4627
+ </xsl:call-template>
4628
+
4613
4629
  </xsl:element>
4614
4630
  </xsl:variable>
4615
4631
 
@@ -4630,7 +4646,7 @@
4630
4646
  </xsl:attribute>
4631
4647
  </xsl:for-each>
4632
4648
 
4633
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
4649
+ <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
4650
  <xsl:if test="$isNoteOrFnExist = 'true'">
4635
4651
  <!-- <xsl:choose>
4636
4652
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -4686,7 +4702,7 @@
4686
4702
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
4687
4703
  </xsl:when>
4688
4704
  <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 -->
4705
+ <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
4706
  </xsl:otherwise>
4691
4707
  </xsl:choose>
4692
4708
 
@@ -4783,7 +4799,7 @@
4783
4799
  </xsl:template>
4784
4800
 
4785
4801
  <!-- table/name-->
4786
- <xsl:template match="*[local-name()='table']/mn:name">
4802
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
4787
4803
  <xsl:param name="continued"/>
4788
4804
  <xsl:param name="cols-count"/>
4789
4805
  <xsl:if test="normalize-space() != ''">
@@ -4848,7 +4864,7 @@
4848
4864
  </xsl:template>
4849
4865
 
4850
4866
  <!-- SOURCE: ... -->
4851
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
4867
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
4852
4868
  <xsl:call-template name="termsource"/>
4853
4869
  </xsl:template>
4854
4870
 
@@ -5013,11 +5029,11 @@
5013
5029
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
5014
5030
  </xsl:template>
5015
5031
 
5016
- <xsl:template match="mn:termsource" mode="td_text">
5017
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
5032
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
5033
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
5018
5034
  </xsl:template>
5019
5035
 
5020
- <xsl:template match="mn:link" mode="td_text">
5036
+ <xsl:template match="mn:fmt-link" mode="td_text">
5021
5037
  <xsl:value-of select="@target"/>
5022
5038
  </xsl:template>
5023
5039
 
@@ -5219,12 +5235,12 @@
5219
5235
 
5220
5236
  <xsl:call-template name="refine_table-header-title-style"/>
5221
5237
 
5222
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
5238
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
5223
5239
  <xsl:with-param name="continued">true</xsl:with-param>
5224
5240
  <xsl:with-param name="cols-count" select="$cols-count"/>
5225
5241
  </xsl:apply-templates>
5226
5242
 
5227
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5243
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5228
5244
  <fo:block role="SKIP"/>
5229
5245
  </xsl:if>
5230
5246
 
@@ -5259,7 +5275,7 @@
5259
5275
  <xsl:param name="colwidths"/>
5260
5276
  <xsl:param name="colgroup"/>
5261
5277
 
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"/>
5278
+ <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
5279
 
5264
5280
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5265
5281
  </xsl:variable>
@@ -5300,6 +5316,12 @@
5300
5316
  </xsl:choose>
5301
5317
  </xsl:for-each>
5302
5318
 
5319
+ <xsl:for-each select="ancestor::mn:table[1]">
5320
+ <xsl:call-template name="setTableStyles">
5321
+ <xsl:with-param name="scope">table</xsl:with-param>
5322
+ </xsl:call-template>
5323
+ </xsl:for-each>
5324
+
5303
5325
  <xsl:choose>
5304
5326
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
5305
5327
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -5316,10 +5338,22 @@
5316
5338
 
5317
5339
  <fo:table-body role="SKIP">
5318
5340
  <fo:table-row role="SKIP">
5341
+ <xsl:for-each select="ancestor::mn:table[1]">
5342
+ <xsl:call-template name="setTableStyles">
5343
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5344
+ </xsl:call-template>
5345
+ </xsl:for-each>
5346
+
5319
5347
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
5320
5348
 
5321
5349
  <xsl:call-template name="refine_table-footer-cell-style"/>
5322
5350
 
5351
+ <xsl:for-each select="ancestor::mn:table[1]">
5352
+ <xsl:call-template name="setTableStyles">
5353
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5354
+ </xsl:call-template>
5355
+ </xsl:for-each>
5356
+
5323
5357
  <xsl:call-template name="setBordersTableArray"/>
5324
5358
 
5325
5359
  <!-- fn will be processed inside 'note' processing -->
@@ -5327,7 +5361,7 @@
5327
5361
  <xsl:apply-templates select="../mn:dl"/>
5328
5362
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
5329
5363
  <xsl:apply-templates select="../mn:example"/>
5330
- <xsl:apply-templates select="../mn:source"/>
5364
+ <xsl:apply-templates select="../mn:fmt-source"/>
5331
5365
 
5332
5366
  <xsl:variable name="isDisplayRowSeparator">
5333
5367
  </xsl:variable>
@@ -5516,7 +5550,12 @@
5516
5550
 
5517
5551
  <xsl:template name="setTableRowAttributes">
5518
5552
 
5519
- <xsl:call-template name="setColors"/>
5553
+ <xsl:for-each select="ancestor::mn:table[1]">
5554
+ <xsl:call-template name="setTableStyles">
5555
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5556
+ </xsl:call-template>
5557
+ </xsl:for-each>
5558
+ <xsl:call-template name="setTableStyles"/>
5520
5559
 
5521
5560
  </xsl:template> <!-- setTableRowAttributes -->
5522
5561
  <!-- ===================== -->
@@ -5569,7 +5608,13 @@
5569
5608
  </xsl:attribute>
5570
5609
  </xsl:if>
5571
5610
  <xsl:call-template name="display-align"/>
5572
- <xsl:call-template name="setColors"/>
5611
+
5612
+ <xsl:for-each select="ancestor::mn:table[1]">
5613
+ <xsl:call-template name="setTableStyles">
5614
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5615
+ </xsl:call-template>
5616
+ </xsl:for-each>
5617
+ <xsl:call-template name="setTableStyles"/>
5573
5618
  </xsl:template>
5574
5619
 
5575
5620
  <xsl:template name="display-align">
@@ -5585,7 +5630,8 @@
5585
5630
  </xsl:if>
5586
5631
  </xsl:template>
5587
5632
 
5588
- <xsl:template name="setColors">
5633
+ <xsl:template name="setTableStyles">
5634
+ <xsl:param name="scope">cell</xsl:param>
5589
5635
  <xsl:variable name="styles__">
5590
5636
  <xsl:call-template name="split">
5591
5637
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -5597,16 +5643,22 @@
5597
5643
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
5598
5644
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5599
5645
  <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'">
5646
+ <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
5647
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
5602
5648
  </xsl:if>
5649
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
5650
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
5651
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
5652
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
5653
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
5654
+ </xsl:if>
5603
5655
  </xsl:for-each>
5604
5656
  </xsl:variable>
5605
5657
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
5606
5658
  <xsl:for-each select="$styles/style">
5607
5659
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
5608
5660
  </xsl:for-each>
5609
- </xsl:template> <!-- setColors -->
5661
+ </xsl:template> <!-- setTableStyles -->
5610
5662
 
5611
5663
  <!-- cell in table body, footer -->
5612
5664
  <xsl:template match="*[local-name()='td']" name="td">
@@ -5670,11 +5722,11 @@
5670
5722
 
5671
5723
  <xsl:call-template name="refine_table-note-name-style"/>
5672
5724
 
5673
- <xsl:apply-templates select="mn:name"/>
5725
+ <xsl:apply-templates select="mn:fmt-name"/>
5674
5726
 
5675
5727
  </fo:inline>
5676
5728
 
5677
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5729
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5678
5730
  </fo:block>
5679
5731
  </xsl:template> <!-- table/note -->
5680
5732
 
@@ -5813,7 +5865,7 @@
5813
5865
 
5814
5866
  <!-- footnotes for table's name rendering -->
5815
5867
  <xsl:template name="table_name_fn_display">
5816
- <xsl:for-each select="mn:name//mn:fn">
5868
+ <xsl:for-each select="mn:fmt-name//mn:fn">
5817
5869
  <xsl:variable name="reference" select="@reference"/>
5818
5870
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
5819
5871
  <fo:block margin-bottom="12pt">
@@ -6470,7 +6522,7 @@
6470
6522
  </xsl:if> -->
6471
6523
 
6472
6524
  <xsl:variable name="words">
6473
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6525
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
6474
6526
  <word>
6475
6527
  <xsl:copy-of select="."/>
6476
6528
  </word>
@@ -6529,7 +6581,7 @@
6529
6581
  </xsl:copy>
6530
6582
  </xsl:template>
6531
6583
 
6532
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6584
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6533
6585
 
6534
6586
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
6535
6587
  <xsl:variable name="formatting_tags">
@@ -6564,7 +6616,7 @@
6564
6616
  </xsl:call-template>
6565
6617
  </xsl:template>
6566
6618
 
6567
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
6619
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
6568
6620
  <xsl:variable name="link">
6569
6621
  <link_updated>
6570
6622
  <xsl:variable name="target_text">
@@ -6779,7 +6831,7 @@
6779
6831
 
6780
6832
  <xsl:call-template name="refine_multicomponent_block_style"/>
6781
6833
 
6782
- <xsl:apply-templates select="mn:name">
6834
+ <xsl:apply-templates select="mn:fmt-name">
6783
6835
  <xsl:with-param name="process">true</xsl:with-param>
6784
6836
  </xsl:apply-templates>
6785
6837
 
@@ -6962,7 +7014,7 @@
6962
7014
  </xsl:template> <!-- refine_multicomponent_block_style -->
6963
7015
 
6964
7016
  <!-- dl/name -->
6965
- <xsl:template match="mn:dl/mn:name">
7017
+ <xsl:template match="mn:dl/mn:fmt-name">
6966
7018
  <xsl:param name="process">false</xsl:param>
6967
7019
  <xsl:if test="$process = 'true'">
6968
7020
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -7380,12 +7432,12 @@
7380
7432
  <xsl:template match="mn:appendix">
7381
7433
  <xsl:call-template name="setNamedDestination"/>
7382
7434
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
7383
- <xsl:apply-templates select="mn:title"/>
7435
+ <xsl:apply-templates select="mn:fmt-title"/>
7384
7436
  </fo:block>
7385
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
7437
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
7386
7438
  </xsl:template>
7387
7439
 
7388
- <xsl:template match="mn:appendix/mn:title" priority="2">
7440
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
7389
7441
  <xsl:variable name="level">
7390
7442
  <xsl:call-template name="getLevel"/>
7391
7443
  </xsl:variable>
@@ -7398,15 +7450,15 @@
7398
7450
  <xsl:template match="mn:appendix//mn:example" priority="2">
7399
7451
  <xsl:call-template name="setNamedDestination"/>
7400
7452
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7401
- <xsl:apply-templates select="mn:name"/>
7453
+ <xsl:apply-templates select="mn:fmt-name"/>
7402
7454
  </fo:block>
7403
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
7455
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7404
7456
  </xsl:template>
7405
7457
 
7406
7458
  <xsl:attribute-set name="xref-style">
7407
7459
  </xsl:attribute-set>
7408
7460
 
7409
- <xsl:template match="mn:xref">
7461
+ <xsl:template match="mn:fmt-xref">
7410
7462
  <xsl:call-template name="insert_basic_link">
7411
7463
  <xsl:with-param name="element">
7412
7464
  <xsl:variable name="alt_text">
@@ -7426,7 +7478,7 @@
7426
7478
  </xsl:template> <!-- xref -->
7427
7479
 
7428
7480
  <!-- 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="."/>
7481
+ <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
7482
  </xsl:template>
7431
7483
 
7432
7484
  <xsl:attribute-set name="eref-style">
@@ -7459,7 +7511,7 @@
7459
7511
  <!-- ====== -->
7460
7512
  <!-- eref -->
7461
7513
  <!-- ====== -->
7462
- <xsl:template match="mn:eref" name="eref">
7514
+ <xsl:template match="mn:fmt-eref" name="eref">
7463
7515
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7464
7516
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
7465
7517
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -7596,28 +7648,28 @@
7596
7648
 
7597
7649
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7598
7650
 
7599
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
7651
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
7600
7652
 
7601
7653
  <xsl:call-template name="refine_note-name-style"/>
7602
7654
 
7603
7655
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7604
7656
  <!-- <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]">
7657
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7606
7658
  <xsl:call-template name="append_add-style"/>
7607
7659
  </xsl:if>
7608
7660
 
7609
7661
  <!-- 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)]">
7662
+ <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)]">
7663
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7612
7664
  <xsl:with-param name="skip">false</xsl:with-param>
7613
7665
  </xsl:apply-templates>
7614
7666
  </xsl:if>
7615
7667
 
7616
- <xsl:apply-templates select="mn:name"/>
7668
+ <xsl:apply-templates select="mn:fmt-name"/>
7617
7669
 
7618
7670
  </fo:inline>
7619
7671
 
7620
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7672
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7621
7673
  </fo:block>
7622
7674
  </fo:block-container>
7623
7675
  </fo:block-container>
@@ -7656,19 +7708,19 @@
7656
7708
 
7657
7709
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7658
7710
  <!-- <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]">
7711
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7660
7712
  <xsl:call-template name="append_add-style"/>
7661
7713
  </xsl:if>
7662
7714
 
7663
- <xsl:apply-templates select="mn:name"/>
7715
+ <xsl:apply-templates select="mn:fmt-name"/>
7664
7716
 
7665
7717
  </fo:inline>
7666
7718
 
7667
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7719
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7668
7720
  </fo:block>
7669
7721
  </xsl:template>
7670
7722
 
7671
- <xsl:template match="mn:note/mn:name">
7723
+ <xsl:template match="mn:note/mn:fmt-name">
7672
7724
  <xsl:param name="sfx"/>
7673
7725
  <xsl:variable name="suffix">
7674
7726
  <xsl:choose>
@@ -7695,7 +7747,7 @@
7695
7747
  </xsl:if>
7696
7748
  </xsl:template>
7697
7749
 
7698
- <xsl:template match="mn:termnote/mn:name">
7750
+ <xsl:template match="mn:termnote/mn:fmt-name">
7699
7751
  <xsl:param name="sfx"/>
7700
7752
  <xsl:variable name="suffix">
7701
7753
  <xsl:choose>
@@ -7776,15 +7828,15 @@
7776
7828
 
7777
7829
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7778
7830
  <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 -->
7831
+ <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
7832
  </fo:block>
7781
7833
  </fo:block-container>
7782
7834
  </fo:block-container>
7783
- <xsl:if test="mn:author or mn:source or mn:attribution">
7835
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
7784
7836
  <fo:block xsl:use-attribute-sets="quote-source-style">
7785
7837
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
7786
7838
  <xsl:apply-templates select="mn:author"/>
7787
- <xsl:apply-templates select="mn:source"/>
7839
+ <xsl:apply-templates select="mn:fmt-source"/>
7788
7840
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
7789
7841
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
7790
7842
  </fo:block>
@@ -7794,17 +7846,32 @@
7794
7846
  </fo:block-container>
7795
7847
  </xsl:template>
7796
7848
 
7797
- <xsl:template match="mn:source">
7849
+ <xsl:template match="mn:fmt-source">
7798
7850
  <xsl:if test="../mn:author">
7799
7851
  <xsl:text>, </xsl:text>
7800
7852
  </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>
7853
+ <xsl:choose>
7854
+ <xsl:when test="not(parent::quote)">
7855
+ <fo:block>
7856
+ <xsl:call-template name="insert_basic_link">
7857
+ <xsl:with-param name="element">
7858
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7859
+ <xsl:apply-templates/>
7860
+ </fo:basic-link>
7861
+ </xsl:with-param>
7862
+ </xsl:call-template>
7863
+ </fo:block>
7864
+ </xsl:when>
7865
+ <xsl:otherwise>
7866
+ <xsl:call-template name="insert_basic_link">
7867
+ <xsl:with-param name="element">
7868
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7869
+ <xsl:apply-templates/>
7870
+ </fo:basic-link>
7871
+ </xsl:with-param>
7872
+ </xsl:call-template>
7873
+ </xsl:otherwise>
7874
+ </xsl:choose>
7808
7875
  </xsl:template>
7809
7876
 
7810
7877
  <xsl:template match="mn:author">
@@ -7880,7 +7947,7 @@
7880
7947
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
7881
7948
  <xsl:choose>
7882
7949
  <!-- skip figure/name/fn -->
7883
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7950
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7884
7951
  <xsl:otherwise>
7885
7952
  <xsl:element name="figure" namespace="{$namespace_full}">
7886
7953
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -8076,17 +8143,17 @@
8076
8143
 
8077
8144
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8078
8145
 
8079
- <xsl:for-each select="mn:name"> <!-- set context -->
8146
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8080
8147
  <xsl:call-template name="setIDforNamedDestination"/>
8081
8148
  </xsl:for-each>
8082
8149
 
8083
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
8150
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
8084
8151
  </fo:block>
8085
8152
 
8086
8153
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
8087
8154
  <xsl:call-template name="showFigureKey"/>
8088
8155
  </xsl:if>
8089
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
8156
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
8090
8157
 
8091
8158
  </fo:block-container>
8092
8159
  </xsl:template>
@@ -8112,9 +8179,9 @@
8112
8179
  <xsl:template match="mn:figure[@class = 'pseudocode']">
8113
8180
  <xsl:call-template name="setNamedDestination"/>
8114
8181
  <fo:block id="{@id}">
8115
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8182
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8116
8183
  </fo:block>
8117
- <xsl:apply-templates select="mn:name"/>
8184
+ <xsl:apply-templates select="mn:fmt-name"/>
8118
8185
  </xsl:template>
8119
8186
 
8120
8187
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -8125,7 +8192,7 @@
8125
8192
 
8126
8193
  <!-- SOURCE: ... -->
8127
8194
  <!-- figure/source -->
8128
- <xsl:template match="mn:figure/mn:source" priority="2">
8195
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
8129
8196
  <xsl:call-template name="termsource"/>
8130
8197
  </xsl:template>
8131
8198
 
@@ -8135,7 +8202,7 @@
8135
8202
  <xsl:variable name="isAdded" select="../@added"/>
8136
8203
  <xsl:variable name="isDeleted" select="../@deleted"/>
8137
8204
  <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) -->
8205
+ <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
8206
  <fo:inline padding-left="1mm" padding-right="1mm">
8140
8207
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
8141
8208
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8156,13 +8223,26 @@
8156
8223
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8157
8224
 
8158
8225
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
8159
- <xsl:attribute name="width">100%</xsl:attribute>
8226
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8227
+ <xsl:choose>
8228
+ <xsl:when test="@width and not(@height)">
8229
+ <xsl:attribute name="width">100%</xsl:attribute>
8230
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8231
+ </xsl:when>
8232
+ <xsl:when test="@height and not(@width)">
8233
+ <xsl:attribute name="height">100%</xsl:attribute>
8234
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
8235
+ </xsl:when>
8236
+ <xsl:when test="not(@width) and not(@height)">
8237
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8238
+ </xsl:when>
8239
+ </xsl:choose>
8240
+
8160
8241
  <xsl:if test="normalize-space($logo_width) != ''">
8161
8242
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8162
8243
  </xsl:if>
8163
- <xsl:attribute name="content-height">100%</xsl:attribute>
8164
8244
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8165
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8245
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
8166
8246
  </xsl:if>
8167
8247
 
8168
8248
  <xsl:variable name="width">
@@ -8451,7 +8531,7 @@
8451
8531
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
8452
8532
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
8453
8533
 
8454
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
8534
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
8455
8535
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
8456
8536
  <xsl:param name="name"/>
8457
8537
 
@@ -8461,8 +8541,8 @@
8461
8541
 
8462
8542
  <xsl:variable name="alt-text">
8463
8543
  <xsl:choose>
8464
- <xsl:when test="normalize-space(../mn:name) != ''">
8465
- <xsl:value-of select="../mn:name"/>
8544
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
8545
+ <xsl:value-of select="../mn:fmt-name"/>
8466
8546
  </xsl:when>
8467
8547
  <xsl:when test="normalize-space($name) != ''">
8468
8548
  <xsl:value-of select="$name"/>
@@ -8471,7 +8551,7 @@
8471
8551
  </xsl:choose>
8472
8552
  </xsl:variable>
8473
8553
 
8474
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
8554
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
8475
8555
 
8476
8556
  <xsl:choose>
8477
8557
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -8520,9 +8600,9 @@
8520
8600
  <fo:table-cell column-number="2">
8521
8601
  <fo:block>
8522
8602
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
8523
- <xsl:if test="../mn:name/mn:bookmark">
8603
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
8524
8604
  <fo:block line-height="0" font-size="0">
8525
- <xsl:for-each select="../mn:name/mn:bookmark">
8605
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
8526
8606
  <xsl:call-template name="bookmark"/>
8527
8607
  </xsl:for-each>
8528
8608
  </fo:block>
@@ -8762,7 +8842,7 @@
8762
8842
 
8763
8843
  <!-- image with svg and emf -->
8764
8844
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
8765
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8845
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8766
8846
  <xsl:for-each select="*[local-name() = 'svg']">
8767
8847
  <xsl:call-template name="image_svg">
8768
8848
  <xsl:with-param name="name" select="$name"/>
@@ -8779,7 +8859,7 @@
8779
8859
 
8780
8860
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
8781
8861
  <xsl:variable name="svg_content" select="document(@src)"/>
8782
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8862
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8783
8863
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
8784
8864
  <xsl:call-template name="image_svg">
8785
8865
  <xsl:with-param name="name" select="$name"/>
@@ -8902,7 +8982,7 @@
8902
8982
  <xsl:template match="mn:emf"/>
8903
8983
 
8904
8984
  <!-- figure/name -->
8905
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
8985
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
8906
8986
  <xsl:if test="normalize-space() != ''">
8907
8987
  <fo:block xsl:use-attribute-sets="figure-name-style">
8908
8988
 
@@ -8974,25 +9054,25 @@
8974
9054
  <fo:block-container margin-left="0mm" role="SKIP">
8975
9055
  <xsl:call-template name="setNamedDestination"/>
8976
9056
  <fo:block id="{@id}">
8977
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
9057
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
8978
9058
  </fo:block>
8979
9059
  </fo:block-container>
8980
9060
  </fo:block-container>
8981
9061
  </xsl:template>
8982
9062
 
8983
- <xsl:template match="mn:formula/mn:dt/mn:stem">
9063
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
8984
9064
  <fo:inline>
8985
9065
  <xsl:apply-templates/>
8986
9066
  </fo:inline>
8987
9067
  </xsl:template>
8988
9068
 
8989
- <xsl:template match="mn:admitted/mn:stem">
9069
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
8990
9070
  <fo:inline>
8991
9071
  <xsl:apply-templates/>
8992
9072
  </fo:inline>
8993
9073
  </xsl:template>
8994
9074
 
8995
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
9075
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
8996
9076
  <!-- https://github.com/metanorma/isodoc/issues/607
8997
9077
  <xsl:if test="normalize-space() != ''">
8998
9078
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -9001,7 +9081,7 @@
9001
9081
  </xsl:template>
9002
9082
 
9003
9083
  <!-- stem inside formula with name (with formula's number) -->
9004
- <xsl:template match="mn:formula[mn:name]/mn:stem">
9084
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
9005
9085
  <fo:block xsl:use-attribute-sets="formula-style">
9006
9086
 
9007
9087
  <fo:table table-layout="fixed" width="100%">
@@ -9021,13 +9101,13 @@
9021
9101
 
9022
9102
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9023
9103
 
9024
- <xsl:for-each select="../mn:name">
9104
+ <xsl:for-each select="../mn:fmt-name">
9025
9105
  <xsl:call-template name="setIDforNamedDestination"/>
9026
9106
  </xsl:for-each>
9027
9107
 
9028
9108
  <xsl:call-template name="refine_formula-stem-number-style"/>
9029
9109
 
9030
- <xsl:apply-templates select="../mn:name"/>
9110
+ <xsl:apply-templates select="../mn:fmt-name"/>
9031
9111
  </fo:block>
9032
9112
  </fo:table-cell>
9033
9113
  </fo:table-row>
@@ -9037,7 +9117,7 @@
9037
9117
  </xsl:template>
9038
9118
 
9039
9119
  <!-- stem inside formula without name (without formula's number) -->
9040
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
9120
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
9041
9121
  <fo:block xsl:use-attribute-sets="formula-style">
9042
9122
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9043
9123
  <xsl:apply-templates/>
@@ -9391,7 +9471,7 @@
9391
9471
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
9392
9472
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
9393
9473
  -->
9394
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9474
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9395
9475
  <fo:inline xsl:use-attribute-sets="mathml-style">
9396
9476
 
9397
9477
  <xsl:call-template name="refine_mathml-style"/>
@@ -9658,7 +9738,7 @@
9658
9738
 
9659
9739
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
9660
9740
 
9661
- <xsl:apply-templates select="mn:name">
9741
+ <xsl:apply-templates select="mn:fmt-name">
9662
9742
  <xsl:with-param name="process">true</xsl:with-param>
9663
9743
  </xsl:apply-templates>
9664
9744
 
@@ -9704,7 +9784,7 @@
9704
9784
 
9705
9785
  <xsl:call-template name="refine_list-style"/>
9706
9786
 
9707
- <xsl:if test="mn:name">
9787
+ <xsl:if test="mn:fmt-name">
9708
9788
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
9709
9789
  </xsl:if>
9710
9790
 
@@ -9719,7 +9799,7 @@
9719
9799
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
9720
9800
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
9721
9801
 
9722
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
9802
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
9723
9803
  <xsl:param name="process">false</xsl:param>
9724
9804
  <xsl:if test="$process = 'true'">
9725
9805
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -9846,7 +9926,7 @@
9846
9926
  -->
9847
9927
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
9848
9928
  <!-- 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">
9929
+ <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
9930
  <xsl:param name="footnote_body_from_table">false</xsl:param>
9851
9931
 
9852
9932
  <!-- list of unique footnotes -->
@@ -9970,7 +10050,7 @@
9970
10050
  <!-- commented:
9971
10051
  .//mn:bibitem[ancestor::mn:references]/mn:note |
9972
10052
  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])]">
10053
+ <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
10054
  <!-- copy unique fn -->
9975
10055
  <fn gen_id="{generate-id(.)}">
9976
10056
  <xsl:copy-of select="@*"/>
@@ -10048,7 +10128,7 @@
10048
10128
  <xsl:with-param name="sep"> — </xsl:with-param>
10049
10129
  </xsl:call-template>
10050
10130
 
10051
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10131
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10052
10132
  </fo:block>
10053
10133
 
10054
10134
  </xsl:template>
@@ -10072,7 +10152,7 @@
10072
10152
  </xsl:otherwise>
10073
10153
  </xsl:choose> -->
10074
10154
  <xsl:variable name="name">
10075
- <xsl:apply-templates select="mn:name"/>
10155
+ <xsl:apply-templates select="mn:fmt-name"/>
10076
10156
  </xsl:variable>
10077
10157
  <xsl:copy-of select="$name"/>
10078
10158
  <xsl:if test="normalize-space($name) != ''">
@@ -10080,7 +10160,7 @@
10080
10160
  </xsl:if>
10081
10161
  </xsl:template>
10082
10162
 
10083
- <xsl:template match="mn:admonition/mn:name">
10163
+ <xsl:template match="mn:admonition/mn:fmt-name">
10084
10164
  <xsl:apply-templates/>
10085
10165
  </xsl:template>
10086
10166
 
@@ -10201,10 +10281,10 @@
10201
10281
  <xsl:call-template name="setNamedDestination"/>
10202
10282
  <fo:block id="{@id}"/>
10203
10283
 
10204
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
10284
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10205
10285
 
10206
10286
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10207
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
10287
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10208
10288
  </fo:block>
10209
10289
  </xsl:template> <!-- references -->
10210
10290
 
@@ -10520,7 +10600,8 @@
10520
10600
  </xsl:copy>
10521
10601
  </xsl:template>
10522
10602
 
10523
- <xsl:template match="mn:xref" mode="index_add_id">
10603
+ <xsl:template match="mn:xref" mode="index_add_id"/>
10604
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
10524
10605
  <xsl:param name="docid"/>
10525
10606
  <xsl:variable name="id">
10526
10607
  <xsl:call-template name="generateIndexXrefId">
@@ -10562,7 +10643,7 @@
10562
10643
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
10563
10644
  <xsl:copy>
10564
10645
  <xsl:apply-templates select="@*" mode="index_update"/>
10565
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
10646
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
10566
10647
  </xsl:copy>
10567
10648
  </xsl:template>
10568
10649
 
@@ -10583,11 +10664,11 @@
10583
10664
  <xsl:value-of select="."/>
10584
10665
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
10585
10666
  </xsl:when>
10586
- <xsl:when test="self::* and local-name(.) = 'xref'">
10667
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
10587
10668
  <xsl:variable name="id" select="@id"/>
10588
10669
 
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"/>
10670
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
10671
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
10591
10672
 
10592
10673
  <xsl:variable name="pages_">
10593
10674
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -10683,18 +10764,18 @@
10683
10764
  <xsl:variable name="item_number">
10684
10765
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
10685
10766
  </xsl:variable>
10686
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
10767
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
10687
10768
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
10688
10769
  </xsl:template>
10689
10770
 
10690
- <xsl:template match="mn:indexsect/mn:title" priority="4">
10771
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
10691
10772
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
10692
10773
  <!-- Index -->
10693
10774
  <xsl:apply-templates/>
10694
10775
  </fo:block>
10695
10776
  </xsl:template>
10696
10777
 
10697
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
10778
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
10698
10779
  <!-- Letter A, B, C, ... -->
10699
10780
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
10700
10781
  <xsl:apply-templates/>
@@ -10735,12 +10816,12 @@
10735
10816
  <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
10817
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
10737
10818
  <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]">
10819
+ <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
10820
  <!-- skip here, see the template 'fmt-review-start' -->
10740
10821
  </xsl:when>
10741
10822
  <xsl:otherwise>
10742
10823
  <!-- <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>
10824
+ <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
10825
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
10745
10826
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
10746
10827
  </xsl:otherwise>
@@ -10904,7 +10985,7 @@
10904
10985
 
10905
10986
  <xsl:template name="processTables_Contents">
10906
10987
  <mnx:tables>
10907
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
10988
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
10908
10989
  <xsl:choose>
10909
10990
  <xsl:when test="mn:fmt-name">
10910
10991
  <xsl:variable name="fmt_name">
@@ -10926,7 +11007,7 @@
10926
11007
 
10927
11008
  <xsl:template name="processFigures_Contents">
10928
11009
  <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) != '']">
11010
+ <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
11011
  <xsl:choose>
10931
11012
  <xsl:when test="mn:fmt-name">
10932
11013
  <xsl:variable name="fmt_name">
@@ -10955,7 +11036,7 @@
10955
11036
 
10956
11037
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
10957
11038
 
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">
11039
+ <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
11040
  <xsl:apply-templates mode="contents"/>
10960
11041
  <xsl:text> </xsl:text>
10961
11042
  </xsl:template>
@@ -10967,7 +11048,7 @@
10967
11048
  </xsl:if>
10968
11049
  </xsl:template>
10969
11050
 
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">
11051
+ <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
11052
  <xsl:apply-templates mode="bookmarks"/>
10972
11053
  <xsl:text> </xsl:text>
10973
11054
  </xsl:template>
@@ -10978,7 +11059,7 @@
10978
11059
  </xsl:if>
10979
11060
  </xsl:template>
10980
11061
 
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">
11062
+ <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
11063
  <xsl:value-of select="."/>
10983
11064
  </xsl:template>
10984
11065
 
@@ -10988,7 +11069,7 @@
10988
11069
  </xsl:if>
10989
11070
  </xsl:template>
10990
11071
 
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">
11072
+ <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
11073
  <xsl:value-of select="."/>
10993
11074
  </xsl:template>
10994
11075
 
@@ -11449,7 +11530,7 @@
11449
11530
  <xsl:value-of select="."/>
11450
11531
  </xsl:template>
11451
11532
 
11452
- <xsl:template match="mn:review" mode="contents_item"/>
11533
+ <xsl:template match="mn:annotation" mode="contents_item"/>
11453
11534
 
11454
11535
  <xsl:template match="mn:tab" mode="contents_item">
11455
11536
  <xsl:text> </xsl:text>
@@ -11604,7 +11685,7 @@
11604
11685
  <xsl:apply-templates/>
11605
11686
  </xsl:template>
11606
11687
 
11607
- <xsl:template match="mn:toc//mn:xref" priority="3">
11688
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
11608
11689
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11609
11690
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11610
11691
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -11672,8 +11753,8 @@
11672
11753
  <xsl:apply-templates mode="toc_table_width"/>
11673
11754
  </xsl:template>
11674
11755
 
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"/>
11756
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
11757
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
11677
11758
 
11678
11759
  <xsl:template match="mn:li" mode="toc_table_width">
11679
11760
  <mn:tr>
@@ -11681,7 +11762,7 @@
11681
11762
  </mn:tr>
11682
11763
  </xsl:template>
11683
11764
 
11684
- <xsl:template match="mn:xref" mode="toc_table_width">
11765
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
11685
11766
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11686
11767
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11687
11768
  <xsl:for-each select="mn:tab">
@@ -11760,10 +11841,10 @@
11760
11841
 
11761
11842
  </xsl:template> <!-- tab -->
11762
11843
 
11763
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
11764
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
11844
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
11845
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
11765
11846
 
11766
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
11847
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
11767
11848
  <xsl:attribute name="padding-right">6mm</xsl:attribute>
11768
11849
  </xsl:template>
11769
11850
 
@@ -11778,13 +11859,13 @@
11778
11859
  </xsl:template>
11779
11860
 
11780
11861
  <xsl:variable name="reviews_">
11781
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
11862
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
11782
11863
  <xsl:copy>
11783
11864
  <xsl:copy-of select="@from"/>
11784
11865
  <xsl:copy-of select="@id"/>
11785
11866
  </xsl:copy>
11786
11867
  </xsl:for-each>
11787
- <xsl:for-each select="//mn:fmt-review-start[@source]">
11868
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
11788
11869
  <xsl:copy>
11789
11870
  <xsl:copy-of select="@source"/>
11790
11871
  <xsl:copy-of select="@id"/>
@@ -11798,7 +11879,7 @@
11798
11879
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11799
11880
  <xsl:variable name="curr_id" select="@id"/>
11800
11881
  <!-- <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] -->
11882
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
11802
11883
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
11803
11884
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11804
11885
  <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 +11894,7 @@
11813
11894
 
11814
11895
  <!-- document text (not figures, or tables) footnotes -->
11815
11896
  <xsl:variable name="reviews_container_">
11816
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
11897
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
11817
11898
  <xsl:variable name="update_xml_step1">
11818
11899
  <xsl:apply-templates select="." mode="update_xml_step1"/>
11819
11900
  </xsl:variable>
@@ -11822,10 +11903,10 @@
11822
11903
  </xsl:variable>
11823
11904
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
11824
11905
 
11825
- <xsl:template match="mn:review-container"/>
11906
+ <xsl:template match="mn:annotation-container"/>
11826
11907
 
11827
11908
  <!-- 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 -->
11909
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11829
11910
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
11830
11911
  <xsl:if test="$isGenerateTableIF = 'false'">
11831
11912
  <xsl:choose>
@@ -11845,7 +11926,7 @@
11845
11926
  </xsl:template>
11846
11927
 
11847
11928
  <!-- 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 -->
11929
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11849
11930
  <!-- comment 2019-11-29 -->
11850
11931
  <!-- <fo:block font-weight="bold">Review:</fo:block>
11851
11932
  <xsl:apply-templates /> -->
@@ -11901,7 +11982,7 @@
11901
11982
  </xsl:template>
11902
11983
 
11903
11984
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
11904
- <xsl:template match="mn:review[@type = 'other']"/>
11985
+ <xsl:template match="mn:annotation[@type = 'other']"/>
11905
11986
 
11906
11987
  <!-- ============ -->
11907
11988
  <!-- errata -->
@@ -12294,9 +12375,12 @@
12294
12375
  <xsl:choose>
12295
12376
  <xsl:when test="mn:fmt-title">
12296
12377
  <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)]"/>
12378
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
12298
12379
  </xsl:variable>
12299
12380
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
12381
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
12382
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
12383
+ </xsl:if>
12300
12384
  </xsl:when>
12301
12385
  <xsl:otherwise>
12302
12386
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -12309,6 +12393,9 @@
12309
12393
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
12310
12394
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
12311
12395
  </xsl:when>
12396
+ <xsl:when test="mn:fmt-title/mn:tab">
12397
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
12398
+ </xsl:when>
12312
12399
  <xsl:when test="mn:fmt-title">
12313
12400
  <xsl:copy-of select="mn:fmt-title/node()"/>
12314
12401
  </xsl:when>
@@ -12450,10 +12537,10 @@
12450
12537
 
12451
12538
  </fo:block>
12452
12539
 
12453
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
12540
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
12454
12541
 
12455
12542
  <fo:block>
12456
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
12543
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
12457
12544
  </fo:block>
12458
12545
  </xsl:otherwise>
12459
12546
  </xsl:choose>
@@ -12462,7 +12549,7 @@
12462
12549
  <xsl:template name="refine_annex_style">
12463
12550
  </xsl:template>
12464
12551
 
12465
- <xsl:template match="mn:name/text()">
12552
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
12466
12553
  <!-- 0xA0 to space replacement -->
12467
12554
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
12468
12555
  </xsl:template>
@@ -12518,28 +12605,28 @@
12518
12605
  <xsl:template match="mn:amend"/>
12519
12606
 
12520
12607
  <!-- fmt-title renamed to title in update_xml_step1 -->
12521
- <xsl:template match="mn:fmt-title"/>
12608
+ <!-- <xsl:template match="mn:fmt-title" /> -->
12522
12609
 
12523
12610
  <!-- fmt-name renamed to name in update_xml_step1 -->
12524
- <xsl:template match="mn:fmt-name"/>
12611
+ <!-- <xsl:template match="mn:fmt-name" /> -->
12525
12612
 
12526
12613
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
12527
- <xsl:template match="mn:fmt-preferred"/>
12614
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
12528
12615
 
12529
12616
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
12530
- <xsl:template match="mn:fmt-admitted"/>
12617
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
12531
12618
 
12532
12619
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
12533
- <xsl:template match="mn:fmt-deprecates"/>
12620
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
12534
12621
 
12535
12622
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
12536
- <xsl:template match="mn:fmt-definition"/>
12623
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
12537
12624
 
12538
12625
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
12539
- <xsl:template match="mn:fmt-termsource"/>
12626
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
12540
12627
 
12541
12628
  <!-- fmt-source renamed to source in update_xml_step1 -->
12542
- <xsl:template match="mn:fmt-source"/>
12629
+ <!-- <xsl:template match="mn:fmt-source" /> -->
12543
12630
 
12544
12631
  <xsl:template match="mn:semx">
12545
12632
  <xsl:apply-templates/>
@@ -12984,12 +13071,12 @@
12984
13071
  <xsl:when test="ancestor::mn:preface">
12985
13072
  <xsl:value-of select="$level_total - 2"/>
12986
13073
  </xsl:when>
12987
- <xsl:when test="ancestor::mn:sections and self::mn:title">
13074
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
12988
13075
  <!-- determine 'depth' depends on upper clause with title/@depth -->
12989
13076
  <!-- <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"/>
13077
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
12991
13078
  <!-- <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::*)"/>
13079
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
12993
13080
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
12994
13081
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
12995
13082
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -13005,8 +13092,8 @@
13005
13092
  </xsl:otherwise>
13006
13093
  </xsl:choose>
13007
13094
  </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)"/>
13095
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
13096
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
13010
13097
  <xsl:choose>
13011
13098
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
13012
13099
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -13017,7 +13104,7 @@
13017
13104
  </xsl:choose>
13018
13105
  </xsl:when>
13019
13106
  <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)"/>
13107
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
13021
13108
  <xsl:choose>
13022
13109
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13023
13110
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13033,8 +13120,8 @@
13033
13120
  <xsl:when test="parent::mn:annex">
13034
13121
  <xsl:value-of select="$level_total - 1"/>
13035
13122
  </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)"/>
13123
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
13124
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
13038
13125
  <xsl:choose>
13039
13126
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13040
13127
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13067,7 +13154,7 @@
13067
13154
  </xsl:when>
13068
13155
  <xsl:otherwise>
13069
13156
  <xsl:variable name="title_level_">
13070
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
13157
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
13071
13158
  <xsl:call-template name="getLevel"/>
13072
13159
  </xsl:for-each>
13073
13160
  </xsl:variable>
@@ -13144,15 +13231,17 @@
13144
13231
  </xsl:template>
13145
13232
 
13146
13233
  <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}"/>
13234
+ <xsl:if test="$isGenerateTableIF = 'false'">
13235
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13236
+ <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'">
13237
+ <fox:destination internal-destination="{@id}"/>
13154
13238
  </xsl:if>
13155
- </xsl:for-each>
13239
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
13240
+ <xsl:if test="@named_dest">
13241
+ <fox:destination internal-destination="{@named_dest}"/>
13242
+ </xsl:if>
13243
+ </xsl:for-each>
13244
+ </xsl:if>
13156
13245
  </xsl:template>
13157
13246
 
13158
13247
  <xsl:template name="add-letter-spacing">
@@ -13500,7 +13589,7 @@
13500
13589
  </xsl:when>
13501
13590
  <xsl:otherwise>
13502
13591
  <!-- 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())">
13592
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13504
13593
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13505
13594
  </xsl:if>
13506
13595
  <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 +13623,7 @@
13534
13623
  </fo:block>
13535
13624
  </fo:block-container>
13536
13625
  </fo:inline-container>
13537
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
13626
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
13538
13627
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13539
13628
  </xsl:if>
13540
13629
  </xsl:otherwise>