metanorma-jis 0.1.7 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/jis/jis.international-standard.xsl +74 -14
- data/lib/metanorma/jis/basicdoc.rng +94 -8
- data/lib/metanorma/jis/biblio-standoc.rng +44 -1
- data/lib/metanorma/jis/biblio.rng +11 -0
- data/lib/metanorma/jis/converter.rb +4 -0
- data/lib/metanorma/jis/front.rb +1 -1
- data/lib/metanorma/jis/isodoc.rng +13 -64
- data/lib/metanorma/jis/reqt.rng +0 -16
- data/lib/metanorma/jis/version.rb +1 -1
- data/metanorma-jis.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 940e63ca6b0fbe0f8ffcfeb667c50207e3368f065840941e1377d172bf4b022f
|
4
|
+
data.tar.gz: 7cd7632a9b316836a0e08f517a6c27cb6c12a72ba2d551a21fa29c6d542f98ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad51ac315b7537a46c60c441b3ab817f9fa028565c09dce86dd08b7a7f5ecb29b1b1abd97c27482ded83cfd0c5849465eacf68cd871f192c60366c0616110b82
|
7
|
+
data.tar.gz: 457843fe15780ca34e369bc5714affcd6599d2abd3c35d4c0190bfa39be7187c49a6a67bb5fe7f9a8dc53de75637b743ffe50f267d3e5538e865d6d043cce188
|
@@ -277,6 +277,10 @@
|
|
277
277
|
<xsl:with-param name="num" select="$num"/>
|
278
278
|
</xsl:apply-templates>
|
279
279
|
|
280
|
+
<xsl:if test="not(/*/*[local-name()='preface']/*[local-name() = 'clause'][@type = 'toc'])">
|
281
|
+
<fo:block><!-- prevent fop error for empty document --></fo:block>
|
282
|
+
</xsl:if>
|
283
|
+
|
280
284
|
</fo:flow>
|
281
285
|
|
282
286
|
</fo:page-sequence>
|
@@ -515,6 +519,10 @@
|
|
515
519
|
|
516
520
|
<xsl:apply-templates select="*" mode="page"/>
|
517
521
|
|
522
|
+
<xsl:if test="not(*)">
|
523
|
+
<fo:block><!-- prevent fop error for empty document --></fo:block>
|
524
|
+
</xsl:if>
|
525
|
+
|
518
526
|
</fo:flow>
|
519
527
|
</fo:page-sequence>
|
520
528
|
</xsl:for-each>
|
@@ -701,7 +709,8 @@
|
|
701
709
|
<fo:inline/>
|
702
710
|
<fo:footnote-body>
|
703
711
|
<fo:block font-size="8.5pt">
|
704
|
-
<xsl:apply-templates select="/*/*[local-name() = 'preface']/*[local-name() = 'clause'][@type = 'inner-cover-note']"/>
|
712
|
+
<!-- <xsl:apply-templates select="/*/*[local-name() = 'preface']/*[local-name() = 'clause'][@type = 'inner-cover-note']" /> -->
|
713
|
+
<xsl:apply-templates select="/*/*[local-name() = 'boilerplate']"/>
|
705
714
|
</fo:block>
|
706
715
|
</fo:footnote-body>
|
707
716
|
</fo:footnote>
|
@@ -1153,7 +1162,7 @@
|
|
1153
1162
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1154
1163
|
</xsl:if>
|
1155
1164
|
|
1156
|
-
<xsl:if test="parent::jis:clause[@type = 'inner-cover-note']">
|
1165
|
+
<xsl:if test="parent::jis:clause[@type = 'inner-cover-note'] or ancestor::jis:boilerplate">
|
1157
1166
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1158
1167
|
</xsl:if>
|
1159
1168
|
|
@@ -3355,7 +3364,9 @@
|
|
3355
3364
|
</xsl:template> <!-- license-statement/p -->
|
3356
3365
|
|
3357
3366
|
<xsl:template match="*[local-name()='legal-statement']">
|
3367
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
3358
3368
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
3369
|
+
|
3359
3370
|
<xsl:apply-templates/>
|
3360
3371
|
</fo:block>
|
3361
3372
|
</xsl:template> <!-- legal-statement -->
|
@@ -5611,13 +5622,14 @@
|
|
5611
5622
|
<!-- ================= -->
|
5612
5623
|
<!-- Added,deleted text -->
|
5613
5624
|
<!-- ================= -->
|
5614
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
5625
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
5615
5626
|
<xsl:param name="skip">true</xsl:param>
|
5616
5627
|
<xsl:param name="block">false</xsl:param>
|
5617
5628
|
<xsl:param name="type"/>
|
5618
5629
|
<xsl:param name="text-align"/>
|
5619
5630
|
<xsl:choose>
|
5620
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
5631
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
5632
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
5621
5633
|
<xsl:choose>
|
5622
5634
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
5623
5635
|
<xsl:otherwise>
|
@@ -5625,12 +5637,32 @@
|
|
5625
5637
|
<xsl:call-template name="insertTag">
|
5626
5638
|
<xsl:with-param name="type">
|
5627
5639
|
<xsl:choose>
|
5640
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
5641
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
5628
5642
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
5629
5643
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
5630
5644
|
</xsl:choose>
|
5631
5645
|
</xsl:with-param>
|
5632
|
-
<xsl:with-param name="kind"
|
5633
|
-
|
5646
|
+
<xsl:with-param name="kind">
|
5647
|
+
<xsl:choose>
|
5648
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
5649
|
+
<xsl:value-of select="text()"/>
|
5650
|
+
</xsl:when>
|
5651
|
+
<xsl:otherwise>
|
5652
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
5653
|
+
</xsl:otherwise>
|
5654
|
+
</xsl:choose>
|
5655
|
+
</xsl:with-param>
|
5656
|
+
<xsl:with-param name="value">
|
5657
|
+
<xsl:choose>
|
5658
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
5659
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
5660
|
+
</xsl:when>
|
5661
|
+
<xsl:otherwise>
|
5662
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
5663
|
+
</xsl:otherwise>
|
5664
|
+
</xsl:choose>
|
5665
|
+
</xsl:with-param>
|
5634
5666
|
</xsl:call-template>
|
5635
5667
|
</xsl:variable>
|
5636
5668
|
<xsl:choose>
|
@@ -7833,11 +7865,17 @@
|
|
7833
7865
|
</xsl:when>
|
7834
7866
|
<xsl:otherwise>
|
7835
7867
|
|
7868
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
7869
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
7870
|
+
|
7836
7871
|
<xsl:variable name="element">
|
7837
7872
|
<xsl:choose>
|
7838
7873
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
7839
7874
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7840
7875
|
</xsl:when>
|
7876
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
7877
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7878
|
+
</xsl:when>
|
7841
7879
|
<xsl:otherwise>
|
7842
7880
|
<fo:block xsl:use-attribute-sets="image-style">
|
7843
7881
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -7853,10 +7891,24 @@
|
|
7853
7891
|
<xsl:copy-of select="@*"/>
|
7854
7892
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
7855
7893
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
7856
|
-
|
7857
|
-
|
7858
|
-
|
7859
|
-
|
7894
|
+
|
7895
|
+
<xsl:choose>
|
7896
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
7897
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
7898
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
7899
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
7900
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
7901
|
+
</xsl:if>
|
7902
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
7903
|
+
</xsl:when>
|
7904
|
+
<xsl:otherwise>
|
7905
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7906
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7907
|
+
</xsl:if>
|
7908
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7909
|
+
</xsl:otherwise>
|
7910
|
+
</xsl:choose>
|
7911
|
+
|
7860
7912
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7861
7913
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7862
7914
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -10022,14 +10074,16 @@
|
|
10022
10074
|
|
10023
10075
|
<xsl:template match="*[local-name() = 'annex']">
|
10024
10076
|
<fo:block break-after="page"/>
|
10025
|
-
<fo:block
|
10077
|
+
<fo:block>
|
10026
10078
|
|
10027
10079
|
<xsl:call-template name="setBlockSpanAll"/>
|
10028
10080
|
|
10029
10081
|
<xsl:call-template name="refine_annex_style"/>
|
10030
10082
|
|
10031
10083
|
</fo:block>
|
10032
|
-
<
|
10084
|
+
<fo:block id="{@id}">
|
10085
|
+
<xsl:apply-templates/>
|
10086
|
+
</fo:block>
|
10033
10087
|
</xsl:template>
|
10034
10088
|
|
10035
10089
|
<xsl:template name="refine_annex_style">
|
@@ -10049,13 +10103,19 @@
|
|
10049
10103
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10050
10104
|
</xsl:when>
|
10051
10105
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10052
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10106
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10107
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10108
|
+
</xsl:when>
|
10109
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10053
10110
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10054
10111
|
</xsl:when>
|
10055
10112
|
</xsl:choose>
|
10056
10113
|
|
10057
10114
|
</xsl:template>
|
10058
10115
|
|
10116
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
10117
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
10118
|
+
|
10059
10119
|
<xsl:template match="*[local-name() = 'name']/text()">
|
10060
10120
|
<!-- 0xA0 to space replacement -->
|
10061
10121
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -11785,7 +11845,7 @@
|
|
11785
11845
|
|
11786
11846
|
<xsl:template name="printEdition">
|
11787
11847
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
11788
|
-
|
11848
|
+
|
11789
11849
|
<xsl:choose>
|
11790
11850
|
<xsl:when test="$edition_i18n != ''">
|
11791
11851
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
@@ -95,8 +95,89 @@
|
|
95
95
|
<ref name="pagebreak"/>
|
96
96
|
<ref name="hr"/>
|
97
97
|
<ref name="bookmark"/>
|
98
|
+
<ref name="amend"/>
|
98
99
|
</choice>
|
99
100
|
</define>
|
101
|
+
<define name="amend">
|
102
|
+
<element name="amend">
|
103
|
+
<ref name="AmendType"/>
|
104
|
+
</element>
|
105
|
+
</define>
|
106
|
+
<define name="AmendType">
|
107
|
+
<optional>
|
108
|
+
<attribute name="id">
|
109
|
+
<data type="ID"/>
|
110
|
+
</attribute>
|
111
|
+
</optional>
|
112
|
+
<attribute name="change">
|
113
|
+
<choice>
|
114
|
+
<value>add</value>
|
115
|
+
<value>modify</value>
|
116
|
+
<value>delete</value>
|
117
|
+
<value>replace</value>
|
118
|
+
</choice>
|
119
|
+
</attribute>
|
120
|
+
<optional>
|
121
|
+
<attribute name="path"/>
|
122
|
+
</optional>
|
123
|
+
<optional>
|
124
|
+
<attribute name="path_end"/>
|
125
|
+
</optional>
|
126
|
+
<optional>
|
127
|
+
<attribute name="title"/>
|
128
|
+
</optional>
|
129
|
+
<optional>
|
130
|
+
<element name="location">
|
131
|
+
<zeroOrMore>
|
132
|
+
<choice>
|
133
|
+
<ref name="locality"/>
|
134
|
+
<ref name="localityStack"/>
|
135
|
+
</choice>
|
136
|
+
</zeroOrMore>
|
137
|
+
</element>
|
138
|
+
</optional>
|
139
|
+
<optional>
|
140
|
+
<element name="description">
|
141
|
+
<zeroOrMore>
|
142
|
+
<ref name="BasicBlock"/>
|
143
|
+
</zeroOrMore>
|
144
|
+
</element>
|
145
|
+
</optional>
|
146
|
+
<optional>
|
147
|
+
<element name="newcontent">
|
148
|
+
<optional>
|
149
|
+
<attribute name="id">
|
150
|
+
<data type="ID"/>
|
151
|
+
</attribute>
|
152
|
+
</optional>
|
153
|
+
<zeroOrMore>
|
154
|
+
<ref name="BasicBlock"/>
|
155
|
+
</zeroOrMore>
|
156
|
+
</element>
|
157
|
+
</optional>
|
158
|
+
<zeroOrMore>
|
159
|
+
<ref name="classification"/>
|
160
|
+
</zeroOrMore>
|
161
|
+
<zeroOrMore>
|
162
|
+
<ref name="contributor"/>
|
163
|
+
</zeroOrMore>
|
164
|
+
</define>
|
165
|
+
<define name="classification">
|
166
|
+
<element name="classification">
|
167
|
+
<ref name="classification_tag"/>
|
168
|
+
<ref name="classification_value"/>
|
169
|
+
</element>
|
170
|
+
</define>
|
171
|
+
<define name="classification_tag">
|
172
|
+
<element name="tag">
|
173
|
+
<text/>
|
174
|
+
</element>
|
175
|
+
</define>
|
176
|
+
<define name="classification_value">
|
177
|
+
<element name="value">
|
178
|
+
<text/>
|
179
|
+
</element>
|
180
|
+
</define>
|
100
181
|
<define name="paragraph">
|
101
182
|
<element name="p">
|
102
183
|
<ref name="ParagraphType"/>
|
@@ -163,6 +244,9 @@
|
|
163
244
|
<data type="ID"/>
|
164
245
|
</attribute>
|
165
246
|
<attribute name="reviewer"/>
|
247
|
+
<optional>
|
248
|
+
<attribute name="type"/>
|
249
|
+
</optional>
|
166
250
|
<optional>
|
167
251
|
<attribute name="date">
|
168
252
|
<data type="dateTime"/>
|
@@ -939,18 +1023,12 @@
|
|
939
1023
|
</optional>
|
940
1024
|
<optional>
|
941
1025
|
<attribute name="width">
|
942
|
-
<
|
943
|
-
<data type="int"/>
|
944
|
-
<value>auto</value>
|
945
|
-
</choice>
|
1026
|
+
<ref name="ImageSize"/>
|
946
1027
|
</attribute>
|
947
1028
|
</optional>
|
948
1029
|
<optional>
|
949
1030
|
<attribute name="height">
|
950
|
-
<
|
951
|
-
<data type="int"/>
|
952
|
-
<value>auto</value>
|
953
|
-
</choice>
|
1031
|
+
<ref name="ImageSize"/>
|
954
1032
|
</attribute>
|
955
1033
|
</optional>
|
956
1034
|
<optional>
|
@@ -965,6 +1043,14 @@
|
|
965
1043
|
</attribute>
|
966
1044
|
</optional>
|
967
1045
|
</define>
|
1046
|
+
<define name="ImageSize">
|
1047
|
+
<choice>
|
1048
|
+
<data type="string">
|
1049
|
+
<param name="pattern">\d+([.]\d+)?(%?)</param>
|
1050
|
+
</data>
|
1051
|
+
<value>auto</value>
|
1052
|
+
</choice>
|
1053
|
+
</define>
|
968
1054
|
<define name="video">
|
969
1055
|
<element name="video">
|
970
1056
|
<attribute name="id">
|
@@ -9,11 +9,42 @@
|
|
9
9
|
-->
|
10
10
|
<include href="biblio.rng">
|
11
11
|
<define name="BibData">
|
12
|
-
<ref name="
|
12
|
+
<ref name="StandardBibliographicItem"/>
|
13
13
|
<optional>
|
14
14
|
<ref name="ext"/>
|
15
15
|
</optional>
|
16
16
|
</define>
|
17
|
+
<define name="docrelation">
|
18
|
+
<element name="relation">
|
19
|
+
<attribute name="type">
|
20
|
+
<ref name="DocRelationType"/>
|
21
|
+
</attribute>
|
22
|
+
<optional>
|
23
|
+
<element name="description">
|
24
|
+
<ref name="FormattedString"/>
|
25
|
+
</element>
|
26
|
+
</optional>
|
27
|
+
<element name="bibitem">
|
28
|
+
<ref name="StandardReducedBibliographicItem"/>
|
29
|
+
</element>
|
30
|
+
<choice>
|
31
|
+
<zeroOrMore>
|
32
|
+
<ref name="locality"/>
|
33
|
+
</zeroOrMore>
|
34
|
+
<zeroOrMore>
|
35
|
+
<ref name="localityStack"/>
|
36
|
+
</zeroOrMore>
|
37
|
+
</choice>
|
38
|
+
<choice>
|
39
|
+
<zeroOrMore>
|
40
|
+
<ref name="sourceLocality"/>
|
41
|
+
</zeroOrMore>
|
42
|
+
<zeroOrMore>
|
43
|
+
<ref name="sourceLocalityStack"/>
|
44
|
+
</zeroOrMore>
|
45
|
+
</choice>
|
46
|
+
</element>
|
47
|
+
</define>
|
17
48
|
</include>
|
18
49
|
<define name="ext">
|
19
50
|
<element name="ext">
|
@@ -161,4 +192,16 @@
|
|
161
192
|
</optional>
|
162
193
|
</element>
|
163
194
|
</define>
|
195
|
+
<define name="StandardBibliographicItem">
|
196
|
+
<ref name="BibliographicItem"/>
|
197
|
+
<zeroOrMore>
|
198
|
+
<ref name="amend"/>
|
199
|
+
</zeroOrMore>
|
200
|
+
</define>
|
201
|
+
<define name="StandardReducedBibliographicItem">
|
202
|
+
<ref name="ReducedBibliographicItem"/>
|
203
|
+
<zeroOrMore>
|
204
|
+
<ref name="amend"/>
|
205
|
+
</zeroOrMore>
|
206
|
+
</define>
|
164
207
|
</grammar>
|
@@ -241,6 +241,9 @@
|
|
241
241
|
</element>
|
242
242
|
</define>
|
243
243
|
<define name="FullNameType">
|
244
|
+
<optional>
|
245
|
+
<ref name="name_abbreviation"/>
|
246
|
+
</optional>
|
244
247
|
<choice>
|
245
248
|
<group>
|
246
249
|
<zeroOrMore>
|
@@ -266,6 +269,11 @@
|
|
266
269
|
<ref name="variantname"/>
|
267
270
|
</zeroOrMore>
|
268
271
|
</define>
|
272
|
+
<define name="name_abbreviation">
|
273
|
+
<element name="abbreviation">
|
274
|
+
<ref name="LocalizedString"/>
|
275
|
+
</element>
|
276
|
+
</define>
|
269
277
|
<define name="prefix">
|
270
278
|
<element name="prefix">
|
271
279
|
<ref name="LocalizedString"/>
|
@@ -870,6 +878,9 @@
|
|
870
878
|
<optional>
|
871
879
|
<ref name="validity"/>
|
872
880
|
</optional>
|
881
|
+
<optional>
|
882
|
+
<ref name="depiction"/>
|
883
|
+
</optional>
|
873
884
|
</define>
|
874
885
|
<define name="btitle">
|
875
886
|
<element name="title">
|
data/lib/metanorma/jis/front.rb
CHANGED
@@ -159,7 +159,7 @@ module Metanorma
|
|
159
159
|
end
|
160
160
|
|
161
161
|
def iso_id_params_core(node)
|
162
|
-
pub = (node
|
162
|
+
pub = iso_id_pub(node)
|
163
163
|
ret = { number: node.attr("docnumber") || "0",
|
164
164
|
part: node.attr("partnumber"),
|
165
165
|
series: node.attr("docseries"),
|
@@ -17,10 +17,19 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.
|
20
|
+
<!-- VERSION v1.3.0 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
24
|
+
<define name="amend">
|
25
|
+
<element name="amend">
|
26
|
+
<ref name="BlockAttributes"/>
|
27
|
+
<ref name="AmendType"/>
|
28
|
+
<zeroOrMore>
|
29
|
+
<ref name="autonumber"/>
|
30
|
+
</zeroOrMore>
|
31
|
+
</element>
|
32
|
+
</define>
|
24
33
|
<define name="admonition">
|
25
34
|
<element name="admonition">
|
26
35
|
<attribute name="type">
|
@@ -137,6 +146,9 @@
|
|
137
146
|
<data type="boolean"/>
|
138
147
|
</attribute>
|
139
148
|
</optional>
|
149
|
+
<optional>
|
150
|
+
<attribute name="style"/>
|
151
|
+
</optional>
|
140
152
|
<oneOrMore>
|
141
153
|
<ref name="PureTextElement"/>
|
142
154
|
</oneOrMore>
|
@@ -2319,69 +2331,6 @@
|
|
2319
2331
|
<ref name="CitationType"/>
|
2320
2332
|
</element>
|
2321
2333
|
</define>
|
2322
|
-
<define name="amend">
|
2323
|
-
<element name="amend">
|
2324
|
-
<optional>
|
2325
|
-
<attribute name="id">
|
2326
|
-
<data type="ID"/>
|
2327
|
-
</attribute>
|
2328
|
-
</optional>
|
2329
|
-
<attribute name="change">
|
2330
|
-
<choice>
|
2331
|
-
<value>add</value>
|
2332
|
-
<value>modify</value>
|
2333
|
-
<value>delete</value>
|
2334
|
-
<value>replace</value>
|
2335
|
-
</choice>
|
2336
|
-
</attribute>
|
2337
|
-
<optional>
|
2338
|
-
<attribute name="path"/>
|
2339
|
-
</optional>
|
2340
|
-
<optional>
|
2341
|
-
<attribute name="path_end"/>
|
2342
|
-
</optional>
|
2343
|
-
<optional>
|
2344
|
-
<attribute name="title"/>
|
2345
|
-
</optional>
|
2346
|
-
<ref name="BlockAttributes"/>
|
2347
|
-
<optional>
|
2348
|
-
<element name="location">
|
2349
|
-
<zeroOrMore>
|
2350
|
-
<ref name="locality"/>
|
2351
|
-
</zeroOrMore>
|
2352
|
-
</element>
|
2353
|
-
</optional>
|
2354
|
-
<zeroOrMore>
|
2355
|
-
<ref name="autonumber"/>
|
2356
|
-
</zeroOrMore>
|
2357
|
-
<optional>
|
2358
|
-
<element name="description">
|
2359
|
-
<zeroOrMore>
|
2360
|
-
<ref name="BasicBlock"/>
|
2361
|
-
</zeroOrMore>
|
2362
|
-
</element>
|
2363
|
-
</optional>
|
2364
|
-
<optional>
|
2365
|
-
<element name="newcontent">
|
2366
|
-
<optional>
|
2367
|
-
<attribute name="id">
|
2368
|
-
<data type="ID"/>
|
2369
|
-
</attribute>
|
2370
|
-
</optional>
|
2371
|
-
<zeroOrMore>
|
2372
|
-
<ref name="BasicBlock"/>
|
2373
|
-
</zeroOrMore>
|
2374
|
-
</element>
|
2375
|
-
</optional>
|
2376
|
-
<optional>
|
2377
|
-
<element name="description">
|
2378
|
-
<zeroOrMore>
|
2379
|
-
<ref name="BasicBlock"/>
|
2380
|
-
</zeroOrMore>
|
2381
|
-
</element>
|
2382
|
-
</optional>
|
2383
|
-
</element>
|
2384
|
-
</define>
|
2385
2334
|
<define name="autonumber">
|
2386
2335
|
<element name="autonumber">
|
2387
2336
|
<attribute name="type">
|
data/lib/metanorma/jis/reqt.rng
CHANGED
@@ -207,20 +207,4 @@
|
|
207
207
|
<value>permission</value>
|
208
208
|
</choice>
|
209
209
|
</define>
|
210
|
-
<define name="classification">
|
211
|
-
<element name="classification">
|
212
|
-
<ref name="classification_tag"/>
|
213
|
-
<ref name="classification_value"/>
|
214
|
-
</element>
|
215
|
-
</define>
|
216
|
-
<define name="classification_tag">
|
217
|
-
<element name="tag">
|
218
|
-
<text/>
|
219
|
-
</element>
|
220
|
-
</define>
|
221
|
-
<define name="classification_value">
|
222
|
-
<element name="value">
|
223
|
-
<text/>
|
224
|
-
</element>
|
225
|
-
</define>
|
226
210
|
</grammar>
|
data/metanorma-jis.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
32
32
|
|
33
33
|
spec.add_dependency "japanese_calendar", "~> 0"
|
34
|
-
spec.add_dependency "metanorma-iso", "~> 2.
|
34
|
+
spec.add_dependency "metanorma-iso", "~> 2.7.0"
|
35
35
|
spec.add_dependency "pubid-jis"
|
36
36
|
|
37
37
|
spec.add_development_dependency "debug"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: japanese_calendar
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.7.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.7.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pubid-jis
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|