metanorma-iec 1.2.1 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +44 -0
  3. data/lib/asciidoctor/iec/basicdoc.rng +23 -0
  4. data/lib/asciidoctor/iec/converter.rb +1 -0
  5. data/lib/asciidoctor/iec/front.rb +9 -7
  6. data/lib/asciidoctor/iec/iec.rng +7 -0
  7. data/lib/asciidoctor/iec/isodoc.rng +125 -58
  8. data/lib/asciidoctor/iec/isostandard.rng +8 -1
  9. data/lib/isodoc/iec/base_convert.rb +0 -20
  10. data/lib/isodoc/iec/html/htmlstyle.css +5 -1
  11. data/lib/isodoc/iec/html/isodoc.css +16 -4
  12. data/lib/isodoc/iec/html/isodoc.scss +19 -4
  13. data/lib/isodoc/iec/html/wordstyle.css +10 -10
  14. data/lib/isodoc/iec/html/wordstyle.scss +15 -10
  15. data/lib/isodoc/iec/iec.international-standard.xsl +1279 -391
  16. data/lib/metanorma/iec/version.rb +1 -1
  17. data/metanorma-iec.gemspec +1 -1
  18. data/spec/asciidoctor-iec/base_spec.rb +14 -5
  19. data/spec/asciidoctor-iec/cleanup_spec.rb +30 -6
  20. data/spec/asciidoctor-iec/iev_spec.rb +3 -3
  21. data/spec/asciidoctor-iec/inline_spec.rb +7 -1
  22. data/spec/asciidoctor-iec/validate_spec.rb +21 -1
  23. data/spec/assets/xref_error.adoc +7 -0
  24. data/spec/isodoc/blocks_spec.rb +1 -1
  25. data/spec/isodoc/i18n_spec.rb +9 -9
  26. data/spec/isodoc/iev_spec.rb +13 -17
  27. data/spec/isodoc/inline_spec.rb +1 -1
  28. data/spec/isodoc/metadata_spec.rb +36 -23
  29. data/spec/isodoc/ref_spec.rb +15 -15
  30. data/spec/isodoc/section_spec.rb +2 -2
  31. data/spec/isodoc/terms_spec.rb +1 -1
  32. data/spec/spec_helper.rb +5 -1
  33. metadata +6 -7
  34. data/.github/workflows/macos.yml +0 -38
  35. data/.github/workflows/ubuntu.yml +0 -56
  36. data/.github/workflows/windows.yml +0 -40
@@ -16,7 +16,7 @@ fieldset, form, label, legend,
16
16
  table, caption, tbody, tfoot, thead, tr, th, td,
17
17
  article, aside, canvas, details, embed,
18
18
  figure, figcaption, footer, header, hgroup,
19
- menu, nav, output, ruby, section, summary,
19
+ menu, output, ruby, section, summary,
20
20
  time, mark, audio, video {
21
21
  margin: 0;
22
22
  padding: 0; }
