metanorma-ogc 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfcf839845ca523b4dbcba32c4bd689498e6e0a2c7c5ecb2a171dd3c7bce4934
4
- data.tar.gz: 60dd01126c0591afd6d82b1aaa23d7a1e15e46081e04c1bf68be10c85ad73358
3
+ metadata.gz: 74e1a3d766e10152fd9b43ea442aab695736b16eab77e921c29c194db08761b3
4
+ data.tar.gz: ac7fa37c540c5270870222e7361858e3a609c299ee252e03c54dce0d18a956f9
5
5
  SHA512:
6
- metadata.gz: 9c7334090d5271c9e01570baa42b6bf9f91934599989e491739ee27c8289385c62584f1527ea1184f87119a3bc08340c5ea00a4c1f2e726ac0b944fb16a10004
7
- data.tar.gz: 35281f49a9263c900c1ea614b3b0aca5ba9fe00b0cfa528f11e3641cdf36f03c17caa9b06995a9ef4f07dde9d1b14f206066afe1523666bb0a4a45227349ad7b
6
+ metadata.gz: 169037e8a8f06c1749ca3ef1cec1c127213e2b592e8f6e8c03cb4f0028c6296c5a6fbf5c73e40bfd3b21ba6aa94f6a9fc4faef4016a36c5ecf42a5001927ab3c
7
+ data.tar.gz: 9ef4fe458fecb874acdf04acc91dfca78be408d99d876ebda1cee4ccce4e91874c0fc930a71438255e74174520950c00290a0b3824bb09c0797afe8e62d546d7
@@ -337,6 +337,18 @@ table.rouge-line-table pre {
337
337
  #retired {
338
338
  border-bottom: solid 3px #7e0d13; }
339
339
 
340
+ #legacy-band {
341
+ background-color: #7e0d13; }
342
+
343
+ #legacy {
344
+ border-bottom: solid 3px #7e0d13; }
345
+
346
+ #rescinded-band {
347
+ background-color: #7e0d13; }
348
+
349
+ #rescinded {
350
+ border-bottom: solid 3px #7e0d13; }
351
+
340
352
  .coverpage-maturity, .coverpage-stage {
341
353
  font-family: {{headerfont}};
342
354
  font-weight: 400;
@@ -41,6 +41,8 @@ $docstage-colors-list: (
41
41
 
42
42
  deprecated: #7e0d13,
43
43
  retired: #7e0d13,
44
+ legacy: #7e0d13,
45
+ rescinded: #7e0d13,
44
46
  );
45
47
 
46
48
 
@@ -69,14 +69,61 @@ module IsoDoc
69
69
 
70
70
  def html_head
71
71
  ret = super
72
- k = @meta.get[:keywords].join(", ") and k = @c.encode(k).gsub("'", "'")
73
- k.empty? or ret += "<meta name='keywords' content='#{k}'/>"
74
- k = @meta.get[:abstract] and k = @c.encode(k)&.gsub("'", "&#x27;")
75
- (k.nil? || k.empty?) or
76
- ret += "<meta name='description' content='#{k}'/>"
72
+ ret += html_head_kw
73
+ ret += html_head_abstract
74
+ ret += html_head_creator
75
+ ret += html_head_date
76
+ ret += html_head_title
77
+ ret += html_head_dc
77
78
  ret
78
79
  end
79
80
 
81
+ def html_head_abstract
82
+ k = @meta.get[:abstract] and k = @c.encode(k)&.gsub("'", "&#x27;")
83
+ (k.nil? || k.empty?) and return ""
84
+ "<meta name='description' content='#{k}'/>\n" \
85
+ "<meta name='DC.description' lang='#{@lang}' content='#{k}' />"
86
+ end
87
+
88
+ def html_head_kw
89
+ k = @meta.get[:keywords].join(", ") and
90
+ k = @c.encode(k).gsub("'", "&#x27;")
91
+ k.empty? and return ""
92
+ "<meta name='keywords' content='#{k}'/>" \
93
+ "<meta name='DC.subject' lang='#{@lang}' content='#{k}' />"
94
+ end
95
+
96
+ def html_head_dc
97
+ <<~HTML
98
+ <link rel="profile" href="http://dublincore.org/documents/2008/08/04/dc-html/" />
99
+ <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
100
+ <meta name="DC.language" content="#{@lang}" />
101
+ <meta name="DC.rights" lang="#{@lang}" content="CC-BY-4.0"/>
102
+ <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
103
+ <link rel="DCTERMS.license" href="https://www.ogc.org/license" />
104
+ HTML
105
+ end
106
+
107
+ def html_head_creator
108
+ k = @meta.get[:authors] and
109
+ k = @c.encode(k.join(", ")).gsub("'", "&#x27;")
110
+ (k.nil? || k.empty?) and return ""
111
+ "<meta name='DC.creator' lang='#{@lang}' content='#{k}' />"
112
+ end
113
+
114
+ def html_head_date
115
+ k = @meta.get[:revdate] || @meta.get[:ipublisheddate] and
116
+ k = @c.encode(k)&.gsub("'", "&#x27;")
117
+ (k.nil? || k.empty?) and return ""
118
+ "<meta name='DC.date' content='#{k}' />"
119
+ end
120
+
121
+ def html_head_title
122
+ k = @meta.get[:doctitle] and k = @c.encode(k)&.gsub("'", "&#x27;")
123
+ (k.nil? || k.empty?) and return ""
124
+ "<meta name='DC.title' lang='#{@lang}' content='#{k}' />"
125
+ end
126
+
80
127
  include BaseConvert
81
128
  include Init
82
129
  end
@@ -49,6 +49,7 @@
49
49
  <xsl:variable name="color_dl_dt">rgb(215,243,255)</xsl:variable>
50
50
  <xsl:variable name="color_dl_dd">rgb(242,251,255)</xsl:variable>
51
51
  <xsl:variable name="color_blue">rgb(33, 55, 92)</xsl:variable>
52
+ <xsl:variable name="color_background_blue">rgb(33,60,107)</xsl:variable>
52
53
 
53
54
  <xsl:variable name="toc_recommendations_">
54
55
  <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
@@ -192,6 +193,10 @@
192
193
 
193
194
  <fo:flow flow-name="xsl-region-body" color="white">
194
195
 
196
+ <xsl:variable name="curr_lang" select="/ogc:ogc-standard/ogc:bibdata/ogc:language[@current = 'true']"/>
197
+ <xsl:variable name="stage" select="/ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[@language = $curr_lang] | /ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[not(@language)]"/>
198
+ <xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
199
+
195
200
  <!-- background image -->
196
201
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
197
202
  <fo:block>
@@ -267,7 +272,7 @@
267
272
  <fo:block margin-top="4pt"> </fo:block>
268
273
  </fo:block-container>
269
274
  <fo:block color="{$color_design}">
270
- <fo:block font-size="17pt" margin-bottom="14pt">
275
+ <fo:block font-size="17pt">
271
276
  <xsl:call-template name="addLetterSpacing">
272
277
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
273
278
  </xsl:call-template>
@@ -291,13 +296,31 @@
291
296
  <xsl:with-param name="letter-spacing" select="0.25"/>
292
297
  </xsl:call-template>
293
298
  </fo:block>
294
- <fo:block font-size="12pt" font-weight="bold">
295
- <xsl:variable name="curr_lang" select="/ogc:ogc-standard/ogc:bibdata/ogc:language[@current = 'true']"/>
296
- <xsl:variable name="stage" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[@language = $curr_lang]))"/>
297
- <xsl:call-template name="addLetterSpacing">
298
- <xsl:with-param name="text" select="$stage"/>
299
- </xsl:call-template>
300
- </fo:block>
299
+ <xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
300
+
301
+ <xsl:choose>
302
+ <xsl:when test="$isLegacy = 'true'">
303
+ <fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
304
+ <fo:block-container margin-left="2.5mm">
305
+ <fo:block-container margin-left="0mm">
306
+ <fo:block margin-top="1mm">
307
+ <xsl:call-template name="addLetterSpacing">
308
+ <xsl:with-param name="text" select="$stage_uc"/>
309
+ </xsl:call-template>
310
+ </fo:block>
311
+ </fo:block-container>
312
+ </fo:block-container>
313
+ </fo:block-container>
314
+ </xsl:when>
315
+ <xsl:otherwise>
316
+ <fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
317
+ <xsl:call-template name="addLetterSpacing">
318
+ <xsl:with-param name="text" select="$stage_uc"/>
319
+ </xsl:call-template>
320
+ </fo:block>
321
+ </xsl:otherwise>
322
+ </xsl:choose>
323
+
301
324
  </fo:block>
