Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ Tbx
├── Sc # <sc>
├── Ph # <ph>
├── Title # <title>
├── Namespaces # XML namespace definitions
└── Ruby # Gem namespace (Tbx::Ruby::VERSION)
└── Namespace # XML namespace definition (urn:iso:std:iso:30042:ed-2)
```

### Key Implementation Patterns
Expand All @@ -95,7 +94,7 @@ module Tbx
xml do
root "conceptEntry"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "langSec", to: :lang_sec
Expand All @@ -108,7 +107,7 @@ end

### XML Namespace

The TBX namespace is `urn:iso:std:iso:30042:ed-2` defined in `Tbx::Namespaces::TbxNamespace`.
The TBX namespace is `urn:iso:std:iso:30042:ed-2` defined in `Tbx::Namespace`.

### TBX Styles

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "https://rubygems.org"
gemspec

gem "canon"
gem "lutaml-model", path: "../../lutaml/lutaml-model"
gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
gem "nokogiri"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_relative "tbx/version"

module Tbx
autoload :Namespaces, "#{__dir__}/tbx/namespaces"
autoload :Namespace, "#{__dir__}/tbx/namespace"

# Inline elements
autoload :Ec, "#{__dir__}/tbx/ec"
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Admin < Lutaml::Model::Serializable
xml do
root "admin"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/admin_grp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AdminGrp < Lutaml::Model::Serializable
xml do
root "adminGrp"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "admin", to: :admin
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/admin_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AdminNote < Lutaml::Model::Serializable
xml do
root "adminNote"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/back.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Back < Lutaml::Model::Serializable
xml do
root "back"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "refObjectSec", to: :ref_object_sec
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Body < Lutaml::Model::Serializable
xml do
root "body"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "conceptEntry", to: :concept_entry
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/change.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Change < Lutaml::Model::Serializable
xml do
root "change"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/concept_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ConceptEntry < Lutaml::Model::Serializable
xml do
root "conceptEntry"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "admin", to: :admin
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DateElement < Lutaml::Model::Serializable

xml do
root "date"
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_content to: :content
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/descrip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Descrip < Lutaml::Model::Serializable
xml do
root "descrip"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/descrip_grp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DescripGrp < Lutaml::Model::Serializable
xml do
root "descripGrp"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "descrip", to: :descrip
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/descrip_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DescripNote < Lutaml::Model::Serializable
xml do
root "descripNote"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Document < Lutaml::Model::Serializable
xml do
root "tbx"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

w3c_attributes :lang
map_attribute "type", to: :type
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/ec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Ec < Lutaml::Model::Serializable

xml do
root "ec"
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "startRef", to: :start_ref
map_attribute "isolated", to: :isolated
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/encoding_desc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class EncodingDesc < Lutaml::Model::Serializable
xml do
root "encodingDesc"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "p", to: :p
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/file_desc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FileDesc < Lutaml::Model::Serializable
xml do
root "fileDesc"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "publicationStmt", to: :publication_stmt
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/foreign.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Foreign < Lutaml::Model::Serializable
xml do
root "foreign"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/hi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Hi < Lutaml::Model::Serializable
xml do
root "hi"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "target", to: :target
map_attribute "type", to: :type
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Item < Lutaml::Model::Serializable
xml do
root "item"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_attribute "type", to: :type
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/item_grp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ItemGrp < Lutaml::Model::Serializable
xml do
root "itemGrp"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "item", to: :item
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/item_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ItemSet < Lutaml::Model::Serializable
xml do
root "itemSet"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_attribute "type", to: :type
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/lang_sec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class LangSec < Lutaml::Model::Serializable
xml do
root "langSec"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

w3c_attributes :lang
map_element "admin", to: :admin
Expand Down
7 changes: 7 additions & 0 deletions lib/tbx/namespace.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

module Tbx
class Namespace < Lutaml::Xml::Namespace
uri "urn:iso:std:iso:30042:ed-2"
end
end
9 changes: 0 additions & 9 deletions lib/tbx/namespaces.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/tbx/note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Note < Lutaml::Model::Serializable
xml do
root "note"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/p.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class P < Lutaml::Model::Serializable
xml do
root "p"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/ph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Ph < Lutaml::Model::Serializable

xml do
root "ph"
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "type", to: :type
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/publication_stmt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PublicationStmt < Lutaml::Model::Serializable
xml do
root "publicationStmt"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "p", to: :p
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/ref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Ref < Lutaml::Model::Serializable
xml do
root "ref"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/ref_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RefObject < Lutaml::Model::Serializable
xml do
root "refObject"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "itemSet", to: :item_set
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/ref_object_sec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class RefObjectSec < Lutaml::Model::Serializable
xml do
root "refObjectSec"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_attribute "type", to: :type
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/revision_desc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class RevisionDesc < Lutaml::Model::Serializable
xml do
root "revisionDesc"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/sc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Sc < Lutaml::Model::Serializable

xml do
root "sc"
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_attribute "isolated", to: :isolated
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/source_desc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SourceDesc < Lutaml::Model::Serializable
xml do
root "sourceDesc"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/tbx_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TbxHeader < Lutaml::Model::Serializable
xml do
root "tbxHeader"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "fileDesc", to: :file_desc
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/term.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Term < Lutaml::Model::Serializable
xml do
root "term"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_content to: :content
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/term_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TermNote < Lutaml::Model::Serializable
xml do
root "termNote"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
w3c_attributes :lang
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/term_note_grp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TermNoteGrp < Lutaml::Model::Serializable
xml do
root "termNoteGrp"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "termNote", to: :term_note
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/term_sec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TermSec < Lutaml::Model::Serializable
xml do
root "termSec"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "term", to: :term
Expand Down
2 changes: 1 addition & 1 deletion lib/tbx/text_element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TextElement < Lutaml::Model::Serializable
xml do
root "text"
mixed_content
namespace ::Tbx::Namespaces::TbxNamespace
namespace ::Tbx::Namespace

map_attribute "id", to: :id
map_element "body", to: :body
Expand Down
Loading
Loading