metanorma-mpfa 0.5.11 → 0.5.12

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: b6b4fb45cca9108e736075604129bbd75df3639b0da7e4acf98e260f8b1423a2
4
- data.tar.gz: 197f73f8a3f35bf7a1a33d80c8d392f882ec40dace0f4005c8f4c023e24bc62c
3
+ metadata.gz: 0467ad12b2ffb1cf2ea0b8e5c3978b9a468f9c742c177f29fbe80ad407f51a2f
4
+ data.tar.gz: 9a2e33c2c864553d1808945a114478287f7db0d3182b967772dff3ba959cd290
5
5
  SHA512:
6
- metadata.gz: 235ee64575a96e7973502abe404564966040aa711ea48a3096364ccda817cb65f0aa1d8da9d57729088a7761b0a8574b8a31a845db9945b1d97ac46d58c0d858
7
- data.tar.gz: b49a34338f58c0faff58d362f4a9ec17de4482512e116470c40c7a7ef3ee7bd7267e70fc98b8c275d22045de552ff02da21bf868a343e1afd11b7a2703177994
6
+ metadata.gz: 75f5316070167ca1a4637a475b5cf0b2bfdafc6705fbbb88d456e0d535be5409748dffc2a5c683cccd1f54d9ab6dd9dfdb2ece99ac97f7de2e0babae245f17d4
7
+ data.tar.gz: e52103a7422b8df892d85f94dfae8f2795922aaea99ce7b2e98c5096854cc78a9dbbc95579941ad9e1a804a5a6343930a8e52079d68fc558f7efadc5dc7ec110
@@ -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"/>
@@ -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>
@@ -18,8 +18,8 @@ module IsoDoc
18
18
 
19
19
  def default_fonts(options)