@@ -111,6 +111,10 @@ b, strong {
111
111
  div.document-stage-band, div.document-type-band {
112
112
  background-color: #333333; }
113
113
 
114
+ a.FootnoteRef + a.FootnoteRef:before {
115
+ content: ", ";
116
+ vertical-align: super; }
117
+
114
118
  #standard-band {
115
119
  background-color: #0AC442; }
116
120
 
@@ -634,7 +634,7 @@ table.figdl {
634
634
  margin-left: 0cm;
635
635
  margin-right: 0cm; }
636
636
 
637
- table.MsoISOTable {
637
+ table.MsoISOTable, table.MsoISOTableBig {
638
638
  mso-style-name: "Table ISO";
639
639
  mso-tstyle-rowband-size: 0;
640
640
  mso-tstyle-colband-size: 0;
@@ -655,17 +655,17 @@ table.MsoISOTable {
655
655
  font-size: 10.0pt;
656
656
  font-family: {{bodyfont}}; }
657
657
 
658
- table.MsoISOTable th {
658
+ table.MsoISOTable th, table.MsoISOTableBig th {
659
659
  border: solid windowtext 1pt;
660
660
  mso-border-alt: solid windowtext 1pt;
661
661
  padding: 0cm 2.85pt 0cm 2.85pt; }
662
662
 
663
- table.MsoISOTable td {
663
+ table.MsoISOTable td, table.MsoISOTableBig td {
664
664
  border: solid windowtext 1pt;
665
665
  mso-border-alt: solid windowtext 1pt;
666
666
  padding: 0cm 2.85pt 0cm 2.85pt; }
667
667
 
668
- table.MsoISOTable p {
668
+ table.MsoISOTable p, table.MsoISOTableBig p {
669
669
  font-size: 10.0pt; }
670
670
 
671
671
  table.MsoTableGrid {
@@ -830,8 +830,20 @@ div.example p.MsoListParagraph {
830
830
  font-size: 10.0pt; }
831
831
 
832
832
  div.Note p.MsoListParagraph {
833
+ font-size: 8.0pt;
834
+ margin-left: 1.0cm; }
835
+
836
+ div.Note span.stem {
833
837
  font-size: 8.0pt; }
834
838
 
839
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
840
+ font-size: 8.0pt;
841
+ margin-left: 1.0cm; }
842
+
843
+ div.Note table.dl {
844
+ font-size: 8.0pt;
845
+ margin-left: 1.0cm; }
846
+
835
847
  div.example, td.example {
836
848
  margin: 0in;
837
849
  margin-bottom: 12.0pt; }
@@ -608,7 +608,7 @@ table.figdl
608
608
  margin-right: 0cm;
609
609
  }
610
610
 
611
- table.MsoISOTable
611
+ table.MsoISOTable, table.MsoISOTableBig
612
612
  {mso-style-name:"Table ISO";
613
613
  mso-tstyle-rowband-size:0;
614
614
  mso-tstyle-colband-size:0;
@@ -628,15 +628,15 @@ table.MsoISOTable
628
628
  mso-border-insidev:.75pt solid windowtext;
629
629
  font-size:10.0pt;
630
630
  font-family:$bodyfont;}
631
- table.MsoISOTable th
631
+ table.MsoISOTable th, table.MsoISOTableBig th
632
632
  {border:solid windowtext 1pt;
633
633
  mso-border-alt:solid windowtext 1pt;
634
634
  padding:0cm 2.85pt 0cm 2.85pt;}
635
- table.MsoISOTable td
635
+ table.MsoISOTable td, table.MsoISOTableBig td
636
636
  {border:solid windowtext 1pt;
637
637
  mso-border-alt:solid windowtext 1pt;
638
638
  padding:0cm 2.85pt 0cm 2.85pt;}
639
- table.MsoISOTable p
639
+ table.MsoISOTable p, table.MsoISOTableBig p
640
640
  {font-size:10.0pt; }
641
641
  table.MsoTableGrid
642
642
  {mso-style-name:"Table Grid";
@@ -816,8 +816,23 @@ div.example p.MsoListParagraph {
816
816
 
817
817
  div.Note p.MsoListParagraph {
818
818
  font-size: 8.0pt;
819
+ margin-left: 1.0cm;
819
820
  }
820
821
 
822
+ div.Note span.stem {
823
+ font-size: 8.0pt; }
824
+
825
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
826
+ font-size: 8.0pt;
827
+ margin-left: 1.0cm;
828
+ }
829
+
830
+ div.Note table.dl {
831
+ font-size: 8.0pt;
832
+ margin-left: 1.0cm;
833
+ }
834
+
835
+
821
836
  div.example, td.example {
822
837
  margin:0in;
823
838
  margin-bottom:12.0pt;
@@ -277,7 +277,6 @@ h1
277
277
  text-indent: -31.2pt;
278
278
  mso-pagination: widow-orphan;
279
279
  page-break-after: avoid;
280
- mso-outline-level: 2;
281
280
  mso-hyphenate: none;
282
281
  tab-stops: list 31.2pt;
283
282
  layout-grid-mode: char;
@@ -289,7 +288,8 @@ h1
289
288
  font-weight: bold; }
290
289
 
291
290
  h2 {
292
- mso-list: l26 level2 lfo40; }
291
+ mso-list: l26 level2 lfo40;
292
+ mso-outline-level: 2; }
293
293
 
294
294
  .h3Annex, h3 {
295
295
  mso-style-unhide: no;
@@ -304,7 +304,6 @@ h2 {
304
304
  text-indent: -42.55pt;
305
305
  mso-pagination: widow-orphan;
306
306
  page-break-after: avoid;
307
- mso-outline-level: 3;
308
307
  mso-hyphenate: none;
309
308
  tab-stops: list 42.55pt;
310
309
  layout-grid-mode: char;
@@ -316,7 +315,8 @@ h2 {
316
315
  font-weight: bold; }
317
316
 
318
317
  h3 {
319
- mso-list: l26 level3 lfo40; }
318
+ mso-list: l26 level3 lfo40;
319
+ mso-outline-level: 3; }
320
320
 
321
321
  .h4Annex, h4 {
322
322
  mso-style-unhide: no;
@@ -331,7 +331,6 @@ h3 {
331
331
  text-indent: -53.85pt;
332
332
  mso-pagination: widow-orphan;
333
333
  page-break-after: avoid;
334
- mso-outline-level: 4;
335
334
  mso-hyphenate: none;
336
335
  tab-stops: list 53.85pt;
337
336
  layout-grid-mode: char;
@@ -343,7 +342,8 @@ h3 {
343
342
  font-weight: bold; }
344
343
 
345
344
  h4 {
346
- mso-list: l26 level2 lfo40; }
345
+ mso-list: l26 level2 lfo40;
346
+ mso-outline-level: 4; }
347
347
 
348
348
  .h5Annex, h5 {
349
349
  mso-style-unhide: no;
@@ -358,7 +358,6 @@ h4 {
358
358
  text-indent: -65.2pt;
359
359
  mso-pagination: widow-orphan;
360
360
  page-break-after: avoid;
361
- mso-outline-level: 5;
362
361
  mso-hyphenate: none;
363
362
  tab-stops: list 65.2pt;
364
363
  layout-grid-mode: char;
@@ -370,7 +369,8 @@ h4 {
370
369
  font-weight: bold; }
371
370
 
372
371
  h5 {
373
- mso-list: l26 level5 lfo40; }
372
+ mso-list: l26 level5 lfo40;
373
+ mso-outline-level: 5; }
374
374
 
375
375
  h6 {
376
376
  mso-style-unhide: no;
@@ -385,7 +385,6 @@ h6 {
385
385
  text-indent: -76.55pt;
386
386
  mso-pagination: widow-orphan;
387
387
  page-break-after: avoid;
388
- mso-outline-level: 6;
389
388
  mso-hyphenate: none;
390
389
  tab-stops: list 76.55pt;
391
390
  layout-grid-mode: char;
@@ -397,7 +396,8 @@ h6 {
397
396
  font-weight: bold; }
398
397
 
399
398
  h6 {
400
- mso-list: l26 level6 lfo40; }
399
+ mso-list: l26 level6 lfo40;
400
+ mso-outline-level: 6; }
401
401
 
402
402
  p.MsoHeading7, li.MsoHeading7, div.MsoHeading7 {
403
403
  mso-style-unhide: no;
@@ -258,7 +258,6 @@ h1
258
258
  text-indent:-31.2pt;
259
259
  mso-pagination:widow-orphan;
260
260
  page-break-after:avoid;
261
- mso-outline-level:2;
262
261
  mso-hyphenate:none;
263
262
  tab-stops:list 31.2pt;
264
263
  layout-grid-mode:char;
@@ -269,7 +268,9 @@ h1
269
268
  mso-fareast-language:ZH-CN;
270
269
  font-weight:bold;}
271
270
  h2
272
- { mso-list:l26 level2 lfo40;}
271
+ { mso-list:l26 level2 lfo40;
272
+ mso-outline-level:2;
273
+ }
273
274
  .h3Annex, h3
274
275
  {mso-style-unhide:no;
275
276
  mso-style-qformat:yes;
@@ -283,7 +284,6 @@ h2
283
284
  text-indent:-42.55pt;
284
285
  mso-pagination:widow-orphan;
285
286
  page-break-after:avoid;
286
- mso-outline-level:3;
287
287
  mso-hyphenate:none;
288
288
  tab-stops:list 42.55pt;
289
289
  layout-grid-mode:char;
@@ -293,7 +293,9 @@ h2
293
293
  mso-ansi-language:EN-GB;
294
294
  mso-fareast-language:ZH-CN;
295
295
  font-weight:bold;}
296
- h3 {mso-list:l26 level3 lfo40;}
296
+ h3 {mso-list:l26 level3 lfo40;
297
+ mso-outline-level:3;
298
+ }
297
299
  .h4Annex, h4
298
300
  {mso-style-unhide:no;
299
301
  mso-style-qformat:yes;
@@ -307,7 +309,6 @@ h3 {mso-list:l26 level3 lfo40;}
307
309
  text-indent:-53.85pt;
308
310
  mso-pagination:widow-orphan;
309
311
  page-break-after:avoid;
310
- mso-outline-level:4;
311
312
  mso-hyphenate:none;
312
313
  tab-stops:list 53.85pt;
313
314
  layout-grid-mode:char;
@@ -317,7 +318,9 @@ h3 {mso-list:l26 level3 lfo40;}
317
318
  mso-ansi-language:EN-GB;
318
319
  mso-fareast-language:ZH-CN;
319
320
  font-weight:bold;}
320
- h4 {mso-list:l26 level2 lfo40;}
321
+ h4 {mso-list:l26 level2 lfo40;
322
+ mso-outline-level:4;
323
+ }
321
324
  .h5Annex, h5
322
325
  {mso-style-unhide:no;
323
326
  mso-style-qformat:yes;
@@ -331,7 +334,6 @@ h4 {mso-list:l26 level2 lfo40;}
331
334
  text-indent:-65.2pt;
332
335
  mso-pagination:widow-orphan;
333
336
  page-break-after:avoid;
334
- mso-outline-level:5;
335
337
  mso-hyphenate:none;
336
338
  tab-stops:list 65.2pt;
337
339
  layout-grid-mode:char;
@@ -341,7 +343,9 @@ h4 {mso-list:l26 level2 lfo40;}
341
343
  mso-ansi-language:EN-GB;
342
344
  mso-fareast-language:ZH-CN;
343
345
  font-weight:bold;}
344
- h5 {mso-list:l26 level5 lfo40;}
346
+ h5 {mso-list:l26 level5 lfo40;
347
+ mso-outline-level:5;
348
+ }
345
349
  h6
346
350
  {mso-style-unhide:no;
347
351
  mso-style-qformat:yes;
@@ -355,7 +359,6 @@ h6
355
359
  text-indent:-76.55pt;
356
360
  mso-pagination:widow-orphan;
357
361
  page-break-after:avoid;
358
- mso-outline-level:6;
359
362
  mso-hyphenate:none;
360
363
  tab-stops:list 76.55pt;
361
364
  layout-grid-mode:char;
@@ -365,7 +368,9 @@ h6
365
368
  mso-ansi-language:EN-GB;
366
369
  mso-fareast-language:ZH-CN;
367
370
  font-weight:bold;}
368
- h6 {mso-list:l26 level6 lfo40;}
371
+ h6 {mso-list:l26 level6 lfo40;
372
+ mso-outline-level:6;
373
+ }
369
374
  p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
370
375
  {mso-style-unhide:no;
371
376
  mso-style-qformat:yes;
@@ -17,7 +17,7 @@
17
17
 
18
18
 
19
19
 
20
- <xsl:variable name="debug">false</xsl:variable>
20
+ <xsl:variable name="debug">true</xsl:variable>
21
21
  <xsl:variable name="pageWidth" select="'210mm'"/>
22
22
  <xsl:variable name="pageHeight" select="'297mm'"/>
23
23
 
@@ -70,7 +70,11 @@
70
70
  <xsl:when test="$stage-abbreviation = 'AWI'">APPROVED WORK ITEM</xsl:when>
71
71
  <xsl:when test="$stage-abbreviation = 'WD'">WORKING DRAFT</xsl:when>
72
72
  <xsl:when test="$stage-abbreviation = 'CD'">COMMITTEE DRAFT</xsl:when>
73
+ <xsl:when test="$stage-abbreviation = 'CD-TSTR'">COMMITTEE DRAFT</xsl:when>
73
74
  <xsl:when test="$stage-abbreviation = 'CDV'">COMMITTEE DRAFT FOR VOTE</xsl:when>
75
+ <xsl:when test="$stage-abbreviation = 'DTS'">DRAFT TECHNICAL SPECIFICATION</xsl:when>
76
+ <xsl:when test="$stage-abbreviation = 'DTR'">DRAFT TECHNICAL REPORT</xsl:when>
77
+ <xsl:when test="$stage-abbreviation = 'DPAS'">DRAFT PUBLICLY AVAILABLE SPECIFICATION</xsl:when>
74
78
  <xsl:when test="$stage-abbreviation = 'DIS'">DRAFT INTERNATIONAL STANDARD</xsl:when>
75
79
  <xsl:when test="$stage-abbreviation = 'FDIS'">FINAL DRAFT INTERNATIONAL STANDARD</xsl:when>
76
80
  <xsl:otherwise><xsl:value-of select="$doctype_uppercased"/></xsl:otherwise>
@@ -86,7 +90,7 @@
86
90
  <xsl:variable name="docid">
87
91
  <xsl:call-template name="getDocumentId"/>
88
92
  </xsl:variable>
89
- <doc id="{$docid}">
93
+ <doc id="{$docid}" lang="{$lang}">
90
94
  <xsl:call-template name="generateContents"/>
91
95
  </doc>
92
96
 
@@ -104,7 +108,7 @@
104
108
  <xsl:variable name="docid">
105
109
  <xsl:call-template name="getDocumentId"/>
106
110
  </xsl:variable>
107
- <doc id="{$docid}">
111
+ <doc id="{$docid}" lang="{$lang}">
108
112
  <xsl:call-template name="generateContents"/>
109
113
  </doc>
110
114
  </xsl:for-each>
@@ -116,24 +120,8 @@
116
120
 
117
121
  <xsl:template name="generateContents">
118
122
  <contents>
119
-
120
- <xsl:apply-templates select="/iec:iec-standard/iec:preface/node()" mode="contents"/>
121
-
122
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]" mode="contents"/> <!-- [@id = '_scope'] -->
123
-
124
- <!-- Normative references -->
125
- <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]" mode="contents"/> <!-- [@id = '_normative_references'] -->
126
-
127
- <!-- Terms and definitions -->
128
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:terms" mode="contents"/>
129
-
130
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]" mode="contents"/>
131
-
132
- <xsl:apply-templates select="/iec:iec-standard/iec:annex" mode="contents"/>
133
-
134
- <!-- Bibliography -->
135
- <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]" mode="contents"/> <!-- @id = '_bibliography' -->
136
-
123
+ <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
124
+ <xsl:call-template name="processMainSectionsDefault_Contents"/>
137
125
  </contents>
138
126
  </xsl:template>
139
127
 
@@ -148,7 +136,7 @@
148
136
  <xsl:call-template name="namespaceCheck"/>
149
137
  <!-- https://stackoverflow.com/questions/25261949/xsl-fo-letter-spacing-with-text-align -->
150
138
  <!-- https://xmlgraphics.apache.org/fop/knownissues.html -->
151
- <fo:root font-family="Arial, Times New Roman, STIX2Math, HanSans" font-size="10pt" xml:lang="{$lang}">
139
+ <fo:root font-family="Arial, Times New Roman, STIX Two Math, HanSans" font-size="10pt" xml:lang="{$lang}">
152
140
  <fo:layout-master-set>
153
141
  <!-- cover pages -->
154
142
  <fo:simple-page-master master-name="cover" page-width="{$pageWidth}" page-height="{$pageHeight}">
@@ -203,6 +191,10 @@
203
191
 
204
192
  <xsl:call-template name="addPDFUAmeta"/>
205
193
 
194
+ <xsl:call-template name="addBookmarks">
195
+ <xsl:with-param name="contents" select="$contents"/>
196
+ </xsl:call-template>
197
+
206
198
  <!-- For 'Published' documents insert two cover pages -->
207
199
  <xsl:if test="$stage &gt;= 60">
208
200
 
@@ -524,7 +516,7 @@
524
516
  </xsl:if>
525
517
 
526
518
  <!-- for non-published documents insert cover page (2nd for FDIS) ) -->
527
- <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'FDIS'">
519
+ <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS' or $stage-abbreviation = 'FDIS'">
528
520
  <!-- circulation cover page -->
529
521
  <fo:page-sequence master-reference="cover-FDIS" force-page-count="no-force">
530
522
  <fo:static-content flow-name="footer-FDIS">
@@ -701,119 +693,132 @@
701
693
  </fo:block>
702
694
  </fo:table-cell>
703
695
  </fo:table-row>
704
- <fo:table-row height="12mm">
696
+ <fo:table-row height="12mm">
705
697
  <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
698
+ <xsl:if test="not($stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD')">
699
+ <xsl:attribute name="number-columns-spanned">2</xsl:attribute>
700
+ </xsl:if>
706
701
  <fo:block font-size="6.5pt" margin-bottom="6pt">
707
702
  <xsl:call-template name="addLetterSpacingSmallCaps">
708
703
  <xsl:with-param name="text" select="'Of interest to the following committees:'"/>
709
704
  </xsl:call-template>
710
705
  </fo:block>
711
706
  </fo:table-cell>
712
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
713
- <fo:block font-size="6.5pt" margin-bottom="6pt">
714
- <xsl:if test="$stage-abbreviation = 'FDIS'">
707
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
708
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
709
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
710
+ <xsl:if test="$stage-abbreviation = 'FDIS'">
711
+ <xsl:call-template name="addLetterSpacingSmallCaps">
712
+ <xsl:with-param name="text" select="'horizontal standard:'"/>
713
+ </xsl:call-template>
714
+ </xsl:if>
715
+ <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
716
+ <xsl:call-template name="addLetterSpacingSmallCaps">
717
+ <xsl:with-param name="text" select="'Proposed horizontal standard:'"/>
718
+ </xsl:call-template>
719
+ </xsl:if>
720
+ </fo:block>
721
+
722
+ <fo:block>
723
+ <xsl:call-template name="insertCheckBoxOff"/>
724
+ </fo:block>
725
+
726
+ <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
727
+ <fo:block-container background-color="rgb(236, 232, 232)" margin-left="-2mm" margin-right="-2mm">
728
+ <fo:block-container margin-left="1mm" margin-right="1mm">
729
+ <fo:block font-size="8pt" padding="2mm">
730
+ <xsl:call-template name="addLetterSpacing">
731
+ <xsl:with-param name="text" select="'Other TC/SCs are requested to indicate their interest, if any, in this CDV to the secretary.'"/>
732
+ </xsl:call-template>
733
+ </fo:block>
734
+ </fo:block-container>
735
+ </fo:block-container>
736
+ </xsl:if>
737
+ </fo:table-cell>
738
+ </xsl:if>
739
+ </fo:table-row>
740
+
741
+ <xsl:if test="not($stage-abbreviation = 'DPAS')">
742
+ <fo:table-row height="10mm">
743
+ <fo:table-cell padding="1.5mm" padding-bottom="0mm">
744
+ <fo:block font-size="6.5pt" margin-bottom="4pt">
715
745
  <xsl:call-template name="addLetterSpacingSmallCaps">
716
- <xsl:with-param name="text" select="'horizontal standard:'"/>
746
+ <xsl:with-param name="text" select="'Functions concerned:'"/>
717
747
  </xsl:call-template>
718
- </xsl:if>
719
- <xsl:if test="$stage-abbreviation = 'CDV'">
748
+ </fo:block>
749
+ <fo:block font-size="6.5pt">
750
+ <xsl:call-template name="insertCheckBoxOff"/>
720
751
  <xsl:call-template name="addLetterSpacingSmallCaps">
721
- <xsl:with-param name="text" select="'Proposed horizontal standard:'"/>
752
+ <xsl:with-param name="text" select="'EMC'"/>
722
753
  </xsl:call-template>
723
- </xsl:if>
724
- </fo:block>
725
- <fo:block>
726
- <xsl:call-template name="insertCheckBoxOff"/>
727
- </fo:block>
728
- <xsl:if test="$stage-abbreviation = 'CDV'">
729
- <fo:block-container background-color="rgb(236, 232, 232)" margin-left="-2mm" margin-right="-2mm">
730
- <fo:block-container margin-left="1mm" margin-right="1mm">
731
- <fo:block font-size="8pt" padding="2mm">
732
- <xsl:call-template name="addLetterSpacing">
733
- <xsl:with-param name="text" select="'Other TC/SCs are requested to indicate their interest, if any, in this CDV to the secretary.'"/>
734
- </xsl:call-template>
735
- </fo:block>
736
- </fo:block-container>
737
- </fo:block-container>
738
- </xsl:if>
739
- </fo:table-cell>
740
- </fo:table-row>
741
- <fo:table-row height="10mm">
742
- <fo:table-cell padding="1.5mm" padding-bottom="0mm">
743
- <fo:block font-size="6.5pt" margin-bottom="4pt">
744
- <xsl:call-template name="addLetterSpacingSmallCaps">
745
- <xsl:with-param name="text" select="'Functions concerned:'"/>
746
- </xsl:call-template>
747
- </fo:block>
748
- <fo:block font-size="6.5pt">
749
- <xsl:call-template name="insertCheckBoxOff"/>
750
- <xsl:call-template name="addLetterSpacingSmallCaps">
751
- <xsl:with-param name="text" select="'EMC'"/>
752
- </xsl:call-template>
753
- <fo:inline padding-right="33mm"> </fo:inline>
754
- <xsl:call-template name="insertCheckBoxOff"/>
755
- <xsl:call-template name="addLetterSpacingSmallCaps">
756
- <xsl:with-param name="text" select="'Environment'"/>
757
- </xsl:call-template>
758
- </fo:block>
759
- </fo:table-cell>
760
- <fo:table-cell padding="1.5mm" padding-bottom="0mm">
761
- <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
762
- <fo:block font-size="6.5pt">
763
- <xsl:call-template name="insertCheckBoxOff"/>
764
- <xsl:call-template name="addLetterSpacingSmallCaps">
765
- <xsl:with-param name="text" select="'Quality assurance'"/>
766
- </xsl:call-template>
767
- <fo:inline padding-right="13mm"> </fo:inline>
768
- <xsl:call-template name="insertCheckBoxOn"/>
769
- <xsl:call-template name="addLetterSpacingSmallCaps">
770
- <xsl:with-param name="text" select="'Safety'"/>
771
- </xsl:call-template>
772
- </fo:block>
773
- </fo:table-cell>
774
- </fo:table-row>
775
- <fo:table-row>
776
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
777
- <fo:block font-size="6.5pt" margin-bottom="12pt">
778
- <xsl:call-template name="insertCheckBoxOn"/>
779
- <xsl:call-template name="addLetterSpacingSmallCaps">
780
- <xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
781
- </xsl:call-template>
782
- </fo:block>
783
- <fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt">
784
- <xsl:call-template name="addLetterSpacing">
785
- <xsl:with-param name="text" select="'Attention IEC-CENELEC parallel voting'"/>
786
- </xsl:call-template>
787
- </fo:block>
788
-
789
-
790
- <fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
791
- <xsl:if test="$stage-abbreviation = 'FDIS'">
754
+ <fo:inline padding-right="33mm"> </fo:inline>
755
+ <xsl:call-template name="insertCheckBoxOff"/>
756
+ <xsl:call-template name="addLetterSpacingSmallCaps">
757
+ <xsl:with-param name="text" select="'Environment'"/>
758
+ </xsl:call-template>
759
+ </fo:block>
760
+ </fo:table-cell>
761
+ <fo:table-cell padding="1.5mm" padding-bottom="0mm">
762
+ <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
763
+ <fo:block font-size="6.5pt">
764
+ <xsl:call-template name="insertCheckBoxOff"/>
765
+ <xsl:call-template name="addLetterSpacingSmallCaps">
766
+ <xsl:with-param name="text" select="'Quality assurance'"/>
767
+ </xsl:call-template>
768
+ <fo:inline padding-right="13mm"> </fo:inline>
769
+ <xsl:call-template name="insertCheckBoxOn"/>
770
+ <xsl:call-template name="addLetterSpacingSmallCaps">
771
+ <xsl:with-param name="text" select="'Safety'"/>
772
+ </xsl:call-template>
773
+ </fo:block>
774
+ </fo:table-cell>
775
+ </fo:table-row>
776
+ </xsl:if>
777
+
778
+ <xsl:if test="not($stage-abbreviation = 'CD' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS')">
779
+
780
+ <fo:table-row>
781
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
782
+ <fo:block font-size="6.5pt" margin-bottom="12pt">
783
+ <xsl:call-template name="insertCheckBoxOn"/>
784
+ <xsl:call-template name="addLetterSpacingSmallCaps">
785
+ <xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
786
+ </xsl:call-template>
787
+ </fo:block>
788
+ <fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt">
792
789
  <xsl:call-template name="addLetterSpacing">
793
- <xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Final Draft International Standard (FDIS) is submitted for parallel voting.'"/>
790
+ <xsl:with-param name="text" select="'Attention IEC-CENELEC parallel voting'"/>
794
791
  </xsl:call-template>
795
- </xsl:if>
796
- <xsl:if test="$stage-abbreviation = 'CDV'">
792
+ </fo:block>
793
+
794
+ <fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
795
+ <xsl:if test="$stage-abbreviation = 'FDIS'">
796
+ <xsl:call-template name="addLetterSpacing">
797
+ <xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Final Draft International Standard (FDIS) is submitted for parallel voting.'"/>
798
+ </xsl:call-template>
799
+ </xsl:if>
800
+ <xsl:if test="$stage-abbreviation = 'CDV'">
801
+ <xsl:call-template name="addLetterSpacing">
802
+ <xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Committee Draft for Vote (CDV) is submitted for parallel voting.'"/>
803
+ </xsl:call-template>
804
+ </xsl:if>
805
+ </fo:block>
806
+ <fo:block font-size="8pt" margin-bottom="10pt">
797
807
  <xsl:call-template name="addLetterSpacing">
798
- <xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Committee Draft for Vote (CDV) is submitted for parallel voting.'"/>
808
+ <xsl:with-param name="text" select="'The CENELEC members are invited to vote through the CENELEC online voting system.'"/>
799
809
  </xsl:call-template>
800
- </xsl:if>
801
- </fo:block>
802
- <fo:block font-size="8pt" margin-bottom="10pt">
803
- <xsl:call-template name="addLetterSpacing">
804
- <xsl:with-param name="text" select="'The CENELEC members are invited to vote through the CENELEC online voting system.'"/>
805
- </xsl:call-template>
806
- </fo:block>
807
- </fo:table-cell>
808
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
809
- <fo:block font-size="6.5pt" margin-bottom="6pt">
810
- <xsl:call-template name="insertCheckBoxOff"/>
811
- <xsl:call-template name="addLetterSpacingSmallCaps">
812
- <xsl:with-param name="text" select="'Not submitted for CENELEC parallel voting'"/>
813
- </xsl:call-template>
814
- </fo:block>
815
- </fo:table-cell>
816
- </fo:table-row>
810
+ </fo:block>
811
+ </fo:table-cell>
812
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
813
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
814
+ <xsl:call-template name="insertCheckBoxOff"/>
815
+ <xsl:call-template name="addLetterSpacingSmallCaps">
816
+ <xsl:with-param name="text" select="'Not submitted for CENELEC parallel voting'"/>
817
+ </xsl:call-template>
818
+ </fo:block>
819
+ </fo:table-cell>
820
+ </fo:table-row>
821
+ </xsl:if>
817
822
  </fo:table-body>
818
823
  </fo:table>
819
824
  </fo:block-container>
@@ -837,7 +842,7 @@
837
842
  </xsl:call-template>
838
843
  </fo:block>
839
844
  </xsl:if>
840
- <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'CDV'">
845
+ <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS'">
841
846
  <fo:block margin-bottom="6pt">
842
847
  <xsl:call-template name="addLetterSpacing">
843
848
  <xsl:with-param name="text">This document is still under study and subject to change. It should not be used for reference purposes.</xsl:with-param>
@@ -864,7 +869,7 @@
864
869
  </fo:block>
865
870
  </fo:block-container>
866
871
 
867
- <xsl:if test="$stage-abbreviation = 'FDIS'">
872
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS'">
868
873
  <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" height="6.5mm" padding="1mm" margin-top="3mm" display-align="center">
869
874
  <fo:block font-size="6.5pt">
870
875
  <xsl:call-template name="addLetterSpacing">
@@ -1183,7 +1188,7 @@
1183
1188
  </xsl:call-template>
1184
1189
  </fo:block>
1185
1190
 
1186
- <xsl:for-each select="xalan:nodeset($contents)//item"><!-- [@display = 'true']
1191
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [@display = 'true']
1187
1192
  [@level &lt;= 3]
1188
1193
  [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
1189
1194
  <fo:block text-align-last="justify">
@@ -1227,9 +1232,9 @@
1227
1232
  </fo:list-item-label>
1228
1233
  <fo:list-item-body start-indent="body-start()">
1229
1234
  <fo:block text-align-last="justify">
1230
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
1235
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1231
1236
  <xsl:variable name="title">
1232
- <xsl:apply-templates/>
1237
+ <xsl:apply-templates select="title"/>
1233
1238
  </xsl:variable>
1234
1239
  <xsl:call-template name="addLetterSpacing">
1235
1240
  <xsl:with-param name="text" select="$title"/>
@@ -1308,7 +1313,7 @@
1308
1313
  </fo:block-container>
1309
1314
 
1310
1315
  <!-- Foreword, Introduction -->
1311
- <xsl:apply-templates select="/iec:iec-standard/iec:preface/*"/>
1316
+ <xsl:call-template name="processPrefaceSectionsDefault"/>
1312
1317
  </xsl:template>
1313
1318
 
1314
1319
 
@@ -1348,28 +1353,9 @@
1348
1353
  </fo:block>
1349
1354
  </fo:block-container>
1350
1355
 
1351
- <!-- Clause(s) -->
1352
- <fo:block>
1353
-
1354
-
1355
- <!-- Scope -->
1356
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]"/>
1357
-
1358
- <!-- Normative references -->
1359
- <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]"/>
1360
-
1361
- <!-- Terms and definitions -->
1362
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:terms"/>
1363
-
1364
- <!-- main sections -->
1365
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]"/>
1366
-
1367
- <!-- Annex(s) -->
1368
- <xsl:apply-templates select="/iec:iec-standard/iec:annex"/>
1369
-
1370
- <!-- Bibliography -->
1371
- <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]"/>
1372
-
1356
+ <!-- Main sections -->
1357
+ <fo:block>
1358
+ <xsl:call-template name="processMainSectionsDefault"/>
1373
1359
  </fo:block>
1374
1360
 
1375
1361
  </fo:flow>
@@ -1405,39 +1391,48 @@
1405
1391
  </xsl:variable>
1406
1392
 
1407
1393
  <xsl:variable name="display">
1408
- <xsl:choose>
1409
- <xsl:when test="ancestor-or-self::iec:bibitem">false</xsl:when>
1410
- <xsl:when test="ancestor-or-self::iec:term">false</xsl:when>
1394
+ <xsl:choose>
1411
1395
  <xsl:when test="$level &gt; 3">false</xsl:when>
1412
1396
  <xsl:when test="$section = '' and $type = 'clause'">false</xsl:when><!-- don't show clause with number only in title -->
1413
1397
  <xsl:otherwise>true</xsl:otherwise>
1414
1398
  </xsl:choose>
1415
1399
  </xsl:variable>
1416
1400
 
1417
- <xsl:if test="$display = 'true'">
1401
+
1402
+ <xsl:variable name="skip">
1403
+ <xsl:choose>
1404
+ <xsl:when test="ancestor-or-self::iec:bibitem">true</xsl:when>
1405
+ <xsl:when test="ancestor-or-self::iec:term">true</xsl:when>
1406
+ <xsl:otherwise>false</xsl:otherwise>
1407
+ </xsl:choose>
1408
+ </xsl:variable>
1409
+
1410
+ <xsl:if test="$skip = 'false'">
1418
1411
 
1419
1412
  <xsl:variable name="title">
1420
1413
  <xsl:call-template name="getName"/>
1421
1414
  </xsl:variable>
1422
1415
 
1423
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
1416
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
1424
1417
  <xsl:if test="$type ='appendix'">
1425
1418
  <xsl:attribute name="section"/>
1426
1419
  </xsl:if>
1427
- <xsl:choose>
1428
- <xsl:when test="$type = 'foreword' or $type = 'introduction'">
1429
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($title))"/>
1430
- </xsl:when>
1431
- <xsl:when test="$type = 'appendix'">
1432
- <xsl:apply-templates select="iec:title" mode="contents_item"/>
1433
- </xsl:when>
1434
- <xsl:otherwise>
1435
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
1436
- </xsl:otherwise>
1437
- </xsl:choose>
1438
-
1420
+ <title>
1421
+ <xsl:choose>
1422
+ <xsl:when test="$type = 'foreword' or $type = 'introduction'">
1423
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($title))"/>
1424
+ </xsl:when>
1425
+ <xsl:when test="$type = 'appendix'">
1426
+ <xsl:apply-templates select="iec:title" mode="contents_item"/>
1427
+ </xsl:when>
1428
+ <xsl:otherwise>
1429
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
1430
+ </xsl:otherwise>
1431
+ </xsl:choose>
1432
+ </title>
1433
+ <xsl:apply-templates mode="contents"/>
1439
1434
  </item>
1440
- <xsl:apply-templates mode="contents"/>
1435
+
1441
1436
  </xsl:if>
1442
1437
 
1443
1438
  </xsl:template>
@@ -1573,12 +1568,12 @@
1573
1568
  </xsl:template>
1574
1569
 
1575
1570
  <!-- Bibliography -->
1576
- <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]/iec:title">
1571
+ <xsl:template match="iec:references[not(@normative='true')]/iec:title">
1577
1572
  <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always">
