Skip to content

Commit

Permalink
update grammar and use Nokogiri v 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Mar 29, 2023
1 parent 787098b commit 66030d9
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 17 deletions.
1 change: 0 additions & 1 deletion grammars/basicdoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@
<value>tip</value>
<value>important</value>
<value>caution</value>
<value>statement</value>
</choice>
</define>
<define name="figure">
Expand Down
14 changes: 12 additions & 2 deletions grammars/biblio.rng
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@
<optional>
<ref name="fullname"/>
</optional>
<zeroOrMore>
<ref name="credential"/>
</zeroOrMore>
<zeroOrMore>
<ref name="affiliation"/>
</zeroOrMore>
Expand All @@ -232,6 +235,11 @@
<ref name="FullNameType"/>
</element>
</define>
<define name="credential">
<element name="credential">
<text/>
</element>
</define>
<define name="FullNameType">
<choice>
<group>
Expand Down Expand Up @@ -305,7 +313,9 @@
<zeroOrMore>
<ref name="affiliationdescription"/>
</zeroOrMore>
<ref name="organization"/>
<optional>
<ref name="organization"/>
</optional>
</element>
</define>
<define name="affiliationname">
Expand Down Expand Up @@ -1316,7 +1326,7 @@
<value>commentaryOf</value>
<value>hasCommentary</value>
<value>related</value>
<value>complements</value>
<value>hasComplement</value>
<value>complementOf</value>
<value>obsoletes</value>
<value>obsoletedBy</value>
Expand Down
9 changes: 5 additions & 4 deletions grammars/versions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"relaton-models": "v1.2.1",
"basicdoc-models": "v1.0.1",
"relaton-models": "v1.2.3",
"basicdoc-models": "v1.0.2",
"metanorma-requirements-models": "v1.0.0",
"relaton-model-ieee": "v1.0.0",
"relaton-model-iso": "v1.0.0",
"relaton-model-iec": "v1.0.0",
"relaton-model-bsi": "v1.0.0",
"relaton-model-bsi": "v1.0.2",
"relaton-model-gb": "v1.0.0",
"relaton-model-mpfa": "v1.0.0",
"relaton-model-bipm": "v1.0.0",
Expand All @@ -27,5 +27,6 @@
"relaton-model-iana": "v1.0.0",
"relaton-model-omg": "v1.0.0",
"relaton-model-oasis": "v1.0.0",
"date": "2022-12-01T15:03:50Z"
"relaton-model-jis": "v0.0.1",
"date": "2023-03-28T19:11:37Z"
}
2 changes: 1 addition & 1 deletion lib/relaton_bib/xml_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def fetch_dates(item) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticCompl
#
# @param [Nokogiri::XML::Element] org XML element
#
# @return [RelatonBib::Organization] organization
# @return [RelatonBib::Organization, nil] organization
#
def get_org(org) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
names = org.xpath("name").map do |n|
Expand Down
2 changes: 1 addition & 1 deletion relaton-bib.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
spec.add_dependency "bibtex-ruby"
spec.add_dependency "htmlentities"
spec.add_dependency "iso639"
spec.add_dependency "nokogiri", "~> 1.13.0"
spec.add_dependency "nokogiri", "~> 1.14.0"
end
4 changes: 2 additions & 2 deletions spec/examples/bib_item.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<bibitem id="ISOTC211" type="standard" schema-version="v1.2.1">
<fetched>2023-01-08</fetched>
<bibitem id="ISOTC211" type="standard" schema-version="v1.2.3">
<fetched>2023-03-18</fetched>
<title type="title-main" format="text/plain">Geographic information</title>
<title type="main" format="text/plain">Geographic information</title>
<title format="text/plain" language="fr" script="Latn">Information géographique</title>
Expand Down
4 changes: 2 additions & 2 deletions spec/examples/bibdata_item.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<bibdata type="standard" schema-version="v1.2.1">
<fetched>2023-01-08</fetched>
<bibdata type="standard" schema-version="v1.2.3">
<fetched>2023-03-18</fetched>
<title type="title-main" format="text/plain">Geographic information</title>
<title type="main" format="text/plain">Geographic information</title>
<title format="text/plain" language="fr" script="Latn">Information géographique</title>
Expand Down
4 changes: 2 additions & 2 deletions spec/examples/bibdata_item_fr.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<bibdata type="standard" schema-version="v1.2.1">
<fetched>2023-01-08</fetched>
<bibdata type="standard" schema-version="v1.2.3">
<fetched>2023-03-18</fetched>
<title format="text/plain" language="fr" script="Latn">Information géographique</title>
<uri type="src" language="en" script="Latn">https://www.iso.org/standard/53798.html</uri>
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
Expand Down
2 changes: 1 addition & 1 deletion spec/examples/from_bibtex.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<bibitem id="mrx05" type="article" schema-version="v1.2.1">
<bibitem id="mrx05" type="article" schema-version="v1.2.3">
<fetched>2019-12-05</fetched>
<title type="main" format="text/plain">Something Great</title>
<title type="main" format="text/plain">Sub title</title>
Expand Down
2 changes: 1 addition & 1 deletion spec/examples/hash.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
schema-version: v1.2.1
schema-version: v1.2.3
id: ISOTC211
title:
- content: Geographic information
Expand Down

0 comments on commit 66030d9

Please sign in to comment.