metanorma-ogc 1.5.1 → 1.5.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/lib/asciidoctor/ogc/boilerplate.xml +3 -3
  4. data/lib/asciidoctor/ogc/cleanup.rb +9 -0
  5. data/lib/asciidoctor/ogc/converter.rb +5 -3
  6. data/lib/asciidoctor/ogc/isodoc.rng +56 -17
  7. data/lib/asciidoctor/ogc/validate.rb +12 -0
  8. data/lib/isodoc/ogc/base_convert.rb +2 -1
  9. data/lib/isodoc/ogc/html/htmlstyle.css +6 -2
  10. data/lib/isodoc/ogc/html/htmlstyle.scss +6 -1
  11. data/lib/isodoc/ogc/html/ogc.css +0 -1
  12. data/lib/isodoc/ogc/html/ogc.scss +0 -1
  13. data/lib/isodoc/ogc/html/ogc_wp.css +0 -1
  14. data/lib/isodoc/ogc/html/ogc_wp.scss +0 -1
  15. data/lib/isodoc/ogc/html/scripts.html +0 -1
  16. data/lib/isodoc/ogc/html_convert.rb +1 -0
  17. data/lib/isodoc/ogc/i18n-en.yaml +10 -12
  18. data/lib/isodoc/ogc/metadata.rb +6 -2
  19. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +407 -117
  20. data/lib/isodoc/ogc/ogc.best-practice.xsl +407 -117
  21. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +407 -117
  22. data/lib/isodoc/ogc/ogc.community-practice.xsl +407 -117
  23. data/lib/isodoc/ogc/ogc.community-standard.xsl +407 -117
  24. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +407 -117
  25. data/lib/isodoc/ogc/ogc.engineering-report.xsl +407 -117
  26. data/lib/isodoc/ogc/ogc.other.xsl +407 -117
  27. data/lib/isodoc/ogc/ogc.policy.xsl +407 -117
  28. data/lib/isodoc/ogc/ogc.reference-model.xsl +407 -117
  29. data/lib/isodoc/ogc/ogc.release-notes.xsl +407 -117
  30. data/lib/isodoc/ogc/ogc.standard.xsl +407 -117
  31. data/lib/isodoc/ogc/ogc.test-suite.xsl +407 -117
  32. data/lib/isodoc/ogc/ogc.user-guide.xsl +407 -117
  33. data/lib/isodoc/ogc/ogc.white-paper.xsl +284 -94
  34. data/lib/isodoc/ogc/presentation_xml_convert.rb +39 -2
  35. data/lib/isodoc/ogc/reqt.rb +1 -1
  36. data/lib/isodoc/ogc/sections.rb +9 -2
  37. data/lib/isodoc/ogc/word_convert.rb +28 -4
  38. data/lib/isodoc/ogc/xref.rb +4 -2
  39. data/lib/metanorma/ogc/version.rb +1 -1
  40. data/metanorma-ogc.gemspec +1 -1
  41. metadata +8 -9
  42. data/README.adoc.old +0 -187
@@ -7,6 +7,8 @@
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
8
  <xsl:param name="basepath"/>
9
9
 
10
+ <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
11
+
10
12
  <xsl:variable name="pageWidth" select="215.9"/>
11
13
  <xsl:variable name="pageHeight" select="279.4"/>
12
14
  <xsl:variable name="marginLeftRight1" select="35"/>
@@ -60,19 +62,70 @@
60
62
  </xsl:variable>
61
63
  <xsl:variable name="color_blue">rgb(33, 55, 92)</xsl:variable>
62
64
 