302
325
  </fo:block-container>
303
326
  </fo:block-container>
@@ -389,7 +412,24 @@
389
412
  </fo:block>
390
413
  </fo:block>
391
414
 
392
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement"/>
415
+ <xsl:choose>
416
+ <xsl:when test="$isLegacy = 'true'">
417
+ <fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
418
+ <fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
419
+ <fo:block-container margin-left="0mm" margin-right="0mm">
420
+ <fo:block>
421
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement">
422
+ <xsl:with-param name="isLegacy" select="$isLegacy"/>
423
+ </xsl:apply-templates>
424
+ </fo:block>
425
+ </fo:block-container>
426
+ </fo:block-container>
427
+ </fo:block-container>
428
+ </xsl:when>
429
+ <xsl:otherwise>
430
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement"/>
431
+ </xsl:otherwise>
432
+ </xsl:choose>
393
433
 
394
434
  </fo:block-container>
395
435
 
@@ -3429,7 +3469,13 @@
3429
3469
  </xsl:template> <!-- license-statement/p -->
3430
3470
 
3431
3471
  <xsl:template match="*[local-name()='legal-statement']">
3472
+ <xsl:param name="isLegacy">false</xsl:param>
3432
3473
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3474
+
3475
+ <xsl:if test="$isLegacy = 'true'">
3476
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
3477
+ </xsl:if>
3478
+
3433
3479
  <xsl:apply-templates/>
