metanorma-itu 2.4.0 → 2.4.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: 1b6c121ab1fdf9a196e90ea5ab29d752a64fe68a92c14a3a4a2e6b8524b7feda
4
- data.tar.gz: 173aa634916fe688a1f916c18211c2a990ae2e7e1db83c43c987767dbdb02b64
3
+ metadata.gz: c8e61096b15f4b135a799e331bcc85b54a4b38aeb6990b5dc5989c7454a27e30
4
+ data.tar.gz: 125d62e67992c51c335135f1f1dca44068dc00b1769dbc5a1f5a6e1cb22ed598
5
5
  SHA512:
6
- metadata.gz: 8e3746262a7b1fd8b93d696d749ab06d72c9c478add3f72f60f6c31da28153077b98e8f112df943262f6572b07d38678e5e4ffd274bf8503ee44c6a8ef26e6d4
7
- data.tar.gz: 21007537fa639e8dda93505d231b9a93f4cfa415ae6be12ffb1c5f0ba4a8454016a4eae6658f8ff30f055df2b8e0b3399a59162f9fffcdba5adbff63a9c9b1cb
6
+ metadata.gz: 578d11cd942206d2fa5999abe9a0d67d00dd0ba356631bb7d9ff54515caf01823868badeff8d3bd7f4da4833e6632c1f8f770ee336640208e18516f55317cc88
7
+ data.tar.gz: 1f59a2b63a1b0b09f6c653a7a27184bf0a355104849c55b62e87fd2712b6cd588688e93c5fa9c8600bde0c0dccbcf89a4fbf97698330a65a7e7691ca28f2f65c
@@ -3975,7 +3975,9 @@
3975
3975
  </xsl:template> <!-- license-statement/p -->
3976
3976
 
3977
3977
  <xsl:template match="*[local-name()='legal-statement']">
3978
+ <xsl:param name="isLegacy">false</xsl:param>
3978
3979
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3980
+
3979
3981
  <xsl:apply-templates/>
3980
3982
  </fo:block>
3981
3983
  </xsl:template> <!-- legal-statement -->
@@ -6278,13 +6280,14 @@
6278
6280
  <!-- ================= -->
6279
6281
  <!-- Added,deleted text -->
6280
6282
  <!-- ================= -->
6281
- <xsl:template match="*[local-name()='add']" name="tag_add">
6283
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
6282
6284
  <xsl:param name="skip">true</xsl:param>
6283
6285
  <xsl:param name="block">false</xsl:param>
6284
6286
  <xsl:param name="type"/>
6285
6287
  <xsl:param name="text-align"/>
6286
6288
  <xsl:choose>
6287
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
6289
+ <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
6290
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
6288
6291
  <xsl:choose>
6289
6292
  <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
6293
  <xsl:otherwise>
@@ -6292,12 +6295,32 @@
6292
6295
  <xsl:call-template name="insertTag">
6293
6296
  <xsl:with-param name="type">
6294
6297
  <xsl:choose>
6298
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
6299
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
6295
6300
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
6296
6301
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
6297
6302
  </xsl:choose>
6298
6303
  </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 -->
6304
+ <xsl:with-param name="kind">
6305
+ <xsl:choose>
6306
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6307
+ <xsl:value-of select="text()"/>
6308
+ </xsl:when>
6309
+ <xsl:otherwise>
6310
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6311
+ </xsl:otherwise>
6312
+ </xsl:choose>
6313
+ </xsl:with-param>
6314
+ <xsl:with-param name="value">
6315
+ <xsl:choose>
6316
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6317
+ <xsl:value-of select="*[local-name() = 'sub']"/>
6318
+ </xsl:when>
6319
+ <xsl:otherwise>
6320
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6321
+ </xsl:otherwise>
6322
+ </xsl:choose>
6323
+ </xsl:with-param>
6301
6324
  </xsl:call-template>
6302
6325
  </xsl:variable>
6303
6326
  <xsl:choose>
@@ -8509,11 +8532,17 @@
8509
8532
  </xsl:when>
