data/dictionary.xsd
author František Kučera <franta-hg@frantovo.cz>
Sun, 06 Oct 2024 20:02:11 +0200
changeset 157 7abf9048d38d
parent 152 5c878a53d3ed
permissions -rw-r--r--
data: FXO and FXS modules on Digium/Asterisk analog telephony cards
franta-hg@0
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@1
     2
<!--
franta-hg@1
     3
Free Telco Dictionary
franta-hg@13
     4
Copyright © 2013 František Kučera (frantovo.cz)
franta-hg@1
     5
franta-hg@1
     6
This program is free software: you can redistribute it and/or modify
franta-hg@1
     7
it under the terms of the GNU General Public License as published by
franta-hg@151
     8
the Free Software Foundation, version 3 of the License.
franta-hg@1
     9
franta-hg@1
    10
This program is distributed in the hope that it will be useful,
franta-hg@1
    11
but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@1
    12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
franta-hg@1
    13
GNU General Public License for more details.
franta-hg@1
    14
franta-hg@1
    15
You should have received a copy of the GNU General Public License
franta-hg@1
    16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
franta-hg@1
    17
-->
franta-hg@0
    18
<xs:schema xmlns="https://telco.frantovo.cz/xmlns/dictionary"
franta-hg@0
    19
           targetNamespace="https://telco.frantovo.cz/xmlns/dictionary"
franta-hg@0
    20
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
franta-hg@0
    21
           elementFormDefault="qualified"
franta-hg@0
    22
           attributeFormDefault="unqualified">
franta-hg@0
    23
franta-hg@0
    24
	<xs:element name="dictionary" type="dictionaryType"/>
franta-hg@0
    25
franta-hg@0
    26
	<xs:complexType name="dictionaryType">
franta-hg@5
    27
		<xs:sequence>
franta-hg@152
    28
			<xs:element name="id" type="ID"  minOccurs="0" maxOccurs="1"/>
franta-hg@5
    29
			<xs:element name="tags" type="tagsDefinitionType"  minOccurs="0" maxOccurs="1"/>
franta-hg@152
    30
			<xs:element name="concept" type="conceptType"  minOccurs="0" maxOccurs="unbounded">
franta-hg@152
    31
				<xs:annotation>
franta-hg@152
    32
					<xs:documentation>
franta-hg@152
    33
						Concept is an item of a dictionary – a term.
franta-hg@152
    34
						If an abbreviation or a word have two different meanings
franta-hg@152
    35
						it is two different concepts i.e. different meaning should not be mixed in a single concept.
franta-hg@152
    36
						Example: CLI (command-line interface) and CLI (call level interface) are two different concepts.
franta-hg@152
    37
					</xs:documentation>
franta-hg@152
    38
				</xs:annotation>
franta-hg@152
    39
			</xs:element>
franta-hg@0
    40
		</xs:sequence>
franta-hg@0
    41
	</xs:complexType>
franta-hg@0
    42
	
franta-hg@5
    43
	<xs:complexType name="tagsDefinitionType">
franta-hg@5
    44
		<xs:sequence>
franta-hg@5
    45
			<xs:element name="tag" type="tagDefinitionType" minOccurs="0" maxOccurs="unbounded"/>
franta-hg@5
    46
		</xs:sequence>
franta-hg@5
    47
	</xs:complexType>
franta-hg@5
    48
	
franta-hg@5
    49
	<xs:complexType name="tagDefinitionType">
franta-hg@152
    50
		<xs:attribute name="id" type="xs:string">
franta-hg@152
    51
			<xs:annotation>
franta-hg@152
    52
				<xs:documentation>
franta-hg@152
    53
					Tag IDs are not globally unique
franta-hg@152
    54
					(they are short and simple, so they can be easily added to concepts while editing the document by hand)
franta-hg@152
    55
					so when the disctionary is merged into another XML document, theese IDs should be prefixed e.g. with the dictionary ID.
franta-hg@152
    56
				</xs:documentation>
franta-hg@152
    57
			</xs:annotation>
franta-hg@152
    58
		</xs:attribute>
