diff --git a/Gemfile.devel b/Gemfile.devel
new file mode 100644
index 0000000..ad72d40
--- /dev/null
+++ b/Gemfile.devel
@@ -0,0 +1 @@
+gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "fix/publisher-multilingual"
diff --git a/lib/isodoc/jis/i18n-en.yaml b/lib/isodoc/jis/i18n-en.yaml
index 36969f3..27a4191 100644
--- a/lib/isodoc/jis/i18n-en.yaml
+++ b/lib/isodoc/jis/i18n-en.yaml
@@ -6,6 +6,9 @@ commentary_page: Comm.
JIS: 日本工業規格
permission_footer: Duplication, reprinting, etc. without permission is prohibited by copyright law.
chairperson: chairperson
+membership_table: Membership Table
+full_name: Full Name
+affiliation: Affiliation
doctype_dict:
international-standard: International standard
japanese-industrial-standard: International standard
diff --git a/lib/isodoc/jis/i18n-ja.yaml b/lib/isodoc/jis/i18n-ja.yaml
index 3cfcf16..f755a43 100644
--- a/lib/isodoc/jis/i18n-ja.yaml
+++ b/lib/isodoc/jis/i18n-ja.yaml
@@ -11,6 +11,9 @@ JIS: 日本工業規格
draft_label: 案
white-paper: 白紙
chairperson: 委員会長
+membership_table: 構成表
+full_name: 氏名
+affiliation: 所属
doctype_dict:
international-standard: 日本産業規格
japanese-industrial-standard: 日本産業規格
diff --git a/lib/isodoc/jis/metadata.rb b/lib/isodoc/jis/metadata.rb
index 66a09a5..e5bc19f 100644
--- a/lib/isodoc/jis/metadata.rb
+++ b/lib/isodoc/jis/metadata.rb
@@ -73,20 +73,23 @@ def agency(xml)
investigative_committee(xml)
end
+ def extract_role(role, desc)
+ <<~XPATH
+ //bibdata/contributor[xmlns:role/@type = '#{role}'][xmlns:role/description = '#{desc}' or xmlns:role/description = '#{desc.downcase}']
+ XPATH
+ end
+
def investigative_organisation(xml)
- xpath = "//bibdata/contributor" \
- "[xmlns:role/@type = 'authorizer'][xmlns:role/description = " \
- "'investigative organization']/organization/name"
- org = xml.at(ns(xpath))
+ p = extract_role("authorizer", "Investigative organization")
+ org = xml.at(ns("#{p}/organization/name[@language = '#{@lang}']"))
+ org ||= xml.at(ns("#{p}/organization/name"))
if org then set_encoded(:"investigative-organization", org)
else set(:"investigative-organization", get[:publisher])
end
end
def investigative_committee(xml)
- xpath = "//bibdata/contributor" \
- "[xmlns:role/@type = 'authorizer'][xmlns:role/description = " \
- "'investigative committee']"
+ xpath = extract_role("authorizer", "Investigative committee")
if o = xml.at(ns("#{xpath}/organization/name"))
set_encoded(:"investigative-committee", o)
elsif p = xml.at(ns("#{xpath}/person"))
diff --git a/lib/isodoc/jis/presentation_section.rb b/lib/isodoc/jis/presentation_section.rb
index 601af4d..f97928f 100644
--- a/lib/isodoc/jis/presentation_section.rb
+++ b/lib/isodoc/jis/presentation_section.rb
@@ -42,17 +42,22 @@ def commentary_title_hdr(elem)
elem.previous = ret
end
- def toc_title_insert_pt(docxml)
- ins = docxml.at(ns("//preface")) ||
+ def make_preface(docxml)
+ docxml.at(ns("//preface")) ||
docxml.at(ns("//sections | //annex | //bibliography"))
&.before("
+
+
+
+
+ OUTPUT
+ out2 = <<~OUTPUT
+ #{@i18n.full_name} #{@i18n.affiliation}