metanorma-bipm 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8dff3644b6a7bc5b5b9c7ba7307fa7cf4398ac4c73eafdb421c7690d5896f71
4
- data.tar.gz: 944cd9ec5b7dabffbbf1482fc096af46f288aac9f95391cb154b63348488e34a
3
+ metadata.gz: a37d2fd29c1b02eb058c4c0c373a9ddc7a6cf5b2ec2eec8f042b3c12ef98fe15
4
+ data.tar.gz: 2d8183dcbee89f5cf9b2f658cc7ce8fe3cbe6fdfc1d3b475ec4428dc46052c52
5
5
  SHA512:
6
- metadata.gz: 95b6ae6c56006f3d8f06501debcf646b7ee776fc6ad15ef472cfec21b66342d3f4b8c03377aa912d46e79917f32a46cd6390b1166a491a0470666d873f1607f6
7
- data.tar.gz: e6b5bc3599137ff6141448f33378a2b5fef5711d7648f2fe5358efc9263f8947fbe24f7f4758d03ed10e1632da19520cc9ef0bcadf397e3a2b8e108196d488b2
6
+ metadata.gz: aab514fe6c0f136bb64cc8a19b44b053b38ab54d9584d8f12b01c552336ff542f5f820533d8aa55c565dd52ac08fda1cd39d8a27af6b4cdc0dd9f98d7ac68872
7
+ data.tar.gz: 8b6f1adc6406fb596bac1f9525e4381e17b2701443eb158a010b988289eccb2a7fd63326d9c690b327fc3329ebb2a23be652b0e6ef3ca562a1516de376432720
@@ -64,9 +64,9 @@
64
64
  <optional>
65
65
  <ref name="label"/>
66
66
  </optional>
67
- <optional>
67
+ <zeroOrMore>
68
68
  <ref name="subject"/>
69
- </optional>
69
+ </zeroOrMore>
70
70
  <zeroOrMore>
71
71
  <ref name="reqinherit"/>
72
72
  </zeroOrMore>
@@ -80,6 +80,7 @@
80
80
  <ref name="verification"/>
81
81
  <ref name="import"/>
82
82
  <ref name="description"/>
83
+ <ref name="component"/>
83
84
  </choice>
84
85
  </zeroOrMore>
85
86
  <optional>
@@ -105,12 +106,16 @@
105
106
  </define>
106
107
  <define name="subject">
107
108
  <element name="subject">
108
- <text/>
109
+ <oneOrMore>
110
+ <ref name="TextElement"/>
111
+ </oneOrMore>
109
112
  </element>
110
113
  </define>
111
114
  <define name="reqinherit">
112
115
  <element name="inherit">
113
- <text/>
116
+ <oneOrMore>
117
+ <ref name="TextElement"/>
118
+ </oneOrMore>
114
119
  </element>
115
120
  </define>
116
121
  <define name="measurementtarget">
@@ -138,6 +143,12 @@
138
143
  <ref name="RequirementSubpart"/>
139
144
  </element>
140
145
  </define>
146
+ <define name="component">
147
+ <element name="component">
148
+ <attribute name="class"/>
149
+ <ref name="RequirementSubpart"/>
150
+ </element>
151
+ </define>
141
152
  <define name="reqt_references">
142
153
  <element name="references">
143
154
  <oneOrMore>
@@ -4563,6 +4563,7 @@
4563
4563
 
4564
4564
 
4565
4565
 
4566
+
4566
4567
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
4567
4568
 
4568
4569
 
@@ -5013,6 +5014,8 @@
5013
5014
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
5014
5015
  </xsl:if>
5015
5016
 
5017
+
5018
+
5016
5019
  <xsl:choose>
5017
5020
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
5018
5021
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -5304,9 +5307,9 @@
5304
5307
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
5305
5308
  <xsl:with-param name="continued">true</xsl:with-param>
5306
5309
  </xsl:apply-templates>