3434
3480
  </fo:block>
3435
3481
  </xsl:template> <!-- legal-statement -->
@@ -5718,13 +5764,14 @@
5718
5764
  <!-- ================= -->
5719
5765
  <!-- Added,deleted text -->
5720
5766
  <!-- ================= -->
5721
- <xsl:template match="*[local-name()='add']" name="tag_add">
5767
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
5722
5768
  <xsl:param name="skip">true</xsl:param>
5723
5769
  <xsl:param name="block">false</xsl:param>
5724
5770
  <xsl:param name="type"/>
5725
5771
  <xsl:param name="text-align"/>
5726
5772
  <xsl:choose>
5727
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
5773
+ <xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
5774
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
5728
5775
  <xsl:choose>
5729
5776
  <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
5730
5777
  <xsl:otherwise>
@@ -5732,12 +5779,32 @@
5732
5779
  <xsl:call-template name="insertTag">
5733
5780
  <xsl:with-param name="type">
5734
5781
  <xsl:choose>
5782
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
5783
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
5735
5784
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
5736
5785
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
5737
5786
  </xsl:choose>
5738
5787
  </xsl:with-param>
5739
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
5740
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
5788
+ <xsl:with-param name="kind">
5789
+ <xsl:choose>
5790
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
5791
+ <xsl:value-of select="text()"/>
5792
+ </xsl:when>
5793
+ <xsl:otherwise>
5794
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
5795
+ </xsl:otherwise>
5796
+ </xsl:choose>
5797
+ </xsl:with-param>
5798
+ <xsl:with-param name="value">
5799
+ <xsl:choose>
5800
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
5801
+ <xsl:value-of select="*[local-name() = 'sub']"/>
5802
+ </xsl:when>
5803
+ <xsl:otherwise>
5804
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
5805
+ </xsl:otherwise>
5806
+ </xsl:choose>
5807
+ </xsl:with-param>
5741
5808
  </xsl:call-template>
