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
27 lines
813 B
XML
27 lines
813 B
XML
<?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>
|