5307
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
5308
- <xsl:call-template name="fn_name_display"/>
5309
- </xsl:for-each>
5310
+
5311
+
5312
+
5310
5313
 
5311
5314
  </fo:table-cell>
5312
5315
  </fo:table-row>
@@ -5390,7 +5393,11 @@
5390
5393
 
5391
5394
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
5392
5395
 
5393
- <xsl:if test="$isNoteOrFnExist = 'true'">
5396
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
5397
+
5398
+ </xsl:variable>
5399
+
5400
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
5394
5401
 
5395
5402
  <xsl:variable name="cols-count">
5396
5403
  <xsl:choose>
@@ -5543,6 +5550,19 @@
5543
5550
 
5544
5551
  </fo:table-body>
5545
5552
 
5553
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
5554
+ <xsl:choose>
5555
+ <xsl:when test="substring-after(., '—') != ''">
5556
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
5557
+ </xsl:when>
5558
+ <xsl:otherwise>
5559
+ <xsl:value-of select="."/>
5560
+ </xsl:otherwise>
5561
+ </xsl:choose>
5562
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
5563
+ <xsl:apply-templates mode="presentation_name"/>
5564
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
5565
+ <xsl:apply-templates select="."/>
5546
5566
  </xsl:template><xsl:template match="*[local-name()='tr']">
5547
5567
  <xsl:variable name="parent-name" select="local-name(..)"/>
5548
5568
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -5781,14 +5801,12 @@
5781
5801
  <xsl:apply-templates/>
5782
5802
  </xsl:template><xsl:template name="fn_display">
5783
5803
  <xsl:variable name="references">
5804
+
5784
5805
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
5785
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5786
-
5787
-
5788
- <xsl:apply-templates/>
5789
- </fn>
5806
+ <xsl:call-template name="create_fn"/>
5790
5807
  </xsl:for-each>
5791
5808
  </xsl:variable>
5809
+
5792
5810
  <xsl:for-each select="xalan:nodeset($references)//fn">
5793
5811
  <xsl:variable name="reference" select="@reference"/>
5794
5812
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -5834,6 +5852,12 @@
5834
5852
  </fo:block>
5835
5853
  </xsl:if>
5836
5854
  </xsl:for-each>
5855
+ </xsl:template><xsl:template name="create_fn">
5856
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5857
+
5858
+
5859
+ <xsl:apply-templates/>
5860
+ </fn>
5837
5861
  </xsl:template><xsl:template name="fn_name_display">
5838
5862
  <!-- <xsl:variable name="references">
5839
5863
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -6861,19 +6885,6 @@
6861
6885
  <!-- replace start and end spaces to non-break space -->
6862
6886
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
6863
6887
  </xsl:copy>
6864
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
6865
- <xsl:copy>
6866
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
6867
- </xsl:copy>
6868
- <xsl:choose>
6869
- <!-- if in msub, then don't add space -->
6870
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
6871
- <!-- if next char in digit, don't add space -->
6872
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
6873
- <xsl:otherwise>
6874
- <mathml:mspace width="0.5ex"/>
6875
- </xsl:otherwise>
6876
- </xsl:choose>
6877
6888
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
6878
6889
  <xsl:variable name="target">
6879
6890
  <xsl:choose>
@@ -8087,7 +8098,19 @@
8087
8098
  </fo:inline>
8088
8099
  </xsl:if>
8089
8100
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
8090
- <fo:inline><xsl:apply-templates/></fo:inline>
8101
+ <xsl:variable name="element">inline
8102
+
8103
+ </xsl:variable>
8104
+ <xsl:choose>
8105
+ <xsl:when test="contains($element, 'block')">
8106
+ <fo:block xsl:use-attribute-sets="example-p-style">
8107
+ <xsl:apply-templates/>
8108
+ </fo:block>
8109
+ </xsl:when>
8110
+ <xsl:otherwise>
8111
+ <fo:inline><xsl:apply-templates/></fo:inline>
8112
+ </xsl:otherwise>
8113
+ </xsl:choose>
8091
8114
  </xsl:template><xsl:template match="*[local-name() = 'example']">
