diff --git a/SDT/schema4.0/build.xml b/SDT/schema4.0/build.xml
index ca74f2f8baa22447c6c75c30b903c786887572d0..55bf6408067c37ae017bb263286f05c00bdfc0c3 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://www.onem2m.org/xml/sdt/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/docs/SDT_UML.uxf b/SDT/schema4.0/docs/SDT_UML.uxf
index da1aa27b1fde0d50956f867bea098d3288d567a5..75d38b49ed36663de6960bf095fb1e4361ff7aec 100644
--- a/SDT/schema4.0/docs/SDT_UML.uxf
+++ b/SDT/schema4.0/docs/SDT_UML.uxf
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <diagram program="umlet" version="14.3.0">
   <help_text/>
-  <zoom_level>6</zoom_level>
+  <zoom_level>10</zoom_level>
   <element>
     <id>UMLNote</id>
     <coordinates>
-      <x>840</x>
-      <y>1098</y>
-      <w>174</w>
-      <h>156</h>
+      <x>1390</x>
+      <y>1690</y>
+      <w>290</w>
+      <h>260</h>
     </coordinates>
     <panel_attributes>bg=#FAF8C8
 fontsize=12
@@ -36,10 +36,10 @@ group=1</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>918</x>
-      <y>1158</y>
-      <w>66</w>
-      <h>24</h>
+      <x>1520</x>
+      <y>1790</y>
+      <w>110</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 fontsize=10
@@ -51,10 +51,10 @@ group=1</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>918</x>
-      <y>1182</y>
-      <w>66</w>
-      <h>18</h>
+      <x>1520</x>
+      <y>1830</y>
+      <w>110</w>
+      <h>30</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;-
 fontsize=10
@@ -64,10 +64,10 @@ group=1</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>924</x>
-      <y>822</y>
-      <w>90</w>
-      <h>132</h>
+      <x>1530</x>
+      <y>1230</y>
+      <w>150</w>
+      <h>220</h>
     </coordinates>
     <panel_attributes>&lt;&lt;enumeration&gt;&gt;
 BasicType
@@ -88,10 +88,10 @@ void</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>552</x>
-      <y>870</y>
-      <w>84</w>
-      <h>48</h>
+      <x>910</x>
+      <y>1310</y>
+      <w>140</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;.
 m1= 0..1
@@ -101,10 +101,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>552</x>
-      <y>822</y>
-      <w>84</w>
-      <h>48</h>
+      <x>910</x>
+      <y>1230</y>
+      <w>140</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;.
 m1=0..1
@@ -114,10 +114,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>264</x>
-      <y>822</y>
-      <w>114</w>
-      <h>90</h>
+      <x>430</x>
+      <y>1230</y>
+      <w>190</w>
+      <h>150</h>
     </coordinates>
     <panel_attributes>DataType
 --
@@ -134,10 +134,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>372</x>
-      <y>792</y>
-      <w>408</w>
-      <h>72</h>
+      <x>610</x>
+      <y>1180</y>
+      <w>680</w>
+      <h>120</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;.
 m2=1..n
@@ -147,10 +147,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>372</x>
-      <y>792</y>
-      <w>408</w>
-      <h>108</h>
+      <x>610</x>
+      <y>1180</y>
+      <w>680</w>
+      <h>180</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;.
 m2=1
@@ -160,10 +160,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>624</x>
-      <y>894</y>
-      <w>114</w>
-      <h>30</h>
+      <x>1030</x>
+      <y>1350</y>
+      <w>190</w>
+      <h>50</h>
     </coordinates>
     <panel_attributes>SimpleType
 --
@@ -174,10 +174,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>732</x>
-      <y>912</y>
-      <w>204</w>
-      <h>24</h>
+      <x>1210</x>
+      <y>1380</y>
+      <w>340</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;-
 m1= 1
@@ -187,10 +187,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>624</x>
-      <y>966</y>
-      <w>114</w>
-      <h>66</h>
+      <x>1030</x>
+      <y>1470</y>
+      <w>190</w>
+      <h>110</h>
     </coordinates>
     <panel_attributes>Constraint
 --
@@ -205,10 +205,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>372</x>
-      <y>882</y>
-      <w>264</w>
-      <h>108</h>
+      <x>610</x>
+      <y>1330</y>
+      <w>440</w>
+      <h>180</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -218,10 +218,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>732</x>
-      <y>948</y>
-      <w>252</w>
-      <h>84</h>
+      <x>1210</x>
+      <y>1440</y>
+      <w>420</w>
+      <h>140</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;-
 m1=1
@@ -231,10 +231,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>624</x>
-      <y>822</y>
-      <w>114</w>
-      <h>30</h>
+      <x>1030</x>
+      <y>1230</y>
+      <w>190</w>
+      <h>50</h>
     </coordinates>
     <panel_attributes>StructType
 --
@@ -245,10 +245,10 @@ fg=blue</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>624</x>
-      <y>858</y>
-      <w>114</w>
-      <h>30</h>
+      <x>1030</x>
+      <y>1290</y>
+      <w>190</w>
+      <h>50</h>
     </coordinates>
     <panel_attributes>ArrayType
 --
@@ -259,10 +259,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>552</x>
-      <y>852</y>
-      <w>84</w>
-      <h>30</h>
+      <x>910</x>
+      <y>1280</y>
+      <w>140</w>
+      <h>50</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;.
 m1= 0..1
@@ -273,10 +273,10 @@ fontsize=12
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>264</x>
-      <y>738</y>
-      <w>750</w>
-      <h>24</h>
+      <x>430</x>
+      <y>1090</y>
+      <w>1250</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>halign=center
 SDT 4.0 - DataType
@@ -288,10 +288,10 @@ lw=0.1</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>60</x>
-      <y>84</y>
-      <w>954</w>
-      <h>24</h>
+      <x>70</x>
+      <y>0</y>
+      <w>1610</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>SDT 4.0 - Basic Elements
 halign=center
@@ -303,10 +303,10 @@ lw=0.1</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>474</x>
-      <y>162</y>
-      <w>144</w>
-      <h>108</h>
+      <x>780</x>
+      <y>130</y>
+      <w>240</w>
+      <h>180</h>
     </coordinates>
     <panel_attributes>ModuleClass
 --
@@ -326,10 +326,10 @@ fg=blue
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>684</x>
-      <y>162</y>
-      <w>132</w>
-      <h>78</h>
+      <x>1130</x>
+      <y>130</y>
+      <w>220</w>
+      <h>130</h>
     </coordinates>
     <panel_attributes>Action
 --
@@ -345,10 +345,10 @@ fg=blue</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>888</x>
-      <y>216</y>
-      <w>126</w>
-      <h>78</h>
+      <x>1470</x>
+      <y>220</y>
+      <w>210</w>
+      <h>130</h>
     </coordinates>
     <panel_attributes>Arg
 --
@@ -364,10 +364,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>810</x>
-      <y>216</y>
-      <w>90</w>
-      <h>24</h>
+      <x>1340</x>
+      <y>220</y>
+      <w>150</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1= 0..n
@@ -377,10 +377,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>60</x>
-      <y>162</y>
-      <w>138</w>
-      <h>96</h>
+      <x>90</x>
+      <y>130</y>
+      <w>230</w>
+      <h>160</h>
     </coordinates>
     <panel_attributes>Domain
 --
@@ -398,10 +398,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>162</y>
-      <w>102</w>
-      <h>48</h>
+      <x>630</x>
+      <y>130</y>
+      <w>170</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -411,10 +411,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>258</x>
-      <y>348</y>
-      <w>132</w>
-      <h>66</h>
+      <x>420</x>
+      <y>440</y>
+      <w>220</w>
+      <h>110</h>
     </coordinates>
     <panel_attributes>SubDevice
 --
@@ -429,10 +429,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>234</y>
-      <w>42</w>
-      <h>54</h>
+      <x>630</x>
+      <y>250</y>
+      <w>70</w>
+      <h>90</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -442,10 +442,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>276</y>
-      <w>102</w>
-      <h>114</h>
+      <x>630</x>
+      <y>320</y>
+      <w>170</w>
+      <h>190</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1= 0..n
@@ -455,10 +455,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>888</x>
-      <y>384</y>
-      <w>126</w>
-      <h>30</h>
+      <x>1470</x>
+      <y>500</y>
+      <w>210</w>
+      <h>50</h>
     </coordinates>
     <panel_attributes>Doc
 --
@@ -468,10 +468,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>612</x>
-      <y>162</y>
-      <w>84</w>
-      <h>42</h>
+      <x>1010</x>
+      <y>130</y>
+      <w>140</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1= 0..n
@@ -481,10 +481,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>852</x>
-      <y>384</y>
-      <w>48</w>
-      <h>24</h>
+      <x>1410</x>
+      <y>500</y>
+      <w>80</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..1
@@ -494,10 +494,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>612</x>
-      <y>198</y>
-      <w>84</w>
-      <h>72</h>
+      <x>1010</x>
+      <y>190</y>
+      <w>140</w>
+      <h>120</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1= 0..n
@@ -507,10 +507,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>684</x>
-      <y>246</y>
-      <w>132</w>
-      <h>108</h>
+      <x>1130</x>
+      <y>270</y>
+      <w>220</w>
+      <h>180</h>
     </coordinates>
     <panel_attributes>DataPoint
 --
@@ -531,10 +531,10 @@ fg=blue
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>684</x>
-      <y>360</y>
-      <w>132</w>
-      <h>66</h>
+      <x>1130</x>
+      <y>460</y>
+      <w>220</w>
+      <h>110</h>
     </coordinates>
     <panel_attributes>Event
 --
@@ -549,10 +549,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>612</x>
-      <y>258</y>
-      <w>84</w>
-      <h>126</h>
+      <x>1010</x>
+      <y>290</y>
+      <w>140</w>
+      <h>210</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1= 0..n
@@ -562,10 +562,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>162</y>
-      <w>102</w>
-      <h>252</h>
+      <x>630</x>
+      <y>130</y>
+      <w>170</w>
+      <h>420</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 
@@ -575,10 +575,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>258</x>
-      <y>264</y>
-      <w>132</w>
-      <h>78</h>
+      <x>420</x>
+      <y>300</y>
+      <w>220</w>
+      <h>130</h>
     </coordinates>
     <panel_attributes>DeviceClass
 --
@@ -594,10 +594,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>324</y>
-      <w>48</w>
-      <h>48</h>
+      <x>630</x>
+      <y>400</y>
+      <w>80</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -607,10 +607,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>162</y>
-      <w>102</w>
-      <h>168</h>
+      <x>630</x>
+      <y>130</y>
+      <w>170</w>
+      <h>280</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 fontsize=12</panel_attributes>
@@ -619,10 +619,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>276</y>
-      <w>102</w>
-      <h>42</h>
+      <x>630</x>
+      <y>320</y>
+      <w>170</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>lt=&lt;.</panel_attributes>
     <additional_attributes>150.0;10.0;80.0;10.0;80.0;50.0;10.0;50.0</additional_attributes>
@@ -630,10 +630,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>474</x>
-      <y>276</y>
-      <w>144</w>
-      <h>78</h>
+      <x>780</x>
+      <y>320</y>
+      <w>240</w>
+      <h>130</h>
     </coordinates>
     <panel_attributes>Property
 --