8510
8533
  <xsl:otherwise>
8511
8534
 
8535
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8536
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8537
+
8512
8538
  <xsl:variable name="element">
8513
8539
  <xsl:choose>
8514
8540
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
8515
8541
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8516
8542
  </xsl:when>
8543
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8544
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8545
+ </xsl:when>
8517
8546
  <xsl:otherwise>
8518
8547
  <fo:block xsl:use-attribute-sets="image-style">
8519
8548
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -8529,10 +8558,24 @@
8529
8558
  <xsl:copy-of select="@*"/>
8530
8559
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
8531
8560
  <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>
8561
+
8562
+ <xsl:choose>
8563
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8564
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8565
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8566
+ <xsl:if test="$ancestor_table_cell = 'true'">
8567
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8568
+ </xsl:if>
8569
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8570
+ </xsl:when>
8571
+ <xsl:otherwise>
8572
+ <xsl:if test="$isGenerateTableIF = 'false'">
8573
+ <xsl:attribute name="width">100%</xsl:attribute>
8574
+ </xsl:if>
8575
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8576
+ </xsl:otherwise>
8577
+ </xsl:choose>
8578
+
8536
8579
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8537
8580
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
8538
8581
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10743,13 +10786,19 @@
10743
10786
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10744
10787
  </xsl:when>
10745
10788
  <!-- 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])">
10789
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10790
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10791
+ </xsl:when>
10792
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10747
10793
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10748
10794
  </xsl:when>
10749
10795
  </xsl:choose>
10750
10796
 
10751
10797
  </xsl:template>
10752
10798
 
10799
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10800
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10801
+
10753
10802
  <xsl:template match="*[local-name() = 'name']/text()">
10754
10803
  <!-- 0xA0 to space replacement -->
10755
10804
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -12382,7 +12431,7 @@
12382
12431
 
12383
12432
  <xsl:template name="printEdition">
12384
12433
  <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>
12434
+
12386
12435
  <xsl:choose>
12387
12436
  <xsl:when test="$edition_i18n != ''">
12388
12437
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -3975,7 +3975,9 @@
3975
3975
  </xsl:template> <!-- license-statement/p -->
3976
3976
 
3977
3977
  <xsl:template match="*[local-name()='legal-statement']">
3978
+ <xsl:param name="isLegacy">false</xsl:param>
3978
3979
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3980
+
3979
3981
  <xsl:apply-templates/>
3980
3982
  </fo:block>
3981
3983
  </xsl:template> <!-- legal-statement -->
@@ -6278,13 +6280,14 @@
6278
6280
  <!-- ================= -->
6279
6281
  <!-- Added,deleted text -->
6280
6282
  <!-- ================= -->
6281
- <xsl:template match="*[local-name()='add']" name="tag_add">
6283
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
6282
6284
  <xsl:param name="skip">true</xsl:param>
6283
6285
  <xsl:param name="block">false</xsl:param>
6284
6286
  <xsl:param name="type"/>
6285
6287
  <xsl:param name="text-align"/>
6286
6288
  <xsl:choose>
6287
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
6289
+ <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
6290
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
6288
6291
  <xsl:choose>
6289
6292
  <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
6293
  <xsl:otherwise>
@@ -6292,12 +6295,32 @@
6292
6295
  <xsl:call-template name="insertTag">
6293
6296
  <xsl:with-param name="type">
6294
6297
  <xsl:choose>
6298
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
6299
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
6295
6300
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
6296
6301
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
6297
6302
  </xsl:choose>
6298
6303
  </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 -->
6304
+ <xsl:with-param name="kind">
6305
+ <xsl:choose>
6306
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6307
+ <xsl:value-of select="text()"/>
6308
+ </xsl:when>
6309
+ <xsl:otherwise>
6310
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6311
+ </xsl:otherwise>
6312
+ </xsl:choose>
6313
+ </xsl:with-param>
6314
+ <xsl:with-param name="value">
6315
+ <xsl:choose>
6316
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6317
+ <xsl:value-of select="*[local-name() = 'sub']"/>
6318
+ </xsl:when>
6319
+ <xsl:otherwise>
6320
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6321
+ </xsl:otherwise>
6322
+ </xsl:choose>
6323
+ </xsl:with-param>
6301
6324
  </xsl:call-template>
