metanorma-m3aawg 1.7.8 → 1.7.9

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: 195a7ff8c331cdb5bad720dce725123e327b2ce2ec8f41d8fd6ae1ce29f23e1f
4
- data.tar.gz: 1da335095bb891af26d258c52244cc4963230b41bbe3b0152c70d7f0809fe020
3
+ metadata.gz: 8f4554afad1a13829cd3e450943ce87357dced255dbe6a18e24e1d974176c9bb
4
+ data.tar.gz: b238369150c6ecb7b7950f23d7a9db8994004229bb036786756979e56290f641
5
5
  SHA512:
6
- metadata.gz: 02dd3cc4e5b4fe3106cd4258005d5659947e224ec04b0436fe1dbcea75ec345c17cc914d7c99fe07534b98fdb3b9086e018b5afcce66243e52a6694edb87e76d
7
- data.tar.gz: c24ff0bacf14436fd4a31f9d5cf4a4a5822b56db8e3f7f0b47ed5fef75a2f0ea1a3bd5e5272f90c3c115e552346412e976bb886edae3a44d71310679bd1271bd
6
+ metadata.gz: 552658ab36591fde8f46fae9e639f68432fc6c5cc2c25930dd04584f66d124a78dcb0f4fb40e883dd8d92ddf1ca468bc83c10e8bb11d79e40096f2c7b25be0eb
7
+ data.tar.gz: 8ced9aa5eb541ad9a7ec6c35e29d4837755e0ed5520df50f8cd4960c1089f9881668f06c04716da934d7d9539b4b46ec632ff2d8daab885b45a63236964c0c69
@@ -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>
@@ -39,7 +39,7 @@
39
39
 
40
40
  <xsl:template match="/">
41
41
  <xsl:call-template name="namespaceCheck"/>
42
- <fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
42
+ <fo:root font-family="EB Garamond 12" font-size="12pt" xml:lang="{$lang}">
43
43
  <fo:layout-master-set>
44
44
 
45
45
  <!-- cover page -->
@@ -1072,7 +1072,7 @@
1072
1072
 
1073
1073
 
1074
1074
 
1075
- <xsl:attribute name="font-family">Courier</xsl:attribute>
1075
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
1076
1076
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1077
1077
 
1078
1078
 
@@ -1160,6 +1160,7 @@
1160
1160
 
1161
1161
 
1162
1162
 
1163
+
1163
1164
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
1164
1165
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1165
1166
 
@@ -1388,7 +1389,7 @@
1388
1389
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1389
1390
 
1390
1391
 
1391
- <xsl:attribute name="font-family">Courier</xsl:attribute>
1392
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
1392
1393
 
1393
1394
 
1394
1395
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
@@ -1621,6 +1622,8 @@
1621
1622
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1622
1623
  </xsl:if>
1623
1624
 
1625
+
1626
+
1624
1627
  <xsl:choose>
1625
1628
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1626
1629
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1908,9 +1911,9 @@
1908
1911
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
1909
1912
  <xsl:with-param name="continued">true</xsl:with-param>
1910
1913
  </xsl:apply-templates>
1911
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1912
- <xsl:call-template name="fn_name_display"/>
1913
- </xsl:for-each>
1914
+
1915
+
1916
+
1914
1917
 
1915
1918
  </fo:table-cell>
1916
1919
  </fo:table-row>
@@ -1992,7 +1995,11 @@
1992
1995
 
1993
1996
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1994
1997
 
1995
- <xsl:if test="$isNoteOrFnExist = 'true'">
1998
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
1999
+
2000
+ </xsl:variable>
2001
+
2002
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
1996
2003
 
1997
2004
  <xsl:variable name="cols-count">
1998
2005
  <xsl:choose>
@@ -2133,6 +2140,19 @@
2133
2140
 
2134
2141
  </fo:table-body>
2135
2142
 
2143
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2144
+ <xsl:choose>
2145
+ <xsl:when test="substring-after(., '—') != ''">
2146
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2147
+ </xsl:when>
2148
+ <xsl:otherwise>
2149
+ <xsl:value-of select="."/>
2150
+ </xsl:otherwise>
2151
+ </xsl:choose>
2152
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2153
+ <xsl:apply-templates mode="presentation_name"/>
2154
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2155
+ <xsl:apply-templates select="."/>
2136
2156
  </xsl:template><xsl:template match="*[local-name()='tr']">
2137
2157
  <xsl:variable name="parent-name" select="local-name(..)"/>
2138
2158
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -2305,14 +2325,12 @@
2305
2325
  <xsl:apply-templates/>
