metanorma-itu 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b6c121ab1fdf9a196e90ea5ab29d752a64fe68a92c14a3a4a2e6b8524b7feda
4
- data.tar.gz: 173aa634916fe688a1f916c18211c2a990ae2e7e1db83c43c987767dbdb02b64
3
+ metadata.gz: 3d173fd252ee677a77d8fe211f7f2215ca310bb1dada1dc8710f00b55b6d5b55
4
+ data.tar.gz: 0c517b8f430d94458f4c423a411034eb9eea1e02319aa6b03a59db930d88736a
5
5
  SHA512:
6
- metadata.gz: 8e3746262a7b1fd8b93d696d749ab06d72c9c478add3f72f60f6c31da28153077b98e8f112df943262f6572b07d38678e5e4ffd274bf8503ee44c6a8ef26e6d4
7
- data.tar.gz: 21007537fa639e8dda93505d231b9a93f4cfa415ae6be12ffb1c5f0ba4a8454016a4eae6658f8ff30f055df2b8e0b3399a59162f9fffcdba5adbff63a9c9b1cb
6
+ metadata.gz: de66fbb0149faf3e41ef3008ad5472cbf83122abe37de4ed52250a95e57264ac682ce39c051ffb4a3175c9811c15de83e9a045fbed06533a7b0ff9de4c037249
7
+ data.tar.gz: 800e775da616ffce73ae7fd6add9e6168c8d6bb4f919946318adae8fb7904f1ac6d96728949794977691b82900c1db8264347c5a92ece8476a2785c0901b0a0f
@@ -2703,6 +2703,10 @@
2703
2703
 
2704
2704
  </xsl:attribute-set>
2705
2705
 
2706
+ <xsl:template name="refine_termexample-style">
2707
+
2708
+ </xsl:template>
2709
+
2706
2710
  <xsl:attribute-set name="example-style">
2707
2711
 
2708
2712
  <xsl:attribute name="font-size">10pt</xsl:attribute>
@@ -3845,6 +3849,36 @@
3845
3849
  </xsl:for-each>
3846
3850
  </xsl:template>
3847
3851
 
3852
+ <xsl:template name="processMainSectionsDefault_flatxml">
3853
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3854
+ <xsl:sort select="@displayorder" data-type="number"/>
3855
+ <xsl:variable name="flatxml">
3856
+ <xsl:apply-templates select="." mode="flatxml"/>
3857
+ </xsl:variable>
3858
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3859
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3860
+
3861
+ </xsl:for-each>
3862
+
3863
+ <xsl:for-each select="/*/*[local-name()='annex']">
3864
+ <xsl:sort select="@displayorder" data-type="number"/>
3865
+ <xsl:variable name="flatxml">
3866
+ <xsl:apply-templates select="." mode="flatxml"/>
3867
+ </xsl:variable>
3868
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3869
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3870
+ </xsl:for-each>
3871
+
3872
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3873
+ <xsl:sort select="@displayorder" data-type="number"/>
3874
+ <xsl:variable name="flatxml">
3875
+ <xsl:apply-templates select="." mode="flatxml"/>
3876
+ </xsl:variable>
3877
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3878
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3879
+ </xsl:for-each>
3880
+ </xsl:template>
3881
+
3848
3882
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3849
3883
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3850
3884
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -3975,7 +4009,9 @@
3975
4009
  </xsl:template> <!-- license-statement/p -->
3976
4010
 
3977
4011
  <xsl:template match="*[local-name()='legal-statement']">
4012
+ <xsl:param name="isLegacy">false</xsl:param>
3978
4013
  <fo:block xsl:use-attribute-sets="legal-statement-style">
4014
+
3979
4015
  <xsl:apply-templates/>
3980
4016
  </fo:block>
3981
4017
  </xsl:template> <!-- legal-statement -->
@@ -5957,13 +5993,13 @@
5957
5993
  <tr>
