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.
@@ -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> -->
@@ -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"/>
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.12 -->
20
+ <!-- VERSION v1.3.0 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -146,6 +146,9 @@
146
146
  <data type="boolean"/>
147
147
  </attribute>
148
148
  </optional>
149
+ <optional>
150
+ <attribute name="style"/>
151
+ </optional>
149
152
  <oneOrMore>
150
153
  <ref name="PureTextElement"/>
151
154
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.4.0".freeze
3
+ VERSION = "2.4.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-09 00:00:00.000000000 Z
11
+ date: 2024-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc