-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiml.xsd
More file actions
126 lines (108 loc) · 4.58 KB
/
Copy pathiml.xsd
File metadata and controls
126 lines (108 loc) · 4.58 KB
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
126
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified">
<xsd:element name="Songs" >
<xsd:complexType> <!-- Aqui abro el songs -->
<xsd:sequence>
<xsd:element name="Anio" type="tipo_anio" minOccurs="1" maxOccurs="unbounded" />
<xsd:element name="Pais" maxOccurs="unbounded" minOccurs="1">
<xsd:complexType> <!-- Aqui abro el pais -->
<xsd:sequence>
<xsd:element name="Disco" maxOccurs="unbounded"> <!-- Aqui abro el disco -->
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Titulo" type="xsd:string"/>
<xsd:element name="Premios" minOccurs="0" > <!-- variable premios opcional con un maximo de 3 premio -->
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Premio" maxOccurs="3" minOccurs="0" type="tipo_premios"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Interprete" type="xsd:string"/>
<xsd:element name="Cancion" maxOccurs="unbounded" minOccurs="1"> <!-- Aqui abro la cancion minimo 1 cancion por disco -->
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element name="Titulo" type="xsd:string"/> <!-- IGUAL PUEDO REPETIR LA VARIABLE DEL DISCO PREGUNTAR -->
<xsd:element name="Duracion" type="duracion"/> <!-- entre 0 y 600 sec -->
<xsd:element name="Genero" type="tipo_genero" /> <!-- solo 4 tipos Rock Pop Country Balada-->
<xsd:element name="Version" minOccurs="0" >
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:choice>
<xsd:element name="Titulo" type="xsd:string" />
<xsd:element name="Idc" type="xsd:string" />
</xsd:choice>
<xsd:element name="IML" type="xsd:anyURI" minOccurs="1"/> <!--puede ser relativo(url general + iml) o absoluto http strin o tipouri ?...-->
</xsd:sequence>
<xsd:attribute name="anio" type="xsd:positiveInteger" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="idc" type="tipo_cancion" use="required"/> <!-- formato especifico XXXX-XXX-XXX-XX -->
</xsd:complexType>
</xsd:element> <!-- Aqui cierro la cancion -->
</xsd:sequence>
<xsd:attribute name="langs" type="tipo_lang" /> <!-- Si no existe es el indicado en el pais -->
<xsd:attribute name="idd" type="tipo_idd" use="required"/> <!-- formato especifico XXXX-XXX-XXX -->
</xsd:complexType> <!-- complex disco -->
</xsd:element> <!-- Aqui cierro el disco -->
</xsd:sequence>
<xsd:attribute name="pais" type="xsd:string" use="required"/>
<xsd:attribute name="lang" type="tipo_lang" use="required"/>
</xsd:complexType> <!-- Aqui cierro el complex pais -->
</xsd:element>
</xsd:sequence>
</xsd:complexType> <!-- complex el Song -->
</xsd:element>
<!-- - - - - - - - RESTRICCIONES- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- RESTICCION DE LA DURACION -->
<xsd:simpleType name="duracion">
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="599"/>
</xsd:restriction>
</xsd:simpleType>
<!-- RESTICCION DE LOS GENEROS -->
<xsd:simpleType name="tipo_genero">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Rock"/>
<xsd:enumeration value="Pop"/>
<xsd:enumeration value="Country"/>
<xsd:enumeration value="Balada"/>
</xsd:restriction>
</xsd:simpleType>
<!-- RESTICCION DE LOS ANIOS -->
<xsd:simpleType name="tipo_anio">
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1990"/>
<xsd:maxInclusive value="2018"/>
</xsd:restriction>
</xsd:simpleType>
<!-- RESTICCION DE LOS PREMIOS -->
<xsd:simpleType name="tipo_premios">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="DiscoDeOro"/>
<xsd:enumeration value="Grammy"/>
<xsd:enumeration value="LamparaMinera"/>
</xsd:restriction>
</xsd:simpleType>
<!-- RESTICCION DE LOS IDD -->
<xsd:simpleType name="tipo_idd">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{4}(-[0-9]{3})(-[0-9]{3})"/>
</xsd:restriction>
</xsd:simpleType>
<!-- RESTICCION DE LOS IDC -->
<xsd:simpleType name="tipo_cancion">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{4}(-[0-9]{3})(-[0-9]{3})(-[0-9]{2})"/>
</xsd:restriction>
</xsd:simpleType>
<!-- RESTICCION DE lang -->
<xsd:simpleType name="tipo_lang">
<xsd:restriction base="xsd:string">
<xsd:pattern value="([a-z]{2})(\s[a-z]{2})*"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>