8092
8115
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
8093
8116
 
@@ -8703,8 +8726,8 @@
8703
8726
 
8704
8727
  </xsl:otherwise>
8705
8728
  </xsl:choose>
8729
+ <!-- end BIPM bibitem processing-->
8706
8730
 
8707
- <!-- end BIPM bibitem processing-->
8708
8731
 
8709
8732
 
8710
8733
 
@@ -4563,6 +4563,7 @@
4563
4563
 
4564
4564
 
4565
4565
 
4566
+
4566
4567
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
4567
4568
 
4568
4569
 
@@ -5013,6 +5014,8 @@
5013
5014
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
5014
5015
  </xsl:if>
5015
5016
 
5017
+
5018
+
5016
5019
  <xsl:choose>
5017
5020
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
5018
5021
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -5304,9 +5307,9 @@
5304
5307
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
5305
5308
  <xsl:with-param name="continued">true</xsl:with-param>
5306
5309
  </xsl:apply-templates>
5307
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
5308
- <xsl:call-template name="fn_name_display"/>
5309
- </xsl:for-each>
5310
+
5311
+
5312
+
5310
5313
 
5311
5314
  </fo:table-cell>
5312
5315
  </fo:table-row>
@@ -5390,7 +5393,11 @@
5390
5393
 
5391
5394
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
5392
5395
 
5393
- <xsl:if test="$isNoteOrFnExist = 'true'">
5396
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
5397
+
5398
+ </xsl:variable>
5399
+
5400
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
5394
5401
 
5395
5402
  <xsl:variable name="cols-count">
5396
5403
  <xsl:choose>
@@ -5543,6 +5550,19 @@
5543
5550
 
5544
5551
  </fo:table-body>
5545
5552
 
5553
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
5554
+ <xsl:choose>
5555
+ <xsl:when test="substring-after(., '—') != ''">
5556
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
5557
+ </xsl:when>
5558
+ <xsl:otherwise>
5559
+ <xsl:value-of select="."/>
5560
+ </xsl:otherwise>
5561
+ </xsl:choose>
5562
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
5563
+ <xsl:apply-templates mode="presentation_name"/>
5564
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
5565
+ <xsl:apply-templates select="."/>
5546
5566
  </xsl:template><xsl:template match="*[local-name()='tr']">
5547
5567
  <xsl:variable name="parent-name" select="local-name(..)"/>
5548
5568
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -5781,14 +5801,12 @@
5781
5801
  <xsl:apply-templates/>
5782
5802
  </xsl:template><xsl:template name="fn_display">
5783
5803
  <xsl:variable name="references">
5804
+
5784
5805
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
5785
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5786
-
5787
-
5788
- <xsl:apply-templates/>
5789
- </fn>
5806
+ <xsl:call-template name="create_fn"/>
5790
5807
  </xsl:for-each>
5791
5808
  </xsl:variable>
5809
+
5792
5810
  <xsl:for-each select="xalan:nodeset($references)//fn">
5793
5811
  <xsl:variable name="reference" select="@reference"/>
5794
5812
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -5834,6 +5852,12 @@
5834
5852
  </fo:block>
5835
5853
  </xsl:if>
5836
5854
  </xsl:for-each>
5855
+ </xsl:template><xsl:template name="create_fn">
5856
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5857
+
5858
+
5859
+ <xsl:apply-templates/>
5860
+ </fn>
5837
5861
  </xsl:template><xsl:template name="fn_name_display">
5838
5862
  <!-- <xsl:variable name="references">
5839
5863
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -6861,19 +6885,6 @@
6861
6885
  <!-- replace start and end spaces to non-break space -->
6862
6886
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
6863
6887
  </xsl:copy>