5958
5994
  <td>
5959
5995
  <xsl:attribute name="id">
5960
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
5996
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
5961
5997
  </xsl:attribute>
5962
5998
  <xsl:apply-templates/>
5963
5999
  </td>
5964
6000
  <td>
5965
6001
  <xsl:attribute name="id">
5966
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
6002
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5967
6003
  </xsl:attribute>
5968
6004
 
5969
6005
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -6278,13 +6314,14 @@
6278
6314
  <!-- ================= -->
6279
6315
  <!-- Added,deleted text -->
6280
6316
  <!-- ================= -->
6281
- <xsl:template match="*[local-name()='add']" name="tag_add">
6317
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
6282
6318
  <xsl:param name="skip">true</xsl:param>
6283
6319
  <xsl:param name="block">false</xsl:param>
6284
6320
  <xsl:param name="type"/>
6285
6321
  <xsl:param name="text-align"/>
6286
6322
  <xsl:choose>
6287
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
6323
+ <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
6324
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
6288
6325
  <xsl:choose>
6289
6326
  <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>
6290
6327
  <xsl:otherwise>
@@ -6292,12 +6329,32 @@
6292
6329
  <xsl:call-template name="insertTag">
6293
6330
  <xsl:with-param name="type">
6294
6331
  <xsl:choose>
6332
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
6333
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
6295
6334
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
6296
6335
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
6297
6336
  </xsl:choose>
6298
6337
  </xsl:with-param>
6299
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6300
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6338
+ <xsl:with-param name="kind">
6339
+ <xsl:choose>
6340
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6341
+ <xsl:value-of select="text()"/>
6342
+ </xsl:when>
6343
+ <xsl:otherwise>
6344
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6345
+ </xsl:otherwise>
6346
+ </xsl:choose>
6347
+ </xsl:with-param>
6348
+ <xsl:with-param name="value">
6349
+ <xsl:choose>
6350
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6351
+ <xsl:value-of select="*[local-name() = 'sub']"/>
6352
+ </xsl:when>
6353
+ <xsl:otherwise>
6354
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6355
+ </xsl:otherwise>
6356
+ </xsl:choose>
6357
+ </xsl:with-param>
6301
6358
  </xsl:call-template>
6302
6359
  </xsl:variable>
6303
6360
  <xsl:choose>
@@ -6557,6 +6614,10 @@
6557
6614
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
6558
6615
  </xsl:template>
6559
6616
 
6617
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
6618
+ <xsl:value-of select="."/>
6619
+ </xsl:template>
6620
+
6560
6621
  <!-- ========================= -->
6561
6622
  <!-- END Rich text formatting -->
6562
6623
  <!-- ========================= -->
@@ -7187,7 +7248,7 @@
7187
7248
  </xsl:choose>
7188
7249
  </xsl:variable>
7189
7250
  <xsl:attribute name="id">
7190
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
7251
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
7191
7252
  </xsl:attribute>
7192
7253
 
7193
7254
  <xsl:for-each select="*[local-name() = 'p']">
@@ -7195,7 +7256,7 @@
7195
7256
  <xsl:copy-of select="@*"/>
7196
7257
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
7197
7258
  <xsl:attribute name="id">
7198
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
7259
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
7199
7260
  </xsl:attribute>
7200
7261
 
7201
7262
  <!-- <xsl:copy-of select="node()" /> -->
@@ -7259,7 +7320,7 @@
7259
7320
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
7260
7321
  <xsl:copy>
7261
7322
  <xsl:attribute name="id">
7262
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
7323
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
7263
7324
  </xsl:attribute>
7264
7325
  <xsl:copy-of select="node()"/>
7265
7326
  </xsl:copy>
@@ -8509,11 +8570,17 @@
8509
8570
  </xsl:when>
8510
8571
  <xsl:otherwise>
8511
8572
 
