mirror of
https://gitlab.com/tutorial-java-rafa-munoz/tutorial-java-2024-25/LMSGI-2024-25.git
synced 2025-11-09 09:57:39 +01:00
DTD solved test (tortillas)
This commit is contained in:
20
Unidad_04_DTD_XSD/DTD/exámenes antiguos/2018/tortillas.dtd
Normal file
20
Unidad_04_DTD_XSD/DTD/exámenes antiguos/2018/tortillas.dtd
Normal file
@@ -0,0 +1,20 @@
|
||||
<!ENTITY % atributoCodigoID "codigo ID #IMPLIED">
|
||||
<!ELEMENT tortillas (local*, tortilla*)>
|
||||
<!ELEMENT local (#PCDATA | localidad)*>
|
||||
<!ATTLIST local cantidad (tapa | media | entera) "entera">
|
||||
<!ELEMENT localidad EMPTY>
|
||||
<!ATTLIST localidad nombre CDATA #REQUIRED
|
||||
%atributoCodigoID;
|
||||
comarca CDATA #FIXED "Subbética">
|
||||
<!ELEMENT tortilla (ingredientes, puntuacion?, opinion+)>
|
||||
<!ELEMENT puntuacion (#PCDATA)>
|
||||
<!ELEMENT opinion (#PCDATA)>
|
||||
<!ELEMENT ingredientes (patatas, huevo, (cebolla | pimientos))>
|
||||
<!ELEMENT patatas EMPTY>
|
||||
<!ELEMENT huevo EMPTY>
|
||||
<!ELEMENT cebolla EMPTY>
|
||||
<!ELEMENT pimientos EMPTY>
|
||||
<!ATTLIST tortilla locales IDREFS #REQUIRED
|
||||
localPreferido IDREF #IMPLIED
|
||||
%atributoCodigoID;>
|
||||
<!ENTITY estrella "Estrella Galicia">
|
||||
23
Unidad_04_DTD_XSD/DTD/exámenes antiguos/2018/tortillas.xml
Normal file
23
Unidad_04_DTD_XSD/DTD/exámenes antiguos/2018/tortillas.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE tortillas SYSTEM "tortillas.dtd">
|
||||
<tortillas>
|
||||
<local cantidad="tapa">Bar Manolo - Tiene &estrella;
|
||||
<localidad nombre="Moriles" codigo="Bar_Manolo"
|
||||
comarca="Subbética" />
|
||||
</local>
|
||||
<local cantidad="entera">Bar Pepe
|
||||
<localidad nombre="Lucena" codigo="Bar_Pepe"
|
||||
comarca="Subbética" />
|
||||
</local>
|
||||
<tortilla locales="Bar_Manolo Bar_Pepe" localPreferido="Bar_Pepe"
|
||||
codigo="tortilla_1">
|
||||
<ingredientes>
|
||||
<patatas/>
|
||||
<huevo/>
|
||||
<cebolla/>
|
||||
</ingredientes>
|
||||
<puntuacion>9</puntuacion>
|
||||
<opinion>Es estupenda</opinion>
|
||||
<opinion>Es horrible</opinion>
|
||||
</tortilla>
|
||||
</tortillas>
|
||||
Reference in New Issue
Block a user