franta-hg@5
    59
		<xs:attribute name="name" type="xs:string"/>
franta-hg@5
    60
		<xs:attribute name="description" type="xs:string"/>
franta-hg@5
    61
	</xs:complexType>
franta-hg@5
    62
	
franta-hg@0
    63
	<xs:complexType name="conceptType">
franta-hg@0
    64
		<xs:sequence>
franta-hg@152
    65
			<xs:element name="id" type="ID"  minOccurs="0" maxOccurs="1">
franta-hg@152
    66
				<xs:annotation>
franta-hg@152
    67
					<xs:documentation>
franta-hg@152
    68
						This should be globally unique ID of the concept.
franta-hg@152
    69
						Concepts shared among multiple dictionaries should have same ID.
franta-hg@152
    70
					</xs:documentation>
franta-hg@152
    71
				</xs:annotation>
franta-hg@152
    72
			</xs:element>
franta-hg@0
    73
			<xs:element name="term" type="termType" minOccurs="1" maxOccurs="unbounded"/>
franta-hg@0
    74
			<xs:element name="explanation" type="explanationType"/>
franta-hg@6
    75
			<xs:element name="tag" type="tagRefType"  minOccurs="0" maxOccurs="unbounded"/>
franta-hg@0
    76
		</xs:sequence>
franta-hg@0
    77
	</xs:complexType>
franta-hg@0
    78
	
franta-hg@0
    79
	<xs:complexType name="termType">
franta-hg@6
    80
		<xs:sequence>
franta-hg@6
    81
			<xs:element name="tag" type="tagRefType"  minOccurs="0" maxOccurs="unbounded"/>
franta-hg@6
    82
		</xs:sequence>
franta-hg@0
    83
		<xs:attribute name="abbreviation" type="xs:string"/>
franta-hg@0
    84
		<xs:attribute name="completeForm" type="xs:string"/>
franta-hg@0
    85
		<xs:attribute name="language" type="languageType"/>
franta-hg@0
    86
	</xs:complexType>
franta-hg@0
    87
	
franta-hg@0
    88
	<xs:complexType name="explanationType">
franta-hg@0
    89
		<xs:all>
franta-hg@0
    90
			<xs:element name="text" type="textType"/>
franta-hg@0
    91
		</xs:all>
franta-hg@0
    92
		<xs:attribute name="language" type="languageType"/>
franta-hg@0
    93
	</xs:complexType>
franta-hg@0
    94
	
franta-hg@0
    95
	<xs:simpleType name="languageType">
franta-hg@0
    96
		<xs:restriction base="xs:string"/>
franta-hg@0
    97
	</xs:simpleType>
franta-hg@0
    98
	
franta-hg@0
    99
	<xs:simpleType name="textType">
franta-hg@0
   100
		<xs:restriction base="xs:string"/>
franta-hg@0
   101
	</xs:simpleType>
franta-hg@6
   102
	
franta-hg@6
   103
	<xs:simpleType name="tagRefType">
franta-hg@6
   104
		<xs:restriction base="xs:string"/>
franta-hg@6
   105
	</xs:simpleType>
franta-hg@152
   106
	
franta-hg@152
   107
	<xs:simpleType name="ID">
franta-hg@152
   108
		<xs:annotation>
franta-hg@152
   109
			<xs:documentation>
franta-hg@152
   110
				UUID, but must start with a letter, to comply with XML ID rules;
franta-hg@152
   111
				use e.g. uuidgen | grep ^[a-f];
franta-hg@152
   112
				Never reuse the ID if one chapter/item is removed and another with different meaning is added.
franta-hg@152
   113
			</xs:documentation>
franta-hg@152
   114
		</xs:annotation>
franta-hg@152
   115
		<xs:restriction base="xs:ID">
franta-hg@152
   116
			<xs:pattern value="[a-f][a-f0-9]{7}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"/>
franta-hg@152
   117
		</xs:restriction>
franta-hg@152
   118
	</xs:simpleType>
franta-hg@0
   119
franta-hg@0
   120
</xs:schema>