1 <?xml version="1.0" encoding="UTF-8"?>
4 Copyright © 2013 František Kučera (frantovo.cz)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, version 3 of the License.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 <xs:schema xmlns="https://telco.frantovo.cz/xmlns/dictionary"
19 targetNamespace="https://telco.frantovo.cz/xmlns/dictionary"
20 xmlns:xs="http://www.w3.org/2001/XMLSchema"
21 elementFormDefault="qualified"
22 attributeFormDefault="unqualified">
24 <xs:element name="dictionary" type="dictionaryType"/>
26 <xs:complexType name="dictionaryType">
28 <xs:element name="id" type="ID" minOccurs="0" maxOccurs="1"/>
29 <xs:element name="tags" type="tagsDefinitionType" minOccurs="0" maxOccurs="1"/>
30 <xs:element name="concept" type="conceptType" minOccurs="0" maxOccurs="unbounded">
33 Concept is an item of a dictionary – a term.
34 If an abbreviation or a word have two different meanings
35 it is two different concepts i.e. different meaning should not be mixed in a single concept.
36 Example: CLI (command-line interface) and CLI (call level interface) are two different concepts.
43 <xs:complexType name="tagsDefinitionType">
45 <xs:element name="tag" type="tagDefinitionType" minOccurs="0" maxOccurs="unbounded"/>
49 <xs:complexType name="tagDefinitionType">
50 <xs:attribute name="id" type="xs:string">
53 Tag IDs are not globally unique
54 (they are short and simple, so they can be easily added to concepts while editing the document by hand)
55 so when the disctionary is merged into another XML document, theese IDs should be prefixed e.g. with the dictionary ID.
59 <xs:attribute name="name" type="xs:string"/>
60 <xs:attribute name="description" type="xs:string"/>
63 <xs:complexType name="conceptType">
65 <xs:element name="id" type="ID" minOccurs="0" maxOccurs="1">
68 This should be globally unique ID of the concept.
69 Concepts shared among multiple dictionaries should have same ID.
73 <xs:element name="term" type="termType" minOccurs="1" maxOccurs="unbounded"/>
74 <xs:element name="explanation" type="explanationType"/>
75 <xs:element name="tag" type="tagRefType" minOccurs="0" maxOccurs="unbounded"/>
79 <xs:complexType name="termType">
81 <xs:element name="tag" type="tagRefType" minOccurs="0" maxOccurs="unbounded"/>
83 <xs:attribute name="abbreviation" type="xs:string"/>
84 <xs:attribute name="completeForm" type="xs:string"/>
85 <xs:attribute name="language" type="languageType"/>
88 <xs:complexType name="explanationType">
90 <xs:element name="text" type="textType"/>
92 <xs:attribute name="language" type="languageType"/>
95 <xs:simpleType name="languageType">
96 <xs:restriction base="xs:string"/>
99 <xs:simpleType name="textType">
100 <xs:restriction base="xs:string"/>
103 <xs:simpleType name="tagRefType">
104 <xs:restriction base="xs:string"/>
107 <xs:simpleType name="ID">
110 UUID, but must start with a letter, to comply with XML ID rules;
111 use e.g. uuidgen | grep ^[a-f];
112 Never reuse the ID if one chapter/item is removed and another with different meaning is added.
115 <xs:restriction base="xs:ID">
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}"/>