metanorma-bipm 2.0.7 → 2.0.8
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 +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +73 -13
- data/lib/isodoc/bipm/bipm.guide.xsl +73 -13
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +73 -13
- data/lib/isodoc/bipm/bipm.rapport.xsl +73 -13
- data/lib/isodoc/bipm/jcgm.standard.xsl +73 -13
- data/lib/metanorma/bipm/biblio.rng +25 -2
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33196837871392a573466c7460c01dd6d1609fc0680c7f281f86f7f32ffb140a
|
4
|
+
data.tar.gz: e220e419305c88f6bd3a8bd90ae12896f551faf2fb105fa6549e2510a22ef56a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f57935c7da50a72a2ab1b6a26d32cb51c80f0024a308a579e0832274f7dd205a07f1d2322886250d41e9a859c8d43bf42ada50f3127576484a4267bc089c62b
|
7
|
+
data.tar.gz: 3a8d5a538ca694c173af2d40bfb1722fc7626f5c6d169542b02287c8ea213e46abcf5e6ba1b12bc12c171beee463c5ee0ffd3f70879d2e133b7670721a14affc
|
@@ -220,7 +220,13 @@
|
|
220
220
|
|
221
221
|
|
222
222
|
<xsl:template match="/">
|
223
|
-
<fo:root
|
223
|
+
<fo:root xml:lang="{$lang}">
|
224
|
+
<xsl:variable name="root-style">
|
225
|
+
<root-style xsl:use-attribute-sets="root-style"/>
|
226
|
+
</xsl:variable>
|
227
|
+
<xsl:call-template name="insertRootStyle">
|
228
|
+
<xsl:with-param name="root-style" select="$root-style"/>
|
229
|
+
</xsl:call-template>
|
224
230
|
<fo:layout-master-set>
|
225
231
|
|
226
232
|
<!-- blank page -->
|
@@ -4070,7 +4076,30 @@
|
|
4070
4076
|
|
4071
4077
|
|
4072
4078
|
|
4073
|
-
</xsl:attribute-set><xsl:
|
4079
|
+
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
4080
|
+
<xsl:param name="root-style"/>
|
4081
|
+
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4082
|
+
|
4083
|
+
<xsl:variable name="additional_fonts_">
|
4084
|
+
<xsl:for-each select="//*[local-name() = 'misc-container'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
4085
|
+
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4086
|
+
</xsl:for-each>
|
4087
|
+
</xsl:variable>
|
4088
|
+
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
4089
|
+
|
4090
|
+
<xsl:for-each select="$root-style_/root-style/@*">
|
4091
|
+
<xsl:choose>
|
4092
|
+
<xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
|
4093
|
+
<xsl:attribute name="{local-name()}">
|
4094
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
4095
|
+
</xsl:attribute>
|
4096
|
+
</xsl:when>
|
4097
|
+
<xsl:otherwise>
|
4098
|
+
<xsl:copy-of select="."/>
|
4099
|
+
</xsl:otherwise>
|
4100
|
+
</xsl:choose>
|
4101
|
+
</xsl:for-each>
|
4102
|
+
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
4074
4103
|
|
4075
4104
|
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
|
4076
4105
|
|
@@ -4589,7 +4618,7 @@
|
|
4589
4618
|
|
4590
4619
|
|
4591
4620
|
|
4592
|
-
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4621
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4593
4622
|
|
4594
4623
|
|
4595
4624
|
|
@@ -7064,24 +7093,28 @@
|
|
7064
7093
|
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
7065
7094
|
<xsl:param name="text" select="."/>
|
7066
7095
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
7096
|
+
<xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
|
7067
7097
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
7098
|
+
<xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
|
7068
7099
|
<xsl:variable name="zero-space"></xsl:variable>
|
7069
7100
|
<xsl:choose>
|
7070
7101
|
<xsl:when test="contains($text, $zero-space-after-equals)">
|
7071
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7102
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7072
7103
|
<xsl:value-of select="$zero-space-after-equals"/>
|
7073
7104
|
<xsl:value-of select="$zero-space"/>
|
7074
7105
|
<xsl:call-template name="add-zero-spaces-equal">
|
7075
7106
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
7076
|
-
</xsl:call-template>
|
7107
|
+
</xsl:call-template> -->
|
7108
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
|
7077
7109
|
</xsl:when>
|
7078
7110
|
<xsl:when test="contains($text, $zero-space-after-equal)">
|
7079
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7111
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7080
7112
|
<xsl:value-of select="$zero-space-after-equal"/>
|
7081
7113
|
<xsl:value-of select="$zero-space"/>
|
7082
7114
|
<xsl:call-template name="add-zero-spaces-equal">
|
7083
7115
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
7084
|
-
</xsl:call-template>
|
7116
|
+
</xsl:call-template> -->
|
7117
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
|
7085
7118
|
</xsl:when>
|
7086
7119
|
<xsl:otherwise>
|
7087
7120
|
<xsl:value-of select="$text"/>
|
@@ -7595,7 +7628,12 @@
|
|
7595
7628
|
|
7596
7629
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
7597
7630
|
|
7631
|
+
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
7632
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
7633
|
+
</xsl:if>
|
7634
|
+
|
7598
7635
|
|
7636
|
+
|
7599
7637
|
|
7600
7638
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7601
7639
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
@@ -8595,17 +8633,15 @@
|
|
8595
8633
|
|
8596
8634
|
<!-- split text by zero-width space -->
|
8597
8635
|
<xsl:variable name="text_step4">
|
8598
|
-
<xsl:call-template name="
|
8636
|
+
<xsl:call-template name="split_for_interspers">
|
8599
8637
|
<xsl:with-param name="pText" select="$text_step3"/>
|
8600
8638
|
<xsl:with-param name="sep" select="$zero_width_space"/>
|
8601
|
-
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
8602
|
-
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
8603
8639
|
</xsl:call-template>
|
8604
8640
|
</xsl:variable>
|
8605
8641
|
|
8606
|
-
<xsl:for-each select="xalan:nodeset($text_step4)/
|
8642
|
+
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
8607
8643
|
<xsl:choose>
|
8608
|
-
<xsl:when test="
|
8644
|
+
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
8609
8645
|
<xsl:call-template name="interspers">
|
8610
8646
|
<xsl:with-param name="str" select="."/>
|
8611
8647
|
</xsl:call-template>
|
@@ -8616,6 +8652,30 @@
|
|
8616
8652
|
</xsl:choose>
|
8617
8653
|
</xsl:for-each>
|
8618
8654
|
|
8655
|
+
</xsl:template><xsl:variable name="interspers_tag_open">###interspers123###</xsl:variable><xsl:variable name="interspers_tag_close">###/interspers123###</xsl:variable><xsl:template name="split_for_interspers">
|
8656
|
+
<xsl:param name="pText" select="."/>
|
8657
|
+
<xsl:param name="sep" select="','"/>
|
8658
|
+
<!-- word with length more than 30 will be interspersed with zero-width space -->
|
8659
|
+
<xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
|
8660
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
|
8661
|
+
<xsl:call-template name="replace_tag_interspers">
|
8662
|
+
<xsl:with-param name="text" select="$text"/>
|
8663
|
+
</xsl:call-template>
|
8664
|
+
</xsl:template><xsl:template name="replace_tag_interspers">
|
8665
|
+
<xsl:param name="text"/>
|
8666
|
+
<xsl:choose>
|
8667
|
+
<xsl:when test="contains($text, $interspers_tag_open)">
|
8668
|
+
<xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
|
8669
|
+
<xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
|
8670
|
+
<interspers>
|
8671
|
+
<xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
|
8672
|
+
</interspers>
|
8673
|
+
<xsl:call-template name="replace_tag_interspers">
|
8674
|
+
<xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
|
8675
|
+
</xsl:call-template>
|
8676
|
+
</xsl:when>
|
8677
|
+
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
8678
|
+
</xsl:choose>
|
8619
8679
|
</xsl:template><xsl:template name="interspers">
|
8620
8680
|
<xsl:param name="str"/>
|
8621
8681
|
<xsl:param name="char" select="$zero_width_space"/>
|
@@ -9063,7 +9123,7 @@
|
|
9063
9123
|
</xsl:otherwise>
|
9064
9124
|
</xsl:choose> -->
|
9065
9125
|
</fo:block>
|
9066
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
|
9126
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
9067
9127
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
9068
9128
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
9069
9129
|
<xsl:if test="normalize-space() != ''">
|
@@ -220,7 +220,13 @@
|
|
220
220
|
|
221
221
|
|
222
222
|
<xsl:template match="/">
|
223
|
-
<fo:root
|
223
|
+
<fo:root xml:lang="{$lang}">
|
224
|
+
<xsl:variable name="root-style">
|
225
|
+
<root-style xsl:use-attribute-sets="root-style"/>
|
226
|
+
</xsl:variable>
|
227
|
+
<xsl:call-template name="insertRootStyle">
|
228
|
+
<xsl:with-param name="root-style" select="$root-style"/>
|
229
|
+
</xsl:call-template>
|
224
230
|
<fo:layout-master-set>
|
225
231
|
|
226
232
|
<!-- blank page -->
|
@@ -4070,7 +4076,30 @@
|
|
4070
4076
|
|
4071
4077
|
|
4072
4078
|
|
4073
|
-
</xsl:attribute-set><xsl:
|
4079
|
+
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
4080
|
+
<xsl:param name="root-style"/>
|
4081
|
+
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4082
|
+
|
4083
|
+
<xsl:variable name="additional_fonts_">
|
4084
|
+
<xsl:for-each select="//*[local-name() = 'misc-container'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
4085
|
+
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4086
|
+
</xsl:for-each>
|
4087
|
+
</xsl:variable>
|
4088
|
+
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
4089
|
+
|
4090
|
+
<xsl:for-each select="$root-style_/root-style/@*">
|
4091
|
+
<xsl:choose>
|
4092
|
+
<xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
|
4093
|
+
<xsl:attribute name="{local-name()}">
|
4094
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
4095
|
+
</xsl:attribute>
|
4096
|
+
</xsl:when>
|
4097
|
+
<xsl:otherwise>
|
4098
|
+
<xsl:copy-of select="."/>
|
4099
|
+
</xsl:otherwise>
|
4100
|
+
</xsl:choose>
|
4101
|
+
</xsl:for-each>
|
4102
|
+
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
4074
4103
|
|
4075
4104
|
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
|
4076
4105
|
|
@@ -4589,7 +4618,7 @@
|
|
4589
4618
|
|
4590
4619
|
|
4591
4620
|
|
4592
|
-
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4621
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4593
4622
|
|
4594
4623
|
|
4595
4624
|
|
@@ -7064,24 +7093,28 @@
|
|
7064
7093
|
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
7065
7094
|
<xsl:param name="text" select="."/>
|
7066
7095
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
7096
|
+
<xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
|
7067
7097
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
7098
|
+
<xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
|
7068
7099
|
<xsl:variable name="zero-space"></xsl:variable>
|
7069
7100
|
<xsl:choose>
|
7070
7101
|
<xsl:when test="contains($text, $zero-space-after-equals)">
|
7071
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7102
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7072
7103
|
<xsl:value-of select="$zero-space-after-equals"/>
|
7073
7104
|
<xsl:value-of select="$zero-space"/>
|
7074
7105
|
<xsl:call-template name="add-zero-spaces-equal">
|
7075
7106
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
7076
|
-
</xsl:call-template>
|
7107
|
+
</xsl:call-template> -->
|
7108
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
|
7077
7109
|
</xsl:when>
|
7078
7110
|
<xsl:when test="contains($text, $zero-space-after-equal)">
|
7079
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7111
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7080
7112
|
<xsl:value-of select="$zero-space-after-equal"/>
|
7081
7113
|
<xsl:value-of select="$zero-space"/>
|
7082
7114
|
<xsl:call-template name="add-zero-spaces-equal">
|
7083
7115
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
7084
|
-
</xsl:call-template>
|
7116
|
+
</xsl:call-template> -->
|
7117
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
|
7085
7118
|
</xsl:when>
|
7086
7119
|
<xsl:otherwise>
|
7087
7120
|
<xsl:value-of select="$text"/>
|
@@ -7595,7 +7628,12 @@
|
|
7595
7628
|
|
7596
7629
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
7597
7630
|
|
7631
|
+
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
7632
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
7633
|
+
</xsl:if>
|
7634
|
+
|
7598
7635
|
|
7636
|
+
|
7599
7637
|
|
7600
7638
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7601
7639
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
@@ -8595,17 +8633,15 @@
|
|
8595
8633
|
|
8596
8634
|
<!-- split text by zero-width space -->
|
8597
8635
|
<xsl:variable name="text_step4">
|
8598
|
-
<xsl:call-template name="
|
8636
|
+
<xsl:call-template name="split_for_interspers">
|
8599
8637
|
<xsl:with-param name="pText" select="$text_step3"/>
|
8600
8638
|
<xsl:with-param name="sep" select="$zero_width_space"/>
|
8601
|
-
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
8602
|
-
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
8603
8639
|
</xsl:call-template>
|
8604
8640
|
</xsl:variable>
|
8605
8641
|
|
8606
|
-
<xsl:for-each select="xalan:nodeset($text_step4)/
|
8642
|
+
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
8607
8643
|
<xsl:choose>
|
8608
|
-
<xsl:when test="
|
8644
|
+
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
8609
8645
|
<xsl:call-template name="interspers">
|
8610
8646
|
<xsl:with-param name="str" select="."/>
|
8611
8647
|
</xsl:call-template>
|
@@ -8616,6 +8652,30 @@
|
|
8616
8652
|
</xsl:choose>
|
8617
8653
|
</xsl:for-each>
|
8618
8654
|
|
8655
|
+
</xsl:template><xsl:variable name="interspers_tag_open">###interspers123###</xsl:variable><xsl:variable name="interspers_tag_close">###/interspers123###</xsl:variable><xsl:template name="split_for_interspers">
|
8656
|
+
<xsl:param name="pText" select="."/>
|
8657
|
+
<xsl:param name="sep" select="','"/>
|
8658
|
+
<!-- word with length more than 30 will be interspersed with zero-width space -->
|
8659
|
+
<xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
|
8660
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
|
8661
|
+
<xsl:call-template name="replace_tag_interspers">
|
8662
|
+
<xsl:with-param name="text" select="$text"/>
|
8663
|
+
</xsl:call-template>
|
8664
|
+
</xsl:template><xsl:template name="replace_tag_interspers">
|
8665
|
+
<xsl:param name="text"/>
|
8666
|
+
<xsl:choose>
|
8667
|
+
<xsl:when test="contains($text, $interspers_tag_open)">
|
8668
|
+
<xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
|
8669
|
+
<xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
|
8670
|
+
<interspers>
|
8671
|
+
<xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
|
8672
|
+
</interspers>
|
8673
|
+
<xsl:call-template name="replace_tag_interspers">
|
8674
|
+
<xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
|
8675
|
+
</xsl:call-template>
|
8676
|
+
</xsl:when>
|
8677
|
+
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
8678
|
+
</xsl:choose>
|
8619
8679
|
</xsl:template><xsl:template name="interspers">
|
8620
8680
|
<xsl:param name="str"/>
|
8621
8681
|
<xsl:param name="char" select="$zero_width_space"/>
|
@@ -9063,7 +9123,7 @@
|
|
9063
9123
|
</xsl:otherwise>
|
9064
9124
|
</xsl:choose> -->
|
9065
9125
|
</fo:block>
|
9066
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
|
9126
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
9067
9127
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
9068
9128
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
9069
9129
|
<xsl:if test="normalize-space() != ''">
|
@@ -220,7 +220,13 @@
|
|
220
220
|
|
221
221
|
|
222
222
|
<xsl:template match="/">
|
223
|
-
<fo:root
|
223
|
+
<fo:root xml:lang="{$lang}">
|
224
|
+
<xsl:variable name="root-style">
|
225
|
+
<root-style xsl:use-attribute-sets="root-style"/>
|
226
|
+
</xsl:variable>
|
227
|
+
<xsl:call-template name="insertRootStyle">
|
228
|
+
<xsl:with-param name="root-style" select="$root-style"/>
|
229
|
+
</xsl:call-template>
|
224
230
|
<fo:layout-master-set>
|
225
231
|
|
226
232
|
<!-- blank page -->
|
@@ -4070,7 +4076,30 @@
|
|
4070
4076
|
|
4071
4077
|
|
4072
4078
|
|
4073
|
-
</xsl:attribute-set><xsl:
|
4079
|
+
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
4080
|
+
<xsl:param name="root-style"/>
|
4081
|
+
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4082
|
+
|
4083
|
+
<xsl:variable name="additional_fonts_">
|
4084
|
+
<xsl:for-each select="//*[local-name() = 'misc-container'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
4085
|
+
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4086
|
+
</xsl:for-each>
|
4087
|
+
</xsl:variable>
|
4088
|
+
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
4089
|
+
|
4090
|
+
<xsl:for-each select="$root-style_/root-style/@*">
|
4091
|
+
<xsl:choose>
|
4092
|
+
<xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
|
4093
|
+
<xsl:attribute name="{local-name()}">
|
4094
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
4095
|
+
</xsl:attribute>
|
4096
|
+
</xsl:when>
|
4097
|
+
<xsl:otherwise>
|
4098
|
+
<xsl:copy-of select="."/>
|
4099
|
+
</xsl:otherwise>
|
4100
|
+
</xsl:choose>
|
4101
|
+
</xsl:for-each>
|
4102
|
+
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
4074
4103
|
|
4075
4104
|
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
|
4076
4105
|
|
@@ -4589,7 +4618,7 @@
|
|
4589
4618
|
|
4590
4619
|
|
4591
4620
|
|
4592
|
-
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4621
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4593
4622
|
|
4594
4623
|
|
4595
4624
|
|
@@ -7064,24 +7093,28 @@
|
|
7064
7093
|
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
7065
7094
|
<xsl:param name="text" select="."/>
|
7066
7095
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
7096
|
+
<xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
|
7067
7097
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
7098
|
+
<xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
|
7068
7099
|
<xsl:variable name="zero-space"></xsl:variable>
|
7069
7100
|
<xsl:choose>
|
7070
7101
|
<xsl:when test="contains($text, $zero-space-after-equals)">
|
7071
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7102
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7072
7103
|
<xsl:value-of select="$zero-space-after-equals"/>
|
7073
7104
|
<xsl:value-of select="$zero-space"/>
|
7074
7105
|
<xsl:call-template name="add-zero-spaces-equal">
|
7075
7106
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
7076
|
-
</xsl:call-template>
|
7107
|
+
</xsl:call-template> -->
|
7108
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
|
7077
7109
|
</xsl:when>
|
7078
7110
|
<xsl:when test="contains($text, $zero-space-after-equal)">
|
7079
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7111
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7080
7112
|
<xsl:value-of select="$zero-space-after-equal"/>
|
7081
7113
|
<xsl:value-of select="$zero-space"/>
|
7082
7114
|
<xsl:call-template name="add-zero-spaces-equal">
|
7083
7115
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
7084
|
-
</xsl:call-template>
|
7116
|
+
</xsl:call-template> -->
|
7117
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
|
7085
7118
|
</xsl:when>
|
7086
7119
|
<xsl:otherwise>
|
7087
7120
|
<xsl:value-of select="$text"/>
|
@@ -7595,7 +7628,12 @@
|
|
7595
7628
|
|
7596
7629
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
7597
7630
|
|
7631
|
+
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
7632
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
7633
|
+
</xsl:if>
|
7634
|
+
|
7598
7635
|
|
7636
|
+
|
7599
7637
|
|
7600
7638
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7601
7639
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
@@ -8595,17 +8633,15 @@
|
|
8595
8633
|
|
8596
8634
|
<!-- split text by zero-width space -->
|
8597
8635
|
<xsl:variable name="text_step4">
|
8598
|
-
<xsl:call-template name="
|
8636
|
+
<xsl:call-template name="split_for_interspers">
|
8599
8637
|
<xsl:with-param name="pText" select="$text_step3"/>
|
8600
8638
|
<xsl:with-param name="sep" select="$zero_width_space"/>
|
8601
|
-
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
8602
|
-
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
8603
8639
|
</xsl:call-template>
|
8604
8640
|
</xsl:variable>
|
8605
8641
|
|
8606
|
-
<xsl:for-each select="xalan:nodeset($text_step4)/
|
8642
|
+
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
8607
8643
|
<xsl:choose>
|
8608
|
-
<xsl:when test="
|
8644
|
+
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
8609
8645
|
<xsl:call-template name="interspers">
|
8610
8646
|
<xsl:with-param name="str" select="."/>
|
8611
8647
|
</xsl:call-template>
|
@@ -8616,6 +8652,30 @@
|
|
8616
8652
|
</xsl:choose>
|
8617
8653
|
</xsl:for-each>
|
8618
8654
|
|
8655
|
+
</xsl:template><xsl:variable name="interspers_tag_open">###interspers123###</xsl:variable><xsl:variable name="interspers_tag_close">###/interspers123###</xsl:variable><xsl:template name="split_for_interspers">
|
8656
|
+
<xsl:param name="pText" select="."/>
|
8657
|
+
<xsl:param name="sep" select="','"/>
|
8658
|
+
<!-- word with length more than 30 will be interspersed with zero-width space -->
|
8659
|
+
<xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
|
8660
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
|
8661
|
+
<xsl:call-template name="replace_tag_interspers">
|
8662
|
+
<xsl:with-param name="text" select="$text"/>
|
8663
|
+
</xsl:call-template>
|
8664
|
+
</xsl:template><xsl:template name="replace_tag_interspers">
|
8665
|
+
<xsl:param name="text"/>
|
8666
|
+
<xsl:choose>
|
8667
|
+
<xsl:when test="contains($text, $interspers_tag_open)">
|
8668
|
+
<xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
|
8669
|
+
<xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
|
8670
|
+
<interspers>
|
8671
|
+
<xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
|
8672
|
+
</interspers>
|
8673
|
+
<xsl:call-template name="replace_tag_interspers">
|
8674
|
+
<xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
|
8675
|
+
</xsl:call-template>
|
8676
|
+
</xsl:when>
|
8677
|
+
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
8678
|
+
</xsl:choose>
|
8619
8679
|
</xsl:template><xsl:template name="interspers">
|
8620
8680
|
<xsl:param name="str"/>
|
8621
8681
|
<xsl:param name="char" select="$zero_width_space"/>
|
@@ -9063,7 +9123,7 @@
|
|
9063
9123
|
</xsl:otherwise>
|
9064
9124
|
</xsl:choose> -->
|
9065
9125
|
</fo:block>
|
9066
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
|
9126
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
9067
9127
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
9068
9128
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
9069
9129
|
<xsl:if test="normalize-space() != ''">
|
@@ -220,7 +220,13 @@
|
|
220
220
|
|
221
221
|
|
222
222
|
<xsl:template match="/">
|
223
|
-
<fo:root
|
223
|
+
<fo:root xml:lang="{$lang}">
|
224
|
+
<xsl:variable name="root-style">
|
225
|
+
<root-style xsl:use-attribute-sets="root-style"/>
|
226
|
+
</xsl:variable>
|
227
|
+
<xsl:call-template name="insertRootStyle">
|
228
|
+
<xsl:with-param name="root-style" select="$root-style"/>
|
229
|
+
</xsl:call-template>
|
224
230
|
<fo:layout-master-set>
|
225
231
|
|
226
232
|
<!-- blank page -->
|
@@ -4070,7 +4076,30 @@
|
|
4070
4076
|
|
4071
4077
|
|
4072
4078
|
|
4073
|
-
</xsl:attribute-set><xsl:
|
4079
|
+
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
4080
|
+
<xsl:param name="root-style"/>
|
4081
|
+
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4082
|
+
|
4083
|
+
<xsl:variable name="additional_fonts_">
|
4084
|
+
<xsl:for-each select="//*[local-name() = 'misc-container'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
4085
|
+
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4086
|
+
</xsl:for-each>
|
4087
|
+
</xsl:variable>
|
4088
|
+
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
4089
|
+
|
4090
|
+
<xsl:for-each select="$root-style_/root-style/@*">
|
4091
|
+
<xsl:choose>
|
4092
|
+
<xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
|
4093
|
+
<xsl:attribute name="{local-name()}">
|
4094
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
4095
|
+
</xsl:attribute>
|
4096
|
+
</xsl:when>
|
4097
|
+
<xsl:otherwise>
|
4098
|
+
<xsl:copy-of select="."/>
|
4099
|
+
</xsl:otherwise>
|
4100
|
+
</xsl:choose>
|
4101
|
+
</xsl:for-each>
|
4102
|
+
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
4074
4103
|
|
4075
4104
|
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
|
4076
4105
|
|
@@ -4589,7 +4618,7 @@
|
|
4589
4618
|
|
4590
4619
|
|
4591
4620
|
|
4592
|
-
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4621
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4593
4622
|
|
4594
4623
|
|
4595
4624
|
|
@@ -7064,24 +7093,28 @@
|
|
7064
7093
|
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
7065
7094
|
<xsl:param name="text" select="."/>
|
7066
7095
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
7096
|
+
<xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
|
7067
7097
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
7098
|
+
<xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
|
7068
7099
|
<xsl:variable name="zero-space"></xsl:variable>
|
7069
7100
|
<xsl:choose>
|
7070
7101
|
<xsl:when test="contains($text, $zero-space-after-equals)">
|
7071
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7102
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
7072
7103
|
<xsl:value-of select="$zero-space-after-equals"/>
|
7073
7104
|
<xsl:value-of select="$zero-space"/>
|
7074
7105
|
<xsl:call-template name="add-zero-spaces-equal">
|
7075
7106
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
7076
|
-
</xsl:call-template>
|
7107
|
+
</xsl:call-template> -->
|
7108
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
|
7077
7109
|
</xsl:when>
|
7078
7110
|
<xsl:when test="contains($text, $zero-space-after-equal)">
|
7079
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7111
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
7080
7112
|
<xsl:value-of select="$zero-space-after-equal"/>
|
7081
7113
|
<xsl:value-of select="$zero-space"/>
|
7082
7114
|
<xsl:call-template name="add-zero-spaces-equal">
|
7083
7115
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
7084
|
-
</xsl:call-template>
|
7116
|
+
</xsl:call-template> -->
|
7117
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
|
7085
7118
|
</xsl:when>
|
7086
7119
|
<xsl:otherwise>
|
7087
7120
|
<xsl:value-of select="$text"/>
|
@@ -7595,7 +7628,12 @@
|
|
7595
7628
|
|
7596
7629
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
7597
7630
|
|
7631
|
+
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
7632
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
7633
|
+
</xsl:if>
|
7634
|
+
|
7598
7635
|
|
7636
|
+
|
7599
7637
|
|
7600
7638
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7601
7639
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
@@ -8595,17 +8633,15 @@
|
|
8595
8633
|
|
8596
8634
|
<!-- split text by zero-width space -->
|
8597
8635
|
<xsl:variable name="text_step4">
|
8598
|
-
<xsl:call-template name="
|
8636
|
+
<xsl:call-template name="split_for_interspers">
|
8599
8637
|
<xsl:with-param name="pText" select="$text_step3"/>
|
8600
8638
|
<xsl:with-param name="sep" select="$zero_width_space"/>
|
8601
|
-
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
8602
|
-
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
8603
8639
|
</xsl:call-template>
|
8604
8640
|
</xsl:variable>
|
8605
8641
|
|
8606
|
-
<xsl:for-each select="xalan:nodeset($text_step4)/
|
8642
|
+
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
8607
8643
|
<xsl:choose>
|
8608
|
-
<xsl:when test="
|
8644
|
+
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
8609
8645
|
<xsl:call-template name="interspers">
|
8610
8646
|
<xsl:with-param name="str" select="."/>
|
8611
8647
|
</xsl:call-template>
|
@@ -8616,6 +8652,30 @@
|
|
8616
8652
|
</xsl:choose>
|
8617
8653
|
</xsl:for-each>
|
8618
8654
|
|
8655
|
+
</xsl:template><xsl:variable name="interspers_tag_open">###interspers123###</xsl:variable><xsl:variable name="interspers_tag_close">###/interspers123###</xsl:variable><xsl:template name="split_for_interspers">
|
8656
|
+
<xsl:param name="pText" select="."/>
|
8657
|
+
<xsl:param name="sep" select="','"/>
|
8658
|
+
<!-- word with length more than 30 will be interspersed with zero-width space -->
|
8659
|
+
<xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
|
8660
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
|
8661
|
+
<xsl:call-template name="replace_tag_interspers">
|
8662
|
+
<xsl:with-param name="text" select="$text"/>
|
8663
|
+
</xsl:call-template>
|
8664
|
+
</xsl:template><xsl:template name="replace_tag_interspers">
|
8665
|
+
<xsl:param name="text"/>
|
8666
|
+
<xsl:choose>
|
8667
|
+
<xsl:when test="contains($text, $interspers_tag_open)">
|
8668
|
+
<xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
|
8669
|
+
<xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
|
8670
|
+
<interspers>
|
8671
|
+
<xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
|
8672
|
+
</interspers>
|
8673
|
+
<xsl:call-template name="replace_tag_interspers">
|
8674
|
+
<xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
|
8675
|
+
</xsl:call-template>
|
8676
|
+
</xsl:when>
|
8677
|
+
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
8678
|
+
</xsl:choose>
|
8619
8679
|
</xsl:template><xsl:template name="interspers">
|
8620
8680
|
<xsl:param name="str"/>
|
8621
8681
|
<xsl:param name="char" select="$zero_width_space"/>
|
@@ -9063,7 +9123,7 @@
|
|
9063
9123
|
</xsl:otherwise>
|
9064
9124
|
</xsl:choose> -->
|
9065
9125
|
</fo:block>
|
9066
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
|
9126
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
9067
9127
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
9068
9128
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
9069
9129
|
<xsl:if test="normalize-space() != ''">
|
@@ -155,7 +155,13 @@
|
|
155
155
|
|
156
156
|
|
157
157
|
<xsl:template match="/">
|
158
|
-
<fo:root
|
158
|
+
<fo:root xml:lang="{$lang}">
|
159
|
+
<xsl:variable name="root-style">
|
160
|
+
<root-style xsl:use-attribute-sets="root-style"/>
|
161
|
+
</xsl:variable>
|
162
|
+
<xsl:call-template name="insertRootStyle">
|
163
|
+
<xsl:with-param name="root-style" select="$root-style"/>
|
164
|
+
</xsl:call-template>
|
159
165
|
<fo:layout-master-set>
|
160
166
|
<!-- cover page -->
|
161
167
|
<fo:simple-page-master master-name="cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
@@ -1910,7 +1916,30 @@
|
|
1910
1916
|
|
1911
1917
|
|
1912
1918
|
|
1913
|
-
</xsl:attribute-set><xsl:
|
1919
|
+
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
1920
|
+
<xsl:param name="root-style"/>
|
1921
|
+
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1922
|
+
|
1923
|
+
<xsl:variable name="additional_fonts_">
|
1924
|
+
<xsl:for-each select="//*[local-name() = 'misc-container'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
1925
|
+
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1926
|
+
</xsl:for-each>
|
1927
|
+
</xsl:variable>
|
1928
|
+
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
1929
|
+
|
1930
|
+
<xsl:for-each select="$root-style_/root-style/@*">
|
1931
|
+
<xsl:choose>
|
1932
|
+
<xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
|
1933
|
+
<xsl:attribute name="{local-name()}">
|
1934
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
1935
|
+
</xsl:attribute>
|
1936
|
+
</xsl:when>
|
1937
|
+
<xsl:otherwise>
|
1938
|
+
<xsl:copy-of select="."/>
|
1939
|
+
</xsl:otherwise>
|
1940
|
+
</xsl:choose>
|
1941
|
+
</xsl:for-each>
|
1942
|
+
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
1914
1943
|
|
1915
1944
|
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
|
1916
1945
|
|
@@ -2451,7 +2480,7 @@
|
|
2451
2480
|
|
2452
2481
|
|
2453
2482
|
|
2454
|
-
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2483
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2455
2484
|
|
2456
2485
|
|
2457
2486
|
|
@@ -4916,24 +4945,28 @@
|
|
4916
4945
|
</xsl:template><xsl:template name="add-zero-spaces-equal">
|
4917
4946
|
<xsl:param name="text" select="."/>
|
4918
4947
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
4948
|
+
<xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
|
4919
4949
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
4950
|
+
<xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
|
4920
4951
|
<xsl:variable name="zero-space"></xsl:variable>
|
4921
4952
|
<xsl:choose>
|
4922
4953
|
<xsl:when test="contains($text, $zero-space-after-equals)">
|
4923
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
4954
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
4924
4955
|
<xsl:value-of select="$zero-space-after-equals"/>
|
4925
4956
|
<xsl:value-of select="$zero-space"/>
|
4926
4957
|
<xsl:call-template name="add-zero-spaces-equal">
|
4927
4958
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
4928
|
-
</xsl:call-template>
|
4959
|
+
</xsl:call-template> -->
|
4960
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
|
4929
4961
|
</xsl:when>
|
4930
4962
|
<xsl:when test="contains($text, $zero-space-after-equal)">
|
4931
|
-
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
4963
|
+
<!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
4932
4964
|
<xsl:value-of select="$zero-space-after-equal"/>
|
4933
4965
|
<xsl:value-of select="$zero-space"/>
|
4934
4966
|
<xsl:call-template name="add-zero-spaces-equal">
|
4935
4967
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
4936
|
-
</xsl:call-template>
|
4968
|
+
</xsl:call-template> -->
|
4969
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
|
4937
4970
|
</xsl:when>
|
4938
4971
|
<xsl:otherwise>
|
4939
4972
|
<xsl:value-of select="$text"/>
|
@@ -5409,7 +5442,12 @@
|
|
5409
5442
|
|
5410
5443
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
5411
5444
|
|
5445
|
+
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
5446
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5447
|
+
</xsl:if>
|
5448
|
+
|
5412
5449
|
|
5450
|
+
|
5413
5451
|
|
5414
5452
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5415
5453
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
@@ -6389,17 +6427,15 @@
|
|
6389
6427
|
|
6390
6428
|
<!-- split text by zero-width space -->
|
6391
6429
|
<xsl:variable name="text_step4">
|
6392
|
-
<xsl:call-template name="
|
6430
|
+
<xsl:call-template name="split_for_interspers">
|
6393
6431
|
<xsl:with-param name="pText" select="$text_step3"/>
|
6394
6432
|
<xsl:with-param name="sep" select="$zero_width_space"/>
|
6395
|
-
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
6396
|
-
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
6397
6433
|
</xsl:call-template>
|
6398
6434
|
</xsl:variable>
|
6399
6435
|
|
6400
|
-
<xsl:for-each select="xalan:nodeset($text_step4)/
|
6436
|
+
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
6401
6437
|
<xsl:choose>
|
6402
|
-
<xsl:when test="
|
6438
|
+
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
6403
6439
|
<xsl:call-template name="interspers">
|
6404
6440
|
<xsl:with-param name="str" select="."/>
|
6405
6441
|
</xsl:call-template>
|
@@ -6410,6 +6446,30 @@
|
|
6410
6446
|
</xsl:choose>
|
6411
6447
|
</xsl:for-each>
|
6412
6448
|
|
6449
|
+
</xsl:template><xsl:variable name="interspers_tag_open">###interspers123###</xsl:variable><xsl:variable name="interspers_tag_close">###/interspers123###</xsl:variable><xsl:template name="split_for_interspers">
|
6450
|
+
<xsl:param name="pText" select="."/>
|
6451
|
+
<xsl:param name="sep" select="','"/>
|
6452
|
+
<!-- word with length more than 30 will be interspersed with zero-width space -->
|
6453
|
+
<xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
|
6454
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
|
6455
|
+
<xsl:call-template name="replace_tag_interspers">
|
6456
|
+
<xsl:with-param name="text" select="$text"/>
|
6457
|
+
</xsl:call-template>
|
6458
|
+
</xsl:template><xsl:template name="replace_tag_interspers">
|
6459
|
+
<xsl:param name="text"/>
|
6460
|
+
<xsl:choose>
|
6461
|
+
<xsl:when test="contains($text, $interspers_tag_open)">
|
6462
|
+
<xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
|
6463
|
+
<xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
|
6464
|
+
<interspers>
|
6465
|
+
<xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
|
6466
|
+
</interspers>
|
6467
|
+
<xsl:call-template name="replace_tag_interspers">
|
6468
|
+
<xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
|
6469
|
+
</xsl:call-template>
|
6470
|
+
</xsl:when>
|
6471
|
+
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
6472
|
+
</xsl:choose>
|
6413
6473
|
</xsl:template><xsl:template name="interspers">
|
6414
6474
|
<xsl:param name="str"/>
|
6415
6475
|
<xsl:param name="char" select="$zero_width_space"/>
|
@@ -6862,7 +6922,7 @@
|
|
6862
6922
|
</xsl:otherwise>
|
6863
6923
|
</xsl:choose> -->
|
6864
6924
|
</fo:block>
|
6865
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
|
6925
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
6866
6926
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
6867
6927
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
6868
6928
|
<xsl:if test="normalize-space() != ''">
|
@@ -527,7 +527,7 @@
|
|
527
527
|
</define>
|
528
528
|
<define name="LocalityType">
|
529
529
|
<data type="string">
|
530
|
-
<param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
|
530
|
+
<param name="pattern">section|clause|part|paragraph|chapter|page|title|line|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
|
531
531
|
</data>
|
532
532
|
</define>
|
533
533
|
<define name="referenceFrom">
|
@@ -677,6 +677,9 @@
|
|
677
677
|
<zeroOrMore>
|
678
678
|
<ref name="extent"/>
|
679
679
|
</zeroOrMore>
|
680
|
+
<optional>
|
681
|
+
<ref name="bibliographic_size"/>
|
682
|
+
</optional>
|
680
683
|
<zeroOrMore>
|
681
684
|
<ref name="accesslocation"/>
|
682
685
|
</zeroOrMore>
|
@@ -922,9 +925,29 @@
|
|
922
925
|
<text/>
|
923
926
|
</element>
|
924
927
|
</define>
|
928
|
+
<define name="sizevalue">
|
929
|
+
<element name="value">
|
930
|
+
<attribute name="type"/>
|
931
|
+
<text/>
|
932
|
+
</element>
|
933
|
+
</define>
|
934
|
+
<define name="bibliographic_size">
|
935
|
+
<element name="size">
|
936
|
+
<oneOrMore>
|
937
|
+
<ref name="sizevalue"/>
|
938
|
+
</oneOrMore>
|
939
|
+
</element>
|
940
|
+
</define>
|
925
941
|
<define name="extent">
|
926
942
|
<element name="extent">
|
927
|
-
<
|
943
|
+
<choice>
|
944
|
+
<zeroOrMore>
|
945
|
+
<ref name="locality"/>
|
946
|
+
</zeroOrMore>
|
947
|
+
<zeroOrMore>
|
948
|
+
<ref name="localityStack"/>
|
949
|
+
</zeroOrMore>
|
950
|
+
</choice>
|
928
951
|
</element>
|
929
952
|
</define>
|
930
953
|
<define name="series">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|