mirror of
https://gitlab.com/tutorial-java-rafa-munoz/tutorial-java-2024-25/LMSGI-2024-25.git
synced 2025-11-09 18:03:06 +01:00
feat(ch 4): added
This commit is contained in:
4
Unidad_04_DTD_XSD/DTD/01-xml-dtd-01.dtd
Normal file
4
Unidad_04_DTD_XSD/DTD/01-xml-dtd-01.dtd
Normal file
@@ -0,0 +1,4 @@
|
||||
<!ELEMENT superheroes (batalla*)>
|
||||
<!ELEMENT batalla (superheroe, supervillano)>
|
||||
<!ELEMENT superheroe (#PCDATA)>
|
||||
<!ELEMENT supervillano (#PCDATA)>
|
||||
12
Unidad_04_DTD_XSD/DTD/01-xml-dtd-01.xml
Normal file
12
Unidad_04_DTD_XSD/DTD/01-xml-dtd-01.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes SYSTEM "01-xml-dtd-01.dtd">
|
||||
<superheroes>
|
||||
<batalla>
|
||||
<superheroe>Spiderman</superheroe>
|
||||
<supervillano>Venon</supervillano>
|
||||
</batalla>
|
||||
<batalla>
|
||||
<superheroe>Hulk</superheroe>
|
||||
<supervillano>Thanos</supervillano>
|
||||
</batalla>
|
||||
</superheroes>
|
||||
18
Unidad_04_DTD_XSD/DTD/02-xml-dtd-01-dtd-interno.xml
Normal file
18
Unidad_04_DTD_XSD/DTD/02-xml-dtd-01-dtd-interno.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes [
|
||||
<!ELEMENT superheroes (superheroe*)>
|
||||
<!ELEMENT superheroe (poderes?, nombre?)*>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT poderes (poder*)>
|
||||
<!ELEMENT poder (#PCDATA)>
|
||||
]>
|
||||
<superheroes>
|
||||
<superheroe>
|
||||
<nombre>Iron Man</nombre>
|
||||
<poderes>
|
||||
<poder>Multimillonario</poder>
|
||||
<poder>Inteligencia</poder>
|
||||
<poder>Armadura prodigiosa</poder>
|
||||
</poderes>
|
||||
</superheroe>
|
||||
</superheroes>
|
||||
10
Unidad_04_DTD_XSD/DTD/03-xml-dtd-01-dtd-interno-any.xml
Normal file
10
Unidad_04_DTD_XSD/DTD/03-xml-dtd-01-dtd-interno-any.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes [
|
||||
<!ELEMENT superheroes ANY>
|
||||
<!ELEMENT superheroe ANY>
|
||||
]>
|
||||
<superheroes>
|
||||
<superheroe>Hulk</superheroe>
|
||||
<superheroe>Iron Man</superheroe>
|
||||
<superheroe>Thor</superheroe>
|
||||
</superheroes>
|
||||
10
Unidad_04_DTD_XSD/DTD/04-xml-dtd-01-dtd-interno-empty.xml
Normal file
10
Unidad_04_DTD_XSD/DTD/04-xml-dtd-01-dtd-interno-empty.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes [
|
||||
<!ELEMENT superheroes ANY>
|
||||
<!ELEMENT superheroe EMPTY>
|
||||
]>
|
||||
<superheroes>
|
||||
<superheroe/>
|
||||
<superheroe/>
|
||||
<superheroe/>
|
||||
</superheroes>
|
||||
10
Unidad_04_DTD_XSD/DTD/05-xml-dtd-01-dtd-interno-pcdata.xml
Normal file
10
Unidad_04_DTD_XSD/DTD/05-xml-dtd-01-dtd-interno-pcdata.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes [
|
||||
<!ELEMENT superheroes ANY>
|
||||
<!ELEMENT superheroe (#PCDATA)>
|
||||
]>
|
||||
<superheroes>
|
||||
<superheroe>Hulk</superheroe>
|
||||
<superheroe>Thor</superheroe>
|
||||
<superheroe>Iron Man</superheroe>
|
||||
</superheroes>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes [
|
||||
<!ELEMENT superheroes (superheroe*)>
|
||||
<!ELEMENT superheroe (poderes?)>
|
||||
<!ELEMENT poderes (poder+)>
|
||||
<!ELEMENT poder (#PCDATA)>
|
||||
]>
|
||||
<superheroes>
|
||||
<superheroe></superheroe> <!-- No tiene un elemento poderes. Esto es válido -->
|
||||
<superheroe> <!-- Tiene un sólo elemento poderes y un sólo elemento poder. Esto es válido -->
|
||||
<poderes>
|
||||
<poder>Rayos X</poder>
|
||||
</poderes>
|
||||
</superheroe>
|
||||
<superheroe> <!-- Tiene un sólo elemento poderes y varios elementos poder. Esto es válido -->
|
||||
<poderes>
|
||||
<poder>Supervelocidad</poder>
|
||||
<poder>Superfuereza</poder>
|
||||
</poderes>
|
||||
</superheroe>
|
||||
</superheroes>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes [
|
||||
<!ELEMENT superheroes (superheroe*)>
|
||||
<!ELEMENT superheroe (nombre, poder+,vida?)>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT poder (#PCDATA)>
|
||||
<!ELEMENT vida (vivo | muerto)>
|
||||
<!ELEMENT vivo EMPTY>
|
||||
<!ELEMENT muerto EMPTY>
|
||||
]>
|
||||
<superheroes>
|
||||
<superheroe>
|
||||
<nombre>Hulk</nombre>
|
||||
<poder>Superfuerza</poder>
|
||||
<poder>Rayos X</poder>
|
||||
<vida><muerto/></vida>
|
||||
</superheroe>
|
||||
<superheroe>
|
||||
<nombre>Thor</nombre>
|
||||
<poder>Martillo mágico</poder>
|
||||
</superheroe>
|
||||
</superheroes>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE superheroes [
|
||||
<!ELEMENT superheroes (#PCDATA | superheroe | supervillano | monstruo)*>
|
||||
<!ELEMENT superheroe ANY>
|
||||
<!ELEMENT supervillano ANY>
|
||||
<!ELEMENT monstruo ANY>
|
||||
]>
|
||||
<superheroes> Los de Marvel
|
||||
<superheroe>Iron Man</superheroe>
|
||||
<supervillano>Thanos</supervillano>
|
||||
<supervillano>Thanos</supervillano>
|
||||
<supervillano>Thanos</supervillano>
|
||||
<monstruo>Monster kripton</monstruo>
|
||||
<supervillano>Thanos</supervillano>
|
||||
</superheroes>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ELEMENT marvel (superheroe*)>
|
||||
<!ELEMENT superheroe EMPTY>
|
||||
<!ATTLIST superheroe nombre CDATA #FIXED "Thor">
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe/>
|
||||
<superheroe nombre="Thor"/>
|
||||
</marvel>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ELEMENT marvel (superheroe*)>
|
||||
<!ELEMENT superheroe EMPTY>
|
||||
<!ATTLIST superheroe nombre CDATA #REQUIRED
|
||||
edad CDATA #IMPLIED
|
||||
estado (activo | retirado | muerto) "retirado"
|
||||
localizacion CDATA #FIXED "localizado"
|
||||
color CDATA "normal">
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe nombre="Thor"/>
|
||||
<superheroe nombre="Hulk" edad="68" color="verde"/>
|
||||
<superheroe nombre="Iron Man" edad="45" estado="activo" localizacion="localizado"/>
|
||||
</marvel>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ELEMENT marvel (superheroe*)>
|
||||
<!ELEMENT superheroe EMPTY>
|
||||
<!ATTLIST superheroe nombre CDATA #IMPLIED>
|
||||
<!ATTLIST superheroe edad CDATA #IMPLIED>
|
||||
<!ATTLIST superheroe color CDATA #IMPLIED>
|
||||
<!ATTLIST superheroe estado CDATA #IMPLIED>
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe nombre="Thor"/>
|
||||
<superheroe nombre="Hulk" edad="68" color="verde"/>
|
||||
<superheroe nombre="Iron Man" edad="45" estado="activo" />
|
||||
</marvel>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ELEMENT marvel (superheroe*)>
|
||||
<!ELEMENT superheroe EMPTY>
|
||||
<!ATTLIST superheroe nombre CDATA #REQUIRED
|
||||
edad NMTOKEN #IMPLIED
|
||||
aliados NMTOKENS #IMPLIED>
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe nombre="Thor el que se fue a la isla"/>
|
||||
<superheroe nombre="Hulk" edad="68"/>
|
||||
<superheroe nombre="Iron Man" edad="45" aliados="Thor Hulk Captain"/>
|
||||
</marvel>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ELEMENT marvel (superheroe*, villano*)>
|
||||
<!ELEMENT superheroe EMPTY>
|
||||
<!ELEMENT villano EMPTY>
|
||||
<!ATTLIST superheroe nombre ID #REQUIRED>
|
||||
<!ATTLIST villano nombre CDATA #REQUIRED>
|
||||
<!ATTLIST villano enfrentadoCon IDREFS #IMPLIED>
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe nombre="Thor"/>
|
||||
<superheroe nombre="Capitana_Marvel"/>
|
||||
<superheroe nombre="Maria_Gil"/>
|
||||
<superheroe nombre="IronMan"/>
|
||||
<villano nombre="Loki" enfrentadoCon="Thor"/>
|
||||
<villano nombre="Thanos" enfrentadoCon="Thor Capitana_Marvel Maria_Gil IronMan"/>
|
||||
</marvel>
|
||||
14
Unidad_04_DTD_XSD/DTD/13-xml-dtd-notation.xml
Normal file
14
Unidad_04_DTD_XSD/DTD/13-xml-dtd-notation.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!NOTATION JPG SYSTEM "image/jpeg">
|
||||
<!NOTATION GIF SYSTEM "image/gif">
|
||||
<!NOTATION PNG SYSTEM "image/png">
|
||||
|
||||
<!ELEMENT marvel (superheroe*)>
|
||||
<!ELEMENT superheroe (#PCDATA)>
|
||||
<!ATTLIST superheroe nombre CDATA #REQUIRED
|
||||
tipoImagen NOTATION (GIF | JPG | PNG) #IMPLIED>
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe nombre="Thor" tipoImagen="PNG">Un Dios</superheroe>
|
||||
</marvel>
|
||||
11
Unidad_04_DTD_XSD/DTD/14-xml-dtd-interno-entidad-general.xml
Normal file
11
Unidad_04_DTD_XSD/DTD/14-xml-dtd-interno-entidad-general.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ELEMENT marvel (superheroe*)>
|
||||
<!ELEMENT superheroe (#PCDATA)>
|
||||
<!ENTITY marvel "Ediciones Marvel">
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe>Thor el de &marvel;</superheroe>
|
||||
<superheroe>Hulk</superheroe>
|
||||
<superheroe>Iron Man</superheroe>
|
||||
</marvel>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ELEMENT marvel (#PCDATA)>
|
||||
<!ENTITY marvel "Ediciones Marvel">
|
||||
<!ENTITY vengadores SYSTEM "superheroes.txt">
|
||||
]>
|
||||
<marvel>El equipo de vengadores &marvel; consta de &vengadores;</marvel>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ENTITY marvel "Ediciones Marvel">
|
||||
<!ENTITY % caracteristicasHeroe "<!ATTLIST superheroe
|
||||
nombre CDATA #REQUIRED color CDATA #IMPLIED>">
|
||||
|
||||
<!ELEMENT marvel (superheroe)>
|
||||
<!ELEMENT superheroe (#PCDATA)>
|
||||
%caracteristicasHeroe;
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe nombre="Thor" color="azul">Su historia es muy buena</superheroe>
|
||||
</marvel>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!ENTITY marvel "Ediciones Marvel">
|
||||
<!ENTITY vengadores SYSTEM "superheroes.txt">
|
||||
<!ENTITY % caracteristicas "nombre CDATA #REQUIRED color CDATA #IMPLIED">
|
||||
|
||||
<!ELEMENT marvel (superheroe*, villano*)>
|
||||
<!ELEMENT superheroe (#PCDATA)>
|
||||
<!ATTLIST superheroe %caracteristicas;>
|
||||
|
||||
<!ELEMENT villano (#PCDATA)>
|
||||
<!ATTLIST villano %caracteristicas;>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel SYSTEM "17-dtd-interno-entidad-parametro-solo-atributos.dtd">
|
||||
<marvel>
|
||||
<superheroe nombre="Thor" color="azul">Su historia es muy buena</superheroe>
|
||||
<villano nombre="Loki" color="negro">Hermano adoptivo de Thor</villano>
|
||||
</marvel>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE marvel [
|
||||
<!ENTITY marvel "Ediciones Marvel">
|
||||
<!ENTITY vengadores SYSTEM "superheroes.txt">
|
||||
<!ENTITY % caracteristicasHeroe "<!ATTLIST superheroe nombre CDATA #REQUIRED color CDATA #IMPLIED>">
|
||||
|
||||
<!NOTATION JPG SYSTEM "image/jpeg">
|
||||
<!ENTITY thor SYSTEM "../image/thor.jpg" NDATA JPG>
|
||||
|
||||
<!ELEMENT marvel (superheroe)>
|
||||
<!ELEMENT superheroe (#PCDATA)>
|
||||
%caracteristicasHeroe;
|
||||
<!ATTLIST superheroe imagen ENTITY #IMPLIED>
|
||||
]>
|
||||
<marvel>
|
||||
<superheroe nombre="Thor" color="azul" imagen="thor">Su historia es muy buena</superheroe>
|
||||
</marvel>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE numeros [
|
||||
<!ELEMENT numeros (#PCDATA)>
|
||||
]>
|
||||
|
||||
<numeros>
|
||||
<numero>25</numero>
|
||||
</numeros>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE letras [
|
||||
<!ELEMENT letras (letra)>
|
||||
<!ELEMENT letra (#PCDATA)>
|
||||
]>
|
||||
|
||||
<letras>
|
||||
<letra>m</letra>
|
||||
<letra>uve doble</letra>
|
||||
</letras>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE colores [
|
||||
<!ELEMENT colores (color*)>
|
||||
<!ELEMENT color (#PCDATA)>
|
||||
]>
|
||||
|
||||
<colores>
|
||||
<color>azul marino</color>
|
||||
negro
|
||||
<color>amarillo</color>
|
||||
</colores>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE flores [
|
||||
<!ELEMENT flores (flor+)>
|
||||
<!ELEMENT flor (#PCDATA)>
|
||||
]>
|
||||
|
||||
<flores>
|
||||
</flores>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE animales [
|
||||
<!ELEMENT animales (animal*)>
|
||||
<!ELEMENT animal (#PCDATA)>
|
||||
]>
|
||||
|
||||
<animales>
|
||||
<perro>Caniche</perro>
|
||||
<gato>Siamés</gato>
|
||||
</animales>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE escritores [
|
||||
<!ELEMENT escritores (escritor*)>
|
||||
<!ELEMENT escritor (nombre, nacimiento)>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT nacimiento (#PCDATA)>
|
||||
]>
|
||||
|
||||
<escritores>
|
||||
<escritor>
|
||||
<nombre>Mario Vargas LLosa</nombre>
|
||||
<nacimiento>28 de marzo de 1936</nacimiento>
|
||||
</escritor>
|
||||
<escritor>
|
||||
<nacimiento>1 de abril de 1929</nacimiento>
|
||||
<nombre>Milan Kundera</nombre>
|
||||
</escritor>
|
||||
</escritores>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE musicos [
|
||||
<!ELEMENT musicos (musico*)>
|
||||
<!ELEMENT musico ((nombre | apodo), fechaNacimiento)>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT apodo (#PCDATA)>
|
||||
<!ELEMENT fechaNacimiento (#PCDATA)>
|
||||
]>
|
||||
|
||||
<musicos>
|
||||
<musico>
|
||||
<nombre>Antonio Vivaldi</nombre>
|
||||
<apodo>El cura pelirrojillo</apodo>
|
||||
<fechaNacimiento>4 de marzo de 1678</fechaNacimiento>
|
||||
</musico>
|
||||
<musico>
|
||||
<nombre>Johann Sebastian Bach</nombre>
|
||||
<apodo>El viejo peluca</apodo>
|
||||
<fechaNacimiento>21 de marzo de 1685</fechaNacimiento>
|
||||
</musico>
|
||||
</musicos>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE agenda [
|
||||
<!ELEMENT agenda (contacto*)>
|
||||
<!ELEMENT contacto (nombre, telefonoFijo*, telefonoMovil+)>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT telefonoFijo (#PCDATA)>
|
||||
<!ELEMENT telefonoMovil (#PCDATA)>
|
||||
]>
|
||||
|
||||
<agenda>
|
||||
<contacto>
|
||||
<nombre>Ayuntamiento</nombre>
|
||||
<telefonoFijo>010</telefonoFijo>
|
||||
</contacto>
|
||||
<contacto>
|
||||
<nombre>Emergencias</nombre>
|
||||
<telefonoFijo>112 (Unión Europea)</telefonoFijo>
|
||||
<telefonoMovil>Desconocido</telefonoMovil>
|
||||
<telefonoFijo>911 (Estados Unidos)</telefonoFijo>
|
||||
</contacto>
|
||||
</agenda>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE sistemaSolar [
|
||||
<!ELEMENT sistemaSolar (cuerpo*)>
|
||||
<!ELEMENT cuerpo ((planeta|satelite|asteroide)+)>
|
||||
<!ELEMENT planeta (#PCDATA)>
|
||||
<!ELEMENT satelite (#PCDATA)>
|
||||
<!ELEMENT asteroide (#PCDATA)>
|
||||
]>
|
||||
|
||||
<sistemaSolar>
|
||||
<cuerpo>
|
||||
<planeta>Tierra</planeta>
|
||||
<satelite>Luna</satelite>
|
||||
</cuerpo>
|
||||
<asteroide>Ceres</asteroide>
|
||||
</sistemaSolar>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE favoritos [
|
||||
<!ELEMENT favoritos (marcador)>
|
||||
<!ELEMENT marcador (nombre, uri)>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT uri (#PCDATA)>
|
||||
]>
|
||||
|
||||
<marcadores>
|
||||
<marcador>
|
||||
<nombre>W3C</nombre>
|
||||
<uri>http://www.w3.org/</uri>
|
||||
</marcador>
|
||||
<marcador>
|
||||
<nombre>Web Hypertext Application Technology Working Group (WHATWG)</nombre>
|
||||
<uri>http://www.whatwg.org/</uri>
|
||||
</marcador>
|
||||
</marcadores>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE efemerides [
|
||||
<!ELEMENT efemerides (efemeride)>
|
||||
<!ELEMENT efemeride (fecha, hecho)>
|
||||
]>
|
||||
|
||||
<efemerides>
|
||||
<efemeride>
|
||||
<fecha>20 de julio de 1969</fecha>
|
||||
<hecho>Llegada del hombre a la Luna</hecho>
|
||||
</efemeride>
|
||||
<efemeride>
|
||||
<fecha>12 de octubre de 1492</fecha>
|
||||
<hecho>Llegada de Colón a América</hecho>
|
||||
</efemeride>
|
||||
<efemeride>
|
||||
<fecha>6 de abril de 1909</fecha>
|
||||
<hecho>llegada de Robert Peary al Polo Norte</hecho>
|
||||
</efemeride>
|
||||
</efemerides>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE aeropuertos [
|
||||
<!ELEMENT aeropuertos (aeropuerto*)>
|
||||
<!ELEMENT aeropuerto (nombre, cerrado)>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT cerrado (#PCDATA)>
|
||||
]>
|
||||
|
||||
<aeropuertos>
|
||||
<aeropuerto>
|
||||
<nombre>Berlín Schönefeld (SFX)</nombre>
|
||||
</aeropuerto>
|
||||
<aeropuerto>
|
||||
<nombre>Berlín Tempelhof (THF)</nombre>
|
||||
<cerrado />
|
||||
</aeropuerto>
|
||||
</aeropuertos>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE vuelos [
|
||||
<!ELEMENT vuelos (vuelo*)>
|
||||
<!ELEMENT vuelo (origen, destino)>
|
||||
<!ELEMENT origen (#PCDATA)>
|
||||
<!ELEMENT destino (#PCDATA)>
|
||||
]>
|
||||
|
||||
<vuelos>
|
||||
<vuelo>
|
||||
<origen>Valencia (VLC)</origen>
|
||||
<destino>Londres Heathrow (LHR)</destino>
|
||||
</vuelo>
|
||||
<vuelo>
|
||||
<destino>Berlín Schönefeld (SFX)</destino>
|
||||
<origen>Paris Charles de Gaulle (CDG)</origen>
|
||||
</vuelo>
|
||||
</vuelos>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE reyesEspañoles [
|
||||
<!ELEMENT reyesEspañoles (rey*, reina*)>
|
||||
<!ELEMENT rey (nombre, padre, madre)>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT padre (#PCDATA)>
|
||||
<!ELEMENT madre (#PCDATA)>
|
||||
]>
|
||||
|
||||
<reyesEspañoles>
|
||||
<rey>
|
||||
<nombre>Felipe III</nombre>
|
||||
<padre>Felipe II</padre>
|
||||
<madre>Ana de Austria</madre>
|
||||
</rey>
|
||||
<reina>
|
||||
<nombre>Juana la Loca</nombre>
|
||||
<padre>Fernando el Católico</padre>
|
||||
<madre>Isabel la Católica</madre>
|
||||
</reina>
|
||||
<rey>
|
||||
<nombre>Carlos I</nombre>
|
||||
<padre>Felipe el Hermoso</padre>
|
||||
<madre>Juan la Loca</madre>
|
||||
</rey>
|
||||
</reyesEspañoles>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE paises [
|
||||
<!ELEMENT pais (nombre, unionEuropea, otan)>
|
||||
<!ELEMENT nombre EMPTY>
|
||||
<!ELEMENT unionEuropea EMPTY>
|
||||
<!ELEMENT otan EMPTY>
|
||||
]>
|
||||
|
||||
<paises>
|
||||
<pais>
|
||||
<nombre>España</nombre>
|
||||
<unionEuropea />
|
||||
<otan />
|
||||
</pais>
|
||||
<pais>
|
||||
<nombre>Noruega</nombre>
|
||||
<otan />
|
||||
</pais>
|
||||
<pais>
|
||||
<nombre>Austria</nombre>
|
||||
<unionEuropea />
|
||||
</pais>
|
||||
</paises>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE colores [
|
||||
<!ELEMENT colores (color*)>
|
||||
<!ELEMENT nombreSvg (#PCDATA)>
|
||||
<!ELEMENT rgb (#PCDATA)>
|
||||
<!ELEMENT cmyk (#PCDATA)>
|
||||
]>
|
||||
|
||||
<colores>
|
||||
<color>
|
||||
<nombreSvg>Purple</nombreSvg>
|
||||
<codigo>
|
||||
<rgb>#800080</rgb>
|
||||
</codigo>
|
||||
</color>
|
||||
<color>
|
||||
<nombreSvg>Purple</nombreSvg>
|
||||
<codigo>
|
||||
<cmyk>#00FF007F</cmyk>
|
||||
</codigo>
|
||||
</color>
|
||||
</colores>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE contabilidad [
|
||||
<!ELEMENT contabilidad ((ingreso | gasto)*)>
|
||||
<!ELEMENT fecha (#PCDATA)>
|
||||
<!ELEMENT cantidad (#PCDATA)>
|
||||
<!ELEMENT concepto (#PCDATA)>
|
||||
]>
|
||||
|
||||
<contabilidad>
|
||||
<apunte>
|
||||
<ingreso />
|
||||
<fecha>24 de febrero de 2011</fecha>
|
||||
<cantidad>1800,00 €</cantidad>
|
||||
<concepto>Salario</concepto>
|
||||
</apunte>
|
||||
<apunte>
|
||||
<gasto />
|
||||
<fecha>28 de febrero de 2011</fecha>
|
||||
<cantidad>74,25 €</cantidad>
|
||||
<concepto>Recibo luz</concepto>
|
||||
</apunte>
|
||||
</contabilidad>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mensajes [
|
||||
<!ELEMENT mensajes (mensaje)>
|
||||
<!ELEMENT de (#PCDATA)>
|
||||
<!ELEMENT para (#PCDATA)>
|
||||
<!ELEMENT hora (#PCDATA)>
|
||||
<!ELEMENT texto (#PCDATA)>
|
||||
<!ELEMENT strong (#PCDATA)>
|
||||
]>
|
||||
|
||||
<mensajes>
|
||||
<mensaje>
|
||||
<de>Pepe (pepe@example.com)</de>
|
||||
<para>Juan (juan@example.com)</para>
|
||||
<hora>28/02/2011 17:48:23,61</hora>
|
||||
<texto>¿Hola, Juan, qué haces?</texto>
|
||||
</mensaje>
|
||||
<mensaje>
|
||||
<de>Juan (juan@example.com)</de>
|
||||
<para>Pepe (pepe@example.com)</para>
|
||||
<hora>28/02/2011 17:54:20,87</hora>
|
||||
<texto>Aquí, aprendiendo <strong>XML</strong></texto>
|
||||
</mensaje>
|
||||
</mensajes>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE persona [
|
||||
<!ELEMENT persona EMPTY>
|
||||
<!ATTLIST persona nombre CDATA #IMPLIED>
|
||||
]>
|
||||
|
||||
<persona dni="03141592E" />
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pelicula [
|
||||
<!ELEMENT pelicula EMPTY>
|
||||
<!ATTLIST pelicula titulo CDATA #IMPLIED>
|
||||
]>
|
||||
|
||||
<pelicula titulo="La diligencia" genero="oeste" />
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE cuadros [
|
||||
<!ELEMENT cuadros (cuadro*)>
|
||||
<!ELEMENT cuadro EMPTY>
|
||||
<!ATTLIST cuadro titulo ID #REQUIRED>
|
||||
<!ATTLIST cuadro autor CDATA #REQUIRED>
|
||||
]>
|
||||
|
||||
<cuadros>
|
||||
<cuadro titulo="Adán y Eva" autor="Alberto Durero" />
|
||||
<cuadro autor="Lucas Cranach, el viejo" titulo="Adán y Eva" />
|
||||
</cuadros>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE listaCompra [
|
||||
<!ELEMENT listaCompra (item*)>
|
||||
<!ELEMENT item EMPTY>
|
||||
<!ATTLIST item nombre CDATA #REQUIRED>
|
||||
<!ATTLIST item cantidad CDATA #REQUIRED>
|
||||
]>
|
||||
|
||||
<listaCompra>
|
||||
<leche cantidad="12 litros" ></leche>
|
||||
<pan cantidad="3 barras de cuarto" />
|
||||
</listaCompra>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE futbol [
|
||||
<!ELEMENT futbol (jugador*)>
|
||||
<!ELEMENT jugador EMPTY>
|
||||
<!ATTLIST jugador nombre NMTOKENS #REQUIRED>
|
||||
<!ATTLIST jugador codigo ID #REQUIRED>
|
||||
]>
|
||||
|
||||
<futbol>
|
||||
<jugador nombre="Alfredo Di Stéfano" codigo="1"/>
|
||||
<jugador nombre="Edson Arantes do Nascimento, Pelé" codigo="2" />
|
||||
<jugador nombre="Diego Armando Maradona" codigo="3" />
|
||||
<jugador nombre="Johan Cruyff" codigo="4" />
|
||||
</futbol>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE futbol [
|
||||
<!ELEMENT futbol ((jugador|equipo)*)>
|
||||
<!ELEMENT jugador EMPTY>
|
||||
<!ATTLIST jugador nombre NMTOKENS #REQUIRED>
|
||||
<!ATTLIST jugador codigo ID #REQUIRED>
|
||||
<!ELEMENT equipo EMPTY>
|
||||
<!ATTLIST equipo nombre CDATA #REQUIRED>
|
||||
<!ATTLIST equipo jugadores IDREFS #IMPLIED>
|
||||
]>
|
||||
|
||||
<futbol>
|
||||
<jugador nombre="Alfredo Di Stéfano" codigo="ads"/>
|
||||
<jugador nombre="Edison Arantes do Nascimento" codigo="ean" />
|
||||
<jugador nombre="Diego Armando Maradona" codigo="dam" />
|
||||
<jugador nombre="Johan Cruyff" codigo="jc" />
|
||||
<equipo nombre="Società Sportiva Calcio Napoli" jugadores="Maradona" />
|
||||
<equipo nombre="Futbol Club Barcelona" jugadores="Cruyff, Maradona" />
|
||||
</futbol>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE libro [
|
||||
<!ELEMENT libro EMPTY>
|
||||
<!ATTLIST libro autor NMTOKEN #REQUIRED>
|
||||
]>
|
||||
|
||||
<libro autor="Mario Vargas LLosa" />
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE inventores [
|
||||
<!ELEMENT inventores>
|
||||
<!ELEMENT inventor EMPTY>
|
||||
<!ATTLIST inventor invento CDATA #REQUIRED>
|
||||
<!ATTLIST inventor nombre ID #REQUIRED>
|
||||
]>
|
||||
|
||||
<inventores>
|
||||
<inventor nombre="Robert Adler" invento="Mando a distancia" />
|
||||
<inventor nombre="Laszlo Josef Biro" invento="Bolígrafo" />
|
||||
<inventor nombre="Josephine Garis Cochran" invento="Lavaplatos" />
|
||||
<inventor invento="Fuego" />
|
||||
</inventores>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE cosasPorHacer [
|
||||
<!ELEMENT cosasPorHacer (cosa)>
|
||||
<!ELEMENT cosa EMPTY>
|
||||
<!ATTLIST cosa fecha CDATA #REQUIRED>
|
||||
<!ATTLIST cosa asunto CDATA #REQUIRED>
|
||||
<!ATTLIST cosa fechaLimite CDATA #REQUIRED>
|
||||
]>
|
||||
|
||||
<cosasPorHacer>
|
||||
<cosa fecha="20 de febrero de 2011" fechaLimite="1 de marzo de 2011">
|
||||
Preparar ejercicios de DTDs</cosa>
|
||||
<cosa fecha="21 de febrero de 2011" fechaLimite="5 de marzo de 2011">
|
||||
Preparar tema XSLT</cosa>
|
||||
</cosasPorHacer>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE resoluciones [
|
||||
<!ELEMENT resoluciones EMPTY>
|
||||
<!ATTLIST resoluciones nombre NMTOKEN #REQUIRED>
|
||||
<!ATTLIST resoluciones alto CDATA #REQUIRED>
|
||||
<!ATTLIST resoluciones ancho CDATA #REQUIRED>
|
||||
]>
|
||||
|
||||
<resoluciones>
|
||||
<resolucion nombre="VGA" alto="480" ancho="640" />
|
||||
<resolucion nombre="XGA" alto="1024" ancho="768" />
|
||||
<resolucion nombre="HD 1080" alto="1920" ancho="1080" />
|
||||
</resoluciones>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE albumesMortadelo [
|
||||
<!ELEMENT albumesMortadelo (album*)>
|
||||
<!ELEMENT album (nombre, fecha)>
|
||||
<!ATTLIST album nombre CDATA #REQUIRED>
|
||||
<!ATTLIST album fecha(1969,1970,1971,1972,1973,1974) #REQUIRED>
|
||||
]>
|
||||
|
||||
<albumesMortadelo>
|
||||
<album nombre="El sulfato atómico" fecha="1969"/>
|
||||
<album nombre="La caja de diez cerrojos" fecha="1971"/>
|
||||
<album nombre="El otro yo del profesor Bacterio" fecha="1973"/>
|
||||
<album nombre="Los cacharros majaretas" fecha="1974"/>
|
||||
</albumesMortadelo>
|
||||
16
Unidad_04_DTD_XSD/DTD/ejercicio01-PlacasBase.xml
Normal file
16
Unidad_04_DTD_XSD/DTD/ejercicio01-PlacasBase.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE placasBase [
|
||||
<!ELEMENT placasBase (micro+-, memoria+, modelo, fabricante)>
|
||||
<!ELEMENT micro (#PCDATA)>
|
||||
<!ELEMENT memoria (#PCDATA)>
|
||||
<!ELEMENT modelo (#PCDATA)>
|
||||
<!ELEMENT fabricante (Intel | Asus)>
|
||||
<!ELEMENT Intel EMPTY>
|
||||
<!ELEMENT Asus EMPTY>
|
||||
]>
|
||||
<placasBase>
|
||||
<micro>i7-9700k</micro>
|
||||
<memoria>64GB</memoria>
|
||||
<modelo>Asus PrimeZ 390-A</modelo>
|
||||
<fabricante><Intel /></fabricante>
|
||||
</placasBase>
|
||||
31
Unidad_04_DTD_XSD/DTD/ejercicio30.dtd
Normal file
31
Unidad_04_DTD_XSD/DTD/ejercicio30.dtd
Normal file
@@ -0,0 +1,31 @@
|
||||
<!ELEMENT factura (datos_empresa, datos_cliente, datos_factura)>
|
||||
<!ATTLIST factura n_fac ID #REQUIRED>
|
||||
<!ELEMENT datos_empresa (nombre | dir | poblacion | provincia | cif | telefono | fax)*>
|
||||
<!ELEMENT nombre (#PCDATA)>
|
||||
<!ELEMENT dir (#PCDATA)>
|
||||
<!ELEMENT poblacion (#PCDATA)>
|
||||
<!ATTLIST poblacion cod_postal CDATA #REQUIRED>
|
||||
<!ELEMENT provincia (#PCDATA)>
|
||||
<!ELEMENT cif (#PCDATA)>
|
||||
<!ELEMENT telefono EMPTY>
|
||||
<!ATTLIST telefono valor CDATA #FIXED "917776688">
|
||||
<!ELEMENT fax EMPTY>
|
||||
<!ATTLIST fax valor CDATA #FIXED "917776699">
|
||||
<!ELEMENT datos_cliente (nombre | dir_env | poblacion | provincia)*>
|
||||
<!ELEMENT dir_env (#PCDATA)>
|
||||
<!ATTLIST datos_cliente n_cli ID #REQUIRED>
|
||||
<!ELEMENT datos_factura (fecha, linea+, base, cuota_iva, total)>
|
||||
<!ELEMENT fecha (#PCDATA)>
|
||||
<!ELEMENT linea (ref | desc | cant | precio | importe)*>
|
||||
<!ELEMENT ref (#PCDATA)>
|
||||
<!ELEMENT desc (#PCDATA)>
|
||||
<!ELEMENT cant (#PCDATA)>
|
||||
<!ELEMENT precio (#PCDATA)>
|
||||
<!ELEMENT importe (#PCDATA)>
|
||||
<!ELEMENT base (#PCDATA)>
|
||||
<!ELEMENT cuota_iva (#PCDATA)>
|
||||
<!ELEMENT total (#PCDATA)>
|
||||
<!ATTLIST datos_factura n_ped ID #REQUIRED
|
||||
iva NMTOKEN #REQUIRED
|
||||
f_pago (tarjeta | efectivo | plazos) #REQUIRED
|
||||
moneda (euro) #REQUIRED>
|
||||
1
Unidad_04_DTD_XSD/DTD/superheroes.txt
Normal file
1
Unidad_04_DTD_XSD/DTD/superheroes.txt
Normal file
@@ -0,0 +1 @@
|
||||
Thor, Hulk e Iron Man
|
||||
1
Unidad_04_DTD_XSD/DTD/superheroes.xml
Normal file
1
Unidad_04_DTD_XSD/DTD/superheroes.xml
Normal file
@@ -0,0 +1 @@
|
||||
<superheroes>Thor, Hulk e Iron Man</superheroes>
|
||||
53
Unidad_04_DTD_XSD/DTD/xml-dtd-ejercicio-30.xml
Normal file
53
Unidad_04_DTD_XSD/DTD/xml-dtd-ejercicio-30.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE factura SYSTEM "ejercicio30.dtd">
|
||||
<factura n_fac="f999">
|
||||
<datos_empresa>
|
||||
<nombre>Equipos Digitales S.L.</nombre>
|
||||
<dir>Av. Valladolid</dir>
|
||||
<poblacion cod_postal="28043">Madrid</poblacion>
|
||||
<provincia>Madrid</provincia>
|
||||
<cif>Q-9876543</cif>
|
||||
<telefono valor="917776688"/>
|
||||
<fax valor="917776699"/>
|
||||
</datos_empresa>
|
||||
<datos_cliente n_cli="c879">
|
||||
<nombre>Darío, Bueno Gutiérrez</nombre>
|
||||
<dir_env>Av. Oporto nº7 4ºd</dir_env>
|
||||
<poblacion cod_postal="28043">Madrid</poblacion>
|
||||
<provincia>Madrid</provincia>
|
||||
</datos_cliente>
|
||||
<datos_factura n_ped="p731" iva="16" f_pago= "efectivo" moneda="euro">
|
||||
<fecha>12-01-2005</fecha>
|
||||
<linea>
|
||||
<ref>MII93000F/8</ref>
|
||||
<desc>MICRO PENTIUM IV 3000MHZ FB800</desc>
|
||||
<cant>1</cant>
|
||||
<precio>230</precio>
|
||||
<importe>266,80</importe>
|
||||
</linea>
|
||||
<linea>
|
||||
<ref>MB8QDIP4</ref>
|
||||
<desc>PLACA BASE QDI P4</desc>
|
||||
<cant>1</cant>
|
||||
<precio>180</precio>
|
||||
<importe>208,80</importe>
|
||||
</linea>
|
||||
<linea>
|
||||
<ref>MEDD512M32</ref>
|
||||
<desc>DIMM DDR 512MB 3200</desc>
|
||||
<cant>2</cant>
|
||||
<precio>40</precio>
|
||||
<importe>92,80</importe>
|
||||
</linea>
|
||||
<linea>
|
||||
<ref>HD250GSA7</ref>
|
||||
<desc>DISCO DURO 250GB S-ATA 7200</desc>
|
||||
<cant>4</cant>
|
||||
<precio>120</precio>
|
||||
<importe>556,80</importe>
|
||||
</linea>
|
||||
<base>970,00</base>
|
||||
<cuota_iva>155,20</cuota_iva>
|
||||
<total>1125,20</total>
|
||||
</datos_factura>
|
||||
</factura>
|
||||
3
Unidad_04_DTD_XSD/DTD/xml-dtd-ejercicio-31.dtd
Normal file
3
Unidad_04_DTD_XSD/DTD/xml-dtd-ejercicio-31.dtd
Normal file
@@ -0,0 +1,3 @@
|
||||
<!ELEMENT concesionario (modeloCoche, modeloMotor)>
|
||||
<!ELEMENT modeloCoche (#PCDATA)>
|
||||
<!ELEMENT modeloMotor (#PCDATA)>
|
||||
12
Unidad_04_DTD_XSD/DTD/xml-dtd-ejercicio-31.xml
Normal file
12
Unidad_04_DTD_XSD/DTD/xml-dtd-ejercicio-31.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<concesionario>
|
||||
<modeloCoche idModeloCoche="mc556">No disponible</modeloCoche>
|
||||
<modeloCoche idModeloCoche="mc555" idsRefModeloCoche="mc556 mc444">Este modelo tiene un motor 1.998cc 16v. de cuatro cilindros, que desarrolla una potencia de 128 CV. Dispone de cambio manual ... el consumo medio de este monovolumen es 11 a los 100 km. El precio base es de2.225.000.
|
||||
<modeloMotor idModeloCoche="mc556"></modeloMotor>
|
||||
</modeloCoche>
|
||||
<modeloCoche idModeloCoche="mc557">No disponible</modeloCoche>
|
||||
<modeloCoche idModeloCoche="mc154">No disponible</modeloCoche>
|
||||
<modeloCoche idModeloCoche="mc444" idsRefModeloCoche="mc555 mc154">Este modelo tiene un motor 2.000cc 16v. de cuatro cilindros con 128 CV. Dispone de cambio manual ... el consumo medio de este monovolumen es 11 a los 100 km. El precio base es de 2.500.000.
|
||||
<modeloMotor idModeloCoche="mc556"></modeloMotor>
|
||||
</modeloCoche>
|
||||
</concesionario>
|
||||
5
Unidad_04_DTD_XSD/XSD/xml-xsd-01.xml
Normal file
5
Unidad_04_DTD_XSD/XSD/xml-xsd-01.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<marvel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-01.xsd">
|
||||
un montón de superhéroes
|
||||
</marvel>
|
||||
4
Unidad_04_DTD_XSD/XSD/xml-xsd-01.xsd
Normal file
4
Unidad_04_DTD_XSD/XSD/xml-xsd-01.xsd
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="marvel" />
|
||||
</xs:schema>
|
||||
3
Unidad_04_DTD_XSD/XSD/xml-xsd-02.xml
Normal file
3
Unidad_04_DTD_XSD/XSD/xml-xsd-02.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<marvel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-02.xsd">un montón de superhéroes</marvel>
|
||||
5
Unidad_04_DTD_XSD/XSD/xml-xsd-02.xsd
Normal file
5
Unidad_04_DTD_XSD/XSD/xml-xsd-02.xsd
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="marvel" type="xs:string"
|
||||
fixed="un montón de superhéroes" />
|
||||
</xs:schema>
|
||||
3
Unidad_04_DTD_XSD/XSD/xml-xsd-03.xml
Normal file
3
Unidad_04_DTD_XSD/XSD/xml-xsd-03.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-03.xsd" nombre="Hulk" edad="46"/>
|
||||
12
Unidad_04_DTD_XSD/XSD/xml-xsd-03.xsd
Normal file
12
Unidad_04_DTD_XSD/XSD/xml-xsd-03.xsd
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="tipoComplejo">
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:complexType name="tipoComplejo">
|
||||
<xs:attribute name="nombre" type="xs:string" use="required"/>
|
||||
<xs:attribute name="edad" type="xs:integer" use="optional"/>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
||||
3
Unidad_04_DTD_XSD/XSD/xml-xsd-04.xml
Normal file
3
Unidad_04_DTD_XSD/XSD/xml-xsd-04.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-04.xsd">Hulk</superheroe>
|
||||
10
Unidad_04_DTD_XSD/XSD/xml-xsd-04.xsd
Normal file
10
Unidad_04_DTD_XSD/XSD/xml-xsd-04.xsd
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="nombreSuperheroe"/>
|
||||
|
||||
<xs:simpleType name="nombreSuperheroe">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
3
Unidad_04_DTD_XSD/XSD/xml-xsd-05-exp-reg.xml
Normal file
3
Unidad_04_DTD_XSD/XSD/xml-xsd-05-exp-reg.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-05-exp-reg.xsd">rafa@rafa.com</superheroe>
|
||||
10
Unidad_04_DTD_XSD/XSD/xml-xsd-05-exp-reg.xsd
Normal file
10
Unidad_04_DTD_XSD/XSD/xml-xsd-05-exp-reg.xsd
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="nombreSuperheroe"/>
|
||||
|
||||
<xs:simpleType name="nombreSuperheroe">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\w+@\w+[.]\w+" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
3
Unidad_04_DTD_XSD/XSD/xml-xsd-06-union.xml
Normal file
3
Unidad_04_DTD_XSD/XSD/xml-xsd-06-union.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tallaSuperheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-06-union.xsd">x</tallaSuperheroe>
|
||||
31
Unidad_04_DTD_XSD/XSD/xml-xsd-06-union.xsd
Normal file
31
Unidad_04_DTD_XSD/XSD/xml-xsd-06-union.xsd
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="tallaSuperheroe" type="lista-tallas"/>
|
||||
|
||||
<xs:simpleType name="lista-tallas">
|
||||
<xs:list itemType="talla"/>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="talla">
|
||||
<xs:union memberTypes="talla-texto talla-numero" />
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="talla-texto">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="s" />
|
||||
<xs:enumeration value="m" />
|
||||
<xs:enumeration value="x" />
|
||||
<xs:enumeration value="xl" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<xs:simpleType name="talla-numero">
|
||||
<xs:restriction base="xs:positiveInteger">
|
||||
<xs:enumeration value="38"/>
|
||||
<xs:enumeration value="40"/>
|
||||
<xs:enumeration value="42"/>
|
||||
<xs:enumeration value="44"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
3
Unidad_04_DTD_XSD/XSD/xml-xsd-07-list.xml
Normal file
3
Unidad_04_DTD_XSD/XSD/xml-xsd-07-list.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<numeros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-07-list.xsd">11 23</numeros>
|
||||
16
Unidad_04_DTD_XSD/XSD/xml-xsd-07-list.xsd
Normal file
16
Unidad_04_DTD_XSD/XSD/xml-xsd-07-list.xsd
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="numeros" type="listaNumeros"/>
|
||||
|
||||
<xs:simpleType name="listaNumeros">
|
||||
<xs:list itemType="listaNumerosRestringida" />
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="listaNumerosRestringida">
|
||||
<xs:restriction base="xs:positiveInteger">
|
||||
<xs:minInclusive value="10"/>
|
||||
<xs:maxExclusive value="51"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<NumeroDelimitado xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-08-ejemplo-Derivacion_de_tipos.xsd">51</NumeroDelimitado>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="NumeroDelimitado" type="numero-50-60"/>
|
||||
|
||||
<xs:simpleType name="numero-50-60">
|
||||
<xs:restriction base="numero-10-100">
|
||||
<xs:minInclusive value="50" />
|
||||
<xs:maxInclusive value="60" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="numero-10-100">
|
||||
<xs:restriction base="xs:positiveInteger">
|
||||
<xs:minInclusive value="10"/>
|
||||
<xs:maxInclusive value="100"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
6
Unidad_04_DTD_XSD/XSD/xml-xsd-09-sequence.xml
Normal file
6
Unidad_04_DTD_XSD/XSD/xml-xsd-09-sequence.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-09-sequence.xsd" nombreReal="Bruce Banner">
|
||||
<edad>86</edad>
|
||||
<bando>Buenos</bando>
|
||||
</superheroe>
|
||||
19
Unidad_04_DTD_XSD/XSD/xml-xsd-09-sequence.xsd
Normal file
19
Unidad_04_DTD_XSD/XSD/xml-xsd-09-sequence.xsd
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="caracSuperheroe"/>
|
||||
|
||||
<xs:complexType name="caracSuperheroe">
|
||||
<xs:sequence>
|
||||
<xs:element name="nombre" minOccurs="0" maxOccurs="3" type="minimoUnCaracter" />
|
||||
<xs:element name="edad" type="xs:string" />
|
||||
<xs:element name="bando" type="xs:string" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="nombreReal" type="minimoUnCaracter"/>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="minimoUnCaracter">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
7
Unidad_04_DTD_XSD/XSD/xml-xsd-10-choice.xml
Normal file
7
Unidad_04_DTD_XSD/XSD/xml-xsd-10-choice.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-10-choice.xsd">
|
||||
<nombre>Hulk</nombre>
|
||||
<!-- <edad>86</edad>
|
||||
<bando>Buenos</bando> -->
|
||||
</superheroe>
|
||||
13
Unidad_04_DTD_XSD/XSD/xml-xsd-10-choice.xsd
Normal file
13
Unidad_04_DTD_XSD/XSD/xml-xsd-10-choice.xsd
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="caracSuperheroe"/>
|
||||
|
||||
<xs:complexType name="caracSuperheroe">
|
||||
<xs:choice>
|
||||
<xs:element name="nombre" minOccurs="0" maxOccurs="unbounded" type="xs:string" />
|
||||
<xs:element name="edad" type="xs:string" />
|
||||
<xs:element name="bando" type="xs:string" />
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
||||
7
Unidad_04_DTD_XSD/XSD/xml-xsd-11-all.xml
Normal file
7
Unidad_04_DTD_XSD/XSD/xml-xsd-11-all.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-11-all.xsd">
|
||||
<bando>Buenos</bando>
|
||||
<nombre>Hulk</nombre>
|
||||
<edad>86</edad>
|
||||
</superheroe>
|
||||
13
Unidad_04_DTD_XSD/XSD/xml-xsd-11-all.xsd
Normal file
13
Unidad_04_DTD_XSD/XSD/xml-xsd-11-all.xsd
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="caracSuperheroe"/>
|
||||
|
||||
<xs:complexType name="caracSuperheroe">
|
||||
<xs:all>
|
||||
<xs:element name="nombre" type="xs:string" />
|
||||
<xs:element name="edad" type="xs:string" />
|
||||
<xs:element name="bando" type="xs:string" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
||||
3
Unidad_04_DTD_XSD/XSD/xml-xsd-12-elemento-vacio.xml
Normal file
3
Unidad_04_DTD_XSD/XSD/xml-xsd-12-elemento-vacio.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-12-elemento-vacio.xsd"></superheroe>
|
||||
6
Unidad_04_DTD_XSD/XSD/xml-xsd-12-elemento-vacio.xsd
Normal file
6
Unidad_04_DTD_XSD/XSD/xml-xsd-12-elemento-vacio.xsd
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe">
|
||||
<xs:complexType />
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-13-elemento-contenido-texto-y-atributos.xsd"
|
||||
nombre="Hulk" edad="86">Buen superheroe</superheroe>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="nombre" type="xs:string" />
|
||||
<xs:attribute name="edad" type="xs:positiveInteger" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-13-elemento-vacio-con-atributos.xsd"
|
||||
nombre="Hulk" edad="86"></superheroe>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="nombre" type="xs:string" />
|
||||
<xs:attribute name="edad" type="xs:positiveInteger" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-14-elemento-contenido-texto-y-atributos.xsd"
|
||||
nombre="Hulk" edad="86">Buen</superheroe>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="mixtoConValidacion"/>
|
||||
|
||||
<xs:complexType name="mixtoConValidacion">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="minimo4Caracteres">
|
||||
<xs:attribute name="nombre" type="xs:string" />
|
||||
<xs:attribute name="edad" type="xs:positiveInteger" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
<xs:simpleType name="minimo4Caracteres">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="4"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="nombre" type="xs:string"/>
|
||||
<xs:element name="amigo" type="amigosSuperheroe" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:complexType name="amigosSuperheroe">
|
||||
<xs:sequence>
|
||||
<xs:element name="amigoDeSuperheroe" type="textoNoVacio"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="textoNoVacio">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-15-elemento-con-descendientes.xsd">
|
||||
<nombre>Hulk</nombre>
|
||||
<amigo>
|
||||
<amigoDeSuperheroe>Thor</amigoDeSuperheroe>
|
||||
</amigo>
|
||||
<amigo>
|
||||
<amigoDeSuperheroe>Hulk</amigoDeSuperheroe>
|
||||
</amigo>
|
||||
<amigo>
|
||||
<amigoDeSuperheroe>Bulleye</amigoDeSuperheroe>
|
||||
</amigo>
|
||||
</superheroe>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="nombre" type="xs:string"/>
|
||||
<xs:element name="amigo" type="textoNoVacio" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:all>
|
||||
<xs:attribute name="edad" type="textoNoVacio"/>
|
||||
<xs:attribute name="color" type="color"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:simpleType name="textoNoVacio">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="color">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="rojo"/>
|
||||
<xs:enumeration value="verde"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-16-elemento-atributos-y-descendientes.xsd"
|
||||
edad="86" color="verde">
|
||||
<nombre>Hulk</nombre>
|
||||
<amigo>Thor</amigo>
|
||||
</superheroe>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-17-elemento-contenido-mixto.xsd">
|
||||
Este texto no se podría poner sin especificar contenido mixto
|
||||
<!-- <nombre>Hulk</nombre> -->
|
||||
<amigo>Thor</amigo>
|
||||
<amigo>Iron Man</amigo>
|
||||
<amigo>Bulleye</amigo>
|
||||
</superheroe>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:choice>
|
||||
<xs:element name="nombre" type="xs:string"/>
|
||||
<xs:element name="amigo" type="textoNoVacio" minOccurs="2" maxOccurs="unbounded"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:simpleType name="textoNoVacio">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-18-elemento-con-atributos-y-contenido-mixto.xsd"
|
||||
edad="86" color="verde">Este texto no se podría poner sin especificar contenido mixto
|
||||
<!-- <nombre>Hulk</nombre> -->
|
||||
<amigo>Thor</amigo>
|
||||
<amigo>Iron Man</amigo>
|
||||
<amigo>Bulleye</amigo>
|
||||
</superheroe>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:choice>
|
||||
<xs:element name="nombre" type="xs:string"/>
|
||||
<xs:element name="amigo" type="xs:string" minOccurs="2" maxOccurs="unbounded"/>
|
||||
</xs:choice>
|
||||
<xs:attribute name="edad" type="xs:string"/>
|
||||
<xs:attribute name="color" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<superheroe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="xml-xsd-19-derivacion-tipos-complejos.xsd"
|
||||
edad="86" color="verde">
|
||||
Este texto no se podría poner sin especificar contenido mixto
|
||||
<nombre>Hulk</nombre>
|
||||
<amigo>Thor</amigo>
|
||||
<poderPrincipal>Fuerza</poderPrincipal>
|
||||
</superheroe>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="superheroe" type="superheroeDerivado">
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType mixed="true" name="superheroePrimitivo">
|
||||
<xs:sequence>
|
||||
<xs:element name="nombre" type="xs:string"/>
|
||||
<xs:element name="amigo" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="superheroeDerivado">
|
||||
<xs:complexContent mixed="true">
|
||||
<xs:extension base="superheroePrimitivo">
|
||||
<xs:sequence>
|
||||
<xs:element name="poderPrincipal" type="xs:string" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="edad" type="xs:string"/>
|
||||
<xs:attribute name="color" type="xs:string"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
||||
Reference in New Issue
Block a user