65
+ <xsl:variable name="toc_recommendations_">
66
+ <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
67
+ <xsl:variable name="table_id" select="@id"/>
68
+ <recommendation alt-text="{.//ogc:p[@class = 'RecommendationTitle'][1]/text()}">
69
+ <xsl:copy-of select="@id"/>
70
+ <xsl:variable name="title">
71
+ <xsl:apply-templates select=".//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/node()"/>
72
+ </xsl:variable>
73
+ <xsl:variable name="bookmark" select="normalize-space(.//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/node())"/>
74
+ <xsl:variable name="regex_str" select="'^([^0-9]+) (\d+).*'"/>
75
+ <xsl:variable name="class" select="java:replaceAll(java:java.lang.String.new($bookmark), $regex_str, '$1')"/>
76
+ <xsl:variable name="num" select="java:replaceAll(java:java.lang.String.new($bookmark), $regex_str, '$2')"/>
77
+ <xsl:variable name="class_lc" select="java:toLowerCase(java:java.lang.String.new($class))"/>
78
+ <!-- <xsl:attribute name="class_str">
79
+ <xsl:value-of select="$class"/>
80
+ </xsl:attribute> -->
81
+ <xsl:attribute name="class">
82
+ <xsl:choose>
83
+ <xsl:when test="$class_lc = 'requirements class'">1</xsl:when>
84
+ <xsl:when test="$class_lc = 'requirement'">2</xsl:when>
85
+ <xsl:when test="$class_lc = 'recommendation'">3</xsl:when>
86
+ <xsl:when test="$class_lc = 'permission'">4</xsl:when>
87
+ <xsl:when test="$class_lc = 'conformance class'">5</xsl:when>
88
+ <xsl:when test="$class_lc = 'abstract test'">6</xsl:when>
89
+ <xsl:when test="$class_lc = 'requirement test'">7</xsl:when>
90
+ <xsl:when test="$class_lc = 'recommendation test'">8</xsl:when>
91
+ <xsl:when test="$class_lc = 'permission test'">9</xsl:when>
92
+ <xsl:otherwise>9999</xsl:otherwise>
93
+ </xsl:choose>
94
+ </xsl:attribute>
95
+ <xsl:attribute name="num">
96
+ <xsl:value-of select="$num"/>
97
+ </xsl:attribute>
98
+ <title>
99
+ <xsl:copy-of select="$title"/>
100
+ </title>
101
+ <bookmark>
102
+ <xsl:value-of select="$bookmark"/>
103
+ </bookmark>
104
+ </recommendation>
105
+ </xsl:for-each>
106
+ </xsl:variable>
107
+ <xsl:variable name="toc_recommendations">
108
+ <xsl:for-each select="xalan:nodeset($toc_recommendations_)/*">
109
+ <xsl:sort select="@class" data-type="number"/>
110
+ <xsl:sort select="@num" data-type="number"/>
111
+ <xsl:copy-of select="."/>
112
+ </xsl:for-each>
113
+ </xsl:variable>
114
+
63
115
  <xsl:variable name="contents">
64
116
  <contents>
65
117
 
66
118
  <!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
