<xs:element name="function" minOccurs="1" maxOccurs="1"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="avg"/> <xs:enumeration value="slidingAvg"/> <xs:enumeration value="mean"/> <xs:enumeration value="min"/> <xs:enumeration value="max"/> <xs:enumeration value="count"/> <xs:enumeration value="sum"/> </xs:restriction> </xs:simpleType> </xs:element>
<xs:element name="aggregationTime"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:int"> <xs:attribute name="uom" type="xs:anyURI" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element>
<xs:complexType name="timeAggregationType"> <xs:sequence> <xs:element name="function" minOccurs="1" maxOccurs="1"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="avg"/> <xs:enumeration value="slidingAvg"/> <xs:enumeration value="mean"/> <xs:enumeration value="min"/> <xs:enumeration value="max"/> <xs:enumeration value="count"/> <xs:enumeration value="sum"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="aggregationTime"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:int"> <xs:attribute name="uom" type="xs:anyURI" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType>
<xs:attribute name="uom" type="xs:anyURI" use="required"/>