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.
- checksums.yaml +7 -0
- data/.github/workflows/rake.yml +15 -0
- data/.github/workflows/release.yml +29 -0
- data/.gitignore +16 -0
- data/.rspec +3 -0
- data/.rubocop.yml +17 -0
- data/.rubocop_todo.yml +16 -0
- data/CHANGELOG.md +5 -0
- data/CLAUDE.md +124 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/Gemfile +15 -0
- data/README.adoc +156 -0
- data/Rakefile +12 -0
- data/lib/tbx/admin.rb +35 -0
- data/lib/tbx/admin_grp.rb +25 -0
- data/lib/tbx/admin_note.rb +25 -0
- data/lib/tbx/back.rb +17 -0
- data/lib/tbx/body.rb +17 -0
- data/lib/tbx/change.rb +19 -0
- data/lib/tbx/concept_entry.rb +33 -0
- data/lib/tbx/date.rb +16 -0
- data/lib/tbx/descrip.rb +35 -0
- data/lib/tbx/descrip_grp.rb +31 -0
- data/lib/tbx/descrip_note.rb +25 -0
- data/lib/tbx/document.rb +23 -0
- data/lib/tbx/ec.rb +28 -0
- data/lib/tbx/encoding_desc.rb +17 -0
- data/lib/tbx/file_desc.rb +21 -0
- data/lib/tbx/foreign.rb +29 -0
- data/lib/tbx/hi.rb +19 -0
- data/lib/tbx/item.rb +29 -0
- data/lib/tbx/item_grp.rb +29 -0
- data/lib/tbx/item_set.rb +21 -0
- data/lib/tbx/lang_sec.rb +33 -0
- data/lib/tbx/namespaces.rb +9 -0
- data/lib/tbx/note.rb +29 -0
- data/lib/tbx/p.rb +31 -0
- data/lib/tbx/ph.rb +14 -0
- data/lib/tbx/publication_stmt.rb +17 -0
- data/lib/tbx/ref.rb +25 -0
- data/lib/tbx/ref_object.rb +21 -0
- data/lib/tbx/ref_object_sec.rb +19 -0
- data/lib/tbx/revision_desc.rb +19 -0
- data/lib/tbx/sc.rb +22 -0
- data/lib/tbx/source_desc.rb +19 -0
- data/lib/tbx/tbx_header.rb +21 -0
- data/lib/tbx/term.rb +19 -0
- data/lib/tbx/term_note.rb +35 -0
- data/lib/tbx/term_note_grp.rb +29 -0
- data/lib/tbx/term_sec.rb +37 -0
- data/lib/tbx/text_element.rb +19 -0
- data/lib/tbx/title.rb +19 -0
- data/lib/tbx/title_stmt.rb +21 -0
- data/lib/tbx/transac.rb +25 -0
- data/lib/tbx/transac_grp.rb +27 -0
- data/lib/tbx/transac_note.rb +25 -0
- data/lib/tbx/version.rb +5 -0
- data/lib/tbx/xref.rb +21 -0
- data/lib/tbx.rb +67 -0
- data/reference-docs/schemas/TBX-Basic_DCA.sch +142 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCA/Example_Astronomy_DCA_VALID.tbx +4032 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCA/TBX-Basic_DCA.sch +142 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/Example_Astronomy_DCT_VALID.tbx +4021 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/TBX-Basic.nvdl +33 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/DCT/TBX-Basic_DCT.sch +48 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic Module Definition.docx +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic Module Definition.pdf +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.rng +164 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.sch +60 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/Basic.tbxmd +125 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min Module Definition.docx +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min Module Definition.pdf +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.rng +77 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.sch +24 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/Min.tbxmd +42 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/TBX-Basic Definition.docx +0 -0
- data/reference-docs/schemas/TBX-Basic_dialect_v1/TBX-Basic Definition.pdf +0 -0
- data/reference-docs/schemas/TBX_core.xsd +534 -0
- data/reference-docs/schemas/TBXcoreStructV03.rng +713 -0
- data/tbx.gemspec +35 -0
- metadata +140 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<schema queryBinding="xslt2" xmlns:sqf="http://www.schematron-quickfix.com/validator/process" xmlns="http://purl.oclc.org/dsdl/schematron">
|
|
3
|
+
<ns uri="urn:iso:std:iso:30042:ed-2" prefix="tbx" />
|
|
4
|
+
<pattern id="coreEnforcement">
|
|
5
|
+
<rule context="tbx:termNote">
|
|
6
|
+
<assert test="parent::tbx:termSec or parent::tbx:termNoteGrp/parent::tbx:termSec">Any termNote is only allowed at the termSec level.</assert>
|
|
7
|
+
</rule>
|
|
8
|
+
<rule context="tbx:*[@type]">
|
|
9
|
+
<assert test="@type != ''">Data category must be declared. If no permitted data categories are listed in the grammar schema, blank values are also not allowed.</assert>
|
|
10
|
+
</rule>
|
|
11
|
+
<rule context="*[@target]">
|
|
12
|
+
<assert test="matches(@target,'https?://.+') or @target = //*/@id">ID must be IDREF for internal references or URI following HTTP protocol for external references.</assert>
|
|
13
|
+
</rule>
|
|
14
|
+
</pattern>
|
|
15
|
+
<pattern id="XLIFF.inlineConstraints">
|
|
16
|
+
<rule context="tbx:sc[following-sibling::tbx:ec]">
|
|
17
|
+
<assert test="@isolated='no' or not(@isolated)">@isolated must be 'no' if <sc/> or <ec/> has its corresponding <sc/>/<ec/> in the same note text and @startRef must be used for <ec></assert>
|
|
18
|
+
</rule>
|
|
19
|
+
<rule context="tbx:ec[preceding-sibling::tbx:sc]">
|
|
20
|
+
<assert test="@isolated='no' or not(@isolated)">@isolated must be 'no' if <sc/> or <ec/> has its corresponding <sc/>/<ec/> in the same note text and @startRef must be used for <ec></assert>
|
|
21
|
+
<assert test="@startRef">@starRef is required for <ec> if it is in the same note text as its corresponding <sc></assert>
|
|
22
|
+
<!--<assert test="not(@dir)">@dir only permitted when @isolated is 'yes'.</assert>-->
|
|
23
|
+
<!--@dir IS NOT CURRENTLY USED IN TBX-->
|
|
24
|
+
</rule>
|
|
25
|
+
<rule context="tbx:sc[not(following-sibling::tbx:ec)]">
|
|
26
|
+
<assert test="@isolated='yes' or not(@isolated)">@isolated must be 'yes' if <sc/> or <ec/> does not have its corresponding <sc/>/<sc/> in the same note text.</assert>
|
|
27
|
+
</rule>
|
|
28
|
+
<rule context="tbx:ec[not(preceding-sibling::tbx:sc)]">
|
|
29
|
+
<assert test="@isolated='yes' or not(@isolated)">@isolated must be 'yes' if <sc/> or <ec/> does not have its corresponding <sc/>/<sc/> in the same note text.</assert>
|
|
30
|
+
<assert test="@id">@id is REQUIRED when @isolated is or should be 'yes'.</assert>
|
|
31
|
+
</rule>
|
|
32
|
+
<rule context="tbx:ec[@isolated='yes']">
|
|
33
|
+
<assert test="@id != ''">ID is required if @isolated is 'yes'.</assert>
|
|
34
|
+
</rule>
|
|
35
|
+
</pattern>
|
|
36
|
+
<pattern id="dialectEnforcement">
|
|
37
|
+
<rule context="tbx:tbx">
|
|
38
|
+
<assert test="attribute::type='TBX-Basic'">The name of this dialect should be TBX-Basic.</assert>
|
|
39
|
+
<assert test="attribute::style='dca'">The style of this dialect should be declared as 'dca'.</assert>
|
|
40
|
+
</rule>
|
|
41
|
+
<rule context="*[not(namespace-uri() = 'urn:iso:std:iso:30042:ed-2')]">
|
|
42
|
+
<assert test="false()">DCT style elements are not permitted in DCA style TBX.</assert>
|
|
43
|
+
</rule>
|
|
44
|
+
<!-- Data Category Types -->
|
|
45
|
+
<rule context="tbx:admin/@type">
|
|
46
|
+
<assert test=".='customerSubset' or .='projectSubset' or .='source'">Permitted type value(s): customerSubset, projectSubset, source</assert>
|
|
47
|
+
</rule>
|
|
48
|
+
<rule context="tbx:descrip/@type">
|
|
49
|
+
<assert test=".='subjectField' or .='context' or .='definition'">Permitted type value(s): subjectField, context, definition</assert>
|
|
50
|
+
</rule>
|
|
51
|
+
<rule context="tbx:ref/@type">
|
|
52
|
+
<assert test=".='crossReference'">Permitted type value(s): crossReference</assert>
|
|
53
|
+
</rule>
|
|
54
|
+
<rule context="tbx:termNote/@type">
|
|
55
|
+
<assert test=".='administrativeStatus' or .='partOfSpeech' or .='geographicalUsage' or .='grammaticalGender' or .='termLocation' or .='termType'">Permitted type value(s): administrativeStatus, partOfSpeech, geographicalUsage, grammaticalGender, termLocation, termType</assert>
|
|
56
|
+
</rule>
|
|
57
|
+
<rule context="tbx:transac/@type">
|
|
58
|
+
<assert test=".='transactionType'">Permitted type value(s): transactionType</assert>
|
|
59
|
+
</rule>
|
|
60
|
+
<rule context="tbx:transacNote/@type">
|
|
61
|
+
<assert test=".='responsibility'">Permitted type value(s): responsibility</assert>
|
|
62
|
+
</rule>
|
|
63
|
+
<rule context="tbx:xref/@type">
|
|
64
|
+
<assert test=".='externalCrossReference' or .='xGraphic'">Permitted type value(s): externalCrossReference, xGraphic</assert>
|
|
65
|
+
</rule>
|
|
66
|
+
</pattern>
|
|
67
|
+
<!-- min module rules -->
|
|
68
|
+
<pattern id="module.min.admin">
|
|
69
|
+
<rule context="tbx:admin[@type='customerSubset']">
|
|
70
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:*[contains(./local-name(),'Grp')][not(./local-name() = 'transacGrp')]/parent::tbx:conceptEntry or parent::tbx:termSec or parent::tbx:*[contains(./local-name(),'Grp')][not(./local-name() = 'transacGrp')]/parent::tbx:termSec">/customerSubset/ may only appear at level(s): conceptEntry, termSec</assert>
|
|
71
|
+
</rule>
|
|
72
|
+
</pattern>
|
|
73
|
+
<pattern id="module.min.descrip">
|
|
74
|
+
<rule context="tbx:descrip[@type='subjectField']">
|
|
75
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:descripGrp/parent::tbx:conceptEntry">/subjectField/ may only appear at level(s): conceptEntry</assert>
|
|
76
|
+
</rule>
|
|
77
|
+
</pattern>
|
|
78
|
+
<pattern id="module.min.termNote">
|
|
79
|
+
<rule context="tbx:termNote[@type='administrativeStatus']">
|
|
80
|
+
<assert test=".='admittedTerm-admn-sts' or .='deprecatedTerm-admn-sts' or .='supersededTerm-admn-sts' or .='preferredTerm-admn-sts'">/administrativeStatus/ type may be: 'admittedTerm-admn-sts' or 'deprecatedTerm-admn-sts' or 'supersededTerm-admn-sts' or 'preferredTerm-admn-sts'</assert>
|
|
81
|
+
</rule>
|
|
82
|
+
<rule context="tbx:termNote[@type='partOfSpeech']">
|
|
83
|
+
<assert test=".='adjective' or .='noun' or .='other' or .='verb' or .='adverb'">/partOfSpeech/ type may be: 'adjective' or 'noun' or 'other' or 'verb' or 'adverb'</assert>
|
|
84
|
+
</rule>
|
|
85
|
+
</pattern>
|
|
86
|
+
<pattern id="module.min.xref">
|
|
87
|
+
<rule context="tbx:xref[@type='externalCrossReference']">
|
|
88
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec">/externalCrossReference/ may only appear at level(s): conceptEntry, langSec, termSec</assert>
|
|
89
|
+
</rule>
|
|
90
|
+
</pattern>
|
|
91
|
+
<!-- basic module rules -->
|
|
92
|
+
<pattern id="module.basic.admin">
|
|
93
|
+
<rule context="tbx:admin[@type='projectSubset']">
|
|
94
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:*[contains(./local-name(),'Grp')][not(./local-name() = 'transacGrp')]/parent::tbx:conceptEntry or parent::tbx:termSec or parent::tbx:*[contains(./local-name(),'Grp')][not(./local-name() = 'transacGrp')]/parent::tbx:termSec">/projectSubset/ may only appear at level(s): conceptEntry, termSec</assert>
|
|
95
|
+
</rule>
|
|
96
|
+
<rule context="tbx:admin[@type='source']">
|
|
97
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:*[contains(./local-name(),'Grp')][not(./local-name() = 'transacGrp')]/parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:*[contains(./local-name(),'Grp')][not(./local-name() = 'transacGrp')]/parent::tbx:langSec or parent::tbx:termSec or parent::tbx:*[contains(./local-name(),'Grp')][not(./local-name() = 'transacGrp')]/parent::tbx:termSec">/source/ may only appear at level(s): conceptEntry, langSec, termSec</assert>
|
|
98
|
+
</rule>
|
|
99
|
+
</pattern>
|
|
100
|
+
<pattern id="module.basic.descrip">
|
|
101
|
+
<rule context="tbx:descrip[@type='context']">
|
|
102
|
+
<assert test="parent::tbx:termSec or parent::tbx:descripGrp/parent::tbx:termSec">/context/ may only appear at level(s): termSec</assert>
|
|
103
|
+
</rule>
|
|
104
|
+
<rule context="tbx:descrip[@type='definition']">
|
|
105
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:descripGrp/parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:descripGrp/parent::tbx:langSec">/definition/ may only appear at level(s): conceptEntry, langSec</assert>
|
|
106
|
+
</rule>
|
|
107
|
+
</pattern>
|
|
108
|
+
<pattern id="module.basic.ref">
|
|
109
|
+
<rule context="tbx:ref[@type='crossReference']">
|
|
110
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:*[contains(./local-name(),'Grp')]/parent::tbx:conceptEntry or parent::tbx:termSec or parent::tbx:*[contains(./local-name(),'Grp')]/parent::tbx:termSec">/crossReference/ may only appear at level(s): conceptEntry, termSec</assert>
|
|
111
|
+
</rule>
|
|
112
|
+
</pattern>
|
|
113
|
+
<pattern id="module.basic.termNote">
|
|
114
|
+
<rule context="tbx:termNote[@type='grammaticalGender']">
|
|
115
|
+
<assert test=".='masculine' or .='feminine' or .='neuter' or .='other'">/grammaticalGender/ type may be: 'masculine' or 'feminine' or 'neuter' or 'other'</assert>
|
|
116
|
+
</rule>
|
|
117
|
+
<rule context="tbx:termNote[@type='termLocation']">
|
|
118
|
+
<assert test=".='checkBox' or .='comboBox' or .='comboBoxElement' or .='dialogBox' or .='groupBox' or .='informativeMessage' or .='interactiveMessage' or .='menuItem' or .='progressBar' or .='pushButton' or .='radioButton' or .='slider' or .='spinBox' or .='tab' or .='tableText' or .='textBox' or .='toolTip' or .='user-definedType'">/termLocation/ type may be: 'checkBox' or 'comboBox' or 'comboBoxElement' or 'dialogBox' or 'groupBox' or 'informativeMessage' or 'interactiveMessage' or 'menuItem' or 'progressBar' or 'pushButton' or 'radioButton' or 'slider' or 'spinBox' or 'tab' or 'tableText' or 'textBox' or 'toolTip' or 'user-definedType'</assert>
|
|
119
|
+
</rule>
|
|
120
|
+
<rule context="tbx:termNote[@type='termType']">
|
|
121
|
+
<assert test=".='fullForm' or .='acronym' or .='abbreviation' or .='shortForm' or .='variant' or .='phrase'">/termType/ type may be: 'fullForm' or 'acronym' or 'abbreviation' or 'shortForm' or 'variant' or 'phrase'</assert>
|
|
122
|
+
</rule>
|
|
123
|
+
</pattern>
|
|
124
|
+
<pattern id="module.basic.transac">
|
|
125
|
+
<rule context="tbx:transac[@type='transactionType']">
|
|
126
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:transacGrp/parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:transacGrp/parent::tbx:langSec or parent::tbx:termSec or parent::tbx:transacGrp/parent::tbx:termSec">/transactionType/ may only appear at level(s): conceptEntry, langSec, termSec</assert>
|
|
127
|
+
</rule>
|
|
128
|
+
<rule context="tbx:transac[@type='transactionType']">
|
|
129
|
+
<assert test=".='origination' or .='modification'">/transactionType/ type may be: 'origination' or 'modification'</assert>
|
|
130
|
+
</rule>
|
|
131
|
+
</pattern>
|
|
132
|
+
<pattern id="module.basic.transacNote">
|
|
133
|
+
<rule context="tbx:transacNote[@type='responsibility']">
|
|
134
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:transacGrp/parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:transacGrp/parent::tbx:langSec or parent::tbx:termSec or parent::tbx:transacGrp/parent::tbx:termSec">/responsibility/ may only appear at level(s): conceptEntry, langSec, termSec</assert>
|
|
135
|
+
</rule>
|
|
136
|
+
</pattern>
|
|
137
|
+
<pattern id="module.basic.xref">
|
|
138
|
+
<rule context="tbx:xref[@type='xGraphic']">
|
|
139
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:langSec">/xGraphic/ may only appear at level(s): conceptEntry, langSec</assert>
|
|
140
|
+
</rule>
|
|
141
|
+
</pattern>
|
|
142
|
+
</schema>
|