1578
1573
  <xsl:apply-templates/>
1579
1574
  </fo:block>
1580
1575
  </xsl:template>
1581
- <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]/iec:title/text()">
1576
+ <xsl:template match="iec:references[not(@normative='true')]/iec:title/text()">
1582
1577
  <xsl:call-template name="addLetterSpacing">
1583
1578
  <xsl:with-param name="text" select="."/>
1584
1579
  </xsl:call-template>
@@ -1797,7 +1792,7 @@
1797
1792
 
1798
1793
 
1799
1794
 
1800
- <xsl:template match="iec:ul | iec:ol">
1795
+ <xsl:template match="iec:ul | iec:ol" mode="ul_ol">
1801
1796
  <fo:list-block provisional-distance-between-starts="6mm" margin-bottom="12pt">
1802
1797
  <xsl:if test="ancestor::iec:ul or ancestor::iec:ol">
1803
1798
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
@@ -1871,12 +1866,7 @@
1871
1866
  </xsl:template>
1872
1867
 
1873
1868
 
1874
-
1875
-
1876
-
1877
-
1878
- <!-- <xsl:template match="iec:references[@id = '_bibliography']"> -->
1879
- <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]">
1869
+ <xsl:template match="iec:references[not(@normative='true')]">
1880
1870
  <fo:block break-after="page"/>
