diff --git a/tests/testSpectrum.xml b/tests/testSpectrum.xml index 1b1c185c6258c452057e1d7abed8763e95624e2c..ae806276a0f49f769b1484d9766613603b03dfcd 100644 --- a/tests/testSpectrum.xml +++ b/tests/testSpectrum.xml @@ -1,16 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <device_server xmlns="https://github.com/ChimeraTK/ControlSystemAdapter-DoocsAdapter"> <location name="A"> - <property source="fromDeviceArray1"> - <doocs_type><D_spectrum/></doocs_type> - </property> - <property source="fromDeviceArray2"> - <doocs_type> - <D_spectrum> - <start>123.</start> - <increment>0.56</increment> - </D_spectrum> - </doocs_type> - </property> + <D_spectrum source="fromDeviceArray1"/> + <D_spectrum source="fromDeviceArray2"> + <start>123.</start> + <increment>0.56</increment> + </D_spectrum> </location> </device_server> diff --git a/tests/variableTreeXml/spectrum.xml b/tests/variableTreeXml/spectrum.xml index 701373e35b82ce828220d89f5db1a936b9ea42fc..04c00d5301c168263e010a488455a0254f626625 100644 --- a/tests/variableTreeXml/spectrum.xml +++ b/tests/variableTreeXml/spectrum.xml @@ -1,16 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <device_server xmlns="https://github.com/ChimeraTK/ControlSystemAdapter-DoocsAdapter"> <location name="A"> - <property source="a/do"> - <doocs_type><D_spectrum/></doocs_type> - </property> - <property source="a/di"> - <doocs_type> - <D_spectrum> - <start>123.</start> - <increment>0.56</increment> - </D_spectrum> - </doocs_type> - </property> + <D_spectrum source="a/do"/> + <D_spectrum source="a/di"> + <start>123.</start> + <increment>0.56</increment> + </D_spectrum> </location> </device_server> diff --git a/xmlschema/doocs_variable_tree.xsd b/xmlschema/doocs_variable_tree.xsd index afa52a61b5cd07e4950a91bc3be0a1b51da2b079..421a82761fab7f87a27cdfd2e034dcb4309327ce 100644 --- a/xmlschema/doocs_variable_tree.xsd +++ b/xmlschema/doocs_variable_tree.xsd @@ -24,17 +24,24 @@ <xs:complexType name="Location"> <xs:sequence> - <xs:group ref="PropertyDetails"/> - <xs:element name="property" type="Property" minOccurs="0" maxOccurs="unbounded"/> + <xs:group ref="PropertyDetails" minOccurs="0"/> + <xs:group ref="Property" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="import" type="LocationImport" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> - - <xs:complexType name="Property"> + + <!-- The property group basically is the choice of the different property types we have--> + <xs:group name="Property"> + <xs:choice> + <xs:element name="property" type="AutoProperty"/> + <xs:element name="D_spectrum" type="D_spectrum"/> + </xs:choice> + </xs:group> + + <xs:complexType name="AutoProperty"> <xs:sequence> - <xs:group ref="PropertyDetails"/> - <xs:element name= "doocs_type" type="DoocsType" minOccurs="0"/> + <xs:group ref="PropertyDetails" minOccurs="0"/> </xs:sequence> <xs:attribute name="source" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string"/> @@ -55,16 +62,6 @@ </xs:sequence> </xs:group> - <xs:complexType name="DoocsType"> - <xs:choice> - <xs:element name="D_spectrum" type="D_spectrum"/> - <xs:element name="automatic" type="Empty"/> - <!-- Add more doocs types here. --> - </xs:choice> - </xs:complexType> - - <xs:complexType name="Empty"/> - <xs:complexType name="LocationImport"> <xs:simpleContent> <xs:extension base="xs:string"> @@ -75,9 +72,12 @@ <xs:complexType name="D_spectrum"> <xs:sequence> + <xs:group ref="PropertyDetails" minOccurs="0"/> <xs:element name="start" type="xs:float" default="0.0" minOccurs="0"/> <xs:element name="increment" type="xs:float" default="1.0" minOccurs="0"/> </xs:sequence> + <xs:attribute name="source" type="xs:string" use="required"/> + <xs:attribute name="name" type="xs:string"/> </xs:complexType> </xs:schema>