5742
5809
  </xsl:variable>
5743
5810
  <xsl:choose>
@@ -7949,11 +8016,17 @@
7949
8016
  </xsl:when>
7950
8017
  <xsl:otherwise>
7951
8018
 
8019
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8020
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8021
+
7952
8022
  <xsl:variable name="element">
7953
8023
  <xsl:choose>
7954
8024
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
7955
8025
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
7956
8026
  </xsl:when>
8027
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8028
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8029
+ </xsl:when>
7957
8030
  <xsl:otherwise>
7958
8031
  <fo:block xsl:use-attribute-sets="image-style">
7959
8032
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -7969,10 +8042,24 @@
7969
8042
  <xsl:copy-of select="@*"/>
7970
8043
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
7971
8044
  <fo:instream-foreign-object fox:alt-text="{$alt-text}">
7972
- <xsl:if test="$isGenerateTableIF = 'false'">
7973
- <xsl:attribute name="width">100%</xsl:attribute>
7974
- </xsl:if>
7975
- <xsl:attribute name="content-height">100%</xsl:attribute>
8045
+
8046
+ <xsl:choose>
8047
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8048
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8049
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8050
+ <xsl:if test="$ancestor_table_cell = 'true'">
8051
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8052
+ </xsl:if>
8053
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8054
+ </xsl:when>
8055
+ <xsl:otherwise>
8056
+ <xsl:if test="$isGenerateTableIF = 'false'">
8057
+ <xsl:attribute name="width">100%</xsl:attribute>
8058
+ </xsl:if>
8059
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8060
+ </xsl:otherwise>
8061
+ </xsl:choose>
8062
+
7976
8063
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7977
8064
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7978
8065
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10226,13 +10313,19 @@
10226
10313
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10227
10314
  </xsl:when>
10228
10315
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
10229
- <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10316
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10317
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10318
+ </xsl:when>
10319
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10230
10320
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10231
10321
  </xsl:when>
10232
10322
  </xsl:choose>
10233
10323
 
10234
10324
  </xsl:template>
10235
10325
 
10326
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10327
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10328
+
10236
10329
  <xsl:template match="*[local-name() = 'name']/text()">
10237
10330
  <!-- 0xA0 to space replacement -->
10238
10331
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -11835,7 +11928,7 @@
11835
11928
 
11836
11929
  <xsl:template name="printEdition">
11837
11930
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
11838
- <xsl:text> </xsl:text>
11931
+
11839
11932
  <xsl:choose>
11840
11933
  <xsl:when test="$edition_i18n != ''">
11841
11934
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -49,6 +49,7 @@
49
49
  <xsl:variable name="color_dl_dt">rgb(215,243,255)</xsl:variable>
50
50
  <xsl:variable name="color_dl_dd">rgb(242,251,255)</xsl:variable>
51
51
  <xsl:variable name="color_blue">rgb(33, 55, 92)</xsl:variable>
52
+ <xsl:variable name="color_background_blue">rgb(33,60,107)</xsl:variable>
52
53
 
53
54
  <xsl:variable name="toc_recommendations_">
54
55
  <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
@@ -192,6 +193,10 @@
192
193
 
193
194
  <fo:flow flow-name="xsl-region-body" color="white">
194
195
 
196
+ <xsl:variable name="curr_lang" select="/ogc:ogc-standard/ogc:bibdata/ogc:language[@current = 'true']"/>
197
+ <xsl:variable name="stage" select="/ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[@language = $curr_lang] | /ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[not(@language)]"/>
198
+ <xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
199
+
195
200
  <!-- background image -->
196
201
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
197
202
  <fo:block>
@@ -267,7 +272,7 @@
267
272
  <fo:block margin-top="4pt"> </fo:block>
268
273
  </fo:block-container>
