UT4.7 Tienda de Juegos

Tienda de Juegos
XML Tienda de Juegos
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiendaJuegos SYSTEM "01.dtd">

<tiendaJuegos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="01.xsd">
    <juego idJuego="j1" juegoPrecuela="j4">
        <nombre> Grand Theft Auto 6</nombre>
        <desarrolladora region="Londres"> Rockstar</desarrolladora>
        <fechaLanzamiento>
            <anio>2026</anio>
            <mes>--06</mes>
        </fechaLanzamiento>
        <motorGrafico>
            <rage generacion="9" />
        </motorGrafico>
        <plataforma tipo="consola" />
        <website>https://en.wikipedia.org/wiki/Grand_Theft_Auto_VI</website>
    </juego>
    <juego idJuego="j2">
        <nombre> Resident Evil Reqiuem</nombre>
        <desarrolladora region="Japon"> Capcom</desarrolladora>
        <fechaLanzamiento>
            <anio>2026</anio>
            <mes>--02</mes>
            <dia>---09</dia>
        </fechaLanzamiento>
        <motorGrafico>
            <unreal generacion="5" />
        </motorGrafico>
        <plataforma tipo="consola" />
        <website>https://en.wikipedia.org/wiki/Resident_Evil_Requiem</website>
    </juego>
    <juego idJuego="j3">
        <nombre> God of War </nombre>
        <desarrolladora region="Toronto"> Santa Monica</desarrolladora>
        <fechaLanzamiento>
            <anio>2018</anio>
        </fechaLanzamiento>
        <motorGrafico>
            <unity generacion="3" />
        </motorGrafico>
        <plataforma tipo="consola" />
        <website>https://en.wikipedia.org/wiki/God_of_War_(2018_video_game)</website>
    </juego>
    <juego idJuego="j4">
        <nombre> Grand Theft Auto 5</nombre>
        <desarrolladora region="Londres"> Rockstar</desarrolladora>
        <fechaLanzamiento>
            <anio>2013</anio>
        </fechaLanzamiento>
        <motorGrafico>
            <rage generacion="7" />
        </motorGrafico>
        <plataforma tipo="consola" />
        <website>https://en.wikipedia.org/wiki/Grand_Theft_Auto_V</website>
    </juego>
</tiendaJuegos>
DTD Tienda de Juegos
<!ELEMENT tiendaJuegos (juego)*>
<!ATTLIST tiendaJuegos xmlns:xsi CDATA #IMPLIED
                    xsi:noNamespaceSchemaLocation CDATA #IMPLIED>


<!ELEMENT juego (nombre, desarrolladora, fechaLanzamiento, motorGrafico, plataforma, website)>
<!ATTLIST juego idJuego ID #REQUIRED
                juegoPrecuela IDREF #IMPLIED>

<!ELEMENT nombre (#PCDATA)>

<!ELEMENT desarrolladora (#PCDATA)>
<!ATTLIST desarrolladora region (Japon | Londres | Toronto) "Japon">

<!ELEMENT fechaLanzamiento (anio, mes?,dia?)>
<!ELEMENT anio (#PCDATA)>
<!ELEMENT mes (#PCDATA)>
<!ELEMENT dia (#PCDATA)>

<!ELEMENT motorGrafico (unreal | unity | rage)>
<!ELEMENT unreal EMPTY>
<!ELEMENT unity EMPTY>
<!ELEMENT rage EMPTY>
<!ATTLIST unreal generacion CDATA #REQUIRED>
<!ATTLIST unity generacion CDATA #REQUIRED>
<!ATTLIST rage generacion CDATA #REQUIRED>



<!ELEMENT plataforma EMPTY>
<!ATTLIST plataforma tipo CDATA #FIXED "consola">

<!ELEMENT website (#PCDATA)>
XSD Tienda de Juegos
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="tiendaJuegos">
        <xs:complexType>
            <xs:sequence>
                <xs:annotation>
                    <xs:appinfo>
                        Una tienda de video juegos exclusivamente de consolas
                    </xs:appinfo>
                </xs:annotation>
                <xs:element name="juego" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="nombre" >
                                <xs:simpleType>
                                    <xs:restriction base="xs:string">
                                        <xs:maxLength value="30"/>
                                    </xs:restriction>
                                </xs:simpleType>
                            </xs:element>
                            <xs:element name="desarrolladora">
                                <xs:complexType mixed="true">
                                    <xs:attribute name="region" use="optional">
                                        <xs:simpleType>
                                            <xs:restriction base="xs:string">
                                                <xs:enumeration value="Japon"/>
                                                <xs:enumeration value="Londres"/>
                                                <xs:enumeration value="Toronto"/>
                                            </xs:restriction>
                                        </xs:simpleType>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="fechaLanzamiento">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="anio" type="xs:gYear"/>
                                        <xs:element name="mes" type="xs:gMonth" minOccurs="0"/>
                                        <xs:element name="dia" type="xs:gDay" minOccurs="0"/>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="motorGrafico">
                                <xs:complexType>
                                    <xs:choice>
                                        <xs:element name="unreal">
                                            <xs:complexType>
                                                <xs:attribute name="generacion" use="required" type="xs:integer">
                                                </xs:attribute>
                                            </xs:complexType>
                                        </xs:element>
                                        <xs:element name="unity">
                                            <xs:complexType>
                                                <xs:attribute name="generacion" use="required" type="xs:integer">
                                                </xs:attribute>
                                            </xs:complexType>
                                        </xs:element>
                                        <xs:element name="rage">
                                            <xs:complexType>
                                                <xs:attribute name="generacion" use="required" type="xs:integer">
                                                </xs:attribute>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:choice>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="plataforma">
                                <xs:complexType>
                                    <xs:attribute name="tipo" use="required" type="xs:string">
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="website" type="xs:string"/>
                        </xs:all>
                        <xs:attribute name="idJuego" type="xs:ID" use="required"/>
                        <xs:attribute name="juegoPrecuela" type="xs:IDREF" use="optional"/>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>