metanorma-jis 0.3.2 → 0.3.3
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/lib/isodoc/jis/jis.international-standard.xsl +70 -21
- data/lib/metanorma/jis/basicdoc.rng +71 -6
- data/lib/metanorma/jis/biblio.rng +3 -1
- data/lib/metanorma/jis/isodoc.rng +3 -0
- data/lib/metanorma/jis/reqt.rng +3 -0
- data/lib/metanorma/jis/validate.rb +3 -0
- data/lib/metanorma/jis/version.rb +1 -1
- data/lib/relaton/render-jis/config.yml +57 -0
- data/lib/relaton/render-jis/general.rb +16 -3
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cef3f0aef7b0710dc4f98802b2fcc476ffe6a3805d11334005eb280a0480001a
|
|
4
|
+
data.tar.gz: 9e8979493f228f6d689d606946736551c1f7e00545e90a1c68c664aa99f0d83a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa081288f2be1b8e984a141e577d92f6beff9c1e2e34202e2db931cdca1522341895c82f674d975aaba3102960e280f526d4b3bc5dadfc8fb1e866ef7aaa2da9
|
|
7
|
+
data.tar.gz: 162d57afdf668c125100e6f85376bf63803551b2ec6ef36fae2e1bf84d38d188b244d1176934add96330223fec28ccd4de6c047683078537ab6b57b58b813e10
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
|
8
8
|
|
|
9
|
+
<xsl:variable name="isIgnoreComplexScripts">true</xsl:variable>
|
|
10
|
+
|
|
9
11
|
<xsl:variable name="contents_">
|
|
10
12
|
<xsl:variable name="bundle" select="count(//jis:jis-standard) > 1"/>
|
|
11
13
|
|
|
@@ -7724,6 +7726,12 @@
|
|
|
7724
7726
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
7725
7727
|
<attachment filename="{@name}"/>
|
|
7726
7728
|
</xsl:for-each>
|
|
7729
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
7730
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
7731
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
7732
|
+
<attachment filename="{$attachment_path}"/>
|
|
7733
|
+
</xsl:for-each>
|
|
7734
|
+
</xsl:if>
|
|
7727
7735
|
</xsl:variable>
|
|
7728
7736
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
|
7729
7737
|
|
|
@@ -7736,7 +7744,7 @@
|
|
|
7736
7744
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
|
7737
7745
|
</xsl:when>
|
|
7738
7746
|
<!-- link to the PDF attachment -->
|
|
7739
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
7747
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
7740
7748
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
|
7741
7749
|
</xsl:when>
|
|
7742
7750
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
|
@@ -8378,7 +8386,16 @@
|
|
|
8378
8386
|
</xsl:variable>
|
|
8379
8387
|
<xsl:variable name="img_src">
|
|
8380
8388
|
<xsl:choose>
|
|
8381
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
|
8389
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8390
|
+
<xsl:choose>
|
|
8391
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8392
|
+
<xsl:value-of select="@src"/>
|
|
8393
|
+
</xsl:when>
|
|
8394
|
+
<xsl:otherwise>
|
|
8395
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
|
8396
|
+
</xsl:otherwise>
|
|
8397
|
+
</xsl:choose>
|
|
8398
|
+
</xsl:when>
|
|
8382
8399
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
|
8383
8400
|
</xsl:choose>
|
|
8384
8401
|
</xsl:variable>
|
|
@@ -8391,7 +8408,7 @@
|
|
|
8391
8408
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
|
8392
8409
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
|
8393
8410
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
|
8394
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
|
8411
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
|
8395
8412
|
<xsl:value-of select="$scale"/>
|
|
8396
8413
|
</xsl:template>
|
|
8397
8414
|
|
|
@@ -8410,7 +8427,14 @@
|
|
|
8410
8427
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
|
8411
8428
|
</xsl:when>
|
|
8412
8429
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8413
|
-
<xsl:
|
|
8430
|
+
<xsl:choose>
|
|
8431
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8432
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8433
|
+
</xsl:when>
|
|
8434
|
+
<xsl:otherwise>
|
|
8435
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8436
|
+
</xsl:otherwise>
|
|
8437
|
+
</xsl:choose>
|
|
8414
8438
|
</xsl:when>
|
|
8415
8439
|
<xsl:otherwise>
|
|
8416
8440
|
<xsl:value-of select="@src"/>
|
|
@@ -8432,7 +8456,14 @@
|
|
|
8432
8456
|
</xsl:when>
|
|
8433
8457
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8434
8458
|
<xsl:variable name="src">
|
|
8435
|
-
<xsl:
|
|
8459
|
+
<xsl:choose>
|
|
8460
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8461
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8462
|
+
</xsl:when>
|
|
8463
|
+
<xsl:otherwise>
|
|
8464
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8465
|
+
</xsl:otherwise>
|
|
8466
|
+
</xsl:choose>
|
|
8436
8467
|
</xsl:variable>
|
|
8437
8468
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
|
8438
8469
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
@@ -13328,26 +13359,37 @@
|
|
|
13328
13359
|
</x:xmpmeta>
|
|
13329
13360
|
<!-- add attachments -->
|
|
13330
13361
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
13331
|
-
<xsl:
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13362
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
|
13363
|
+
|
|
13364
|
+
<pdf:embedded-file filename="{@name}">
|
|
13365
|
+
<xsl:attribute name="src">
|
|
13366
|
+
<xsl:choose>
|
|
13367
|
+
<xsl:when test="normalize-space() != ''">
|
|
13368
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
|
13369
|
+
<xsl:value-of select="$src_attachment"/>
|
|
13370
|
+
</xsl:when>
|
|
13371
|
+
<xsl:otherwise>
|
|
13372
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
|
13373
|
+
<xsl:value-of select="$url"/>
|
|
13374
|
+
</xsl:otherwise>
|
|
13375
|
+
</xsl:choose>
|
|
13376
|
+
</xsl:attribute>
|
|
13377
|
+
<xsl:if test="$description != ''">
|
|
13378
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13379
|
+
</xsl:if>
|
|
13380
|
+
</pdf:embedded-file>
|
|
13343
13381
|
</xsl:for-each>
|
|
13344
13382
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
|
13345
13383
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
13346
13384
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
13347
13385
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
13348
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
|
13349
|
-
<xsl:variable name="
|
|
13350
|
-
<pdf:embedded-file src="{$url}" filename="{$
|
|
13386
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
|
13387
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
|
13388
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_path}">
|
|
13389
|
+
<xsl:if test="$description != ''">
|
|
13390
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13391
|
+
</xsl:if>
|
|
13392
|
+
</pdf:embedded-file>
|
|
13351
13393
|
</xsl:for-each>
|
|
13352
13394
|
</xsl:if>
|
|
13353
13395
|
</xsl:template> <!-- addPDFUAmeta -->
|
|
@@ -13723,7 +13765,14 @@
|
|
|
13723
13765
|
<xsl:value-of select="$src"/>
|
|
13724
13766
|
</xsl:when>
|
|
13725
13767
|
<xsl:otherwise>
|
|
13726
|
-
<xsl:
|
|
13768
|
+
<xsl:choose>
|
|
13769
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
13770
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
13771
|
+
</xsl:when>
|
|
13772
|
+
<xsl:otherwise>
|
|
13773
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
|
13774
|
+
</xsl:otherwise>
|
|
13775
|
+
</xsl:choose>
|
|
13727
13776
|
</xsl:otherwise>
|
|
13728
13777
|
</xsl:choose>
|
|
13729
13778
|
</xsl:template>
|
|
@@ -1000,14 +1000,14 @@
|
|
|
1000
1000
|
<define name="PureTextElement">
|
|
1001
1001
|
<choice>
|
|
1002
1002
|
<text/>
|
|
1003
|
-
<ref name="
|
|
1004
|
-
<ref name="
|
|
1003
|
+
<ref name="pure_em"/>
|
|
1004
|
+
<ref name="pure_strong"/>
|
|
1005
1005
|
<ref name="sub"/>
|
|
1006
1006
|
<ref name="sup"/>
|
|
1007
|
-
<ref name="
|
|
1008
|
-
<ref name="
|
|
1009
|
-
<ref name="
|
|
1010
|
-
<ref name="
|
|
1007
|
+
<ref name="pure_tt"/>
|
|
1008
|
+
<ref name="pure_underline"/>
|
|
1009
|
+
<ref name="pure_strike"/>
|
|
1010
|
+
<ref name="pure_smallcap"/>
|
|
1011
1011
|
<ref name="br"/>
|
|
1012
1012
|
</choice>
|
|
1013
1013
|
</define>
|
|
@@ -1031,6 +1031,13 @@
|
|
|
1031
1031
|
</zeroOrMore>
|
|
1032
1032
|
</element>
|
|
1033
1033
|
</define>
|
|
1034
|
+
<define name="pure_em">
|
|
1035
|
+
<element name="em">
|
|
1036
|
+
<zeroOrMore>
|
|
1037
|
+
<ref name="PureTextElement"/>
|
|
1038
|
+
</zeroOrMore>
|
|
1039
|
+
</element>
|
|
1040
|
+
</define>
|
|
1034
1041
|
<define name="strong">
|
|
1035
1042
|
<element name="strong">
|
|
1036
1043
|
<zeroOrMore>
|
|
@@ -1046,6 +1053,13 @@
|
|
|
1046
1053
|
</zeroOrMore>
|
|
1047
1054
|
</element>
|
|
1048
1055
|
</define>
|
|
1056
|
+
<define name="pure_strong">
|
|
1057
|
+
<element name="strong">
|
|
1058
|
+
<zeroOrMore>
|
|
1059
|
+
<ref name="PureTextElement"/>
|
|
1060
|
+
</zeroOrMore>
|
|
1061
|
+
</element>
|
|
1062
|
+
</define>
|
|
1049
1063
|
<define name="tt">
|
|
1050
1064
|
<element name="tt">
|
|
1051
1065
|
<zeroOrMore>
|
|
@@ -1060,6 +1074,13 @@
|
|
|
1060
1074
|
</zeroOrMore>
|
|
1061
1075
|
</element>
|
|
1062
1076
|
</define>
|
|
1077
|
+
<define name="pure_tt">
|
|
1078
|
+
<element name="tt">
|
|
1079
|
+
<zeroOrMore>
|
|
1080
|
+
<ref name="PureTextElement"/>
|
|
1081
|
+
</zeroOrMore>
|
|
1082
|
+
</element>
|
|
1083
|
+
</define>
|
|
1063
1084
|
<define name="keyword">
|
|
1064
1085
|
<element name="keyword">
|
|
1065
1086
|
<zeroOrMore>
|
|
@@ -1090,13 +1111,42 @@
|
|
|
1090
1111
|
<zeroOrMore>
|
|
1091
1112
|
<choice>
|
|
1092
1113
|
<ref name="PureTextElement"/>
|
|
1114
|
+
<ref name="stem"/>
|
|
1115
|
+
<ref name="eref"/>
|
|
1116
|
+
<ref name="xref"/>
|
|
1117
|
+
<ref name="hyperlink"/>
|
|
1093
1118
|
<ref name="index"/>
|
|
1094
1119
|
<ref name="index-xref"/>
|
|
1095
1120
|
</choice>
|
|
1096
1121
|
</zeroOrMore>
|
|
1097
1122
|
</element>
|
|
1098
1123
|
</define>
|
|
1124
|
+
<define name="pure_strike">
|
|
1125
|
+
<element name="strike">
|
|
1126
|
+
<zeroOrMore>
|
|
1127
|
+
<ref name="PureTextElement"/>
|
|
1128
|
+
</zeroOrMore>
|
|
1129
|
+
</element>
|
|
1130
|
+
</define>
|
|
1099
1131
|
<define name="underline">
|
|
1132
|
+
<element name="underline">
|
|
1133
|
+
<optional>
|
|
1134
|
+
<attribute name="style"/>
|
|
1135
|
+
</optional>
|
|
1136
|
+
<zeroOrMore>
|
|
1137
|
+
<choice>
|
|
1138
|
+
<ref name="PureTextElement"/>
|
|
1139
|
+
<ref name="stem"/>
|
|
1140
|
+
<ref name="eref"/>
|
|
1141
|
+
<ref name="xref"/>
|
|
1142
|
+
<ref name="hyperlink"/>
|
|
1143
|
+
<ref name="index"/>
|
|
1144
|
+
<ref name="index-xref"/>
|
|
1145
|
+
</choice>
|
|
1146
|
+
</zeroOrMore>
|
|
1147
|
+
</element>
|
|
1148
|
+
</define>
|
|
1149
|
+
<define name="pure_underline">
|
|
1100
1150
|
<element name="underline">
|
|
1101
1151
|
<optional>
|
|
1102
1152
|
<attribute name="style"/>
|
|
@@ -1107,6 +1157,21 @@
|
|
|
1107
1157
|
</element>
|
|
1108
1158
|
</define>
|
|
1109
1159
|
<define name="smallcap">
|
|
1160
|
+
<element name="smallcap">
|
|
1161
|
+
<zeroOrMore>
|
|
1162
|
+
<choice>
|
|
1163
|
+
<ref name="PureTextElement"/>
|
|
1164
|
+
<ref name="stem"/>
|
|
1165
|
+
<ref name="eref"/>
|
|
1166
|
+
<ref name="xref"/>
|
|
1167
|
+
<ref name="hyperlink"/>
|
|
1168
|
+
<ref name="index"/>
|
|
1169
|
+
<ref name="index-xref"/>
|
|
1170
|
+
</choice>
|
|
1171
|
+
</zeroOrMore>
|
|
1172
|
+
</element>
|
|
1173
|
+
</define>
|
|
1174
|
+
<define name="pure_smallcap">
|
|
1110
1175
|
<element name="smallcap">
|
|
1111
1176
|
<zeroOrMore>
|
|
1112
1177
|
<ref name="PureTextElement"/>
|
data/lib/metanorma/jis/reqt.rng
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
extenttemplate:
|
|
2
|
+
book: "{{ volume }} {{ page }}"
|
|
3
|
+
booklet: book
|
|
4
|
+
proceedings: book
|
|
5
|
+
journal: book
|
|
6
|
+
standard: book
|
|
7
|
+
techreport: book
|
|
8
|
+
inbook: "{{ volume }} {{ page }}"
|
|
9
|
+
misc: "{{ volume }} {{issue}} {{ page }}, {{ duration }}"
|
|
10
|
+
nametemplate:
|
|
11
|
+
one: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0]}} {{initials[0] | join: ''}}.{% endif %}"
|
|
12
|
+
two: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0]}} {{initials[0] | join: ''}}.{% endif %} , & {% if nonpersonal[1] %}{{ nonpersonal[1] }}{% else %}{{surname[1]}} {{initials[1] | join: ''}}.{% endif %}"
|
|
13
|
+
more: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0]}} {{initials[0] | join: ''}}.{% endif %} , {% if nonpersonal[1] %}{{ nonpersonal[1] }}{% else %}{{surname[1]}} {{initials[1] | join: ''}}. {% endif %} , & {% if nonpersonal[2] %}{{ nonpersonal[2] }}{% else %}{{surname[2]}} {{initials[2] | join: ''}}.{% endif %}"
|
|
14
|
+
# disabled the following: they should be provided in inheriting calls
|
|
15
|
+
# etal: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0] | upcase}} ,_{%if given[0]%}{{given[0]}} {{middle[0]}}{%else%}{{initials[0] | join: ' '}}.{%endif%}{% endif %}, {% if nonpersonal[1] %}{{ nonpersonal[1] }}{% else %}{%if given[1]%}{{given[1]}} {{middle[1]}}{%else%}{{initials[1] | join: ' '}}.{%endif%} {{surname[1] | upcase}}{% endif %} <em>et al.</em>"
|
|
16
|
+
# etal_count: 5
|
|
17
|
+
seriestemplate: "{% if series_formatted %}{{ series_formatted }}{%else%}{% if series_abbr %}{{series_abbr}}{% else %}{{series_title}}{% endif %} ({{series_run}}) {{series_num}}|({{series_partnumber}}){%endif%}"
|
|
18
|
+
journaltemplate: "{% if series_abbr %}{{series_abbr}}{% else %}{{series_title}}{% endif %} ({{series_run}}) {{ labels['volume'] }}_{{series_num}} {{ labels['part'] }}_{{series_partnumber}}"
|
|
19
|
+
template:
|
|
20
|
+
# skip standardidentifier, it is inserted in front of formattedref within metanorma
|
|
21
|
+
standard: "{% if home_standard %}<span_class='stddocTitle'>{{ title }}</span> ,_{{ extent }}{% else %}{{ creatornames }}. <span_class='stddocTitle'>{{ title }}</span> ,_{{ extent }} . {{ labels['version'] | capitalize }}_{{ edition_raw }}. {{labels['updated'] | capitalize }}_{{date_updated}}. {{status | capitalize}}. {{ authorizer }}. {{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>.{% endif %}"
|
|
22
|
+
website: "{{ creatornames }} ({{ role }}) . <span_class='stddocTitle'>{{ title }}</span> [{{ labels['website'] }}]. {{ labels['version'] | capitalize }}_{{ edition_raw }}. {{place}}: {{ publisher }}. {{date}}. {{ labels['updated'] | capitalize }}:_{{date_updated}}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. [{{ labels['viewed'] }}:_{{date_accessed}}]. "
|
|
23
|
+
book: "{{ creatornames }} ({{role}}) . {{ title }} . {{ edition | capitalize_first }}. ({{ series }}). {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}. {{date}}. {{size}}. {{extent}}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. {{ labels['at'] | capitalize}}:_{{ access_location }}. [{{ labels['viewed'] }}:_{{date_accessed}}]."
|
|
24
|
+
booklet: book
|
|
25
|
+
manual: book
|
|
26
|
+
techreport: book
|
|
27
|
+
proceedings: book
|
|
28
|
+
inbook: "{{ creatornames }} ({{role}}) . {{ title }} . {{host_title}} ({{host_role}} {{ host_creatornames}}). {{ edition | capitalize_first }}. ({{ series }}). {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}. {{date}}. {{size}}. {{extent}}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. {{ labels['at'] | capitalize}}:_{{ access_location }}. [{{ labels['viewed'] }}:_{{date_accessed}}]."
|
|
29
|
+
inproceedings: inbook
|
|
30
|
+
incollection: inbook
|
|
31
|
+
journal: "{{ title}} . {{ edition | capitalize_first }}. {{place}}: {{publisher}}. {{date}}. {{size}}. {{extent}}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. {{ labels['at'] | capitalize}}:_{{ access_location }}. [{{ labels['viewed'] }}:_{{date_accessed}}]."
|
|
32
|
+
article: "{{ creatornames }} ({{role}}) . {{ title }}. {{ series }} . {{date}}, {{ extent }}. {{ labels['updated'] | capitalize }}:_{{date_updated}}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. {{ labels['at'] | capitalize}}:_{{ access_location }}. [{{ labels['viewed'] }}:_{{date_accessed}}]."
|
|
33
|
+
software: "{{ creatornames }} ({{ role}}) . {{ title }} . {{ labels['version'] | capitalize }}_{{ edition_raw }}. {{medium | capitalize}}. {{place}}: {{publisher}}. {{date}}. {{size}}. {{extent}}. {{ labels['updated'] | capitalize }}:_{{date_updated}}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. [{{ labels['viewed'] }}:_{{date_accessed}}]. "
|
|
34
|
+
electronic resource: software
|
|
35
|
+
dataset: "{{ creatornames }} ({{ role }}) . {{ title }} . {{ labels['version'] | capitalize }}_{{ edition_raw }}. {{medium | capitalize }}. {{ labels['in'] | capitalize }}:_{{series}}. {{date}}. {{ labels['updated'] | capitalize }}:_{{date_updated}}. {{ authoritative_identifier | join '. ' }}. {{ other_identifier | join '. ' }}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. {{ size }}. {{ extent}}. [{{ labels['viewed'] }}:_{{date_accessed}}]. "
|
|
36
|
+
webresource: website
|
|
37
|
+
unpublished: "{{ creatornames }} ({{ role }}) . {{ title }} . {{ medium | capitalize }}. {{ date }}. {{ labels['at'] | capitalize}}:_{{ access_location }}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. [{{ labels['viewed'] }}:_{{date_accessed}}]."
|
|
38
|
+
presentation: unpublished
|
|
39
|
+
thesis: "{{ creatornames }} ({{ role }}) . {{ title }} . {{ medium | capitalize }}. {{place}}: {{ publisher }}. {{ date }}. {{ labels['at'] | capitalize}}:_{{ access_location }}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. [{{ labels['viewed'] }}:_{{date_accessed}}]."
|
|
40
|
+
misc: "{{ creatornames }} ({{ role }}) . {{ title }} . {{ date }}."
|
|
41
|
+
# following are # unsupported types:
|
|
42
|
+
map: misc
|
|
43
|
+
audiovisual: misc
|
|
44
|
+
film: misc
|
|
45
|
+
video: misc
|
|
46
|
+
broadcast: misc
|
|
47
|
+
graphic_work: misc
|
|
48
|
+
music: misc
|
|
49
|
+
performance: misc
|
|
50
|
+
patent: misc
|
|
51
|
+
archival: misc
|
|
52
|
+
social_media: misc
|
|
53
|
+
alert: misc
|
|
54
|
+
message: misc
|
|
55
|
+
conversation: misc
|
|
56
|
+
internal: misc
|
|
57
|
+
|
|
@@ -7,14 +7,27 @@ module Relaton
|
|
|
7
7
|
module Render
|
|
8
8
|
module JIS
|
|
9
9
|
class General < ::Relaton::Render::Iso::General
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
def config_loc
|
|
11
|
+
YAML.load_file(File.join(File.dirname(__FILE__), "config.yml"))
|
|
12
|
+
end
|
|
13
13
|
|
|
14
14
|
def klass_initialize(_options)
|
|
15
15
|
super
|
|
16
16
|
@parseklass = Relaton::Render::JIS::Parse
|
|
17
17
|
end
|
|
18
|
+
|
|
19
|
+
def render1(doc)
|
|
20
|
+
r = doc.relation.select { |x| x.type == "hasRepresentation" }
|
|
21
|
+
.map { |x| @i18n.also_pub_as + render_single_bibitem(x.bibitem) }
|
|
22
|
+
out = [render_single_bibitem(doc)] + r
|
|
23
|
+
@i18n.l10n(out.join(". ").gsub(".. ", ". ").sub(/\.\s*$/, ""))
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def render_all(bib, type: "author-date")
|
|
27
|
+
ret = super
|
|
28
|
+
ret&.each_value { |k| k[:formattedref]&.sub!(/[.。]\s*$/, "") }
|
|
29
|
+
ret
|
|
30
|
+
end
|
|
18
31
|
end
|
|
19
32
|
end
|
|
20
33
|
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.3
|
|
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-
|
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: japanese_calendar
|
|
@@ -314,6 +314,7 @@ files:
|
|
|
314
314
|
- lib/metanorma/jis/reqt.rng
|
|
315
315
|
- lib/metanorma/jis/validate.rb
|
|
316
316
|
- lib/metanorma/jis/version.rb
|
|
317
|
+
- lib/relaton/render-jis/config.yml
|
|
317
318
|
- lib/relaton/render-jis/general.rb
|
|
318
319
|
- lib/relaton/render-jis/parse.rb
|
|
319
320
|
- metanorma-jis.gemspec
|