tbx 0.1.0

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.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/rake.yml +15 -0
  3. data/.github/workflows/release.yml +29 -0
  4. data/.gitignore +16 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +17 -0
  7. data/.rubocop_todo.yml +16 -0
  8. data/CHANGELOG.md +5 -0
  9. data/CLAUDE.md +124 -0
  10. data/CODE_OF_CONDUCT.md +10 -0
  11. data/Gemfile +15 -0
  12. data/README.adoc +156 -0
  13. data/Rakefile +12 -0
  14. data/lib/tbx/admin.rb +35 -0
  15. data/lib/tbx/admin_grp.rb +25 -0
  16. data/lib/tbx/admin_note.rb +25 -0
  17. data/lib/tbx/back.rb +17 -0
  18. data/lib/tbx/body.rb +17 -0
  19. data/lib/tbx/change.rb +19 -0
  20. data/lib/tbx/concept_entry.rb +33 -0
  21. data/lib/tbx/date.rb +16 -0
  22. data/lib/tbx/descrip.rb +35 -0
  23. data/lib/tbx/descrip_grp.rb +31 -0
  24. data/lib/tbx/descrip_note.rb +25 -0
  25. data/lib/tbx/document.rb +23 -0
  26. data/lib/tbx/ec.rb +28 -0
  27. data/lib/tbx/encoding_desc.rb +17 -0
  28. data/lib/tbx/file_desc.rb +21 -0
  29. data/lib/tbx/foreign.rb +29 -0
  30. data/lib/tbx/hi.rb +19 -0
  31. data/lib/tbx/item.rb +29 -0
  32. data/lib/tbx/item_grp.rb +29 -0
  33. data/lib/tbx/item_set.rb +21 -0
  34. data/lib/tbx/lang_sec.rb +33 -0
  35. data/lib/tbx/namespaces.rb +9 -0
  36. data/lib/tbx/note.rb +29 -0
  37. data/lib/tbx/p.rb +31 -0
  38. data/lib/tbx/ph.rb +14 -0
  39. data/lib/tbx/publication_stmt.rb +17 -0
  40. data/lib/tbx/ref.rb +25 -0
  41. data/lib/tbx/ref_object.rb +21 -0
  42. data/lib/tbx/ref_object_sec.rb +19 -0
  43. data/lib/tbx/revision_desc.rb +19 -0
  44. data/lib/tbx/sc.rb +22 -0
  45. data/lib/tbx/source_desc.rb +19 -0
  46. data/lib/tbx/tbx_header.rb +21 -0
  47. data/lib/tbx/term.rb +19 -0
  48. data/lib/tbx/term_note.rb +35 -0
  49. data/lib/tbx/term_note_grp.rb +29 -0
  50. data/lib/tbx/term_sec.rb +37 -0
  51. data/lib/tbx/text_element.rb +19 -0
  52. data/lib/tbx/title.rb +19 -0
  53. data/lib/tbx/title_stmt.rb +21 -0
  54. data/lib/tbx/transac.rb +25 -0
  55. data/lib/tbx/transac_grp.rb +27 -0
  56. data/lib/tbx/transac_note.rb +25 -0
  57. data/lib/tbx/version.rb +5 -0
  58. data/lib/tbx/xref.rb +21 -0
  59. data/lib/tbx.rb +67 -0
  60. data/reference-docs/schemas/TBX-Basic_DCA.sch +142 -0
  61. data/reference-docs/schemas/TBX-Basic_dialect_v1/DCA/Example_Astronomy_DCA_VALID.tbx +4032 -0
  62. data/reference-docs/schemas/TBX-Basic_dialect_v1/DCA/TBX-Basic_DCA.sch +142 -0
  63. data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/Example_Astronomy_DCT_VALID.tbx +4021 -0
  64. data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/TBX-Basic.nvdl +33 -0
  65. data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/TBX-Basic_DCT.sch +48 -0
  66. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic Module Definition.docx +0 -0
  67. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic Module Definition.pdf +0 -0
  68. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.rng +164 -0
  69. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.sch +60 -0
  70. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.tbxmd +125 -0
  71. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min Module Definition.docx +0 -0
  72. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min Module Definition.pdf +0 -0
  73. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.rng +77 -0
  74. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.sch +24 -0
  75. data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.tbxmd +42 -0
  76. data/reference-docs/schemas/TBX-Basic_dialect_v1/TBX-Basic Definition.docx +0 -0
  77. data/reference-docs/schemas/TBX-Basic_dialect_v1/TBX-Basic Definition.pdf +0 -0
  78. data/reference-docs/schemas/TBX_core.xsd +534 -0
  79. data/reference-docs/schemas/TBXcoreStructV03.rng +713 -0
  80. data/tbx.gemspec +35 -0
  81. metadata +140 -0
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
3
+ xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" startMode="core">
4
+ <mode name="core">
5
+ <namespace ns="urn:iso:std:iso:30042:ed-2">
6
+ <validate schema="https://raw.githubusercontent.com/LTAC-Global/TBX_Core_RNG/master/TBXcoreStructV03.rng" useMode="RNG"/>
7
+ <validate schema="https://raw.githubusercontent.com/LTAC-Global/TBX-Basic_dialect/master/DCT/TBX-Basic_DCT.sch" useMode="SCH"/>
8
+ <validate schema="https://raw.githubusercontent.com/LTAC-Global/TBX_basic_module/master/Basic.sch" useMode="SCH"/>
9
+ <validate schema="https://raw.githubusercontent.com/LTAC-Global/TBX_min_module/master/Min.sch" useMode="SCH"/>
10
+ </namespace>
11
+ <anyNamespace>
12
+ <reject/>
13
+ </anyNamespace>
14
+ </mode>
15
+ <mode name="RNG">
16
+ <namespace ns="http://www.tbxinfo.net/ns/min">
17
+ <validate schema="https://raw.githubusercontent.com/LTAC-Global/TBX_min_module/master/Min.rng"/>
18
+ <attach/>
19
+ </namespace>
20
+ <namespace ns="http://www.tbxinfo.net/ns/basic">
21
+ <validate schema="https://raw.githubusercontent.com/LTAC-Global/TBX_basic_module/master/Basic.rng"/>
22
+ <attach/>
23
+ </namespace>
24
+ </mode>
25
+ <mode name="SCH">
26
+ <namespace ns="http://www.tbxinfo.net/ns/min">
27
+ <attach/>
28
+ </namespace>
29
+ <namespace ns="http://www.tbxinfo.net/ns/basic">
30
+ <attach/>
31
+ </namespace>
32
+ </mode>
33
+ </rules>
@@ -0,0 +1,48 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"
3
+ xmlns:sqf="http://www.schematron-quickfix.com/validator/process">
4
+ <ns uri="urn:iso:std:iso:30042:ed-2" prefix="tbx" />
5
+
6
+ <pattern id="coreEnforecement">
7
+ <rule context="tbx:termNote">
8
+ <assert test="parent::tbx:termSec or parent::tbx:termNoteGrp/parent::tbx:termSec">Any termNote is only allowed at the termSec level.</assert>
9
+ </rule>
10
+ <rule context="tbx:*[@metatype='termNote']">
11
+ <assert test="parent::tbx:termSec or parent::tbx:termNoteGrp/parent::tbx:termSec">Any termNote is only allowed at the termSec level.</assert>
12
+ </rule>
13
+ <rule context="*[@target]">
14
+ <assert test="matches(@target,'https?://.+') or @target = //*/@id">ID must be IDREF for internal references or URI following HTTP protocol for external references.</assert>
15
+ </rule>
16
+ </pattern>
17
+
18
+ <pattern id="XLIFF.inlineConstraints">
19
+ <rule context="tbx:sc[following-sibling::tbx:ec]">
20
+ <assert test="@isolated='no' or not(@isolated)">@isolated must be 'no' if &lt;sc/&gt; or &lt;ec/&gt; has its corresponding &lt;sc/&gt;/&lt;ec/&gt; in the same note text and @startRef must be used for &lt;ec&gt;</assert>
21
+ </rule>
22
+ <rule context="tbx:ec[preceding-sibling::tbx:sc]">
23
+ <assert test="@isolated='no' or not(@isolated)">@isolated must be 'no' if &lt;sc/&gt; or &lt;ec/&gt; has its corresponding &lt;sc/&gt;/&lt;ec/&gt; in the same note text and @startRef must be used for &lt;ec&gt;</assert>
24
+ <assert test="@startRef">@starRef is required for &lt;ec&gt; if it is in the same note text as its corresponding &lt;sc&gt;</assert>
25
+ <!--<assert test="not(@dir)">@dir only permitted when @isolated is 'yes'.</assert>--><!--@dir IS NOT CURRENTLY USED IN TBX-->
26
+ </rule>
27
+ <rule context="tbx:sc[not(following-sibling::tbx:ec)]">
28
+ <assert test="@isolated='yes' or not(@isolated)">@isolated must be 'yes' if &lt;sc/&gt; or &lt;ec/&gt; does not have its corresponding &lt;sc/&gt;/&lt;sc/&gt; in the same note text</assert>
29
+ </rule>
30
+ <rule context="tbx:ec[not(preceding-sibling::tbx:sc)]">
31
+ <assert test="@isolated='yes' or not(@isolated)">@isolated must be 'yes' if &lt;sc/&gt; or &lt;ec/&gt; does not have its corresponding &lt;sc/&gt;/&lt;sc/&gt; in the same note text</assert>
32
+ <assert test="@id">@id is REQUIRED when @isolated is or should be 'yes'.</assert>
33
+ </rule>
34
+ <rule context="tbx:ec[@isolated='yes']">
35
+ <assert test="@id != ''">ID is required if @isolated is 'yes'.</assert>
36
+ </rule>
37
+ </pattern>
38
+
39
+ <pattern id="dialectEnforcement">
40
+ <rule context="tbx:tbx">
41
+ <assert test="attribute::type='TBX-Basic'">The name of this dialect should be TBX-Basic</assert>
42
+ <assert test="attribute::style='dct'">The style of this dialect should be declared as 'dct'</assert>
43
+ </rule>
44
+ <rule context="tbx:*[@type]">
45
+ <assert test="not(matches(.,'|.')) or .. is root() or ancestor::tbx:back or ancestor::tbx:tbxHeader">DCA style elements are not permitted in DCT style TBX.</assert>
46
+ </rule>
47
+ </pattern>
48
+ </schema>
@@ -0,0 +1,164 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
3
+ xmlns:teix="http://www.tei-c.org/ns/Examples"
4
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
5
+ ns="http://www.tbxinfo.net/ns/basic">
6
+
7
+ <!-- optional metaType attribute -->
8
+ <define name="metaType">
9
+ <optional>
10
+ <attribute name="metaType">
11
+ <choice>
12
+ <value>admin</value>
13
+ <value>adminNote</value>
14
+ <value>descrip</value>
15
+ <value>descripNote</value>
16
+ <value>ref</value>
17
+ <value>termNote</value>
18
+ <value>transac</value>
19
+ <value>transacNote</value>
20
+ <value>xref</value>
21
+ </choice>
22
+ </attribute>
23
+ </optional>
24
+ </define>
25
+
26
+ <!-- shared attributes -->
27
+ <define name="attribute.target.internal">
28
+ <attribute name="target">
29
+ <data type="IDREF"/>
30
+ </attribute>
31
+ </define>
32
+ <define name="attribute.target.external">
33
+ <attribute name="target">
34
+ <data type="anyURI">
35
+ <param name="pattern">https?://.+</param>
36
+ </data>
37
+ </attribute>
38
+ </define>
39
+
40
+ <!-- descrip classified elements -->
41
+ <define name="module.admin">
42
+ <choice>
43
+ <element name="projectSubset">
44
+ <text/>
45
+ </element>
46
+ <element name="source">
47
+ <text/>
48
+ </element>
49
+ </choice>
50
+ </define>
51
+ <define name="module.descrip">
52
+ <choice>
53
+ <element name="context">
54
+ <text/>
55
+ </element>
56
+ <element name="definition">
57
+ <text/>
58
+ </element>
59
+ </choice>
60
+ </define>
61
+
62
+ <define name="module.ref">
63
+ <choice>
64
+ <element name="crossReference">
65
+ <text/>
66
+ <ref name="attribute.target.internal"/>
67
+ </element>
68
+ </choice>
69
+ </define>
70
+
71
+ <!-- termNote classified elements -->
72
+ <define name="module.termNote">
73
+ <choice>
74
+ <element name="grammaticalGender">
75
+ <choice>
76
+ <value>masculine</value>
77
+ <value>feminine</value>
78
+ <value>neuter</value>
79
+ <value>other</value>
80
+ </choice>
81
+ </element>
82
+ <element name="geographicalUsage">
83
+ <text/>
84
+ </element>
85
+ <element name="termLocation">
86
+ <choice>
87
+ <value>checkBox</value>
88
+ <value>comboBox</value>
89
+ <value>comboBoxElement</value>
90
+ <value>dialogBox</value>
91
+ <value>groupBox</value>
92
+ <value>informativeMessage</value>
93
+ <value>interactiveMessage</value>
94
+ <value>menuItem</value>
95
+ <value>progressBar</value>
96
+ <value>pushButton</value>
97
+ <value>radioButton</value>
98
+ <value>slider</value>
99
+ <value>spinBox</value>
100
+ <value>spinBox</value>
101
+ <value>tab</value>
102
+ <value>tableText</value>
103
+ <value>textBox</value>
104
+ <value>toolTip</value>
105
+ <value>user-definedType</value>
106
+ </choice>
107
+ </element>
108
+ <element name="termType">
109
+ <choice>
110
+ <value>fullForm</value>
111
+ <value>acronym</value>
112
+ <value>abbreviation</value>
113
+ <value>shortForm</value>
114
+ <value>variant</value>
115
+ <value>phrase</value>
116
+ </choice>
117
+ </element>
118
+ </choice>
119
+ </define>
120
+ <define name="module.transac">
121
+ <choice>
122
+ <element name="transactionType">
123
+ <choice>
124
+ <value>origination</value>
125
+ <value>modification</value>
126
+ </choice>
127
+ </element>
128
+ </choice>
129
+ </define>
130
+ <define name="module.transacNote">
131
+ <choice>
132
+ <element name="responsibility">
133
+ <text/>
134
+ <optional>
135
+ <ref name="attribute.target.internal"/>
136
+ </optional>
137
+ </element>
138
+ </choice>
139
+ </define>
140
+ <define name="module.xref">
141
+ <choice>
142
+ <element name="externalCrossReference">
143
+ <text/>
144
+ <ref name="attribute.target.external"/>
145
+ </element>
146
+ <element name="xGraphic">
147
+ <text/>
148
+ <ref name="attribute.target.external"/>
149
+ </element>
150
+ </choice>
151
+ </define>
152
+
153
+ <start>
154
+ <choice>
155
+ <ref name="module.admin"/>
156
+ <ref name="module.descrip"/>
157
+ <ref name="module.ref"/>
158
+ <ref name="module.termNote"/>
159
+ <ref name="module.transac"/>
160
+ <ref name="module.transacNote"/>
161
+ <ref name="module.xref"/>
162
+ </choice>
163
+ </start>
164
+ </grammar>
@@ -0,0 +1,60 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"
3
+ xmlns:sqf="http://www.schematron-quickfix.com/validator/process">
4
+ <ns uri="urn:iso:std:iso:30042:ed-2" prefix="tbx" />
5
+ <ns uri="http://www.tbxinfo.net/ns/basic" prefix="basic" />
6
+ <ns uri="http://www.w3.org/2001/XMLSchema" prefix="xs" />
7
+
8
+ <!-- Basic Module Rules -->
9
+ <pattern id="module.basic.admin">
10
+ <rule context="basic:projectSubset">
11
+ <assert test="parent::tbx:conceptEntry or parent::tbx:termSec or parent::tbx:adminGrp/(parent::tbx:conceptEntry or parent::tbx:termSec)">Project may only appear at the conceptEntry or termSec levels</assert>
12
+ </rule>
13
+ <rule context="basic:source">
14
+ <assert test="parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec or parent::tbx:descripGrp/(parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec)"></assert>
15
+ </rule>
16
+ </pattern>
17
+ <pattern id="module.basic.descrip">
18
+ <rule context="basic:context">
19
+ <assert test="parent::tbx:termSec or parent::tbx:descripGrp/parent::tbx:termSec">Context appears at the termSec level</assert>
20
+ </rule>
21
+ <rule context="basic:definition">
22
+ <assert test="parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:descripGrp/(parent::tbx:conceptEntry or parent::tbx:langSec)">
23
+ Definition may appear at the conceptEntry or langSec levels.
24
+ </assert>
25
+ </rule>
26
+ </pattern>
27
+
28
+ <pattern id="module.basic.termNote">
29
+ <rule context="basic:grammaticalGender|basic:grammaticalUsage|basic:termLocation|basic:termType">
30
+ <assert test="parent::tbx:termSec or parent::tbx:termNoteGrp/parent::tbx:termSec">termNote elements must not occur outside the termSec level.</assert>
31
+ </rule>
32
+ </pattern>
33
+
34
+ <pattern id="module.basic.transac">
35
+ <rule context="basic:transactionType">
36
+ <assert test="parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec
37
+ or parent::tbx:transacGrp/(parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec)">Transaction type may be either 'origination' or 'modification'.</assert>
38
+ </rule>
39
+ </pattern>
40
+
41
+ <pattern id="module.basic.transacNote">
42
+ <rule context="basic:responsibility">
43
+ <assert test="parent::tbx:transacGrp/(parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec)">Responsibility must be in a transacGrp at the conceptEntry or langSec levels.</assert>
44
+ </rule>
45
+ </pattern>
46
+
47
+ <pattern id="module.basic.ref">
48
+ <rule context="basic:crossReference">
49
+ <assert test="parent::tbx:conceptEntry or parent::tbx:termSec or parent::tbx:*[contains(.,Grp)]/(parent::tbx:conceptEntry or parent::tbx:termSec)">Cross Reference must only be found at the conceptEntry or termSec levels.</assert>
50
+ </rule>
51
+ </pattern>
52
+ <pattern id="module.basic.xref">
53
+ <rule context="basic:externalCrossReference">
54
+ <assert test="parent::tbx:conceptEntry or parent::tbx:termSec or parent::tbx:*[contains(.,Grp)]/(parent::tbx:conceptEntry or parent::tbx:termSec)">External Cross Reference must only be found at the conceptEntry or termSec levels.</assert>
55
+ </rule>
56
+ <rule context="basic:xGraphic">
57
+ <assert test="parent::tbx:conceptEntry or parent::tbx:langSec">Image must only be found at the conceptEntry level.</assert>
58
+ </rule>
59
+ </pattern>
60
+ </schema>
@@ -0,0 +1,125 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?xml-model href="https://raw.githubusercontent.com/LTAC-Global/TBX_module_description_xml/master/tbxmd.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
3
+ <tbxmd module="basic" ns="http://www.tbxinfo.net/ns/basic"><!-- ns is only applicable to DCT style TBX -->
4
+ <header>
5
+ <title>Description of the Basic data category module for TBX</title>
6
+ <description>TBX-Basic is intended to be the primary dialect of terminology exchange. TBX-Basic was
7
+ designed to efficiently store a large quantity of terminology glossaries in a straightforward XML
8
+ format. It can be used to handle monolingual, bilingual, or multilingual glossaries.</description>
9
+ </header>
10
+ <datCatSet>
11
+ <!--Data-category constraint specifications are arranged in alphabetial order by the
12
+ value of the name attribute. -->
13
+ <descripSpec name="context" datcatId="http://www.datcatinfo.net/datcat/DC-149">
14
+ <levels>
15
+ <level>termSec</level>
16
+ </levels>
17
+ <contents datatype="noteText"/>
18
+ </descripSpec>
19
+ <refSpec name="crossReference" datcatId="http://www.datcatinfo.net/datcat/DC-164">
20
+ <levels>
21
+ <level>conceptEntry</level>
22
+ <level>termSec</level>
23
+ </levels>
24
+ <contents datatype="string"/>
25
+ </refSpec>
26
+ <descripSpec name="definition" datcatId="http://www.datcatinfo.net/datcat/DC-168">
27
+ <levels>
28
+ <level>conceptEntry</level>
29
+ <level>langSec</level>
30
+ </levels>
31
+ <contents datatype="noteText"/>
32
+ </descripSpec>
33
+ <xrefSpec name="externalCrossReference" datcatId="http://www.datcatinfo.net/datcat/DC-226">
34
+ <levels>
35
+ <level>conceptEntry</level>
36
+ <level>termSec</level>
37
+ </levels>
38
+ <contents datatype="string"/>
39
+ </xrefSpec>
40
+ <termNoteSpec name="geographicalUsage" datcatId="http://www.datcatinfo.net/datcat/DC-243">
41
+ <contents datatype="string"/>
42
+ </termNoteSpec>
43
+ <termNoteSpec name="grammaticalGender" datcatId="http://www.datcatinfo.net/datcat/DC-245">
44
+ <contents datatype="picklist">
45
+ <value>masculine</value>
46
+ <value>feminine</value>
47
+ <value>neuter</value>
48
+ <value>other</value>
49
+ </contents>
50
+ </termNoteSpec>
51
+ <adminSpec name="projectSubset" datcatId="http://www.datcatinfo.net/datcat/DC-406">
52
+ <levels>
53
+ <level>conceptEntry</level>
54
+ <level>termSec</level>
55
+ </levels>
56
+ <contents datatype="string"/>
57
+ </adminSpec>
58
+ <transacNoteSpec name="responsibility" datcatId="http://www.datcatinfo.net/datcat/DC-451">
59
+ <levels>
60
+ <level>conceptEntry</level>
61
+ <level>langSec</level>
62
+ <level>termSec</level>
63
+ </levels>
64
+ <contents datatype="string"/>
65
+ </transacNoteSpec>
66
+ <adminSpec name="source" datcatId="http://www.datcatinfo.net/datcat/DC-471">
67
+ <levels>
68
+ <level>conceptEntry</level>
69
+ <level>langSec</level>
70
+ <level>termSec</level>
71
+ </levels>
72
+ <contents datatype="string"/>
73
+ </adminSpec>
74
+ <termNoteSpec name="termLocation" datcatId="http://www.datcatinfo.net/datcat/DC-1823">
75
+ <contents datatype="picklist">
76
+ <value>checkBox</value>
77
+ <value>comboBox</value>
78
+ <value>comboBoxElement</value>
79
+ <value>dialogBox</value>
80
+ <value>groupBox</value>
81
+ <value>informativeMessage</value>
82
+ <value>interactiveMessage</value>
83
+ <value>menuItem</value>
84
+ <value>progressBar</value>
85
+ <value>pushButton</value>
86
+ <value>radioButton</value>
87
+ <value>slider</value>
88
+ <value>spinBox</value>
89
+ <value>tab</value>
90
+ <value>tableText</value>
91
+ <value>textBox</value>
92
+ <value>toolTip</value>
93
+ <value>user-definedType</value>
94
+ </contents>
95
+ </termNoteSpec>
96
+ <termNoteSpec name="termType" datcatId="http://www.datcatinfo.net/datcat/DC-2677">
97
+ <contents datatype="picklist">
98
+ <value>fullForm</value>
99
+ <value>acronym</value>
100
+ <value>abbreviation</value>
101
+ <value>shortForm</value>
102
+ <value>variant</value>
103
+ <value>phrase</value>
104
+ </contents>
105
+ </termNoteSpec>
106
+ <transacSpec name="transactionType" datcatId="http://www.datcatinfo.net/datcat/DC-1689">
107
+ <levels>
108
+ <level>conceptEntry</level>
109
+ <level>langSec</level>
110
+ <level>termSec</level>
111
+ </levels>
112
+ <contents datatype="picklist">
113
+ <value>origination</value>
114
+ <value>modification</value>
115
+ </contents>
116
+ </transacSpec>
117
+ <xrefSpec name="xGraphic" datcatId="http://www.datcatinfo.net/datcat/DC-2920">
118
+ <levels>
119
+ <level>conceptEntry</level>
120
+ <level>langSec</level>
121
+ </levels>
122
+ <contents datatype="string"/>
123
+ </xrefSpec>
124
+ </datCatSet>
125
+ </tbxmd>
@@ -0,0 +1,77 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
3
+ xmlns:teix="http://www.tei-c.org/ns/Examples"
4
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
5
+ ns="http://www.tbxinfo.net/ns/min">
6
+ <!-- optional metaType attribute -->
7
+ <define name="metaType">
8
+ <optional>
9
+ <attribute name="metaType">
10
+ <choice>
11
+ <value>admin</value>
12
+ <value>adminNote</value>
13
+ <value>descrip</value>
14
+ <value>descripNote</value>
15
+ <value>ref</value>
16
+ <value>termNote</value>
17
+ <value>transac</value>
18
+ <value>transacNote</value>
19
+ <value>xref</value>
20
+ </choice>
21
+ </attribute>
22
+ </optional>
23
+ </define>
24
+ <!-- descrip classified elements -->
25
+ <define name="module.admin">
26
+ <choice>
27
+ <element name="customerSubset">
28
+ <text/>
29
+ </element>
30
+ </choice>
31
+ </define>
32
+ <define name="module.descrip">
33
+ <choice>
34
+ <element name="partOfSpeech">
35
+ <choice>
36
+ <value>adjective</value>
37
+ <value>noun</value>
38
+ <value>other</value>
39
+ <value>verb</value>
40
+ <value>adverb</value>
41
+ </choice>
42
+ </element>
43
+ <element name="subjectField">
44
+ <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">
45
+ (subjectField) A field of special knowledge. Subject fields shall be expressed in
46
+ plainText, and preferably be selected from a defined set of picklist values. Subject
47
+ fields shall be specified at the concept (termEntry) level.</documentation>
48
+ <choice>
49
+ <text/>
50
+ </choice>
51
+ </element>
52
+ </choice>
53
+ </define>
54
+
55
+ <!-- termNote classified elements -->
56
+ <define name="module.termNote">
57
+ <element name="administrativeStatus">
58
+ <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">The status of a term within a certain working environment.
59
+ The data-category administrativeStatus should be linked, through a target attribute, to a in the back matter that identifies the
60
+ administrative organization that determined the status.</documentation>
61
+ <choice>
62
+ <value>admittedTerm-admn-sts</value>
63
+ <value>deprecatedTerm-admn-sts</value>
64
+ <value>supersededTerm-admn-sts</value>
65
+ <value>preferredTerm-admn-sts</value>
66
+ </choice>
67
+ </element>
68
+ </define>
69
+
70
+ <start>
71
+ <choice>
72
+ <ref name="module.admin"/>
73
+ <ref name="module.descrip"/>
74
+ <ref name="module.termNote"/>
75
+ </choice>
76
+ </start>
77
+ </grammar>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"
3
+ xmlns:sqf="http://www.schematron-quickfix.com/validator/process">
4
+ <ns uri="urn:iso:std:iso:30042:ed-2" prefix="tbx" />
5
+ <ns uri="http://www.tbxinfo.net/ns/min" prefix="min" />
6
+
7
+ <!-- Min Module Rules -->
8
+ <pattern id="module.min.admin">
9
+ <rule context="min:customerSubset">
10
+ <assert test="parent::tbx:conceptEntry or parent::tbx:adminGrp/parent::conceptEntry or
11
+ parent::tbx:termSec or parent::tbx:adminGrp/parent::tbx:termSec">Customer Subset may only appear at the conceptEntry or termSec levels</assert>
12
+ </rule>
13
+ </pattern>
14
+ <pattern id="module.min.descrip">
15
+ <rule context="min:subjectField" >
16
+ <assert test="parent::tbx:conceptEntry or parent::tbx:descripGrp/parent::tbx:conceptEntry">Subject Field can only appear at conceptEntry level.</assert>
17
+ </rule>
18
+ </pattern>
19
+ <pattern id="module.min.termNote">
20
+ <rule context="min:administrativeStatus|min:partOfSpeech">
21
+ <assert test="parent::tbx:termSec or parent::tbx:termNoteGrp/parent::termSec">termNote elements must not occur outside the termSec level.</assert>
22
+ </rule>
23
+ </pattern>
24
+ </schema>
@@ -0,0 +1,42 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?xml-model href="https://raw.githubusercontent.com/LTAC-Global/TBX_module_description_xml/master/tbxmd.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
3
+ <tbxmd module="min" ns="http://www.tbxinfo.net/ns/min"><!-- ns is only applicable to DCT style TBX -->
4
+ <header>
5
+ <title>Description of the Min data category module for TBX</title>
6
+ <description>The Min module is a simple data category module created for minimal need terminology data models.</description>
7
+ </header>
8
+ <datCatSet>
9
+ <!--Data-category constraint specifications are arranged in alphabetial order by the
10
+ value of the name attribute. -->
11
+ <termNoteSpec name="administrativeStatus" datcatId="http://www.datcatinfo.net/datcat/DC-168">
12
+ <contents datatype="picklist">
13
+ <value>admittedTerm-admn-sts</value>
14
+ <value>deprecatedTerm-admn-sts</value>
15
+ <value>supersededTerm-admn-sts</value>
16
+ <value>preferredTerm-admn-sts</value>
17
+ </contents>
18
+ </termNoteSpec>
19
+ <adminSpec name="customerSubset" datcatId="http://www.datcatinfo.net/datcat/DC-165">
20
+ <levels>
21
+ <level>conceptEntry</level>
22
+ <level>termSec</level>
23
+ </levels>
24
+ <contents datatype="string"/>
25
+ </adminSpec>
26
+ <termNoteSpec name="partOfSpeech" datcatId="http://www.datcatinfo.net/datcat/DC-396">
27
+ <contents datatype="picklist">
28
+ <value>adjective</value>
29
+ <value>noun</value>
30
+ <value>other</value>
31
+ <value>verb</value>
32
+ <value>adverb</value>
33
+ </contents>
34
+ </termNoteSpec>
35
+ <descripSpec name="subjectField" datcatId="http://www.datcatinfo.net/datcat/DC-489">
36
+ <levels>
37
+ <level>conceptEntry</level>
38
+ </levels>
39
+ <contents datatype="string"/>
40
+ </descripSpec>
41
+ </datCatSet>
42
+ </tbxmd>