6864
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
6865
- <xsl:copy>
6866
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
6867
- </xsl:copy>
6868
- <xsl:choose>
6869
- <!-- if in msub, then don't add space -->
6870
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
6871
- <!-- if next char in digit, don't add space -->
6872
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
6873
- <xsl:otherwise>
6874
- <mathml:mspace width="0.5ex"/>
6875
- </xsl:otherwise>
6876
- </xsl:choose>
6877
6888
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
6878
6889
  <xsl:variable name="target">
6879
6890
  <xsl:choose>
@@ -8087,7 +8098,19 @@
8087
8098
  </fo:inline>
8088
8099
  </xsl:if>
8089
8100
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
8090
- <fo:inline><xsl:apply-templates/></fo:inline>
8101
+ <xsl:variable name="element">inline
8102
+
8103
+ </xsl:variable>
8104
+ <xsl:choose>
8105
+ <xsl:when test="contains($element, 'block')">
8106
+ <fo:block xsl:use-attribute-sets="example-p-style">
8107
+ <xsl:apply-templates/>
8108
+ </fo:block>
8109
+ </xsl:when>
8110
+ <xsl:otherwise>
8111
+ <fo:inline><xsl:apply-templates/></fo:inline>
8112
+ </xsl:otherwise>
8113
+ </xsl:choose>
8091
8114
  </xsl:template><xsl:template match="*[local-name() = 'example']">
8092
8115
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
8093
8116
 
@@ -8703,8 +8726,8 @@
8703
8726
 
8704
8727
  </xsl:otherwise>
8705
8728
  </xsl:choose>
8729
+ <!-- end BIPM bibitem processing-->
8706
8730
 
8707
- <!-- end BIPM bibitem processing-->
8708
8731
 
8709
8732
 
8710
8733
 
@@ -4563,6 +4563,7 @@
4563
4563
 
4564
4564
 
4565
4565
 
4566
+
4566
4567
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
4567
4568
 
4568
4569
 
@@ -5013,6 +5014,8 @@
5013
5014
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
5014
5015
  </xsl:if>
5015
5016
 
5017
+
5018
+
5016
5019
  <xsl:choose>
5017
5020
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
5018
5021
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -5304,9 +5307,9 @@
5304
5307
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
5305
5308
  <xsl:with-param name="continued">true</xsl:with-param>
5306
5309
  </xsl:apply-templates>
5307
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
5308
- <xsl:call-template name="fn_name_display"/>
5309
- </xsl:for-each>
5310
+
5311
+
5312
+
5310
5313
 
5311
5314
  </fo:table-cell>
5312
5315
  </fo:table-row>
@@ -5390,7 +5393,11 @@
5390
5393
 
5391
5394
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
5392
5395
 
5393
- <xsl:if test="$isNoteOrFnExist = 'true'">
5396
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
5397
+
5398
+ </xsl:variable>
5399
+
5400
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
5394
5401
 
5395
5402
  <xsl:variable name="cols-count">
5396
5403
  <xsl:choose>
@@ -5543,6 +5550,19 @@
5543
5550
 
5544
5551
  </fo:table-body>
5545
5552
 
5553
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
5554
+ <xsl:choose>
5555
+ <xsl:when test="substring-after(., '—') != ''">
5556
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
5557
+ </xsl:when>
5558
+ <xsl:otherwise>
5559
+ <xsl:value-of select="."/>
5560
+ </xsl:otherwise>
5561
+ </xsl:choose>
5562
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
5563
+ <xsl:apply-templates mode="presentation_name"/>
5564
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
5565
+ <xsl:apply-templates select="."/>
5546
5566
  </xsl:template><xsl:template match="*[local-name()='tr']">
5547
5567
  <xsl:variable name="parent-name" select="local-name(..)"/>
5548
5568
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -5781,14 +5801,12 @@
5781
5801
  <xsl:apply-templates/>
5782
5802
  </xsl:template><xsl:template name="fn_display">
5783
5803
  <xsl:variable name="references">
5804
+
5784
5805
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
5785
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5786
-
5787
-
5788
- <xsl:apply-templates/>
5789
- </fn>
5806
+ <xsl:call-template name="create_fn"/>
5790
5807
  </xsl:for-each>
5791
5808
  </xsl:variable>
5809
+
5792
5810
  <xsl:for-each select="xalan:nodeset($references)//fn">
5793
5811
  <xsl:variable name="reference" select="@reference"/>
5794
5812
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -5834,6 +5852,12 @@
5834
5852
  </fo:block>
5835
5853
  </xsl:if>
5836
5854
  </xsl:for-each>
5855
+ </xsl:template><xsl:template name="create_fn">
5856
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5857
+
5858
+
5859
+ <xsl:apply-templates/>
5860
+ </fn>
5837
5861
  </xsl:template><xsl:template name="fn_name_display">
5838
5862
  <!-- <xsl:variable name="references">
5839
5863
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -6861,19 +6885,6 @@
6861
6885
  <!-- replace start and end spaces to non-break space -->
6862
6886
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
6863
6887
  </xsl:copy>
6864
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
6865
- <xsl:copy>
6866
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
6867
- </xsl:copy>
6868
- <xsl:choose>
6869
- <!-- if in msub, then don't add space -->
6870
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
6871
- <!-- if next char in digit, don't add space -->
6872
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
6873
- <xsl:otherwise>
6874
- <mathml:mspace width="0.5ex"/>
6875
- </xsl:otherwise>
6876
- </xsl:choose>
6877
6888
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
6878
6889
  <xsl:variable name="target">
6879
6890
  <xsl:choose>
@@ -8087,7 +8098,19 @@
8087
8098
  </fo:inline>
8088
8099
  </xsl:if>
8089
8100
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
8090
- <fo:inline><xsl:apply-templates/></fo:inline>
8101
+ <xsl:variable name="element">inline
8102
+
8103
+ </xsl:variable>
8104
+ <xsl:choose>
8105
+ <xsl:when test="contains($element, 'block')">
8106
+ <fo:block xsl:use-attribute-sets="example-p-style">
8107
+ <xsl:apply-templates/>
8108
+ </fo:block>
8109
+ </xsl:when>
8110
+ <xsl:otherwise>
8111
+ <fo:inline><xsl:apply-templates/></fo:inline>
8112
+ </xsl:otherwise>
8113
+ </xsl:choose>
8091
8114
  </xsl:template><xsl:template match="*[local-name() = 'example']">
8092
8115
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
8093
8116
 
@@ -8703,8 +8726,8 @@
8703
8726
 
8704
8727
  </xsl:otherwise>
8705
8728
  </xsl:choose>
8729
+ <!-- end BIPM bibitem processing-->
8706
8730
 
8707
- <!-- end BIPM bibitem processing-->
8708
8731
 
8709
8732
 
8710
8733
 
@@ -4563,6 +4563,7 @@
4563
4563
 
4564
4564
 
4565
4565
 
4566
+
4566
4567
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
4567
4568
 
4568
4569
 
@@ -5013,6 +5014,8 @@
5013
5014
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
5014
5015
  </xsl:if>
5015
5016
 
5017
+
5018
+
5016
5019
  <xsl:choose>
5017
5020
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
5018
5021
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -5304,9 +5307,9 @@
5304
5307
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
5305
5308
  <xsl:with-param name="continued">true</xsl:with-param>
5306
5309
  </xsl:apply-templates>
5307
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
5308
- <xsl:call-template name="fn_name_display"/>
5309
- </xsl:for-each>
5310
+
5311
+
5312
+
5310
5313
 
5311
5314
  </fo:table-cell>
5312
5315
  </fo:table-row>
@@ -5390,7 +5393,11 @@
5390
5393
 
5391
5394
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
5392
5395
 
5393
- <xsl:if test="$isNoteOrFnExist = 'true'">
5396
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
5397
+
5398
+ </xsl:variable>
5399
+
5400
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
5394
5401
 
5395
5402
  <xsl:variable name="cols-count">
5396
5403
  <xsl:choose>
@@ -5543,6 +5550,19 @@
5543
5550
 
5544
5551
  </fo:table-body>
5545
5552
 
5553
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
5554
+ <xsl:choose>
5555
+ <xsl:when test="substring-after(., '—') != ''">
5556
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
5557
+ </xsl:when>
5558
+ <xsl:otherwise>
5559
+ <xsl:value-of select="."/>
5560
+ </xsl:otherwise>
5561
+ </xsl:choose>
5562
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
5563
+ <xsl:apply-templates mode="presentation_name"/>
5564
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
5565
+ <xsl:apply-templates select="."/>
5546
5566
  </xsl:template><xsl:template match="*[local-name()='tr']">
5547
5567
  <xsl:variable name="parent-name" select="local-name(..)"/>
5548
5568
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -5781,14 +5801,12 @@
5781
5801
  <xsl:apply-templates/>
5782
5802
  </xsl:template><xsl:template name="fn_display">
5783
5803
  <xsl:variable name="references">
5804
+
5784
5805
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
5785
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5786
-
5787
-
5788
- <xsl:apply-templates/>
5789
- </fn>
5806
+ <xsl:call-template name="create_fn"/>
5790
5807
  </xsl:for-each>
5791
5808
  </xsl:variable>
5809
+
5792
5810
  <xsl:for-each select="xalan:nodeset($references)//fn">
5793
5811
  <xsl:variable name="reference" select="@reference"/>
5794
5812
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -5834,6 +5852,12 @@
5834
5852
  </fo:block>
5835
5853
  </xsl:if>
5836
5854
  </xsl:for-each>
5855
+ </xsl:template><xsl:template name="create_fn">
5856
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
5857
+
5858
+
5859
+ <xsl:apply-templates/>
5860
+ </fn>
5837
5861
  </xsl:template><xsl:template name="fn_name_display">
5838
5862
  <!-- <xsl:variable name="references">
5839
5863
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -6861,19 +6885,6 @@
6861
6885
  <!-- replace start and end spaces to non-break space -->
6862
6886
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
6863
6887
  </xsl:copy>
6864
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
6865
- <xsl:copy>
6866
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
6867
- </xsl:copy>
6868
- <xsl:choose>
6869
- <!-- if in msub, then don't add space -->
6870
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
6871
- <!-- if next char in digit, don't add space -->
6872
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
6873
- <xsl:otherwise>
6874
- <mathml:mspace width="0.5ex"/>
6875
- </xsl:otherwise>
6876
- </xsl:choose>
6877
6888
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
6878
6889
  <xsl:variable name="target">
6879
6890
  <xsl:choose>
@@ -8087,7 +8098,19 @@
8087
8098
  </fo:inline>
8088
8099
  </xsl:if>
8089
8100
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
8090
- <fo:inline><xsl:apply-templates/></fo:inline>
8101
+ <xsl:variable name="element">inline
8102
+
8103
+ </xsl:variable>
8104
+ <xsl:choose>
8105
+ <xsl:when test="contains($element, 'block')">
8106
+ <fo:block xsl:use-attribute-sets="example-p-style">
8107
+ <xsl:apply-templates/>
8108
+ </fo:block>
8109
+ </xsl:when>
8110
+ <xsl:otherwise>
8111
+ <fo:inline><xsl:apply-templates/></fo:inline>
8112
+ </xsl:otherwise>
8113
+ </xsl:choose>
8091
8114
  </xsl:template><xsl:template match="*[local-name() = 'example']">
8092
8115
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
8093
8116
 
@@ -8703,8 +8726,8 @@
8703
8726
 
8704
8727
  </xsl:otherwise>
8705
8728
  </xsl:choose>
8729
+ <!-- end BIPM bibitem processing-->
8706
8730
 
8707
- <!-- end BIPM bibitem processing-->
8708
8731
 
8709
8732
 
8710
8733
 
@@ -2178,7 +2178,7 @@
2178
2178
  <xsl:attribute name="white-space">pre</xsl:attribute>
2179
2179
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
2180
2180
 
2181
- <xsl:attribute name="font-family">Courier</xsl:attribute>
2181
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
2182
2182
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2183
2183
 
2184
2184
 
@@ -2269,6 +2269,7 @@
2269
2269
 
2270
2270
 
2271
2271
 
2272
+
2272
2273
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2273
2274
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
2274
2275
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
@@ -2516,7 +2517,7 @@
2516
2517
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
2517
2518
 
2518
2519
 
2519
- <xsl:attribute name="font-family">Courier</xsl:attribute>
2520
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
2520
2521
 
2521
2522
 
2522
2523
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
@@ -2760,6 +2761,8 @@
2760
2761
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2761
2762
  </xsl:if>
2762
2763
 
2764
+
2765
+
2763
2766
  <xsl:choose>
2764
2767
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2765
2768
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -3055,9 +3058,13 @@
3055
3058
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
3056
3059
  <xsl:with-param name="continued">true</xsl:with-param>
3057
3060
  </xsl:apply-templates>
3058
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
3059
- <xsl:call-template name="fn_name_display"/>
3060
- </xsl:for-each>
3061
+
3062
+
3063
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
3064
+ <xsl:call-template name="fn_name_display"/>
3065
+ </xsl:for-each>
3066
+
3067
+
3061
3068
 
3062
3069
  <fo:block text-align="right" font-style="italic">
3063
3070
  <xsl:text> </xsl:text>
@@ -3146,7 +3153,11 @@
3146
3153
 
3147
3154
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3148
3155
 
3149
- <xsl:if test="$isNoteOrFnExist = 'true'">
3156
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
3157
+
3158
+ </xsl:variable>
3159
+
3160
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
3150
3161
 
3151
3162
  <xsl:variable name="cols-count">
3152
3163
  <xsl:choose>
@@ -3308,10 +3319,13 @@
3308
3319
 
3309
3320
  <fo:table-row height="0" keep-with-next.within-page="always">
3310
3321
  <fo:table-cell>
3322
+
3323
+
3311
3324
 
3312
3325
 
3313
3326
  <fo:marker marker-class-name="table_continued"/>
3314
3327
 
3328
+
3315
3329
  <fo:block/>
3316
3330
  </fo:table-cell>
3317
3331
  </fo:table-row>
@@ -3331,6 +3345,19 @@
3331
3345
 
3332
3346
  </fo:table-body>
3333
3347
 
3348
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
3349
+ <xsl:choose>
3350
+ <xsl:when test="substring-after(., '—') != ''">
3351
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
3352
+ </xsl:when>
3353
+ <xsl:otherwise>
3354
+ <xsl:value-of select="."/>
3355
+ </xsl:otherwise>
3356
+ </xsl:choose>
3357
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
3358
+ <xsl:apply-templates mode="presentation_name"/>
3359
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
3360
+ <xsl:apply-templates select="."/>
3334
3361
  </xsl:template><xsl:template match="*[local-name()='tr']">
3335
3362
  <xsl:variable name="parent-name" select="local-name(..)"/>
3336
3363
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -3537,14 +3564,12 @@
3537
3564
  <xsl:apply-templates/>
3538
3565
  </xsl:template><xsl:template name="fn_display">
3539
3566
  <xsl:variable name="references">
3567
+
3540
3568
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
3541
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3542
-
3543
-
3544
- <xsl:apply-templates/>
3545
- </fn>
3569
+ <xsl:call-template name="create_fn"/>
3546
3570
  </xsl:for-each>
3547
3571
  </xsl:variable>