1881
1871
  <fo:block id="{@id}">
1882
1872
  <xsl:apply-templates/>
@@ -1888,14 +1878,12 @@
1888
1878
 
1889
1879
 
1890
1880
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
1891
- <!-- <xsl:template match="iec:references[@id = '_bibliography']/iec:bibitem"> -->
1892
- <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]/iec:bibitem">
1893
- <fo:list-block margin-top="5pt" margin-bottom="14pt" provisional-distance-between-starts="0mm"> <!-- provisional-distance-between-starts="12mm" -->
1881
+ <xsl:template match="iec:references[not(@normative='true')]/iec:bibitem">
1882
+ <fo:list-block margin-top="5pt" margin-bottom="14pt" provisional-distance-between-starts="12mm"> <!-- provisional-distance-between-starts="0mm" -->
1894
1883
  <fo:list-item>
1895
1884
  <fo:list-item-label end-indent="label-end()">
1896
- <fo:block font-size="1pt">
1897
- <fo:inline id="{@id}"> </fo:inline>
1898
- <!-- <xsl:number format="[1]"/> -->
1885
+ <fo:block id="{@id}">
1886
+ <xsl:number format="[1]"/>
1899
1887
  </fo:block>
1900
1888
  </fo:list-item-label>
1901
1889
  <fo:list-item-body start-indent="body-start()">
@@ -1921,11 +1909,9 @@
1921
1909
  </fo:list-block>
1922
1910
  </xsl:template>
1923
1911
 
1924
- <!-- <xsl:template match="iec:references[@id = '_bibliography']/iec:bibitem" mode="contents"/> -->
1925
- <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]/iec:bibitem" mode="contents"/>
1912
+ <xsl:template match="iec:references[not(@normative='true')]/iec:bibitem" mode="contents"/>
1926
1913
 
1927
- <!-- <xsl:template match="iec:references[@id = '_bibliography']/iec:bibitem/iec:title"> -->
1928
- <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]/iec:bibitem/iec:title">
1914
+ <xsl:template match="iec:references[not(@normative='true')]/iec:bibitem/iec:title">
1929
1915
  <fo:inline font-style="italic">
1930
1916
  <xsl:apply-templates/>
1931
1917
  </fo:inline>
@@ -2163,6 +2149,12 @@
2163
2149
 
2164
2150
  </title-edition>
2165
2151
 
2152
+ <title-edition lang="fr">
2153
+
2154
+ <xsl:text>Édition </xsl:text>
2155
+
2156
+ </title-edition>
2157
+
2166
2158
 
2167
2159
  <title-toc lang="en">
2168
2160
 
@@ -2171,7 +2163,12 @@
2171
2163
 
2172
2164
 
2173
2165
  </title-toc>
2174
- <title-toc lang="fr">Sommaire</title-toc>
2166
+ <title-toc lang="fr">
2167
+
2168
+ <xsl:text>Sommaire</xsl:text>
2169
+
2170
+
2171
+ </title-toc>
2175
2172
 
2176
2173
  <title-toc lang="zh">Contents</title-toc>
2177
2174
 
@@ -2209,7 +2206,12 @@
2209
2206
 
2210
2207
 
2211
2208
 
2212
- <title-source lang="en">SOURCE</title-source>
2209
+ <title-source lang="en">
2210
+
2211
+ <xsl:text>SOURCE</xsl:text>
2212
+
2213
+
2214
+ </title-source>
2213
2215
 
2214
2216
  <title-keywords lang="en">Keywords</title-keywords>
2215
2217
 
@@ -2252,12 +2254,25 @@
2252
2254
  <title-warning lang="zh">警告</title-warning>
2253
2255
 
2254
2256
  <title-amendment lang="en">AMENDMENT</title-amendment>
2257
+
2258
+ <title-continued lang="en">(continued)</title-continued>
2259
+ <title-continued lang="fr">(continué)</title-continued>
2260
+
2255
2261
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
2256
2262
  <xsl:param name="name"/>
2257
- <xsl:variable name="lang">
2258
- <xsl:call-template name="getLang"/>
2263
+ <xsl:param name="lang"/>
2264
+ <xsl:variable name="lang_">
2265
+ <xsl:choose>
2266
+ <xsl:when test="$lang != ''">
2267
+ <xsl:value-of select="$lang"/>
2268
+ </xsl:when>
2269
+ <xsl:otherwise>
2270
+ <xsl:call-template name="getLang"/>
2271
+ </xsl:otherwise>
2272
+ </xsl:choose>
2259
2273
  </xsl:variable>
2260
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
2274
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
2275
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
2261
2276
  <xsl:choose>
2262
2277
  <xsl:when test="normalize-space($title_) != ''">
2263
2278
  <xsl:value-of select="$title_"/>
@@ -2266,7 +2281,10 @@
2266
2281
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
2267
2282
  </xsl:otherwise>
2268
2283
  </xsl:choose>
2269
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
2284
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
2285
+
2286
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
2287
+
2270
2288
 
2271
2289
 
2272
2290
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
@@ -2276,8 +2294,7 @@
2276
2294
 
2277
2295
 
2278
2296
 
2279
- <xsl:attribute name="font-family">Courier</xsl:attribute>
2280
- <xsl:attribute name="font-size">9pt</xsl:attribute>
2297
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
2281
2298
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
2282
2299
  <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
2283
2300
 
@@ -2285,6 +2302,7 @@
2285
2302
 
2286
2303
 
2287
2304
 
2305
+
2288
2306
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
2289
2307
 
2290
2308
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -2329,9 +2347,11 @@
2329
2347
 
2330
2348
 
2331
2349
 
2350
+
2332
2351
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
2333
2352
 
2334
2353
 
2354
+
2335
2355
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
2336
2356
 
2337
2357
 
@@ -2349,6 +2369,9 @@
2349
2369
 
2350
2370
 
2351
2371
 
2372
+
2373
+
2374
+
2352
2375
 
2353
2376
  </xsl:attribute-set><xsl:attribute-set name="example-p-style">
2354
2377
 
@@ -2362,6 +2385,8 @@
2362
2385
 
2363
2386
 
2364
2387
 
2388
+
2389
+
2365
2390
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
2366
2391
 
2367
2392
  <xsl:attribute name="padding-right">10mm</xsl:attribute>
@@ -2386,6 +2411,8 @@
2386
2411
 
2387
2412
 
2388
2413
 
2414
+
2415
+
2389
2416
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2390
2417
 
2391
2418
 
@@ -2403,11 +2430,13 @@
2403
2430
 
2404
2431
  </xsl:attribute-set><xsl:attribute-set name="xref-style">
2405
2432
 
2406
-
2433
+
2434
+
2407
2435
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
2408
2436
 
2409
2437
 
2410
2438
 
2439
+
2411
2440
  </xsl:attribute-set><xsl:attribute-set name="note-style">
2412
2441
 
2413
2442
 
@@ -2427,8 +2456,7 @@
2427
2456
 
2428
2457
 
2429
2458
 
2430
-
2431
- </xsl:attribute-set><xsl:attribute-set name="note-name-style">
2459
+ </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
2432
2460
 
2433
2461
 
2434
2462
 
@@ -2439,14 +2467,15 @@
2439
2467
 
2440
2468
 
2441
2469
 
2442
-
2443
2470
 
2444
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2445
2471
 
2446
2472
 
2447
2473
 
2474
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2475
+
2448
2476
 
2449
- <xsl:attribute name="font-size">8pt</xsl:attribute>
2477
+
2478
+
2450
2479
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
2451
2480
 
2452
2481
 
@@ -2468,6 +2497,8 @@
2468
2497
 
2469
2498
 
2470
2499
 
2500
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2501
+
2471
2502
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
2472
2503
 
2473
2504
 
@@ -2501,12 +2532,14 @@
2501
2532
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
2502
2533
 
2503
2534
 
2535
+
2504
2536
  </xsl:attribute-set><xsl:attribute-set name="term-style">
2505
2537
 
2506
2538
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2507
2539
 
2508
2540
 
2509
2541
 
2542
+
2510
2543
 
2511
2544
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2512
2545
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -2525,7 +2558,7 @@
2525
2558
 
2526
2559
 
2527
2560
 
2528
-
2561
+
2529
2562
  </xsl:attribute-set><xsl:attribute-set name="formula-style">
2530
2563
 
2531
2564
  </xsl:attribute-set><xsl:attribute-set name="image-style">
@@ -2550,14 +2583,16 @@
2550
2583
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
2551
2584
 
2552
2585
 
2553
- <xsl:attribute name="font-family">Courier</xsl:attribute>
2554
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2586
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
2587
+
2555
2588
 
2556
2589
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2557
2590
  <xsl:attribute name="font-size">11pt</xsl:attribute>
2558
2591
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2559
2592
  <xsl:attribute name="text-align">center</xsl:attribute>
2560
2593
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2594
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2595
+
2561
2596
  </xsl:attribute-set><xsl:attribute-set name="domain-style">
2562
2597
 
2563
2598
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
@@ -2574,7 +2609,43 @@
2574
2609
 
2575
2610
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2576
2611
 
2577
- </xsl:attribute-set><xsl:template match="text()">
2612
+ </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
2613
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2614
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2615
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2616
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2617
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2618
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2619
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2620
+
2621
+ <!-- Normative references -->
2622
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
2623
+ <!-- Terms and definitions -->
2624
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
2625
+ <!-- Another main sections -->
2626
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
2627
+ <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
2628
+ <!-- Bibliography -->
2629
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
2630
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2631
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2632
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2633
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2634
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2635
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2636
+ </xsl:template><xsl:template name="processMainSectionsDefault">
2637
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2638
+
2639
+ <!-- Normative references -->
2640
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
2641
+ <!-- Terms and definitions -->
2642
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
2643
+ <!-- Another main sections -->
2644
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
2645
+ <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2646
+ <!-- Bibliography -->
2647
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2648
+ </xsl:template><xsl:template match="text()">
2578
2649
  <xsl:value-of select="."/>
2579
2650
  </xsl:template><xsl:template match="*[local-name()='br']">
2580
2651
  <xsl:value-of select="$linebreak"/>
@@ -2591,6 +2662,10 @@
2591
2662
 
2592
2663
 
2593
2664
 
2665
+
2666
+
2667
+ <!-- $namespace = 'iso' or -->
2668
+
2594
2669
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2595
2670
 
2596
2671
 
@@ -2626,6 +2701,7 @@
2626
2701
  <xsl:with-param name="table" select="$simple-table"/>
2627
2702
  </xsl:call-template>
2628
2703
  </xsl:variable>
2704
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2629
2705
 
2630
2706
  <!-- <xsl:variable name="colwidths2">
2631
2707
  <xsl:call-template name="calculate-column-widths">
@@ -2647,33 +2723,57 @@
2647
2723
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2648
2724
 
2649
2725
 
2726
+
2727
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
2650
2728
  <xsl:attribute name="space-after">12pt</xsl:attribute>
2651
2729
  <xsl:if test="ancestor::*[local-name() = 'preface']">
2652
2730
  <xsl:attribute name="space-after">16pt</xsl:attribute>
2653
2731
  </xsl:if>
2732
+
2733
+
2734
+
2654
2735
 
2655
2736
 
2737
+
2656
2738
 
2657
2739
 
2658
2740
 
2659
2741
 
2660
2742
 
2661
- <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
2662
-
2663
-
2664
- <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
2665
-
2743
+
2744
+
2745
+ <xsl:variable name="table_attributes">
2746
+ <attribute name="table-layout">fixed</attribute>
2747
+ <attribute name="width">100%</attribute>
2748
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2749
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2666
2750
 
2667
2751
 
2752
+ <attribute name="border">0.5pt solid black</attribute>
2668
2753
 
2669
2754
 
2670
2755
 
2756
+
2757
+
2758
+
2671
2759
 
2760
+
2672
2761
 
2762
+ </xsl:variable>
2763
+
2764
+
2765
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
2673
2766
 
2674
- <!-- <xsl:if test="ancestor::*[local-name()='preface']"> -->
2675
- <xsl:attribute name="font-size">8pt</xsl:attribute>
2767
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2768
+ <xsl:attribute name="{@name}">
2769
+ <xsl:value-of select="."/>
2770
+ </xsl:attribute>
2771
+ </xsl:for-each>
2676
2772
 
2773
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
2774
+ <xsl:if test="$isNoteOrFnExist = 'true'">
2775
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2776
+ </xsl:if>
2677
2777
 
2678
2778
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
2679
2779
  <xsl:choose>
@@ -2697,6 +2797,33 @@
2697
2797
 
2698
2798
  </fo:table>
2699
2799
 
2800
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2801
+ <xsl:call-template name="insertTableFooterInSeparateTable">
2802
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
2803
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2804
+ </xsl:call-template>
2805
+ </xsl:for-each>
2806
+
2807
+ <!-- insert footer as table -->
2808
+ <!-- <fo:table>
2809
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2810
+ <xsl:attribute name="{@name}">
2811
+ <xsl:value-of select="."/>
2812
+ </xsl:attribute>
2813
+ </xsl:for-each>
2814
+
2815
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2816
+ <xsl:choose>
2817
+ <xsl:when test=". = 1 or . = 0">
2818
+ <fo:table-column column-width="proportional-column-width(2)"/>
2819
+ </xsl:when>
2820
+ <xsl:otherwise>
2821
+ <fo:table-column column-width="proportional-column-width({.})"/>
2822
+ </xsl:otherwise>
2823
+ </xsl:choose>
2824
+ </xsl:for-each>
2825
+ </fo:table>-->
2826
+
2700
2827
 
