tbx 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.github/workflows/release.yml +2 -2
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +38 -0
- data/CLAUDE.md +23 -4
- data/Gemfile +1 -1
- data/README.adoc +365 -19
- data/lib/tbx/admin.rb +25 -12
- data/lib/tbx/admin_grp.rb +6 -1
- data/lib/tbx/admin_note.rb +15 -7
- data/lib/tbx/back.rb +6 -1
- data/lib/tbx/body.rb +4 -1
- data/lib/tbx/change.rb +7 -1
- data/lib/tbx/concept_entry.rb +11 -1
- data/lib/tbx/data_element.rb +50 -0
- data/lib/tbx/date.rb +7 -1
- data/lib/tbx/descrip.rb +24 -12
- data/lib/tbx/descrip_grp.rb +8 -1
- data/lib/tbx/descrip_note.rb +7 -7
- data/lib/tbx/document.rb +13 -1
- data/lib/tbx/ec.rb +17 -1
- data/lib/tbx/encoding_desc.rb +4 -1
- data/lib/tbx/file_desc.rb +7 -1
- data/lib/tbx/foreign.rb +7 -1
- data/lib/tbx/hi.rb +19 -1
- data/lib/tbx/item.rb +7 -1
- data/lib/tbx/item_grp.rb +7 -1
- data/lib/tbx/item_set.rb +7 -1
- data/lib/tbx/lang_sec.rb +7 -1
- data/lib/tbx/modules/basic.rb +92 -0
- data/lib/tbx/modules/core_types.rb +23 -0
- data/lib/tbx/modules/linguist.rb +46 -0
- data/lib/tbx/modules/min.rb +46 -0
- data/lib/tbx/namespace.rb +12 -0
- data/lib/tbx/note.rb +10 -1
- data/lib/tbx/p.rb +10 -1
- data/lib/tbx/ph.rb +7 -1
- data/lib/tbx/publication_stmt.rb +4 -1
- data/lib/tbx/ref.rb +18 -7
- data/lib/tbx/ref_object.rb +7 -1
- data/lib/tbx/ref_object_sec.rb +7 -1
- data/lib/tbx/revision_desc.rb +4 -1
- data/lib/tbx/sc.rb +10 -7
- data/lib/tbx/source_desc.rb +4 -1
- data/lib/tbx/tbx_header.rb +8 -1
- data/lib/tbx/term.rb +7 -1
- data/lib/tbx/term_comp.rb +26 -0
- data/lib/tbx/term_comp_grp.rb +24 -0
- data/lib/tbx/term_comp_sec.rb +45 -0
- data/lib/tbx/term_note.rb +45 -12
- data/lib/tbx/term_note_grp.rb +8 -1
- data/lib/tbx/term_sec.rb +9 -1
- data/lib/tbx/text_element.rb +6 -1
- data/lib/tbx/title.rb +7 -1
- data/lib/tbx/title_stmt.rb +4 -1
- data/lib/tbx/transac.rb +18 -7
- data/lib/tbx/transac_grp.rb +7 -1
- data/lib/tbx/transac_note.rb +18 -7
- data/lib/tbx/version.rb +1 -1
- data/lib/tbx/xref.rb +17 -1
- data/lib/tbx.rb +14 -1
- data/reference-docs/README.adoc +109 -0
- data/reference-docs/schemas/Basic_Module_Definition.pdf +0 -0
- data/reference-docs/schemas/Min_Module_Definition.pdf +0 -0
- data/reference-docs/schemas/TBX-Basic_ImplementationGuide/TBX-Basic_ImplementationGuide.pdf +0 -0
- data/reference-docs/schemas/TBX-Core_dialect/Schemas/Example_Astronomy_DCA_VALID.tbx +710 -0
- data/reference-docs/schemas/TBX-Core_dialect/Schemas/TBX-Core.sch +47 -0
- data/reference-docs/schemas/TBX-Core_dialect/Schemas/TBXcoreStructV03_TBX-Core_integrated.rng +1171 -0
- data/reference-docs/schemas/TBX-Core_dialect/TBX-Core Definition.pdf +0 -0
- data/reference-docs/schemas/TBX-Linguist_dialect/DCA/Example_Astronomy_DCA_VALID.tbx +4028 -0
- data/reference-docs/schemas/TBX-Linguist_dialect/DCA/TBX-Linguist_DCA.sch +146 -0
- data/reference-docs/schemas/TBX-Linguist_dialect/DCA/TBXcoreStructV03_TBX-Linguist_integrated.rng +1198 -0
- data/reference-docs/schemas/TBX-Linguist_dialect/DCT/Example_Astronomy_DCT_VALID.tbx +4019 -0
- data/reference-docs/schemas/TBX-Linguist_dialect/DCT/TBX-Linguist.nvdl +41 -0
- data/reference-docs/schemas/TBX-Linguist_dialect/DCT/TBX-Linguist_DCT.sch +48 -0
- data/reference-docs/schemas/TBX-Linguist_dialect/TBX-Linguist Definition.pdf +0 -0
- data/reference-docs/schemas/TBX-Min_dialect/DCA/TBX-Min_DCA.sch +82 -0
- data/reference-docs/schemas/TBX-Min_dialect/DCT/TBX-Min.nvdl +25 -0
- data/reference-docs/schemas/TBX-Min_dialect/DCT/TBX-Min_DCT.sch +48 -0
- data/reference-docs/schemas/TBX-Min_dialect/TBX-Min Definition.pdf +0 -0
- data/reference-docs/schemas/TBX_linguist_module/Linguist Module Definition.pdf +0 -0
- data/reference-docs/schemas/TBX_linguist_module/Linguist.rng +93 -0
- data/reference-docs/schemas/TBX_linguist_module/Linguist.sch +33 -0
- data/reference-docs/schemas/TBX_linguist_module/Linguist.tbxmd +47 -0
- data/reference-docs/schemas/TBX_module_description_xml/TBX Module Description.pdf +0 -0
- data/reference-docs/schemas/TBX_module_description_xml/tbxmd.rng +192 -0
- data/reference-docs/schemas/TBX_termComp_module/TermComp-namespace.rng +156 -0
- metadata +41 -4
- data/lib/tbx/namespaces.rb +0 -9
data/lib/tbx/transac_grp.rb
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Tbx
|
|
4
|
+
# Groups a `<transac>` transaction element with its date and
|
|
5
|
+
# responsibility information.
|
|
6
|
+
#
|
|
7
|
+
# Children: `transac` (required), then date, note, ref, transacNote, xref.
|
|
8
|
+
#
|
|
9
|
+
# Schema source: TBXcoreStructV03.rng `<define name="transacGrp">`
|
|
4
10
|
class TransacGrp < Lutaml::Model::Serializable
|
|
5
11
|
attribute :id, :string
|
|
6
12
|
attribute :transac, ::Tbx::Transac
|
|
@@ -13,7 +19,7 @@ module Tbx
|
|
|
13
19
|
xml do
|
|
14
20
|
root "transacGrp"
|
|
15
21
|
mixed_content
|
|
16
|
-
namespace ::Tbx::
|
|
22
|
+
namespace ::Tbx::Namespace
|
|
17
23
|
|
|
18
24
|
map_attribute "id", to: :id
|
|
19
25
|
map_element "transac", to: :transac
|
data/lib/tbx/transac_note.rb
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Tbx
|
|
4
|
+
# Transaction note element `<transacNote>`.
|
|
5
|
+
#
|
|
6
|
+
# Provides additional information about a transaction, typically identifying
|
|
7
|
+
# the person or organization responsible.
|
|
8
|
+
#
|
|
9
|
+
# Permitted `type` values:
|
|
10
|
+
#
|
|
11
|
+
# * Basic module: `responsibility` — person/org responsible for the
|
|
12
|
+
# transaction (DC-451)
|
|
13
|
+
#
|
|
14
|
+
# Content is plain text only (no inline elements per the core RNG).
|
|
15
|
+
#
|
|
16
|
+
# Schema source: TBXcoreStructV03.rng `<define name="transacNote">`;
|
|
17
|
+
# data category: Basic.tbxmd.
|
|
4
18
|
class TransacNote < Lutaml::Model::Serializable
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
attribute :datatype, :string
|
|
9
|
-
attribute :type, :string
|
|
10
|
-
attribute :content, :string, collection: true
|
|
19
|
+
include Tbx::DataElement
|
|
20
|
+
|
|
21
|
+
TYPES = Modules::Basic::TRANSAC_NOTE_TYPES.freeze
|
|
11
22
|
|
|
12
23
|
xml do
|
|
13
24
|
root "transacNote"
|
|
14
25
|
mixed_content
|
|
15
|
-
namespace ::Tbx::
|
|
26
|
+
namespace ::Tbx::Namespace
|
|
16
27
|
|
|
17
28
|
map_attribute "id", to: :id
|
|
18
29
|
w3c_attributes :lang
|
data/lib/tbx/version.rb
CHANGED
data/lib/tbx/xref.rb
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Tbx
|
|
4
|
+
# External cross-reference element `<xref>`.
|
|
5
|
+
#
|
|
6
|
+
# The `target` attribute holds a URI (http/https) pointing to an external
|
|
7
|
+
# resource. Unlike `Ref`, which uses IDREF for internal references, Xref
|
|
8
|
+
# uses anyURI for external resources.
|
|
9
|
+
#
|
|
10
|
+
# Permitted `type` values:
|
|
11
|
+
#
|
|
12
|
+
# * Min module: `externalCrossReference` — reference to an external resource
|
|
13
|
+
# * Basic module: `externalCrossReference` — external reference (DC-226),
|
|
14
|
+
# `xGraphic` — graphic image associated with the concept (DC-2920)
|
|
15
|
+
#
|
|
16
|
+
# Schema source: TBXcoreStructV03.rng `<define name="xref">`;
|
|
17
|
+
# data categories: Basic.tbxmd.
|
|
4
18
|
class Xref < Lutaml::Model::Serializable
|
|
19
|
+
TYPES = Modules::Min::XREF_TYPES
|
|
20
|
+
.merge(Modules::Basic::XREF_TYPES).freeze
|
|
5
21
|
attribute :id, :string
|
|
6
22
|
attribute :target, :string
|
|
7
23
|
attribute :type, :string
|
|
@@ -10,7 +26,7 @@ module Tbx
|
|
|
10
26
|
xml do
|
|
11
27
|
root "xref"
|
|
12
28
|
mixed_content
|
|
13
|
-
namespace ::Tbx::
|
|
29
|
+
namespace ::Tbx::Namespace
|
|
14
30
|
|
|
15
31
|
map_attribute "id", to: :id
|
|
16
32
|
map_attribute "target", to: :target
|
data/lib/tbx.rb
CHANGED
|
@@ -4,7 +4,14 @@ require "lutaml/model"
|
|
|
4
4
|
require_relative "tbx/version"
|
|
5
5
|
|
|
6
6
|
module Tbx
|
|
7
|
-
|
|
7
|
+
module Modules
|
|
8
|
+
autoload :Min, "#{__dir__}/tbx/modules/min"
|
|
9
|
+
autoload :Basic, "#{__dir__}/tbx/modules/basic"
|
|
10
|
+
autoload :Linguist, "#{__dir__}/tbx/modules/linguist"
|
|
11
|
+
autoload :CoreTypes, "#{__dir__}/tbx/modules/core_types"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
autoload :Namespace, "#{__dir__}/tbx/namespace"
|
|
8
15
|
|
|
9
16
|
# Inline elements
|
|
10
17
|
autoload :Ec, "#{__dir__}/tbx/ec"
|
|
@@ -18,6 +25,9 @@ module Tbx
|
|
|
18
25
|
autoload :P, "#{__dir__}/tbx/p"
|
|
19
26
|
autoload :Title, "#{__dir__}/tbx/title"
|
|
20
27
|
|
|
28
|
+
# Shared concerns
|
|
29
|
+
autoload :DataElement, "#{__dir__}/tbx/data_element"
|
|
30
|
+
|
|
21
31
|
# Data elements
|
|
22
32
|
autoload :Admin, "#{__dir__}/tbx/admin"
|
|
23
33
|
autoload :AdminGrp, "#{__dir__}/tbx/admin_grp"
|
|
@@ -45,6 +55,9 @@ module Tbx
|
|
|
45
55
|
|
|
46
56
|
# Structural elements
|
|
47
57
|
autoload :Term, "#{__dir__}/tbx/term"
|
|
58
|
+
autoload :TermComp, "#{__dir__}/tbx/term_comp"
|
|
59
|
+
autoload :TermCompGrp, "#{__dir__}/tbx/term_comp_grp"
|
|
60
|
+
autoload :TermCompSec, "#{__dir__}/tbx/term_comp_sec"
|
|
48
61
|
autoload :TermSec, "#{__dir__}/tbx/term_sec"
|
|
49
62
|
autoload :LangSec, "#{__dir__}/tbx/lang_sec"
|
|
50
63
|
autoload :ConceptEntry, "#{__dir__}/tbx/concept_entry"
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
= Reference Documentation
|
|
2
|
+
|
|
3
|
+
This directory contains official TBX schema, dialect, and module reference
|
|
4
|
+
files from https://ltac-global.org[LTAC Global] (LTAC-Global on GitHub).
|
|
5
|
+
|
|
6
|
+
== Source repositories
|
|
7
|
+
|
|
8
|
+
All files below are sourced from the
|
|
9
|
+
https://github.com/LTAC-Global[LTAC-Global GitHub organization] and are
|
|
10
|
+
used under their respective licenses for reference purposes.
|
|
11
|
+
|
|
12
|
+
=== Dialects
|
|
13
|
+
|
|
14
|
+
Dialects define a specific profile of TBX with Schematron constraints,
|
|
15
|
+
RELAX NG schemas, and example files.
|
|
16
|
+
|
|
17
|
+
|===
|
|
18
|
+
| Directory | Source repository | Description
|
|
19
|
+
|
|
20
|
+
| `schemas/TBX-Basic_dialect_v1/`
|
|
21
|
+
| https://github.com/LTAC-Global/TBX-Basic_dialect[TBX-Basic_dialect]
|
|
22
|
+
| TBX-Basic dialect (DCA + DCT schemas, example files, bundled modules)
|
|
23
|
+
|
|
24
|
+
| `schemas/TBX-Min_dialect/`
|
|
25
|
+
| https://github.com/LTAC-Global/TBX-Min_dialect[TBX-Min_dialect]
|
|
26
|
+
| TBX-Min dialect (DCA + DCT Schematron, NVDL)
|
|
27
|
+
|
|
28
|
+
| `schemas/TBX-Core_dialect/`
|
|
29
|
+
| https://github.com/LTAC-Global/TBX-Core_dialect[TBX-Core_dialect]
|
|
30
|
+
| TBX-Core dialect (integrated RNG, Schematron, example)
|
|
31
|
+
|
|
32
|
+
| `schemas/TBX-Linguist_dialect/`
|
|
33
|
+
| https://github.com/LTAC-Global/TBX-Linguist_dialect[TBX-Linguist_dialect]
|
|
34
|
+
| TBX-Linguist dialect (DCA + DCT Schematron, integrated RNG, examples)
|
|
35
|
+
|===
|
|
36
|
+
|
|
37
|
+
=== Modules
|
|
38
|
+
|
|
39
|
+
Modules define data categories and structural rules for a specific level
|
|
40
|
+
of terminological detail.
|
|
41
|
+
|
|
42
|
+
|===
|
|
43
|
+
| Directory | Source repository | Key files
|
|
44
|
+
|
|
45
|
+
| `schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/`
|
|
46
|
+
| https://github.com/LTAC-Global/TBX_min_module[TBX_min_module]
|
|
47
|
+
| `Min.rng`, `Min.sch`, `Min.tbxmd`
|
|
48
|
+
|
|
49
|
+
| `schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/`
|
|
50
|
+
| https://github.com/LTAC-Global/TBX_basic_module[TBX_basic_module]
|
|
51
|
+
| `Basic.rng`, `Basic.sch`, `Basic.tbxmd`
|
|
52
|
+
|
|
53
|
+
| `schemas/TBX_linguist_module/`
|
|
54
|
+
| https://github.com/LTAC-Global/TBX_linguist_module[TBX_linguist_module]
|
|
55
|
+
| `Linguist.rng`, `Linguist.sch`, `Linguist.tbxmd`
|
|
56
|
+
|
|
57
|
+
| `schemas/TBX_termComp_module/`
|
|
58
|
+
| https://github.com/LTAC-Global/TBX_termComp_module[TBX_termComp_module]
|
|
59
|
+
| `TermComp-namespace.rng`
|
|
60
|
+
|===
|
|
61
|
+
|
|
62
|
+
=== Core schema
|
|
63
|
+
|
|
64
|
+
|===
|
|
65
|
+
| File | Source repository | Description
|
|
66
|
+
|
|
67
|
+
| `schemas/TBXcoreStructV03.rng`
|
|
68
|
+
| https://github.com/LTAC-Global/TBX_core_module[TBX_core_module]
|
|
69
|
+
| TBX core structural RELAX NG schema
|
|
70
|
+
|
|
71
|
+
| `schemas/TBX_core.xsd`
|
|
72
|
+
| https://github.com/LTAC-Global/TBX_core_module[TBX_core_module]
|
|
73
|
+
| TBX core XML Schema (XSD)
|
|
74
|
+
|===
|
|
75
|
+
|
|
76
|
+
=== Module description format
|
|
77
|
+
|
|
78
|
+
|===
|
|
79
|
+
| Directory | Source repository | Key files
|
|
80
|
+
|
|
81
|
+
| `schemas/TBX_module_description_xml/`
|
|
82
|
+
| https://github.com/LTAC-Global/TBX_module_description_xml[TBX_module_description_xml]
|
|
83
|
+
| `tbxmd.rng` -- RELAX NG schema for `.tbxmd` module definition files
|
|
84
|
+
|===
|
|
85
|
+
|
|
86
|
+
=== Implementation guide
|
|
87
|
+
|
|
88
|
+
|===
|
|
89
|
+
| Directory | Source repository | Key files
|
|
90
|
+
|
|
91
|
+
| `schemas/TBX-Basic_ImplementationGuide/`
|
|
92
|
+
| https://github.com/LTAC-Global/TBX-Basic_ImplementationGuide[TBX-Basic_ImplementationGuide]
|
|
93
|
+
| `TBX-Basic_ImplementationGuide.pdf`
|
|
94
|
+
|===
|
|
95
|
+
|
|
96
|
+
== TBX module hierarchy
|
|
97
|
+
|
|
98
|
+
The TBX standard (ISO 30042:2019) defines a modular architecture:
|
|
99
|
+
|
|
100
|
+
....
|
|
101
|
+
TBX-Core structural foundation (element definitions)
|
|
102
|
+
+-- TBX-Min minimal data categories for basic terminology
|
|
103
|
+
+-- TBX-Basic standard data categories for general terminology
|
|
104
|
+
+-- TBX-Linguist extended data categories for linguistic detail
|
|
105
|
+
+-- TBX-TermComp term composition and decomposition
|
|
106
|
+
....
|
|
107
|
+
|
|
108
|
+
Each dialect (TBX-Min, TBX-Basic, etc.) combines the core structure with
|
|
109
|
+
one or more modules and adds dialect-specific Schematron constraints.
|
|
Binary file
|
|
Binary file
|