From 67df9d5797d55b003461cc4b4efdc4b3d3bb3a2d Mon Sep 17 00:00:00 2001
From: reinaortega <miguelangel.reinaortega@etsi.org>
Date: Mon, 11 May 2020 10:20:19 +0200
Subject: [PATCH] XSD v2_3_0 baseline

---
 CDT-AE.xsd               |  2 ++
 CDT-commonTypes.xsd      | 45 +++++++++++++++++++++++++++++++++-------
 CDT-enumerationTypes.xsd |  9 +++++---
 CDT-group.xsd            |  8 +++----
 CDT-notification.xsd     |  1 +
 CDT-requestPrimitive.xsd |  4 +---
 6 files changed, 51 insertions(+), 18 deletions(-)

diff --git a/CDT-AE.xsd b/CDT-AE.xsd
index 4f9759f..8e0b001 100644
--- a/CDT-AE.xsd
+++ b/CDT-AE.xsd
@@ -48,6 +48,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<xs:element name="ontologyRef" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="nodeLink" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="requestReachability" type="xs:boolean" />
+						<xs:element name="contentSerialization" type="m2m:serializations" minOccurs="0" />
 
 						<!-- Child Resources -->
 						<xs:choice minOccurs="0" maxOccurs="1">
@@ -81,6 +82,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<xs:element name="ontologyRef" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="nodeLink" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="requestReachability" type="xs:boolean" minOccurs="0" />
+						<xs:element name="contentSerialization" type="m2m:serializations" minOccurs="0" />
 
 						<!-- Child Resources -->
 						<xs:choice minOccurs="0" maxOccurs="1">
diff --git a/CDT-commonTypes.xsd b/CDT-commonTypes.xsd
index da96676..a1bc458 100644
--- a/CDT-commonTypes.xsd
+++ b/CDT-commonTypes.xsd
@@ -136,10 +136,10 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 		</xs:restriction> 
 	</xs:simpleType>
 
-    <!--Format is YYYYMMDDThhmmss with no punctuation -->
+	<!--Format is YYYYMMDDThhmmss,ssssss with optional up to 6 digits of fractional seconds -->
 	<xs:simpleType name="timestamp">
 		<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: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(,\d{1,6})?"></xs:pattern>
 		</xs:restriction>
 	</xs:simpleType>
 	
@@ -163,6 +163,26 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
             <xs:pattern value="[\w/!#$^_.+&amp;\-]+" />
         </xs:restriction>
     </xs:simpleType>
+	
+	
+	<!-- auxiliary data type required to define "serializations" below -->
+	<xs:simpleType name="permittedMediaTypes"> 
+		<xs:restriction base="m2m:typeOfContent">
+			<xs:enumeration value="application/xml" />
+			<xs:enumeration value="application/json" />
+		</xs:restriction>
+	</xs:simpleType> 
+	
+	<!-- "serializations" data type is a list of permitted media types as defined above -->
+	<xs:simpleType name="serializations"> 
+		<xs:restriction>
+			<xs:simpleType>
+				<xs:list itemType="m2m:permittedMediaTypes" />
+			</xs:simpleType>
+			<xs:minLength value="1" />
+		</xs:restriction>
+	</xs:simpleType> 
+	
 
 	<xs:simpleType name="contentInfo">
 		<xs:restriction base="xs:string">
@@ -454,12 +474,21 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 		</xs:simpleContent>
 	</xs:complexType>
 
-    <xs:complexType name="responseTypeInfo">
-        <xs:sequence>
-            <xs:element name="responseTypeValue" type="m2m:responseType" />
-            <xs:element name="notificationURI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded" />
-        </xs:sequence>
-    </xs:complexType>
+	<xs:complexType name="responseTypeInfo">
+		<xs:sequence>
+			<xs:element name="responseTypeValue" type="m2m:responseType" />
+			<xs:element name="notificationURI">
+				<xs:simpleType>
+					<xs:restriction> 
+						<xs:simpleType> 
+							<xs:list itemType="xs:anyURI" /> 
+						</xs:simpleType> 
+						<xs:minLength value="0" /> 
+					</xs:restriction> 
+				</xs:simpleType>
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
     
     <!-- m2m:rateLimit is in the Subscription xsd file -->
 
diff --git a/CDT-enumerationTypes.xsd b/CDT-enumerationTypes.xsd
index 4b65c8c..78dc687 100644
--- a/CDT-enumerationTypes.xsd
+++ b/CDT-enumerationTypes.xsd
@@ -256,7 +256,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
             <!-- NO_PRIVILEGE              -->
             <xs:enumeration value="5105" />            
             <!-- ALREADY_EXISTS            -->
-            <xs:enumeration value="5106" />            
+            <xs:enumeration value="5106" />    
             <!-- TARGET_NOT_SUBSCRIBABLE   -->
             <xs:enumeration value="5203" />            
             <!-- SUBSCRIPTION_VERIFICATION_INITIATION_FAILED   -->
