Saltar la navegación

8.1 Elemento-atributos

Sintaxis para elemento con atributos y vacío

fichero.dtd

<!ELEMENT alumno EMPTY> 
<!ATTLIST alumno attribute1 CDATA #IMPLIED> 
<!ATTLIST alumno attribute5 CDATA #IMPLIED>

fichero.xsd

<xsd:element name="alumno"> 
	<xsd:complexType> 
		<xsd:attribute ref="attribute1"/> 
		<xsd:attribute ref="attribute2"/> 
	</xsd:complexType> 
</xsd:element> 
<xsd:attribute name="attribute1" type="xsd:string"/> 
<xsd:attribute name="attribute2" type="xsd:date"/>