Spaces:
Sleeping
Sleeping
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="attribute"> | |
<xs:complexType> | |
<xs:simpleContent> | |
<xs:extension base="xs:string"> | |
<xs:attribute type="xs:string" name="name" use="required"/> | |
<xs:attribute name="type" use="optional"> | |
<xs:simpleType> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="string"/> | |
<xs:enumeration value="time"/> | |
<xs:enumeration value="integer"/> | |
<xs:enumeration value="float"/> | |
<xs:enumeration value="boolean"/> | |
</xs:restriction> | |
</xs:simpleType> | |
</xs:attribute> | |
<xs:attribute type="xs:dateTime" name="time" use="optional"/> | |
</xs:extension> | |
</xs:simpleContent> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="attributes"> | |
<xs:complexType mixed="true"> | |
<xs:sequence> | |
<xs:element ref="attribute" maxOccurs="unbounded" minOccurs="0"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="object-type"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="attributes"/> | |
</xs:sequence> | |
<xs:attribute type="xs:string" name="name" use="required"/> | |
</xs:complexType> | |
<xs:key name="objectTypeAttributeKey"> | |
<xs:selector xpath="attributes/attribute"/> | |
<xs:field xpath="@name"/> | |
</xs:key> | |
</xs:element> | |
<xs:element name="event-type"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="attributes"/> | |
</xs:sequence> | |
<xs:attribute type="xs:string" name="name" use="required"/> | |
</xs:complexType> | |
<xs:key name="eventTypeAttributeKey"> | |
<xs:selector xpath="attributes/attribute"/> | |
<xs:field xpath="@name"/> | |
</xs:key> | |
</xs:element> | |
<xs:element name="object"> | |
<xs:complexType mixed="true"> | |
<xs:sequence> | |
<xs:element ref="attributes" minOccurs="0"/> | |
<xs:element ref="objects" minOccurs="0"/> | |
</xs:sequence> | |
<xs:attribute type="xs:string" name="object-id" use="optional"/> | |
<xs:attribute type="xs:string" name="qualifier" use="optional"/> | |
<xs:attribute type="xs:string" name="id" use="optional"/> | |
<xs:attribute type="xs:string" name="type" use="required"/> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="objects"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="object" maxOccurs="unbounded" minOccurs="0"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="event"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="attributes"/> | |
<xs:element ref="objects"/> | |
</xs:sequence> | |
<xs:attribute type="xs:string" name="id" use="required"/> | |
<xs:attribute type="xs:string" name="type" use="required"/> | |
<xs:attribute type="xs:dateTime" name="time" use="required"/> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="object-types"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="object-type" maxOccurs="unbounded" minOccurs="0"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="event-types"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="event-type" maxOccurs="unbounded" minOccurs="0"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="events"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="event" maxOccurs="unbounded" minOccurs="0"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="log"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="object-types"/> | |
<xs:element ref="event-types"/> | |
<xs:element ref="objects"/> | |
<xs:element ref="events"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:key name="objectTypeKey"> | |
<xs:selector xpath="object-types/object-type"/> | |
<xs:field xpath="@name"/> | |
</xs:key> | |
<xs:key name="objectKey"> | |
<xs:selector xpath="objects/object"/> | |
<xs:field xpath="@id"/> | |
</xs:key> | |
<xs:key name="eventTypeKey"> | |
<xs:selector xpath="event-types/event-type"/> | |
<xs:field xpath="@name"/> | |
</xs:key> | |
<xs:key name="eventKey"> | |
<xs:selector xpath="events/event"/> | |
<xs:field xpath="@id"/> | |
</xs:key> | |
<xs:keyref name="objectTypeRef" refer="objectTypeKey"> | |
<xs:selector xpath="objects/object"/> | |
<xs:field xpath="@type"/> | |
</xs:keyref> | |
<xs:keyref name="eventTypeRef" refer="eventTypeKey"> | |
<xs:selector xpath="events/event"/> | |
<xs:field xpath="@type"/> | |
</xs:keyref> | |
<xs:keyref name="objectObjectRef" refer="objectKey"> | |
<xs:selector xpath="objects/object/objects/object"/> | |
<xs:field xpath="@object-id"/> | |
</xs:keyref> | |
<xs:keyref name="eventObjectRef" refer="objectKey"> | |
<xs:selector xpath="events/event/objects/object"/> | |
<xs:field xpath="@object-id"/> | |
</xs:keyref> | |
<xs:keyref name="objectAttributeRef" refer="objectTypeAttributeKey"> | |
<xs:selector xpath="objects/object/attributes/attribute"/> | |
<xs:field xpath="@name"/> | |
</xs:keyref> | |
<xs:keyref name="eventAttributeRef" refer="eventTypeAttributeKey"> | |
<xs:selector xpath="events/event/attributes/attribute"/> | |
<xs:field xpath="@name"/> | |
</xs:keyref> | |
</xs:element> | |
</xs:schema> | |