8573
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8574
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8575
+
8512
8576
  <xsl:variable name="element">
8513
8577
  <xsl:choose>
8514
8578
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
8515
8579
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8516
8580
  </xsl:when>
8581
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8582
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8583
+ </xsl:when>
8517
8584
  <xsl:otherwise>
8518
8585
  <fo:block xsl:use-attribute-sets="image-style">
8519
8586
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -8529,10 +8596,24 @@
8529
8596
  <xsl:copy-of select="@*"/>
8530
8597
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
8531
8598
  <fo:instream-foreign-object fox:alt-text="{$alt-text}">
8532
- <xsl:if test="$isGenerateTableIF = 'false'">
8533
- <xsl:attribute name="width">100%</xsl:attribute>
8534
- </xsl:if>
8535
- <xsl:attribute name="content-height">100%</xsl:attribute>
8599
+
8600
+ <xsl:choose>
8601
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8602
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8603
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8604
+ <xsl:if test="$ancestor_table_cell = 'true'">
8605
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8606
+ </xsl:if>
8607
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8608
+ </xsl:when>
8609
+ <xsl:otherwise>
8610
+ <xsl:if test="$isGenerateTableIF = 'false'">
8611
+ <xsl:attribute name="width">100%</xsl:attribute>
8612
+ </xsl:if>
8613
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8614
+ </xsl:otherwise>
8615
+ </xsl:choose>
8616
+
8536
8617
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8537
8618
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
8538
8619
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10048,7 +10129,7 @@
10048
10129
  <!-- ====== -->
10049
10130
  <xsl:template match="*[local-name() = 'termexample']">
10050
10131
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
10051
-
10132
+ <xsl:call-template name="refine_termexample-style"/>
10052
10133
  <xsl:call-template name="setBlockSpanAll"/>
10053
10134
 
10054
10135
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -10743,13 +10824,19 @@
10743
10824
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10744
10825
  </xsl:when>
10745
10826
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
10746
- <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10827
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10828
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10829
+ </xsl:when>
10830
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10747
10831
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10748
10832
  </xsl:when>
10749
10833
  </xsl:choose>
10750
10834
 
10751
10835
  </xsl:template>
10752
10836
 
10837
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10838
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10839
+
10753
10840
  <xsl:template match="*[local-name() = 'name']/text()">
10754
10841
  <!-- 0xA0 to space replacement -->
10755
10842
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -12382,7 +12469,7 @@
12382
12469
 
12383
12470
  <xsl:template name="printEdition">
12384
12471
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
12385
- <xsl:text> </xsl:text>
12472
+
12386
12473
  <xsl:choose>
12387
12474
  <xsl:when test="$edition_i18n != ''">
12388
12475
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -2703,6 +2703,10 @@
2703
2703
 
2704
2704
  </xsl:attribute-set>
2705
2705
 
2706
+ <xsl:template name="refine_termexample-style">
2707
+
2708
+ </xsl:template>
2709
+
2706
2710
  <xsl:attribute-set name="example-style">
2707
2711
 
2708
2712
  <xsl:attribute name="font-size">10pt</xsl:attribute>
@@ -3845,6 +3849,36 @@
3845
3849
  </xsl:for-each>
3846
3850
  </xsl:template>
3847
3851
 
