From 42ecb171a4f7b10f96f6fc3aa57870ac633e0997 Mon Sep 17 00:00:00 2001
From: reinaortega <miguelangel.reinaortega@etsi.org>
Date: Mon, 11 May 2020 14:29:53 +0200
Subject: [PATCH] XSD v2_14_0 baseline

---
 CDT-commonTypes.xsd        | 16 ++++++++++++++++
 CDT-enumerationTypes.xsd   |  2 ++
 CDT-locationPolicy.xsd     |  4 ++--
 CDT-request.xsd            |  2 +-
 CDT-timeSeriesInstance.xsd |  2 ++
 CDT-token.xsd              | 11 ++---------
 6 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/CDT-commonTypes.xsd b/CDT-commonTypes.xsd
index 733b8c3..55de5d3 100644
--- a/CDT-commonTypes.xsd
+++ b/CDT-commonTypes.xsd
@@ -392,6 +392,22 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 		</xs:restriction>
 	</xs:simpleType>
 	
+	<xs:simpleType name="locationTargetID">
+		<xs:union>
+			<xs:simpleType>
+				<xs:restriction base='m2m:nodeID' />
+			</xs:simpleType>
+			<xs:simpleType>
+				<xs:restriction base='m2m:externalID' />
+			</xs:simpleType>
+			<xs:simpleType>
+				<xs:restriction base="xs:string" >
+					<xs:pattern value="([0-9]*)" />
+				</xs:restriction>
+			</xs:simpleType>
+		</xs:union>
+	</xs:simpleType>
+	
 	<!--********************** -->
 	<!-- oneM2M Complex Types -->
 	<!--********************** -->
diff --git a/CDT-enumerationTypes.xsd b/CDT-enumerationTypes.xsd
index 2f0bffc..06f2b13 100644
--- a/CDT-enumerationTypes.xsd
+++ b/CDT-enumerationTypes.xsd
@@ -696,6 +696,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 			<xs:documentation>This is used for [software], [firmware] resources.</xs:documentation>
 		</xs:annotation>
 		<xs:restriction base="xs:integer">
+			<!-- Uninitialzed -->
+			<xs:enumeration value="0" />
 			<!-- Successful -->
 			<xs:enumeration value="1" />
 			<!-- Failure -->
diff --git a/CDT-locationPolicy.xsd b/CDT-locationPolicy.xsd
index 2e24ff1..37d7b5f 100644
--- a/CDT-locationPolicy.xsd
+++ b/CDT-locationPolicy.xsd
@@ -39,7 +39,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<!-- Resource Specific Attributes -->
 						<xs:element name="locationSource" type="m2m:locationSource" />
 						<xs:element name="locationUpdatePeriod" type="m2m:listOfDuration" minOccurs="0" />
-						<xs:element name="locationTargetID" type="m2m:nodeID" minOccurs="0" />
+						<xs:element name="locationTargetID" type="m2m:locationTargetID" minOccurs="0" />
 						<xs:element name="locationServer" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="locationContainerID" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="locationContainerName" type="xs:string" minOccurs="0" />
@@ -67,7 +67,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<!-- Resource Specific Attributes -->
 						<xs:element name="locationSource" type="m2m:locationSource" minOccurs="0" />
 						<xs:element name="locationUpdatePeriod" type="m2m:listOfDuration" minOccurs="0" />
-						<xs:element name="locationTargetID" type="m2m:nodeID" minOccurs="0" />
+						<xs:element name="locationTargetID" type="m2m:locationTargetID" minOccurs="0" />
 						<xs:element name="locationServer" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="locationContainerID" type="xs:anyURI" minOccurs="0" />
 						<xs:element name="locationContainerName" type="xs:string" minOccurs="0" />
diff --git a/CDT-request.xsd b/CDT-request.xsd
index cfaafd1..7c5e31f 100644
--- a/CDT-request.xsd
+++ b/CDT-request.xsd
@@ -44,7 +44,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<xs:element name="originator" type="m2m:ID" />
 						<xs:element name="requestID" type="m2m:requestID" />
 						<xs:element name="metaInformation" type="m2m:metaInformation" />
-						<xs:element name="primitiveContent" type="m2m:primitiveContent" />
+						<xs:element name="primitiveContent" type="m2m:primitiveContent" minOccurs="0" />
 						<xs:element name="requestStatus" type="m2m:requestStatus" />
 						<xs:element name="operationResult" type="m2m:operationResult" />
 
diff --git a/CDT-timeSeriesInstance.xsd b/CDT-timeSeriesInstance.xsd
index 75b973d..aba0689 100644
--- a/CDT-timeSeriesInstance.xsd
+++ b/CDT-timeSeriesInstance.xsd
@@ -37,6 +37,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<xs:element name="dataGenerationTime" type="m2m:absRelTimestamp" />
 						<xs:element name="content" type="xs:anySimpleType" />
 						<xs:element name="sequenceNr" type="xs:nonNegativeInteger" minOccurs="0" />
+						<xs:element name="contentSize" type="xs:nonNegativeInteger" />
 
 						<!-- Child Resources -->
 
@@ -54,6 +55,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<xs:element name="dataGenerationTime" type="m2m:absRelTimestamp" minOccurs="0" />
 						<xs:element name="content" type="xs:anySimpleType" minOccurs="0" />
 						<xs:element name="sequenceNr" type="xs:nonNegativeInteger" minOccurs="0" />
+						<xs:element name="contentSize" type="xs:nonNegativeInteger" minOccurs="0" />
 
 						<!-- Child Resources -->
 
diff --git a/CDT-token.xsd b/CDT-token.xsd
index bc09fd5..2ea3a98 100644
--- a/CDT-token.xsd
+++ b/CDT-token.xsd
@@ -42,15 +42,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 						<xs:element name="notBefore" type="m2m:timestamp" />
 						<xs:element name="notAfter" type="m2m:timestamp" minOccurs="0"/>
 						<xs:element name="tokenName" type="xs:string" minOccurs="0" />
-						<xs:element name="audience" type="m2m:listOfM2MID" minOccurs="0" /> 
-						
-						<xs:element name="permissions" minOccurs="0">      
-							<xs:complexType>							
-									<xs:sequence> 
-										<xs:element name="permission" type="m2m:tokenPermission" /> 
-									</xs:sequence> 												
-							</xs:complexType>
-						</xs:element>
+						<xs:element name="audience" type="m2m:listOfM2MID" minOccurs="0" /> 						
+						<xs:element name="permissions" type="m2m:tokenPermissions" minOccurs="0" />      
 						<xs:element name="extension" type="xs:string" minOccurs="0" />
 
 						<!-- Child Resources -->
-- 
GitLab