From 901b45c362fb2f5227cae7e0cad635fc5d72e7d3 Mon Sep 17 00:00:00 2001
From: ankraft <an.kraft@googlemail.com>
Date: Mon, 21 Jan 2019 17:31:10 +0100
Subject: [PATCH] Prepared for 4.0 transition.

---
 SDT/schema4.0/build.xml                    |  2 +-
 SDT/schema4.0/etc/dal.rnc                  |  2 +-
 SDT/schema4.0/etc/domain.rnc               |  2 +-
 SDT/schema4.0/etc/schema.xmlns             |  4 ++--
 SDT/schema4.0/etc/schemas.xml              |  2 +-
 SDT/schema4.0/test/EchonetLiteExamples.xml | 14 +++++++++-----
 SDT/schema4.0/test/dal-core.xml            |  2 +-
 SDT/schema4.0/test/dal-eg.xml              |  2 +-
 SDT/schema4.0/test/example1.SDT.xml        |  2 +-
 SDT/schema4.0/test/example2.SDT.xml        |  2 +-
 SDT/schema4.0/test/example3.SDT.xml        |  2 +-
 SDT/schema4.0/test/mseeb.xml               |  2 +-
 12 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/SDT/schema4.0/build.xml b/SDT/schema4.0/build.xml
index ca74f2f..3f5101f 100644
--- a/SDT/schema4.0/build.xml
+++ b/SDT/schema4.0/build.xml
@@ -92,7 +92,7 @@
     <schemavalidate warn="true">
       <fileset dir="${basedir}/test" includes="*.xml"/>
       <attribute name="http://apache.org/xml/features/xinclude" value="true"/>
-      <schema namespace="http://homegatewayinitiative.org/xml/dal/3.0"
+      <schema namespace="http://homegatewayinitiative.org/xml/dal/4.0"
 	      file="${path.src}/domain.xsd" />
       <schema namespace="http://www.w3.org/2001/XInclude"
 	      file="${basedir}/etc/XInclude.xsd" />
diff --git a/SDT/schema4.0/etc/dal.rnc b/SDT/schema4.0/etc/dal.rnc
index 728c734..e9c05ee 100644
--- a/SDT/schema4.0/etc/dal.rnc
+++ b/SDT/schema4.0/etc/dal.rnc
@@ -1,6 +1,6 @@
 
 namespace local = ""
-default namespace xsl = "http://homegatewayinitiative.org/xml/dal/3.0"
+default namespace xsl = "http://homegatewayinitiative.org/xml/dal/4.0"
 namespace xi = "http://www.w3.org/2001/XInclude"
 
 version = "1.0"
diff --git a/SDT/schema4.0/etc/domain.rnc b/SDT/schema4.0/etc/domain.rnc
index 1fdb1f2..6eb024f 100644
--- a/SDT/schema4.0/etc/domain.rnc
+++ b/SDT/schema4.0/etc/domain.rnc
@@ -65,12 +65,12 @@ BasicType =
   | "byte"
   | "float"
   | "array"
-  | "enum"
   | "date"
   | "time"
   | "datetime"
   | "blob"
   | "uri"