3572
+
3548
3573
  <xsl:for-each select="xalan:nodeset($references)//fn">
3549
3574
  <xsl:variable name="reference" select="@reference"/>
3550
3575
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -3583,6 +3608,12 @@
3583
3608
  </fo:block>
3584
3609
  </xsl:if>
3585
3610
  </xsl:for-each>
3611
+ </xsl:template><xsl:template name="create_fn">
3612
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3613
+
3614
+
3615
+ <xsl:apply-templates/>
3616
+ </fn>
3586
3617
  </xsl:template><xsl:template name="fn_name_display">
3587
3618
  <!-- <xsl:variable name="references">
3588
3619
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -3711,7 +3742,7 @@
3711
3742
 
3712
3743
 
3713
3744
 
3714
- <xsl:if test="ancestor::*[local-name()='td']">
3745
+ <xsl:if test="ancestor::*[local-name()='table']">
3715
3746
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3716
3747
  <!-- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute> -->
3717
3748
  <xsl:attribute name="baseline-shift">15%</xsl:attribute>
@@ -4603,19 +4634,6 @@
4603
4634
  <!-- replace start and end spaces to non-break space -->
4604
4635
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
4605
4636
  </xsl:copy>
4606
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
4607
- <xsl:copy>
4608
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
4609
- </xsl:copy>
4610
- <xsl:choose>
4611
- <!-- if in msub, then don't add space -->
4612
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
4613
- <!-- if next char in digit, don't add space -->
4614
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
4615
- <xsl:otherwise>
4616
- <mathml:mspace width="0.5ex"/>
4617
- </xsl:otherwise>
4618
- </xsl:choose>
4619
4637
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4620
4638
  <xsl:variable name="target">
4621
4639
  <xsl:choose>
@@ -5797,7 +5815,19 @@
5797
5815
  </fo:inline>
5798
5816
  </xsl:if>
5799
5817
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
5800
- <fo:inline><xsl:apply-templates/></fo:inline>
5818
+ <xsl:variable name="element">inline
5819
+
5820
+ </xsl:variable>
5821
+ <xsl:choose>
5822
+ <xsl:when test="contains($element, 'block')">
5823
+ <fo:block xsl:use-attribute-sets="example-p-style">
5824
+ <xsl:apply-templates/>
5825
+ </fo:block>
5826
+ </xsl:when>
5827
+ <xsl:otherwise>
5828
+ <fo:inline><xsl:apply-templates/></fo:inline>
5829
+ </xsl:otherwise>
5830
+ </xsl:choose>
5801
5831
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5802
5832
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5803
5833
 
@@ -6397,7 +6427,6 @@
6397
6427
  </xsl:template><xsl:template name="processBibitem">
6398
6428
 
6399
6429
 
6400
- <!-- end BIPM bibitem processing-->
6401
6430
 
6402
6431
 
6403
6432
 
@@ -19,9 +19,17 @@ module Metanorma
19
19
  "Arial" => nil,
20
20
  "Times New Roman" => nil,
21
21
  "Work Sans" => nil,
22
+ "Work Sans Black" => nil,
23
+ "Work Sans ExtraBold" => nil,
24
+ "Work Sans ExtraLight" => nil,
25
+ "Work Sans Light" => nil,
26
+ "Work Sans Medium" => nil,
27
+ "Work Sans SemiBold" => nil,
28
+ "Work Sans Thin" => nil,
22
29
  "STIX Two Math" => nil,
23
30
  "Source Han Sans" => nil,
24
- "TeX Gyre Chorus" => nil,
31
+ "Source Han Sans Normal" => nil,
32
+ "TeXGyreChorus" => nil,
25
33
  }
26
34
  end
27
35
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module BIPM
3
- VERSION = "1.1.6".freeze
3
+ VERSION = "1.1.7".freeze
4
4
  end
5
5
  end
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: 1.1.6
4
+ version: 1.1.7
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-08-02 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic