XML-Schema: Allgemeines
Beispiel zu Occurrence indicators:
<xs:element name="kommentar" type ="xs:string"
minOccurs="0" max Occurs"unbounded"/>XML-Schema: Allgemeines
Beispiel zu Order indicators:
<xs:complexType name="person"> <xs:all> <xs:element name="name" type="xs:string"/> <xs:element name="geschlecht" type="geschlecht"/> </xs:all> </xs:complexType>
Zweites Beispiel:
<xs:complexType name=film">
<xs:sequence>
<xs:element name="titel" type="xs:string" />
<xs:element name="regisseur" type="person" />
...
</xs:sequence>
</xs:complexType>XML-Schema: Allgemeines
Basis-Dokument
<?xml version="1.0"?> <xs:schema xmlns:xs="http:/...> </xs:schema>
XML-Schema: Allgemeines
Elemente
<xs:element name="xxx" type="yyy"/>
XML-Schema: Allgemeines
Simple Type
<xs:element name="cover" type="coverType"/> <xs:simpleType name="coverType"> <xs:restriction base="xs:string"> <xs:enumeration value="hardcover"/> <xs:enumeration value="hardcover"/> <xs:restriction> </xs:simpleType>
XML-Schema: Allgemeines
Complex Type
<xs:element name="e-Book" type="bookType"/> <xs:element name="book" type="bookType"/> <xs:complexType name="bookType> <xs:sequence> <xs:element name="title" type="xs:string"/> <xs:element name="price" type="xs:decimal"/> <xs:sequence> <xs:attribute name="lang" type="is:langType" default="en"/> </xs:complexType>