3852
+ <xsl:template name="processMainSectionsDefault_flatxml">
3853
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3854
+ <xsl:sort select="@displayorder" data-type="number"/>
3855
+ <xsl:variable name="flatxml">
3856
+ <xsl:apply-templates select="." mode="flatxml"/>
3857
+ </xsl:variable>
3858
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3859
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3860
+
3861
+ </xsl:for-each>
3862
+
3863
+ <xsl:for-each select="/*/*[local-name()='annex']">
3864
+ <xsl:sort select="@displayorder" data-type="number"/>
3865
+ <xsl:variable name="flatxml">
3866
+ <xsl:apply-templates select="." mode="flatxml"/>
3867
+ </xsl:variable>
3868
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3869
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3870
+ </xsl:for-each>
3871
+
3872
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3873
+ <xsl:sort select="@displayorder" data-type="number"/>
3874
+ <xsl:variable name="flatxml">
3875
+ <xsl:apply-templates select="." mode="flatxml"/>
3876
+ </xsl:variable>
3877
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3878
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3879
+ </xsl:for-each>
3880
+ </xsl:template>
3881
+
3848
3882
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3849
3883
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3850
3884
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -3975,7 +4009,9 @@
3975
4009
  </xsl:template> <!-- license-statement/p -->
3976
4010
 
3977
4011
  <xsl:template match="*[local-name()='legal-statement']">
4012
+ <xsl:param name="isLegacy">false</xsl:param>
3978
4013
  <fo:block xsl:use-attribute-sets="legal-statement-style">
4014
+
3979
4015
  <xsl:apply-templates/>
3980
4016
  </fo:block>
3981
4017
  </xsl:template> <!-- legal-statement -->
@@ -5957,13 +5993,13 @@
5957
5993
  <tr>
5958
5994
  <td>
5959
5995
  <xsl:attribute name="id">
5960
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
5996
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
5961
5997
  </xsl:attribute>
5962
5998
  <xsl:apply-templates/>
5963
5999
  </td>
5964
6000
  <td>
5965
6001
  <xsl:attribute name="id">
5966
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
6002
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5967
6003
  </xsl:attribute>
5968
6004
 
5969
6005
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -6278,13 +6314,14 @@
6278
6314
  <!-- ================= -->
6279
6315
  <!-- Added,deleted text -->
6280
6316
  <!-- ================= -->
6281
- <xsl:template match="*[local-name()='add']" name="tag_add">
6317
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
6282
6318
  <xsl:param name="skip">true</xsl:param>
6283
6319
  <xsl:param name="block">false</xsl:param>
6284
6320
  <xsl:param name="type"/>
6285
6321
  <xsl:param name="text-align"/>
6286
6322
  <xsl:choose>
6287
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
6323
+ <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
6324
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
6288
6325
  <xsl:choose>
6289
6326
  <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>
6290
6327
  <xsl:otherwise>
@@ -6292,12 +6329,32 @@
6292
6329
  <xsl:call-template name="insertTag">
6293
6330
  <xsl:with-param name="type">
6294
6331
  <xsl:choose>
6332
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
6333
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
6295
6334
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
6296
6335
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
6297
6336
  </xsl:choose>
6298
6337
  </xsl:with-param>
6299
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6300
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6338
+ <xsl:with-param name="kind">
6339
+ <xsl:choose>
6340
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6341
+ <xsl:value-of select="text()"/>
6342
+ </xsl:when>
6343
+ <xsl:otherwise>
6344
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6345
+ </xsl:otherwise>
6346
+ </xsl:choose>
6347
+ </xsl:with-param>
6348
+ <xsl:with-param name="value">
6349
+ <xsl:choose>
6350
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6351
+ <xsl:value-of select="*[local-name() = 'sub']"/>
6352
+ </xsl:when>
6353
+ <xsl:otherwise>
6354
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6355
+ </xsl:otherwise>
6356
+ </xsl:choose>
6357
+ </xsl:with-param>
6301
6358
  </xsl:call-template>
6302
6359
  </xsl:variable>
6303
6360
  <xsl:choose>
@@ -6557,6 +6614,10 @@
6557
6614
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
6558
6615
  </xsl:template>
6559
6616
 
6617
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
6618
+ <xsl:value-of select="."/>
6619
+ </xsl:template>
6620
+
6560
6621
  <!-- ========================= -->
6561
6622
  <!-- END Rich text formatting -->
6562
6623
  <!-- ========================= -->
@@ -7187,7 +7248,7 @@
7187
7248
  </xsl:choose>
