metanorma-jis 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c784b76a6c9e7e168e3d5b6538fad7ef2cff2a44b0a42e4c6623439e93f6d55
|
4
|
+
data.tar.gz: 8b9f329596bdcc698de66015cf540c825efd2fcd9dfbe4c71059587e4de9c243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dd69a3ab82bf22acb5cecf56e1a12935ae7eb33d6d47cd6a52dd87c4e94e19756118996d643ba7b65c74a061baf75ff68d2f52ffdfc5a89253eb418df9a40b8
|
7
|
+
data.tar.gz: 4d52dcf866a974a29494388496c7fbb3e200ff128d0d329620b2751d48a180c3de5cfbaf6b74902f4dd35855cb026a420e7d129c6b0fe94895c58fd7494310b3
|
@@ -530,18 +530,21 @@
|
|
530
530
|
<xsl:when test="$vertical_layout = 'true'">
|
531
531
|
<xsl:call-template name="insertCoverPage2024">
|
532
532
|
<xsl:with-param name="num" select="$num"/>
|
533
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
|
533
534
|
</xsl:call-template>
|
534
535
|
</xsl:when>
|
535
536
|
<xsl:when test="$doctype = 'technical-specification'">
|
536
537
|
<xsl:call-template name="insertCoverPageJSA">
|
537
538
|
<xsl:with-param name="num" select="$num"/>
|
538
539
|
<xsl:with-param name="doclang" select="$doclang"/>
|
540
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
|
539
541
|
</xsl:call-template>
|
540
542
|
</xsl:when>
|
541
543
|
<xsl:otherwise>
|
542
544
|
<xsl:call-template name="insertCoverPage">
|
543
545
|
<xsl:with-param name="num" select="$num"/>
|
544
546
|
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
547
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
|
545
548
|
</xsl:call-template>
|
546
549
|
</xsl:otherwise>
|
547
550
|
</xsl:choose>
|
@@ -585,6 +588,7 @@
|
|
585
588
|
<xsl:with-param name="title_ja" select="$title_ja"/>
|
586
589
|
<xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
|
587
590
|
<xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
|
591
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
|
588
592
|
<xsl:with-param name="edition" select="$edition"/>
|
589
593
|
<xsl:with-param name="copyrightText">
|
590
594
|
<xsl:copy-of select="$copyrightText"/>
|
@@ -660,6 +664,7 @@
|
|
660
664
|
<xsl:with-param name="title_ja" select="$title_ja"/>
|
661
665
|
<xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
|
662
666
|
<xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
|
667
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
|
663
668
|
<xsl:with-param name="edition" select="$edition"/>
|
664
669
|
<xsl:with-param name="copyrightText">
|
665
670
|
<xsl:copy-of select="$copyrightText"/>
|
@@ -855,6 +860,7 @@
|
|
855
860
|
<xsl:with-param name="title_ja" select="$title_ja"/>
|
856
861
|
<xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
|
857
862
|
<xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
|
863
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
|
858
864
|
<xsl:with-param name="edition" select="$edition"/>
|
859
865
|
<xsl:with-param name="copyrightText">
|
860
866
|
<xsl:copy-of select="$copyrightText"/>
|
@@ -954,6 +960,7 @@
|
|
954
960
|
<xsl:with-param name="num" select="$num"/>
|
955
961
|
<xsl:with-param name="doclang" select="'en'"/>
|
956
962
|
<xsl:with-param name="first">false</xsl:with-param>
|
963
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
|
957
964
|
</xsl:call-template>
|
958
965
|
</xsl:if>
|
959
966
|
|
@@ -1081,18 +1088,18 @@
|
|
1081
1088
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
1082
1089
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1083
1090
|
<!-- <xsl:attribute name="margin-top">26mm</xsl:attribute> -->
|
1091
|
+
<!-- Contents -->
|
1092
|
+
<!-- <xsl:call-template name="getLocalizedString">
|
1093
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
1094
|
+
</xsl:call-template> -->
|
1095
|
+
<fo:marker marker-class-name="section_title">
|
1096
|
+
<xsl:variable name="section_title_"><xsl:apply-templates/></xsl:variable>
|
1097
|
+
<xsl:variable name="section_title" select="translate($section_title_, ' ', '')"/>
|
1098
|
+
<xsl:call-template name="insertVerticalChar">
|
1099
|
+
<xsl:with-param name="str" select="$section_title"/>
|
1100
|
+
</xsl:call-template>
|
1101
|
+
</fo:marker>
|
1084
1102
|
</xsl:if>
|
1085
|
-
<!-- Contents -->
|
1086
|
-
<!-- <xsl:call-template name="getLocalizedString">
|
1087
|
-
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
1088
|
-
</xsl:call-template> -->
|
1089
|
-
<fo:marker marker-class-name="section_title">
|
1090
|
-
<xsl:variable name="section_title_"><xsl:apply-templates/></xsl:variable>
|
1091
|
-
<xsl:variable name="section_title" select="translate($section_title_, ' ', '')"/>
|
1092
|
-
<xsl:call-template name="insertVerticalChar">
|
1093
|
-
<xsl:with-param name="str" select="$section_title"/>
|
1094
|
-
</xsl:call-template>
|
1095
|
-
</fo:marker>
|
1096
1103
|
<xsl:apply-templates/>
|
1097
1104
|
</fo:block>
|
1098
1105
|
<fo:block text-align="right" margin-top="10mm">
|
@@ -1144,13 +1151,15 @@
|
|
1144
1151
|
</fo:block>
|
1145
1152
|
</xsl:template>
|
1146
1153
|
|
1147
|
-
<!-- docidentifier, 3 part: number, colon and year-->
|
1148
|
-
<xsl:variable name="docidentifier_jis" select="/*/jis:bibdata/jis:docidentifier[@type = 'JIS']"/>
|
1149
|
-
<xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$1')"/>
|
1150
|
-
<xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$3')"/>
|
1151
1154
|
<xsl:template name="insertCoverPage">
|
1152
1155
|
<xsl:param name="num"/>
|
1153
1156
|
<xsl:param name="copyrightText"/>
|
1157
|
+
<xsl:param name="docidentifier_jis"/>
|
1158
|
+
|
1159
|
+
<!-- docidentifier, 3 part: number, colon and year-->
|
1160
|
+
<xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$1')"/>
|
1161
|
+
<xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$3')"/>
|
1162
|
+
|
1154
1163
|
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
1155
1164
|
<xsl:call-template name="insertFooter">
|
1156
1165
|
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
@@ -1158,10 +1167,15 @@
|
|
1158
1167
|
|
1159
1168
|
<fo:flow flow-name="xsl-region-body">
|
1160
1169
|
<!-- JIS -->
|
1161
|
-
<fo:block
|
1162
|
-
<
|
1163
|
-
<xsl:
|
1164
|
-
</
|
1170
|
+
<fo:block>
|
1171
|
+
<xsl:if test="$num = 1">
|
1172
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
1173
|
+
</xsl:if>
|
1174
|
+
<fo:block id="firstpage_id_{$num}">
|
1175
|
+
<fo:instream-foreign-object content-width="81mm" fox:alt-text="JIS Logo">
|
1176
|
+
<xsl:copy-of select="$JIS-Logo"/>
|
1177
|
+
</fo:instream-foreign-object>
|
1178
|
+
</fo:block>
|
1165
1179
|
</fo:block>
|
1166
1180
|
|
1167
1181
|
<fo:block-container text-align="center">
|
@@ -1199,6 +1213,8 @@
|
|
1199
1213
|
<xsl:param name="num"/>
|
1200
1214
|
<xsl:param name="doclang"/>
|
1201
1215
|
<xsl:param name="first">true</xsl:param>
|
1216
|
+
<xsl:param name="docidentifier_jis"/>
|
1217
|
+
|
1202
1218
|
<fo:page-sequence master-reference="cover-page-JSA" force-page-count="no-force">
|
1203
1219
|
<fo:static-content flow-name="footer" font-family="IPAexGothic" font-size="10pt" line-height="1.7">
|
1204
1220
|
<fo:block text-align="center">
|
@@ -1240,7 +1256,7 @@
|
|
1240
1256
|
|
1241
1257
|
<fo:block-container text-align="center">
|
1242
1258
|
<fo:block font-family="IPAexGothic" font-size="15pt">
|
1243
|
-
<xsl:value-of select="
|
1259
|
+
<xsl:value-of select="$docidentifier_jis"/>
|
1244
1260
|
</fo:block>
|
1245
1261
|
<!-- title -->
|
1246
1262
|
<fo:block role="H1" font-family="IPAexGothic" font-size="32pt" line-height="1.3">
|
@@ -1260,6 +1276,11 @@
|
|
1260
1276
|
<xsl:variable name="i18n_JIS"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">JIS</xsl:with-param></xsl:call-template></xsl:variable>
|
1261
1277
|
<xsl:template name="insertCoverPage2024">
|
1262
1278
|
<xsl:param name="num"/>
|
1279
|
+
<xsl:param name="docidentifier_jis"/>
|
1280
|
+
|
1281
|
+
<!-- docidentifier, 3 part: number, colon and year-->
|
1282
|
+
<xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$1')"/>
|
1283
|
+
<xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$3')"/>
|
1263
1284
|
|
1264
1285
|
<fo:page-sequence master-reference="cover-page_2024" force-page-count="no-force">
|
1265
1286
|
|
@@ -1941,7 +1962,7 @@
|
|
1941
1962
|
<xsl:call-template name="extractSection"/>
|
1942
1963
|
</xsl:variable>
|
1943
1964
|
|
1944
|
-
<xsl:if test="$level = 1">
|
1965
|
+
<xsl:if test="$level = 1 and $vertical_layout = 'true'">
|
1945
1966
|
<fo:marker marker-class-name="section_title">
|
1946
1967
|
<xsl:choose>
|
1947
1968
|
<xsl:when test="@ancestor = 'annex' and *[local-name() = 'br']">
|
@@ -3201,12 +3222,17 @@
|
|
3201
3222
|
<xsl:param name="cover_header_footer_background"/>
|
3202
3223
|
<xsl:param name="i18n_JIS"/>
|
3203
3224
|
<xsl:param name="docidentifier"/>
|
3225
|
+
<xsl:param name="docidentifier_jis"/>
|
3204
3226
|
<xsl:param name="title_ja"/>
|
3205
3227
|
<xsl:param name="edition"/>
|
3206
3228
|
<xsl:param name="copyrightText"/>
|
3207
3229
|
<xsl:param name="insertLast"/>
|
3208
3230
|
<xsl:param name="bibdata"/>
|
3209
3231
|
|
3232
|
+
<!-- docidentifier, 3 part: number, colon and year-->
|
3233
|
+
<xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$1')"/>
|
3234
|
+
<xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$3')"/>
|
3235
|
+
|
3210
3236
|
<!-- header -->
|
3211
3237
|
<fo:static-content flow-name="right-region" role="artifact">
|
3212
3238
|
<fo:block-container font-size="9pt" height="{$pageHeightA5}mm" width="6mm" color="white" background-color="{$cover_header_footer_background}" text-align="center" margin-left="11mm">
|
@@ -5424,8 +5450,21 @@
|
|
5424
5450
|
|
5425
5451
|
<!-- <xsl:strip-space elements="jis:xref"/> -->
|
5426
5452
|
|
5427
|
-
<xsl:variable name="
|
5428
|
-
|
5453
|
+
<xsl:variable name="namespace_full_">
|
5454
|
+
<xsl:choose>
|
5455
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
5456
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
|
5457
|
+
</xsl:choose>
|
5458
|
+
</xsl:variable>
|
5459
|
+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
5460
|
+
|
5461
|
+
<xsl:variable name="root_element_">
|
5462
|
+
<xsl:choose>
|
5463
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
5464
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
5465
|
+
</xsl:choose>
|
5466
|
+
</xsl:variable>
|
5467
|
+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
5429
5468
|
|
5430
5469
|
<xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
5431
5470
|
|
@@ -10383,6 +10422,12 @@
|
|
10383
10422
|
</xsl:if>
|
10384
10423
|
</xsl:template>
|
10385
10424
|
|
10425
|
+
<xsl:template match="*[local-name()='strike']">
|
10426
|
+
<fo:inline text-decoration="line-through">
|
10427
|
+
<xsl:apply-templates/>
|
10428
|
+
</fo:inline>
|
10429
|
+
</xsl:template>
|
10430
|
+
|
10386
10431
|
<xsl:template match="*[local-name() = 'pagebreak']">
|
10387
10432
|
<fo:block break-after="page"/>
|
10388
10433
|
<fo:block> </fo:block>
|
@@ -70,19 +70,19 @@ module IsoDoc
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def move_participants(doc)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
73
|
+
doc.xpath(ns("//clause[@type = 'participants']")).reverse_each do |p|
|
74
|
+
t = participant_table(p) or next
|
75
|
+
p.remove
|
76
|
+
ins = make_preface(doc) or next
|
77
|
+
ins.add_first_child t
|
78
|
+
end
|
78
79
|
end
|
79
80
|
|
80
81
|
def participant_table(clause)
|
81
|
-
s = clause
|
82
|
-
|
83
|
-
y.is_a?(Array) or return nil
|
82
|
+
s, t, y, d = participant_table_prep(clause)
|
83
|
+
s or return nil
|
84
84
|
out1 = <<~OUTPUT
|
85
|
-
<clause id='_#{UUIDTools::UUID.random_create}'><title>#{
|
85
|
+
<clause id='_#{UUIDTools::UUID.random_create}' type="participants"><title>#{t}</title>
|
86
86
|
<table unnumbered='true'>
|
87
87
|
<thead>
|
88
88
|
<tr><th/><th>#{@i18n.full_name}</th><th>#{@i18n.affiliation}</th></tr>
|
@@ -90,11 +90,21 @@ module IsoDoc
|
|
90
90
|
<tbody>
|
91
91
|
OUTPUT
|
92
92
|
out2 = <<~OUTPUT
|
93
|
-
</tbody
|
93
|
+
</tbody>#{d&.to_xml}</table></clause>
|
94
94
|
OUTPUT
|
95
95
|
"#{out1}#{participant_rows(y)}#{out2}"
|
96
96
|
end
|
97
97
|
|
98
|
+
def participant_table_prep(clause)
|
99
|
+
s = clause.at(ns("./sourcecode"))
|
100
|
+
t = clause.at(ns("./title"))&.children&.to_xml ||
|
101
|
+
%(#{@meta.get[:"investigative-committee"]} #{@i18n.membership_table})
|
102
|
+
y = YAML.safe_load(s.children.to_xml(encoding: "UTF-8"))
|
103
|
+
d = clause.at(ns("./dl[@key = 'true']"))
|
104
|
+
s && y.is_a?(Array) or return [nil, nil, nil, nil]
|
105
|
+
[s, t, y, d]
|
106
|
+
end
|
107
|
+
|
98
108
|
def participant_rows(yaml)
|
99
109
|
yaml.map do |y|
|
100
110
|
r = y["role"] ? @i18n.l10n("(#{y['role']})") : ""
|
@@ -267,11 +267,11 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
|
|
267
267
|
<a:documentation>An identifier of the person according to an international identifier scheme</a:documentation>
|
268
268
|
</ref>
|
269
269
|
</zeroOrMore>
|
270
|
-
<
|
270
|
+
<optional>
|
271
271
|
<ref name="contact">
|
272
272
|
<a:documentation>Contact information for the person, including URI, address, phone number, and email</a:documentation>
|
273
273
|
</ref>
|
274
|
-
</
|
274
|
+
</optional>
|
275
275
|
</element>
|
276
276
|
</define>
|
277
277
|
<define name="fullname">
|
@@ -454,11 +454,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
454
454
|
<a:documentation>An identifier of the organization according to an international identifier scheme</a:documentation>
|
455
455
|
</ref>
|
456
456
|
</zeroOrMore>
|
457
|
-
<
|
457
|
+
<optional>
|
458
458
|
<ref name="contact">
|
459
459
|
<a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
|
460
460
|
</ref>
|
461
|
-
</
|
461
|
+
</optional>
|
462
462
|
<optional>
|
463
463
|
<ref name="logo">
|
464
464
|
<a:documentation>A logo for the organization</a:documentation>
|
@@ -540,12 +540,18 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
540
540
|
<!-- TODO may change -->
|
541
541
|
<define name="contact">
|
542
542
|
<a:documentation>Contact information for a person or organization</a:documentation>
|
543
|
-
<
|
543
|
+
<zeroOrMore>
|
544
544
|
<ref name="address"/>
|
545
|
+
</zeroOrMore>
|
546
|
+
<zeroOrMore>
|
545
547
|
<ref name="phone"/>
|
548
|
+
</zeroOrMore>
|
549
|
+
<zeroOrMore>
|
546
550
|
<ref name="email"/>
|
551
|
+
</zeroOrMore>
|
552
|
+
<zeroOrMore>
|
547
553
|
<ref name="uri"/>
|
548
|
-
</
|
554
|
+
</zeroOrMore>
|
549
555
|
</define>
|
550
556
|
<define name="phone">
|
551
557
|
<a:documentation>The phone number associated with a person or organization</a:documentation>
|
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.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: japanese_calendar
|
@@ -322,7 +322,7 @@ homepage: https://github.com/metanorma/metanorma-jis
|
|
322
322
|
licenses:
|
323
323
|
- BSD-2-Clause
|
324
324
|
metadata: {}
|
325
|
-
post_install_message:
|
325
|
+
post_install_message:
|
326
326
|
rdoc_options: []
|
327
327
|
require_paths:
|
328
328
|
- lib
|
@@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
338
|
version: '0'
|
339
339
|
requirements: []
|
340
340
|
rubygems_version: 3.3.27
|
341
|
-
signing_key:
|
341
|
+
signing_key:
|
342
342
|
specification_version: 4
|
343
343
|
summary: metanorma-jis lets you write JIS standards in AsciiDoc.
|
344
344
|
test_files: []
|