<?xml version="1.0" encoding="UTF-8"?> | |
<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/complexTypes.xsd,v 1.1 2001/11/26 13:27:07 vdv Exp $ --> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:complexType name="elementWithID"> | |
<xs:attribute ref="id"/> | |
</xs:complexType> | |
<xs:complexType name="bookTmp"> | |
<xs:complexContent> | |
<xs:extension base="elementWithID"> | |
<xs:sequence> | |
<xs:element ref="isbn"/> | |
<xs:element ref="title"/> | |
<xs:element ref="author" minOccurs="0" maxOccurs="unbounded"/> | |
<xs:element ref="character" minOccurs="0" maxOccurs="unbounded"/> | |
</xs:sequence> | |
<xs:attribute ref="available"/> | |
</xs:extension> | |
</xs:complexContent> | |
</xs:complexType> | |
<xs:complexType name="personType"> | |
<xs:complexContent> | |
<xs:extension base="elementWithID"> | |
<xs:sequence> | |
<xs:element ref="name"/> | |
<xs:element ref="born"/> | |
<xs:element ref="dead" minOccurs="0"/> | |
<xs:element ref="qualification" minOccurs="0"/> | |
</xs:sequence> | |
</xs:extension> | |
</xs:complexContent> | |
</xs:complexType> | |
</xs:schema> |