metanorma-ogc 2.5.0 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -2112,6 +2152,10 @@
2112
2152
 
2113
2153
  </xsl:attribute-set>
2114
2154
 
2155
+ <xsl:template name="refine_termexample-style">
2156
+
2157
+ </xsl:template>
2158
+
2115
2159
  <xsl:attribute-set name="example-style">
2116
2160
 
2117
2161
  <xsl:attribute name="margin-top">10pt</xsl:attribute>
@@ -3291,6 +3335,36 @@
3291
3335
  </xsl:for-each>
3292
3336
  </xsl:template>
3293
3337
 
3338
+ <xsl:template name="processMainSectionsDefault_flatxml">
3339
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3340
+ <xsl:sort select="@displayorder" data-type="number"/>
3341
+ <xsl:variable name="flatxml">
3342
+ <xsl:apply-templates select="." mode="flatxml"/>
3343
+ </xsl:variable>
3344
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3345
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3346
+
3347
+ </xsl:for-each>
3348
+
3349
+ <xsl:for-each select="/*/*[local-name()='annex']">
3350
+ <xsl:sort select="@displayorder" data-type="number"/>
3351
+ <xsl:variable name="flatxml">
3352
+ <xsl:apply-templates select="." mode="flatxml"/>
3353
+ </xsl:variable>
3354
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3355
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3356
+ </xsl:for-each>
3357
+
3358
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3359
+ <xsl:sort select="@displayorder" data-type="number"/>
3360
+ <xsl:variable name="flatxml">
3361
+ <xsl:apply-templates select="." mode="flatxml"/>
3362
+ </xsl:variable>
3363
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3364
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3365
+ </xsl:for-each>
3366
+ </xsl:template>
3367
+
3294
3368
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3295
3369
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3296
3370
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -3429,7 +3503,13 @@
3429
3503
  </xsl:template> <!-- license-statement/p -->
3430
3504
 
3431
3505
  <xsl:template match="*[local-name()='legal-statement']">
3506
+ <xsl:param name="isLegacy">false</xsl:param>
3432
3507
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3508
+
3509
+ <xsl:if test="$isLegacy = 'true'">
3510
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
3511
+ </xsl:if>
3512
+
3433
3513
  <xsl:apply-templates/>
3434
3514
  </fo:block>
3435
3515
  </xsl:template> <!-- legal-statement -->
@@ -5391,13 +5471,13 @@
5391
5471
  <tr>
5392
5472
  <td>
5393
5473
  <xsl:attribute name="id">
5394
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
5474
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
5395
5475
  </xsl:attribute>
5396
5476
  <xsl:apply-templates/>
5397
5477
  </td>
5398
5478
  <td>
5399
5479
  <xsl:attribute name="id">
5400
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
5480
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5401
5481
  </xsl:attribute>
5402
5482
 
5403
5483
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -5718,13 +5798,14 @@
5718
5798
  <!-- ================= -->
5719
5799
  <!-- Added,deleted text -->
5720
5800
  <!-- ================= -->
5721
- <xsl:template match="*[local-name()='add']" name="tag_add">
5801
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
5722
5802
  <xsl:param name="skip">true</xsl:param>
5723
5803
  <xsl:param name="block">false</xsl:param>
5724
5804
  <xsl:param name="type"/>
5725
5805
  <xsl:param name="text-align"/>
5726
5806
  <xsl:choose>
5727
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
5807
+ <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
5808
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
5728
5809
  <xsl:choose>
5729
5810
  <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
5811
  <xsl:otherwise>
@@ -5732,12 +5813,32 @@
5732
5813
  <xsl:call-template name="insertTag">
5733
5814
  <xsl:with-param name="type">
5734
5815
  <xsl:choose>
5816
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
5817
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
5735
5818
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
5736
5819
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
5737
5820
  </xsl:choose>
5738
5821
  </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 -->
5822
+ <xsl:with-param name="kind">
5823
+ <xsl:choose>
5824
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
5825
+ <xsl:value-of select="text()"/>
5826
+ </xsl:when>
5827
+ <xsl:otherwise>
5828
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
5829
+ </xsl:otherwise>
5830
+ </xsl:choose>
5831
+ </xsl:with-param>
5832
+ <xsl:with-param name="value">
5833
+ <xsl:choose>
5834
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
5835
+ <xsl:value-of select="*[local-name() = 'sub']"/>
5836
+ </xsl:when>
5837
+ <xsl:otherwise>
5838
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
5839
+ </xsl:otherwise>
5840
+ </xsl:choose>
5841
+ </xsl:with-param>
5741
5842
  </xsl:call-template>
5742
5843
  </xsl:variable>
5743
5844
  <xsl:choose>
@@ -5997,6 +6098,10 @@
5997
6098
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
5998
6099
  </xsl:template>
5999
6100
 
6101
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
6102
+ <xsl:value-of select="."/>
6103
+ </xsl:template>
6104
+
6000
6105
  <!-- ========================= -->
6001
6106
  <!-- END Rich text formatting -->
6002
6107
  <!-- ========================= -->
@@ -6627,7 +6732,7 @@
6627
6732
  </xsl:choose>
6628
6733
  </xsl:variable>
6629
6734
  <xsl:attribute name="id">
6630
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
6735
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
6631
6736
  </xsl:attribute>
6632
6737
 
6633
6738
  <xsl:for-each select="*[local-name() = 'p']">
@@ -6635,7 +6740,7 @@
6635
6740
  <xsl:copy-of select="@*"/>
6636
6741
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
6637
6742
  <xsl:attribute name="id">
6638
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6743
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6639
6744
  </xsl:attribute>
6640
6745
 
6641
6746
  <!-- <xsl:copy-of select="node()" /> -->
@@ -6699,7 +6804,7 @@
6699
6804
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
6700
6805
  <xsl:copy>
6701
6806
  <xsl:attribute name="id">
6702
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6807
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6703
6808
  </xsl:attribute>
6704
6809
  <xsl:copy-of select="node()"/>
6705
6810
  </xsl:copy>
@@ -7949,11 +8054,17 @@
7949
8054
  </xsl:when>
7950
8055
  <xsl:otherwise>
7951
8056
 
8057
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8058
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8059
+
7952
8060
  <xsl:variable name="element">
7953
8061
  <xsl:choose>
7954
8062
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
7955
8063
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
7956
8064
  </xsl:when>
8065
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8066
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8067
+ </xsl:when>
7957
8068
  <xsl:otherwise>
7958
8069
  <fo:block xsl:use-attribute-sets="image-style">
7959
8070
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -7969,10 +8080,24 @@
7969
8080
  <xsl:copy-of select="@*"/>
7970
8081
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
7971
8082
  <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>
8083
+
8084
+ <xsl:choose>
8085
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8086
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8087
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8088
+ <xsl:if test="$ancestor_table_cell = 'true'">
8089
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8090
+ </xsl:if>
8091
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8092
+ </xsl:when>
8093
+ <xsl:otherwise>
8094
+ <xsl:if test="$isGenerateTableIF = 'false'">
8095
+ <xsl:attribute name="width">100%</xsl:attribute>
8096
+ </xsl:if>
8097
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8098
+ </xsl:otherwise>
8099
+ </xsl:choose>
8100
+
7976
8101
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7977
8102
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7978
8103
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -9539,7 +9664,7 @@
9539
9664
  <!-- ====== -->
9540
9665
  <xsl:template match="*[local-name() = 'termexample']">
9541
9666
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
9542
-
9667
+ <xsl:call-template name="refine_termexample-style"/>
9543
9668
  <xsl:call-template name="setBlockSpanAll"/>
9544
9669
 
9545
9670
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -10226,13 +10351,19 @@
10226
10351
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10227
10352
  </xsl:when>
10228
10353
  <!-- 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])">
