metanorma-cc 2.7.0 → 2.7.2
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 +4 -4
- data/README.adoc +1 -1
- data/lib/isodoc/cc/cc.standard.xsl +123 -33
- data/lib/isodoc/cc/metadata.rb +5 -2
- data/lib/metanorma/cc/basicdoc.rng +1 -1
- data/lib/metanorma/cc/biblio-standoc.rng +0 -49
- data/lib/metanorma/cc/biblio.rng +11 -1
- data/lib/metanorma/cc/converter.rb +0 -15
- data/lib/metanorma/cc/isodoc.rng +7 -60
- data/lib/metanorma/cc/relaton-cc.rng +0 -15
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +1 -1
- data/metanorma.yml +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3917b61450c3f05e1ad1334238db14e403978ad43086f5b4f3c82a33be560b7
|
4
|
+
data.tar.gz: 9040216710ff9b11ace3fcd58c521c32b0bd70786224ef0ade142456d9b80a01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb51d8d34704bad1f8da99e4786bc57811b55f53cae917bca44f29e5b01c6dd3cb2236f079c0eda17b7b1506f22f0ef8f5e0cf66b393747bed060de8c72aacb1
|
7
|
+
data.tar.gz: 28bb1190b80152a151da5a848f6bf98d1c775335f4204738370461c2c2d43f215cd649c6f00c9a40cd76ff0b98866951c1f49ffbf81feda84c80b66bb125f3af
|
data/README.adoc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/metanorma-cc.svg["Gem Version", link="https://rubygems.org/gems/metanorma-cc"]
|
4
4
|
image:https://github.com/metanorma/metanorma-cc/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-cc/actions?workflow=rake"]
|
5
|
-
image:https://codeclimate.com/github/metanorma/metanorma-cc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-cc"]
|
5
|
+
// image:https://codeclimate.com/github/metanorma/metanorma-cc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-cc"]
|
6
6
|
image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-cc.svg["Pull Requests", link="https://github.com/metanorma/metanorma-cc/pulls"]
|
7
7
|
image:https://img.shields.io/github/commits-since/metanorma/metanorma-cc/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-cc/releases"]
|
8
8
|
|
@@ -300,7 +300,8 @@
|
|
300
300
|
<fo:block margin-bottom="12pt">
|
301
301
|
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name"/>
|
302
302
|
<xsl:text> TC </xsl:text>
|
303
|
-
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/>
|
303
|
+
<!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/> -->
|
304
|
+
<xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Technical committee']/mn:name"/>
|
304
305
|
<xsl:text> </xsl:text>
|
305
306
|
</fo:block>
|
306
307
|
</fo:block>
|
@@ -2208,13 +2209,23 @@
|
|
2208
2209
|
<xsl:attribute-set name="copyright-statement-style">
|
2209
2210
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
2210
2211
|
|
2212
|
+
<xsl:template name="refine_copyright-statement-style">
|
2213
|
+
</xsl:template>
|
2214
|
+
|
2211
2215
|
<xsl:attribute-set name="copyright-statement-title-style">
|
2212
2216
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
2213
2217
|
|
2218
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
2219
|
+
</xsl:template>
|
2220
|
+
|
2214
2221
|
<xsl:attribute-set name="copyright-statement-p-style">
|
2215
2222
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
2216
2223
|
|
2217
|
-
|
2224
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
2225
|
+
|
2226
|
+
</xsl:template>
|
2227
|
+
|
2228
|
+
<xsl:attribute-set name="license-statement-style">
|
2218
2229
|
</xsl:attribute-set> <!-- license-statement-style -->
|
2219
2230
|
|
2220
2231
|
<xsl:attribute-set name="license-statement-title-style">
|
@@ -2224,6 +2235,10 @@
|
|
2224
2235
|
<xsl:attribute-set name="license-statement-p-style">
|
2225
2236
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
2226
2237
|
|
2238
|
+
<xsl:template name="refine_license-statement-p-style">
|
2239
|
+
|
2240
|
+
</xsl:template>
|
2241
|
+
|
2227
2242
|
<xsl:attribute-set name="legal-statement-style">
|
2228
2243
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
2229
2244
|
|
@@ -2251,6 +2266,8 @@
|
|
2251
2266
|
<!-- ================================= -->
|
2252
2267
|
<xsl:template match="mn:copyright-statement">
|
2253
2268
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
2269
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
2270
|
+
|
2254
2271
|
<xsl:apply-templates/>
|
2255
2272
|
</fo:block>
|
2256
2273
|
</xsl:template> <!-- copyright-statement -->
|
@@ -3347,7 +3364,7 @@
|
|
3347
3364
|
</xsl:otherwise>
|
3348
3365
|
</xsl:choose>
|
3349
3366
|
</xsl:variable>
|
3350
|
-
<xsl:if test="$key = 'font-family' or
|
3367
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
3351
3368
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
3352
3369
|
</xsl:if>
|
3353
3370
|
<xsl:if test="$key = 'text-indent'">
|
@@ -10082,7 +10099,7 @@
|
|
10082
10099
|
|
10083
10100
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
10084
10101
|
<xsl:param name="leader_length">30%</xsl:param>
|
10085
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
10102
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
10086
10103
|
<fo:block>
|
10087
10104
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
10088
10105
|
</fo:block>
|
@@ -10844,13 +10861,31 @@
|
|
10844
10861
|
<!-- skip here, see the template 'fmt-review-start' -->
|
10845
10862
|
</xsl:when>
|
10846
10863
|
<xsl:otherwise>
|
10847
|
-
|
10848
|
-
|
10849
|
-
|
10850
|
-
|
10864
|
+
<xsl:choose>
|
10865
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
10866
|
+
<fo:block font-size="1pt" line-height="0.1">
|
10867
|
+
<xsl:call-template name="fo_inline_bookmark">
|
10868
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
10869
|
+
</xsl:call-template>
|
10870
|
+
</fo:block>
|
10871
|
+
</xsl:when>
|
10872
|
+
<xsl:otherwise>
|
10873
|
+
<xsl:call-template name="fo_inline_bookmark">
|
10874
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
10875
|
+
</xsl:call-template>
|
10876
|
+
</xsl:otherwise>
|
10877
|
+
</xsl:choose>
|
10851
10878
|
</xsl:otherwise>
|
10852
10879
|
</xsl:choose>
|
10853
10880
|
</xsl:template>
|
10881
|
+
|
10882
|
+
<xsl:template name="fo_inline_bookmark">
|
10883
|
+
<xsl:param name="bookmark_id"/>
|
10884
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
10885
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
10886
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
10887
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
10888
|
+
</xsl:template>
|
10854
10889
|
<!-- =================== -->
|
10855
10890
|
<!-- End of Index processing -->
|
10856
10891
|
<!-- =================== -->
|
@@ -10959,9 +10994,15 @@
|
|
10959
10994
|
<xsl:attribute name="role">H1</xsl:attribute>
|
10960
10995
|
</xsl:attribute-set>
|
10961
10996
|
|
10997
|
+
<xsl:template name="refine_toc-title-style">
|
10998
|
+
</xsl:template>
|
10999
|
+
|
10962
11000
|
<xsl:attribute-set name="toc-title-page-style">
|
10963
11001
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
10964
11002
|
|
11003
|
+
<xsl:template name="refine_toc-title-page-style">
|
11004
|
+
</xsl:template>
|
11005
|
+
|
10965
11006
|
<xsl:attribute-set name="toc-item-block-style">
|
10966
11007
|
</xsl:attribute-set>
|
10967
11008
|
|
@@ -10992,6 +11033,9 @@
|
|
10992
11033
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
10993
11034
|
</xsl:attribute-set>
|
10994
11035
|
|
11036
|
+
<xsl:template name="refine_toc-listof-title-style">
|
11037
|
+
</xsl:template>
|
11038
|
+
|
10995
11039
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
10996
11040
|
<xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
|
10997
11041
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -11342,7 +11386,7 @@
|
|
11342
11386
|
</xsl:if>
|
11343
11387
|
|
11344
11388
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
11345
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
11389
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
11346
11390
|
<xsl:if test="@bundle = 'true'">
|
11347
11391
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
11348
11392
|
</xsl:if>
|
@@ -11376,7 +11420,7 @@
|
|
11376
11420
|
</xsl:choose>
|
11377
11421
|
</fo:bookmark-title>
|
11378
11422
|
|
11379
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
11423
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
11380
11424
|
|
11381
11425
|
<xsl:call-template name="insertFigureBookmarks">
|
11382
11426
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -12729,11 +12773,35 @@
|
|
12729
12773
|
|
12730
12774
|
<xsl:template match="mn:svgmap"/>
|
12731
12775
|
|
12776
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
12777
|
+
|
12732
12778
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
12733
12779
|
<xsl:template match="*[local-name() = 'lang_none']">
|
12734
12780
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
12735
12781
|
</xsl:template>
|
12736
12782
|
|
12783
|
+
<xsl:template name="addTagElementT">
|
12784
|
+
<xsl:variable name="title_">
|
12785
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
12786
|
+
</xsl:variable>
|
12787
|
+
<xsl:variable name="title__">
|
12788
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
12789
|
+
<xsl:choose>
|
12790
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
12791
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
12792
|
+
</xsl:choose>
|
12793
|
+
</xsl:for-each>
|
12794
|
+
</xsl:variable>
|
12795
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
12796
|
+
<xsl:if test="$title != ''">
|
12797
|
+
<xsl:attribute name="fox:title">
|
12798
|
+
<xsl:if test="ancestor::mn:sections">
|
12799
|
+
<xsl:text>Section </xsl:text>
|
12800
|
+
</xsl:if>
|
12801
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
12802
|
+
</xsl:if>
|
12803
|
+
</xsl:template>
|
12804
|
+
|
12737
12805
|
<xsl:template name="replaceChar">
|
12738
12806
|
<xsl:param name="text"/>
|
12739
12807
|
<xsl:param name="replace"/>
|
@@ -13500,6 +13568,13 @@
|
|
13500
13568
|
<xsl:with-param name="default" select="$text_align_default"/>
|
13501
13569
|
</xsl:call-template>
|
13502
13570
|
<xsl:call-template name="setKeepAttributes"/>
|
13571
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
13572
|
+
<xsl:variable name="styles">
|
13573
|
+
<xsl:apply-templates select="*[1]"/>
|
13574
|
+
</xsl:variable>
|
13575
|
+
<!-- move attribute line-height from inline to block -->
|
13576
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
13577
|
+
</xsl:if>
|
13503
13578
|
</xsl:template>
|
13504
13579
|
|
13505
13580
|
<xsl:template name="setKeepAttributes">
|
@@ -13525,34 +13600,41 @@
|
|
13525
13600
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13526
13601
|
<fo:block>
|
13527
13602
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
13528
|
-
|
13529
|
-
|
13530
|
-
|
13531
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
13532
|
-
<xsl:call-template name="getSVG"/>
|
13533
|
-
</fo:instream-foreign-object>
|
13534
|
-
</xsl:when>
|
13535
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
13536
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
13537
|
-
</xsl:when>
|
13538
|
-
<xsl:otherwise> <!-- bitmap image -->
|
13539
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
13540
|
-
<xsl:if test="$coverimage_src != ''">
|
13541
|
-
<xsl:variable name="coverpage">
|
13542
|
-
<xsl:call-template name="getImageURL">
|
13543
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
13544
|
-
</xsl:call-template>
|
13545
|
-
</xsl:variable>
|
13546
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
13547
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
13548
|
-
</xsl:if>
|
13549
|
-
</xsl:otherwise>
|
13550
|
-
</xsl:choose>
|
13603
|
+
|
13604
|
+
<xsl:call-template name="insertPageImage"/>
|
13605
|
+
|
13551
13606
|
</xsl:for-each>
|
13552
13607
|
</fo:block>
|
13553
13608
|
</fo:block-container>
|
13554
13609
|
</xsl:template>
|
13555
13610
|
|
13611
|
+
<xsl:template name="insertPageImage">
|
13612
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
13613
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
13614
|
+
<xsl:choose>
|
13615
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
13616
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
13617
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
13618
|
+
<xsl:call-template name="getSVG"/>
|
13619
|
+
</fo:instream-foreign-object>
|
13620
|
+
</xsl:when>
|
13621
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
13622
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
13623
|
+
</xsl:when>
|
13624
|
+
<xsl:otherwise> <!-- bitmap image -->
|
13625
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
13626
|
+
<xsl:if test="$coverimage_src != ''">
|
13627
|
+
<xsl:variable name="coverpage">
|
13628
|
+
<xsl:call-template name="getImageURL">
|
13629
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
13630
|
+
</xsl:call-template>
|
13631
|
+
</xsl:variable>
|
13632
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
13633
|
+
</xsl:if>
|
13634
|
+
</xsl:otherwise>
|
13635
|
+
</xsl:choose>
|
13636
|
+
</xsl:template>
|
13637
|
+
|
13556
13638
|
<xsl:template name="getImageURL">
|
13557
13639
|
<xsl:param name="src"/>
|
13558
13640
|
<xsl:choose>
|
@@ -13980,6 +14062,14 @@
|
|
13980
14062
|
</xsl:attribute>
|
13981
14063
|
</xsl:template>
|
13982
14064
|
|
14065
|
+
<xsl:template name="getCharByCodePoint">
|
14066
|
+
<xsl:param name="codepoint"/>
|
14067
|
+
<xsl:param name="radix">16</xsl:param>
|
14068
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
14069
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
14070
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
14071
|
+
</xsl:template>
|
14072
|
+
|
13983
14073
|
<xsl:template name="substring-after-last">
|
13984
14074
|
<xsl:param name="value"/>
|
13985
14075
|
<xsl:param name="delimiter"/>
|
data/lib/isodoc/cc/metadata.rb
CHANGED
@@ -14,7 +14,8 @@ module IsoDoc
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def title(isoxml, _out)
|
17
|
-
main = isoxml.at(ns("//bibdata/title[@language='en']"))
|
17
|
+
main = isoxml.at(ns("//bibdata/title[@language='en']"))
|
18
|
+
&.children&.to_xml
|
18
19
|
set(:doctitle, main)
|
19
20
|
end
|
20
21
|
|
@@ -23,7 +24,9 @@ module IsoDoc
|
|
23
24
|
end
|
24
25
|
|
25
26
|
def author(isoxml, _out)
|
26
|
-
tc = isoxml.at(ns("//bibdata/
|
27
|
+
tc = isoxml.at(ns("//bibdata/contributor[role/@type = 'author']" \
|
28
|
+
"[role/description = 'committee']/organization/subdivision" \
|
29
|
+
"[@type = 'Technical committee']/name"))
|
27
30
|
set(:tc, tc.text) if tc
|
28
31
|
super
|
29
32
|
end
|
@@ -1291,13 +1291,13 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
1291
1291
|
<ref name="pure_strike"/>
|
1292
1292
|
<ref name="pure_smallcap"/>
|
1293
1293
|
<ref name="br"/>
|
1294
|
+
<ref name="stem"/>
|
1294
1295
|
</choice>
|
1295
1296
|
</define>
|
1296
1297
|
<define name="NestedTextElement">
|
1297
1298
|
<a:documentation>Contents of TextElement tags: leaves out tags that should occur only at top level of block: bookmark image hr pagebreak</a:documentation>
|
1298
1299
|
<choice>
|
1299
1300
|
<ref name="PureTextElement"/>
|
1300
|
-
<ref name="stem"/>
|
1301
1301
|
<ref name="eref"/>
|
1302
1302
|
<ref name="xref"/>
|
1303
1303
|
<ref name="hyperlink"/>
|
@@ -76,12 +76,6 @@ from other documents in the same doctype</a:documentation>
|
|
76
76
|
<ref name="flavor">
|
77
77
|
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
78
78
|
</ref>
|
79
|
-
<optional>
|
80
|
-
<ref name="editorialgroup">
|
81
|
-
<a:documentation>Groups associated with the production of the standards document, typically within
|
82
|
-
a standards definition organization</a:documentation>
|
83
|
-
</ref>
|
84
|
-
</optional>
|
85
79
|
<zeroOrMore>
|
86
80
|
<ref name="ics">
|
87
81
|
<a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
|
@@ -130,49 +124,6 @@ a standards definition organization</a:documentation>
|
|
130
124
|
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
131
125
|
<text/>
|
132
126
|
</define>
|
133
|
-
<define name="editorialgroup">
|
134
|
-
<a:documentation>A group associated with the production of the standards document, typically within
|
135
|
-
a standards definition organization</a:documentation>
|
136
|
-
<element name="editorialgroup">
|
137
|
-
<oneOrMore>
|
138
|
-
<ref name="technical-committee">
|
139
|
-
<a:documentation>A technical committee associated with the production of the standards document</a:documentation>
|
140
|
-
</ref>
|
141
|
-
</oneOrMore>
|
142
|
-
</element>
|
143
|
-
</define>
|
144
|
-
<define name="technical-committee">
|
145
|
-
<a:documentation>Technical committee associated with the production of a standards document</a:documentation>
|
146
|
-
<element name="technical-committee">
|
147
|
-
<ref name="IsoWorkgroup"/>
|
148
|
-
</element>
|
149
|
-
</define>
|
150
|
-
<define name="IsoWorkgroup">
|
151
|
-
<optional>
|
152
|
-
<attribute name="number">
|
153
|
-
<a:documentation>Numeric identifier of the technical committee</a:documentation>
|
154
|
-
</attribute>
|
155
|
-
</optional>
|
156
|
-
<optional>
|
157
|
-
<attribute name="type">
|
158
|
-
<a:documentation>Type of the technical committee, used in identifying the technical committee</a:documentation>
|
159
|
-
</attribute>
|
160
|
-
</optional>
|
161
|
-
<optional>
|
162
|
-
<attribute name="identifier">
|
163
|
-
<a:documentation>Non-numeric, complete identifier of the technical committee</a:documentation>
|
164
|
-
</attribute>
|
165
|
-
</optional>
|
166
|
-
<optional>
|
167
|
-
<attribute name="prefix">
|
168
|
-
<a:documentation>Disambiguating prefix added to number to form the identifier of the technical committee,
|
169
|
-
typically indicating its type</a:documentation>
|
170
|
-
</attribute>
|
171
|
-
</optional>
|
172
|
-
<text>
|
173
|
-
<a:documentation>Name of the technical committee</a:documentation>
|
174
|
-
</text>
|
175
|
-
</define>
|
176
127
|
<define name="ics">
|
177
128
|
<a:documentation>Classification taken from the International Classification of Standards.
|
178
129
|
ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
|
data/lib/metanorma/cc/biblio.rng
CHANGED
@@ -242,6 +242,8 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
|
|
242
242
|
</choice>
|
243
243
|
</define>
|
244
244
|
<define name="roledescription">
|
245
|
+
<a:documentation>A more detailed description of the role of the contributor
|
246
|
+
Some descriptions are reserved words; in particular, the editorial committee of a standard has the role description "committee"</a:documentation>
|
245
247
|
<element name="description">
|
246
248
|
<ref name="LocalizedMarkedUpString"/>
|
247
249
|
</element>
|
@@ -443,7 +445,10 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
443
445
|
</oneOrMore>
|
444
446
|
<zeroOrMore>
|
445
447
|
<ref name="subdivision">
|
446
|
-
<a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item
|
448
|
+
<a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item.
|
449
|
+
Multiple subdivisions can be specified for an organization, with no implication of hierarchical
|
450
|
+
relation between them
|
451
|
+
Editorial and advisory groups are represented as consecutive subdivisions of the SDO</a:documentation>
|
447
452
|
</ref>
|
448
453
|
</zeroOrMore>
|
449
454
|
<optional>
|
@@ -485,6 +490,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
485
490
|
<a:documentation>The type of subdivision</a:documentation>
|
486
491
|
</attribute>
|
487
492
|
</optional>
|
493
|
+
<optional>
|
494
|
+
<attribute name="subtype">
|
495
|
+
<a:documentation>The subtype of subdivision; e.g. different types of technical committee</a:documentation>
|
496
|
+
</attribute>
|
497
|
+
</optional>
|
488
498
|
<ref name="OrganizationType">
|
489
499
|
<a:documentation>The subdivision, modelled recursively as an organization</a:documentation>
|
490
500
|
</ref>
|
@@ -16,21 +16,6 @@ module Metanorma
|
|
16
16
|
Metanorma::Cc.configuration
|
17
17
|
end
|
18
18
|
|
19
|
-
def metadata_committee(node, xml)
|
20
|
-
return unless node.attr("technical-committee")
|
21
|
-
|
22
|
-
xml.editorialgroup do |a|
|
23
|
-
a.committee node.attr("technical-committee"),
|
24
|
-
**attr_code(type: node.attr("technical-committee-type"))
|
25
|
-
i = 2
|
26
|
-
while node.attr("technical-committee_#{i}")
|
27
|
-
a.committee node.attr("technical-committee_#{i}"),
|
28
|
-
**attr_code(type: node.attr("technical-committee-type_#{i}"))
|
29
|
-
i += 1
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
19
|
def outputs(node, ret)
|
35
20
|
File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
|
36
21
|
presentation_xml_converter(node).convert("#{@filename}.xml")
|
data/lib/metanorma/cc/isodoc.rng
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<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">
|
3
|
-
<!-- VERSION v2.1.
|
3
|
+
<!-- VERSION v2.1.1 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -42,36 +42,6 @@ All IdRefType instances point not to `@id` in Semantic XML, which is the Content
|
|
42
42
|
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
43
|
<text/>
|
44
44
|
</define>
|
45
|
-
<define name="index-primary">
|
46
|
-
<element name="primary">
|
47
|
-
<oneOrMore>
|
48
|
-
<choice>
|
49
|
-
<ref name="PureTextElement"/>
|
50
|
-
<ref name="stem"/>
|
51
|
-
</choice>
|
52
|
-
</oneOrMore>
|
53
|
-
</element>
|
54
|
-
</define>
|
55
|
-
<define name="index-secondary">
|
56
|
-
<element name="secondary">
|
57
|
-
<oneOrMore>
|
58
|
-
<choice>
|
59
|
-
<ref name="PureTextElement"/>
|
60
|
-
<ref name="stem"/>
|
61
|
-
</choice>
|
62
|
-
</oneOrMore>
|
63
|
-
</element>
|
64
|
-
</define>
|
65
|
-
<define name="index-tertiary">
|
66
|
-
<element name="tertiary">
|
67
|
-
<oneOrMore>
|
68
|
-
<choice>
|
69
|
-
<ref name="PureTextElement"/>
|
70
|
-
<ref name="stem"/>
|
71
|
-
</choice>
|
72
|
-
</oneOrMore>
|
73
|
-
</element>
|
74
|
-
</define>
|
75
45
|
<define name="review">
|
76
46
|
<a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
|
77
47
|
the type attribute defaults to `review` for reviews</a:documentation>
|
@@ -592,28 +562,6 @@ normative or informative references, some split references into sections organiz
|
|
592
562
|
</oneOrMore>
|
593
563
|
</element>
|
594
564
|
</define>
|
595
|
-
<define name="sub">
|
596
|
-
<a:documentation>Subscript text. Corresponds to HTML `sub</a:documentation>
|
597
|
-
<element name="sub">
|
598
|
-
<zeroOrMore>
|
599
|
-
<choice>
|
600
|
-
<ref name="PureTextElement"/>
|
601
|
-
<ref name="stem"/>
|
602
|
-
</choice>
|
603
|
-
</zeroOrMore>
|
604
|
-
</element>
|
605
|
-
</define>
|
606
|
-
<define name="sup">
|
607
|
-
<a:documentation>Superscript text. Corresponds to HTML `sup`</a:documentation>
|
608
|
-
<element name="sup">
|
609
|
-
<zeroOrMore>
|
610
|
-
<choice>
|
611
|
-
<ref name="PureTextElement"/>
|
612
|
-
<ref name="stem"/>
|
613
|
-
</choice>
|
614
|
-
</zeroOrMore>
|
615
|
-
</element>
|
616
|
-
</define>
|
617
565
|
<define name="pagebreak">
|
618
566
|
<a:documentation>Page break. Only applicable in paged layouts (e.g. PDF, Word), and not flow layouts (e.g. HTML)</a:documentation>
|
619
567
|
<element name="pagebreak">
|
@@ -1094,7 +1042,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1094
1042
|
<zeroOrMore>
|
1095
1043
|
<choice>
|
1096
1044
|
<ref name="PureTextElement"/>
|
1097
|
-
<ref name="stem"/>
|
1098
1045
|
<ref name="index"/>
|
1099
1046
|
<ref name="index-xref"/>
|
1100
1047
|
</choice>
|
@@ -1107,7 +1054,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1107
1054
|
<zeroOrMore>
|
1108
1055
|
<choice>
|
1109
1056
|
<ref name="PureTextElement"/>
|
1110
|
-
<ref name="stem"/>
|
1111
1057
|
<ref name="index"/>
|
1112
1058
|
<ref name="index-xref"/>
|
1113
1059
|
</choice>
|
@@ -2025,10 +1971,7 @@ used in document amendments</a:documentation>
|
|
2025
1971
|
<element name="name">
|
2026
1972
|
<a:documentation>The symbolic form of the designation</a:documentation>
|
2027
1973
|
<oneOrMore>
|
2028
|
-
<
|
2029
|
-
<ref name="PureTextElement"/>
|
2030
|
-
<ref name="stem"/>
|
2031
|
-
</choice>
|
1974
|
+
<ref name="PureTextElement"/>
|
2032
1975
|
</oneOrMore>
|
2033
1976
|
</element>
|
2034
1977
|
</element>
|
@@ -2081,7 +2024,6 @@ used in document amendments</a:documentation>
|
|
2081
2024
|
<zeroOrMore>
|
2082
2025
|
<choice>
|
2083
2026
|
<ref name="PureTextElement"/>
|
2084
|
-
<ref name="stem"/>
|
2085
2027
|
<ref name="index"/>
|
2086
2028
|
<ref name="index-xref"/>
|
2087
2029
|
</choice>
|
@@ -2291,6 +2233,11 @@ used in document amendments</a:documentation>
|
|
2291
2233
|
<ref name="RequiredId"/>
|
2292
2234
|
<ref name="NumberingAttributes"/>
|
2293
2235
|
<ref name="BlockAttributes"/>
|
2236
|
+
<optional>
|
2237
|
+
<attribute name="type">
|
2238
|
+
<a:documentation>Semantic classification of note</a:documentation>
|
2239
|
+
</attribute>
|
2240
|
+
</optional>
|
2294
2241
|
<oneOrMore>
|
2295
2242
|
<choice>
|
2296
2243
|
<a:documentation>Content of the term note</a:documentation>
|
@@ -14,20 +14,5 @@
|
|
14
14
|
<value>advisory</value>
|
15
15
|
</choice>
|
16
16
|
</define>
|
17
|
-
<define name="editorialgroup">
|
18
|
-
<element name="editorialgroup">
|
19
|
-
<oneOrMore>
|
20
|
-
<ref name="technical-committee"/>
|
21
|
-
</oneOrMore>
|
22
|
-
</element>
|
23
|
-
</define>
|
24
|
-
<define name="technical-committee">
|
25
|
-
<element name="committee">
|
26
|
-
<optional>
|
27
|
-
<attribute name="type"/>
|
28
|
-
</optional>
|
29
|
-
<text/>
|
30
|
-
</element>
|
31
|
-
</define>
|
32
17
|
</include>
|
33
18
|
</grammar>
|
data/lib/metanorma/cc/version.rb
CHANGED
data/metanorma-cc.gemspec
CHANGED
@@ -42,5 +42,5 @@ spec.add_development_dependency "rubocop-performance"
|
|
42
42
|
spec.add_development_dependency "sassc-embedded", "~> 1"
|
43
43
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
44
44
|
spec.add_development_dependency "timecop", "~> 0.9"
|
45
|
-
spec.add_development_dependency "
|
45
|
+
spec.add_development_dependency "canon"
|
46
46
|
end
|
data/metanorma.yml
CHANGED
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: 2.7.
|
4
|
+
version: 2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0.9'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: canon
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ">="
|