Skip to content

Commit

Permalink
feat: use proper namespace configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Nov 14, 2024
1 parent f7e54fc commit eb54963
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions lib/termium/extract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,13 @@ class Extract < Lutaml::Model::Serializable

xml do
root "termium_extract"
# namespace "http://termium.tpsgc-pwgsc.gc.ca/schemas/2012/06/Termium", "ns2"
namespace "http://termium.tpsgc-pwgsc.gc.ca/schemas/2012/06/Termium", "ns2"

map_attribute "language", to: :language
map_element "extractLanguage", to: :extract_language
map_element "core", to: :core
map_attribute "language", to: :language, namespace: nil
map_element "extractLanguage", to: :extract_language, namespace: nil
map_element "core", to: :core, namespace: nil
end

# xml do
# root "termium_extract"
# namespace "http://termium.tpsgc-pwgsc.gc.ca/schemas/2012/06/Termium", "ns2"

# map_attribute "language", to: :language, namespace: nil
# map_element "extractLanguage", to: :extract_language, namespace: nil
# map_element "core", to: :core, namespace: nil
# end

def to_concept
coll = Glossarist::ManagedConceptCollection.new
coll.managed_concepts = core.map(&:to_concept)
Expand Down

0 comments on commit eb54963

Please sign in to comment.