@@ -650,10 +650,10 @@ transparency=80</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>810</x>
-      <y>162</y>
-      <w>42</w>
-      <h>240</h>
+      <x>1340</x>
+      <y>130</y>
+      <w>70</w>
+      <h>400</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -663,10 +663,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>612</x>
-      <y>258</y>
-      <w>42</w>
-      <h>42</h>
+      <x>1010</x>
+      <y>290</y>
+      <w>70</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -676,10 +676,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>444</x>
-      <y>828</y>
-      <w>114</w>
-      <h>66</h>
+      <x>730</x>
+      <y>1240</y>
+      <w>190</w>
+      <h>110</h>
     </coordinates>
     <panel_attributes>&lt;&lt;enumeration&gt;&gt;
 TypeChoice
@@ -695,10 +695,10 @@ Enum : EnumType
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>372</x>
-      <y>834</y>
-      <w>84</w>
-      <h>48</h>
+      <x>610</x>
+      <y>1250</y>
+      <w>140</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;-
 m1= 1
@@ -708,10 +708,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
+      <x>630</x>
       <y>210</y>
-      <w>102</w>
-      <h>84</h>
+      <w>170</w>
+      <h>140</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 fontsize=12</panel_attributes>
@@ -720,22 +720,22 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>192</x>
-      <y>138</y>
-      <w>294</w>
-      <h>66</h>
+      <x>310</x>
+      <y>90</y>
+      <w>490</w>
+      <h>110</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 </panel_attributes>
-    <additional_attributes>470.0;50.0;380.0;50.0;380.0;20.0;40.0;20.0;40.0;90.0;10.0;90.0</additional_attributes>
+    <additional_attributes>470.0;50.0;380.0;50.0;380.0;20.0;50.0;20.0;50.0;90.0;10.0;90.0</additional_attributes>
   </element>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>384</x>
-      <y>222</y>
-      <w>48</w>
-      <h>144</h>
+      <x>630</x>
+      <y>230</y>
+      <w>80</w>
+      <h>240</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 
@@ -745,10 +745,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>624</x>
-      <y>930</y>
-      <w>114</w>
-      <h>30</h>
+      <x>1030</x>
+      <y>1410</y>
+      <w>190</w>
+      <h>50</h>
     </coordinates>
     <panel_attributes>EnumType
 --
@@ -759,10 +759,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>552</x>
-      <y>876</y>
-      <w>84</w>
-      <h>78</h>
+      <x>910</x>
+      <y>1320</y>
+      <w>140</w>
+      <h>130</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;.
 m1=0..1
@@ -772,10 +772,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>774</x>
-      <y>942</y>
-      <w>126</w>
-      <h>66</h>
+      <x>1280</x>
+      <y>1430</y>
+      <w>210</w>
+      <h>110</h>
     </coordinates>
     <panel_attributes>EnumValue
 --
@@ -790,10 +790,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>732</x>
-      <y>942</y>
-      <w>54</w>
-      <h>24</h>
+      <x>1210</x>
+      <y>1430</y>
+      <w>90</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;.
 m1=1..n
@@ -803,10 +803,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>894</x>
-      <y>948</y>
-      <w>66</w>
-      <h>48</h>
+      <x>1480</x>
+      <y>1440</y>
+      <w>110</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;-
 m1=0..1
@@ -816,10 +816,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>300</x>
-      <y>552</y>
-      <w>132</w>
-      <h>48</h>
+      <x>490</x>
+      <y>780</y>
+      <w>220</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>Extend
 --
@@ -833,10 +833,10 @@ fg=blue
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>672</x>
-      <y>552</y>
-      <w>144</w>
-      <h>42</h>
+      <x>1110</x>
+      <y>780</y>
+      <w>240</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>Exclude
 --
@@ -848,10 +848,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>618</x>
-      <y>552</y>
-      <w>66</w>
-      <h>42</h>
+      <x>1020</x>
+      <y>780</y>
+      <w>110</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1= 1..n
@@ -862,10 +862,10 @@ fontsize=12
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>264</x>
-      <y>552</y>
-      <w>48</w>
-      <h>24</h>
+      <x>430</x>
+      <y>780</y>
+      <w>80</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..1
@@ -875,10 +875,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>882</x>
-      <y>552</y>
-      <w>132</w>
-      <h>96</h>
+      <x>1460</x>
+      <y>780</y>
+      <w>220</w>
+      <h>160</h>
     </coordinates>
     <panel_attributes>&lt;&lt;enumeration&gt;&gt;
 ExtendType
@@ -896,10 +896,10 @@ subdevice
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>810</x>
-      <y>552</y>
-      <w>84</w>
-      <h>42</h>
+      <x>1340</x>
+      <y>780</y>
+      <w>140</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;-
 m1=0..1
@@ -909,10 +909,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>672</x>
-      <y>600</y>
-      <w>144</w>
-      <h>42</h>
+      <x>1110</x>
+      <y>860</y>
+      <w>240</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>Include
 --
@@ -924,10 +924,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>618</x>
-      <y>588</y>
-      <w>66</w>
-      <h>36</h>
+      <x>1020</x>
+      <y>840</y>
+      <w>110</w>
+      <h>60</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1= 1..n
@@ -938,10 +938,10 @@ fontsize=12
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>810</x>
-      <y>552</y>
-      <w>84</w>
-      <h>90</h>
+      <x>1340</x>
+      <y>780</y>
+      <w>140</w>
+      <h>150</h>
     </coordinates>
     <panel_attributes>lt=-
 
@@ -951,10 +951,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>492</x>
-      <y>552</y>
-      <w>132</w>
-      <h>48</h>
+      <x>810</x>
+      <y>780</y>
+      <w>220</w>
+      <h>80</h>
     </coordinates>
     <panel_attributes>&lt;&lt;enumeration&gt;&gt;
 ExtendChoice
@@ -969,10 +969,10 @@ Includes : Include
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>426</x>
-      <y>558</y>
-      <w>78</w>
-      <h>42</h>
+      <x>700</x>
+      <y>790</y>
+      <w>130</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>lt=&lt;&lt;-
 m1=0..1
@@ -983,10 +983,10 @@ fontsize=12
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>258</x>
-      <y>162</y>
-      <w>132</w>
-      <h>96</h>
+      <x>420</x>
+      <y>130</y>
+      <w>220</w>
+      <h>160</h>
     </coordinates>
     <panel_attributes>ProductClass
 --
@@ -1004,10 +1004,10 @@ fg=blue</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>192</x>
-      <y>246</y>
-      <w>78</w>
-      <h>42</h>
+      <x>310</x>
+      <y>270</y>
+      <w>130</w>
+      <h>70</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -1017,10 +1017,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>Relation</id>
     <coordinates>
-      <x>192</x>
-      <y>162</y>
-      <w>78</w>
-      <h>78</h>
+      <x>310</x>
+      <y>130</y>
+      <w>130</w>
+      <h>130</h>
     </coordinates>
     <panel_attributes>lt=&lt;.
 m1=0..n
@@ -1030,10 +1030,10 @@ fontsize=12</panel_attributes>
   <element>
     <id>UMLClass</id>
     <coordinates>
-      <x>264</x>
-      <y>486</y>
-      <w>750</w>
-      <h>24</h>
+      <x>430</x>
+      <y>670</y>
+      <w>1250</w>
+      <h>40</h>
     </coordinates>
     <panel_attributes>halign=center
 SDT 4.0 - Extend
diff --git a/SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png b/SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png
index 91850e41be3fad76a3b4f3b48ee8d2c687977c79..7631a92344a860d5a4d0efff3eebd358939db848 100644
Binary files a/SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png and b/SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png differ
diff --git a/SDT/schema4.0/etc/dal.rnc b/SDT/schema4.0/etc/dal.rnc
index 728c734c43e4858e61cef9136e7e35a93ad60f8e..bdf78c4059c80568d57a4d45753d411ebe99165e 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://www.onem2m.org/xml/sdt/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 1fdb1f2008cf338881a3df25d2d14ef1041c1ef5..0b395f54ee8b136f9cd5258f25ec1234647dc76b 100644
--- a/SDT/schema4.0/etc/domain.rnc
+++ b/SDT/schema4.0/etc/domain.rnc
@@ -11,45 +11,33 @@ start = Domain
 Domain =
   element Domain {
     attribute xml:base { xsd:anyURI }?,
-    attribute id { xsd:ID },
+    attribute id { xsd:Name },
+    attribute semanticURI { xsd:anyURI }?,
     DocDef,
     element Imports { Domain+ }?,
-    element Modules {
-      element ModuleClass { ModuleDef }+
-    }?,
-    element Devices {
-      element Device {
-        attribute id { xsd:Name },
-        DocDef,
-        PropertiesDef?,
-        Modules?,
-        element SubDevices {
-          element SubDevice {
-            attribute id { xsd:Name },
-            DocDef,
-            PropertiesDef?,
-            Modules?
-          }+
-        }?
-      }+
-    }?
+    element DataTypes { DataTypeDef+ }?,
+    ModuleClassesDef?,
+    DeviceClassesDef?,
+    ProductClassesDef?
   }
 PropertiesDef =
   element Properties {
     element Property {
-      attribute name { text },
+      attribute name { xsd:Name },
       attribute optional { xsd:boolean }?,
       attribute value { text }?,
+      attribute semanticURI { xsd:anyURI }?,
       DocDef,
       SimpleType
     }+
   }
 DataTypeDef =
   element DataType {
-    attribute name { text }?,
+    attribute name { xsd:Name }?,
     attribute unitOfMeasure { text }?,
+    attribute semanticURI { xsd:anyURI }?,
     DocDef,
-    (StructType | ArrayType | SimpleType),
+    (ExtendDef? | (StructType | ArrayType | SimpleType | EnumType)),
     ConstraintsDef?
   }
 StructType = element Struct { DataTypeDef+ }
@@ -58,6 +46,7 @@ SimpleType =
   element SimpleType {
     attribute type { BasicType }
   }
+EnumType = element Enum { EnumValueDef+ }
 BasicType =
   "integer"
   | "boolean"
@@ -65,18 +54,27 @@ BasicType =
   | "byte"
   | "float"
   | "array"
-  | "enum"
   | "date"
   | "time"
   | "datetime"
   | "blob"
   | "uri"
+  | "void"
+EnumValueDef =
+  element EnumValue {
+    attribute name { xsd:Name },
+    attribute value { text },
+    attribute type { BasicType }?,
+    attribute semanticURI { xsd:anyURI }?,
+    DocDef
+  }
 ConstraintsDef =
   element Constraints {
     element Constraint {
-      attribute name { text },
+      attribute name { xsd:Name },
       attribute type { BasicType }?,
       attribute value { text }?,
+      attribute semanticURI { xsd:anyURI }?,
       DocDef
     }+
   }
@@ -95,27 +93,60 @@ DocDef =
            element caption { text }
          })*
   }?
