xml version encoding UTF-8 -- edited with XMLSpy v2006 sp1 http www al

  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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by Shonin (Kiev Polytechnic Insitute) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!--Глобальные элементы-->
<xs:element name="author1" type="xs:string" fixed="Иванов И. И.">
<xs:annotation>
<xs:documentation>Иванов И. И.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="author2" type="xs:string" fixed="Петров П. П.">
<xs:annotation>
<xs:documentation>Петров П. П.</xs:documentation>
</xs:annotation>
</xs:element>
<!--Простые типы-->
<xs:simpleType name="text">
<xs:annotation>
<xs:documentation>простой тип, для наложения ограничений на article, content, section, subsection и paragraph</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z](\p{Ll}\p{P}\p{Z})+"/>
</xs:restriction>
</xs:simpleType>
<!--Глобальные элементы-->
<xs:element name="article-list">
<xs:annotation>
<xs:documentation>Корневой тип</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="article" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="article">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="author" maxOccurs="unbounded"/>
<xs:element ref="annotation"/>
<xs:element ref="content"/>
<xs:element ref="recieving-date"/>
</xs:sequence>
<xs:attribute name="section" use="optional" default="computers">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="computers"/>
<xs:enumeration value="mathematics"/>
<xs:enumeration value="physics"/>
<xs:enumeration value="chemistry"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="recieving-date" type="xs:date"/>
<xs:element name="author">
<xs:complexType mixed="true">
<xs:choice minOccurs="0">
<xs:element ref="author1"/>
<xs:element ref="author2"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="content">
<xs:complexType mixed="false">
<xs:sequence>
<xs:element ref="section" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="section">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="subsection" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="style" use="optional" default="ordinary">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ordinary"/>
<xs:enumeration value="strong"/>
<xs:enumeration value="selected"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="subsection">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="paragraph" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="style" use="optional" default="ordinary">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ordinary"/>
<xs:enumeration value="strong"/>
<xs:enumeration value="big"/>
<xs:enumeration value="small"/>
<xs:enumeration value="selected"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="paragraph">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="style" use="optional" default="ordinary">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ordinary"/>
<xs:enumeration value="strong"/>
<xs:enumeration value="big"/>
<xs:enumeration value="small"/>
<xs:enumeration value="selected"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="annotation" type="xs:string"/>
</xs:schema>