6302
6325
  </xsl:variable>
6303
6326
  <xsl:choose>
@@ -8509,11 +8532,17 @@
8509
8532
  </xsl:when>
8510
8533
  <xsl:otherwise>
8511
8534
 
8535
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8536
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8537
+
8512
8538
  <xsl:variable name="element">
8513
8539
  <xsl:choose>
8514
8540
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
8515
8541
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8516
8542
  </xsl:when>
8543
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8544
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8545
+ </xsl:when>
8517
8546
  <xsl:otherwise>
8518
8547
  <fo:block xsl:use-attribute-sets="image-style">
8519
8548
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -8529,10 +8558,24 @@
8529
8558
  <xsl:copy-of select="@*"/>
8530
8559
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
8531
8560
  <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>
8561
+
8562
+ <xsl:choose>
8563
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8564
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8565
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8566
+ <xsl:if test="$ancestor_table_cell = 'true'">
8567
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8568
+ </xsl:if>
8569
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8570
+ </xsl:when>
8571
+ <xsl:otherwise>
8572
+ <xsl:if test="$isGenerateTableIF = 'false'">
8573
+ <xsl:attribute name="width">100%</xsl:attribute>
8574
+ </xsl:if>
8575
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8576
+ </xsl:otherwise>
8577
+ </xsl:choose>
8578
+
8536
8579
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8537
8580
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
8538
8581
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10743,13 +10786,19 @@
10743
10786
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10744
10787
  </xsl:when>
10745
10788
  <!-- 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])">
10789
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10790
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10791
+ </xsl:when>
10792
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10747
10793
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10748
10794
  </xsl:when>
10749
10795
  </xsl:choose>
10750
10796
 
10751
10797
  </xsl:template>
10752
10798
 
10799
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10800
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10801
+
10753
10802
  <xsl:template match="*[local-name() = 'name']/text()">
10754
10803
  <!-- 0xA0 to space replacement -->
10755
10804
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -12382,7 +12431,7 @@
12382
12431
 
12383
12432
  <xsl:template name="printEdition">
12384
12433
  <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>
12434
+
12386
12435
  <xsl:choose>
12387
12436
  <xsl:when test="$edition_i18n != ''">
12388
12437
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -3975,7 +3975,9 @@
3975
3975
  </xsl:template> <!-- license-statement/p -->
3976
3976
 
3977
3977
  <xsl:template match="*[local-name()='legal-statement']">
3978
+ <xsl:param name="isLegacy">false</xsl:param>
3978
3979
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3980
+
3979
3981
  <xsl:apply-templates/>
3980
3982
  </fo:block>
3981
3983
  </xsl:template> <!-- legal-statement -->
@@ -6278,13 +6280,14 @@
6278
6280
  <!-- ================= -->
6279
6281
  <!-- Added,deleted text -->
6280
6282
  <!-- ================= -->
6281
- <xsl:template match="*[local-name()='add']" name="tag_add">
6283
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
6282
6284
  <xsl:param name="skip">true</xsl:param>
6283
6285
  <xsl:param name="block">false</xsl:param>
6284
6286
  <xsl:param name="type"/>
6285
6287
  <xsl:param name="text-align"/>
6286
6288
  <xsl:choose>
6287
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
6289
+ <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
6290
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
6288
6291
  <xsl:choose>
6289
6292
  <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
6293
  <xsl:otherwise>
@@ -6292,12 +6295,32 @@
6292
6295
  <xsl:call-template name="insertTag">
6293
6296
  <xsl:with-param name="type">
6294
6297
  <xsl:choose>
6298
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
6299
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
6295
6300
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
6296
6301
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
6297
6302
  </xsl:choose>
6298
6303
  </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 -->