2701
2828
 
2702
2829
 
@@ -2705,8 +2832,9 @@
2705
2832
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2706
2833
  <xsl:if test="normalize-space() != ''">
2707
2834
  <fo:block xsl:use-attribute-sets="table-name-style">
2708
- <xsl:apply-templates/>
2709
- </fo:block>
2835
+
2836
+ <xsl:apply-templates/>
2837
+ </fo:block>
2710
2838
  </xsl:if>
2711
2839
  </xsl:template><xsl:template name="calculate-columns-numbers">
2712
2840
  <xsl:param name="table-row"/>
@@ -2760,6 +2888,13 @@
2760
2888
  <xsl:for-each select="xalan:nodeset($table)//tr">
2761
2889
  <xsl:variable name="td_text">
2762
2890
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2891
+
2892
+ <!-- <xsl:if test="$namespace = 'bipm'">
2893
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2894
+ <word><xsl:value-of select="normalize-space(.)"/></word>
2895
+ </xsl:for-each>
2896
+ </xsl:if> -->
2897
+
2763
2898
  </xsl:variable>
2764
2899
  <xsl:variable name="words">
2765
2900
  <xsl:variable name="string_with_added_zerospaces">
@@ -2819,13 +2954,31 @@
2819
2954
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
2820
2955
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
2821
2956
  <xsl:value-of select="@target"/>
2957
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
2958
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
2959
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2822
2960
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2823
2961
  <xsl:param name="cols-count"/>
2824
2962
  <!-- font-weight="bold" -->
2825
- <fo:table-header>
2963
+ <fo:table-header>
2826
2964
 
2827
2965
  <xsl:apply-templates/>
2828
2966
  </fo:table-header>
2967
+ </xsl:template><xsl:template name="table-header-title">
2968
+ <xsl:param name="cols-count"/>
2969
+ <!-- row for title -->
2970
+ <fo:table-row>
2971
+ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2972
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
2973
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
2974
+ <xsl:call-template name="fn_name_display"/>
2975
+ </xsl:for-each>
2976
+ <fo:block text-align="right" font-style="italic">
2977
+ <xsl:text> </xsl:text>
2978
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
2979
+ </fo:block>
2980
+ </fo:table-cell>
2981
+ </fo:table-row>
2829
2982
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2830
2983
  <fo:table-body>
2831
2984
  <xsl:apply-templates/>
@@ -2833,6 +2986,13 @@
2833
2986
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2834
2987
  <xsl:apply-templates/>
2835
2988
  </xsl:template><xsl:template name="insertTableFooter">
2989
+ <xsl:param name="cols-count"/>
2990
+ <xsl:if test="../*[local-name()='tfoot']">
2991
+ <fo:table-footer>
2992
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2993
+ </fo:table-footer>
2994
+ </xsl:if>
2995
+ </xsl:template><xsl:template name="insertTableFooter2">
2836
2996
  <xsl:param name="cols-count"/>
2837
2997
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2838
2998
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -2860,11 +3020,29 @@
2860
3020
  </xsl:if>
2861
3021
 
2862
3022
 
3023
+
3024
+
3025
+
3026
+
2863
3027
  <!-- except gb -->
2864
3028
 
2865
3029
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2866
3030
 
2867
3031
 
3032
+ <!-- show Note under table in preface (ex. abstract) sections -->
3033
+ <!-- empty, because notes show at page side in main sections -->
3034
+ <!-- <xsl:if test="$namespace = 'bipm'">
3035
+ <xsl:choose>
3036
+ <xsl:when test="ancestor::*[local-name()='preface']">
3037
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3038
+ </xsl:when>
3039
+ <xsl:otherwise>
3040
+ <fo:block/>
3041
+ </xsl:otherwise>
3042
+ </xsl:choose>
3043
+ </xsl:if> -->
3044
+
3045
+
2868
3046
  <!-- horizontal row separator -->
2869
3047
 
2870
3048
  <xsl:if test="../*[local-name()='note']">
@@ -2884,10 +3062,104 @@
2884
3062
  </fo:table-footer>
2885
3063
 
2886
3064
  </xsl:if>
2887
- </xsl:template><xsl:template match="*[local-name()='tbody']">
3065
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
3066
+ <xsl:param name="table_attributes"/>
3067
+ <xsl:param name="colwidths"/>
2888
3068
 
2889
- <xsl:variable name="cols-count">
2890
- <xsl:choose>
3069
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3070
+
3071
+ <xsl:if test="$isNoteOrFnExist = 'true'">
3072
+
3073
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
3074
+
3075
+ <fo:table keep-with-previous="always">
3076
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
3077
+ <xsl:choose>
3078
+ <xsl:when test="@name = 'border-top'">
3079
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
3080
+ </xsl:when>
3081
+ <xsl:when test="@name = 'border'">
3082
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3083
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3084
+ </xsl:when>
3085
+ <xsl:otherwise>
3086
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3087
+ </xsl:otherwise>
3088
+ </xsl:choose>
3089
+ </xsl:for-each>
3090
+
3091
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3092
+ <xsl:choose>
3093
+ <xsl:when test=". = 1 or . = 0">
3094
+ <fo:table-column column-width="proportional-column-width(2)"/>
3095
+ </xsl:when>
3096
+ <xsl:otherwise>
3097
+ <fo:table-column column-width="proportional-column-width({.})"/>
3098
+ </xsl:otherwise>
3099
+ </xsl:choose>
3100
+ </xsl:for-each>
3101
+
3102
+ <fo:table-body>
3103
+ <fo:table-row>
3104
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3105
+
3106
+
3107
+ <xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
3108
+
3109
+
3110
+ <!-- fn will be processed inside 'note' processing -->
3111
+
3112
+ <xsl:if test="../*[local-name()='note']">
3113
+ <fo:block margin-bottom="6pt"> </fo:block>
3114
+ </xsl:if>
3115
+
3116
+
3117
+
3118
+
3119
+
3120
+
3121
+
3122
+ <!-- except gb -->
3123
+
3124
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3125
+
3126
+
3127
+ <!-- <xsl:if test="$namespace = 'bipm'">
3128
+ <xsl:choose>
3129
+ <xsl:when test="ancestor::*[local-name()='preface']">
3130
+ show Note under table in preface (ex. abstract) sections
3131
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3132
+ </xsl:when>
3133
+ <xsl:otherwise>
3134
+ empty, because notes show at page side in main sections
3135
+ <fo:block/>
3136
+ </xsl:otherwise>
3137
+ </xsl:choose>
3138
+ </xsl:if> -->
3139
+
3140
+
3141
+ <!-- horizontal row separator -->
3142
+
3143
+ <xsl:if test="../*[local-name()='note']">
3144
+ <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3145
+ <fo:block font-size="1pt"> </fo:block>
3146
+ </fo:block-container>
3147
+ </xsl:if>
3148
+
3149
+
3150
+ <!-- fn processing -->
3151
+ <xsl:call-template name="fn_display"/>
3152
+
3153
+ </fo:table-cell>
3154
+ </fo:table-row>
3155
+ </fo:table-body>
3156
+
3157
+ </fo:table>
3158
+ </xsl:if>
3159
+ </xsl:template><xsl:template match="*[local-name()='tbody']">
3160
+
3161
+ <xsl:variable name="cols-count">
3162
+ <xsl:choose>
2891
3163
  <xsl:when test="../*[local-name()='thead']">
2892
3164
  <xsl:call-template name="calculate-columns-numbers">
2893
3165
  <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
@@ -2901,6 +3173,8 @@
2901
3173
  </xsl:choose>
2902
3174
  </xsl:variable>
2903
3175
 
3176
+
3177
+
2904
3178
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2905
3179
  <xsl:with-param name="cols-count" select="$cols-count"/>
2906
3180
  </xsl:apply-templates>
@@ -2910,6 +3184,8 @@
2910
3184
  </xsl:call-template>
2911
3185
 
2912
3186
  <fo:table-body>
3187
+
3188
+
2913
3189
  <xsl:apply-templates/>
2914
3190
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2915
3191
 
@@ -2939,10 +3215,23 @@
2939
3215
  </xsl:if>
2940
3216
 
2941
3217
 
3218
+
3219
+ <!-- <xsl:if test="$namespace = 'bipm'">
3220
+ <xsl:attribute name="height">8mm</xsl:attribute>
3221
+ </xsl:if> -->
3222
+
2942
3223
  <xsl:apply-templates/>
2943
3224
  </fo:table-row>
2944
3225
  </xsl:template><xsl:template match="*[local-name()='th']">
2945
3226
  <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
3227
+ <xsl:attribute name="text-align">
3228
+ <xsl:choose>
3229
+ <xsl:when test="@align">
3230
+ <xsl:value-of select="@align"/>
3231
+ </xsl:when>
3232
+ <xsl:otherwise>center</xsl:otherwise>
3233
+ </xsl:choose>
3234
+ </xsl:attribute>
2946
3235
 
2947
3236
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2948
3237
 
@@ -2959,6 +3248,9 @@
2959
3248
 
2960
3249
 
2961
3250
 
3251
+
3252
+
3253
+
2962
3254
  <xsl:if test="@colspan">
2963
3255
  <xsl:attribute name="number-columns-spanned">
2964
3256
  <xsl:value-of select="@colspan"/>
@@ -2969,12 +3261,32 @@
2969
3261
  <xsl:value-of select="@rowspan"/>
2970
3262
  </xsl:attribute>
2971
3263
  </xsl:if>
3264
+ <xsl:call-template name="display-align"/>
2972
3265
  <fo:block>
2973
3266
  <xsl:apply-templates/>
2974
3267
  </fo:block>
2975
3268
  </fo:table-cell>
3269
+ </xsl:template><xsl:template name="display-align">
3270
+ <xsl:if test="@valign">
3271
+ <xsl:attribute name="display-align">
3272
+ <xsl:choose>
3273
+ <xsl:when test="@valign = 'top'">before</xsl:when>
3274
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
3275
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
3276
+ <xsl:otherwise>before</xsl:otherwise>
3277
+ </xsl:choose>
3278
+ </xsl:attribute>
3279
+ </xsl:if>
2976
3280
  </xsl:template><xsl:template match="*[local-name()='td']">
2977
3281
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
3282
+ <xsl:attribute name="text-align">
3283
+ <xsl:choose>
3284
+ <xsl:when test="@align">
3285
+ <xsl:value-of select="@align"/>
3286
+ </xsl:when>
3287
+ <xsl:otherwise>left</xsl:otherwise>
3288
+ </xsl:choose>
3289
+ </xsl:attribute>
2978
3290
  <!-- and ancestor::*[local-name() = 'thead'] -->
2979
3291
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2980
3292
 
@@ -2984,7 +3296,7 @@
2984
3296
  <xsl:attribute name="border">solid black 0</xsl:attribute>
2985
3297
  </xsl:if>
2986
3298
 
2987
-
3299
+
2988
3300
 
2989
3301
  <xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
2990
3302
  <xsl:if test="ancestor::*[local-name()='preface']">
@@ -2995,6 +3307,8 @@
2995
3307
 
2996
3308
 
2997
3309
 
3310
+
3311
+
2998
3312
  <xsl:if test="@colspan">
2999
3313
  <xsl:attribute name="number-columns-spanned">
3000
3314
  <xsl:value-of select="@colspan"/>
@@ -3005,8 +3319,8 @@
3005
3319
  <xsl:value-of select="@rowspan"/>
3006
3320
  </xsl:attribute>
3007
3321
  </xsl:if>
3008
- <fo:block>
3009
-
3322
+ <xsl:call-template name="display-align"/>
3323
+ <fo:block>
3010
3324
  <xsl:apply-templates/>
3011
3325
  </fo:block>
3012
3326
  </fo:table-cell>
@@ -3021,14 +3335,17 @@
3021
3335
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3022
3336
 
3023
3337
 
3338
+
3339
+
3024
3340
  <fo:inline padding-right="2mm">
3025
3341
 
3026
3342
 
3027
3343
 
3028
-
3344
+
3029
3345
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3030
3346
 
3031
3347
  </fo:inline>
3348
+
3032
3349
  <xsl:apply-templates mode="process"/>
3033
3350
  </fo:block>
3034
3351
 
@@ -3057,6 +3374,7 @@
3057
3374
  <xsl:attribute name="margin-left">6mm</xsl:attribute>
3058
3375
 
3059
3376
 
3377
+
3060
3378
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3061
3379
 
3062
3380
 
@@ -3067,12 +3385,15 @@
3067
3385
 
3068
3386
 
3069
3387
 
3388
+
3070
3389
  <xsl:value-of select="@reference"/>
3071
3390
 
3391
+
3072
3392
  </fo:inline>
3073
3393
  <fo:inline>
3074
3394
 
3075
- <xsl:apply-templates/>
3395
+ <!-- <xsl:apply-templates /> -->
3396
+ <xsl:copy-of select="./node()"/>
3076
3397
  </fo:inline>