10354
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10355
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10356
+ </xsl:when>
10357
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10230
10358
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10231
10359
  </xsl:when>
10232
10360
  </xsl:choose>
10233
10361
 
10234
10362
  </xsl:template>
10235
10363
 
10364
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10365
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10366
+
10236
10367
  <xsl:template match="*[local-name() = 'name']/text()">
10237
10368
  <!-- 0xA0 to space replacement -->
10238
10369
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -11835,7 +11966,7 @@
11835
11966
 
11836
11967
  <xsl:template name="printEdition">
11837
11968
  <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>
11969
+
11839
11970
  <xsl:choose>
11840
11971
  <xsl:when test="$edition_i18n != ''">
11841
11972
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -1216,6 +1216,10 @@
1216
1216
 
1217
1217
  </xsl:attribute-set>
1218
1218
 
1219
+ <xsl:template name="refine_termexample-style">
1220
+
1221
+ </xsl:template>
1222
+
1219
1223
  <xsl:attribute-set name="example-style">
1220
1224
 
1221
1225
  <xsl:attribute name="font-size">10pt</xsl:attribute>
@@ -2353,6 +2357,36 @@
2353
2357
  </xsl:for-each>
2354
2358
  </xsl:template>
2355
2359
 
2360
+ <xsl:template name="processMainSectionsDefault_flatxml">
2361
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2362
+ <xsl:sort select="@displayorder" data-type="number"/>
2363
+ <xsl:variable name="flatxml">
2364
+ <xsl:apply-templates select="." mode="flatxml"/>
2365
+ </xsl:variable>
2366
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2367
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2368
+
2369
+ </xsl:for-each>
2370
+
2371
+ <xsl:for-each select="/*/*[local-name()='annex']">
2372
+ <xsl:sort select="@displayorder" data-type="number"/>
2373
+ <xsl:variable name="flatxml">
2374
+ <xsl:apply-templates select="." mode="flatxml"/>
2375
+ </xsl:variable>
2376
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2377
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2378
+ </xsl:for-each>
2379
+
2380
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2381
+ <xsl:sort select="@displayorder" data-type="number"/>
2382
+ <xsl:variable name="flatxml">
2383
+ <xsl:apply-templates select="." mode="flatxml"/>
2384
+ </xsl:variable>
2385
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2386
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2387
+ </xsl:for-each>
2388
+ </xsl:template>
2389
+
2356
2390
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2357
2391
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
2358
2392
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -2501,7 +2535,9 @@
2501
2535
  </xsl:template> <!-- license-statement/p -->
2502
2536
 
2503
2537
  <xsl:template match="*[local-name()='legal-statement']">
2538
+ <xsl:param name="isLegacy">false</xsl:param>
2504
2539
  <fo:block xsl:use-attribute-sets="legal-statement-style">
2540
+
2505
2541
  <xsl:apply-templates/>
2506
2542
  </fo:block>
2507
2543
  </xsl:template> <!-- legal-statement -->
@@ -4474,13 +4510,13 @@
4474
4510
  <tr>
4475
4511
  <td>
4476
4512
  <xsl:attribute name="id">
4477
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
4513
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
4478
4514
  </xsl:attribute>
4479
4515
  <xsl:apply-templates/>
4480
4516
  </td>
4481
4517
  <td>
4482
4518
  <xsl:attribute name="id">
4483
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
4519
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
4484
4520
  </xsl:attribute>
4485
4521
 
4486
4522
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -4794,13 +4830,14 @@
4794
4830
  <!-- ================= -->
4795
4831
  <!-- Added,deleted text -->
4796
4832
  <!-- ================= -->
4797
- <xsl:template match="*[local-name()='add']" name="tag_add">
4833
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
4798
4834
  <xsl:param name="skip">true</xsl:param>
4799
4835
  <xsl:param name="block">false</xsl:param>
4800
4836
  <xsl:param name="type"/>
4801
4837
  <xsl:param name="text-align"/>
4802
4838
  <xsl:choose>
4803
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
4839
+ <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
4840
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
4804
4841
  <xsl:choose>
4805
4842
  <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>
4806
4843
  <xsl:otherwise>
@@ -4808,12 +4845,32 @@
4808
4845
  <xsl:call-template name="insertTag">
4809
4846
  <xsl:with-param name="type">
4810
4847
  <xsl:choose>
4848
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
4849
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
4811
4850
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
4812
4851
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
4813
4852
  </xsl:choose>
4814
4853
  </xsl:with-param>
4815
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4816
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4854
+ <xsl:with-param name="kind">
4855
+ <xsl:choose>
4856
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
4857
+ <xsl:value-of select="text()"/>
4858
+ </xsl:when>
4859
+ <xsl:otherwise>
4860
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4861
+ </xsl:otherwise>
4862
+ </xsl:choose>
4863
+ </xsl:with-param>
4864
+ <xsl:with-param name="value">
4865
+ <xsl:choose>
4866
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
4867
+ <xsl:value-of select="*[local-name() = 'sub']"/>
4868
+ </xsl:when>
4869
+ <xsl:otherwise>
4870
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4871
+ </xsl:otherwise>
4872
+ </xsl:choose>
4873
+ </xsl:with-param>
4817
4874
  </xsl:call-template>
4818
4875
  </xsl:variable>
4819
4876
  <xsl:choose>
@@ -5073,6 +5130,10 @@
5073
5130
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
5074
5131
  </xsl:template>
5075
5132
 
5133
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
5134
+ <xsl:value-of select="."/>
5135
+ </xsl:template>
5136
+
5076
5137
  <!-- ========================= -->
5077
5138
  <!-- END Rich text formatting -->
5078
5139
  <!-- ========================= -->
@@ -5703,7 +5764,7 @@
5703
5764
  </xsl:choose>
5704
5765
  </xsl:variable>
5705
5766
  <xsl:attribute name="id">
5706
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
5767
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
5707
5768
  </xsl:attribute>
5708
5769
 
5709
5770
  <xsl:for-each select="*[local-name() = 'p']">
@@ -5711,7 +5772,7 @@
5711
5772
  <xsl:copy-of select="@*"/>
5712
5773
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
5713
5774
  <xsl:attribute name="id">
5714
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5775
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5715
5776
  </xsl:attribute>
5716
5777
 
5717
5778
  <!-- <xsl:copy-of select="node()" /> -->
@@ -5775,7 +5836,7 @@
5775
5836
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
5776
5837
  <xsl:copy>
5777
5838
  <xsl:attribute name="id">
5778
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5839
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5779
5840
  </xsl:attribute>
5780
5841
  <xsl:copy-of select="node()"/>
5781
5842
  </xsl:copy>
@@ -7019,11 +7080,17 @@
7019
7080
  </xsl:when>
7020
7081
  <xsl:otherwise>
7021
7082
 
7083
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
7084
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
7085
+
7022
7086
  <xsl:variable name="element">
7023
7087
  <xsl:choose>
7024
7088
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
7025
7089
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
7026
7090
  </xsl:when>
7091
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
7092
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
7093
+ </xsl:when>
7027
7094
  <xsl:otherwise>
7028
7095
  <fo:block xsl:use-attribute-sets="image-style">
7029
7096
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -7039,10 +7106,24 @@
7039
7106
  <xsl:copy-of select="@*"/>
7040
7107
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
7041
7108
  <fo:instream-foreign-object fox:alt-text="{$alt-text}">
