metanorma-jis 0.3.1 → 0.3.2
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/html/style-human.css +40 -0
- data/lib/isodoc/jis/html/style-iso.css +40 -0
- data/lib/isodoc/jis/jis.international-standard.xsl +104 -48
- data/lib/isodoc/jis/presentation_xml_convert.rb +1 -1
- data/lib/isodoc/jis/word_cleanup.rb +6 -2
- data/lib/metanorma/jis/cleanup.rb +31 -0
- data/lib/metanorma/jis/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: 1705b0a1189c3766e1a185447e7ca92fa6c55ceebcb394f12d51782dbbe98a6e
|
4
|
+
data.tar.gz: 9e549d8aaba6c21294d6314c980e79de90bd92f9172cf29f056199a5af1f135b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef60ef6cce41c377a25975953d216a707b6621923b9d88a4202535b59a1bc7e9de8a6548be68718c51fb5df05c5e91a3f432b171f67f8e1112f3d42ddcd00cb3
|
7
|
+
data.tar.gz: 1adc24ff72b309f1ccea730e3a047fc89d9678e489ec8f3d62c1213a26513babe1890a67a571fa33b4c804426f91fffdee28661a89a40025434ed02b41ecab72
|
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
|
|
229
229
|
.inline-header:hover > a.anchor {
|
230
230
|
visibility: visible; }
|
231
231
|
|
232
|
+
/* collapsible snippets: collapsible before hidable */
|
233
|
+
.hidable {
|
234
|
+
max-height: 0;
|
235
|
+
overflow: hidden;
|
236
|
+
transition: max-height 0.2s ease-out; }
|
237
|
+
|
238
|
+
.collapsible {
|
239
|
+
background-color: #777;
|
240
|
+
color: white;
|
241
|
+
cursor: pointer;
|
242
|
+
padding: 12px 0;
|
243
|
+
margin: 0;
|
244
|
+
width: 100%;
|
245
|
+
border: none;
|
246
|
+
text-align: left;
|
247
|
+
outline: none;
|
248
|
+
font-size: 15px; }
|
249
|
+
|
250
|
+
.active, .collapsible:hover {
|
251
|
+
background-color: #555; }
|
252
|
+
|
253
|
+
.collapsible:after {
|
254
|
+
content: '\25bc';
|
255
|
+
color: white;
|
256
|
+
font-weight: bold;
|
257
|
+
float: right;
|
258
|
+
margin-left: 12px;
|
259
|
+
margin-right: 12px; }
|
260
|
+
|
261
|
+
.active:after {
|
262
|
+
content: "\25b2"; }
|
263
|
+
|
264
|
+
/* collapsible: */
|
265
|
+
.collapsible + .hidable {
|
266
|
+
margin-top: 0; }
|
267
|
+
|
268
|
+
.collapsible:not(.active) + .hidable {
|
269
|
+
overflow: hidden;
|
270
|
+
padding: 0; }
|
271
|
+
|
232
272
|
#standard-band {
|
233
273
|
background-color: #0AC442; }
|
234
274
|
|
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
|
|
229
229
|
.inline-header:hover > a.anchor {
|
230
230
|
visibility: visible; }
|
231
231
|
|
232
|
+
/* collapsible snippets: collapsible before hidable */
|
233
|
+
.hidable {
|
234
|
+
max-height: 0;
|
235
|
+
overflow: hidden;
|
236
|
+
transition: max-height 0.2s ease-out; }
|
237
|
+
|
238
|
+
.collapsible {
|
239
|
+
background-color: #777;
|
240
|
+
color: white;
|
241
|
+
cursor: pointer;
|
242
|
+
padding: 12px 0;
|
243
|
+
margin: 0;
|
244
|
+
width: 100%;
|
245
|
+
border: none;
|
246
|
+
text-align: left;
|
247
|
+
outline: none;
|
248
|
+
font-size: 15px; }
|
249
|
+
|
250
|
+
.active, .collapsible:hover {
|
251
|
+
background-color: #555; }
|
252
|
+
|
253
|
+
.collapsible:after {
|
254
|
+
content: '\25bc';
|
255
|
+
color: white;
|
256
|
+
font-weight: bold;
|
257
|
+
float: right;
|
258
|
+
margin-left: 12px;
|
259
|
+
margin-right: 12px; }
|
260
|
+
|
261
|
+
.active:after {
|
262
|
+
content: "\25b2"; }
|
263
|
+
|
264
|
+
/* collapsible: */
|
265
|
+
.collapsible + .hidable {
|
266
|
+
margin-top: 0; }
|
267
|
+
|
268
|
+
.collapsible:not(.active) + .hidable {
|
269
|
+
overflow: hidden;
|
270
|
+
padding: 0; }
|
271
|
+
|
232
272
|
#standard-band {
|
233
273
|
background-color: #0AC442; }
|
234
274
|
|
@@ -251,7 +251,7 @@
|
|
251
251
|
<!-- Contents and preface pages -->
|
252
252
|
<!-- ========================== -->
|
253
253
|
|
254
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
254
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'clause' and @type = 'contributors')]">
|
255
255
|
<xsl:sort select="@displayorder" data-type="number"/>
|
256
256
|
|
257
257
|
<xsl:choose>
|
@@ -1427,12 +1427,16 @@
|
|
1427
1427
|
|
1428
1428
|
<xsl:template match="jis:p//text()[not(ancestor::jis:strong)] | jis:dt/text()" mode="update_xml_step1">
|
1429
1429
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_open,'$1',$tag_font_en_close))"/>
|
1430
|
-
<xsl:variable name="text_en"
|
1431
|
-
<xsl:
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1430
|
+
<xsl:variable name="text_en">
|
1431
|
+
<xsl:element name="text" namespace="{$namespace_full}">
|
1432
|
+
<xsl:call-template name="replace_text_tags">
|
1433
|
+
<xsl:with-param name="tag_open" select="$tag_font_en_open"/>
|
1434
|
+
<xsl:with-param name="tag_close" select="$tag_font_en_close"/>
|
1435
|
+
<xsl:with-param name="text" select="$text_en_"/>
|
1436
|
+
</xsl:call-template>
|
1437
|
+
</xsl:element>
|
1438
|
+
</xsl:variable>
|
1439
|
+
<xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
1436
1440
|
</xsl:template>
|
1437
1441
|
|
1438
1442
|
<!-- jis:term/jis:preferred2//text() | -->
|
@@ -1440,24 +1444,32 @@
|
|
1440
1444
|
<!-- <name>注記 1</name> to <name>注記<font_en> 1</font_en></name> -->
|
1441
1445
|
<xsl:template match="jis:title/text() | jis:note/jis:name/text() | jis:termnote/jis:name/text() | jis:table/jis:name/text() | jis:figure/jis:name/text() | jis:termexample/jis:name/text() | jis:xref//text() | jis:origin/text()" mode="update_xml_step1">
|
1442
1446
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1443
|
-
<xsl:variable name="text_en"
|
1444
|
-
<xsl:
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1447
|
+
<xsl:variable name="text_en">
|
1448
|
+
<xsl:element name="text" namespace="{$namespace_full}">
|
1449
|
+
<xsl:call-template name="replace_text_tags">
|
1450
|
+
<xsl:with-param name="tag_open" select="$tag_font_en_bold_open"/>
|
1451
|
+
<xsl:with-param name="tag_close" select="$tag_font_en_bold_close"/>
|
1452
|
+
<xsl:with-param name="text" select="$text_en_"/>
|
1453
|
+
</xsl:call-template>
|
1454
|
+
</xsl:element>
|
1455
|
+
</xsl:variable>
|
1456
|
+
<xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
1449
1457
|
</xsl:template>
|
1450
1458
|
|
1451
1459
|
<!-- for $contents -->
|
1452
1460
|
<xsl:template match="title/text()">
|
1453
1461
|
<xsl:variable name="regex_en_contents">([^\u00A0\u2002-\u200B\u3000-\u9FFF\uF900-\uFFFF\(\)]{1,})</xsl:variable>
|
1454
1462
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en_contents, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1455
|
-
<xsl:variable name="text_en"
|
1456
|
-
<xsl:
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1463
|
+
<xsl:variable name="text_en">
|
1464
|
+
<xsl:element name="text" namespace="{$namespace_full}">
|
1465
|
+
<xsl:call-template name="replace_text_tags">
|
1466
|
+
<xsl:with-param name="tag_open" select="$tag_font_en_bold_open"/>
|
1467
|
+
<xsl:with-param name="tag_close" select="$tag_font_en_bold_close"/>
|
1468
|
+
<xsl:with-param name="text" select="$text_en_"/>
|
1469
|
+
</xsl:call-template>
|
1470
|
+
</xsl:element>
|
1471
|
+
</xsl:variable>
|
1472
|
+
<xsl:apply-templates select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
1461
1473
|
</xsl:template>
|
1462
1474
|
|
1463
1475
|
<!-- move example title to the first paragraph -->
|
@@ -1465,11 +1477,18 @@
|
|
1465
1477
|
<xsl:copy>
|
1466
1478
|
<xsl:copy-of select="@*"/>
|
1467
1479
|
<xsl:element name="p" namespace="https://www.metanorma.org/ns/jis">
|
1468
|
-
<xsl:value-of select="substring-after(jis:name/text(), ' — ')"/>
|
1480
|
+
<xsl:value-of select="substring-after(jis:name/text()[1], ' — ')"/>
|
1481
|
+
<xsl:apply-templates select="jis:name/text()[1]/following-sibling::node()" mode="update_xml_step1"/>
|
1469
1482
|
</xsl:element>
|
1470
1483
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1471
1484
|
</xsl:copy>
|
1472
1485
|
</xsl:template>
|
1486
|
+
<xsl:template match="jis:example/jis:name[contains(text(), ' — ')]" mode="update_xml_step1">
|
1487
|
+
<xsl:copy>
|
1488
|
+
<xsl:copy-of select="@*"/>
|
1489
|
+
<xsl:apply-templates select="text()[1]" mode="update_xml_step1"/>
|
1490
|
+
</xsl:copy>
|
1491
|
+
</xsl:template>
|
1473
1492
|
<xsl:template match="jis:example/jis:name/text()" mode="update_xml_step1">
|
1474
1493
|
<xsl:variable name="example_name">
|
1475
1494
|
<xsl:choose>
|
@@ -1478,12 +1497,16 @@
|
|
1478
1497
|
</xsl:choose>
|
1479
1498
|
</xsl:variable>
|
1480
1499
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new($example_name), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1481
|
-
<xsl:variable name="text_en"
|
1482
|
-
<xsl:
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1500
|
+
<xsl:variable name="text_en">
|
1501
|
+
<xsl:element name="text" namespace="{$namespace_full}">
|
1502
|
+
<xsl:call-template name="replace_text_tags">
|
1503
|
+
<xsl:with-param name="tag_open" select="$tag_font_en_bold_open"/>
|
1504
|
+
<xsl:with-param name="tag_close" select="$tag_font_en_bold_close"/>
|
1505
|
+
<xsl:with-param name="text" select="$text_en_"/>
|
1506
|
+
</xsl:call-template>
|
1507
|
+
</xsl:element>
|
1508
|
+
</xsl:variable>
|
1509
|
+
<xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
1487
1510
|
</xsl:template>
|
1488
1511
|
|
1489
1512
|
<xsl:template match="jis:eref//text()" mode="update_xml_step1">
|
@@ -1491,11 +1514,11 @@
|
|
1491
1514
|
<xsl:variable name="parts">
|
1492
1515
|
<xsl:choose>
|
1493
1516
|
<xsl:when test="contains(., ':')">
|
1494
|
-
<xsl:element name="{$element_name_font_en_bold}"><xsl:value-of select="substring-before(., ':')"/></xsl:element>
|
1495
|
-
<xsl:element name="{$element_name_font_en}">:<xsl:value-of select="substring-after(., ':')"/></xsl:element>
|
1517
|
+
<xsl:element name="{$element_name_font_en_bold}" namespace="{$namespace_full}"><xsl:value-of select="substring-before(., ':')"/></xsl:element>
|
1518
|
+
<xsl:element name="{$element_name_font_en}" namespace="{$namespace_full}">:<xsl:value-of select="substring-after(., ':')"/></xsl:element>
|
1496
1519
|
</xsl:when>
|
1497
1520
|
<xsl:otherwise>
|
1498
|
-
<xsl:element name="{$element_name_font_en_bold}"><xsl:value-of select="."/></xsl:element>
|
1521
|
+
<xsl:element name="{$element_name_font_en_bold}" namespace="{$namespace_full}"><xsl:value-of select="."/></xsl:element>
|
1499
1522
|
</xsl:otherwise>
|
1500
1523
|
</xsl:choose>
|
1501
1524
|
</xsl:variable>
|
@@ -1503,12 +1526,16 @@
|
|
1503
1526
|
<xsl:variable name="tag_open">###<xsl:value-of select="local-name()"/>###</xsl:variable>
|
1504
1527
|
<xsl:variable name="tag_close">###/<xsl:value-of select="local-name()"/>###</xsl:variable>
|
1505
1528
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_open,'$1',$tag_close))"/>
|
1506
|
-
<xsl:variable name="text_en"
|
1507
|
-
<xsl:
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1529
|
+
<xsl:variable name="text_en">
|
1530
|
+
<xsl:element name="text" namespace="{$namespace_full}">
|
1531
|
+
<xsl:call-template name="replace_text_tags">
|
1532
|
+
<xsl:with-param name="tag_open" select="$tag_open"/>
|
1533
|
+
<xsl:with-param name="tag_close" select="$tag_close"/>
|
1534
|
+
<xsl:with-param name="text" select="$text_en_"/>
|
1535
|
+
</xsl:call-template>
|
1536
|
+
</xsl:element>
|
1537
|
+
</xsl:variable>
|
1538
|
+
<xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
1512
1539
|
</xsl:for-each>
|
1513
1540
|
</xsl:template>
|
1514
1541
|
|
@@ -1517,12 +1544,16 @@
|
|
1517
1544
|
</xsl:template>
|
1518
1545
|
<xsl:template match="jis:strong/text()" priority="2" mode="update_xml_step1">
|
1519
1546
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1520
|
-
<xsl:variable name="text_en"
|
1521
|
-
<xsl:
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1547
|
+
<xsl:variable name="text_en">
|
1548
|
+
<xsl:element name="text" namespace="{$namespace_full}">
|
1549
|
+
<xsl:call-template name="replace_text_tags">
|
1550
|
+
<xsl:with-param name="tag_open" select="$tag_font_en_bold_open"/>
|
1551
|
+
<xsl:with-param name="tag_close" select="$tag_font_en_bold_close"/>
|
1552
|
+
<xsl:with-param name="text" select="$text_en_"/>
|
1553
|
+
</xsl:call-template>
|
1554
|
+
</xsl:element>
|
1555
|
+
</xsl:variable>
|
1556
|
+
<xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
1526
1557
|
</xsl:template>
|
1527
1558
|
|
1528
1559
|
<xsl:template match="*[local-name() = 'font_en_bold'][normalize-space() != '']">
|
@@ -3457,13 +3488,35 @@
|
|
3457
3488
|
</xsl:for-each>
|
3458
3489
|
</xsl:element>
|
3459
3490
|
|
3460
|
-
<xsl:call-template name="
|
3491
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
3461
3492
|
|
3462
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
3493
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
3463
3494
|
|
3464
3495
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
3465
3496
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
3466
3497
|
|
3498
|
+
<xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
|
3499
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
3500
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3501
|
+
<xsl:choose>
|
3502
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
3503
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3504
|
+
<xsl:attribute name="main_page_sequence"/>
|
3505
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3506
|
+
</xsl:element>
|
3507
|
+
</xsl:when>
|
3508
|
+
<xsl:otherwise> <!-- bibliography -->
|
3509
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
3510
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3511
|
+
<xsl:attribute name="main_page_sequence"/>
|
3512
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3513
|
+
</xsl:element>
|
3514
|
+
</xsl:element>
|
3515
|
+
</xsl:otherwise>
|
3516
|
+
</xsl:choose>
|
3517
|
+
</xsl:for-each>
|
3518
|
+
</xsl:template>
|
3519
|
+
|
3467
3520
|
<xsl:template name="insertAnnexInSeparatePageSequences">
|
3468
3521
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
3469
3522
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -12290,10 +12343,12 @@
|
|
12290
12343
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12291
12344
|
<xsl:copy>
|
12292
12345
|
<xsl:copy-of select="@*"/>
|
12293
|
-
<xsl:
|
12294
|
-
|
12295
|
-
|
12296
|
-
<xsl:
|
12346
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
12347
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
12348
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
12349
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
12350
|
+
<xsl:value-of select="normalize-space(.)"/>
|
12351
|
+
</xsl:if>
|
12297
12352
|
</xsl:if>
|
12298
12353
|
</xsl:copy>
|
12299
12354
|
</xsl:template>
|
@@ -13275,7 +13330,8 @@
|
|
13275
13330
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13276
13331
|
<xsl:choose>
|
13277
13332
|
<xsl:when test="normalize-space() != ''">
|
13278
|
-
<
|
13333
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
13334
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
13279
13335
|
</xsl:when>
|
13280
13336
|
<xsl:otherwise>
|
13281
13337
|
<!-- _{filename}_attachments -->
|
@@ -7,14 +7,18 @@ module IsoDoc
|
|
7
7
|
word_note_cleanup(docxml)
|
8
8
|
boldface(docxml)
|
9
9
|
super
|
10
|
-
|
10
|
+
end
|
11
|
+
|
12
|
+
def word_remove_empty_sections(docxml)
|
13
|
+
move_to_inner_cover(docxml) # preempt by populating WordSection1
|
14
|
+
super
|
11
15
|
end
|
12
16
|
|
13
17
|
def move_to_inner_cover(docxml)
|
14
18
|
source = docxml.at("//div[@type = 'inner-cover-note']")
|
15
19
|
dest = docxml.at("//div[@id = 'boilerplate-inner-cover-note']")
|
16
20
|
source && dest and dest.replace(source.remove)
|
17
|
-
source = docxml.at("//div[@type = '
|
21
|
+
source = docxml.at("//div[@type = 'participants']")
|
18
22
|
dest = docxml.at("//div[@id = 'boilerplate-contributors']")
|
19
23
|
source && dest and dest.replace(source.remove)
|
20
24
|
docxml
|
@@ -82,6 +82,37 @@ module Metanorma
|
|
82
82
|
::Metanorma::Standoc::Converter.instance_method(:ol_cleanup).bind(self)
|
83
83
|
.call(doc)
|
84
84
|
end
|
85
|
+
|
86
|
+
def biblio_reorder(xmldoc)
|
87
|
+
xmldoc.xpath("//references[@normative = 'true']").each do |r|
|
88
|
+
biblio_reorder1(r)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
def pub_class_prep(bib)
|
93
|
+
iso = bib.at("#{PUBLISHER}[abbreviation = 'ISO']") ||
|
94
|
+
bib.at("#{PUBLISHER}[name = 'International Organization " \
|
95
|
+
"for Standardization']")
|
96
|
+
iec = bib.at("#{PUBLISHER}[abbreviation = 'IEC']") ||
|
97
|
+
bib.at("#{PUBLISHER}[name = 'International " \
|
98
|
+
"Electrotechnical Commission']")
|
99
|
+
jis = bib.at("#{PUBLISHER}[abbreviation = 'JIS']") ||
|
100
|
+
bib.at("#{PUBLISHER}[name = '#{pub_hash['ja']}']") ||
|
101
|
+
bib.at("#{PUBLISHER}[name = '#{pub_hash['en']}']")
|
102
|
+
[iso, iec, jis]
|
103
|
+
end
|
104
|
+
|
105
|
+
def pub_class(bib)
|
106
|
+
iso, iec, jis = pub_class_prep(bib)
|
107
|
+
jis && iec && iso and return 2
|
108
|
+
jis && iec and return 2
|
109
|
+
jis && iso and return 3
|
110
|
+
jis and return 1
|
111
|
+
iso && iec and return 4
|
112
|
+
iso and return 4
|
113
|
+
iec and return 5
|
114
|
+
6
|
115
|
+
end
|
85
116
|
end
|
86
117
|
end
|
87
118
|
end
|
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.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: japanese_calendar
|