3077
3398
  </fo:block>
3078
3399
  </xsl:if>
@@ -3109,7 +3430,20 @@
3109
3430
  <xsl:variable name="following_dl_colwidths">
3110
3431
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3111
3432
  <xsl:variable name="html-table">
3112
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
3433
+ <xsl:variable name="doc_ns">
3434
+
3435
+ </xsl:variable>
3436
+ <xsl:variable name="ns">
3437
+ <xsl:choose>
3438
+ <xsl:when test="normalize-space($doc_ns) != ''">
3439
+ <xsl:value-of select="normalize-space($doc_ns)"/>
3440
+ </xsl:when>
3441
+ <xsl:otherwise>
3442
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
3443
+ </xsl:otherwise>
3444
+ </xsl:choose>
3445
+ </xsl:variable>
3446
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3113
3447
  <xsl:element name="{$ns}:table">
3114
3448
  <xsl:for-each select="*[local-name() = 'dl'][1]">
3115
3449
  <tbody>
@@ -3183,7 +3517,8 @@
3183
3517
 
3184
3518
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
3185
3519
 
3186
- <xsl:apply-templates/>
3520
+ <!-- <xsl:apply-templates /> -->
3521
+ <xsl:copy-of select="./node()"/>
3187
3522
  </fo:block>
3188
3523
  </fo:table-cell>
3189
3524
  </fo:table-row>
@@ -3207,9 +3542,13 @@
3207
3542
 
3208
3543
 
3209
3544
 
3545
+
3546
+
3210
3547
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
3211
3548
 
3549
+
3212
3550
  <xsl:value-of select="@reference"/>
3551
+
3213
3552
  </fo:basic-link>
3214
3553
  </fo:inline>
3215
3554
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -3217,131 +3556,158 @@
3217
3556
  <xsl:apply-templates/>
3218
3557
  </fo:inline>
3219
3558
  </xsl:template><xsl:template match="*[local-name()='dl']">
3220
- <xsl:variable name="parent" select="local-name(..)"/>
3221
-
3222
- <xsl:variable name="key_iso">
3223
-
3224
- <xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
3225
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
3226
- </xsl:variable>
3227
-
3228
- <xsl:choose>
3229
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3559
+ <fo:block-container margin-left="0mm">
3560
+ <xsl:if test="parent::*[local-name() = 'note']">
3561
+ <xsl:attribute name="margin-left">
3562
+ <xsl:choose>
3563
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3564
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3565
+ </xsl:choose>
3566
+ </xsl:attribute>
3567
+
3568
+ </xsl:if>
3569
+ <fo:block-container margin-left="0mm">
3570
+
3571
+ <xsl:variable name="parent" select="local-name(..)"/>
3572
+
3573
+ <xsl:variable name="key_iso">
3574
+
3575
+ <xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
3576
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
3577
+ </xsl:variable>
3230
3578
 
3231
- <fo:block text-align="left">
3579
+ <xsl:choose>
3580
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3232
3581
 
3233
- <xsl:attribute name="margin-bottom">15pt</xsl:attribute>
3582
+ <fo:block text-align="left">
3583
+
3584
+ <xsl:attribute name="margin-bottom">15pt</xsl:attribute>
3585
+
3586
+
3587
+ <xsl:variable name="title-where">
3588
+ <xsl:call-template name="getTitle">
3589
+ <xsl:with-param name="name" select="'title-where'"/>
3590
+ </xsl:call-template>
3591
+ </xsl:variable>
3592
+ <xsl:value-of select="$title-where"/>
3593
+ </fo:block>
3594
+ <fo:block>
3595
+
3596
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
3597
+
3598
+ <xsl:text> </xsl:text>
3599
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3600
+ </fo:block>
3234
3601
 
3235
3602
 
3236
- <xsl:variable name="title-where">
3237
- <xsl:call-template name="getTitle">
3238
- <xsl:with-param name="name" select="'title-where'"/>
3239
- </xsl:call-template>
3240
- </xsl:variable>
3241
- <xsl:value-of select="$title-where"/>
3242
- </fo:block>
3603
+ </xsl:when>
3604
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3605
+ <fo:block margin-bottom="12pt" text-align="left">
3606
+
3607
+
3608
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
3609
+
3610
+
3611
+
3612
+ <xsl:variable name="title-where">
3613
+ <xsl:call-template name="getTitle">
3614
+ <xsl:with-param name="name" select="'title-where'"/>
3615
+ </xsl:call-template>
3616
+ </xsl:variable>
3617
+ <xsl:value-of select="$title-where"/>
3618
+ </fo:block>
3619
+ </xsl:when>
3620
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3621
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
3622
+
3623
+
3624
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
3625
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
3626
+
3627
+
3628
+ <xsl:variable name="title-key">
3629
+ <xsl:call-template name="getTitle">
3630
+ <xsl:with-param name="name" select="'title-key'"/>
3631
+ </xsl:call-template>
3632
+ </xsl:variable>
3633
+ <xsl:value-of select="$title-key"/>
3634
+ </fo:block>
3635
+ </xsl:when>
3636
+ </xsl:choose>
3637
+
3638
+ <!-- a few components -->
3639
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
3243
3640
  <fo:block>
3244
3641
 
3245
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
3246
3642
 
3247
- <xsl:text> </xsl:text>
3248
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3249
- </fo:block>
3250
-
3251
-
3252
- </xsl:when>
3253
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3254
- <fo:block margin-bottom="12pt" text-align="left">
3255
-
3256
-
3257
- <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
3258
-
3259
-
3260
-
3261
- <xsl:variable name="title-where">
3262
- <xsl:call-template name="getTitle">
3263
- <xsl:with-param name="name" select="'title-where'"/>
3264
- </xsl:call-template>
3265
- </xsl:variable>
3266
- <xsl:value-of select="$title-where"/>
3267
- </fo:block>
3268
- </xsl:when>
3269
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3270
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
3271
-
3272
-
3273
- <xsl:attribute name="font-size">8pt</xsl:attribute>
3274
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
3275
-
3276
-
3277
- <xsl:variable name="title-key">
3278
- <xsl:call-template name="getTitle">
3279
- <xsl:with-param name="name" select="'title-key'"/>
3280
- </xsl:call-template>
3281
- </xsl:variable>
3282
- <xsl:value-of select="$title-key"/>
3283
- </fo:block>
3284
- </xsl:when>
3285
- </xsl:choose>
3286
-
3287
- <!-- a few components -->
3288
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
3289
- <fo:block>
3290
-
3291
-
3292
-
3293
-
3294
- <fo:block>
3295
-
3296
-
3297
-
3298
-
3299
- <fo:table width="95%" table-layout="fixed">
3300
3643
 
3301
- <xsl:choose>
3302
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3303
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3304
- </xsl:when>
3305
- <xsl:when test="normalize-space($key_iso) = 'true'">
3306
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3307
-
3308
- <xsl:attribute name="font-size">8pt</xsl:attribute>
3644
+
3645
+ <fo:block>
3646
+
3647
+
3648
+
3649
+
3650
+ <fo:table width="95%" table-layout="fixed">
3309
3651
 
3310
- </xsl:when>
3311
- </xsl:choose>
3312
- <!-- create virtual html table for dl/[dt and dd] -->
3313
- <xsl:variable name="html-table">
3314
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
3315
- <xsl:element name="{$ns}:table">
3316
- <tbody>
3317
- <xsl:apply-templates mode="dl"/>
3318
- </tbody>
3319
- </xsl:element>
3320
- </xsl:variable>
3321
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
3322
- <xsl:variable name="colwidths">
3323
- <xsl:call-template name="calculate-column-widths">
3324
- <xsl:with-param name="cols-count" select="2"/>
3325
- <xsl:with-param name="table" select="$html-table"/>
3326
- </xsl:call-template>
3327
- </xsl:variable>
3328
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
3329
- <xsl:variable name="maxlength_dt">
3330
- <xsl:call-template name="getMaxLength_dt"/>
3331
- </xsl:variable>
3332
- <xsl:call-template name="setColumnWidth_dl">
3333
- <xsl:with-param name="colwidths" select="$colwidths"/>
3334
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3335
- </xsl:call-template>
3336
- <fo:table-body>
3337
- <xsl:apply-templates>
3338
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
3339
- </xsl:apply-templates>
3340
- </fo:table-body>
3341
- </fo:table>
3342
- </fo:block>
3343
- </fo:block>
3344
- </xsl:if>
3652
+ <xsl:choose>
3653
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3654
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3655
+ </xsl:when>
3656
+ <xsl:when test="normalize-space($key_iso) = 'true'">
3657
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3658
+
3659
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
3660
+
3661
+ </xsl:when>
3662
+ </xsl:choose>
3663
+ <!-- create virtual html table for dl/[dt and dd] -->
3664
+ <xsl:variable name="html-table">
3665
+ <xsl:variable name="doc_ns">
3666
+
3667
+ </xsl:variable>
3668
+ <xsl:variable name="ns">
3669
+ <xsl:choose>
3670
+ <xsl:when test="normalize-space($doc_ns) != ''">
3671
+ <xsl:value-of select="normalize-space($doc_ns)"/>
3672
+ </xsl:when>
3673
+ <xsl:otherwise>
3674
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
3675
+ </xsl:otherwise>
3676
+ </xsl:choose>
3677
+ </xsl:variable>
3678
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3679
+ <xsl:element name="{$ns}:table">
3680
+ <tbody>
3681
+ <xsl:apply-templates mode="dl"/>
3682
+ </tbody>
3683
+ </xsl:element>
3684
+ </xsl:variable>
3685
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
3686
+ <xsl:variable name="colwidths">
3687
+ <xsl:call-template name="calculate-column-widths">
3688
+ <xsl:with-param name="cols-count" select="2"/>
3689
+ <xsl:with-param name="table" select="$html-table"/>
3690
+ </xsl:call-template>
3691
+ </xsl:variable>
3692
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
3693
+ <xsl:variable name="maxlength_dt">
3694
+ <xsl:call-template name="getMaxLength_dt"/>
3695
+ </xsl:variable>
3696
+ <xsl:call-template name="setColumnWidth_dl">
3697
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3698
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3699
+ </xsl:call-template>
3700
+ <fo:table-body>
3701
+ <xsl:apply-templates>
3702
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
3703
+ </xsl:apply-templates>
3704
+ </fo:table-body>
3705
+ </fo:table>
3706
+ </fo:block>
3707
+ </fo:block>
3708
+ </xsl:if>
3709
+ </fo:block-container>
3710
+ </fo:block-container>
3345
3711
  </xsl:template><xsl:template name="setColumnWidth_dl">
3346
3712
  <xsl:param name="colwidths"/>
3347
3713
  <xsl:param name="maxlength_dt"/>
@@ -3438,6 +3804,7 @@
3438
3804
  <xsl:param name="key_iso"/>
3439
3805
 
3440
3806
  <fo:table-row>
3807
+
3441
3808
  <fo:table-cell>
3442
3809
 
3443
3810
  <fo:block margin-top="6pt">
@@ -3456,6 +3823,7 @@
3456
3823
 
3457
3824
 
3458
3825
 
3826
+
3459
3827
  <xsl:apply-templates/>
3460
3828
  <!-- <xsl:if test="$namespace = 'gb'">
3461
3829
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -3467,14 +3835,36 @@
3467
3835
  <fo:table-cell>
3468
3836
  <fo:block>
3469
3837
 
3470
-
3838
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3839
+ <xsl:if test="local-name(*[1]) != 'stem'">
3840
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3841
+ </xsl:if>
3842
+ </xsl:if> -->
3471
3843
 
3472
3844
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3473
3845
 
3474
3846
  </fo:block>
3475
3847
  </fo:table-cell>
3476
3848
  </fo:table-row>
3477
-
3849
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3850
+ <xsl:if test="local-name(*[1]) = 'stem'">
3851
+ <fo:table-row>
3852
+ <fo:table-cell>
3853
+ <fo:block margin-top="6pt">
3854
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3855
+ <xsl:attribute name="margin-top">0</xsl:attribute>
3856
+ </xsl:if>
3857
+ <xsl:text>&#xA0;</xsl:text>
3858
+ </fo:block>
3859
+ </fo:table-cell>
3860
+ <fo:table-cell>
3861
+ <fo:block>
3862
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3863
+ </fo:block>
3864
+ </fo:table-cell>
3865
+ </fo:table-row>
3866
+ </xsl:if>
3867
+ </xsl:if> -->
3478
3868
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3479
3869
  <xsl:apply-templates/>
3480
3870
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3499,6 +3889,31 @@
3499
3889
  </fo:inline>
3500
3890
  </xsl:template><xsl:template match="*[local-name()='tt']">
3501
3891
  <fo:inline xsl:use-attribute-sets="tt-style">
3892
+ <xsl:variable name="_font-size">
3893
+
3894
+
3895
+
3896
+ 10
3897
+
3898
+
3899
+
3900
+
3901
+
3902
+
3903
+
3904
+
3905
+
3906
+
3907
+ </xsl:variable>
3908
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3909
+ <xsl:if test="$font-size != ''">
3910
+ <xsl:attribute name="font-size">
3911
+ <xsl:choose>
3912
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3913
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3914
+ </xsl:choose>
3915
+ </xsl:attribute>
3916
+ </xsl:if>
3502
3917
  <xsl:apply-templates/>