67
119
  <!-- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/*" mode="contents"/> -->
68
120
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract" mode="contents"/>
121
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'executivesummary']" mode="contents"/>
69
122
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keywords']" mode="contents"/>
70
123
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword" mode="contents"/>
71
124
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'security']" mode="contents"/>
72
125
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']" mode="contents"/>
73
126
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters" mode="contents"/>
74
127
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:introduction" mode="contents"/>
75
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'security') and not(@type = 'submitting_orgs') and not(@type = 'keywords')]" mode="contents"/>
128
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'executivesummary') and not(@type = 'security') and not(@type = 'submitting_orgs') and not(@type = 'keywords')]" mode="contents"/>
76
129
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements" mode="contents"/>
77
130
 
78
131
 
@@ -372,7 +425,7 @@
372
425
 
373
426
  <fo:block-container line-height="130%">
374
427
  <fo:block role="TOC">
375
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
428
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true' and normalize-space(@id) != '']">
376
429
 
377
430
  <fo:block role="TOCI">
378
431
  <xsl:if test="@level = 1">
@@ -381,7 +434,7 @@
381
434
  <xsl:if test="@level = 1 or @parent = 'annex'">
382
435
  <xsl:attribute name="font-size">12pt</xsl:attribute>
383
436
  </xsl:if>
384
- <xsl:if test="@level = 2 and not(@parent = 'annex')">
437
+ <xsl:if test="@level &gt;= 2 and not(@parent = 'annex')">
385
438
  <xsl:attribute name="font-size">10pt</xsl:attribute>
386
439
  </xsl:if>
387
440
 
@@ -399,7 +452,10 @@
399
452
  </fo:list-item-label>
400
453
  <fo:list-item-body start-indent="body-start()">
401
454
  <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
402
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
455
+ <fo:basic-link internal-destination="{@id}">
456
+ <xsl:call-template name="setAltText">
457
+ <xsl:with-param name="value" select="text()"/>
458
+ </xsl:call-template>
403
459
  <xsl:variable name="sectionTitle">
404
460
  <xsl:apply-templates select="title"/>
405
461
  </xsl:variable>
@@ -416,8 +472,17 @@
416
472
  </fo:list-block>
417
473
  </xsl:when>
418
474
  <xsl:otherwise>
419
- <fo:block text-align-last="justify" margin-left="8mm">
420
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
475
+ <xsl:variable name="margin-left">
476
+ <xsl:choose>
477
+ <xsl:when test="number(@level) != 'NaN'"><xsl:value-of select="(@level - 1) * 8"/></xsl:when>
478
+ <xsl:otherwise>8</xsl:otherwise>
479
+ </xsl:choose>
480
+ </xsl:variable>
481
+ <fo:block text-align-last="justify" margin-left="{$margin-left}mm">
482
+ <fo:basic-link internal-destination="{@id}">
483
+ <xsl:call-template name="setAltText">
484
+ <xsl:with-param name="value" select="text()"/>
485
+ </xsl:call-template>
421
486
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
422
487
  <xsl:text> </xsl:text>
423
488
  <xsl:apply-templates select="title"/>
@@ -437,7 +502,7 @@
437
502
  </fo:block>
438
503
  </fo:block-container>
439
504
 
440
- <xsl:if test="//ogc:table[@id and ogc:name and contains(ogc:name, '—')]">
505
+ <xsl:if test="//ogc:table[@id and ogc:name]"> <!-- contains(ogc:name, '—') -->
441
506
  <xsl:variable name="title-list-tables">
442
507
  <xsl:call-template name="getTitle">
443
508
  <xsl:with-param name="name" select="'title-list-tables'"/>
@@ -452,9 +517,12 @@
452
517
  </fo:block-container>
453
518
  </fo:block-container>
454
519
  <fo:block-container line-height="130%">
455
- <xsl:for-each select="//ogc:table[@id and ogc:name and contains(ogc:name, '—')]">
520
+ <xsl:for-each select="//ogc:table[@id and ogc:name and normalize-space(@id) != '']"> <!-- contains(ogc:name, '—') -->
456
521
  <fo:block text-align-last="justify" margin-top="2pt" role="TOCI">
457
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
522
+ <fo:basic-link internal-destination="{@id}">
523
+ <xsl:call-template name="setAltText">
524
+ <xsl:with-param name="value" select="ogc:name"/>
525
+ </xsl:call-template>
458
526
  <xsl:apply-templates select="ogc:name" mode="contents"/>
459
527
  <fo:inline keep-together.within-line="always">
460
528
  <fo:leader leader-pattern="dots"/>
@@ -465,8 +533,18 @@
465
533
  </xsl:for-each>
466
534
  </fo:block-container>
467
535
  </xsl:if>
468
-
469
- <xsl:if test="//ogc:figure[@id and ogc:name and contains(ogc:name, '—')]">
536
+
537
+ <xsl:variable name="list_of_figures_">
538
+ <xsl:for-each select="//ogc:figure[@id and ogc:name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(ogc:name, 'Figure ') and normalize-space(@id) != '']">
539
+ <figure id="{@id}" alt-text="{ogc:name}">
540
+ <xsl:apply-templates select="ogc:name" mode="contents"/>
541
+ </figure>
542
+ </xsl:for-each>
543
+ </xsl:variable>
544
+ <xsl:variable name="list_of_figures" select="xalan:nodeset($list_of_figures_)"/>
545
+
546
+ <!-- <xsl:if test="//ogc:figure[@id and ogc:name and not(@unnumbered = 'true')] or //*[@id and starts-with(ogc:name, 'Figure ')]"> --> <!-- contains(ogc:name, '—') -->
547
+ <xsl:if test="$list_of_figures//figure">
470
548
  <xsl:variable name="title-list-figures">
471
549
  <xsl:call-template name="getTitle">
472
550
  <xsl:with-param name="name" select="'title-list-figures'"/>
@@ -481,10 +559,15 @@
481
559
  </fo:block-container>
482
560
 
483
561
  <fo:block-container line-height="130%">
484
- <xsl:for-each select="//ogc:figure[@id and ogc:name and contains(ogc:name, '')]">
562
+ <!-- <xsl:for-each select="//ogc:figure[@id and ogc:name and not(@unnumbered = 'true')] or //*[@id and starts-with(ogc:name, 'Figure ')]"> --> <!-- contains(ogc:name, '—') -->
563
+ <xsl:for-each select="$list_of_figures/figure"> <!-- contains(ogc:name, '—') -->
485
564
  <fo:block text-align-last="justify" margin-top="2pt" role="TOCI">
486
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
487
- <xsl:apply-templates select="ogc:name" mode="contents"/>
565
+ <fo:basic-link internal-destination="{@id}">
566
+ <xsl:call-template name="setAltText">
567
+ <xsl:with-param name="value" select="@alt-text"/>
568
+ </xsl:call-template>
569
+ <!-- <xsl:apply-templates select="ogc:name" mode="contents"/> -->
570
+ <xsl:copy-of select="node()"/>
488
571
  <fo:inline keep-together.within-line="always">
489
572
  <fo:leader leader-pattern="dots"/>
490
573
  <fo:page-number-citation ref-id="{@id}"/>
@@ -512,12 +595,14 @@
512
595
  </fo:block-container>
513
596
 
514
597
  <fo:block-container line-height="130%">
515
- <!-- <xsl:for-each select="//ogc:permission[@id and ogc:name] | //ogc:recommendation[@id and ogc:name] | //ogc:requirement[@id and ogc:name]"> -->
516
- <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
517
- <xsl:variable name="table_id" select="@id"/>
598
+ <!-- <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]"> -->
599
+ <xsl:for-each select="xalan:nodeset($toc_recommendations)/*[normalize-space(@id) != '']">
518
600
  <fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
519
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{.//ogc:p[@class = 'RecommendationTitle'][1]/text()}">
520
- <xsl:apply-templates select=".//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/node()"/>
601
+ <fo:basic-link internal-destination="{@id}">
602
+ <xsl:call-template name="setAltText">
603
+ <xsl:with-param name="value" select="@alt-text"/>
604
+ </xsl:call-template>
605
+ <xsl:copy-of select="title/node()"/>
521
606
  <xsl:text> </xsl:text>
522
607
  <fo:inline keep-together.within-line="always">
523
608
  <fo:leader leader-pattern="dots"/>
@@ -537,6 +622,7 @@
537
622
  <fo:block line-height="125%">
538
623
  <!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
539
624
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract"/>
625
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'executivesummary']"/>
540
626
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keywords']"/>
541
627
  <xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:foreword">
542
628
  <fo:block break-after="page"/>
@@ -561,7 +647,7 @@
561
647
 
562
648
 
563
649
 
564
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'security') and not(@type = 'submitting_orgs') and not(@type = 'keywords')]"/>
650
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'executivesummary') and not(@type = 'security') and not(@type = 'submitting_orgs') and not(@type = 'keywords')]"/>
565
651
  <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements"/>
566
652
  </fo:block>
567
653
  </fo:flow>
@@ -695,7 +781,7 @@
695
781
 
696
782
  <xsl:variable name="display">
697
783
  <xsl:choose>
698
- <xsl:when test="$level &gt;= 3">false</xsl:when>
784
+ <xsl:when test="$level &gt; $toc_level">false</xsl:when>
699
785
  <xsl:otherwise>true</xsl:otherwise>
700
786
  </xsl:choose>
701
787
  </xsl:variable>
@@ -1003,32 +1089,6 @@
1003
1089
  </xsl:if>
1004
1090
  </xsl:template>
1005
1091
 
1006
- <!--
1007
- <fn reference="1">
1008
- <p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
1009
- </fn>
1010
- -->
1011
- <xsl:template match="ogc:title//ogc:fn | ogc:name//ogc:fn | ogc:p/ogc:fn[not(ancestor::ogc:table)] | ogc:p/*/ogc:fn[not(ancestor::ogc:table)] | ogc:sourcecode/ogc:fn[not(ancestor::ogc:table)]" priority="2" name="fn">
1012
- <fo:footnote keep-with-previous.within-line="always">
1013
- <xsl:variable name="number" select="@reference"/>
1014
-
1015
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
1016
- <fo:basic-link internal-destination="footnote_{@reference}" fox:alt-text="footnote {@reference}">
1017
- <xsl:value-of select="$number"/><!-- + count(//ogc:bibitem/ogc:note) -->
1018
- </fo:basic-link>
1019
- </fo:inline>
1020
- <fo:footnote-body>
1021
- <fo:block font-size="10pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" color="{$color_main}" line-height="124%" text-align="justify">
1022
- <fo:inline id="footnote_{@reference}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"> <!-- baseline-shift="30%" padding-right="3mm" font-size="60%" alignment-baseline="hanging" -->
1023
- <xsl:value-of select="$number "/><!-- + count(//ogc:bibitem/ogc:note) -->
1024
- </fo:inline>
1025
- <xsl:for-each select="ogc:p">
1026
- <xsl:apply-templates/>
1027
- </xsl:for-each>
1028
- </fo:block>
1029
- </fo:footnote-body>
1030
- </fo:footnote>
1031
- </xsl:template>
1032
1092
 
1033
1093
  <xsl:template match="ogc:fn/ogc:p">
1034
1094
  <fo:block>
@@ -1193,7 +1253,7 @@
1193
1253
  <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" priority="2"/>
1194
1254
 
1195
1255
  <xsl:template match="ogc:preferred" mode="term_name">
1196
- <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1256
+ <fo:inline font-size="18pt" padding-right="3mm"><xsl:call-template name="setStyle_preferred"/><xsl:apply-templates/></fo:inline>
1197
1257
  <fo:inline padding-right="2mm"> </fo:inline>
1198
1258
  </xsl:template>
1199
1259
 
@@ -2241,6 +2301,80 @@
2241
2301
 
2242
2302
  </xsl:attribute-set><xsl:attribute-set name="toc-style">
2243
2303
  <xsl:attribute name="line-height">135%</xsl:attribute>
2304
+ </xsl:attribute-set><xsl:attribute-set name="fn-style">
2305
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2306
+ </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
2307
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2308
+
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+ <xsl:attribute name="font-size">65%</xsl:attribute>
2322
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2323
+
2324
+
2325
+
2326
+
2327
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
2328
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2329
+ <xsl:attribute name="font-style">normal</xsl:attribute>
2330
+ <xsl:attribute name="text-indent">0</xsl:attribute>
2331
+ <xsl:attribute name="start-indent">0</xsl:attribute>
2332
+
2333
+
2334
+
2335
+
2336
+
2337
+
2338
+
2339
+
2340
+
2341
+
2342
+
2343
+
2344
+
2345
+
2346
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2347
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2348
+ <xsl:attribute name="color"><xsl:value-of select="$color_main"/></xsl:attribute>
2349
+ <xsl:attribute name="line-height">124%</xsl:attribute>
2350
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2351
+
2352
+
2353
+
2354
+
2355
+
2356
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
2357
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2358
+
2359
+
2360
+
2361
+
2362
+
2363
+
2364
+
2365
+
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+
2372
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2373
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2374
+
2375
+
2376
+
2377
+
2244
2378
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
2245
2379
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2246
2380
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2266,7 +2400,8 @@
2266
2400
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2267
2401
 
2268
2402
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2269
- <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2403
+
2404
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
2270
2405
  <xsl:sort select="@displayorder" data-type="number"/>
2271
2406
  <xsl:apply-templates select="." mode="contents"/>
2272
2407
  </xsl:for-each>
@@ -2276,7 +2411,7 @@
2276
2411
  <xsl:apply-templates select="." mode="contents"/>
2277
2412
  </xsl:for-each>
2278
2413
 
2279
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2414
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2280
2415
  <xsl:sort select="@displayorder" data-type="number"/>
2281
2416
  <xsl:apply-templates select="." mode="contents"/>
2282
2417
  </xsl:for-each>
@@ -3207,6 +3342,102 @@
3207
3342
 
3208
3343
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3209
3344
  <xsl:apply-templates/>
3345
+ </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
3346
+
3347
+ <!-- list of footnotes to calculate actual footnotes number -->
3348
+ <xsl:variable name="p_fn_">
3349
+ <xsl:choose>
3350
+ <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
3351
+ <fn gen_id="{generate-id(.)}">
3352
+ <xsl:copy-of select="@*"/>
3353
+ <xsl:copy-of select="node()"/>
3354
+ </fn>
3355
+ </xsl:when>
3356
+ <xsl:otherwise>
3357
+ <!-- itetation for:
3358
+ footnotes in bibdata/title
3359
+ footnotes in bibliography
3360
+ footnotes in document's body (except table's head/body/foot and figure text)
3361
+ -->
3362
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
3363
+ <fn gen_id="{generate-id(.)}">
3364
+ <xsl:copy-of select="@*"/>
3365
+ <xsl:copy-of select="node()"/>
3366
+ </fn>
3367
+ </xsl:for-each>
3368
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
3369
+ <xsl:sort select="@displayorder" data-type="number"/>
3370
+ <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
3371
+ <!-- copy unique fn -->
3372
+ <fn gen_id="{generate-id(.)}">
3373
+ <xsl:copy-of select="@*"/>
3374
+ <xsl:copy-of select="node()"/>
3375
+ </fn>
3376
+ </xsl:for-each>
3377
+ </xsl:for-each>
3378
+ </xsl:otherwise>
3379
+ </xsl:choose>
3380
+ </xsl:variable>
3381
+ <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
3382
+
3383
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
3384
+ <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
3385
+ <xsl:variable name="reference" select="@reference"/>
3386
+ <!-- fn sequence number in document -->
3387
+ <xsl:variable name="current_fn_number">
3388
+ <xsl:choose>
3389
+ <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
3390
+ <xsl:otherwise>
3391
+ <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
3392
+ </xsl:otherwise>
3393
+ </xsl:choose>
3394
+ </xsl:variable>
3395
+ <xsl:variable name="current_fn_number_text">
3396
+ <xsl:value-of select="$current_fn_number"/>
3397
+
3398
+
3399
+ </xsl:variable>
3400
+
3401
+ <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
3402
+ <xsl:variable name="footnote_inline">
3403
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
3404
+
3405
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3406
+ <xsl:value-of select="$current_fn_number_text"/>
3407
+ </fo:basic-link>
3408
+ </fo:inline>
3409
+ </xsl:variable>
3410
+ <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
3411
+ gen_id=<xsl:value-of select="$gen_id"/> -->
3412
+ <xsl:choose>
3413
+ <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
3414
+ <xsl:copy-of select="$footnote_inline"/>
3415
+ </xsl:when>
3416
+ <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
3417
+ <fo:footnote xsl:use-attribute-sets="fn-style">
3418
+ <xsl:copy-of select="$footnote_inline"/>
3419
+ <fo:footnote-body>
3420
+
3421
+ <fo:block-container text-indent="0" start-indent="0">
3422
+
3423
+
3424
+ <fo:block xsl:use-attribute-sets="fn-body-style">
3425
+
3426
+
3427
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3428
+
3429
+ <xsl:value-of select="$current_fn_number_text"/>
3430
+ </fo:inline>
3431
+ <xsl:apply-templates/>
3432
+ </fo:block>
3433
+ </fo:block-container>
3434
+ </fo:footnote-body>
3435
+ </fo:footnote>
3436
+ </xsl:when>
3437
+ <xsl:otherwise>
3438
+ <xsl:copy-of select="$footnote_inline"/>
3439
+ </xsl:otherwise>
3440
+ </xsl:choose>
3210
3441
  </xsl:template><xsl:template name="fn_display">
3211
3442
  <xsl:variable name="references">
3212
3443
 
@@ -3412,6 +3643,8 @@
3412
3643
 
3413
3644
  </fo:basic-link>
3414
3645
  </fo:inline>
3646
+ </xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
3647
+ <fo:inline><xsl:value-of select="."/></fo:inline>
3415
3648
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
3416
3649
  <fo:inline>
3417
3650
  <xsl:apply-templates/>
@@ -3811,7 +4044,7 @@
3811
4044
 
3812
4045
 
3813
4046
 
3814
- 10
4047
+ 9.5
3815
4048
 
3816
4049
 
3817
4050
 
@@ -4407,22 +4640,6 @@
4407
4640
  <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
4408
4641
  <xsl:apply-templates/>
4409
4642
  </fo:inline>
4410
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
4411
- <xsl:variable name="title-modified">
4412
-
4413
-
4414
- <xsl:call-template name="getTitle">
4415
- <xsl:with-param name="name" select="'title-modified'"/>
4416
- </xsl:call-template>
4417
-
4418
- </xsl:variable>
4419
-
4420
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
4421
- <xsl:choose>
4422
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
4423
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
4424
- </xsl:choose>
4425
- <xsl:apply-templates/>
4426
4643
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
4427
4644
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
4428
4645
 
@@ -4995,12 +5212,12 @@
4995
5212
  </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
4996
5213
  <xsl:apply-templates mode="contents"/>
4997
5214
  <xsl:text> </xsl:text>
4998
- </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">
5215
+ </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'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
4999
5216
  <xsl:apply-templates mode="bookmarks"/>
5000
5217
  <xsl:text> </xsl:text>
5001
5218
  </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
5002
5219
  <xsl:value-of select="."/>
5003
- </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
5220
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
5004
5221
  <xsl:value-of select="."/>
5005
5222
  </xsl:template><xsl:template match="node()" mode="contents">
5006
5223
  <xsl:apply-templates mode="contents"/>
@@ -5099,14 +5316,14 @@
5099
5316
 
5100
5317
 
5101
5318
  <xsl:variable name="list_of_tables_">
5102
- <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and contains(*[local-name() = 'name'], '—')]">
5319
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]"> <!-- contains(*[local-name() = 'name'], '—') -->
5103
5320
  <table id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></table>
5104
5321
  </xsl:for-each>
5105
5322
  </xsl:variable>
5106
5323
  <xsl:variable name="list_of_tables" select="xalan:nodeset($list_of_tables_)"/>
5107
5324
 
5108
5325
  <xsl:variable name="list_of_figures_">
5109
- <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and contains(*[local-name() = 'name'], '')]">
5326
+ <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true')] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ')]"> <!-- contains(*[local-name() = 'name'], '—') -->
5110
5327
  <figure id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></figure>
5111
5328
  </xsl:for-each>
5112
5329
  </xsl:variable>
@@ -5159,10 +5376,11 @@
5159
5376
  <xsl:with-param name="name" select="'title-list-recommendations'"/>
5160
5377
  </xsl:call-template>
5161
5378
  </fo:bookmark-title>
5162
- <xsl:for-each select="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
5379
+ <!-- <xsl:for-each select="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]"> -->
5380
+ <xsl:for-each select="xalan:nodeset($toc_recommendations)/*">
5163
5381
  <xsl:variable name="table_id" select="@id"/>
5164
5382
  <fo:bookmark internal-destination="{@id}">
5165
- <fo:bookmark-title><xsl:value-of select=".//*[local-name() = 'p'][@class = 'RecommendationTitle'][ancestor::*[local-name() = 'table'][1][@id= $table_id]]/node()"/></fo:bookmark-title>
5383
+ <fo:bookmark-title><xsl:value-of select="bookmark"/></fo:bookmark-title>
5166
5384
  </fo:bookmark>
