diff --git a/SDT/schema4.0/etc/domain.rnc b/SDT/schema4.0/etc/domain.rnc index 35adcaa351d8d6edbfbb410a9d4c9f9f10b1ccc4..0b1a4d113ffbf52a2dc817fea14bc32e69961ffc 100644 --- a/SDT/schema4.0/etc/domain.rnc +++ b/SDT/schema4.0/etc/domain.rnc @@ -109,6 +109,8 @@ SubDevicesRef = element SubDevice { attribute id { xsd:Name }, attribute semanticURI { xsd:anyURI }?, + attribute minOccurs { text }?, + attribute maxOccurs { text }?, DocDef, PropertiesDef?, ModuleClassesDef? @@ -120,6 +122,8 @@ ModuleClassesDef = attribute name { xsd:Name }, attribute optional { xsd:boolean }?, attribute semanticURI { xsd:anyURI }?, + attribute minOccurs { text }?, + attribute maxOccurs { text }?, DocDef, ExtendDef?, PropertiesDef?, diff --git a/SDT/schema4.0/src/domain.rng b/SDT/schema4.0/src/domain.rng index 8427bee425c123c531091bbdee7522da9cec5d28..267bc6d6841f8e1182c04f848f29416bfe4a8438 100644 --- a/SDT/schema4.0/src/domain.rng +++ b/SDT/schema4.0/src/domain.rng @@ -314,6 +314,16 @@ <data type="anyURI"/> </attribute> </optional> + <optional> + <attribute name="minOccurs"> + <text/> + </attribute> + </optional> + <optional> + <attribute name="maxOccurs"> + <text/> + </attribute> + </optional> <ref name="DocDef"/> <optional> <ref name="PropertiesDef"/> @@ -344,6 +354,16 @@ <data type="anyURI"/> </attribute> </optional> + <optional> + <attribute name="minOccurs"> + <text/> + </attribute> + </optional> + <optional> + <attribute name="maxOccurs"> + <text/> + </attribute> + </optional> <ref name="DocDef"/> <optional> <ref name="ExtendDef" /> diff --git a/SDT/schema4.0/src/domain.xsd b/SDT/schema4.0/src/domain.xsd index 3c250160f78aa12360c5f0b8623cb3d545ec164a..ff074e985bddda70c8f84e8e3fc2acf13ba00f9e 100644 --- a/SDT/schema4.0/src/domain.xsd +++ b/SDT/schema4.0/src/domain.xsd @@ -247,6 +247,8 @@ </xs:sequence> <xs:attribute name="id" use="required" type="xs:Name"/> <xs:attribute name="semanticURI" type="xs:anyURI"/> + <xs:attribute name="minOccurs"/> + <xs:attribute name="maxOccurs"/> </xs:extension> </xs:complexContent> </xs:complexType> @@ -272,6 +274,8 @@ <xs:attribute name="name" use="required" type="xs:Name"/> <xs:attribute name="optional" type="xs:boolean"/> <xs:attribute name="semanticURI" type="xs:anyURI"/> + <xs:attribute name="minOccurs"/> + <xs:attribute name="maxOccurs"/> </xs:extension> </xs:complexContent> </xs:complexType> diff --git a/SDT/schema4.0/test/min-max-occurs-test.xml b/SDT/schema4.0/test/min-max-occurs-test.xml new file mode 100644 index 0000000000000000000000000000000000000000..516ac02e4555f7e408e787e20b9e2b25ffaa238d --- /dev/null +++ b/SDT/schema4.0/test/min-max-occurs-test.xml @@ -0,0 +1,16 @@ +<?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>