3503
3918
  </fo:inline>
3504
3919
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -3824,11 +4239,24 @@
3824
4239
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
3825
4240
  <xsl:value-of select="substring($str, 2)"/>
3826
4241
  </xsl:template><xsl:template match="mathml:math">
3827
- <fo:inline font-family="STIX2Math">
3828
- <fo:instream-foreign-object fox:alt-text="Math">
3829
- <xsl:copy-of select="."/>
3830
- </fo:instream-foreign-object>
4242
+ <fo:inline font-family="STIX Two Math"> <!-- -->
4243
+ <xsl:variable name="mathml">
4244
+ <xsl:apply-templates select="." mode="mathml"/>
4245
+ </xsl:variable>
4246
+ <fo:instream-foreign-object fox:alt-text="Math">
4247
+ <!-- <xsl:copy-of select="."/> -->
4248
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
4249
+ </fo:instream-foreign-object>
3831
4250
  </fo:inline>
4251
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
4252
+ <xsl:copy>
4253
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
4254
+ </xsl:copy>
4255
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
4256
+ <xsl:copy>
4257
+ <!-- replace start and end spaces to non-break space -->
4258
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
4259
+ </xsl:copy>
3832
4260
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3833
4261
  <xsl:variable name="target">
3834
4262
  <xsl:choose>
@@ -3905,13 +4333,26 @@
3905
4333
  <xsl:apply-templates/>
3906
4334
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3907
4335
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3908
-
4336
+
3909
4337
  <xsl:apply-templates/>
3910
4338
  </fo:basic-link>
3911
4339
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
3912
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
3913
- <xsl:apply-templates/>
3914
- </fo:block>
4340
+ <fo:block-container margin-left="0mm">
4341
+ <xsl:if test="parent::*[local-name() = 'note']">
4342
+ <xsl:attribute name="margin-left">
4343
+ <xsl:choose>
4344
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4345
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4346
+ </xsl:choose>
4347
+ </xsl:attribute>
4348
+
4349
+ </xsl:if>
4350
+ <fo:block-container margin-left="0mm">
4351
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
4352
+ <xsl:apply-templates/>
4353
+ </fo:block>
4354
+ </fo:block-container>
4355
+ </fo:block-container>
3915
4356
  </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
3916
4357
  <fo:inline>
3917
4358
  <xsl:apply-templates/>
@@ -3945,6 +4386,8 @@
3945
4386
 
3946
4387
 
3947
4388
 
4389
+
4390
+
3948
4391
  <fo:inline xsl:use-attribute-sets="note-name-style">
3949
4392
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3950
4393
  </fo:inline>
@@ -3971,7 +4414,9 @@
3971
4414
  </xsl:choose>
3972
4415
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3973
4416
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3974
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4417
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
4418
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4419
+ </fo:inline>
3975
4420
  <xsl:apply-templates/>
3976
4421
  </fo:block>
3977
4422
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
@@ -4068,15 +4513,136 @@
4068
4513
 
4069
4514
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4070
4515
  </fo:block>
4071
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4516
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4072
4517
  <xsl:apply-templates mode="contents"/>
4073
4518
  <xsl:text> </xsl:text>
4074
- </xsl:template><xsl:template match="text()" mode="contents">
4519
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
4520
+ <xsl:apply-templates mode="bookmarks"/>
4521
+ <xsl:text> </xsl:text>
4522
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
4075
4523
  <xsl:value-of select="."/>
4076
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
4524
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
4525
+ <xsl:value-of select="."/>
4526
+ </xsl:template><xsl:template match="node()" mode="contents">
4527
+ <xsl:apply-templates mode="contents"/>
4528
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
4529
+ <xsl:apply-templates mode="bookmarks"/>
4530
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
4531
+ <xsl:apply-templates select="."/>
4532
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4533
+ <xsl:apply-templates mode="bookmarks"/>
4534
+ </xsl:template><xsl:template name="addBookmarks">
4535
+ <xsl:param name="contents"/>
4536
+ <xsl:if test="xalan:nodeset($contents)//item">
4537
+ <fo:bookmark-tree>
4538
+ <xsl:choose>
4539
+ <xsl:when test="xalan:nodeset($contents)/doc">
4540
+ <xsl:choose>
4541
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
4542
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
4543
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
4544
+ <fo:bookmark-title>
4545
+ <xsl:variable name="bookmark-title_">
4546
+ <xsl:call-template name="getLangVersion">
4547
+ <xsl:with-param name="lang" select="@lang"/>
4548
+ </xsl:call-template>
4549
+ </xsl:variable>
4550
+ <xsl:choose>
4551
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
4552
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
4553
+ </xsl:when>
4554
+ <xsl:otherwise>
4555
+ <xsl:choose>
4556
+ <xsl:when test="@lang = 'en'">English</xsl:when>
4557
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
4558
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
4559
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
4560
+ </xsl:choose>
4561
+ </xsl:otherwise>
4562
+ </xsl:choose>
4563
+ </fo:bookmark-title>
4564
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
4565
+ </fo:bookmark>
4566
+
4567
+ </xsl:for-each>
4568
+ </xsl:when>
4569
+ <xsl:otherwise>
4570
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
4571
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
4572
+ </xsl:for-each>
4573
+ </xsl:otherwise>
4574
+ </xsl:choose>
4575
+ </xsl:when>
4576
+ <xsl:otherwise>
4577
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
4578
+ </xsl:otherwise>
4579
+ </xsl:choose>
4580
+
4581
+
4582
+
4583
+ <xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
4584
+ <fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
4585
+ <fo:bookmark-title>Figures</fo:bookmark-title>
4586
+ <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
4587
+ <fo:bookmark internal-destination="{@id}">
4588
+ <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
4589
+ </fo:bookmark>
4590
+ </xsl:for-each>
4591
+ </fo:bookmark>
4592
+ </xsl:if>
4593
+
4594
+
4595
+
4596
+ <xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
4597
+ <fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
4598
+ <fo:bookmark-title>
4599
+ <xsl:choose>
4600
+ <xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
4601
+ <xsl:otherwise>Tables</xsl:otherwise>
4602
+ </xsl:choose>
4603
+ </fo:bookmark-title>
4604
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
4605
+ <fo:bookmark internal-destination="{@id}">
4606
+ <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
4607
+ </fo:bookmark>
4608
+ </xsl:for-each>
4609
+ </fo:bookmark>
4610
+ </xsl:if>
4611
+
4612
+
4613
+
4614
+
4615
+ </fo:bookmark-tree>
4616
+ </xsl:if>
4617
+ </xsl:template><xsl:template name="getLangVersion">
4618
+ <xsl:param name="lang"/>
4619
+ <xsl:choose>
4620
+ <xsl:when test="$lang = 'en'">
4621
+ English
4622
+
4623
+ </xsl:when>
4624
+ <xsl:when test="$lang = 'fr'">
4625
+ Français
4626
+
4627
+ </xsl:when>
4628
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
4629
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
4630
+ </xsl:choose>
4631
+ </xsl:template><xsl:template match="item" mode="bookmark">
4632
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
4633
+ <fo:bookmark-title>
4634
+ <xsl:if test="@section != ''">
4635
+ <xsl:value-of select="@section"/>
4636
+ <xsl:text> </xsl:text>
4637
+ </xsl:if>
4638
+ <xsl:value-of select="normalize-space(title)"/>
4639
+ </fo:bookmark-title>
4640
+ <xsl:apply-templates mode="bookmark"/>
4641
+ </fo:bookmark>
4642
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
4077
4643
  <xsl:if test="normalize-space() != ''">
4078
4644
  <fo:block xsl:use-attribute-sets="figure-name-style">
4079
-
4645
+
4080
4646
  <xsl:apply-templates/>
4081
4647
  </fo:block>
4082
4648
  </xsl:if>
@@ -4131,7 +4697,7 @@
4131
4697
  <xsl:apply-templates/>
4132
4698
  </xsl:otherwise>
4133
4699
  </xsl:choose>
4134
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
4700
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
4135
4701
  <xsl:text> </xsl:text>
4136
4702
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
4137
4703
  <xsl:copy>
@@ -4140,21 +4706,61 @@
4140
4706
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4141
4707
  <xsl:text> </xsl:text>
4142
4708
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4143
- <fo:block xsl:use-attribute-sets="sourcecode-style">
4144
- <xsl:apply-templates/>
4145
- </fo:block>
4146
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4147
- </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
4709
+
4710
+ <fo:block-container margin-left="0mm">
4711
+ <xsl:if test="parent::*[local-name() = 'note']">
4712
+ <xsl:attribute name="margin-left">
4713
+ <xsl:choose>
4714
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4715
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4716
+ </xsl:choose>
4717
+ </xsl:attribute>
4718
+
4719
+ </xsl:if>
4720
+ <fo:block-container margin-left="0mm">
4721
+
4722
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
4723
+ <xsl:variable name="_font-size">
4724
+
4725
+
4726
+
4727
+ 9
4728
+
4729
+
4730
+
4731
+
4732
+
4733
+
4734
+
4735
+
4736
+
4737
+
4738
+ </xsl:variable>
4739
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4740
+ <xsl:if test="$font-size != ''">
4741
+ <xsl:attribute name="font-size">
4742
+ <xsl:choose>
4743
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4744
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
4745
+ </xsl:choose>
4746
+ </xsl:attribute>
4747
+ </xsl:if>
4748
+ <xsl:apply-templates/>
4749
+ </fo:block>
4750
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4751
+
4752
+ </fo:block-container>
4753
+ </fo:block-container>
4754
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
4148
4755
  <xsl:variable name="text">
4149
4756
  <xsl:call-template name="add-zero-spaces-equal"/>
4150
4757
  </xsl:variable>
4151
- <xsl:call-template name="add-zero-spaces">
4758
+ <xsl:call-template name="add-zero-spaces-java">
4152
4759
  <xsl:with-param name="text" select="$text"/>
4153
4760
  </xsl:call-template>
4154
4761
  </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4155
4762
  <xsl:if test="normalize-space() != ''">
4156
- <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4157
-
4763
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4158
4764
  <xsl:apply-templates/>
4159
4765
  </fo:block>
4160
4766
  </xsl:if>
@@ -4222,6 +4828,145 @@
4222
4828
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4223
4829
  <xsl:apply-templates/>
4224
4830
  </fo:block>
4831
+ </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
4832
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
4833
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
4834
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4835
+ </xsl:if>
4836
+ <fo:block-container margin-left="0mm" margin-right="0mm">
4837
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
4838
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
4839
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
4840
+ </xsl:if>
4841
+ <xsl:variable name="simple-table">
4842
+ <xsl:call-template name="getSimpleTable"/>
4843
+ </xsl:variable>
4844
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
4845
+ <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
4846
+ <!-- <fo:table-column column-width="35mm"/>
4847
+ <fo:table-column column-width="115mm"/> -->
4848
+ <fo:table-column column-width="30%"/>
4849
+ <fo:table-column column-width="70%"/>
4850
+ </xsl:if>
4851
+ <xsl:apply-templates mode="requirement"/>
4852
+ </fo:table>
4853
+ <!-- fn processing -->
4854
+ <xsl:if test=".//*[local-name() = 'fn']">
4855
+ <xsl:for-each select="*[local-name() = 'tbody']">
4856
+ <fo:block font-size="90%" border-bottom="1pt solid black">
4857
+ <xsl:call-template name="fn_display"/>
4858
+ </fo:block>
4859
+ </xsl:for-each>
4860
+ </xsl:if>
4861
+ </fo:block-container>
4862
+ </fo:block-container>
4863
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
4864
+ <fo:table-header>
4865
+ <xsl:apply-templates mode="requirement"/>
4866
+ </fo:table-header>
4867
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
4868
+ <fo:table-body>
4869
+ <xsl:apply-templates mode="requirement"/>
4870
+ </fo:table-body>
4871
+ </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
4872
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
4873
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
4874
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
4875
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
4876
+ </xsl:if>
4877
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
4878
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
4879
+ </xsl:if>
4880
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
4881
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
4882
+ </xsl:if>
4883
+ <xsl:apply-templates mode="requirement"/>
4884
+ </fo:table-row>
4885
+ </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
4886
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4887
+ <xsl:attribute name="text-align">
4888
+ <xsl:choose>
4889
+ <xsl:when test="@align">
4890
+ <xsl:value-of select="@align"/>
4891
+ </xsl:when>
4892
+ <xsl:otherwise>left</xsl:otherwise>
4893
+ </xsl:choose>
4894
+ </xsl:attribute>
4895
+ <xsl:if test="@colspan">
4896
+ <xsl:attribute name="number-columns-spanned">
4897
+ <xsl:value-of select="@colspan"/>
4898
+ </xsl:attribute>
4899
+ </xsl:if>
4900
+ <xsl:if test="@rowspan">
4901
+ <xsl:attribute name="number-rows-spanned">
4902
+ <xsl:value-of select="@rowspan"/>
4903
+ </xsl:attribute>
4904
+ </xsl:if>
4905
+ <xsl:call-template name="display-align"/>
4906
+
4907
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4908
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4909
+ <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
4910
+ </xsl:if>
4911
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
4912
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4913
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4914
+ </xsl:if> -->
4915
+
4916
+ <fo:block>
4917
+ <xsl:apply-templates/>
4918
+ </fo:block>
4919
+ </fo:table-cell>
4920
+ </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
4921
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4922
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
4923
+ <xsl:attribute name="padding">0mm</xsl:attribute>
4924
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
4925
+ </xsl:if>
4926
+ <xsl:attribute name="text-align">
4927
+ <xsl:choose>
4928
+ <xsl:when test="@align">
4929
+ <xsl:value-of select="@align"/>
4930
+ </xsl:when>
4931
+ <xsl:otherwise>left</xsl:otherwise>
4932
+ </xsl:choose>
4933
+ </xsl:attribute>
4934
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
4935
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4936
+ </xsl:if>
4937
+ <xsl:if test="@colspan">
4938
+ <xsl:attribute name="number-columns-spanned">
4939
+ <xsl:value-of select="@colspan"/>
4940
+ </xsl:attribute>
4941
+ </xsl:if>
4942
+ <xsl:if test="@rowspan">
4943
+ <xsl:attribute name="number-rows-spanned">
4944
+ <xsl:value-of select="@rowspan"/>
4945
+ </xsl:attribute>
4946
+ </xsl:if>
4947
+ <xsl:call-template name="display-align"/>
4948
+
4949
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4950
+ <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
4951
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4952
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
4953
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4954
+ </xsl:if>
4955
+ </xsl:if> -->
4956
+ <!-- 2nd line and below -->
4957
+
4958
+ <fo:block>
4959
+ <xsl:apply-templates/>
4960
+ </fo:block>
4961
+ </fo:table-cell>
4962
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
4963
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
4964
+ <xsl:apply-templates/>
4965
+ </fo:block>
4966
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
4967
+ <fo:block> <!-- margin-bottom="10pt" -->
4968
+ <xsl:apply-templates/>
4969
+ </fo:block>
4225
4970
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
4226
4971
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
4227
4972
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -4241,12 +4986,13 @@
4241
4986
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4242
4987
 