@@ -264,7 +264,9 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
             <!-- SUBSCRIPTION_HOST_HAS_NO_PRIVILEGE     -->
             <xs:enumeration value="5205" />            
             <!-- NON_BLOCKING_REQUEST_NOT_SUPPORTED     -->
-            <xs:enumeration value="5206" />            
+            <xs:enumeration value="5206" />        
+			<!-- NOT_ACCEPTABLE                         -->
+			<xs:enumeration value="5207" />
             <!-- EXTERNAL_OBJECT_NOT_REACHABLE          -->
             <xs:enumeration value="6003" />              
             <!-- EXTERNAL_OBJECT_NOT_FOUND              -->
@@ -533,7 +535,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 
 	<xs:simpleType name="notificationEventType">
 		<xs:annotation>
-			<xs:documentation>Used in the notificationEventType element of eventNotificationCriteria attribute of subscruiption resource</xs:documentation>
+			<xs:documentation>Used in the notificationEventType element of eventNotificationCriteria attribute of subscription resource 
+				and in the Notification data object</xs:documentation>
 		</xs:annotation>
 		<xs:restriction base="xs:integer">
 			<!-- Update of Resource -->
diff --git a/CDT-group.xsd b/CDT-group.xsd
index 7437067..d2ad25a 100644
--- a/CDT-group.xsd
+++ b/CDT-group.xsd
@@ -39,8 +39,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 					<xs:sequence>					
                         <xs:element name="creator" type="m2m:ID" minOccurs="0" />					
 						<xs:element name="memberType" type="m2m:memberType" />
-						<xs:element name="currentNrOfMembers" type="xs:nonNegativeInteger" />
-						<xs:element name="maxNrOfMembers" type="xs:nonNegativeInteger" />
+						<xs:element name="currentNrOfMembers" type="xs:positiveInteger" />
+						<xs:element name="maxNrOfMembers" type="xs:positiveInteger" />
 						<xs:element name="memberIDs" type="m2m:listOfURIs" />
 						<xs:element name="membersAccessControlPolicyIDs" type="m2m:listOfURIs" minOccurs="0" />
 						<xs:element name="memberTypeValidated" type="xs:boolean" />
@@ -68,8 +68,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 					<!-- Resource Specific Attributes -->
 					<xs:sequence>
 						<xs:element name="memberType" type="m2m:memberType" minOccurs="0" />
-						<xs:element name="currentNrOfMembers" type="xs:nonNegativeInteger" minOccurs="0" />
-						<xs:element name="maxNrOfMembers" type="xs:nonNegativeInteger" minOccurs="0" />
+						<xs:element name="currentNrOfMembers" type="xs:positiveInteger" minOccurs="0" />
+						<xs:element name="maxNrOfMembers" type="xs:positiveInteger" minOccurs="0" />
 						<xs:element name="memberIDs" type="m2m:listOfURIs" minOccurs="0" />
 						<xs:element name="membersAccessControlPolicyIDs" type="m2m:listOfURIs" minOccurs="0" />
 						<xs:element name="memberTypeValidated" type="xs:boolean" minOccurs="0" />
diff --git a/CDT-notification.xsd b/CDT-notification.xsd
index 635c479..9d98a20 100644
--- a/CDT-notification.xsd
+++ b/CDT-notification.xsd
@@ -52,6 +52,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
                                                </xs:sequence>
                                          </xs:complexType>
                                       </xs:element>
+                                      <xs:element name="notificationEventType" type="m2m:notificationEventType" minOccurs="0"/>
                                 </xs:sequence>
                             </xs:complexType>
                         </xs:element>                      
diff --git a/CDT-requestPrimitive.xsd b/CDT-requestPrimitive.xsd
index 32a5e88..bb92ccb 100644
--- a/CDT-requestPrimitive.xsd
+++ b/CDT-requestPrimitive.xsd
@@ -38,13 +38,11 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
           <!-- parameter "To" -->
           <xs:element name="to" type="xs:anyURI" minOccurs="1"/>
           <!-- parameter "From" -->
-          <xs:element name="from" type="m2m:ID" minOccurs="1"/>
+          <xs:element name="from" type="m2m:ID" minOccurs="0"/>
           <!-- parameter "Request Identifier" -->
           <xs:element name="requestIdentifier" type="m2m:requestID" minOccurs="1"/> 
           <!-- parameter "ResourceType" -->
           <xs:element name="resourceType" type="m2m:resourceType" minOccurs="0"/>
-          <!-- parameter "Name" -->
-          <xs:element name="name" type="xs:NCName" minOccurs="0"/>
           <!-- parameter "Content" -->
           <xs:element name="primitiveContent" type="m2m:primitiveContent" minOccurs="0"/> 
           <!-- parameter "Role" -->
-- 
GitLab