metanorma-un 0.5.11 → 0.5.12

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: 3669c8651ebe2fd2d2ee518d75f80e152bdf76b1f6e6580ca2795e365a440fda
4
- data.tar.gz: 75d299cd1e26be0ab1e8b407f60ac0c8eb6e790923d1beb4f4154383923da117
3
+ metadata.gz: d6f40fd8baff69f7e6106f1c7a19bcc6c3a2e090d125de96ae9c9b486a8e684a
4
+ data.tar.gz: cb96a99a8726aa83764355fb67c58aac06860666f17c728286adc54d4f3ae30a
5
5
  SHA512:
6
- metadata.gz: 0b4fbbad777aed0a62be4f95fe3668fc7fcc1ed1a42478b9e6b69cbbe5c8adddcd833731cc64062e6484b735a9d35e2a378a6ea260f27bfe4bfc7eeff82aaa9c
7
- data.tar.gz: 3e82ec5eb0e089f3259644789b6c53297f313d0d6f31dba720c656029cf40ce8396fcde56f82954aefa4988ffdf1551147b23a92090c6564fcc87bb5966a1f46
6
+ metadata.gz: e3c8a21a6575b9e8a9f556fdae8a7c97f155a466b509f8793fc589268501edaf1fff97522297855e76461019472c60ff36196b753caee6bb182dddde9e82b6ce
7
+ data.tar.gz: 3edf55c3391e3e126307fd2b911b754148d2dcced675e11540358a3c412bb09a130b69719e5fd2677d2b7b605136e2eaaf188171138b514ad1f88d053d917103
@@ -729,9 +729,11 @@
729
729
  </define>
730
730
  <define name="index">
731
731
  <element name="index">
732
- <attribute name="to">
733
- <data type="IDREF"/>
734
- </attribute>
732
+ <optional>
733
+ <attribute name="to">
734
+ <data type="IDREF"/>
735
+ </attribute>
736
+ </optional>
735
737
  <element name="primary">
736
738
  <oneOrMore>
737
739
  <ref name="PureTextElement"/>
@@ -30,7 +30,7 @@ module Asciidoctor
30
30
  end
31
31
 
32
32
  def asciidoc_sub(text)
33
- Asciidoctor::Standoc::Utils::asciidoc_sub(text)
33
+ Metanorma::Utils::asciidoc_sub(text)
34
34
  end
35
35
 
36
36
  def title(node, xml)
@@ -789,6 +789,9 @@
789
789
  <attribute name="width"/>
790
790
  </element>
791
791
  </define>
792
+ <define name="BibItemType" combine="choice">
793
+ <value>internal</value>
794
+ </define>
792
795
  <define name="TextElement" combine="choice">
793
796
  <ref name="concept"/>
794
797
  </define>
@@ -6,7 +6,7 @@
6
6
  {% endif %}
7
7
 
8
8
  <nav>
9
- <h1 id="content">Contents</h1>
9
+ <h1 id="content">{{ labels["table_of_contents"] }}</h1>
10
10
  <div id="toc"></div>
11
11
 
12
12
  </nav>
@@ -9,7 +9,7 @@
9
9
  {% endif %}
10
10
 
11
11
  {% if toc %}
12
- <p class="zzContents" style='margin-top:0cm'><span lang="EN-GB">Contents</span></p>
12
+ <p class="zzContents" style='margin-top:0cm'><span lang="EN-GB">{{ labels["table_of_contents"] }}</span></p>
13
13
 
14
14
  WORDTOC
15
15
  {% endif %}