269
274
  <fo:block color="{$color_design}">
270
- <fo:block font-size="17pt" margin-bottom="14pt">
275
+ <fo:block font-size="17pt">
271
276
  <xsl:call-template name="addLetterSpacing">
272
277
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
273
278
  </xsl:call-template>
@@ -291,13 +296,31 @@
291
296
  <xsl:with-param name="letter-spacing" select="0.25"/>
292
297
  </xsl:call-template>
293
298
  </fo:block>
294
- <fo:block font-size="12pt" font-weight="bold">
295
- <xsl:variable name="curr_lang" select="/ogc:ogc-standard/ogc:bibdata/ogc:language[@current = 'true']"/>
296
- <xsl:variable name="stage" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[@language = $curr_lang]))"/>
297
- <xsl:call-template name="addLetterSpacing">
298
- <xsl:with-param name="text" select="$stage"/>
299
- </xsl:call-template>
300
- </fo:block>
299
+ <xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
300
+
301
+ <xsl:choose>
302
+ <xsl:when test="$isLegacy = 'true'">
303
+ <fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
304
+ <fo:block-container margin-left="2.5mm">
305
+ <fo:block-container margin-left="0mm">
306
+ <fo:block margin-top="1mm">
307
+ <xsl:call-template name="addLetterSpacing">
308
+ <xsl:with-param name="text" select="$stage_uc"/>
309
+ </xsl:call-template>
310
+ </fo:block>
311
+ </fo:block-container>
312
+ </fo:block-container>
313
+ </fo:block-container>
314
+ </xsl:when>
315
+ <xsl:otherwise>
316
+ <fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
317
+ <xsl:call-template name="addLetterSpacing">
318
+ <xsl:with-param name="text" select="$stage_uc"/>
319
+ </xsl:call-template>
320
+ </fo:block>
321
+ </xsl:otherwise>
322
+ </xsl:choose>
323
+
301
324
  </fo:block>
302
325
  </fo:block-container>
303
326
  </fo:block-container>
@@ -389,7 +412,24 @@
389
412
  </fo:block>
390
413
  </fo:block>
391
414
 
392
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement"/>
415
+ <xsl:choose>
416
+ <xsl:when test="$isLegacy = 'true'">
417
+ <fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
418
+ <fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
419
+ <fo:block-container margin-left="0mm" margin-right="0mm">
420
+ <fo:block>
421
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement">
422
+ <xsl:with-param name="isLegacy" select="$isLegacy"/>
423
+ </xsl:apply-templates>
424
+ </fo:block>
425
+ </fo:block-container>
426
+ </fo:block-container>
427
+ </fo:block-container>
428
+ </xsl:when>
429
+ <xsl:otherwise>
430
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement"/>
431
+ </xsl:otherwise>
432
+ </xsl:choose>
393
433
 
394
434
  </fo:block-container>
395
435
 
@@ -3429,7 +3469,13 @@
3429
3469
  </xsl:template> <!-- license-statement/p -->
3430
3470
 
3431
3471
  <xsl:template match="*[local-name()='legal-statement']">
3472
+ <xsl:param name="isLegacy">false</xsl:param>
3432
3473
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3474
+
3475
+ <xsl:if test="$isLegacy = 'true'">
3476
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
3477
+ </xsl:if>
3478
+
3433
3479
  <xsl:apply-templates/>
3434
3480
  </fo:block>
3435
3481
  </xsl:template> <!-- legal-statement -->
@@ -5718,13 +5764,14 @@
5718
5764
  <!-- ================= -->
5719
5765
  <!-- Added,deleted text -->
5720
5766
  <!-- ================= -->
5721
- <xsl:template match="*[local-name()='add']" name="tag_add">
5767
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
5722
5768
  <xsl:param name="skip">true</xsl:param>
5723
5769
  <xsl:param name="block">false</xsl:param>
5724
5770
  <xsl:param name="type"/>
5725
5771
  <xsl:param name="text-align"/>