4243
4988
  <xsl:variable name="element">
4244
-
4989
+
4245
4990
  inline
4991
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
4246
4992
  </xsl:variable>
4247
4993
 
4248
4994
  <xsl:choose>
4249
- <xsl:when test="normalize-space($element) = 'block'">
4995
+ <xsl:when test="contains(normalize-space($element), 'block')">
4250
4996
  <fo:block xsl:use-attribute-sets="example-body-style">
4251
4997
  <xsl:apply-templates/>
4252
4998
  </fo:block>
@@ -4283,25 +5029,44 @@
4283
5029
  </xsl:otherwise>
4284
5030
  </xsl:choose>
4285
5031
 
4286
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
4287
- <fo:block xsl:use-attribute-sets="example-p-style">
5032
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
5033
+
5034
+ <xsl:variable name="element">
5035
+ block
4288
5036
 
4289
- <xsl:apply-templates/>
4290
- </fo:block>
5037
+ </xsl:variable>
5038
+ <xsl:choose>
5039
+ <xsl:when test="normalize-space($element) = 'block'">
5040
+ <fo:block xsl:use-attribute-sets="example-p-style">
5041
+
5042
+ <xsl:apply-templates/>
5043
+ </fo:block>
5044
+ </xsl:when>
5045
+ <xsl:otherwise>
5046
+ <fo:inline xsl:use-attribute-sets="example-p-style">
5047
+ <xsl:apply-templates/>
5048
+ </fo:inline>
5049
+ </xsl:otherwise>
5050
+ </xsl:choose>
4291
5051
  </xsl:template><xsl:template match="*[local-name() = 'termsource']">
4292
5052
  <fo:block xsl:use-attribute-sets="termsource-style">
4293
5053
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4294
5054
  <xsl:variable name="termsource_text">
4295
5055
  <xsl:apply-templates/>
4296
5056
  </xsl:variable>
5057
+
4297
5058
  <xsl:choose>
4298
5059
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
4299
5060
  <xsl:apply-templates/>
4300
5061
  </xsl:when>
4301
- <xsl:otherwise>
4302
- <xsl:text>[</xsl:text>
4303
- <xsl:apply-templates/>
4304
- <xsl:text>]</xsl:text>
5062
+ <xsl:otherwise>
5063
+
5064
+ <xsl:text>[</xsl:text>
5065
+
5066
+ <xsl:apply-templates/>
5067
+
5068
+ <xsl:text>]</xsl:text>
5069
+
4305
5070
  </xsl:otherwise>
4306
5071
  </xsl:choose>
4307
5072
  </fo:block>
@@ -4312,10 +5077,13 @@
4312
5077
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
4313
5078
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4314
5079
 
4315
- <xsl:call-template name="getTitle">
4316
- <xsl:with-param name="name" select="'title-source'"/>
4317
- </xsl:call-template>
4318
- <xsl:text>: </xsl:text>
5080
+ <fo:inline>
5081
+
5082
+ <xsl:call-template name="getTitle">
5083
+ <xsl:with-param name="name" select="'title-source'"/>
5084
+ </xsl:call-template>
5085
+ <xsl:text>: </xsl:text>
5086
+ </fo:inline>
4319
5087
 
4320
5088
  <fo:inline xsl:use-attribute-sets="origin-style">
4321
5089
  <xsl:apply-templates/>
@@ -4327,18 +5095,29 @@
4327
5095
  <xsl:if test="normalize-space() != ''">
4328
5096
  <xsl:value-of select="."/>
4329
5097
  </xsl:if>
4330
- </xsl:template><xsl:template match="*[local-name() = 'quote']">
5098
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
5099
+ <fo:block-container margin-left="0mm">
5100
+ <xsl:if test="parent::*[local-name() = 'note']">
5101
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
5102
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
5103
+ </xsl:if>
5104
+ </xsl:if>
5105
+
5106
+ <fo:block-container margin-left="0mm">
4331
5107
 
4332
- <fo:block xsl:use-attribute-sets="quote-style">
4333
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4334
- </fo:block>
4335
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4336
- <fo:block xsl:use-attribute-sets="quote-source-style">
4337
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
4338
- <xsl:apply-templates select="*[local-name() = 'author']"/>
4339
- <xsl:apply-templates select="*[local-name() = 'source']"/>
4340
- </fo:block>
4341
- </xsl:if>
5108
+ <fo:block xsl:use-attribute-sets="quote-style">
5109
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
5110
+ </fo:block>
5111
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
5112
+ <fo:block xsl:use-attribute-sets="quote-source-style">
5113
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
5114
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
5115
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
5116
+ </fo:block>
5117
+ </xsl:if>
5118
+
5119
+ </fo:block-container>
5120
+ </fo:block-container>
4342
5121
  </xsl:template><xsl:template match="*[local-name() = 'source']">
4343
5122
  <xsl:if test="../*[local-name() = 'author']">
4344
5123
  <xsl:text>, </xsl:text>
@@ -4366,6 +5145,7 @@
4366
5145
  <xsl:if test="@type = 'inline'">
4367
5146
 
4368
5147
 
5148
+
4369
5149
  </xsl:if>
4370
5150
 
4371
5151
 
@@ -4405,6 +5185,7 @@
4405
5185
 
4406
5186
 
4407
5187
 
5188
+
4408
5189
  </xsl:variable>
4409
5190
 
4410
5191
  <xsl:variable name="padding-right">
@@ -4495,13 +5276,14 @@
4495
5276
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4496
5277
  <fo:block>
4497
5278
  <xsl:call-template name="setId"/>
5279
+
4498
5280
  <xsl:apply-templates/>
4499
5281
  </fo:block>
4500
5282
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
4501
5283
  <fo:block id="{@id}">
4502
5284
  <xsl:apply-templates/>
4503
5285
  </fo:block>
4504
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@id = '_normative_references' or @id = '_references']">
5286
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
4505
5287
 
4506
5288
  <fo:block id="{@id}">
4507
5289
  <xsl:apply-templates/>
@@ -4519,6 +5301,31 @@
4519
5301
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
4520
5302
  <!-- 0xA0 to space replacement -->
4521
5303
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5304
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5305
+ <xsl:choose>
5306
+ <xsl:when test="parent::*[local-name() = 'note']">
5307
+ <fo:block-container>
5308
+ <xsl:attribute name="margin-left">
5309
+ <xsl:choose>
5310
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
5311
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
5312
+ </xsl:choose>
5313
+ </xsl:attribute>
5314
+
5315
+
5316
+ <fo:block-container margin-left="0mm">
5317
+ <fo:block>
5318
+ <xsl:apply-templates select="." mode="ul_ol"/>
5319
+ </fo:block>
5320
+ </fo:block-container>
5321
+ </fo:block-container>
5322
+ </xsl:when>
5323
+ <xsl:otherwise>
5324
+ <fo:block>
5325
+ <xsl:apply-templates select="." mode="ul_ol"/>
5326
+ </fo:block>
5327
+ </xsl:otherwise>
5328
+ </xsl:choose>
4522
5329
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
4523
5330
  <!-- <row>
4524
5331
  <date>05-07-2013</date>
@@ -4550,6 +5357,65 @@
4550
5357
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
4551
5358
  <fo:block><xsl:apply-templates/></fo:block>
4552
5359
  </fo:table-cell>
5360
+ </xsl:template><xsl:template name="processBibitem">
5361
+
5362
+
5363
+
5364
+
5365
+ </xsl:template><xsl:template name="processBibitemDocId">
5366
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5367
+ <xsl:choose>
5368
+ <xsl:when test="normalize-space($_doc_ident) != ''">
5369
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
5370
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
5371
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
5372
+ </xsl:if>
5373
+ <xsl:value-of select="$_doc_ident"/>
5374
+ </xsl:when>
5375
+ <xsl:otherwise>
5376
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
5377
+ <xsl:if test="$type != ''">
5378
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
5379
+ </xsl:if>
5380
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
5381
+ </xsl:otherwise>
5382
+ </xsl:choose>
5383
+ </xsl:template><xsl:template name="processPersonalAuthor">
5384
+ <xsl:choose>
5385
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
5386
+ <author>
5387
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
5388
+ </author>
5389
+ </xsl:when>
5390
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
5391
+ <author>
5392
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
5393
+ <xsl:text> </xsl:text>
5394
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
5395
+ </author>
5396
+ </xsl:when>
5397
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
5398
+ <author>
5399
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
5400
+ <xsl:text> </xsl:text>
5401
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
5402
+ </author>
5403
+ </xsl:when>
5404
+ <xsl:otherwise>
5405
+ <xsl:apply-templates/>
5406
+ </xsl:otherwise>
5407
+ </xsl:choose>
5408
+ </xsl:template><xsl:template name="renderDate">
5409
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
5410
+ <xsl:value-of select="*[local-name() = 'on']"/>
5411
+ </xsl:if>
5412
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
5413
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
5414
+ </xsl:if>
5415
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
5416
+ <xsl:value-of select="translate(.,'. ','')"/>
5417
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
5418
+ <xsl:value-of select="substring(.,1,1)"/>
4553
5419
  </xsl:template><xsl:template name="convertDate">
4554
5420
  <xsl:param name="date"/>
4555
5421
  <xsl:param name="format" select="'short'"/>
@@ -4632,6 +5498,7 @@
4632
5498
 
4633
5499
 
4634
5500
 
5501
+
4635
5502
 
4636
5503
  </xsl:variable>
4637
5504
  <xsl:choose>
@@ -4646,6 +5513,7 @@
4646
5513
  <dc:creator>
4647
5514
 
4648
5515
 
5516
+
4649
5517
  </dc:creator>
4650
5518
  <dc:description>
4651
5519
  <xsl:variable name="abstract">
@@ -4655,6 +5523,7 @@
4655
5523
 
4656
5524
 
4657
5525
 
5526
+
4658
5527
  </xsl:variable>
4659
5528
  <xsl:value-of select="normalize-space($abstract)"/>
4660
5529
  </dc:description>
@@ -4753,7 +5622,9 @@
4753
5622
 
4754
5623
 
4755
5624
 
4756
-
5625
+
5626
+
5627
+
4757
5628
  </xsl:variable>
4758
5629
  <xsl:if test="$documentNS != $XSLNS">
4759
5630
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -4779,4 +5650,21 @@
4779
5650
  </xsl:otherwise>
4780
5651
  </xsl:choose>
4781
5652
  </xsl:attribute>
5653
+ </xsl:template><xsl:template name="add-letter-spacing">
5654
+ <xsl:param name="text"/>
5655
+ <xsl:param name="letter-spacing" select="'0.15'"/>
5656
+ <xsl:if test="string-length($text) &gt; 0">
5657
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
5658
+ <fo:inline padding-right="{$letter-spacing}mm">
5659
+ <xsl:if test="$char = '®'">
5660
+ <xsl:attribute name="font-size">58%</xsl:attribute>
5661
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
5662
+ </xsl:if>
5663
+ <xsl:value-of select="$char"/>
5664
+ </fo:inline>
5665
+ <xsl:call-template name="add-letter-spacing">
5666
+ <xsl:with-param name="text" select="substring($text, 2)"/>
5667
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
5668
+ </xsl:call-template>
5669
+ </xsl:if>
4782
5670
  </xsl:template></xsl:stylesheet>