1.1 --- a/data/dictionary.xml Mon Jun 22 21:59:38 2020 +0200
1.2 +++ b/data/dictionary.xml Mon Jun 22 23:11:14 2020 +0200
1.3 @@ -14,6 +14,8 @@
1.4 along with this program. If not, see <http://www.gnu.org/licenses/>.
1.5 -->
1.6 <dictionary xmlns="https://telco.frantovo.cz/xmlns/dictionary">
1.7 +
1.8 + <id>fca6b6ec-34dd-4cb2-83a3-d1b8ceccb296</id>
1.9
1.10 <tags>
1.11 <tag id="acision" name="Acision" description="comes from Acision or is specific for this company"/>
2.1 --- a/data/dictionary.xsd Mon Jun 22 21:59:38 2020 +0200
2.2 +++ b/data/dictionary.xsd Mon Jun 22 23:11:14 2020 +0200
2.3 @@ -25,8 +25,18 @@
2.4
2.5 <xs:complexType name="dictionaryType">
2.6 <xs:sequence>
2.7 + <xs:element name="id" type="ID" minOccurs="0" maxOccurs="1"/>
2.8 <xs:element name="tags" type="tagsDefinitionType" minOccurs="0" maxOccurs="1"/>
2.9 - <xs:element name="concept" type="conceptType" minOccurs="0" maxOccurs="unbounded"/>
2.10 + <xs:element name="concept" type="conceptType" minOccurs="0" maxOccurs="unbounded">
2.11 + <xs:annotation>
2.12 + <xs:documentation>
2.13 + Concept is an item of a dictionary – a term.
2.14 + If an abbreviation or a word have two different meanings
2.15 + it is two different concepts i.e. different meaning should not be mixed in a single concept.
2.16 + Example: CLI (command-line interface) and CLI (call level interface) are two different concepts.
2.17 + </xs:documentation>
2.18 + </xs:annotation>
2.19 + </xs:element>
2.20 </xs:sequence>
2.21 </xs:complexType>
2.22
2.23 @@ -37,13 +47,29 @@
2.24 </xs:complexType>
2.25
2.26 <xs:complexType name="tagDefinitionType">
2.27 - <xs:attribute name="id" type="xs:string"/>
2.28 + <xs:attribute name="id" type="xs:string">
2.29 + <xs:annotation>
2.30 + <xs:documentation>
2.31 + Tag IDs are not globally unique
2.32 + (they are short and simple, so they can be easily added to concepts while editing the document by hand)
2.33 + so when the disctionary is merged into another XML document, theese IDs should be prefixed e.g. with the dictionary ID.
2.34 + </xs:documentation>
2.35 + </xs:annotation>
2.36 + </xs:attribute>
2.37 <xs:attribute name="name" type="xs:string"/>
2.38 <xs:attribute name="description" type="xs:string"/>
2.39 </xs:complexType>
2.40
2.41 <xs:complexType name="conceptType">
2.42 <xs:sequence>
2.43 + <xs:element name="id" type="ID" minOccurs="0" maxOccurs="1">
2.44 + <xs:annotation>
2.45 + <xs:documentation>
2.46 + This should be globally unique ID of the concept.
2.47 + Concepts shared among multiple dictionaries should have same ID.
2.48 + </xs:documentation>
2.49 + </xs:annotation>
2.50 + </xs:element>
2.51 <xs:element name="term" type="termType" minOccurs="1" maxOccurs="unbounded"/>
2.52 <xs:element name="explanation" type="explanationType"/>
2.53 <xs:element name="tag" type="tagRefType" minOccurs="0" maxOccurs="unbounded"/>
2.54 @@ -77,5 +103,18 @@
2.55 <xs:simpleType name="tagRefType">
2.56 <xs:restriction base="xs:string"/>
2.57 </xs:simpleType>
2.58 +
2.59 + <xs:simpleType name="ID">
2.60 + <xs:annotation>
2.61 + <xs:documentation>
2.62 + UUID, but must start with a letter, to comply with XML ID rules;
2.63 + use e.g. uuidgen | grep ^[a-f];
2.64 + Never reuse the ID if one chapter/item is removed and another with different meaning is added.
2.65 + </xs:documentation>
2.66 + </xs:annotation>
2.67 + <xs:restriction base="xs:ID">
2.68 + <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}"/>
2.69 + </xs:restriction>
2.70 + </xs:simpleType>
2.71
2.72 </xs:schema>
2.73 \ No newline at end of file