7188
7249
  </xsl:variable>
7189
7250
  <xsl:attribute name="id">
7190
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
7251
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
7191
7252
  </xsl:attribute>
7192
7253
 
7193
7254
  <xsl:for-each select="*[local-name() = 'p']">
@@ -7195,7 +7256,7 @@
7195
7256
  <xsl:copy-of select="@*"/>
7196
7257
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
7197
7258
  <xsl:attribute name="id">
7198
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
7259
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
7199
7260
  </xsl:attribute>
7200
7261
 
7201
7262
  <!-- <xsl:copy-of select="node()" /> -->
@@ -7259,7 +7320,7 @@
7259
7320
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
7260
7321
  <xsl:copy>
7261
7322
  <xsl:attribute name="id">
7262
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
7323
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
7263
7324
  </xsl:attribute>
7264
7325
  <xsl:copy-of select="node()"/>
7265
7326
  </xsl:copy>
@@ -8509,11 +8570,17 @@
8509
8570
  </xsl:when>
8510
8571
  <xsl:otherwise>
8511
8572
 
8573
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8574
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8575
+
8512
8576
  <xsl:variable name="element">
8513
8577
  <xsl:choose>
8514
8578
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
8515
8579
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8516
8580
  </xsl:when>
8581
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8582
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8583
+ </xsl:when>
8517
8584
  <xsl:otherwise>
8518
8585
  <fo:block xsl:use-attribute-sets="image-style">
8519
8586
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -8529,10 +8596,24 @@
8529
8596
  <xsl:copy-of select="@*"/>
8530
8597
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
8531
8598
  <fo:instream-foreign-object fox:alt-text="{$alt-text}">
8532
- <xsl:if test="$isGenerateTableIF = 'false'">
8533
- <xsl:attribute name="width">100%</xsl:attribute>
8534
- </xsl:if>
8535
- <xsl:attribute name="content-height">100%</xsl:attribute>
8599
+
8600
+ <xsl:choose>
8601
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8602
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8603
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8604
+ <xsl:if test="$ancestor_table_cell = 'true'">
8605
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8606
+ </xsl:if>
8607
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8608
+ </xsl:when>
8609
+ <xsl:otherwise>
8610
+ <xsl:if test="$isGenerateTableIF = 'false'">
8611
+ <xsl:attribute name="width">100%</xsl:attribute>
8612
+ </xsl:if>
8613
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8614
+ </xsl:otherwise>
8615
+ </xsl:choose>
8616
+
8536
8617
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8537
8618
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
8538
8619
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10048,7 +10129,7 @@
10048
10129
  <!-- ====== -->
10049
10130
  <xsl:template match="*[local-name() = 'termexample']">
10050
10131
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
10051
-
10132
+ <xsl:call-template name="refine_termexample-style"/>
10052
10133
  <xsl:call-template name="setBlockSpanAll"/>
10053
10134
 
10054
10135
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -10743,13 +10824,19 @@
10743
10824
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10744
10825
  </xsl:when>
10745
10826
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
10746
- <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10827
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10828
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10829
+ </xsl:when>
10830
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10747
10831
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10748
10832
  </xsl:when>
10749
10833
  </xsl:choose>
10750
10834
 
10751
10835
  </xsl:template>
10752
10836
 
10837
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10838
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10839
+
10753
10840
  <xsl:template match="*[local-name() = 'name']/text()">
10754
10841
  <!-- 0xA0 to space replacement -->
10755
10842
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -12382,7 +12469,7 @@
12382
12469
 
12383
12470
  <xsl:template name="printEdition">
12384
12471
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
12385
- <xsl:text> </xsl:text>
12472
+
12386
12473
  <xsl:choose>
12387
12474
  <xsl:when test="$edition_i18n != ''">
12388
12475
  <!-- Example: <edition language="fr">deuxième édition</edition> -->