Saltar la navegación

8.3 Elemento-atributos-subelementos

Sintaxis para elemento con atributos y con sub-elementos

<xsd:element name="alumno"> 
	<xsd:complexType> 
		<xsd:sequence> 
			<xsd:element ref="nombre"/> 
			<xsd:element ref="apellido"/> 
		</xsd:sequence> 
		<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"/>