7042
- <xsl:if test="$isGenerateTableIF = 'false'">
7043
- <xsl:attribute name="width">100%</xsl:attribute>
7044
- </xsl:if>
7045
- <xsl:attribute name="content-height">100%</xsl:attribute>
7109
+
7110
+ <xsl:choose>
7111
+ <xsl:when test="$image_class = 'corrigenda-tag'">
7112
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
7113
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
7114
+ <xsl:if test="$ancestor_table_cell = 'true'">
7115
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
7116
+ </xsl:if>
7117
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
7118
+ </xsl:when>
7119
+ <xsl:otherwise>
7120
+ <xsl:if test="$isGenerateTableIF = 'false'">
7121
+ <xsl:attribute name="width">100%</xsl:attribute>
7122
+ </xsl:if>
7123
+ <xsl:attribute name="content-height">100%</xsl:attribute>
7124
+ </xsl:otherwise>
7125
+ </xsl:choose>
7126
+
7046
7127
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7047
7128
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7048
7129
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -8578,7 +8659,7 @@
8578
8659
  <!-- ====== -->
8579
8660
  <xsl:template match="*[local-name() = 'termexample']">
8580
8661
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
8581
-
8662
+ <xsl:call-template name="refine_termexample-style"/>
8582
8663
  <xsl:call-template name="setBlockSpanAll"/>
8583
8664
 
8584
8665
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -9277,13 +9358,19 @@
9277
9358
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9278
9359
  </xsl:when>
9279
9360
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
9280
- <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9361
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9362
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9363
+ </xsl:when>
9364
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9281
9365
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9282
9366
  </xsl:when>
9283
9367
  </xsl:choose>
9284
9368
 
9285
9369
  </xsl:template>
9286
9370
 
9371
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
9372
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
9373
+
9287
9374
  <xsl:template match="*[local-name() = 'name']/text()">
9288
9375
  <!-- 0xA0 to space replacement -->
9289
9376
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -10886,7 +10973,7 @@
10886
10973
 
10887
10974
  <xsl:template name="printEdition">
10888
10975
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
10889
- <xsl:text> </xsl:text>
10976
+
10890
10977
  <xsl:choose>
10891
10978
  <xsl:when test="$edition_i18n != ''">
10892
10979
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -244,6 +244,9 @@
244
244
  <data type="ID"/>
245
245
  </attribute>
246
246
  <attribute name="reviewer"/>
247
+ <optional>
248
+ <attribute name="type"/>
249
+ </optional>
247
250
  <optional>
248
251
  <attribute name="date">
249
252
  <data type="dateTime"/>
@@ -20,7 +20,35 @@ Use of this document is subject to the license agreement at https://www.ogc.org/
20
20
 
21
21
  == legal-statement
22
22
  {% if doctype == "Standard" or doctype == "Community Standard" or doctype == "Abstract Specification" %}
23
- {% if stage == "Approved" or stage == "Withdrawn" %}
23
+ {% if stage == "Deprecated" %}
24
+
25
+ === Notice
26
+ This Standard has been deprecated by the OGC and is no longer supported. A newer version exists and is recommended for use. This document is available on a royalty free, non-discriminatory basis.
27
+
28
+ Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.
29
+
30
+ {% elsif stage == "Legacy" %}
31
+
32
+ === Notice
33
+ This Standard has been deprecated to Legacy status and is no longer supported. This Standard is still suitable for use, but newer Standards offer the same or improved functions and capabilities. This document is available on a royalty free, non-discriminatory basis.
34
+
35
+ Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.
36
+
37
+ {% elsif stage == "Rescinded" %}
38
+
39
+ === Notice
40
+ This Standard has been rescinded and is no longer an OGC Standard nor is it suitable for use. Rescinded Standards are not published on any public OGC resources.
41
+
42
+ Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.
43
+
44
+ {% elsif stage == "Retired" %}
45
+
46
+ === Notice
47
+ This Standard has been retired by the OGC and is no longer supported nor recommended for use. This document is available on a royalty free, non-discriminatory basis.
48
+
49
+ Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.
50
+
51
+ {% elsif stage == "Approved" or stage == "Withdrawn" %}
24
52
 
25
53
  === Notice
26
54
  This document is an OGC Member approved international standard. This document is available on a royalty free, non-discriminatory basis. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.