5167
5385
  </xsl:for-each>
5168
5386
  </fo:bookmark>
@@ -5341,6 +5559,12 @@
5341
5559
 
5342
5560
 
5343
5561
 
5562
+
5563
+ <xsl:if test="parent::*[local-name() = 'example']">
5564
+ <fo:block font-size="1pt" line-height="10%" space-after="4pt"> </fo:block>
5565
+ </xsl:if>
5566
+
5567
+
5344
5568
  <fo:block xsl:use-attribute-sets="sourcecode-style">
5345
5569
  <xsl:variable name="_font-size">
5346
5570
 
@@ -5355,7 +5579,7 @@
5355
5579
 
5356
5580
 
5357
5581
 
5358
-
5582
+ 9.5
5359
5583
 
5360
5584
 
5361
5585
 
@@ -5374,13 +5598,25 @@
5374
5598
 
5375
5599
 
5376
5600
 
5601
+
5602
+ <xsl:if test="parent::*[local-name() = 'example']">
5603
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
5604
+ </xsl:if>
5605
+
5606
+
5377
5607
  <xsl:apply-templates/>
5378
5608
  </fo:block>
5379
-
5609
+
5380
5610
 
5381
5611
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5382
5612
 
5383
5613
 
5614
+
5615
+ <xsl:if test="parent::*[local-name() = 'example']">
5616
+ <fo:block font-size="1pt" line-height="10%" space-before="6pt"> </fo:block>
5617
+ </xsl:if>
5618
+
5619
+
5384
5620
  </fo:block-container>