2306
2326
  </xsl:template><xsl:template name="fn_display">
2307
2327
  <xsl:variable name="references">
2328
+
2308
2329
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
2309
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2310
-
2311
-
2312
- <xsl:apply-templates/>
2313
- </fn>
2330
+ <xsl:call-template name="create_fn"/>
2314
2331
  </xsl:for-each>
2315
2332
  </xsl:variable>
2333
+
2316
2334
  <xsl:for-each select="xalan:nodeset($references)//fn">
2317
2335
  <xsl:variable name="reference" select="@reference"/>
2318
2336
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -2348,6 +2366,12 @@
2348
2366
  </fo:block>
2349
2367
  </xsl:if>
2350
2368
  </xsl:for-each>
2369
+ </xsl:template><xsl:template name="create_fn">
2370
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2371
+
2372
+
2373
+ <xsl:apply-templates/>
2374
+ </fn>
2351
2375
  </xsl:template><xsl:template name="fn_name_display">
2352
2376
  <!-- <xsl:variable name="references">
2353
2377
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -3351,19 +3375,6 @@
3351
3375
  <!-- replace start and end spaces to non-break space -->
3352
3376
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3353
3377
  </xsl:copy>
3354
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3355
- <xsl:copy>
3356
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
3357
- </xsl:copy>
3358
- <xsl:choose>
3359
- <!-- if in msub, then don't add space -->
3360
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
3361
- <!-- if next char in digit, don't add space -->
3362
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
3363
- <xsl:otherwise>
3364
- <mathml:mspace width="0.5ex"/>
3365
- </xsl:otherwise>
3366
- </xsl:choose>
3367
3378
  </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">
3368
3379
  <xsl:variable name="target">
3369
3380
  <xsl:choose>
@@ -4549,7 +4560,19 @@
4549
4560
  </fo:inline>
4550
4561
  </xsl:if>
4551
4562
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
4552
- <fo:inline><xsl:apply-templates/></fo:inline>
4563
+ <xsl:variable name="element">inline
4564
+
4565
+ </xsl:variable>
4566
+ <xsl:choose>
4567
+ <xsl:when test="contains($element, 'block')">
4568
+ <fo:block xsl:use-attribute-sets="example-p-style">
4569
+ <xsl:apply-templates/>
4570
+ </fo:block>
4571
+ </xsl:when>
4572
+ <xsl:otherwise>
4573
+ <fo:inline><xsl:apply-templates/></fo:inline>
4574
+ </xsl:otherwise>
4575
+ </xsl:choose>
4553
4576
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4554
4577
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4555
4578
 
@@ -5122,7 +5145,6 @@
5122
5145
  </xsl:template><xsl:template name="processBibitem">
5123
5146
 
5124
5147
 
5125
- <!-- end BIPM bibitem processing-->
5126
5148
 
5127
5149
 
5128
5150
 
@@ -39,7 +39,7 @@
39
39
 
40
40
  <xsl:template match="/">
41
41
  <xsl:call-template name="namespaceCheck"/>
42
- <fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
42
+ <fo:root font-family="EB Garamond 12" font-size="12pt" xml:lang="{$lang}">
43
43
  <fo:layout-master-set>
44
44
 
45
45
  <!-- cover page -->
@@ -1072,7 +1072,7 @@
1072
1072
 
1073
1073
 
1074
1074
 
1075
- <xsl:attribute name="font-family">Courier</xsl:attribute>
1075
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
1076
1076
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1077
1077
 
1078
1078
 
@@ -1160,6 +1160,7 @@
1160
1160
 
1161
1161
 
1162
1162
 
1163
+
1163
1164
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
1164
1165
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1165
1166
 
@@ -1388,7 +1389,7 @@
1388
1389
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1389
1390
 
1390
1391
 
1391
- <xsl:attribute name="font-family">Courier</xsl:attribute>
1392
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
1392
1393
 
1393
1394
 
1394
1395
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
@@ -1621,6 +1622,8 @@
1621
1622
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1622
1623
  </xsl:if>
1623
1624
 
1625
+
1626
+
1624
1627
  <xsl:choose>
1625
1628
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1626
1629
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1908,9 +1911,9 @@
1908
1911
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
1909
1912
  <xsl:with-param name="continued">true</xsl:with-param>
1910
1913
  </xsl:apply-templates>
1911
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1912
- <xsl:call-template name="fn_name_display"/>
1913
- </xsl:for-each>
1914
+
1915
+
1916
+
1914
1917
 
1915
1918
  </fo:table-cell>
1916
1919
  </fo:table-row>
@@ -1992,7 +1995,11 @@
1992
1995
 
1993
1996
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1994
1997
 
1995
- <xsl:if test="$isNoteOrFnExist = 'true'">
1998
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
1999
+
2000
+ </xsl:variable>
2001
+
2002
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
1996
2003
 
1997
2004
  <xsl:variable name="cols-count">
1998
2005
  <xsl:choose>
@@ -2133,6 +2140,19 @@
2133
2140
 
2134
2141
  </fo:table-body>
2135
2142
 
2143
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2144
+ <xsl:choose>
2145
+ <xsl:when test="substring-after(., '—') != ''">
2146
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2147
+ </xsl:when>
2148
+ <xsl:otherwise>
2149
+ <xsl:value-of select="."/>
2150
+ </xsl:otherwise>
2151
+ </xsl:choose>
2152
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2153
+ <xsl:apply-templates mode="presentation_name"/>
2154
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2155
+ <xsl:apply-templates select="."/>
2136
2156
  </xsl:template><xsl:template match="*[local-name()='tr']">
2137
2157
  <xsl:variable name="parent-name" select="local-name(..)"/>
2138
2158
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -2305,14 +2325,12 @@
2305
2325
  <xsl:apply-templates/>
2306
2326
  </xsl:template><xsl:template name="fn_display">
2307
2327
  <xsl:variable name="references">
2328
+
2308
2329
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
2309
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2310
-
2311
-
2312
- <xsl:apply-templates/>
2313
- </fn>
2330
+ <xsl:call-template name="create_fn"/>
2314
2331
  </xsl:for-each>
2315
2332
  </xsl:variable>
2333
+
2316
2334
  <xsl:for-each select="xalan:nodeset($references)//fn">
2317
2335
  <xsl:variable name="reference" select="@reference"/>
2318
2336
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -2348,6 +2366,12 @@
2348
2366
  </fo:block>
2349
2367
  </xsl:if>
2350
2368
  </xsl:for-each>
2369
+ </xsl:template><xsl:template name="create_fn">
2370
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2371
+
2372
+
2373
+ <xsl:apply-templates/>
2374
+ </fn>
2351
2375
  </xsl:template><xsl:template name="fn_name_display">
2352
2376
  <!-- <xsl:variable name="references">
2353
2377
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -3351,19 +3375,6 @@
3351
3375
  <!-- replace start and end spaces to non-break space -->
3352
3376
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3353
3377
  </xsl:copy>
3354
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3355
- <xsl:copy>
3356
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
3357
- </xsl:copy>
3358
- <xsl:choose>
3359
- <!-- if in msub, then don't add space -->
3360
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
3361
- <!-- if next char in digit, don't add space -->
3362
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
3363
- <xsl:otherwise>
3364
- <mathml:mspace width="0.5ex"/>
3365
- </xsl:otherwise>
3366
- </xsl:choose>
3367
3378
  </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">
3368
3379
  <xsl:variable name="target">
3369
3380
  <xsl:choose>
@@ -4549,7 +4560,19 @@
4549
4560
  </fo:inline>
4550
4561
  </xsl:if>
4551
4562
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
4552
- <fo:inline><xsl:apply-templates/></fo:inline>
4563
+ <xsl:variable name="element">inline
4564
+
4565
+ </xsl:variable>
4566
+ <xsl:choose>
4567
+ <xsl:when test="contains($element, 'block')">
4568
+ <fo:block xsl:use-attribute-sets="example-p-style">
4569
+ <xsl:apply-templates/>
4570
+ </fo:block>
4571
+ </xsl:when>
4572
+ <xsl:otherwise>
4573
+ <fo:inline><xsl:apply-templates/></fo:inline>
4574
+ </xsl:otherwise>
4575
+ </xsl:choose>
4553
4576
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4554
4577
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4555
4578
 
@@ -5122,7 +5145,6 @@
5122
5145
  </xsl:template><xsl:template name="processBibitem">
5123
5146
 
5124
5147
 
5125
- <!-- end BIPM bibitem processing-->
5126
5148
 
5127
5149
 
5128
5150
 
@@ -25,9 +25,8 @@ module Metanorma
25
25
  {
26
26
  "Arial" => nil,
27
27
  "Cambria Math" => nil,
28
- "Courier" => nil,
29
28
  "Courier New" => nil,
30
- "EB Garamond" => nil,
29
+ "EB Garamond 12" => nil,
31
30
  "Overpass" => nil,
32
31
  "Space Mono" => nil,
33
32
  }
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "1.7.8".freeze
3
+ VERSION = "1.7.9".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.8
4
+ version: 1.7.9
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: htmlentities