6304
+ <xsl:with-param name="kind">
6305
+ <xsl:choose>
6306
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6307
+ <xsl:value-of select="text()"/>
6308
+ </xsl:when>
6309
+ <xsl:otherwise>
6310
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6311
+ </xsl:otherwise>
6312
+ </xsl:choose>
6313
+ </xsl:with-param>
6314
+ <xsl:with-param name="value">
6315
+ <xsl:choose>
6316
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6317
+ <xsl:value-of select="*[local-name() = 'sub']"/>
6318
+ </xsl:when>
6319
+ <xsl:otherwise>
6320
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6321
+ </xsl:otherwise>
6322
+ </xsl:choose>
6323
+ </xsl:with-param>
6301
6324
  </xsl:call-template>
6302
6325
  </xsl:variable>
6303
6326
  <xsl:choose>
@@ -8509,11 +8532,17 @@
8509
8532
  </xsl:when>
8510
8533
  <xsl:otherwise>
8511
8534
 
8535
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8536
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8537
+
8512
8538
  <xsl:variable name="element">
8513
8539
  <xsl:choose>
8514
8540
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
8515
8541
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8516
8542
  </xsl:when>
8543
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8544
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8545
+ </xsl:when>
8517
8546
  <xsl:otherwise>
8518
8547
  <fo:block xsl:use-attribute-sets="image-style">
8519
8548
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -8529,10 +8558,24 @@
8529
8558
  <xsl:copy-of select="@*"/>
8530
8559
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
8531
8560
  <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>
8561
+
8562
+ <xsl:choose>
8563
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8564
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8565
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8566
+ <xsl:if test="$ancestor_table_cell = 'true'">
8567
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8568
+ </xsl:if>
8569
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8570
+ </xsl:when>
8571
+ <xsl:otherwise>
8572
+ <xsl:if test="$isGenerateTableIF = 'false'">
8573
+ <xsl:attribute name="width">100%</xsl:attribute>
8574
+ </xsl:if>
8575
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8576
+ </xsl:otherwise>
8577
+ </xsl:choose>
8578
+
8536
8579
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8537
8580
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
8538
8581
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10743,13 +10786,19 @@
10743
10786
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10744
10787
  </xsl:when>
10745
10788
  <!-- 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])">
10789
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10790
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10791
+ </xsl:when>
10792
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10747
10793
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10748
10794
  </xsl:when>
10749
10795
  </xsl:choose>
10750
10796
 
10751
10797
  </xsl:template>
10752
10798
 
10799
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10800
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10801
+
10753
10802
  <xsl:template match="*[local-name() = 'name']/text()">
10754
10803
  <!-- 0xA0 to space replacement -->
10755
10804
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -12382,7 +12431,7 @@
12382
12431
 
12383
12432
  <xsl:template name="printEdition">
12384
12433
  <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>
12434
+
12386
12435
  <xsl:choose>
12387
12436
  <xsl:when test="$edition_i18n != ''">
12388
12437
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -3975,7 +3975,9 @@
3975
3975
  </xsl:template> <!-- license-statement/p -->
3976
3976
 
3977
3977
  <xsl:template match="*[local-name()='legal-statement']">
3978
+ <xsl:param name="isLegacy">false</xsl:param>
3978
3979
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3980
+
3979
3981
  <xsl:apply-templates/>
3980
3982
  </fo:block>
3981
3983
  </xsl:template> <!-- legal-statement -->
@@ -6278,13 +6280,14 @@
6278
6280
  <!-- ================= -->
6279
6281
  <!-- Added,deleted text -->
6280
6282
  <!-- ================= -->
6281
- <xsl:template match="*[local-name()='add']" name="tag_add">
6283
+ <xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
6282
6284
  <xsl:param name="skip">true</xsl:param>
6283
6285
  <xsl:param name="block">false</xsl:param>
6284
6286
  <xsl:param name="type"/>
6285
6287
  <xsl:param name="text-align"/>
6286
6288
  <xsl:choose>
6287
- <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
6289
+ <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
6290
+ <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
6288
6291
  <xsl:choose>
6289
6292
  <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
6293
  <xsl:otherwise>
@@ -6292,12 +6295,32 @@
6292
6295
  <xsl:call-template name="insertTag">
6293
6296
  <xsl:with-param name="type">
6294
6297
  <xsl:choose>
6298
+ <xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
6299
+ <xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
6295
6300
  <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
6296
6301
  <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
6297
6302
  </xsl:choose>
6298
6303
  </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 -->
6304
+ <xsl:with-param name="kind">
6305
+ <xsl:choose>
6306
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6307
+ <xsl:value-of select="text()"/>
6308
+ </xsl:when>
6309
+ <xsl:otherwise>
6310
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
6311
+ </xsl:otherwise>
6312
+ </xsl:choose>
6313
+ </xsl:with-param>
6314
+ <xsl:with-param name="value">
6315
+ <xsl:choose>
6316
+ <xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
6317
+ <xsl:value-of select="*[local-name() = 'sub']"/>
6318
+ </xsl:when>
6319
+ <xsl:otherwise>
6320
+ <xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
6321
+ </xsl:otherwise>
6322
+ </xsl:choose>
6323
+ </xsl:with-param>
6301
6324
  </xsl:call-template>
6302
6325
  </xsl:variable>
6303
6326
  <xsl:choose>
@@ -8509,11 +8532,17 @@
8509
8532
  </xsl:when>
8510
8533
  <xsl:otherwise>
8511
8534
 
8535
+ <xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
8536
+ <xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
8537
+
8512
8538
  <xsl:variable name="element">
8513
8539
  <xsl:choose>
8514
8540
  <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
8515
8541
  <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8516
8542
  </xsl:when>
8543
+ <xsl:when test="not(ancestor::*[local-name() = 'figure'])">
8544
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
8545
+ </xsl:when>
8517
8546
  <xsl:otherwise>
8518
8547
  <fo:block xsl:use-attribute-sets="image-style">
8519
8548
  <xsl:if test="ancestor::*[local-name() = 'dt']">
@@ -8529,10 +8558,24 @@
8529
8558
  <xsl:copy-of select="@*"/>
8530
8559
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
8531
8560
  <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>
8561
+
8562
+ <xsl:choose>
8563
+ <xsl:when test="$image_class = 'corrigenda-tag'">
8564
+ <xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
8565
+ <xsl:attribute name="baseline-shift">-10%</xsl:attribute>
8566
+ <xsl:if test="$ancestor_table_cell = 'true'">
8567
+ <xsl:attribute name="baseline-shift">-25%</xsl:attribute>
8568
+ </xsl:if>
8569
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
8570
+ </xsl:when>
8571
+ <xsl:otherwise>
8572
+ <xsl:if test="$isGenerateTableIF = 'false'">
8573
+ <xsl:attribute name="width">100%</xsl:attribute>
8574
+ </xsl:if>
8575
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8576
+ </xsl:otherwise>
8577
+ </xsl:choose>
8578
+
8536
8579
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8537
8580
  <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
8538
8581
  <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
@@ -10743,13 +10786,19 @@
10743
10786
  <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10744
10787
  </xsl:when>
10745
10788
  <!-- 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])">
10789
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10790
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10791
+ </xsl:when>
10792
+ <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10747
10793
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10748
10794
  </xsl:when>
10749
10795
  </xsl:choose>
10750
10796
 
10751
10797
  </xsl:template>
10752
10798
 
10799
+ <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
10800
+ <xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
10801
+
10753
10802
  <xsl:template match="*[local-name() = 'name']/text()">
10754
10803
  <!-- 0xA0 to space replacement -->
10755
10804
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -12382,7 +12431,7 @@
12382
12431
 
12383
12432
  <xsl:template name="printEdition">
12384
12433
  <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>
12434
+
12386
12435
  <xsl:choose>
12387
12436
  <xsl:when test="$edition_i18n != ''">
12388
12437
  <!-- Example: <edition language="fr">deuxième édition</edition> -->