5726
5772
  <xsl:choose>
5727
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
5773
+ <xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
5774
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
5728
5775
  <xsl:choose>
5729
5776
  <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
5730
5777
  <xsl:otherwise>
@@ -5732,12 +5779,32 @@
5732
5779
  <xsl:call-template name="insertTag">
5733
5780
  <xsl:with-param name="type">
5734
5781
  <xsl:choose>
5782
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
5783
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
5735
5784
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
5736
5785
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
5737
5786
  </xsl:choose>
5738
5787
  </xsl:with-param>
5739
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
5740
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
5788
+ <xsl:with-param name="kind">
5789
+ <xsl:choose>
5790
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
5791
+ <xsl:value-of select="text()"/>
5792
+ </xsl:when>
5793
+ <xsl:otherwise>
5794
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
5795
+ </xsl:otherwise>
5796
+ </xsl:choose>
5797
+ </xsl:with-param>
5798
+ <xsl:with-param name="value">
5799
+ <xsl:choose>
5800
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
5801
+ <xsl:value-of select="*[local-name() = 'sub']"/>
5802
+ </xsl:when>
5803
+ <xsl:otherwise>
5804
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
5805
+ </xsl:otherwise>
5806
+ </xsl:choose>
5807
+ </xsl:with-param>
5741
5808
  </xsl:call-template>
5742
5809
  </xsl:variable>
5743
5810
  <xsl:choose>
@@ -7949,11 +8016,17 @@
7949
8016
  </xsl:when>
7950
8017
  <xsl:otherwise>
7951
8018
 
8019
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8020
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8021
+
7952
8022
  <xsl:variable name="element">
7953
8023
  <xsl:choose>
7954
8024
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
7955
8025
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
7956
8026
  </xsl:when>
8027
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8028
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8029
+ </xsl:when>
7957
8030
  <xsl:otherwise>
7958
8031
  <fo:block xsl:use-attribute-sets="image-style">
7959
8032
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -7969,10 +8042,24 @@
7969
8042
  <xsl:copy-of select="@*"/>
7970
8043
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
7971
8044
  <fo:instream-foreign-object fox:alt-text="{$alt-text}">
7972
- <xsl:if test="$isGenerateTableIF = 'false'">
7973
- <xsl:attribute name="width">100%</xsl:attribute>
7974
- </xsl:if>
7975
- <xsl:attribute name="content-height">100%</xsl:attribute>
8045
+
8046
+ <xsl:choose>
8047
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8048
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8049
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8050
+ <xsl:if test="$ancestor_table_cell = 'true'">
8051
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8052
+ </xsl:if>
8053
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8054
+ </xsl:when>
8055
+ <xsl:otherwise>
8056
+ <xsl:if test="$isGenerateTableIF = 'false'">
8057
+ <xsl:attribute name="width">100%</xsl:attribute>
8058
+ </xsl:if>
8059
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8060
+ </xsl:otherwise>
8061
+ </xsl:choose>
8062
+
7976
8063
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7977
8064
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7978
8065
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10226,13 +10313,19 @@
10226
10313
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10227
10314
  </xsl:when>
10228
10315
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
10229
- <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10316
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10317
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10318
+ </xsl:when>
10319
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10230
10320
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10231
10321
  </xsl:when>
10232
10322
  </xsl:choose>
10233
10323
 
10234
10324
  </xsl:template>
10235
10325
 
10326
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10327
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10328
+
10236
10329
  <xsl:template match="*[local-name() = 'name']/text()">
10237
10330
  <!-- 0xA0 to space replacement -->
10238
10331
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -11835,7 +11928,7 @@
11835
11928
 
11836
11929
  <xsl:template name="printEdition">
11837
11930
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
11838
- <xsl:text> </xsl:text>
11931
+
11839
11932
  <xsl:choose>
11840
11933
  <xsl:when test="$edition_i18n != ''">
11841
11934
  <!-- Example: <edition language="fr">deuxième édition</edition> -->