20
20
  {
21
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Titillium Web",sans-serif'),
22
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Titillium Web",sans-serif'),
21
+ bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' : '"Titillium Web",sans-serif'),
22
+ headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' : '"Titillium Web",sans-serif'),
23
23
  monospacefont: '"Space Mono",monospace',
24
24
  normalfontsize: "15px",
25
25
  footnotefontsize: "0.9em",
@@ -1146,6 +1146,7 @@
1146
1146
 
1147
1147
 
1148
1148
 
1149
+
1149
1150
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1150
1151
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1151
1152
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1278,7 +1279,7 @@
1278
1279
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1279
1280
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1280
1281
  <xsl:call-template name="add-zero-spaces-java"/>
1281
- </xsl:template><xsl:template match="*[local-name()='table']">
1282
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1282
1283
 
1283
1284
  <xsl:variable name="simple-table">
1284
1285
  <xsl:call-template name="getSimpleTable"/>
@@ -2518,6 +2519,7 @@
2518
2519
 
2519
2520
 
2520
2521
 
2522
+
2521
2523
 
2522
2524
  </xsl:variable>
2523
2525
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3111,7 +3113,7 @@
3111
3113
  </xsl:if> -->
3112
3114
  </fo:inline>
3113
3115
  </xsl:if>
3114
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3116
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3115
3117
  <fo:block-container id="{@id}">
3116
3118
 
3117
3119
  <fo:block>
@@ -3318,6 +3320,12 @@
3318
3320
  <!-- <xsl:text> </xsl:text> -->
3319
3321
  </xsl:template><xsl:template name="getSection">
3320
3322
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3323
+ <!--
3324
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3325
+ <xsl:value-of select="."/>
3326
+ </xsl:for-each>
3327
+ -->
3328
+
3321
3329
  </xsl:template><xsl:template name="getName">
3322
3330
  <xsl:choose>
3323
3331
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3370,6 +3378,10 @@
3370
3378
  <xsl:copy>
3371
3379
  <xsl:apply-templates mode="contents_item"/>
3372
3380
  </xsl:copy>
3381
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3382
+ <xsl:copy>
3383
+ <xsl:apply-templates mode="contents_item"/>
3384
+ </xsl:copy>
3373
3385
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3374
3386
  <xsl:text> </xsl:text>
3375
3387
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3395,6 +3407,7 @@
3395
3407
 
3396
3408
 
3397
3409
 
3410
+
3398
3411
 
3399
3412
 
3400
3413
 
@@ -3924,6 +3937,7 @@
3924
3937
 
3925
3938
 
3926
3939
 
3940
+
3927
3941
 
3928
3942
 
3929
3943
 
@@ -3935,7 +3949,7 @@
3935
3949
 
3936
3950
 
3937
3951
 
3938
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3952
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
3939
3953
  <fo:block break-after="page"/>
3940
3954
  <fo:block>
3941
3955
  <xsl:call-template name="setId"/>
@@ -3943,7 +3957,8 @@
3943
3957
  </fo:block>
3944
3958
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3945
3959
  <fo:block>
3946
- <xsl:call-template name="setId"/>
3960
+ <xsl:call-template name="setId"/>
3961
+
3947
3962
 
3948
3963
  <xsl:apply-templates/>
3949
3964
  </fo:block>
@@ -4115,6 +4130,57 @@
4115
4130
  </xsl:variable>
4116
4131
  <xsl:variable name="result">
4117
4132
  <xsl:choose>
4133
+ <xsl:when test="$format = 'ddMMyyyy'">
4134
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4135
+ <xsl:text> </xsl:text>
4136
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4137
+ </xsl:when>
4138
+ <xsl:when test="$format = 'ddMM'">
4139
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4140
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4141
+ </xsl:when>
4142
+ <xsl:when test="$format = 'short' or $day = ''">
4143
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4144
+ </xsl:when>
4145
+ <xsl:otherwise>
4146
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4147
+ </xsl:otherwise>
4148
+ </xsl:choose>
4149
+ </xsl:variable>
4150
+ <xsl:value-of select="$result"/>
4151
+ </xsl:template><xsl:template name="convertDateLocalized">
4152
+ <xsl:param name="date"/>
4153
+ <xsl:param name="format" select="'short'"/>
4154
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4155
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4156
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4157
+ <xsl:variable name="monthStr">
4158
+ <xsl:choose>
4159
+ <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>
4160
+ <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>
4161
+ <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>
4162
+ <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>
4163
+ <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>
4164
+ <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>
4165
+ <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>
4166
+ <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>
4167
+ <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>
4168
+ <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>
4169
+ <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>
4170
+ <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>
4171
+ </xsl:choose>
4172
+ </xsl:variable>
4173
+ <xsl:variable name="result">
4174
+ <xsl:choose>
4175
+ <xsl:when test="$format = 'ddMMyyyy'">
4176
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4177
+ <xsl:text> </xsl:text>
4178
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4179
+ </xsl:when>
4180
+ <xsl:when test="$format = 'ddMM'">
4181
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4182
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4183
+ </xsl:when>
4118
4184
  <xsl:when test="$format = 'short' or $day = ''">
4119
4185
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4120
4186
  </xsl:when>
@@ -4307,6 +4373,7 @@
4307
4373
  <xsl:value-of select="document('')//*/namespace::mpfd"/>
4308
4374
 
4309
4375
 
4376
+
4310
4377
  </xsl:variable>
4311
4378
  <xsl:if test="$documentNS != $XSLNS">
4312
4379
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1146,6 +1146,7 @@
1146
1146
 
1147
1147
 
1148
1148
 
1149
+
1149
1150
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1150
1151
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1151
1152
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1278,7 +1279,7 @@
1278
1279
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1279
1280
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1280
1281
  <xsl:call-template name="add-zero-spaces-java"/>
1281
- </xsl:template><xsl:template match="*[local-name()='table']">
1282
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1282
1283
 
1283
1284
  <xsl:variable name="simple-table">
1284
1285
  <xsl:call-template name="getSimpleTable"/>
@@ -2518,6 +2519,7 @@
2518
2519
 
2519
2520
 
2520
2521
 
2522
+
2521
2523
 
2522
2524
  </xsl:variable>
2523
2525
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3111,7 +3113,7 @@
3111
3113
  </xsl:if> -->
3112
3114
  </fo:inline>
3113
3115
  </xsl:if>
3114
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3116
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3115
3117
  <fo:block-container id="{@id}">
3116
3118
 
3117
3119
  <fo:block>
@@ -3318,6 +3320,12 @@
3318
3320
  <!-- <xsl:text> </xsl:text> -->
3319
3321
  </xsl:template><xsl:template name="getSection">
3320
3322
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3323
+ <!--
3324
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3325
+ <xsl:value-of select="."/>
3326
+ </xsl:for-each>
3327
+ -->
3328
+
3321
3329
  </xsl:template><xsl:template name="getName">
3322
3330
  <xsl:choose>
3323
3331
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3370,6 +3378,10 @@
3370
3378
  <xsl:copy>
3371
3379
  <xsl:apply-templates mode="contents_item"/>
3372
3380
  </xsl:copy>
3381
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3382
+ <xsl:copy>
3383
+ <xsl:apply-templates mode="contents_item"/>
3384
+ </xsl:copy>
3373
3385
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3374
3386
  <xsl:text> </xsl:text>
3375
3387
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3395,6 +3407,7 @@
3395
3407
 
3396
3408
 
3397
3409
 
3410
+
3398
3411
 
3399
3412
 
3400
3413
 
@@ -3924,6 +3937,7 @@
3924
3937
 
3925
3938
 
3926
3939
 
3940
+
3927
3941
 
3928
3942
 
3929
3943
 
@@ -3935,7 +3949,7 @@
3935
3949
 
3936
3950
 
3937
3951
 
3938
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3952
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
3939
3953
  <fo:block break-after="page"/>
3940
3954
  <fo:block>
3941
3955
  <xsl:call-template name="setId"/>
@@ -3943,7 +3957,8 @@
3943
3957
  </fo:block>
3944
3958
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3945
3959
  <fo:block>
3946
- <xsl:call-template name="setId"/>
3960
+ <xsl:call-template name="setId"/>
3961
+
3947
3962
 
3948
3963
  <xsl:apply-templates/>
3949
3964
  </fo:block>
@@ -4115,6 +4130,57 @@
4115
4130
  </xsl:variable>
4116
4131
  <xsl:variable name="result">
4117
4132
  <xsl:choose>
4133
+ <xsl:when test="$format = 'ddMMyyyy'">
4134
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4135
+ <xsl:text> </xsl:text>
4136
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4137
+ </xsl:when>
4138
+ <xsl:when test="$format = 'ddMM'">
4139
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4140
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4141
+ </xsl:when>
4142
+ <xsl:when test="$format = 'short' or $day = ''">
4143
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4144
+ </xsl:when>
4145
+ <xsl:otherwise>
4146
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4147
+ </xsl:otherwise>
4148
+ </xsl:choose>
4149
+ </xsl:variable>
4150
+ <xsl:value-of select="$result"/>
4151
+ </xsl:template><xsl:template name="convertDateLocalized">
4152
+ <xsl:param name="date"/>
4153
+ <xsl:param name="format" select="'short'"/>
4154
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4155
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4156
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4157
+ <xsl:variable name="monthStr">
4158
+ <xsl:choose>
4159
+ <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>
4160
+ <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>
4161
+ <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>
4162
+ <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>
4163
+ <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>
4164
+ <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>
4165
+ <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>
4166
+ <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>
4167
+ <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>
4168
+ <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>
4169
+ <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>
4170
+ <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>
4171
+ </xsl:choose>
4172
+ </xsl:variable>
4173
+ <xsl:variable name="result">
4174
+ <xsl:choose>
4175
+ <xsl:when test="$format = 'ddMMyyyy'">
4176
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4177
+ <xsl:text> </xsl:text>
4178
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4179
+ </xsl:when>
4180
+ <xsl:when test="$format = 'ddMM'">
4181
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4182
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4183
+ </xsl:when>
4118
4184
  <xsl:when test="$format = 'short' or $day = ''">
4119
4185
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4120
4186
  </xsl:when>
@@ -4307,6 +4373,7 @@
4307
4373
  <xsl:value-of select="document('')//*/namespace::mpfd"/>
4308
4374
 
4309
4375
 
4376
+
4310
4377
  </xsl:variable>
4311
4378
  <xsl:if test="$documentNS != $XSLNS">
4312
4379
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1146,6 +1146,7 @@
1146
1146
 
1147
1147
 
1148
1148
 
1149
+
1149
1150
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1150
1151
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1151
1152
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1278,7 +1279,7 @@
1278
1279
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1279
1280
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1280
1281
  <xsl:call-template name="add-zero-spaces-java"/>
1281
- </xsl:template><xsl:template match="*[local-name()='table']">
1282
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1282
1283
 
1283
1284
  <xsl:variable name="simple-table">
1284
1285
  <xsl:call-template name="getSimpleTable"/>
@@ -2518,6 +2519,7 @@
2518
2519
 
2519
2520
 
2520
2521
 
2522
+
2521
2523
 
2522
2524
  </xsl:variable>
2523
2525
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3111,7 +3113,7 @@
3111
3113
  </xsl:if> -->
3112
3114
  </fo:inline>
3113
3115
  </xsl:if>
3114
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3116
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3115
3117
  <fo:block-container id="{@id}">
3116
3118
 
3117
3119
  <fo:block>
@@ -3318,6 +3320,12 @@
3318
3320
  <!-- <xsl:text> </xsl:text> -->
3319
3321
  </xsl:template><xsl:template name="getSection">
3320
3322
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3323
+ <!--
3324
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3325
+ <xsl:value-of select="."/>
3326
+ </xsl:for-each>
3327
+ -->
3328
+
3321
3329
  </xsl:template><xsl:template name="getName">
3322
3330
  <xsl:choose>
3323
3331
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3370,6 +3378,10 @@
3370
3378
  <xsl:copy>
3371
3379
  <xsl:apply-templates mode="contents_item"/>
3372
3380
  </xsl:copy>
3381
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3382
+ <xsl:copy>
3383
+ <xsl:apply-templates mode="contents_item"/>
3384
+ </xsl:copy>
3373
3385
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3374
3386
  <xsl:text> </xsl:text>
3375
3387
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3395,6 +3407,7 @@
3395
3407
 
3396
3408
 
3397
3409
 
3410
+
3398
3411
 
3399
3412
 
3400
3413
 
@@ -3924,6 +3937,7 @@
3924
3937
 
3925
3938
 
3926
3939
 
3940
+
3927
3941
 
3928
3942
 
3929
3943
 
@@ -3935,7 +3949,7 @@
3935
3949
 
3936
3950
 
3937
3951
 
3938
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3952
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
3939
3953
  <fo:block break-after="page"/>
3940
3954
  <fo:block>
3941
3955
  <xsl:call-template name="setId"/>
@@ -3943,7 +3957,8 @@
3943
3957
  </fo:block>
3944
3958
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3945
3959
  <fo:block>
3946
- <xsl:call-template name="setId"/>
3960
+ <xsl:call-template name="setId"/>
3961
+
3947
3962
 
3948
3963
  <xsl:apply-templates/>
3949
3964
  </fo:block>
@@ -4115,6 +4130,57 @@
4115
4130
  </xsl:variable>
4116
4131
  <xsl:variable name="result">
4117
4132
  <xsl:choose>
4133
+ <xsl:when test="$format = 'ddMMyyyy'">
4134
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4135
+ <xsl:text> </xsl:text>
4136
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4137
+ </xsl:when>
4138
+ <xsl:when test="$format = 'ddMM'">
4139
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4140
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4141
+ </xsl:when>
4142
+ <xsl:when test="$format = 'short' or $day = ''">
4143
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4144
+ </xsl:when>
4145
+ <xsl:otherwise>
4146
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4147
+ </xsl:otherwise>
4148
+ </xsl:choose>
4149
+ </xsl:variable>
4150
+ <xsl:value-of select="$result"/>
4151
+ </xsl:template><xsl:template name="convertDateLocalized">
4152
+ <xsl:param name="date"/>
4153
+ <xsl:param name="format" select="'short'"/>
4154
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4155
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4156
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4157
+ <xsl:variable name="monthStr">
4158
+ <xsl:choose>
4159
+ <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>
4160
+ <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>
4161
+ <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>
4162
+ <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>
4163
+ <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>
4164
+ <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>
4165
+ <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>
4166
+ <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>
4167
+ <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>
4168
+ <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>
4169
+ <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>
4170
+ <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>
4171
+ </xsl:choose>
4172
+ </xsl:variable>
4173
+ <xsl:variable name="result">
4174
+ <xsl:choose>
4175
+ <xsl:when test="$format = 'ddMMyyyy'">
4176
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4177
+ <xsl:text> </xsl:text>
4178
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4179
+ </xsl:when>
4180
+ <xsl:when test="$format = 'ddMM'">
4181
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4182
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4183
+ </xsl:when>
4118
4184
  <xsl:when test="$format = 'short' or $day = ''">
4119
4185
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4120
4186
  </xsl:when>
@@ -4307,6 +4373,7 @@
4307
4373
  <xsl:value-of select="document('')//*/namespace::mpfd"/>
4308
4374
 
4309
4375
 
4376
+
4310
4377
  </xsl:variable>
4311
4378
  <xsl:if test="$documentNS != $XSLNS">
4312
4379
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1146,6 +1146,7 @@
1146
1146
 
1147
1147
 
1148
1148
 
1149
+
1149
1150
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1150
1151
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1151
1152
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1278,7 +1279,7 @@
1278
1279
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1279
1280
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1280
1281
  <xsl:call-template name="add-zero-spaces-java"/>
1281
- </xsl:template><xsl:template match="*[local-name()='table']">
1282
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1282
1283
 
1283
1284
  <xsl:variable name="simple-table">
1284
1285
  <xsl:call-template name="getSimpleTable"/>
@@ -2518,6 +2519,7 @@
2518
2519
 
2519
2520
 
2520
2521
 
2522
+
2521
2523
 
2522
2524
  </xsl:variable>
2523
2525
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3111,7 +3113,7 @@
3111
3113
  </xsl:if> -->
3112
3114
  </fo:inline>
3113
3115
  </xsl:if>
3114
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3116
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3115
3117
  <fo:block-container id="{@id}">
3116
3118
 
3117
3119
  <fo:block>
@@ -3318,6 +3320,12 @@
3318
3320
  <!-- <xsl:text> </xsl:text> -->
3319
3321
  </xsl:template><xsl:template name="getSection">
3320
3322
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3323
+ <!--
3324
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3325
+ <xsl:value-of select="."/>
3326
+ </xsl:for-each>
3327
+ -->
3328
+
3321
3329
  </xsl:template><xsl:template name="getName">
3322
3330
  <xsl:choose>
3323
3331
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3370,6 +3378,10 @@
3370
3378
  <xsl:copy>
3371
3379
  <xsl:apply-templates mode="contents_item"/>
3372
3380
  </xsl:copy>
3381
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3382
+ <xsl:copy>
3383
+ <xsl:apply-templates mode="contents_item"/>
3384
+ </xsl:copy>
3373
3385
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3374
3386
  <xsl:text> </xsl:text>
3375
3387
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3395,6 +3407,7 @@
3395
3407
 
3396
3408
 
3397
3409
 
3410
+
3398
3411
 
3399
3412
 
3400
3413
 
@@ -3924,6 +3937,7 @@
3924
3937
 
3925
3938
 
3926
3939
 
3940
+
3927
3941
 
3928
3942
 
3929
3943
 
@@ -3935,7 +3949,7 @@
3935
3949
 
3936
3950
 
3937
3951
 
3938
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3952
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
3939
3953
  <fo:block break-after="page"/>
3940
3954
  <fo:block>
3941
3955
  <xsl:call-template name="setId"/>
@@ -3943,7 +3957,8 @@
3943
3957
  </fo:block>
3944
3958
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3945
3959
  <fo:block>
3946
- <xsl:call-template name="setId"/>
3960
+ <xsl:call-template name="setId"/>
3961
+
3947
3962
 
3948
3963
  <xsl:apply-templates/>
3949
3964
  </fo:block>
@@ -4115,6 +4130,57 @@
4115
4130
  </xsl:variable>
4116
4131
  <xsl:variable name="result">
4117
4132
  <xsl:choose>
4133
+ <xsl:when test="$format = 'ddMMyyyy'">
4134
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4135
+ <xsl:text> </xsl:text>
4136
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4137
+ </xsl:when>
4138
+ <xsl:when test="$format = 'ddMM'">
4139
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4140
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4141
+ </xsl:when>
4142
+ <xsl:when test="$format = 'short' or $day = ''">
4143
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4144
+ </xsl:when>
4145
+ <xsl:otherwise>
4146
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4147
+ </xsl:otherwise>
4148
+ </xsl:choose>
4149
+ </xsl:variable>
4150
+ <xsl:value-of select="$result"/>
4151
+ </xsl:template><xsl:template name="convertDateLocalized">
4152
+ <xsl:param name="date"/>
4153
+ <xsl:param name="format" select="'short'"/>
4154
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4155
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4156
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4157
+ <xsl:variable name="monthStr">
4158
+ <xsl:choose>
4159
+ <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>
4160
+ <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>
4161
+ <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>
4162
+ <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>
4163
+ <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>
4164
+ <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>
4165
+ <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>
4166
+ <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>
4167
+ <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>
4168
+ <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>
4169
+ <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>
4170
+ <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>
4171
+ </xsl:choose>
4172
+ </xsl:variable>
4173
+ <xsl:variable name="result">
4174
+ <xsl:choose>
4175
+ <xsl:when test="$format = 'ddMMyyyy'">
4176
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4177
+ <xsl:text> </xsl:text>
4178
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4179
+ </xsl:when>
4180
+ <xsl:when test="$format = 'ddMM'">
4181
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4182
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4183
+ </xsl:when>
4118
4184
  <xsl:when test="$format = 'short' or $day = ''">
4119
4185
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4120
4186
  </xsl:when>
@@ -4307,6 +4373,7 @@
4307
4373
  <xsl:value-of select="document('')//*/namespace::mpfd"/>
4308
4374
 
4309
4375
 
4376
+
4310
4377
  </xsl:variable>
4311
4378
  <xsl:if test="$documentNS != $XSLNS">
4312
4379
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1146,6 +1146,7 @@
1146
1146
 
1147
1147
 
1148
1148
 
1149
+
1149
1150
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1150
1151
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1151
1152
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1278,7 +1279,7 @@
1278
1279
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1279
1280
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1280
1281
  <xsl:call-template name="add-zero-spaces-java"/>
1281
- </xsl:template><xsl:template match="*[local-name()='table']">
1282
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1282
1283
 
1283
1284
  <xsl:variable name="simple-table">
1284
1285
  <xsl:call-template name="getSimpleTable"/>
@@ -2518,6 +2519,7 @@
2518
2519
 
2519
2520
 
2520
2521
 
2522
+
2521
2523
 
2522
2524
  </xsl:variable>
2523
2525
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3111,7 +3113,7 @@
3111
3113
  </xsl:if> -->
3112
3114
  </fo:inline>
3113
3115
  </xsl:if>
3114
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3116
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3115
3117
  <fo:block-container id="{@id}">
3116
3118
 
3117
3119
  <fo:block>
@@ -3318,6 +3320,12 @@
3318
3320
  <!-- <xsl:text> </xsl:text> -->
3319
3321
  </xsl:template><xsl:template name="getSection">
3320
3322
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3323
+ <!--
3324
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3325
+ <xsl:value-of select="."/>
3326
+ </xsl:for-each>
3327
+ -->
3328
+
3321
3329
  </xsl:template><xsl:template name="getName">
3322
3330
  <xsl:choose>
3323
3331
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3370,6 +3378,10 @@
3370
3378
  <xsl:copy>
3371
3379
  <xsl:apply-templates mode="contents_item"/>
3372
3380
  </xsl:copy>
3381
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3382
+ <xsl:copy>
3383
+ <xsl:apply-templates mode="contents_item"/>
3384
+ </xsl:copy>
3373
3385
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3374
3386
  <xsl:text> </xsl:text>
3375
3387
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3395,6 +3407,7 @@
3395
3407
 
3396
3408
 
3397
3409
 
3410
+
3398
3411
 
3399
3412
 
3400
3413
 
@@ -3924,6 +3937,7 @@
3924
3937
 
3925
3938
 
3926
3939
 
3940
+
3927
3941
 
3928
3942
 
3929
3943
 
@@ -3935,7 +3949,7 @@
3935
3949
 
3936
3950
 
3937
3951
 
3938
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3952
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
3939
3953
  <fo:block break-after="page"/>
3940
3954
  <fo:block>
3941
3955
  <xsl:call-template name="setId"/>
@@ -3943,7 +3957,8 @@
3943
3957
  </fo:block>
3944
3958
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3945
3959
  <fo:block>
3946
- <xsl:call-template name="setId"/>
3960
+ <xsl:call-template name="setId"/>
3961
+
3947
3962
 
3948
3963
  <xsl:apply-templates/>
3949
3964
  </fo:block>
@@ -4115,6 +4130,57 @@
4115
4130
  </xsl:variable>
4116
4131
  <xsl:variable name="result">
4117
4132
  <xsl:choose>
4133
+ <xsl:when test="$format = 'ddMMyyyy'">
4134
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4135
+ <xsl:text> </xsl:text>
4136
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4137
+ </xsl:when>
4138
+ <xsl:when test="$format = 'ddMM'">
4139
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4140
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4141
+ </xsl:when>
4142
+ <xsl:when test="$format = 'short' or $day = ''">
4143
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4144
+ </xsl:when>
4145
+ <xsl:otherwise>
4146
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4147
+ </xsl:otherwise>
4148
+ </xsl:choose>
4149
+ </xsl:variable>
4150
+ <xsl:value-of select="$result"/>
4151
+ </xsl:template><xsl:template name="convertDateLocalized">
4152
+ <xsl:param name="date"/>
4153
+ <xsl:param name="format" select="'short'"/>
4154
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4155
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4156
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4157
+ <xsl:variable name="monthStr">
4158
+ <xsl:choose>
4159
+ <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>
4160
+ <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>
4161
+ <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>
4162
+ <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>
4163
+ <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>
4164
+ <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>
4165
+ <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>
4166
+ <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>
4167
+ <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>
4168
+ <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>
4169
+ <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>
4170
+ <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>
4171
+ </xsl:choose>
4172
+ </xsl:variable>
4173
+ <xsl:variable name="result">
4174
+ <xsl:choose>
4175
+ <xsl:when test="$format = 'ddMMyyyy'">
4176
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4177
+ <xsl:text> </xsl:text>
4178
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4179
+ </xsl:when>
4180
+ <xsl:when test="$format = 'ddMM'">
4181
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4182
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4183
+ </xsl:when>
4118
4184
  <xsl:when test="$format = 'short' or $day = ''">
4119
4185
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4120
4186
  </xsl:when>
@@ -4307,6 +4373,7 @@
4307
4373
  <xsl:value-of select="document('')//*/namespace::mpfd"/>
4308
4374
 
4309
4375
 
4376
+
4310
4377
  </xsl:variable>
4311
4378
  <xsl:if test="$documentNS != $XSLNS">
4312
4379
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -16,8 +16,8 @@ module IsoDoc
16
16
 
17
17
  def default_fonts(options)
18
18
  {
19
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Arial",sans-serif'),
20
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Arial",sans-serif'),
19
+ bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' : '"Arial",sans-serif'),
20
+ headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' : '"Arial",sans-serif'),
21
21
  monospacefont: '"Courier New",monospace',
22
22
  normalfontsize: "10.5pt",
23
23
  monospacefontsize: "10.0pt",
@@ -21,6 +21,7 @@ module Metanorma
21
21
  def fonts_manifest
22
22
  {
23
23
  "Arial" => nil,
24
+ "Source Han Sans" => nil,
24
25
  "STIX Two Math" => nil,
25
26
  }
26
27
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module MPFA
3
- VERSION = "0.5.11"
3
+ VERSION = "0.5.12"
4
4
  end
5
5
  end
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
31
  spec.add_dependency "htmlentities", "~> 4.3.4"
32
- spec.add_dependency "metanorma-standoc", "~> 1.7.0"
33
- spec.add_dependency "isodoc", "~> 1.4.2"
32
+ spec.add_dependency "metanorma-standoc", "~> 1.8.0"
33
+ spec.add_dependency "isodoc", "~> 1.5.0"
34
34
  spec.add_dependency "twitter_cldr"
35
35
 
36
36
  spec.add_development_dependency "byebug", "~> 9.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-mpfa
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: htmlentities
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.7.0
33
+ version: 1.8.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.7.0
40
+ version: 1.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: isodoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.4.2
47
+ version: 1.5.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.4.2
54
+ version: 1.5.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: twitter_cldr
57
57
  requirement: !ruby/object:Gem::Requirement