metanorma-iho 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iho/reqt.rng +15 -4
- data/lib/isodoc/iho/iho.specification.xsl +47 -25
- data/lib/isodoc/iho/iho.standard.xsl +47 -25
- data/lib/metanorma/iho/processor.rb +4 -3
- data/lib/metanorma/iho/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: 930edcc2ab1ef3cbfedd8b2927dfb30439e3900375bf8b09a8f3c30ae51a055d
|
4
|
+
data.tar.gz: cc4621e7fc7e9f0a629da501de4c5e5e763f952cba8f8f4b0dd1f9980245e1e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 820e8327fabde72af7cf8a154c1b3a89896ac8d9cfc33b8b33eb65c84e420dbc1c319ac5678b04cf60ea95e62f75387a85f1d3273b187f13a9b51676c62f8a20
|
7
|
+
data.tar.gz: 708912e8a16a5ecefc391340967ee6224f5449f086ef1092ddb81ebbebc61337d6ef342c45dc391bd7a0e3e39c538eb80861dbfe7f22ecd93c76d2b77684a75d
|
@@ -64,9 +64,9 @@
|
|
64
64
|
<optional>
|
65
65
|
<ref name="label"/>
|
66
66
|
</optional>
|
67
|
-
<
|
67
|
+
<zeroOrMore>
|
68
68
|
<ref name="subject"/>
|
69
|
-
</
|
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
|
-
<
|
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
|
-
<
|
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>
|
@@ -1226,6 +1226,7 @@
|
|
1226
1226
|
|
1227
1227
|
|
1228
1228
|
|
1229
|
+
|
1229
1230
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1230
1231
|
<xsl:attribute name="margin-left">12.7mm</xsl:attribute>
|
1231
1232
|
|
@@ -1463,7 +1464,7 @@
|
|
1463
1464
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1464
1465
|
|
1465
1466
|
|
1466
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1467
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1467
1468
|
|
1468
1469
|
|
1469
1470
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1701,6 +1702,8 @@
|
|
1701
1702
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1702
1703
|
</xsl:if>
|
1703
1704
|
|
1705
|
+
|
1706
|
+
|
1704
1707
|
<xsl:choose>
|
1705
1708
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1706
1709
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -1988,9 +1991,9 @@
|
|
1988
1991
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1989
1992
|
<xsl:with-param name="continued">true</xsl:with-param>
|
1990
1993
|
</xsl:apply-templates>
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
+
|
1995
|
+
|
1996
|
+
|
1994
1997
|
|
1995
1998
|
</fo:table-cell>
|
1996
1999
|
</fo:table-row>
|
@@ -2072,7 +2075,11 @@
|
|
2072
2075
|
|
2073
2076
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2074
2077
|
|
2075
|
-
<xsl:
|
2078
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2079
|
+
|
2080
|
+
</xsl:variable>
|
2081
|
+
|
2082
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
2076
2083
|
|
2077
2084
|
<xsl:variable name="cols-count">
|
2078
2085
|
<xsl:choose>
|
@@ -2213,6 +2220,19 @@
|
|
2213
2220
|
|
2214
2221
|
</fo:table-body>
|
2215
2222
|
|
2223
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2224
|
+
<xsl:choose>
|
2225
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2226
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2227
|
+
</xsl:when>
|
2228
|
+
<xsl:otherwise>
|
2229
|
+
<xsl:value-of select="."/>
|
2230
|
+
</xsl:otherwise>
|
2231
|
+
</xsl:choose>
|
2232
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2233
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2234
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2235
|
+
<xsl:apply-templates select="."/>
|
2216
2236
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2217
2237
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2218
2238
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2392,14 +2412,12 @@
|
|
2392
2412
|
<xsl:apply-templates/>
|
2393
2413
|
</xsl:template><xsl:template name="fn_display">
|
2394
2414
|
<xsl:variable name="references">
|
2415
|
+
|
2395
2416
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2396
|
-
<
|
2397
|
-
|
2398
|
-
|
2399
|
-
<xsl:apply-templates/>
|
2400
|
-
</fn>
|
2417
|
+
<xsl:call-template name="create_fn"/>
|
2401
2418
|
</xsl:for-each>
|
2402
2419
|
</xsl:variable>
|
2420
|
+
|
2403
2421
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2404
2422
|
<xsl:variable name="reference" select="@reference"/>
|
2405
2423
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -2435,6 +2453,12 @@
|
|
2435
2453
|
</fo:block>
|
2436
2454
|
</xsl:if>
|
2437
2455
|
</xsl:for-each>
|
2456
|
+
</xsl:template><xsl:template name="create_fn">
|
2457
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2458
|
+
|
2459
|
+
|
2460
|
+
<xsl:apply-templates/>
|
2461
|
+
</fn>
|
2438
2462
|
</xsl:template><xsl:template name="fn_name_display">
|
2439
2463
|
<!-- <xsl:variable name="references">
|
2440
2464
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -3440,19 +3464,6 @@
|
|
3440
3464
|
<!-- replace start and end spaces to non-break space -->
|
3441
3465
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3442
3466
|
</xsl:copy>
|
3443
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3444
|
-
<xsl:copy>
|
3445
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3446
|
-
</xsl:copy>
|
3447
|
-
<xsl:choose>
|
3448
|
-
<!-- if in msub, then don't add space -->
|
3449
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3450
|
-
<!-- if next char in digit, don't add space -->
|
3451
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3452
|
-
<xsl:otherwise>
|
3453
|
-
<mathml:mspace width="0.5ex"/>
|
3454
|
-
</xsl:otherwise>
|
3455
|
-
</xsl:choose>
|
3456
3467
|
</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">
|
3457
3468
|
<xsl:variable name="target">
|
3458
3469
|
<xsl:choose>
|
@@ -4636,7 +4647,19 @@
|
|
4636
4647
|
</fo:inline>
|
4637
4648
|
</xsl:if>
|
4638
4649
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
4639
|
-
<
|
4650
|
+
<xsl:variable name="element">inline
|
4651
|
+
|
4652
|
+
</xsl:variable>
|
4653
|
+
<xsl:choose>
|
4654
|
+
<xsl:when test="contains($element, 'block')">
|
4655
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4656
|
+
<xsl:apply-templates/>
|
4657
|
+
</fo:block>
|
4658
|
+
</xsl:when>
|
4659
|
+
<xsl:otherwise>
|
4660
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4661
|
+
</xsl:otherwise>
|
4662
|
+
</xsl:choose>
|
4640
4663
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4641
4664
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4642
4665
|
|
@@ -5218,7 +5241,6 @@
|
|
5218
5241
|
</xsl:template><xsl:template name="processBibitem">
|
5219
5242
|
|
5220
5243
|
|
5221
|
-
<!-- end BIPM bibitem processing-->
|
5222
5244
|
|
5223
5245
|
|
5224
5246
|
|
@@ -1226,6 +1226,7 @@
|
|
1226
1226
|
|
1227
1227
|
|
1228
1228
|
|
1229
|
+
|
1229
1230
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1230
1231
|
<xsl:attribute name="margin-left">12.7mm</xsl:attribute>
|
1231
1232
|
|
@@ -1463,7 +1464,7 @@
|
|
1463
1464
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1464
1465
|
|
1465
1466
|
|
1466
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1467
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1467
1468
|
|
1468
1469
|
|
1469
1470
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1701,6 +1702,8 @@
|
|
1701
1702
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1702
1703
|
</xsl:if>
|
1703
1704
|
|
1705
|
+
|
1706
|
+
|
1704
1707
|
<xsl:choose>
|
1705
1708
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1706
1709
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -1988,9 +1991,9 @@
|
|
1988
1991
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1989
1992
|
<xsl:with-param name="continued">true</xsl:with-param>
|
1990
1993
|
</xsl:apply-templates>
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
+
|
1995
|
+
|
1996
|
+
|
1994
1997
|
|
1995
1998
|
</fo:table-cell>
|
1996
1999
|
</fo:table-row>
|
@@ -2072,7 +2075,11 @@
|
|
2072
2075
|
|
2073
2076
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2074
2077
|
|
2075
|
-
<xsl:
|
2078
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2079
|
+
|
2080
|
+
</xsl:variable>
|
2081
|
+
|
2082
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
2076
2083
|
|
2077
2084
|
<xsl:variable name="cols-count">
|
2078
2085
|
<xsl:choose>
|
@@ -2213,6 +2220,19 @@
|
|
2213
2220
|
|
2214
2221
|
</fo:table-body>
|
2215
2222
|
|
2223
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2224
|
+
<xsl:choose>
|
2225
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2226
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2227
|
+
</xsl:when>
|
2228
|
+
<xsl:otherwise>
|
2229
|
+
<xsl:value-of select="."/>
|
2230
|
+
</xsl:otherwise>
|
2231
|
+
</xsl:choose>
|
2232
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2233
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2234
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2235
|
+
<xsl:apply-templates select="."/>
|
2216
2236
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2217
2237
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2218
2238
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2392,14 +2412,12 @@
|
|
2392
2412
|
<xsl:apply-templates/>
|
2393
2413
|
</xsl:template><xsl:template name="fn_display">
|
2394
2414
|
<xsl:variable name="references">
|
2415
|
+
|
2395
2416
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2396
|
-
<
|
2397
|
-
|
2398
|
-
|
2399
|
-
<xsl:apply-templates/>
|
2400
|
-
</fn>
|
2417
|
+
<xsl:call-template name="create_fn"/>
|
2401
2418
|
</xsl:for-each>
|
2402
2419
|
</xsl:variable>
|
2420
|
+
|
2403
2421
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2404
2422
|
<xsl:variable name="reference" select="@reference"/>
|
2405
2423
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -2435,6 +2453,12 @@
|
|
2435
2453
|
</fo:block>
|
2436
2454
|
</xsl:if>
|
2437
2455
|
</xsl:for-each>
|
2456
|
+
</xsl:template><xsl:template name="create_fn">
|
2457
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2458
|
+
|
2459
|
+
|
2460
|
+
<xsl:apply-templates/>
|
2461
|
+
</fn>
|
2438
2462
|
</xsl:template><xsl:template name="fn_name_display">
|
2439
2463
|
<!-- <xsl:variable name="references">
|
2440
2464
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -3440,19 +3464,6 @@
|
|
3440
3464
|
<!-- replace start and end spaces to non-break space -->
|
3441
3465
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3442
3466
|
</xsl:copy>
|
3443
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3444
|
-
<xsl:copy>
|
3445
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3446
|
-
</xsl:copy>
|
3447
|
-
<xsl:choose>
|
3448
|
-
<!-- if in msub, then don't add space -->
|
3449
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3450
|
-
<!-- if next char in digit, don't add space -->
|
3451
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3452
|
-
<xsl:otherwise>
|
3453
|
-
<mathml:mspace width="0.5ex"/>
|
3454
|
-
</xsl:otherwise>
|
3455
|
-
</xsl:choose>
|
3456
3467
|
</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">
|
3457
3468
|
<xsl:variable name="target">
|
3458
3469
|
<xsl:choose>
|
@@ -4636,7 +4647,19 @@
|
|
4636
4647
|
</fo:inline>
|
4637
4648
|
</xsl:if>
|
4638
4649
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
4639
|
-
<
|
4650
|
+
<xsl:variable name="element">inline
|
4651
|
+
|
4652
|
+
</xsl:variable>
|
4653
|
+
<xsl:choose>
|
4654
|
+
<xsl:when test="contains($element, 'block')">
|
4655
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4656
|
+
<xsl:apply-templates/>
|
4657
|
+
</fo:block>
|
4658
|
+
</xsl:when>
|
4659
|
+
<xsl:otherwise>
|
4660
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4661
|
+
</xsl:otherwise>
|
4662
|
+
</xsl:choose>
|
4640
4663
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4641
4664
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4642
4665
|
|
@@ -5218,7 +5241,6 @@
|
|
5218
5241
|
</xsl:template><xsl:template name="processBibitem">
|
5219
5242
|
|
5220
5243
|
|
5221
|
-
<!-- end BIPM bibitem processing-->
|
5222
5244
|
|
5223
5245
|
|
5224
5246
|
|
@@ -19,12 +19,13 @@ module Metanorma
|
|
19
19
|
{
|
20
20
|
"Arial" => nil,
|
21
21
|
"Cambria Math" => nil,
|
22
|
-
"Courier" => nil,
|
22
|
+
"Courier New" => nil,
|
23
23
|
"Fira Code" => nil,
|
24
|
-
"Source Sans Pro" =>
|
24
|
+
"Source Sans Pro Light" => nil,
|
25
25
|
"Source Serif Pro" => nil,
|
26
|
-
"Source Code Pro" =>
|
26
|
+
"Source Code Pro Light" => nil,
|
27
27
|
"Source Han Sans" => nil,
|
28
|
+
"Source Han Sans Normal" => nil,
|
28
29
|
"STIX Two Math" => nil,
|
29
30
|
}
|
30
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.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-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|