-ModuleDef =
-  attribute name { text },
-  attribute optional { xsd:boolean }?,
-  element extends {
-    attribute domain { xsd:IDREF },
-    attribute class { text }
-  }?,
-  DocDef,
-  PropertiesDef?,
-  Actions?,
-  Data?,
-  Events?
-Modules =
-  element Modules {
-    element Module { ModuleDef }+
+DeviceClassesDef =
+  element DeviceClasses {
+    element DeviceClass {
+      attribute id { xsd:Name },
+      attribute semanticURI { xsd:anyURI }?,
+      DocDef,
+      PropertiesDef?,
+      ModuleClassesDef?,
+      SubDevicesRef?
+    }+
+  }
+SubDevicesRef =
+  element SubDevices {
+    element SubDevice {
+      attribute id { xsd:Name },
+      attribute semanticURI { xsd:anyURI }?,
+      DocDef,
+      PropertiesDef?,
+      ModuleClassesDef?
+    }+
+  }
+ModuleClassesDef =
+  element ModuleClasses {
+    element ModuleClass {
+      attribute name { xsd:Name },
+      attribute optional { xsd:boolean }?,
+      attribute semanticURI { xsd:anyURI }?,
+      DocDef,
+      ExtendDef?,
+      PropertiesDef?,
+      Actions?,
+      Data?,
+      Events?
+    }+
+  }
+ProductClassesDef =
+  element ProductClasses {
+    element ProductClass {
+      attribute id { xsd:Name },
+      attribute semanticURI { xsd:anyURI }?,
+      DocDef,
+      ExtendDef?,
+      PropertiesDef?,
+      ModuleClassesDef?,
+      SubDevicesRef?,
+      element DeviceClass { ExtendDef }?
+    }+
   }
 Actions =
   element Actions {
     element Action {
-      attribute name { text },
+      attribute name { xsd:Name },
       attribute optional { xsd:boolean }?,
+      attribute semanticURI { xsd:anyURI }?,
       DocDef,
       DataTypeDef?,
       ArgDef?
@@ -124,7 +155,10 @@ Actions =
 ArgDef =
   element Args {
     element Arg {
-      attribute name { text },
+      attribute name { xsd:Name },
+      attribute optional { xsd:boolean }?,
+      attribute default { text }?,
+      attribute semanticURI { xsd:anyURI }?,
       DocDef,
       DataTypeDef
     }+
@@ -132,11 +166,13 @@ ArgDef =
 Data =
   element Data {
     element DataPoint {
-      attribute name { text },
+      attribute name { xsd:Name },
       attribute optional { xsd:boolean }?,
       attribute writable { xsd:boolean }?,
       attribute readable { xsd:boolean }?,
       attribute eventable { xsd:boolean }?,
+      attribute default { text }?,
+      attribute semanticURI { xsd:anyURI }?,
       DocDef,
       DataTypeDef
     }+
@@ -144,9 +180,31 @@ Data =
 Events =
   element Events {
     element Event {
-      attribute name { text },
+      attribute name { xsd:Name },
       attribute optional { xsd:boolean }?,
+      attribute semanticURI { xsd:anyURI }?,
       DocDef,
       Data?
     }+
   }
+ExtendDef =
+  element Extend {
+    attribute domain { xsd:Name },
+    attribute entity { xsd:Name },
+    (element Exclude {
+       attribute name { xsd:Name },
+       attribute type { ExtendType }
+     }
+     | element Include {
+         attribute name { xsd:Name },
+         attribute type { ExtendType }
+       })?
+  }
+ExtendType =
+  "action"
+  | "datapoint"
+  | "event"
+  | "moduleclass"
+  | "property"
+  | "device"
+  | "subdevice"
diff --git a/SDT/schema4.0/etc/schema.xmlns b/SDT/schema4.0/etc/schema.xmlns
index 4f691f5342ddd84d3301215f2286a9cd3887822d..159f7ed015c76d622006c2d5213b62be4f5fd475 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://www.onem2m.org/xml/sdt/4.0" 
+	   xmlns="http://www.onem2m.org/xml/sdt/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 3b0bea68871bb789a0a90378c2c425b777e77199..9cfc9f9bbffee9ae36553c9fcc2fb63a8cd738b5 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://www.onem2m.org/xml/sdt/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/gen/html/EchonetLiteExamples.html b/SDT/schema4.0/gen/html/EchonetLiteExamples.html
index 34817ab33135df3c7897cb665788176a12298733..f5a448b3ac7334f79239612d477681f5260dc6fb 100644
--- a/SDT/schema4.0/gen/html/EchonetLiteExamples.html
+++ b/SDT/schema4.0/gen/html/EchonetLiteExamples.html
@@ -112,18 +112,21 @@
 							This property indicates whether the door/cover is open or closed.
 							
 								
+								
 							
 						
 						
 							Washing machine setting
 							
 								
+								
 							
 						
 						
 							This property indicates the current stage of the washing cycle.
 							
 								
+								
 							
 						
 						
@@ -139,6 +142,7 @@
 							Reservation ON/OFF
 							
 								
+								
 							
 						
 						
diff --git a/SDT/schema4.0/gen/html/dal-core.html b/SDT/schema4.0/gen/html/dal-core.html
index 4a9f90e5ad3f7a74a67a05f9d667d5fb6c02c1bb..4fbe82f7e7fd42d961bcc8e4a3dd3e2ba12130f3 100644
--- a/SDT/schema4.0/gen/html/dal-core.html
+++ b/SDT/schema4.0/gen/html/dal-core.html
@@ -1,31 +1,33 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-  
-    
-      
-	BooleanState is the preferred module for modelling a
-	functionality corresponding to an underlying binary state. This
-	module should be used to abstract away from the actual datatype
-	and values in question. Note that the module does not define whether
-	the execution mode is blocking or non-blocking.
-      
-      
 	
-	  
-	    Obtain the current associated state.
-	  
+		
+			
+				BooleanState is the preferred module for modelling a
+				functionality corresponding to an underlying binary state. This
+				module should be used to abstract away from the actual datatype
+				and values in question. Note that the module does not define whether
+				the execution mode is blocking or non-blocking.
+				
+			
+				
+					Obtain the current associated state.
+					
+						
+					
+				
+				
+					Set the associated state to the specified value.
+					
+						
+							The desired value of the associated state.
+							
+								
+							
+						
+					
+				
+			
+		
 	
-	
-	  
-	    Set the associated state to the specified value.
-	  
-	  
-	    
-	      The desired value of the associated state.
-	    
-	  
-	
-      
-    
-  
 
diff --git a/SDT/schema4.0/gen/html/dal-eg.html b/SDT/schema4.0/gen/html/dal-eg.html
index 426e7f5102f39ed0484ca11175985e69428e216f..112efcc42754c294b295b2c75b0f26899c37cf4c 100644
--- a/SDT/schema4.0/gen/html/dal-eg.html
+++ b/SDT/schema4.0/gen/html/dal-eg.html
@@ -1,71 +1,54 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-
-  
-    
-  
-
-  
-  
-
-  
-
-    
-      
-	PowerSwitch
 	
-	Telekom Innovation Laboratories
-      
-      
-      
-	This device is intended as a demonstration of how to use the
-	abstract modules defined in the HGI Core domain. The
-	vendor has provided a proprietry module with two operations
-	on and off. This is clearly a candidate for the 
-	module class BooleanState.
-      
-
-      
+		
 	
-	  
-	    The proprietry interface for turning the switch on and off. 
-	    Actions for setting the state to on or off 
-	    and for querying the state.
-	  
-
-	  
-	    
-	      
-		Turn the switch on.
-	      
-	    
-	    
-	      
-		Turn the switch off.
-	      
-	    
-	    
-	      
-		Query the state of the switch. Returns the string "on"
-		or "off".
-	      
-	    
-	  
-
-	  
-	  	
-		  
-		    
-	 		
-		  
-		  An event that indicates the new state of the switch.
-		  
-	  	
-	  
 	
-
+		
+			This device is intended as a demonstration of how to use the abstract modules defined in the HGI Core	domain. The vendor has provided a proprietry module with two operations	on	and off. This is clearly a candidate for the module class BooleanState.
+			
+				
+					Original value: PowerSwitch
+					
+				
+				
+				
+					Original value: Telekom Innovation Laboratories
+					
+				
+			
+			
+				
+					The proprietry interface for turning the switch on and off.  Actions for setting the state to on or offand for querying the state.
+					
+						
+							Turn the switch on.
+						
+						
+							Turn the switch off.
+						
+						
+							Query the state of the switch. Returns the string "on" or "off".
+							
+								
+							
+						
+					
+					
+						
+							An event that indicates the new state of the switch.
+							
+								
+									
+										
+									
+								
+							
+						
+					
+				
+				
+					
+				
+			
+		
 	
-	  
-	
-      
-    
-  
diff --git a/SDT/schema4.0/gen/html/mseeb.html b/SDT/schema4.0/gen/html/mseeb.html
index 0e01ea6f8d9816e8d4114ea9de2759619a54eebe..ee5115e769455ae24b45ecb8e61bbf12a44f7591 100644
--- a/SDT/schema4.0/gen/html/mseeb.html
+++ b/SDT/schema4.0/gen/html/mseeb.html
@@ -16,6 +16,9 @@
                     
                         Obtain the current associated state.
                     
+                    
+                        
+                    
                 
                 
                     
@@ -23,7 +26,12 @@
                     
                     
                         
-                        The desired value of the associated state.
+                            
+                            The desired value of the associated state.
+                            
+                            
+                                
+                            
                         
                     
                 
@@ -32,6 +40,9 @@
                 
                     
                         
+                            
+                        		
+                            
                         
                     
                       
@@ -47,14 +58,29 @@
 
         
             
-                Multi Socket Electrical-Extension-Block
-                HGI
-                1.0
-                http://www.homegatewayinitative.org
-                1234.5
+                This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
             
             
-                This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
+                
+                    Original value: Multi Socket Electrical-Extension-Block
+                    
+                
+                
+                    Original value: HGI
+                    
+                
+                
+                  Original value: 1.0
+                  
+                
+                
+                  Original value: http://www.homegatewayinitative.org
+                  
+                
+                
+                  Original value: 1234.5
+                  
+                
             
 
 
@@ -62,23 +88,84 @@
             
                 
                     
-                    
                         The proprietry interface for turning all switches of the extension block on and off. 
                         The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false".
                     
+                    
+                    
+                        
+                            Version for this ModuleClass
+                            
+                        
+                    
+                
+                
+                    
+                    	
+                            Get the power consumption.
+                            
+                    			
+                                    
+                        				
+                                           
+                                                This is an example simple data type with a minimum-value constraint.
+                            					
+                                                
+                                                    
+                                                        The value must be equal or greater 0.0
+                                                    
+                                                      
+                                                        Steps are 0.1
+                                                    
+                                                
+                                            
+                				        
+                                    
+                                    
+                        				
+                                            
+                            					
+                                            
+                				        
+                                    
+                                
+                            
+                    	
+                    
                 
 
                 
+                    
+                        
+                            
+                                
+                                    
+                                        
+                                    
+                                
+                            
+                        
+                    
                     
                         
                             
                                 This datapoint represents the firmware version of the extension block.
                             
+                            
+                                
+                            
                         
                         
                         
                             
                                 This datapoint is an array of strings with the names of the contained devices.
+                            
+                            
+                                
+                                    
+                                        
+                                    
+                                
                             
                         
                     
@@ -93,11 +180,15 @@
 
                 
                     
-                        PowerSwitch 1
-                        HGI
+                        This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
                     
                     
-                        This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
+                        
+                            
+                        
+                        
+                            
+                        
                     
                     
                         
@@ -110,11 +201,21 @@
 
                 
                     
-                        PowerSwitch 2
-                        HGI
+                        This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
                     
                     
-                        This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
+                        
+                            
+                        
+                        
+                            
+                        
+                        
+                            
+                        
+                        
+                            
+                        
                     
                     
                         
diff --git a/SDT/schema4.0/src/domain.rng b/SDT/schema4.0/src/domain.rng
index b35d73094c626c542ae46af4f4d0dd29963e7d06..66352e0316657c20bd44944d2ef8ad002117465a 100644
--- a/SDT/schema4.0/src/domain.rng
+++ b/SDT/schema4.0/src/domain.rng
@@ -26,8 +26,13 @@
 				</attribute>
 			</optional>
 			<attribute name="id">
-				<data type="ID"/>
+				<data type="Name"/>
 			</attribute>
+			<optional>
+				<attribute name="semanticURI">
+					<data type="anyURI"/>
+				</attribute>
+			</optional>
 			<ref name="DocDef"/>
 			<optional>
 				<element name="Imports">
@@ -37,49 +42,20 @@
 				</element>
 			</optional>
 			<optional>
-				<element name="Modules">
+				<element name="DataTypes">
 					<oneOrMore>
-						<element name="ModuleClass">
-							<ref name="ModuleDef"/>
-						</element>
+						<ref name="DataTypeDef"/>
 					</oneOrMore>
 				</element>
 			</optional>
 			<optional>
-				<element name="Devices">
-					<oneOrMore>
-						<element name="Device">
-							<attribute name="id">
-								<data type="Name"/>
-							</attribute>
-							<ref name="DocDef"/>
-							<optional>
-								<ref name="PropertiesDef"/>
-							</optional>
-							<optional>
-								<ref name="Modules"/>
-							</optional>
-							<optional>
-								<element name="SubDevices">
-									<oneOrMore>
-										<element name="SubDevice">
-											<attribute name="id">
-												<data type="Name"/>
-											</attribute>
-											<ref name="DocDef"/>
-											<optional>
-												<ref name="PropertiesDef"/>
-											</optional>
-											<optional>
-												<ref name="Modules"/>
-											</optional>
-										</element>
-									</oneOrMore>
-								</element>
-							</optional>
-						</element>
-					</oneOrMore>
-				</element>
+				<ref name="ModuleClassesDef"/>
+			</optional>
+			<optional>
+				<ref name="DeviceClassesDef" />
+			</optional>
+			<optional>
+				<ref name="ProductClassesDef" />
 			</optional>
 		</element>
 	</define>
@@ -90,7 +66,7 @@
 			<oneOrMore>
 				<element name="Property">
 					<attribute name="name">
-						<text/>
+						<data type="Name"/>
 					</attribute>
 					<optional>
 						<attribute name="optional">
@@ -102,6 +78,11 @@
 							<text/>
 						</attribute>
 					</optional>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
 					<ref name="DocDef"/>
 					<ref name="SimpleType" />
 				</element>
@@ -114,7 +95,7 @@
 		<element name="DataType">
 			<optional>
 				<attribute name="name">
-					<text/>
+					<data type="Name"/>
 				</attribute>
 			</optional>
 			<optional>
@@ -122,11 +103,22 @@
 					<text/>
 				</attribute>
 			</optional>
+			<optional>
+				<attribute name="semanticURI">
+					<data type="anyURI"/>
+				</attribute>
+			</optional>
 			<ref name="DocDef"/>
 			<choice>
-				<ref name="StructType" />
-				<ref name="ArrayType" />
-				<ref name="SimpleType" />
+				<optional>
+					<ref name="ExtendDef" />
+				</optional>
+				<choice>
+					<ref name="StructType" />
+					<ref name="ArrayType" />
+					<ref name="SimpleType" />
+					<ref name="EnumType" />
+				</choice>
 			</choice>
 			<optional>
 				<ref name="ConstraintsDef"/>
@@ -158,6 +150,15 @@
 			</attribute>
 		</element>
 	</define>
+	
+
+	<define name="EnumType">
+		<element name="Enum">
+			<oneOrMore>
+				<ref name="EnumValueDef" />
+			</oneOrMore>
+		</element>
+	</define>
 
 
 	<define name="BasicType">
@@ -168,22 +169,45 @@
 			<value>byte</value>
 			<value>float</value>
 			<value>array</value>
-			<value>enum</value>
 			<value>date</value>
 			<value>time</value>
 			<value>datetime</value>
 			<value>blob</value>
 			<value>uri</value>
+			<value>void</value>
 		</choice>
 	</define>
 
 
+	<define name="EnumValueDef">
+		<element name="EnumValue">
+			<attribute name="name">
+				<data type="Name"/>
+			</attribute>
+			<attribute name="value">
+				<text/>
+			</attribute>
+			<optional>
+				<attribute name="type">
+					<ref name="BasicType"/>
+				</attribute>
+			</optional>
+			<optional>
+				<attribute name="semanticURI">
+					<data type="anyURI"/>
+				</attribute>
+			</optional>
+			<ref name="DocDef"/>
+		</element>
+	</define>
+
+
 	<define name="ConstraintsDef">
 		<element name="Constraints">
 			<oneOrMore>
 				<element name="Constraint">
 					<attribute name="name">
-						<text/>
+						<data type="Name"/>
 					</attribute>
 					<optional>
 						<attribute name="type">
@@ -195,12 +219,18 @@
 							<text/>
 						</attribute>
 					</optional>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>					
 					<ref name="DocDef"/>
 				</element>
 			</oneOrMore>
 		</element>
 	</define>
 
+
 	<define name="DocText">
 		<zeroOrMore>
 			<choice>
@@ -244,44 +274,128 @@
 	</define>
 
 
-	<define name="ModuleDef">
-		<attribute name="name">
-			<text/>
-		</attribute>
-		<optional>
-			<attribute name="optional">
-				<data type="boolean"/>
-			</attribute>
-		</optional>
-		<optional>
-			<element name="extends">
-				<attribute name="domain">
-					<data type="IDREF"/>
-				</attribute>
-				<attribute name="class"/>
-			</element>
-		</optional>
-		<ref name="DocDef"/>
-		<optional>
-			<ref name="PropertiesDef"/>
-		</optional>
-		<optional>
-			<ref name="Actions"/>
-		</optional>
-		<optional>
-			<ref name="Data"/>
-		</optional>
-		<optional>
-			<ref name="Events"/>
-		</optional>
+	<define name="DeviceClassesDef">
+		<element name="DeviceClasses">
+			<oneOrMore>
+				<element name="DeviceClass">
+					<attribute name="id">
+						<data type="Name"/>
+					</attribute>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
+					<ref name="DocDef"/>
+					<optional>
+						<ref name="PropertiesDef"/>
+					</optional>
+					<optional>
+						<ref name="ModuleClassesDef"/>
+					</optional>
+					<optional>
+						<ref name="SubDevicesRef" />
+					</optional>
+				</element>
+			</oneOrMore>
+		</element>
 	</define>
 
 
-	<define name="Modules">
-		<element name="Modules">
+	<define name="SubDevicesRef">
+		<element name="SubDevices">
 			<oneOrMore>
-				<element name="Module">
-					<ref name="ModuleDef"/>
+				<element name="SubDevice">
+					<attribute name="id">
+						<data type="Name"/>
+					</attribute>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
+					<ref name="DocDef"/>
+					<optional>
+						<ref name="PropertiesDef"/>
+					</optional>
+					<optional>
+						<ref name="ModuleClassesDef"/>
+					</optional>
+				</element>
+			</oneOrMore>
+		</element>
+	</define>
+
+
+	<define name="ModuleClassesDef">
+		<element name="ModuleClasses">
+			<oneOrMore>
+				<element name="ModuleClass">
+					<attribute name="name">
+						<data type="Name"/>
+					</attribute>
+					<optional>
+						<attribute name="optional">
+							<data type="boolean"/>
+						</attribute>
+					</optional>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
+					<ref name="DocDef"/>
+					<optional>
+						<ref name="ExtendDef" />
+					</optional>
+					<optional>
+						<ref name="PropertiesDef"/>
+					</optional>
+					<optional>
+						<ref name="Actions"/>
+					</optional>
+					<optional>
+						<ref name="Data"/>
+					</optional>
+					<optional>
+						<ref name="Events"/>
+					</optional>
+				</element>
+			</oneOrMore>
+		</element>
+	</define>
+
+
+	<define name="ProductClassesDef">
+		<element name="ProductClasses">
+			<oneOrMore>
+				<element name="ProductClass">
+					<attribute name="id">
+						<data type="Name"/>
+					</attribute>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
+					<ref name="DocDef"/>
+					<optional>
+						<ref name="ExtendDef" />
+					</optional>
+					<optional>
+						<ref name="PropertiesDef"/>
+					</optional>
+					<optional>
+						<ref name="ModuleClassesDef"/>
+					</optional>
+					<optional>
+						<ref name="SubDevicesRef" />
+					</optional>
+					<optional>
+						<element name="DeviceClass">
+							<ref name="ExtendDef" />
+						</element>
+					</optional>
 				</element>
 			</oneOrMore>
 		</element>
@@ -293,13 +407,18 @@
 			<oneOrMore>
 				<element name="Action">
 					<attribute name="name">
-						<text/>
+						<data type="Name"/>
 					</attribute>
 					<optional>
 						<attribute name="optional">
 							<data type="boolean"/>
 						</attribute>
 					</optional>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
 					<ref name="DocDef"/>
 					<optional>
 						<ref name="DataTypeDef"/>
@@ -317,7 +436,24 @@
 		<element name="Args">
 			<oneOrMore>
 				<element name="Arg">
-					<attribute name="name"/>
+					<attribute name="name">
+						<data type="Name"/>
+					</attribute>
+					<optional>
+						<attribute name="optional">
+							<data type="boolean"/>
+						</attribute>
+					</optional>
+					<optional>
+						<attribute name="default">
+							<text />
+						</attribute>
+					</optional>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
 					<ref name="DocDef"/>
 					<ref name="DataTypeDef"/>
 				</element>
@@ -331,7 +467,7 @@
 			<oneOrMore>
 				<element name="DataPoint">
 					<attribute name="name">
-						<text/>
+						<data type="Name"/>
 					</attribute>
 					<optional>
 						<attribute name="optional">
@@ -353,6 +489,16 @@
 							<data type="boolean"/>
 						</attribute>
 					</optional>
+					<optional>
+						<attribute name="default">
+							<text />
+						</attribute>
+					</optional>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
 					<ref name="DocDef"/>
 					<ref name="DataTypeDef"/>
 				</element>
@@ -366,13 +512,18 @@
 			<oneOrMore>
 				<element name="Event">
 					<attribute name="name">
-						<text/>
+						<data type="Name"/>
 					</attribute>
 					<optional>
 						<attribute name="optional">
 							<data type="boolean"/>
 						</attribute>
 					</optional>
+					<optional>
+						<attribute name="semanticURI">
+							<data type="anyURI"/>
+						</attribute>
+					</optional>
 					<ref name="DocDef"/>
 					<optional>
 						<ref name="Data" />
@@ -382,5 +533,50 @@
 		</element>
 	</define>
 
+
+	<define name="ExtendDef">
+			<element name="Extend">
+				<attribute name="domain">
+					<data type="Name"/>
+				</attribute>
+				<attribute name="entity">
+					<data type="Name"/>
+				</attribute>
+				<optional>
+					<choice>
+						<element name="Exclude">
+							<attribute name="name">
+								<data type="Name"/>
+							</attribute>
+							<attribute name="type">
+								<ref name="ExtendType" />
+							</attribute>
+						</element>
+						<element name="Include">
+							<attribute name="name">
+								<data type="Name"/>
+							</attribute>
+							<attribute name="type">
+								<ref name="ExtendType" />
+							</attribute>
+						</element>
+					</choice>
+				</optional>
+			</element>
+	</define>
+
+
+	<define name="ExtendType">
+		<choice>
+			<value>action</value>
+			<value>datapoint</value>
+			<value>event</value>
+			<value>moduleclass</value>
+			<value>property</value>
+			<value>device</value>
+			<value>subdevice</value>
+		</choice>
+	</define>
+
 </grammar>
 
diff --git a/SDT/schema4.0/src/domain.xsd b/SDT/schema4.0/src/domain.xsd
index 1071587ba52303129f853c45257b1fef7a7576e0..7759d6fd2c4a89609548e6777ad3ffb28b88a04f 100644
--- a/SDT/schema4.0/src/domain.xsd
+++ b/SDT/schema4.0/src/domain.xsd
@@ -9,28 +9,28 @@
   - See the license text at [https://opensource.org/licenses/BSD-3-Clause for
   - full details.
 -->
-<xs:schema targetNamespace="http://homegatewayinitiative.org/xml/dal/3.0" 
-	   xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
+<xs:schema targetNamespace="http://www.onem2m.org/xml/sdt/4.0" 
+	   xmlns="http://www.onem2m.org/xml/sdt/4.0" 
 	   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 	  
  elementFormDefault="qualified">
   <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
   <xs:element name="Domain">
     <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element minOccurs="0" ref="Imports"/>
-        <xs:element minOccurs="0" name="Modules">
-          <xs:complexType>
-            <xs:sequence>
-              <xs:element maxOccurs="unbounded" ref="ModuleClass"/>
-            </xs:sequence>
-          </xs:complexType>
-        </xs:element>
-        <xs:element minOccurs="0" ref="Devices"/>
-      </xs:sequence>
-      <xs:attribute ref="xml:base"/>
-      <xs:attribute name="id" use="required" type="xs:ID"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element minOccurs="0" ref="Imports"/>
+            <xs:element minOccurs="0" ref="DataTypes"/>
+            <xs:element minOccurs="0" ref="ModuleClasses"/>
+            <xs:element minOccurs="0" ref="DeviceClasses"/>
+            <xs:element minOccurs="0" ref="ProductClasses"/>
+          </xs:sequence>
+          <xs:attribute ref="xml:base"/>
+          <xs:attribute name="id" use="required" type="xs:Name"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
   <xs:element name="Imports">
@@ -40,40 +40,11 @@
       </xs:sequence>
     </xs:complexType>
   </xs:element>
-  <xs:element name="ModuleClass" type="ModuleDef"/>
-  <xs:element name="Devices">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element maxOccurs="unbounded" ref="Device"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="Device">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element minOccurs="0" ref="Properties"/>
-        <xs:element minOccurs="0" ref="Modules"/>
-        <xs:element minOccurs="0" ref="SubDevices"/>
-      </xs:sequence>
-      <xs:attribute name="id" use="required" type="xs:Name"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="SubDevices">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element maxOccurs="unbounded" ref="SubDevice"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="SubDevice">
+  <xs:element name="DataTypes">
     <xs:complexType>
       <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element minOccurs="0" ref="Properties"/>
-        <xs:element minOccurs="0" ref="Modules"/>
+        <xs:element maxOccurs="unbounded" ref="DataType"/>
       </xs:sequence>
-      <xs:attribute name="id" use="required" type="xs:Name"/>
     </xs:complexType>
   </xs:element>
   <xs:element name="Properties">
@@ -85,28 +56,40 @@
   </xs:element>
   <xs:element name="Property">
     <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element ref="SimpleType"/>
-      </xs:sequence>
-      <xs:attribute name="name" use="required"/>
-      <xs:attribute name="optional" type="xs:boolean"/>
-      <xs:attribute name="value"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element ref="SimpleType"/>
+          </xs:sequence>
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="optional" type="xs:boolean"/>
+          <xs:attribute name="value"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
   <xs:element name="DataType">
     <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:choice>
-          <xs:element ref="Struct"/>
-          <xs:element ref="Array"/>
-          <xs:element ref="SimpleType"/>
-        </xs:choice>
-        <xs:element minOccurs="0" ref="Constraints"/>
-      </xs:sequence>
-      <xs:attribute name="name"/>
-      <xs:attribute name="unitOfMeasure"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:choice>
+              <xs:element minOccurs="0" ref="Extend"/>
+              <xs:choice>
+                <xs:element ref="Struct"/>
+                <xs:element ref="Array"/>
+                <xs:element ref="SimpleType"/>
+                <xs:element ref="Enum"/>
+              </xs:choice>
+            </xs:choice>
+            <xs:element minOccurs="0" ref="Constraints"/>
+          </xs:sequence>
+          <xs:attribute name="name" type="xs:Name"/>
+          <xs:attribute name="unitOfMeasure"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
   <xs:element name="Struct">
@@ -128,6 +111,13 @@
       <xs:attribute name="type" use="required" type="BasicType"/>
     </xs:complexType>
   </xs:element>
+  <xs:element name="Enum">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" ref="EnumValue"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
   <xs:simpleType name="BasicType">
     <xs:restriction base="xs:token">
       <xs:enumeration value="integer"/>
@@ -136,14 +126,26 @@
       <xs:enumeration value="byte"/>
       <xs:enumeration value="float"/>
       <xs:enumeration value="array"/>
-      <xs:enumeration value="enum"/>
       <xs:enumeration value="date"/>
       <xs:enumeration value="time"/>
       <xs:enumeration value="datetime"/>
       <xs:enumeration value="blob"/>
       <xs:enumeration value="uri"/>
+      <xs:enumeration value="void"/>
     </xs:restriction>
   </xs:simpleType>
+  <xs:element name="EnumValue">
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="value" use="required"/>
+          <xs:attribute name="type" type="BasicType"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="Constraints">
     <xs:complexType>
       <xs:sequence>
@@ -153,10 +155,14 @@
   </xs:element>
   <xs:element name="Constraint">
     <xs:complexType>
-      <xs:group ref="DocDef"/>
-      <xs:attribute name="name" use="required"/>
-      <xs:attribute name="type" type="BasicType"/>
-      <xs:attribute name="value"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="type" type="BasicType"/>
+          <xs:attribute name="value"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
   <xs:group name="DocText">
@@ -172,11 +178,11 @@
   <xs:element name="b" type="xs:string"/>
   <xs:element name="tt" type="xs:string"/>
   <!-- <Doc> element is always optional -->
-  <xs:group name="DocDef">
+  <xs:complexType name="DocDef">
     <xs:sequence>
       <xs:element minOccurs="0" ref="Doc"/>
     </xs:sequence>
-  </xs:group>
+  </xs:complexType>
   <xs:element name="Doc">
     <xs:complexType mixed="true">
       <xs:choice>
@@ -202,32 +208,103 @@
     </xs:complexType>
   </xs:element>
   <xs:element name="caption" type="xs:string"/>
-  <xs:complexType name="ModuleDef">
-    <xs:sequence>
-      <xs:element minOccurs="0" ref="extends"/>
-      <xs:group ref="DocDef"/>
-      <xs:element minOccurs="0" ref="Properties"/>
-      <xs:element minOccurs="0" ref="Actions"/>
-      <xs:element minOccurs="0" ref="Data"/>
-      <xs:element minOccurs="0" ref="Events"/>
-    </xs:sequence>
-    <xs:attribute name="name" use="required"/>
-    <xs:attribute name="optional" type="xs:boolean"/>
-  </xs:complexType>
-  <xs:element name="extends">
+  <xs:element name="DeviceClasses">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" name="DeviceClass">
+          <xs:complexType>
+            <xs:complexContent>
+              <xs:extension base="DocDef">
+                <xs:sequence>
+                  <xs:element minOccurs="0" ref="Properties"/>
+                  <xs:element minOccurs="0" ref="ModuleClasses"/>
+                  <xs:element minOccurs="0" ref="SubDevices"/>
+                </xs:sequence>
+                <xs:attribute name="id" use="required" type="xs:Name"/>
+                <xs:attribute name="semanticURI" type="xs:anyURI"/>
+              </xs:extension>
+            </xs:complexContent>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="SubDevices">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" ref="SubDevice"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="SubDevice">
     <xs:complexType>
-      <xs:attribute name="domain" use="required" type="xs:IDREF"/>
-      <xs:attribute name="class" use="required"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element minOccurs="0" ref="Properties"/>
+            <xs:element minOccurs="0" ref="ModuleClasses"/>
+          </xs:sequence>
+          <xs:attribute name="id" use="required" type="xs:Name"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
-  <xs:element name="Modules">
+  <xs:element name="ModuleClasses">
     <xs:complexType>
       <xs:sequence>
-        <xs:element maxOccurs="unbounded" ref="Module"/>
+        <xs:element maxOccurs="unbounded" ref="ModuleClass"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
-  <xs:element name="Module" type="ModuleDef"/>
+  <xs:element name="ModuleClass">
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element minOccurs="0" ref="Extend"/>
+            <xs:element minOccurs="0" ref="Properties"/>
+            <xs:element minOccurs="0" ref="Actions"/>
+            <xs:element minOccurs="0" ref="Data"/>
+            <xs:element minOccurs="0" ref="Events"/>
+          </xs:sequence>
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="optional" type="xs:boolean"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="ProductClasses">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" ref="ProductClass"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="ProductClass">
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element minOccurs="0" ref="Extend"/>
+            <xs:element minOccurs="0" ref="Properties"/>
+            <xs:element minOccurs="0" ref="ModuleClasses"/>
+            <xs:element minOccurs="0" ref="SubDevices"/>
+            <xs:element minOccurs="0" name="DeviceClass">
+              <xs:complexType>
+                <xs:sequence>
+                  <xs:element ref="Extend"/>
+                </xs:sequence>
+              </xs:complexType>
+            </xs:element>
+          </xs:sequence>
+          <xs:attribute name="id" use="required" type="xs:Name"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="Actions">
     <xs:complexType>
       <xs:sequence>
@@ -237,13 +314,17 @@
   </xs:element>
   <xs:element name="Action">
     <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element minOccurs="0" ref="DataType"/>
-        <xs:element minOccurs="0" ref="Args"/>
-      </xs:sequence>
-      <xs:attribute name="name" use="required"/>
-      <xs:attribute name="optional" type="xs:boolean"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element minOccurs="0" ref="DataType"/>
+            <xs:element minOccurs="0" ref="Args"/>
+          </xs:sequence>
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="optional" type="xs:boolean"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
   <xs:element name="Args">
@@ -255,11 +336,17 @@
   </xs:element>
   <xs:element name="Arg">
     <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element ref="DataType"/>
-      </xs:sequence>
-      <xs:attribute name="name" use="required"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element ref="DataType"/>
+          </xs:sequence>
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="optional" type="xs:boolean"/>
+          <xs:attribute name="default"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
   <xs:element name="Data">
@@ -271,15 +358,20 @@
   </xs:element>
   <xs:element name="DataPoint">
     <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element ref="DataType"/>
-      </xs:sequence>
-      <xs:attribute name="name" use="required"/>
-      <xs:attribute name="optional" type="xs:boolean"/>
-      <xs:attribute name="writable" type="xs:boolean"/>
-      <xs:attribute name="readable" type="xs:boolean"/>
-      <xs:attribute name="eventable" type="xs:boolean"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element ref="DataType"/>
+          </xs:sequence>
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="optional" type="xs:boolean"/>
+          <xs:attribute name="writable" type="xs:boolean"/>
+          <xs:attribute name="readable" type="xs:boolean"/>
+          <xs:attribute name="eventable" type="xs:boolean"/>
+          <xs:attribute name="default"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
   <xs:element name="Events">
@@ -291,12 +383,49 @@
   </xs:element>
   <xs:element name="Event">
     <xs:complexType>
-      <xs:sequence>
-        <xs:group ref="DocDef"/>
-        <xs:element minOccurs="0" ref="Data"/>
-      </xs:sequence>
-      <xs:attribute name="name" use="required"/>
-      <xs:attribute name="optional" type="xs:boolean"/>
+      <xs:complexContent>
+        <xs:extension base="DocDef">
+          <xs:sequence>
+            <xs:element minOccurs="0" ref="Data"/>
+          </xs:sequence>
+          <xs:attribute name="name" use="required" type="xs:Name"/>
+          <xs:attribute name="optional" type="xs:boolean"/>
+          <xs:attribute name="semanticURI" type="xs:anyURI"/>
+        </xs:extension>
+      </xs:complexContent>
     </xs:complexType>
   </xs:element>
+  <xs:element name="Extend">
+    <xs:complexType>
+      <xs:choice minOccurs="0">
+        <xs:element ref="Exclude"/>
+        <xs:element ref="Include"/>
+      </xs:choice>
+      <xs:attribute name="domain" use="required" type="xs:Name"/>
+      <xs:attribute name="entity" use="required" type="xs:Name"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="Exclude">
+    <xs:complexType>
+      <xs:attribute name="name" use="required" type="xs:Name"/>
+      <xs:attribute name="type" use="required" type="ExtendType"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="Include">
+    <xs:complexType>
+      <xs:attribute name="name" use="required" type="xs:Name"/>
+      <xs:attribute name="type" use="required" type="ExtendType"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:simpleType name="ExtendType">
+    <xs:restriction base="xs:token">
+      <xs:enumeration value="action"/>
+      <xs:enumeration value="datapoint"/>
+      <xs:enumeration value="event"/>
+      <xs:enumeration value="moduleclass"/>
+      <xs:enumeration value="property"/>
+      <xs:enumeration value="device"/>
+      <xs:enumeration value="subdevice"/>
+    </xs:restriction>
+  </xs:simpleType>
 </xs:schema>
diff --git a/SDT/schema4.0/style/html.xsl b/SDT/schema4.0/style/html.xsl
index 8492bede0498eaebf0ce370eebb95cee9af73311..6b2bcf2dea9d9bdf072de2af1a5287d8b7c0dcf4 100644
--- a/SDT/schema4.0/style/html.xsl
+++ b/SDT/schema4.0/style/html.xsl
@@ -8,7 +8,7 @@
        document ... -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-		xmlns:dal="http://homegatewayinitiative.org/xml/dal/2.0"
+		xmlns:dal="http://www.onem2m.org/xml/sdt/4.0"
 		xmlns="http://www.w3.org/1999/xhtml"
 		
 		xmlns:redirect="http://xml.apache.org/xalan/redirect" 
diff --git a/SDT/schema4.0/test/EchonetLiteExamples.xml b/SDT/schema4.0/test/EchonetLiteExamples.xml
index 76f7d8451fae82a4eada7a8cf527d7bc418c2042..e87de7a63e29f9275de5db6a4592c2b17bac490c 100644
--- a/SDT/schema4.0/test/EchonetLiteExamples.xml
+++ b/SDT/schema4.0/test/EchonetLiteExamples.xml
@@ -3,13 +3,13 @@
 <!-- Example SDT definition taken from EchonetLite https://github.com/ECHONET-Consortium -->
 
 
-<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
+<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example.based.on.echonetLite">
 
   <!-- Various examples for module classes -->
 
-	<Modules>
+	<ModuleClasses>
 		<ModuleClass name="operationStatus">
 			<Data>
 				<DataPoint name="operationStatus" readable="true" writable="true">
@@ -62,13 +62,13 @@
 				</DataPoint>
 			</Data>
 		</ModuleClass>
-	</Modules>
+	</ModuleClasses>
 	
 
   <!-- Very simple example for a washing machine definition -->
 
-	<Devices>
-		<Device id="SimpleWaschingMachine">
+	<DeviceClasses>
+		<DeviceClass id="SimpleWaschingMachine">
 			<Properties>
 				<Property name="Name" value="washing machine">
 					<SimpleType type="string" />
@@ -78,28 +78,28 @@
 				</Property>
 			</Properties>
 
-			<Modules>
+			<ModuleClasses>
 				
 				<!-- Inheriting ModuleClasses from the global generic ModuleClasses -->
 
-				<Module name="installationLocation">
-					<extends domain="example.based.on.echonetLite" class="installationLocation"/>
-				</Module>
+				<ModuleClass name="installationLocation">
+					<Extend domain="example.based.on.echonetLite" entity="installationLocation"/>
+				</ModuleClass>
 
-				<Module name="measuredInstantaneousPowerConsumption">
-					<extends domain="example.based.on.echonetLite" class="measuredInstantaneousPowerConsumption"/>
-				</Module>
+				<ModuleClass name="measuredInstantaneousPowerConsumption">
+					<Extend domain="example.based.on.echonetLite" entity="measuredInstantaneousPowerConsumption"/>
+				</ModuleClass>
 
-				<Module name="temperatureSensorDataPoints">
-					<extends domain="example.based.on.echonetLite" class="temperatureSensorDataPoints"/>
-				</Module>
+				<ModuleClass name="temperatureSensorDataPoints">
+					<Extend domain="example.based.on.echonetLite" entity="temperatureSensorDataPoints"/>
+				</ModuleClass>
 
 
 				<!-- The following Module inherits and extends a global generic 		 ModuleClass with an event. Therefore, it is renamed to express
 					 the change of name. -->
 
-				<Module name="washingMachineOperationStatus">
-					<extends domain="example.based.on.echonetLite" class="operationStatus"/>
+				<ModuleClass name="washingMachineOperationStatus">
+					<Extend domain="example.based.on.echonetLite" entity="operationStatus"/>
 
 					<!-- This Module extends the global one with an event. -->
 
@@ -109,29 +109,32 @@
 						</Event>
 					</Events>
 
-				</Module>
+				</ModuleClass>
 
 
 				<!-- Data points local to the washing machine device -->
 
-				<Module name="washingMachineDataPoints">
+				<ModuleClass name="washingMachineDataPoints">
 					<Data>
-						<DataPoint name="door/CoverOpen/CloseStatus" readable="true" writable="false">
+						<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">
@@ -166,8 +170,8 @@
 						</DataPoint>
 						
 					</Data>
-				</Module>
-			</Modules>
-		</Device>
-	</Devices>
+				</ModuleClass>
+			</ModuleClasses>
+		</DeviceClass>
+	</DeviceClasses>
 </Domain>
diff --git a/SDT/schema4.0/test/action-test.xml b/SDT/schema4.0/test/action-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a3d74fa6d9ec47b13e81612f999ff77ea1a0e62c
--- /dev/null
+++ b/SDT/schema4.0/test/action-test.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the data types references -->
+
+<Domain id="action-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+	<ModuleClasses>
+		<ModuleClass name="TestActions">
+			<Actions>
+				<Action name="testActionOptional" optional="true">
+				</Action>
+			</Actions>
+		</ModuleClass>
+	</ModuleClasses>
+
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/arg-test.xml b/SDT/schema4.0/test/arg-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5d6261dd6b22120f7cdea8134d287abfe552383a
--- /dev/null
+++ b/SDT/schema4.0/test/arg-test.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the data types references -->
+
+<Domain id="arg-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+	<ModuleClasses>
+		<ModuleClass name="TestArg">
+			<Actions>
+				<Action name="testActionOptional">
+					<Args>
+						<Arg name="argMandatory">
+							<DataType>
+								<SimpleType type="boolean" />
+							</DataType>
+						</Arg>
+						<Arg name="argOptional" optional="true">
+							<DataType>
+								<SimpleType type="boolean" />
+							</DataType>
+						</Arg>
+					</Args>
+				</Action>
+				<Action name="testActionDefault">
+					<Args>
+						<Arg name="arg1" default="true">
+							<DataType>
+								<SimpleType type="boolean" />
+							</DataType>
+						</Arg>
+						<Arg name="arg2" default="foo">
+							<DataType>
+								<SimpleType type="string" />
+							</DataType>
+						</Arg>
+					</Args>
+				</Action>
+			</Actions>
+		</ModuleClass>
+	</ModuleClasses>
+
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/dal-core.xml b/SDT/schema4.0/test/dal-core.xml
index 65ec652d501ec799914a79bafa998b557b28791b..e270b6f849c637866ba9d35a11f9c48da9de0fd1 100644
--- a/SDT/schema4.0/test/dal-core.xml
+++ b/SDT/schema4.0/test/dal-core.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
-	id="hgi.dal.core">
+<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0" 
+	id="dal.core">
 
-	<Modules>
+	<ModuleClasses>
 		<ModuleClass name="BooleanState">
 			<Doc>
 				<tt>BooleanState</tt> is the preferred module for modelling a
@@ -32,6 +32,6 @@
 				</Action>
 			</Actions>
 		</ModuleClass>
-	</Modules>
+	</ModuleClasses>
 
 </Domain>
diff --git a/SDT/schema4.0/test/dal-eg.xml b/SDT/schema4.0/test/dal-eg.xml
index 60a5b87029febb0e4fecadef0c8104741fb24517..a29d7e0a63af3177d38e9bd7de5a68338c402ccd 100644
--- a/SDT/schema4.0/test/dal-eg.xml
+++ b/SDT/schema4.0/test/dal-eg.xml
@@ -1,83 +1,56 @@
 <?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" 
-	id="com.telekom">
-
-  <Imports>
-    <xi:include href="./dal-core.xml" parse="xml" />
-  </Imports>
-
-  <Devices>
-
-    <Device id="switch.power">
-      
-      <Doc>
-	This device is intended as a demonstration of how to use the
-	abstract modules defined in the <em>HGI Core</em> domain. The
-	vendor has provided a proprietry module with two operations
-	<tt>on</tt> and <tt>off</tt>. This is clearly a candidate for the 
-	module class <tt>BooleanState</tt>.
-      </Doc>
-      <Properties>
-      	<Property name="Name">
-		  <Doc>Original value: PowerSwitch</Doc>
-		  <SimpleType type="string" />
-		</Property>
-
-		<!-- The Vendor field should probably be part of the domain -->
-      	<Property name="Vendor">
-      	  <Doc>Original value: Telekom Innovation Laboratories</Doc>
-	  	  <SimpleType type="string" />
-		</Property>
-      </Properties>
-
-      <Modules>
-	<Module name="proprietaryPower">
-	  <Doc>
-	    The proprietry interface for turning the switch on and off. 
-	    Actions for setting the state to <tt>on</tt> or <tt>off</tt> 
-	    and for querying the state.
-	  </Doc>
-
-	  <Actions>
-	    <Action name="on">
-	      <Doc>
-		Turn the switch on.
-	      </Doc>
-	    </Action>
-	    <Action name="off">
-	      <Doc>
-		Turn the switch off.
-	      </Doc>
-	    </Action>
-	    <Action name="state">
-		  	<Doc>Query the state of the switch. Returns the string "<tt>on</tt>" or "<tt>off</tt>".</Doc>
-		  	<DataType>
-	           	<SimpleType type="string" />
-	        </DataType>
-	    </Action>
-	  </Actions>
-
-	  <Events>
-	  	<Event name="switchEvent">
-		  <Doc>An event that indicates the new state of the switch.
-		  </Doc>
-		  <Data>
-		    <DataPoint name="state" writable="false">
-		      <DataType>
-		          <SimpleType type="boolean" />
-		      </DataType>
-	 		</DataPoint>
-		  </Data>
-	  	</Event>
-	  </Events>
-	</Module>
-
-	<Module name="power">
-	  <extends domain="hgi.dal.core" class="BooleanState"/>
-	</Module>
-      </Modules>
-    </Device>
-  </Devices>
-</Domain>
+<Domain id="com.telekom" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+	<Imports>
+		<xi:include href="./dal-core.xml" parse="xml"/>
+	</Imports>
+	<DeviceClasses>
+		<DeviceClass id="switch.power">
+			<Doc>This device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em>	domain. The vendor has provided a proprietry module with two operations	<tt>on</tt>	and <tt>off</tt>. This is clearly a candidate for the module class <tt>BooleanState</tt>.</Doc>
+			<Properties>
+				<Property name="Name">
+					<Doc>Original value: PowerSwitch</Doc>
+					<SimpleType type="string"/>
+				</Property>
+				<!-- The Vendor field should probably be part of the domain -->
+				<Property name="Vendor">
+					<Doc>Original value: Telekom Innovation Laboratories</Doc>
+					<SimpleType type="string"/>
+				</Property>
+			</Properties>
+			<ModuleClasses>
+				<ModuleClass name="proprietaryPower">
+					<Doc>The proprietry interface for turning the switch on and off.  Actions for setting the state to <tt>on</tt> or <tt>off</tt>and for querying the state.</Doc>
+					<Actions>
+						<Action name="on">
+							<Doc>Turn the switch on.</Doc>
+						</Action>
+						<Action name="off">
+							<Doc>Turn the switch off.</Doc>
+						</Action>
+						<Action name="state">
+							<Doc>Query the state of the switch. Returns the string &quot;<tt>on</tt>&quot; or &quot;<tt>off</tt>&quot;.</Doc>
+							<DataType>
+								<SimpleType type="string"/>
+							</DataType>
+						</Action>
+					</Actions>
+					<Events>
+						<Event name="switchEvent">
+							<Doc>An event that indicates the new state of the switch.</Doc>
+							<Data>
+								<DataPoint name="state" writable="false">
+									<DataType>
+										<SimpleType type="boolean"/>
+									</DataType>
+								</DataPoint>
+							</Data>
+						</Event>
+					</Events>
+				</ModuleClass>
+				<ModuleClass name="power">
+					<Extend entity="BooleanState" domain="hgi.dal.core"/>
+				</ModuleClass>
+			</ModuleClasses>
+		</DeviceClass>
+	</DeviceClasses>
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/datapoint-test.xml b/SDT/schema4.0/test/datapoint-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6100a5dec8126e2735960cf6fde3f1c06fce6cef
--- /dev/null
+++ b/SDT/schema4.0/test/datapoint-test.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the EnumType -->
+
+<Domain id="datapoint-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+	<ModuleClasses>
+		<ModuleClass name="TestDataPoint">
+			<Data>
+				<DataPoint name="TestDataPoint" optional="true" default="foo">
+					<DataType>
+						<SimpleType type="string" />
+					</DataType>
+				</DataPoint>
+			</Data>
+		</ModuleClass>
+	</ModuleClasses>
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/datatypes-test.xml b/SDT/schema4.0/test/datatypes-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..80f9071e69a4c28a0d543c9f1718e0310f183c09
--- /dev/null
+++ b/SDT/schema4.0/test/datatypes-test.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the data types references -->
+
+<Domain id="datatypes-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+	<DataTypes>
+		<DataType name="temperatureType" unitOfMeasure="C">
+			<SimpleType type="float"/>
+		</DataType>
+		<DataType name="anEnumType">
+			<Enum>
+				<EnumValue name="red" type="integer" value="1"/>
+				<EnumValue name="green" value="2"/>
+				<EnumValue name="blue" value="3"/>
+			</Enum>
+		</DataType>
+	</DataTypes>
+
+	<ModuleClasses>
+		<ModuleClass name="TestDataTypes">
+			<Data>
+				<DataPoint name="TestDataPoint" writable="true">
+					<DataType>
+						<Extend domain="datatypes-test" entity="temperatureType" />
+					</DataType>
+				</DataPoint>
+			</Data>
+		</ModuleClass>
+	</ModuleClasses>
+
+
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/deviceClass-test.xml b/SDT/schema4.0/test/deviceClass-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1500f3dfe006ca081f36fef665a790ef5e96a5c0
--- /dev/null
+++ b/SDT/schema4.0/test/deviceClass-test.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" id="deviceClass.test" >
+	<Imports>
+		<xi:include href="./dal-core.xml" parse="xml"/>
+	</Imports>
+	<DeviceClasses>
+		<DeviceClass id="Test">
+			<Doc>This is a test device.</Doc>
+			<Properties>
+				<Property name="aProperty">
+					<SimpleType type="string"></SimpleType>
+				</Property>
+			</Properties>
+			<ModuleClasses>
+				<ModuleClass name="aModuleClass">
+					<Extend domain="hgi.dal.core" entity="BooleanState" />
+				</ModuleClass>
+			</ModuleClasses>
+		</DeviceClass>
+	</DeviceClasses>
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/enumtype-test.xml b/SDT/schema4.0/test/enumtype-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c4fc806401c7cd46aae68ea92aaa7e7d1be22dbd
--- /dev/null
+++ b/SDT/schema4.0/test/enumtype-test.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the EnumType -->
+
+<Domain id="enumtype-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+	<ModuleClasses>
+		<ModuleClass name="TestEnumType">
+			<Data>
+				<DataPoint name="TestEnumTypeDataPoint" writable="true">
+					<DataType>
+						<Enum>
+							<EnumValue name="red" value="1" type="integer" />
+							<EnumValue name="green" value="2" />
+							<EnumValue name="blue" value="3" />
+						</Enum>
+					</DataType>
+				</DataPoint>
+			</Data>
+		</ModuleClass>
+	</ModuleClasses>
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/example1.SDT.xml b/SDT/schema4.0/test/example1.SDT.xml
index fb922d8948fba620499300c4757d5c1ee404c147..f263033e397e6d22b3c5bec6784ef2ee7137dafe 100644
--- a/SDT/schema4.0/test/example1.SDT.xml
+++ b/SDT/schema4.0/test/example1.SDT.xml
@@ -1,10 +1,10 @@
 <?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://www.onem2m.org/xml/sdt/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example1.SDT">
 
-	<Modules>
+	<ModuleClasses>
 
 		<!-- Various examples for module classes -->
 		<ModuleClass name="operationStatus">
@@ -70,6 +70,6 @@
 			</Data>
 		</ModuleClass>
 
-	</Modules>
+	</ModuleClasses>
 
 </Domain>
diff --git a/SDT/schema4.0/test/example2.SDT.xml b/SDT/schema4.0/test/example2.SDT.xml
index 82090f7174a241b2fe3f9912cc88dabb236af38e..0034465f79b61f48a665afd5768d5448c4fa2602 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://www.onem2m.org/xml/sdt/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example2.SDT">
 
@@ -8,25 +8,25 @@
         <xi:include href="./example1.SDT.xml" parse="xml" />
     </Imports>
 
-	<Devices>
-		<Device id="airConditioner">
-			<Modules>
-				<Module name="operationStatus">
-					<extends domain="example1.SDT" class="operationStatus"/>
-				</Module>
-				<Module name="installationLocation">
-					<extends domain="example1.SDT" class="installationLocation"/>
-				</Module>
-				<Module name="measuredCumulativePowerConsumption">
-					<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
-				</Module>
-				<Module name="measuredCumulativePowerConsumption">
-					<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
-				</Module>
-				<Module name="onTimerSetting">
-					<extends domain="example1.SDT" class="onTimerSetting"/>
-				</Module>
-			</Modules>
-		</Device>
-	</Devices>
+	<DeviceClasses>
+		<DeviceClass id="airConditioner">
+			<ModuleClasses>
+				<ModuleClass name="operationStatus">
+					<Extend domain="example1.SDT" entity="operationStatus"/>
+				</ModuleClass>
+				<ModuleClass name="installationLocation">
+					<Extend domain="example1.SDT" entity="installationLocation"/>
+				</ModuleClass>
+				<ModuleClass name="measuredCumulativePowerConsumption">
+					<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
+				</ModuleClass>
+				<ModuleClass name="measuredCumulativePowerConsumption">
+					<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
+				</ModuleClass>
+				<ModuleClass name="onTimerSetting">
+					<Extend domain="example1.SDT" entity="onTimerSetting"/>
+				</ModuleClass>
+			</ModuleClasses>
+		</DeviceClass>
+	</DeviceClasses>
 </Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/example3.SDT.xml b/SDT/schema4.0/test/example3.SDT.xml
index cb3c1836f61578cfb6103d9eae2e5a9183f61967..a3ce2605d45b7a066eca9481ecb32d6f6745839c 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://www.onem2m.org/xml/sdt/4.0"
 	xmlns:xi="http://www.w3.org/2001/XInclude"
 	id="example3.SDT">
 
@@ -8,28 +8,28 @@
         <xi:include href="./example1.SDT.xml" parse="xml" />
     </Imports>
 
-	<Devices>
-		<Device id="waschingMachine">
-			<Modules>
-				<Module name="operationStatus">
-					<extends domain="example1.SDT" class="operationStatus"/>
-				</Module>
-				<Module name="installationLocation">
-					<extends domain="example1.SDT" class="installationLocation"/>
-				</Module>
-				<Module name="measuredCumulativePowerConsumption">
-					<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
-				</Module>
-				<Module name="measuredCumulativePowerConsumption">
-					<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
-				</Module>
-				<Module name="onTimerSetting">
-					<extends domain="example1.SDT" class="onTimerSetting"/>
-				</Module>
-				<Module name="statusDoor">
-					<extends domain="example1.SDT" class="statusDoor"/>
-				</Module>
-			</Modules>
-		</Device>
-	</Devices>
+	<DeviceClasses>
+		<DeviceClass id="waschingMachine">
+			<ModuleClasses>
+				<ModuleClass name="operationStatus">
+					<Extend domain="example1.SDT" entity="operationStatus"/>
+				</ModuleClass>
+				<ModuleClass name="installationLocation">
+					<Extend domain="example1.SDT" entity="installationLocation"/>
+				</ModuleClass>
+				<ModuleClass name="measuredCumulativePowerConsumption">
+					<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
+				</ModuleClass>
+				<ModuleClass name="measuredCumulativePowerConsumption">
+					<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
+				</ModuleClass>
+				<ModuleClass name="onTimerSetting">
+					<Extend domain="example1.SDT" entity="onTimerSetting"/>
+				</ModuleClass>
+				<ModuleClass name="statusDoor">
+					<Extend domain="example1.SDT" entity="statusDoor"/>
+				</ModuleClass>
+			</ModuleClasses>
+		</DeviceClass>
+	</DeviceClasses>
 </Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/extends-test.xml b/SDT/schema4.0/test/extends-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f7e8b884b3e56b6a72852a4fcab621352f6f1611
--- /dev/null
+++ b/SDT/schema4.0/test/extends-test.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the extends element -->
+
+<Domain id="extend-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+	<ModuleClasses>
+		<ModuleClass name="TestExtendsParent">
+			<Data>
+				<DataPoint name="TestExtendsDataPoint1" writable="true">
+					<DataType>
+						<SimpleType type="integer" />
+					</DataType>
+				</DataPoint>
+				<DataPoint name="TestExtendsDataPoint2" writable="true">
+					<DataType>
+						<SimpleType type="integer" />
+					</DataType>
+				</DataPoint>
+			</Data>
+		</ModuleClass>
+		<ModuleClass name="TestExtendsChild">
+			<Extend domain="extend-test" entity="TestExtendsParent">
+				<Exclude name="TestExtendsDataPoint2" type="datapoint" />
+			</Extend>
+			<Data>
+				<DataPoint name="TestExtendsDataPoint3" writable="true">
+					<DataType>
+						<SimpleType type="integer" />
+					</DataType>
+				</DataPoint>
+			</Data>
+		</ModuleClass>
+	</ModuleClasses>
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/mseeb.xml b/SDT/schema4.0/test/mseeb.xml
index 04dacf7655c7b11878c841b925df595adcf44ba8..c729380aed91f7ffca0a21348eec5272f1a51a08 100644
--- a/SDT/schema4.0/test/mseeb.xml
+++ b/SDT/schema4.0/test/mseeb.xml
@@ -5,7 +5,7 @@
 <!--
 
 +................................................+
-:Domain:org.homegatewayinitiative                                  :
+:Domain:org.onem2m                               :
 :                                                :
 :  +..........................................+  :
 :  :Module:BooleanState                       :  :
@@ -62,8 +62,8 @@
 
 -->
 <Domain xmlns:xi="http://www.w3.org/2001/XInclude"
-    xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
-    id="org.homegatewayinitiative">
+    xmlns="http://www.onem2m.org/xml/sdt/4.0" 
+    id="org.onem2m">
 
 <!-- The following import statements include ModuleClasses from HGI -->
 
@@ -71,7 +71,7 @@
         <xi:include href="./dal-core.xml" parse="xml" />
     </Imports>
 
-    <Modules>
+    <ModuleClasses>
         <ModuleClass name="BooleanState">
             <Doc>
                 <tt>BooleanState</tt> is the preferred module for modelling a functionality corresponding to an underlying binary state.This module should be used to abstract away from the actual datatype and values in question. Note that the module does not define whether the execution mode is blocking or non-blocking.
@@ -113,15 +113,15 @@
                 </Event>      
           </Events>
         </ModuleClass>
-    </Modules>
+    </ModuleClasses>
 
 <!-- Definition of the Device starts here. -->
 
-    <Devices>
+    <DeviceClasses>
 
 <!-- The Device contains several sub-devices and offers one action on its own. -->
 
-        <Device id="MSEEB.root">
+        <DeviceClass id="MSEEB.root">
             <Doc>
                 This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
             </Doc>
@@ -139,7 +139,7 @@
                   <SimpleType type="string" />
                 </Property>
                 <Property name="VendorURL">
-                  <Doc>Original value: http://www.homegatewayinitative.org</Doc>
+                  <Doc>Original value: http://www.onem2m.org</Doc>
                   <SimpleType type="uri" />
                 </Property>
                 <Property name="SerialNumber">
@@ -153,21 +153,21 @@
     - A module with some data points for the firmware version of the whole device and a list of names of the containted power switches.
 -->
 
-            <Modules>
-                <Module name="rootPowerOnOff" optional="true">
-                    <extends domain="hgi.dal.core" class="BooleanState"/>
+            <ModuleClasses>
+                <ModuleClass name="rootPowerOnOff" optional="true">
                     <Doc>
                         The proprietry interface for turning all switches of the extension block on and off. 
                         The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false".
                     </Doc>
+                    <Extend domain="hgi.dal.core" entity="BooleanState"/>
                     <Properties>
                         <Property name="version" value="1.0.0">
                             <Doc>Version for this ModuleClass</Doc>
                             <SimpleType type="string" />
                         </Property>
                     </Properties>
-                </Module>
-                <Module name="power">
+                </ModuleClass>
+                <ModuleClass name="power">
                     <Actions>
                     	<Action name="getPowerConsumption">
                             <Doc>Get the power consumption.</Doc>
@@ -200,9 +200,9 @@
                             </DataType>
                     	</Action>
                     </Actions>
-                </Module>
+                </ModuleClass>
 
-                <Module name="extensionBlockDataPoints">
+                <ModuleClass name="extensionBlockDataPoints">
                     <Actions>
                         <Action name="getNames">
                             <DataType name="names">
@@ -241,8 +241,8 @@
                             </DataType>
                         </DataPoint>
                     </Data>
-                </Module>
-            </Modules>
+                </ModuleClass>
+            </ModuleClasses>
 
 <!-- Definition of sub-devices starts here. -->
 
@@ -263,11 +263,11 @@
                             <SimpleType type="string" />
                         </Property>
                     </Properties>
-                    <Modules>
-                        <Module name="power">
-                            <extends domain="hgi.dal.core" class="BooleanState"/>
-                        </Module>
-                    </Modules>
+                    <ModuleClasses>
+                        <ModuleClass name="power">
+                            <Extend domain="hgi.dal.core" entity="BooleanState"/>
+                        </ModuleClass>
+                    </ModuleClasses>
                 </SubDevice>
 
 <!-- This is the second power switch of the extension block. -->
@@ -283,22 +283,22 @@
                         <Property name="Vendor" value="HGI">
                             <SimpleType type="string" />
                         </Property>
-                        <Property name="VendorURL" value="http://homegatwaysinitiative.org">
+                        <Property name="VendorURL" value="http://www.onem2m.org">
                             <SimpleType type="uri" />
                         </Property>
                         <Property name="maximumAltitude" value="2800">
                             <SimpleType type="integer" />
                         </Property>
                     </Properties>
-                    <Modules>
-                        <Module name="power">
-                            <extends domain="hgi.dal.core" class="BooleanState"/>
-                        </Module>
-                    </Modules>
+                    <ModuleClasses>
+                        <ModuleClass name="power">
+                            <Extend domain="hgi.dal.core" entity="BooleanState"/>
+                        </ModuleClass>
+                    </ModuleClasses>
                 </SubDevice>
 
             </SubDevices>
 
-        </Device>
-    </Devices>
+        </DeviceClass>
+    </DeviceClasses>
 </Domain>
diff --git a/SDT/schema4.0/test/productClass-test.xml b/SDT/schema4.0/test/productClass-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..52b5a6660f7450bbff36a0e04c823ea1ecb4d868
--- /dev/null
+++ b/SDT/schema4.0/test/productClass-test.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" id="productClass-test" >
+	<ProductClasses>
+		<ProductClass id="TestProductClass" semanticURI="http://example.com/TestProduct.rdf">
+			<Doc>This is a test product</Doc>
+			<Properties>
+				<Property name="aProperty">
+					<SimpleType type="string"></SimpleType>
+				</Property>
+			</Properties>
+			<ModuleClasses>
+				<ModuleClass name="aModuleClass">
+					<Extend domain="hgi.dal.core" entity="BooleanState" />
+				</ModuleClass>
+			</ModuleClasses>
+			<SubDevices>
+				<SubDevice id="aSubDevice">
+					<ModuleClasses>
+						<ModuleClass name="aSubDeviceModuleClass">
+							<Extend domain="hgi.dal.core" entity="BooleanState"/>
+						</ModuleClass>
+					</ModuleClasses>
+				</SubDevice>
+			</SubDevices>
+			<DeviceClass>
+				<Extend domain="deviceClass.test" entity="Test" />
+			</DeviceClass>
+		</ProductClass>
+
+		<!-- Derived ProductClass -->
+
+		<ProductClass id="DerivedProductClass" semanticURI="http://example.com/DerivedProduct.rdf">
+			<Extend domain="productClass.test" entity="TestProductClass" />
+			<ModuleClasses>
+				<ModuleClass name="anotherModuleClass">
+					<Extend domain="hgi.dal.core" entity="BooleanState" />
+				</ModuleClass>
+			</ModuleClasses>
+		</ProductClass>
+	</ProductClasses>
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/semanticURI-test.xml b/SDT/schema4.0/test/semanticURI-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9a4a3518ebe5a8e0c7d2989e01622f27d72f7a9a
--- /dev/null
+++ b/SDT/schema4.0/test/semanticURI-test.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the data types references -->
+
+<Domain id="semanticURI-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" semanticURI="http://example.com/semanticURI-test.rdf">
+	<DataTypes>
+		<DataType name="temperatureType" unitOfMeasure="C" semanticURI="http://example.com/temperatureType.rdf">
+			<SimpleType type="float"/>
+		</DataType>
+		<DataType name="anEnumType" semanticURI="http://example.com/anEnumType.rdf">
+			<Enum>
+				<EnumValue name="red" type="integer" value="1" semanticURI="http://example.com/anEnumType-red.rdf"/>
+				<EnumValue name="green" value="2" semanticURI="http://example.com/anEnumType-green.rdf"/>
+				<EnumValue name="blue" value="3" semanticURI="http://example.com/anEnumType-blue.rdf"/>
+			</Enum>
+		</DataType>
+	</DataTypes>
+
+	<ModuleClasses>
+		<ModuleClass name="TestDataTypes" semanticURI="http://example.com/TestDataTypes.rdf">
+			<Data>
+				<DataPoint name="TestDataPoint" writable="true" semanticURI="http://example.com/TestDataPoint.rdf">
+					<DataType>
+						<Extend domain="datatypes-test" entity="temperatureType" />
+					</DataType>
+				</DataPoint>
+			</Data>
+		</ModuleClass>
+	</ModuleClasses>
+
+
+</Domain>
\ No newline at end of file
diff --git a/SDT/schema4.0/test/void-test.xml b/SDT/schema4.0/test/void-test.xml
new file mode 100644
index 0000000000000000000000000000000000000000..32b836bf511f6508e17abbae2d09b4029a2b1fca
--- /dev/null
+++ b/SDT/schema4.0/test/void-test.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Test the void BasicType -->
+
+<Domain id="void-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+	<ModuleClasses>
+		<ModuleClass name="TestVoid">
+			<Actions>
+				<Action name="TestVoidAction">
+					<DataType>
+						<SimpleType type="void"/>
+					</DataType>
+				</Action>
+			</Actions>
+			<Data>
+				<DataPoint name="TestVoidDataPoint" writable="true">
+					<DataType>
+						<SimpleType type="void"/>
+					</DataType>
+				</DataPoint>
+			</Data>
+		</ModuleClass>
+	</ModuleClasses>
+</Domain>
\ No newline at end of file