Skip to content
Snippets Groups Projects
Commit 3808e367 authored by ankraft's avatar ankraft
Browse files

Added minOccurs/maxOccurs to xsd. Added test xml

parent 79fc6991
No related tags found
No related merge requests found
...@@ -109,6 +109,8 @@ SubDevicesRef = ...@@ -109,6 +109,8 @@ SubDevicesRef =
element SubDevice { element SubDevice {
attribute id { xsd:Name }, attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?, attribute semanticURI { xsd:anyURI }?,
attribute minOccurs { text }?,
attribute maxOccurs { text }?,
DocDef, DocDef,
PropertiesDef?, PropertiesDef?,
ModuleClassesDef? ModuleClassesDef?
...@@ -120,6 +122,8 @@ ModuleClassesDef = ...@@ -120,6 +122,8 @@ ModuleClassesDef =
attribute name { xsd:Name }, attribute name { xsd:Name },
attribute optional { xsd:boolean }?, attribute optional { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?, attribute semanticURI { xsd:anyURI }?,
attribute minOccurs { text }?,
attribute maxOccurs { text }?,
DocDef, DocDef,
ExtendDef?, ExtendDef?,
PropertiesDef?, PropertiesDef?,
......
...@@ -314,6 +314,16 @@ ...@@ -314,6 +314,16 @@
<data type="anyURI"/> <data type="anyURI"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="minOccurs">
<text/>
</attribute>
</optional>
<optional>
<attribute name="maxOccurs">
<text/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<optional> <optional>
<ref name="PropertiesDef"/> <ref name="PropertiesDef"/>
...@@ -344,6 +354,16 @@ ...@@ -344,6 +354,16 @@
<data type="anyURI"/> <data type="anyURI"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="minOccurs">
<text/>
</attribute>
</optional>
<optional>
<attribute name="maxOccurs">
<text/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<optional> <optional>
<ref name="ExtendDef" /> <ref name="ExtendDef" />
......
...@@ -247,6 +247,8 @@ ...@@ -247,6 +247,8 @@
</xs:sequence> </xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/> <xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/> <xs:attribute name="semanticURI" type="xs:anyURI"/>
<xs:attribute name="minOccurs"/>
<xs:attribute name="maxOccurs"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -272,6 +274,8 @@ ...@@ -272,6 +274,8 @@
<xs:attribute name="name" use="required" type="xs:Name"/> <xs:attribute name="name" use="required" type="xs:Name"/>
<xs:attribute name="optional" type="xs:boolean"/> <xs:attribute name="optional" type="xs:boolean"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/> <xs:attribute name="semanticURI" type="xs:anyURI"/>
<xs:attribute name="minOccurs"/>
<xs:attribute name="maxOccurs"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
......
<?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="min-mac-occurs-test" >
<DeviceClasses>
<DeviceClass id="Test">
<Doc>This is a test device.</Doc>
<SubDevices>
<SubDevice id="aSubDevice" minOccurs="1" maxOccurs="unbound">
<ModuleClasses>
<ModuleClass name="aSubDeviceModuleClass" minOccurs="0" maxOccurs="10">
</ModuleClass>
</ModuleClasses>
</SubDevice>
</SubDevices>
</DeviceClass>
</DeviceClasses>
</Domain>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment