tbx 0.1.1 → 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/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +32 -0
- data/CLAUDE.md +21 -1
- data/README.adoc +365 -19
- data/lib/tbx/admin.rb +24 -11
- data/lib/tbx/admin_grp.rb +5 -0
- data/lib/tbx/admin_note.rb +14 -6
- data/lib/tbx/back.rb +5 -0
- data/lib/tbx/body.rb +3 -0
- data/lib/tbx/change.rb +6 -0
- data/lib/tbx/concept_entry.rb +10 -0
- data/lib/tbx/data_element.rb +50 -0
- data/lib/tbx/date.rb +6 -0
- data/lib/tbx/descrip.rb +23 -11
- data/lib/tbx/descrip_grp.rb +7 -0
- data/lib/tbx/descrip_note.rb +6 -6
- data/lib/tbx/document.rb +12 -0
- data/lib/tbx/ec.rb +16 -0
- data/lib/tbx/encoding_desc.rb +3 -0
- data/lib/tbx/file_desc.rb +6 -0
- data/lib/tbx/foreign.rb +6 -0
- data/lib/tbx/hi.rb +18 -0
- data/lib/tbx/item.rb +6 -0
- data/lib/tbx/item_grp.rb +6 -0
- data/lib/tbx/item_set.rb +6 -0
- data/lib/tbx/lang_sec.rb +6 -0
- 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 +5 -0
- data/lib/tbx/note.rb +9 -0
- data/lib/tbx/p.rb +9 -0
- data/lib/tbx/ph.rb +6 -0
- data/lib/tbx/publication_stmt.rb +3 -0
- data/lib/tbx/ref.rb +17 -6
- data/lib/tbx/ref_object.rb +6 -0
- data/lib/tbx/ref_object_sec.rb +6 -0
- data/lib/tbx/revision_desc.rb +3 -0
- data/lib/tbx/sc.rb +9 -6
- data/lib/tbx/source_desc.rb +3 -0
- data/lib/tbx/tbx_header.rb +7 -0
- data/lib/tbx/term.rb +6 -0
- 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 +44 -11
- data/lib/tbx/term_note_grp.rb +7 -0
- data/lib/tbx/term_sec.rb +8 -0
- data/lib/tbx/text_element.rb +5 -0
- data/lib/tbx/title.rb +6 -0
- data/lib/tbx/title_stmt.rb +3 -0
- data/lib/tbx/transac.rb +17 -6
- data/lib/tbx/transac_grp.rb +6 -0
- data/lib/tbx/transac_note.rb +17 -6
- data/lib/tbx/version.rb +1 -1
- data/lib/tbx/xref.rb +16 -0
- data/lib/tbx.rb +13 -0
- 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 +36 -2
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
<pattern id="coreEnforecement">
|
|
6
|
+
<rule context="tbx:termNote">
|
|
7
|
+
<assert test="parent::tbx:termSec or parent::tbx:termNoteGrp/parent::tbx:termSec">Any termNote is only allowed at the termSec level.</assert>
|
|
8
|
+
</rule>
|
|
9
|
+
<rule context="tbx:*[@type]">
|
|
10
|
+
<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>
|
|
11
|
+
</rule>
|
|
12
|
+
<rule context="*[@target]">
|
|
13
|
+
<assert test="matches(@target,'https?://.+') or @target = //*/@id">ID must be IDREF for internal references or URI following HTTP protocol for external references.</assert>
|
|
14
|
+
</rule>
|
|
15
|
+
</pattern>
|
|
16
|
+
|
|
17
|
+
<pattern id="XLIFF.inlineConstraints">
|
|
18
|
+
<rule context="tbx:sc[following-sibling::tbx:ec]">
|
|
19
|
+
<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>
|
|
20
|
+
</rule>
|
|
21
|
+
<rule context="tbx:ec[preceding-sibling::tbx:sc]">
|
|
22
|
+
<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>
|
|
23
|
+
<assert test="@startRef">@starRef is required for <ec> if it is in the same note text as its corresponding <sc></assert>
|
|
24
|
+
<!--<assert test="not(@dir)">@dir only permitted when @isolated is 'yes'.</assert>--><!--@dir IS NOT CURRENTLY USED IN TBX-->
|
|
25
|
+
</rule>
|
|
26
|
+
<rule context="tbx:sc[not(following-sibling::tbx:ec)]">
|
|
27
|
+
<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>
|
|
28
|
+
</rule>
|
|
29
|
+
<rule context="tbx:ec[not(preceding-sibling::tbx:sc)]">
|
|
30
|
+
<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>
|
|
31
|
+
<assert test="@id">@id is REQUIRED when @isolated is or should be 'yes'.</assert>
|
|
32
|
+
</rule>
|
|
33
|
+
<rule context="tbx:ec[@isolated='yes']">
|
|
34
|
+
<assert test="@id != ''">ID is required if @isolated is 'yes'.</assert>
|
|
35
|
+
</rule>
|
|
36
|
+
</pattern>
|
|
37
|
+
|
|
38
|
+
<pattern id="dialectEnforcement">
|
|
39
|
+
<rule context="tbx:tbx">
|
|
40
|
+
<assert test="attribute::type='TBX-Linguist'">The name of this dialect should be TBX-Linguist</assert>
|
|
41
|
+
<assert test="attribute::style='dca'">The style of this dialect should be declared as 'dca'</assert>
|
|
42
|
+
</rule>
|
|
43
|
+
<rule context="*[not(namespace-uri() = 'urn:iso:std:iso:30042:ed-2')]">
|
|
44
|
+
<assert test="false()">DCT style elements are not permitted in DCA style TBX.</assert>
|
|
45
|
+
</rule>
|
|
46
|
+
</pattern>
|
|
47
|
+
|
|
48
|
+
<!-- Min Module Rules -->
|
|
49
|
+
<pattern id="module.min.admin">
|
|
50
|
+
<rule context="tbx:admin[@type='customerSubset']">
|
|
51
|
+
<assert test="parent::tbx:conceptEntry or parent::adminGrp/parent::tbx:conceptEntry or
|
|
52
|
+
parent::tbx:termSec or parent::tbx:adminGrp/parent::tbx:termSec">Customer Subset may only appear at the conceptEntry or termSec levels</assert>
|
|
53
|
+
</rule>
|
|
54
|
+
</pattern>
|
|
55
|
+
<pattern id="module.min.descrip">
|
|
56
|
+
<rule context="tbx:descrip[@type='subjectField']" >
|
|
57
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:descripGrp/parent::tbx:conceptEntry">Subject Field can only appear at conceptEntry level.</assert>
|
|
58
|
+
</rule>
|
|
59
|
+
</pattern>
|
|
60
|
+
<pattern id="module.min.termNote">
|
|
61
|
+
<rule context="tbx:termNote[@type='administrativeStatus']">
|
|
62
|
+
<assert test=".='admittedTerm-admn-sts' or .='deprecatedTerm-admn-sts' or .='supersededTerm-admn-sts' or .='preferredTerm-admn-sts'">The termType must be either 'admittedTerm-admn-sts', 'deprecatedTerm-admn-sts', 'supersededTerm-admn-sts', or 'preferredTerm-admn-sts'</assert>
|
|
63
|
+
</rule>
|
|
64
|
+
<rule context="tbx:termNote[@type='partOfSpeech']">
|
|
65
|
+
<assert test=".='adjective' or .='noun' or .='other' or .='verb' or .='adverb'">Permitted values of /partOfSpeech/ are 'noun', 'other', 'verb', 'adverb', or 'adjective'</assert>
|
|
66
|
+
</rule>
|
|
67
|
+
</pattern>
|
|
68
|
+
|
|
69
|
+
<!-- Basic Module Rules -->
|
|
70
|
+
<pattern id="module.basic.admin">
|
|
71
|
+
<rule context="tbx:admin[@type='projectSubset']">
|
|
72
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:termSec or parent::adminGrp/(parent::tbx:conceptEntry or
|
|
73
|
+
parent::tbx:termSec)">Project may only appear at the conceptEntry or termSec levels</assert>
|
|
74
|
+
</rule>
|
|
75
|
+
<rule context="tbx:admin[@type='source']">
|
|
76
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec or
|
|
77
|
+
parent::tbx:descripGrp/(parent::tbx:conceptEntry or parent::tbx:langSec or parent::tbx:termSec)"></assert>
|
|
78
|
+
</rule>
|
|
79
|
+
</pattern>
|
|
80
|
+
<pattern id="module.basic.descrip">
|
|
81
|
+
<rule context="tbx:descrip[@type='context']">
|
|
82
|
+
<assert test="parent::tbx:termSec or parent::tbx:descripGrp/parent::tbx:termSec">Context appears at the termSec level</assert>
|
|
83
|
+
</rule>
|
|
84
|
+
<rule context="tbx:descrip[@type='definition']">
|
|
85
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:langSec or
|
|
86
|
+
parent::tbx:descripGrp/(parent::tbx:conceptEntry or parent::tbx:langSec)">
|
|
87
|
+
Definition may appear at the conceptEntry or langSec levels.
|
|
88
|
+
</assert>
|
|
89
|
+
</rule>
|
|
90
|
+
</pattern>
|
|
91
|
+
<pattern id="module.basic.termNote">
|
|
92
|
+
<rule context="tbx:termNote[@type='grammaticalGender']">
|
|
93
|
+
<assert test=".='masculine' or .='feminine' or .='neuter' or .='other'">Permitted values of Gender are 'masculine', 'feminine', 'neuter', or 'other'</assert>
|
|
94
|
+
</rule>
|
|
95
|
+
<rule context="tbx:termNote[@type='termLocation']">
|
|
96
|
+
<assert test=".='checkBox' or .='comboBox' or .='comboBoxElement' or .='dialogBox' or .='groupBox' or .='informativeMessage' or .='interactiveMessage' or .='menuItem' or
|
|
97
|
+
.='progressBar' or .='pushButton' or .='radioButton' or .='slider' or .='spinBox' or .='tab' or .='tableText' or .='textBox' or .='toolTip' or .='user-definedType'">
|
|
98
|
+
Permitted values are: checkBox, comboBox, comboBoxElement, dialogBox, groupBox, informativeMessage, interactiveMessage, menuItem, progressBar, pushButton, radioButton, slider, spinBox, tab, tableText, textBox, toolTip, user-definedType
|
|
99
|
+
</assert>
|
|
100
|
+
</rule>
|
|
101
|
+
<rule context="tbx:termNote[@type='termType']">
|
|
102
|
+
<assert test=".='fullForm' or .='acronym' or .='abbreviation' or .='shortForm' or .='variant' or .='phrase'">Permitted values of Term Type are 'fullForm', 'acronym', 'abbreviation', 'shortForm', 'variant', or 'phrase'</assert>
|
|
103
|
+
</rule>
|
|
104
|
+
</pattern>
|
|
105
|
+
<pattern id="module.basic.transac">
|
|
106
|
+
<rule context="tbx:transac[@type='transactionType']">
|
|
107
|
+
<assert test=".='origination' or .='modification'">Transaction type may be either 'origination' or 'modification'.</assert>
|
|
108
|
+
</rule>
|
|
109
|
+
</pattern>
|
|
110
|
+
<pattern id="module.basic.ref">
|
|
111
|
+
<rule context="tbx:ref[@type='crossReference']">
|
|
112
|
+
<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>
|
|
113
|
+
</rule>
|
|
114
|
+
</pattern>
|
|
115
|
+
<pattern id="module.basic.xref">
|
|
116
|
+
<rule context="tbx:xref[@type='externalCrossReference']">
|
|
117
|
+
<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>
|
|
118
|
+
</rule>
|
|
119
|
+
<rule context="tbx:xref[@type='xGraphic']">
|
|
120
|
+
<assert test="parent::tbx:conceptEntry or parent::tbx:langSec">Image must only be found at the conceptEntry or langSec levels.</assert>
|
|
121
|
+
</rule>
|
|
122
|
+
</pattern>
|
|
123
|
+
|
|
124
|
+
<!-- Linguist Module Rules -->
|
|
125
|
+
<pattern id="module.linguist.admin">
|
|
126
|
+
<rule context="tbx:admin[@type='reading']">
|
|
127
|
+
<assert test="parent::tbx:termSec or parent::tbx:adminGrp/parent::tbx:termSec">Reading must be at the term level.</assert>
|
|
128
|
+
</rule>
|
|
129
|
+
</pattern>
|
|
130
|
+
|
|
131
|
+
<pattern id="module.linguist.adminNote">
|
|
132
|
+
<rule context="tbx:adminNote[@type='readingNote']">
|
|
133
|
+
<assert test="parent::tbx:adminGrp/parent::tbx:termSec">readingNote may only be found at the termSec level inside an adminGrp.</assert>
|
|
134
|
+
</rule>
|
|
135
|
+
</pattern>
|
|
136
|
+
|
|
137
|
+
<pattern id="module.linguist.termNote">
|
|
138
|
+
<rule context="tbx:termNote[@type='grammaticalNumber']">
|
|
139
|
+
<assert test=".='singular' or .='plural' or .='dual' or .='mass' or .='otherNumber'">Permitted values of grammaticalNumber are: singular, plural, dual, mass, or otherNumber.</assert>
|
|
140
|
+
</rule>
|
|
141
|
+
<rule context="tbx:termNote[@type='register']">
|
|
142
|
+
<assert test=".='colloquialRegister' or .='neutralRegister' or .='technicalRegister' or .='in-houseRegister' or .='bench-levelRegister' or .='slangRegister' or .='vulgarRegister'">Permitted values of register are:
|
|
143
|
+
colloquialRegister, neutralRegister, technicalRegister, in-houseRegister, bench-levelRegister, slangRegister, or vulgarRegister</assert>
|
|
144
|
+
</rule>
|
|
145
|
+
</pattern>
|
|
146
|
+
</schema>
|