5385
5621
  </fo:block-container>
5386
5622
  </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -5737,59 +5973,71 @@
5737
5973
  <xsl:variable name="termsource_text">
5738
5974
  <xsl:apply-templates/>
5739
5975
  </xsl:variable>
5740
-
5741
- <xsl:choose>
5976
+ <xsl:copy-of select="$termsource_text"/>
5977
+ <!-- <xsl:choose>
5742
5978
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
5743
- <!-- <xsl:apply-templates /> -->
5744
5979
  <xsl:copy-of select="$termsource_text"/>
5745
5980
  </xsl:when>
5746
5981
  <xsl:otherwise>
5747
-
5748
-
5749
- <!-- <xsl:apply-templates /> -->
5982
+ <xsl:if test="$namespace = 'bsi'">
5983
+ <xsl:choose>
5984
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
5985
+ <xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
5986
+ </xsl:choose>
5987
+ </xsl:if>
5988
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
5989
+ <xsl:text>[</xsl:text>
5990
+ </xsl:if>
5750
5991
  <xsl:copy-of select="$termsource_text"/>
5751
-
5752
-
5992
+ <xsl:if test="$namespace = 'bsi'">
5993
+ <xsl:choose>
5994
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
5995
+ <xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
5996
+ </xsl:choose>
5997
+ </xsl:if>
5998
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
5999
+ <xsl:text>]</xsl:text>
6000
+ </xsl:if>
5753
6001
  </xsl:otherwise>
