Skip to content

Commit

Permalink
instance => instanceOf: relaton/relaton-data-ccsds#1
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Aug 30, 2023
1 parent a72852a commit d61727e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/isodoc/ietf/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def title(isoxml, _out)
end

def relaton_relations
%w(included-in described-by derived-from instance)
%w(included-in described-by derived-from instance-of)
# = item describedby convertedfrom alternate
end

Expand Down
4 changes: 2 additions & 2 deletions lib/isodoc/ietf/section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def make_link(out, isoxml)
links = isoxml
.xpath(ns("//bibdata/relation[@type = 'includedIn' or " \
"@type = 'describedBy' or @type = 'derivedFrom' or " \
"@type = 'instance']")) || return
"@type = 'instanceOf']")) || return
links.each do |l|
out.link href: l&.at(ns("./bibitem/docidentifier"))&.text,
rel: rel2iana(l["type"])
Expand All @@ -117,7 +117,7 @@ def rel2iana(type)
when "includedIn" then "item"
when "describedBy" then "describedby"
when "derivedFrom" then "convertedfrom"
when "instance" then "alternate"
when "instanceOf" then "alternate"
else
"alternate"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/ietf/front.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Metanorma
module Ietf
class Converter < ::Metanorma::Standoc::Converter
def relaton_relations
%w(included-in described-by derived-from instance obsoletes updates)
%w(included-in described-by derived-from instance-of obsoletes updates)
end

def metadata_author(node, xml)
Expand Down
4 changes: 2 additions & 2 deletions spec/isodoc/metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@
<docidentifier>DER2</docidentifier>
</bibitem>
</relation>
<relation type='instance'>
<relation type='instanceOf'>
<bibitem>
<title>--</title>
<docidentifier>EQ1</docidentifier>
</bibitem>
</relation>
<relation type='instance'>
<relation type='instanceOf'>
<bibitem>
<title>--</title>
<docidentifier>EQ2</docidentifier>
Expand Down
6 changes: 3 additions & 3 deletions spec/metanorma/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
:included-in: INC1;INCL2
:described-by: DESC1;DESC2
:derived-from: https://datatracker.ietf.org/doc/draft-DER1;https://datatracker.ietf.org/doc/draft-DER2
:instance: EQ1;EQ2
:instance-of: EQ1;EQ2
:obsoletes: OB1;OB2
:updates: UPD1;UPD2
:abbrev: Abbreviated Title
Expand Down Expand Up @@ -324,13 +324,13 @@
<docidentifier>https://datatracker.ietf.org/doc/draft-DER2</docidentifier>
</bibitem>
</relation>
<relation type='instance'>
<relation type='instanceOf'>
<bibitem>
<title>--</title>
<docidentifier>EQ1</docidentifier>
</bibitem>
</relation>
<relation type='instance'>
<relation type='instanceOf'>
<bibitem>
<title>--</title>
<docidentifier>EQ2</docidentifier>
Expand Down

0 comments on commit d61727e

Please sign in to comment.