+  | "void"
 ConstraintsDef =
   element Constraints {
     element Constraint {
diff --git a/SDT/schema4.0/etc/schema.xmlns b/SDT/schema4.0/etc/schema.xmlns
index 4f691f5..d38050c 100644
--- a/SDT/schema4.0/etc/schema.xmlns
+++ b/SDT/schema4.0/etc/schema.xmlns
@@ -1,4 +1,4 @@
-targetNamespace="http://homegatewayinitiative.org/xml/dal/3.0" 
-	   xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
+targetNamespace="http://homegatewayinitiative.org/xml/dal/4.0" 
+	   xmlns="http://homegatewayinitiative.org/xml/dal/4.0" 
 	   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 	  
diff --git a/SDT/schema4.0/etc/schemas.xml b/SDT/schema4.0/etc/schemas.xml
index 3b0bea6..239fe56 100644
--- a/SDT/schema4.0/etc/schemas.xml
+++ b/SDT/schema4.0/etc/schemas.xml
@@ -1,6 +1,6 @@
 <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
   
-  <namespace ns="http://homegatewayinitiative.org/xml/dal/2.0" typeId="DAL"/>
+  <namespace ns="http://homegatewayinitiative.org/xml/dal/4.0" typeId="DAL"/>
   <namespace ns="http://www.w3.org/2001/XInclude" typeId="XINC"/>
 
   <typeId id="DAL" uri="dal.rnc"/>
diff --git a/SDT/schema4.0/test/EchonetLiteExamples.xml b/SDT/schema4.0/test/EchonetLiteExamples.xml
index 76f7d84..429eaf8 100644
--- a/SDT/schema4.0/test/EchonetLiteExamples.xml
+++ b/SDT/schema4.0/test/EchonetLiteExamples.xml
@@ -3,7 +3,7 @@
 <!-- Example SDT definition taken from EchonetLite https://github.com/ECHONET-Consortium -->
 
 
-<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
+<Domain xmlns="http://homegatewayinitiative.org/xml/dal/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example.based.on.echonetLite">
 
@@ -119,19 +119,22 @@
 						<DataPoint name="door/CoverOpen/CloseStatus" readable="true" writable="false">
 							<Doc>This property indicates whether the door/cover is open or closed.</Doc>
 							<DataType>
-								<SimpleType type="enum" />
+								<!-- <SimpleType type="enum" /> -->
+								<SimpleType type="string" />
 							</DataType>
 						</DataPoint>
 						<DataPoint name="washingMachineSetting" readable="true" writable="true">
 							<Doc>Washing machine setting</Doc>
 							<DataType>
-								<SimpleType type="enum" />
+								<!-- <SimpleType type="enum" /> -->
+								<SimpleType type="string" />
 							</DataType>
 						</DataPoint>
 						<DataPoint name="currentStageOfWashingCycle" readable="true" writable="false">
 							<Doc>This property indicates the current stage of the washing cycle.</Doc>
 							<DataType>
-								<SimpleType type="enum" />
+								<!-- <SimpleType type="enum" /> -->
+								<SimpleType type="string" />
 							</DataType>
 						</DataPoint>
 						<DataPoint name="timeRemainingToCompleteWashingCycle" readable="true" writable="false">
@@ -149,7 +152,8 @@
 						<DataPoint name="onTimerReservationSetting" readable="true" writable="true">
 							<Doc>Reservation ON/OFF</Doc>
 							<DataType>
-								<SimpleType type="enum" />
+								<!-- <SimpleType type="enum" /> -->
+								<SimpleType type="boolean" />
 							</DataType>
 						</DataPoint>
 						<DataPoint name="onTimerSetting" readable="true" writable="true">
diff --git a/SDT/schema4.0/test/dal-core.xml b/SDT/schema4.0/test/dal-core.xml
index 65ec652..b1eec99 100644
--- a/SDT/schema4.0/test/dal-core.xml
+++ b/SDT/schema4.0/test/dal-core.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
+<Domain xmlns="http://homegatewayinitiative.org/xml/dal/4.0" 
 	id="hgi.dal.core">
 
 	<Modules>
diff --git a/SDT/schema4.0/test/dal-eg.xml b/SDT/schema4.0/test/dal-eg.xml
index 60a5b87..f437180 100644
--- a/SDT/schema4.0/test/dal-eg.xml
+++ b/SDT/schema4.0/test/dal-eg.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
 <Domain xmlns:xi="http://www.w3.org/2001/XInclude"
-	xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
+	xmlns="http://homegatewayinitiative.org/xml/dal/4.0" 
 	id="com.telekom">
 
   <Imports>
diff --git a/SDT/schema4.0/test/example1.SDT.xml b/SDT/schema4.0/test/example1.SDT.xml
index fb922d8..eed2e37 100644
--- a/SDT/schema4.0/test/example1.SDT.xml
+++ b/SDT/schema4.0/test/example1.SDT.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!-- Example1 SDT inspired by some Echonet Lite examples -->
-<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
+<Domain xmlns="http://homegatewayinitiative.org/xml/dal/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example1.SDT">
 
diff --git a/SDT/schema4.0/test/example2.SDT.xml b/SDT/schema4.0/test/example2.SDT.xml
index 82090f7..2a9361a 100644
--- a/SDT/schema4.0/test/example2.SDT.xml
+++ b/SDT/schema4.0/test/example2.SDT.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!-- Example1 SDT inspired by some Echonet Lite examples -->
-<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
+<Domain xmlns="http://homegatewayinitiative.org/xml/dal/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example2.SDT">
 
diff --git a/SDT/schema4.0/test/example3.SDT.xml b/SDT/schema4.0/test/example3.SDT.xml
index cb3c183..63da249 100644
--- a/SDT/schema4.0/test/example3.SDT.xml
+++ b/SDT/schema4.0/test/example3.SDT.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!-- Example1 SDT inspired by some Echonet Lite examples -->
-<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
+<Domain xmlns="http://homegatewayinitiative.org/xml/dal/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example3.SDT">
 
diff --git a/SDT/schema4.0/test/mseeb.xml b/SDT/schema4.0/test/mseeb.xml
index 04dacf7..4f5622f 100644
--- a/SDT/schema4.0/test/mseeb.xml
+++ b/SDT/schema4.0/test/mseeb.xml
@@ -62,7 +62,7 @@
 
 -->
 <Domain xmlns:xi="http://www.w3.org/2001/XInclude"
-    xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
+    xmlns="http://homegatewayinitiative.org/xml/dal/4.0" 
     id="org.homegatewayinitiative">
 
 <!-- The following import statements include ModuleClasses from HGI -->
-- 
GitLab