5754
- </xsl:choose>
6002
+ </xsl:choose> -->
5755
6003
  </fo:block>
5756
6004
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5757
6005
  <xsl:if test="normalize-space() != ''">
5758
6006
  <xsl:value-of select="."/>
5759
6007
  </xsl:if>
5760
- </xsl:template><xsl:variable name="localized.source">
5761
- <xsl:call-template name="getLocalizedString">
5762
- <xsl:with-param name="key">source</xsl:with-param>
5763
- </xsl:call-template>
5764
- </xsl:variable><xsl:template match="*[local-name() = 'origin']">
6008
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
6009
+ <fo:inline>
6010
+
6011
+
6012
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
6013
+
6014
+ <xsl:value-of select="."/>
6015
+ </fo:inline>
6016
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
5765
6017
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5766
6018
  <xsl:if test="normalize-space(@citeas) = ''">
5767
6019
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5768
6020
  </xsl:if>
5769
-
5770
- <xsl:text>[</xsl:text>
5771
- <fo:inline>
5772
-
5773
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5774
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
5775
-
5776
-
5777
-
5778
-
5779
-
5780
- <xsl:value-of select="$localized.source"/>
5781
- <xsl:text>: </xsl:text>
5782
-
5783
-
5784
-
5785
-
5786
- </fo:inline>
5787
-
5788
6021
  <fo:inline xsl:use-attribute-sets="origin-style">
5789
6022
  <xsl:apply-templates/>
5790
6023
  </fo:inline>
5791
- <xsl:text>]</xsl:text>
5792
- </fo:basic-link>
6024
+ </fo:basic-link>
6025
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
6026
+ <xsl:variable name="title-modified">
6027
+
6028
+
6029
+ <xsl:call-template name="getTitle">
6030
+ <xsl:with-param name="name" select="'title-modified'"/>
6031
+ </xsl:call-template>
6032
+
6033
+ </xsl:variable>
6034
+
6035
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
6036
+ <xsl:choose>
6037
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
6038
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
6039
+ </xsl:choose>
6040
+ <xsl:apply-templates/>
5793
6041
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
5794
6042
  <fo:inline><xsl:apply-templates/></fo:inline>
5795
6043
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
@@ -5972,24 +6220,29 @@
5972
6220
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
5973
6221
  <xsl:variable name="title-deprecated">
5974
6222
 
5975
-
5976
- <xsl:call-template name="getTitle">
5977
- <xsl:with-param name="name" select="'title-deprecated'"/>
6223
+ <xsl:call-template name="getLocalizedString">
6224
+ <xsl:with-param name="key">deprecated</xsl:with-param>
5978
6225
  </xsl:call-template>
5979
6226
 
6227
+
5980
6228
  </xsl:variable>
5981
6229
  <fo:block xsl:use-attribute-sets="deprecates-style">
5982
6230
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
5983
6231
  </fo:block>
6232
+ </xsl:template><xsl:template name="setStyle_preferred">
6233
+ <xsl:if test="*[local-name() = 'strong']">
6234
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
6235
+ </xsl:if>
5984
6236
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
5985
6237
  <fo:block xsl:use-attribute-sets="definition-style">
5986
6238
  <xsl:apply-templates/>
5987
6239
  </fo:block>
5988
6240
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
5989
6241
  <xsl:apply-templates/>
5990
- </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
6242
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5991
6243
  <fo:inline> <xsl:apply-templates/></fo:inline>
5992
- <fo:block> </fo:block>
6244
+ <!-- <fo:block>&#xA0;</fo:block> -->
6245
+ <fo:block/>
5993
6246
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5994
6247
 
5995
6248
  <fo:block>
@@ -6530,7 +6783,31 @@
6530
6783
  <fo:block-container border="1pt solid black" width="50%">
6531
6784
  <fo:block> </fo:block>
6532
6785
  </fo:block-container>
6533
- </xsl:template><xsl:template match="*[local-name() = 'toc']">
6786
+ </xsl:template><xsl:variable name="toc_level">
6787
+ <xsl:choose>
6788
+ <xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
6789
+ <xsl:otherwise><!-- default value -->
6790
+
6791
+
6792
+
6793
+
6794
+
6795
+
6796
+
6797
+
6798
+
6799
+
6800
+
6801
+
6802
+
6803
+ 2
6804
+
6805
+
6806
+
6807
+
6808
+ </xsl:otherwise>
6809
+ </xsl:choose>
6810
+ </xsl:variable><xsl:template match="*[local-name() = 'toc']">
6534
6811
  <xsl:param name="colwidths"/>
6535
6812
  <xsl:variable name="colwidths_">
6536
6813
  <xsl:choose>
@@ -7065,12 +7342,15 @@
7065
7342
  <xsl:param name="default">left</xsl:param>
7066
7343
  <xsl:attribute name="text-align">
7067
7344
  <xsl:choose>
7068
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
7345
+ <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
7069
7346
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
7070
7347
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
7071
7348
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
7072
7349
  </xsl:choose>
7073
7350
  </xsl:attribute>
7351
+ <xsl:if test="@align = 'indent'">
7352
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
7353
+ </xsl:if>
7074
7354
  </xsl:template><xsl:template name="number-to-words">
7075
7355
  <xsl:param name="number"/>
7076
7356
  <xsl:param name="first"/>
@@ -7167,4 +7447,14 @@
7167
7447
  </xsl:otherwise>
7168
7448
  </xsl:choose>
7169
7449
  </xsl:if>
7450
+ </xsl:template><xsl:template name="setAltText">
7451
+ <xsl:param name="value"/>
7452
+ <xsl:attribute name="fox:alt-text">
7453
+ <xsl:choose>
7454
+ <xsl:when test="normalize-space($value) != ''">
7455
+ <xsl:value-of select="$value"/>
7456
+ </xsl:when>
7457
+ <xsl:otherwise>_</xsl:otherwise>
7458
+ </xsl:choose>
7459
+ </xsl:attribute>
7170
7460
  </xsl:template></xsl:stylesheet>