@@ -18,12 +18,12 @@ module IsoDoc
18
18
  {
19
19
  bodyfont: (
20
20
  options[:script] == "Hans" ?
21
- '"SimSun",serif' :
21
+ '"Source Han Sans",serif' :
22
22
  '"Times New Roman", serif'
23
23
  ),
24
24
  headerfont: (
25
25
  options[:script] == "Hans" ?
26
- '"SimHei",sans-serif' :
26
+ '"Source Han Sans",sans-serif' :
27
27
  '"Times New Roman", serif'
28
28
  ),
29
29
  monospacefont: '"Courier New",monospace',
@@ -1568,6 +1568,7 @@
1568
1568
 
1569
1569
 
1570
1570
 
1571
+
1571
1572
  </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1572
1573
 
1573
1574
 
@@ -1697,7 +1698,7 @@
1697
1698
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1698
1699
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1699
1700
  <xsl:call-template name="add-zero-spaces-java"/>
1700
- </xsl:template><xsl:template match="*[local-name()='table']">
1701
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1701
1702
 
1702
1703
  <xsl:variable name="simple-table">
1703
1704
  <xsl:call-template name="getSimpleTable"/>
@@ -2966,6 +2967,7 @@
2966
2967
 
2967
2968
 
2968
2969
 
2970
+
2969
2971
 
2970
2972
  </xsl:variable>
2971
2973
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3572,7 +3574,7 @@
3572
3574
  </xsl:if> -->
3573
3575
  </fo:inline>
3574
3576
  </xsl:if>
3575
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3577
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3576
3578
  <fo:block-container id="{@id}">
3577
3579
 
3578
3580
  <fo:block>
@@ -3779,6 +3781,12 @@
3779
3781
  <!-- <xsl:text> </xsl:text> -->
3780
3782
  </xsl:template><xsl:template name="getSection">
3781
3783
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3784
+ <!--
3785
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3786
+ <xsl:value-of select="."/>
3787
+ </xsl:for-each>
3788
+ -->
3789
+
3782
3790
  </xsl:template><xsl:template name="getName">
3783
3791
  <xsl:choose>
3784
3792
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3831,6 +3839,10 @@
3831
3839
  <xsl:copy>
3832
3840
  <xsl:apply-templates mode="contents_item"/>
3833
3841
  </xsl:copy>
3842
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3843
+ <xsl:copy>
3844
+ <xsl:apply-templates mode="contents_item"/>
3845
+ </xsl:copy>
3834
3846
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3835
3847
  <xsl:text> </xsl:text>
3836
3848
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3856,6 +3868,7 @@
3856
3868
 
3857
3869
 
3858
3870
 
3871
+
3859
3872
 
3860
3873
 
3861
3874
 
@@ -4385,6 +4398,7 @@
4385
4398
 
4386
4399
 
4387
4400
 
4401
+
4388
4402
 
4389
4403
 
4390
4404
 
@@ -4401,7 +4415,7 @@
4401
4415
 
4402
4416
 
4403
4417
 
4404
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
4418
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
4405
4419
  <fo:block break-after="page"/>
4406
4420
  <fo:block>
4407
4421
  <xsl:call-template name="setId"/>
@@ -4409,7 +4423,8 @@
4409
4423
  </fo:block>
4410
4424
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4411
4425
  <fo:block>
4412
- <xsl:call-template name="setId"/>
4426
+ <xsl:call-template name="setId"/>
4427
+
4413
4428
 
4414
4429
  <xsl:apply-templates/>
4415
4430
  </fo:block>
@@ -4586,6 +4601,57 @@
4586
4601
  </xsl:variable>
4587
4602
  <xsl:variable name="result">
4588
4603
  <xsl:choose>
4604
+ <xsl:when test="$format = 'ddMMyyyy'">
4605
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4606
+ <xsl:text> </xsl:text>
4607
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4608
+ </xsl:when>
4609
+ <xsl:when test="$format = 'ddMM'">
4610
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4611
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4612
+ </xsl:when>
4613
+ <xsl:when test="$format = 'short' or $day = ''">
4614
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4615
+ </xsl:when>
4616
+ <xsl:otherwise>
4617
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4618
+ </xsl:otherwise>
4619
+ </xsl:choose>
4620
+ </xsl:variable>
4621
+ <xsl:value-of select="$result"/>
4622
+ </xsl:template><xsl:template name="convertDateLocalized">
4623
+ <xsl:param name="date"/>
4624
+ <xsl:param name="format" select="'short'"/>
4625
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4626
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4627
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4628
+ <xsl:variable name="monthStr">
4629
+ <xsl:choose>
4630
+ <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
4631
+ <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
4632
+ <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
4633
+ <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
4634
+ <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
4635
+ <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
4636
+ <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
4637
+ <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
4638
+ <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
4639
+ <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
4640
+ <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
4641
+ <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
4642
+ </xsl:choose>
4643
+ </xsl:variable>
4644
+ <xsl:variable name="result">
4645
+ <xsl:choose>
4646
+ <xsl:when test="$format = 'ddMMyyyy'">
4647
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4648
+ <xsl:text> </xsl:text>
4649
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4650
+ </xsl:when>
4651
+ <xsl:when test="$format = 'ddMM'">
4652
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4653
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4654
+ </xsl:when>
4589
4655
  <xsl:when test="$format = 'short' or $day = ''">
4590
4656
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4591
4657
  </xsl:when>
@@ -4780,6 +4846,7 @@
4780
4846
 
4781
4847
 
4782
4848
 
4849
+
4783
4850
  </xsl:variable>
4784
4851
  <xsl:if test="$documentNS != $XSLNS">
4785
4852
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1568,6 +1568,7 @@
1568
1568
 
1569
1569
 
1570
1570
 
1571
+
1571
1572
  </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1572
1573
 
1573
1574
 
@@ -1697,7 +1698,7 @@
1697
1698
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1698
1699
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1699
1700
  <xsl:call-template name="add-zero-spaces-java"/>
1700
- </xsl:template><xsl:template match="*[local-name()='table']">
1701
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1701
1702
 
1702
1703
  <xsl:variable name="simple-table">
1703
1704
  <xsl:call-template name="getSimpleTable"/>
@@ -2966,6 +2967,7 @@
2966
2967
 
2967
2968
 
2968
2969
 
2970
+
2969
2971
 
2970
2972
  </xsl:variable>
2971
2973
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3572,7 +3574,7 @@
3572
3574
  </xsl:if> -->
3573
3575
  </fo:inline>
3574
3576
  </xsl:if>
3575
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3577
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3576
3578
  <fo:block-container id="{@id}">
3577
3579
 
3578
3580
  <fo:block>
@@ -3779,6 +3781,12 @@
3779
3781
  <!-- <xsl:text> </xsl:text> -->
3780
3782
  </xsl:template><xsl:template name="getSection">
3781
3783
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3784
+ <!--
3785
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3786
+ <xsl:value-of select="."/>
3787
+ </xsl:for-each>
3788
+ -->
3789
+
3782
3790
  </xsl:template><xsl:template name="getName">
3783
3791
  <xsl:choose>
3784
3792
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3831,6 +3839,10 @@
3831
3839
  <xsl:copy>
3832
3840
  <xsl:apply-templates mode="contents_item"/>
3833
3841
  </xsl:copy>
3842
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3843
+ <xsl:copy>
3844
+ <xsl:apply-templates mode="contents_item"/>
3845
+ </xsl:copy>
3834
3846
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3835
3847
  <xsl:text> </xsl:text>
3836
3848
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3856,6 +3868,7 @@
3856
3868
 
3857
3869
 
3858
3870
 
3871
+
3859
3872
 
3860
3873
 
3861
3874
 
@@ -4385,6 +4398,7 @@
4385
4398
 
4386
4399
 
4387
4400
 
4401
+
4388
4402
 
4389
4403
 
4390
4404
 
@@ -4401,7 +4415,7 @@
4401
4415
 
4402
4416
 
4403
4417
 
4404
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
4418
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
4405
4419
  <fo:block break-after="page"/>
4406
4420
  <fo:block>
4407
4421
  <xsl:call-template name="setId"/>
@@ -4409,7 +4423,8 @@
4409
4423
  </fo:block>
4410
4424
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4411
4425
  <fo:block>
4412
- <xsl:call-template name="setId"/>
4426
+ <xsl:call-template name="setId"/>
4427
+
4413
4428
 
4414
4429
  <xsl:apply-templates/>
4415
4430
  </fo:block>
@@ -4586,6 +4601,57 @@
4586
4601
  </xsl:variable>
4587
4602
  <xsl:variable name="result">
4588
4603
  <xsl:choose>
4604
+ <xsl:when test="$format = 'ddMMyyyy'">
4605
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4606
+ <xsl:text> </xsl:text>
4607
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4608
+ </xsl:when>
4609
+ <xsl:when test="$format = 'ddMM'">
4610
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4611
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4612
+ </xsl:when>
4613
+ <xsl:when test="$format = 'short' or $day = ''">
4614
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4615
+ </xsl:when>
4616
+ <xsl:otherwise>
4617
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4618
+ </xsl:otherwise>
4619
+ </xsl:choose>
4620
+ </xsl:variable>
4621
+ <xsl:value-of select="$result"/>
4622
+ </xsl:template><xsl:template name="convertDateLocalized">
4623
+ <xsl:param name="date"/>
4624
+ <xsl:param name="format" select="'short'"/>
4625
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4626
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4627
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4628
+ <xsl:variable name="monthStr">
4629
+ <xsl:choose>
4630
+ <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
4631
+ <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
4632
+ <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
4633
+ <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
4634
+ <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
4635
+ <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
4636
+ <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
4637
+ <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
4638
+ <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
4639
+ <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
4640
+ <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
4641
+ <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
4642
+ </xsl:choose>
4643
+ </xsl:variable>
4644
+ <xsl:variable name="result">
4645
+ <xsl:choose>
4646
+ <xsl:when test="$format = 'ddMMyyyy'">
4647
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4648
+ <xsl:text> </xsl:text>
4649
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4650
+ </xsl:when>
4651
+ <xsl:when test="$format = 'ddMM'">
4652
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4653
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4654
+ </xsl:when>
4589
4655
  <xsl:when test="$format = 'short' or $day = ''">
4590
4656
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4591
4657
  </xsl:when>
@@ -4780,6 +4846,7 @@
4780
4846
 
4781
4847
 
4782
4848
 
4849
+
4783
4850
  </xsl:variable>
4784
4851
  <xsl:if test="$documentNS != $XSLNS">
4785
4852
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1428,6 +1428,7 @@
1428
1428
 
1429
1429
 
1430
1430
 
1431
+
1431
1432
  </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1432
1433
 
1433
1434
 
@@ -1557,7 +1558,7 @@
1557
1558
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1558
1559
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1559
1560
  <xsl:call-template name="add-zero-spaces-java"/>
1560
- </xsl:template><xsl:template match="*[local-name()='table']">
1561
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1561
1562
 
1562
1563
  <xsl:variable name="simple-table">
1563
1564
  <xsl:call-template name="getSimpleTable"/>
@@ -2831,6 +2832,7 @@
2831
2832
 
2832
2833
 
2833
2834
 
2835
+
2834
2836
 
2835
2837
  </xsl:variable>
2836
2838
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3441,7 +3443,7 @@
3441
3443
  </xsl:if> -->
3442
3444
  </fo:inline>
3443
3445
  </xsl:if>
3444
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3446
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3445
3447
  <fo:block-container id="{@id}">
3446
3448
 
3447
3449
  <fo:block>
@@ -3653,6 +3655,12 @@
3653
3655
  <!-- <xsl:text> </xsl:text> -->
3654
3656
  </xsl:template><xsl:template name="getSection">
3655
3657
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3658
+ <!--
3659
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3660
+ <xsl:value-of select="."/>
3661
+ </xsl:for-each>
3662
+ -->
3663
+
3656
3664
  </xsl:template><xsl:template name="getName">
3657
3665
  <xsl:choose>
3658
3666
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3705,6 +3713,10 @@
3705
3713
  <xsl:copy>
3706
3714
  <xsl:apply-templates mode="contents_item"/>
3707
3715
  </xsl:copy>
3716
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3717
+ <xsl:copy>
3718
+ <xsl:apply-templates mode="contents_item"/>
3719
+ </xsl:copy>
3708
3720
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3709
3721
  <xsl:text> </xsl:text>
3710
3722
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3730,6 +3742,7 @@
3730
3742
 
3731
3743
 
3732
3744
 
3745
+
3733
3746
 
3734
3747
 
3735
3748
 
@@ -4259,6 +4272,7 @@
4259
4272
 
4260
4273
 
4261
4274
 
4275
+
4262
4276
 
4263
4277
 
4264
4278
 
@@ -4275,7 +4289,7 @@
4275
4289
 
4276
4290
 
4277
4291
 
4278
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
4292
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
4279
4293
  <fo:block break-after="page"/>
4280
4294
  <fo:block>
4281
4295
  <xsl:call-template name="setId"/>
@@ -4283,7 +4297,8 @@
4283
4297
  </fo:block>
4284
4298
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4285
4299
  <fo:block>
4286
- <xsl:call-template name="setId"/>
4300
+ <xsl:call-template name="setId"/>
4301
+
4287
4302
 
4288
4303
  <xsl:apply-templates/>
4289
4304
  </fo:block>
@@ -4460,6 +4475,57 @@
4460
4475
  </xsl:variable>
4461
4476
  <xsl:variable name="result">
4462
4477
  <xsl:choose>
4478
+ <xsl:when test="$format = 'ddMMyyyy'">
4479
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4480
+ <xsl:text> </xsl:text>
4481
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4482
+ </xsl:when>
4483
+ <xsl:when test="$format = 'ddMM'">
4484
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4485
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4486
+ </xsl:when>
4487
+ <xsl:when test="$format = 'short' or $day = ''">
4488
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4489
+ </xsl:when>
4490
+ <xsl:otherwise>
4491
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4492
+ </xsl:otherwise>
4493
+ </xsl:choose>
4494
+ </xsl:variable>
4495
+ <xsl:value-of select="$result"/>
4496
+ </xsl:template><xsl:template name="convertDateLocalized">
4497
+ <xsl:param name="date"/>
4498
+ <xsl:param name="format" select="'short'"/>
4499
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4500
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4501
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4502
+ <xsl:variable name="monthStr">
4503
+ <xsl:choose>
4504
+ <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
4505
+ <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
4506
+ <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
4507
+ <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
4508
+ <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
4509
+ <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
4510
+ <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
4511
+ <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
4512
+ <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
4513
+ <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
4514
+ <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
4515
+ <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
4516
+ </xsl:choose>
4517
+ </xsl:variable>
4518
+ <xsl:variable name="result">
4519
+ <xsl:choose>
4520
+ <xsl:when test="$format = 'ddMMyyyy'">
4521
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4522
+ <xsl:text> </xsl:text>
4523
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4524
+ </xsl:when>
4525
+ <xsl:when test="$format = 'ddMM'">
4526
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4527
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4528
+ </xsl:when>
4463
4529
  <xsl:when test="$format = 'short' or $day = ''">
4464
4530
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4465
4531
  </xsl:when>
@@ -4654,6 +4720,7 @@
4654
4720
 
4655
4721
 
4656
4722
 
4723
+
4657
4724
  </xsl:variable>
4658
4725
  <xsl:if test="$documentNS != $XSLNS">
4659
4726
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -16,9 +16,9 @@ module IsoDoc
16
16
 
17
17
  def default_fonts(options)
18
18
  {
19
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
19
+ bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' :
20
20
  '"Times New Roman",serif'),
21
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
21
+ headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' :
22
22
  '"Times New Roman",serif'),
23
23
  monospacefont: '"Courier New",monospace',
24
24
  normalfontsize: "10.5pt",
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.5.11"
3
+ VERSION = "0.5.12"
4
4
  end
5
5
  end
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency "twitter_cldr"
31
31
  spec.add_dependency "iso-639"
32
32
 
33
- spec.add_dependency "metanorma-standoc", "~> 1.7.0"
34
- spec.add_dependency "isodoc", "~> 1.4.2"
33
+ spec.add_dependency "metanorma-standoc", "~> 1.8.0"
34
+ spec.add_dependency "isodoc", "~> 1.5.0"
35
35
 
36
36
  spec.add_development_dependency "byebug", "~> 9.1"
37
37
  spec.add_development_dependency "sassc", "2.4.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-11 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roman-numerals
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.7.0
61
+ version: 1.8.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.7.0
68
+ version: 1.8.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: isodoc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.4.2
75
+ version: 1.5.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.4.2
82
+ version: 1.5.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: byebug
85
85
  requirement: !ruby/object:Gem::Requirement