metanorma-cc 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: ba921a96ef914fa2953f1496d9f0cdb1187fbf899fb290db3e292bacf14a3c63
4
- data.tar.gz: a1200323fce7dc2df2e100a8fe37f3a41e583a7311666da0823e3e0687493574
3
+ metadata.gz: d6d309173c4998e196ca07f8ddfb3a5bb78f8b18583b81bcd9d9070178b5914c
4
+ data.tar.gz: 9f96d76ec9a043f2bd69e6a0e8a88b9372ffea4d4fb3da7779732a2bb77d704a
5
5
  SHA512:
6
- metadata.gz: 6c909ee60a09c15b24769d63cd7abbd23d56953e6c5d01018ed46f903a8a8c994491aea2937e318811f6332fba02fc6a8324cbad2ea18fe463cb93b2d6ed7f1c
7
- data.tar.gz: aa2da60c821b1cefa7e1fef177ded1b9136a73a37b6d91ce449f3887a65e0a93642aad8cdfa7959507a4d73eb0677800a8f2e584f3a7473725d0394a7986945d
6
+ metadata.gz: 742f181837a9d074cc595bf8ee3aa12d73cff5954126eeb1367b135f0ae9164a041d8d096aff1525a724de8e6f9f705a84f1c5c747735471fec0635b42aeb2f7
7
+ data.tar.gz: 774c8fc6eca7ff7237a8acc436852e286ac1bc0d2129e9456a6c5eaa9590c408e1066a9e8efad730e4a1551c9886b6f13ce201d4f91d70f6b26de35272e01d34
@@ -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>
@@ -1083,6 +1083,7 @@
1083
1083
 
1084
1084
 
1085
1085
 
1086
+
1086
1087
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1087
1088
 
1088
1089
  <xsl:attribute name="padding-right">10mm</xsl:attribute>
@@ -1538,6 +1539,8 @@
1538
1539
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1539
1540
  </xsl:if>
1540
1541
 
1542
+
1543
+
1541
1544
  <xsl:choose>
1542
1545
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1543
1546
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1825,9 +1828,9 @@
1825
1828
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
1826
1829
  <xsl:with-param name="continued">true</xsl:with-param>
1827
1830
  </xsl:apply-templates>
1828
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1829
- <xsl:call-template name="fn_name_display"/>
1830
- </xsl:for-each>
1831
+
1832
+
1833
+
1831
1834
 
1832
1835
  </fo:table-cell>
1833
1836
  </fo:table-row>
@@ -1909,7 +1912,11 @@
1909
1912
 
1910
1913
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1911
1914
 
1912
- <xsl:if test="$isNoteOrFnExist = 'true'">
1915
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
1916
+
1917
+ </xsl:variable>
1918
+
1919
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
1913
1920
 
1914
1921
  <xsl:variable name="cols-count">
1915
1922
  <xsl:choose>
@@ -2050,6 +2057,19 @@
2050
2057
 
2051
2058
  </fo:table-body>
2052
2059
 
2060
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2061
+ <xsl:choose>
2062
+ <xsl:when test="substring-after(., '—') != ''">
2063
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2064
+ </xsl:when>
2065
+ <xsl:otherwise>
2066
+ <xsl:value-of select="."/>
2067
+ </xsl:otherwise>
2068
+ </xsl:choose>
2069
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2070
+ <xsl:apply-templates mode="presentation_name"/>
2071
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2072
+ <xsl:apply-templates select="."/>
2053
2073
  </xsl:template><xsl:template match="*[local-name()='tr']">
2054
2074
  <xsl:variable name="parent-name" select="local-name(..)"/>
2055
2075
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -2222,14 +2242,12 @@
2222
2242
  <xsl:apply-templates/>
2223
2243
  </xsl:template><xsl:template name="fn_display">
2224
2244
  <xsl:variable name="references">
2245
+
2225
2246
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
2226
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2227
-
2228
-
2229
- <xsl:apply-templates/>
2230
- </fn>
2247
+ <xsl:call-template name="create_fn"/>
2231
2248
  </xsl:for-each>
2232
2249
  </xsl:variable>
2250
+
2233
2251
  <xsl:for-each select="xalan:nodeset($references)//fn">
2234
2252
  <xsl:variable name="reference" select="@reference"/>
2235
2253
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -2265,6 +2283,12 @@
2265
2283
  </fo:block>
2266
2284
  </xsl:if>
2267
2285
  </xsl:for-each>
2286
+ </xsl:template><xsl:template name="create_fn">
2287
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2288
+
2289
+
2290
+ <xsl:apply-templates/>
2291
+ </fn>
2268
2292
  </xsl:template><xsl:template name="fn_name_display">
2269
2293
  <!-- <xsl:variable name="references">
2270
2294
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -3265,19 +3289,6 @@
3265
3289
  <!-- replace start and end spaces to non-break space -->
3266
3290
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3267
3291
  </xsl:copy>
3268
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3269
- <xsl:copy>
3270
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
3271
- </xsl:copy>
3272
- <xsl:choose>
3273
- <!-- if in msub, then don't add space -->
3274
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
3275
- <!-- if next char in digit, don't add space -->
3276
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
3277
- <xsl:otherwise>
3278
- <mathml:mspace width="0.5ex"/>
3279
- </xsl:otherwise>
3280
- </xsl:choose>
3281
3292
  </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">
3282
3293
  <xsl:variable name="target">
3283
3294
  <xsl:choose>
@@ -4457,7 +4468,19 @@
4457
4468
  </fo:inline>
4458
4469
  </xsl:if>
4459
4470
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
4460
- <fo:inline><xsl:apply-templates/></fo:inline>
4471
+ <xsl:variable name="element">inline
4472
+
4473
+ </xsl:variable>
4474
+ <xsl:choose>
4475
+ <xsl:when test="contains($element, 'block')">
4476
+ <fo:block xsl:use-attribute-sets="example-p-style">
4477
+ <xsl:apply-templates/>
4478
+ </fo:block>
4479
+ </xsl:when>
4480
+ <xsl:otherwise>
4481
+ <fo:inline><xsl:apply-templates/></fo:inline>
4482
+ </xsl:otherwise>
4483
+ </xsl:choose>
4461
4484
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4462
4485
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4463
4486
 
@@ -5044,7 +5067,6 @@
5044
5067
  </xsl:template><xsl:template name="processBibitem">
5045
5068
 
5046
5069
 
5047
- <!-- end BIPM bibitem processing-->
5048
5070
 
5049
5071
 
5050
5072
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
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-cc
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: metanorma-generic