-
Notifications
You must be signed in to change notification settings - Fork 186
/
Copy pathtranslations.xsd
63 lines (54 loc) · 2.77 KB
/
translations.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!--
Copyright (C) 2009-2014 ART-DECOR expert group art-decor.org
Author: Dr. Kai U. Heitmann
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
See http://www.gnu.org/licenses/gpl.html
-->
<!-- DECOR internationalization i18n schema -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<xs:element name="translations">
<xs:complexType>
<xs:sequence>
<xs:element name="item" type="TranslationItem" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en-US">Holds translations in any language based on value in @id</xs:documentation>
</xs:annotation>
<xs:unique name="uniqueTranslationKey">
<xs:selector xpath="translation"/>
<xs:field xpath="@lang"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="TranslationItem">
<xs:sequence>
<xs:element name="translation" type="translation" minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en-US">Holds a translation in the language as coded in @lang. Translation is usually just text with variables, but may be more complex with markup.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="ecode" type="xs:boolean" use="optional"/>
</xs:complexType>
<xs:complexType name="translation" mixed="true">
<xs:sequence>
<xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="lang" type="LanguageCodePattern" use="required"/>
</xs:complexType>
<xs:simpleType name="LanguageCodePattern">
<xs:annotation>
<xs:documentation xml:lang="en-US">A pattern for languages ss-CC</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:language">
<xs:pattern value="[a-z][a-z](-[A-Z][A-Z])?"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>