Skip to content

Commit

Permalink
fix: more specs
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Oct 28, 2024
1 parent 3f2291c commit e5af4f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/niso/jats/author_notes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class AuthorNotes < Lutaml::Model::Serializable
attribute :p, Paragraph, collection: true

xml do
root "author-notes"
root "author-notes", ordered: true

map_attribute "id", to: :id
map_attribute "rid", to: :rid
map_attribute "specific-use", to: :specific_use
map_element "label", to: :label
map_element "title", to: :title
map_element "fn", to: :fn
map_element "corresp", to: :corresp
map_element "p", to: :p
map_element "corresp", to: :corresp
map_element "fn", to: :fn
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/niso/jats/ext_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class ExtLink < Lutaml::Model::Serializable
attribute :content, :string
attribute :assigning_authority, :string
attribute :ext_link_type, :string
attribute :href, :string
attribute :hreflang, :string
attribute :id, :string
attribute :specific_use, :string
Expand All @@ -30,6 +31,7 @@ class ExtLink < Lutaml::Model::Serializable
root "ext-link", mixed: true

map_content to: :content
map_attribute "href", to: :href, namespace: "http://www.w3.org/1999/xlink"
map_attribute "assigning-authority", to: :assigning_authority
map_attribute "ext-link-type", to: :ext_link_type
map_attribute "hreflang", to: :hreflang
Expand Down
2 changes: 1 addition & 1 deletion lib/niso/jats/fn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Fn < Lutaml::Model::Serializable
attribute :p, Paragraph, collection: true

xml do
root "fn"
root "fn", mixed: true

map_attribute "custom-type", to: :custom_type
map_attribute "fn-type", to: :fn_type
Expand Down
2 changes: 2 additions & 0 deletions lib/niso/jats/graphic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Niso
module Jats
class Graphic < Lutaml::Model::Serializable
attribute :content_type, :string
attribute :href, :string
attribute :hreflang, :string
attribute :id, :string
attribute :mime_subtype, :string
Expand Down Expand Up @@ -31,6 +32,7 @@ class Graphic < Lutaml::Model::Serializable
root "graphic"

map_attribute "content-type", to: :content_type
map_attribute "href", to: :href, namespace: "http://www.w3.org/1999/xlink"
map_attribute "hreflang", to: :hreflang
map_attribute "id", to: :id
map_attribute "mime-subtype", to: :mime_subtype
Expand Down

0 comments on commit e5af4f6

Please sign in to comment.