<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ns="http://meinMuseum.de" targetNamespace="http://meinMuseum.de"
elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1">
<xs:simpleType name="RestrictedString4to20">
<xs:restriction base="xs:string">
<xs:minLength value="4" />
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Autor">
<xs:simpleContent>
<xs:extension base="ns:RestrictedString4to20">
<xs:attribute name="id" type="xs:positiveInteger" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="EvenInteger">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0" />
<xs:assertion test="$value mod 2 = 0" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="HexBinary">
<xs:restriction base="xs:string">
<xs:pattern value="W[1-9a-f]+[0-9a-f]*" />
<xs:length value="10" />
</xs:restriction>
</xs:simpleType>
<xs:element name="museum">
<xs:complexType>
<xs:sequence>
<xs:element name="werk" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Buch" />
<xs:enumeration value="Multimedia" />
<xs:enumeration value="Zeitung" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="autor" maxOccurs="unbounded"
minOccurs="0" type="ns:Autor" />
<xs:element name="jahre" maxOccurs="unbounded">
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="-100" />
<xs:maxInclusive value="2012" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AB" />
<xs:enumeration value="BC" />
<xs:enumeration value="after2000" />
<xs:enumeration value="unknown" />
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:element>
<xs:element name="referenz" maxOccurs="unbounded"
minOccurs="0">
<xs:complexType>
<xs:attribute name="refid" type="ns:HexBinary"
use="required" />
</xs:complexType>
</xs:element>
<xs:element name="bearbeiter" type="ns:EvenInteger" />
</xs:sequence>
<xs:attribute name="bezeichner" type="ns:HexBinary"
use="required" />
<xs:attribute name="erfassung" use="optional" type="xs:date" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>