Skip to content
Snippets Groups Projects
Commit c0f533b0 authored by Peter Niblett's avatar Peter Niblett
Browse files

CommonTypes tidyup

parent 886ebe64
No related branches found
No related tags found
No related merge requests found
...@@ -31,10 +31,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR ...@@ -31,10 +31,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<!-- oneM2M Simple Types --> <!-- oneM2M Simple Types -->
<!--********************** --> <!--********************** -->
<!-- TODO: Choose appropriate definitions for the id types (xs:token is placeholder for now) -->
<xs:simpleType name="ID"> <xs:simpleType name="ID">
<xs:restriction base="xs:token"> <xs:restriction base="xs:anyURI">
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
...@@ -43,11 +41,13 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR ...@@ -43,11 +41,13 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<!-- TODO: should this allow lower case hex ? -->
<xs:simpleType name="deviceID"> <xs:simpleType name="deviceID">
<xs:restriction base="xs:token"> <xs:restriction base="xs:token">
<xs:pattern <xs:pattern value="urn:dev:ops:[\dABCDEFabcdef]{6}-[\w_%]+-[\w_%]+" />
value="urn:((dev:ops:[\dABCDEF]{6}-[\w_%]+-[\w_%]+)|(dev:os:[\dABCDEF]{6}-[\w_%]+)|(imei:\d{15})|(esn:[\dABCDEF]{8})|(meid:[\dABCDEF]{14}))"></xs:pattern> <xs:pattern value="urn:dev:os:[\dABCDEFabcdef]{6}-[\w_%]+" />
<xs:pattern value="urn:imei:\d{15}" />
<xs:pattern value="urn:esn:[\dABCDEFabcdef]{8}" />
<xs:pattern value="urn:meid:[\dABCDEFabcdef]{14}" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
...@@ -66,18 +66,13 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR ...@@ -66,18 +66,13 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:simpleType name="nhURI"> <xs:simpleType name="nhURI">
<xs:restriction base="xs:anyURI" /> <xs:restriction base="xs:anyURI" />
</xs:simpleType> </xs:simpleType>
<!-- TODO: why is it declared as a ref to a global element like this? --> <xs:simpleType name="acpType">
<xs:complexType name="acpType"> <list itemType="xs:anyURI" />
<xs:sequence> </xs:simpleType>
<xs:element ref="m2m:accessControlPolicyID" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:element name="accessControlPolicyID" type="xs:anyURI" />
<xs:simpleType name="labels"> <xs:simpleType name="labels">
<xs:list itemType="xs:string" /> <xs:list itemType="xs:token" />
</xs:simpleType> </xs:simpleType>
<!-- TODO: this data type is not used in any of the XSD files. It is listed in TS-004 without any given use case --> <!-- TODO: this data type is not used in any of the XSD files. It is listed in TS-004 without any given use case -->
...@@ -106,7 +101,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR ...@@ -106,7 +101,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:simpleType name="listOfEventCatWithDef"> <xs:simpleType name="listOfEventCatWithDef">
<list itemType="m2m:eventCatWithDef" /> <list itemType="m2m:eventCatWithDef" />
</xs:simpleType> </xs:simpleType>
<!-- auxiliary data type required to define "listOflongMin-1" below --> <!-- auxiliary data type required to define "listOflongMin-1" below -->
<xs:simpleType name="longMin-1"> <xs:simpleType name="longMin-1">
<xs:restriction base="xs:long"> <xs:restriction base="xs:long">
...@@ -123,8 +118,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR ...@@ -123,8 +118,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
type xs:long in the range -1, 0, 1, 2 ... . Unit is milliseconds. Value setting of -1 expresses infinity --> type xs:long in the range -1, 0, 1, 2 ... . Unit is milliseconds. Value setting of -1 expresses infinity -->
<xs:simpleType name="listOfMinMax"> <xs:simpleType name="listOfMinMax">
<xs:restriction base="m2m:listOflongMin-1"> <xs:restriction base="m2m:listOflongMin-1">
<xs:minLength value="2" /> <xs:length value="2" />
<xs:maxLength value="2" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
...@@ -141,29 +135,31 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR ...@@ -141,29 +135,31 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:maxLength value="3" /> <xs:maxLength value="3" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<!-- <xs:simpleType name="ipv4"> <!-- m2m:ipv4 and m2m:ipv6 are defined in the CDT-accessControlPolicy file -->
<xs:restriction base="xs:token" />
</xs:simpleType>
<xs:simpleType name="ipv6">
<xs:restriction base="xs:token" />
</xs:simpleType> -->
<xs:simpleType name="pOAList"> <xs:simpleType name="pOAList">
<xs:list itemType="xs:string" /> <xs:list itemType="xs:string" />
</xs:simpleType> </xs:simpleType>
<!--Format is YYYYMMDDThhmmss with no punctuation -->
<xs:simpleType name="timestamp"> <xs:simpleType name="timestamp">
<xs:restriction base="xs:dateTime" /> <xs:restriction base="xs:string">
<xs:pattern value="\d{4}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|30|31)T([01]\d|2[0-3])[0-5]\d[0-5]\d"></xs:pattern>
</xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="typeOfContent"> <xs:simpleType name="typeOfContent">
<xs:restriction base="xs:token" /> <xs:restriction base="xs:string">
</xs:simpleType> <xs:pattern value="[\w/!#$^_.+&amp;\-]+" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="contentInfo"> <xs:simpleType name="contentInfo">
<xs:restriction base="xs:token" /> <xs:restriction base="xs:string">
<xs:pattern value="[\w/!#$^_.+&amp;\-]+(:[0-2])?" />
</xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="scheduleEntry"> <xs:simpleType name="scheduleEntry">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment