Skip to content

Commit 96a23c0

Browse files
committed
initial contribution
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
1 parent 9f7cd32 commit 96a23c0

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

bundles/org.openhab.core.thing/schema/thing/thing-description-1.0.0.xsd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
33
xmlns:thing-description="https://openhab.org/schemas/thing-description/v1.0.0"
44
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
5-
targetNamespace="https://openhab.org/schemas/thing-description/v1.0.0">
5+
targetNamespace="https://openhab.org/schemas/thing-description/v1.0.0"
6+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
7+
vc:minVersion="1.1">
68

79
<xs:import namespace="https://openhab.org/schemas/config-description/v1.0.0"
810
schemaLocation="https://openhab.org/schemas/config-description-1.0.0.xsd"/>
@@ -215,10 +217,11 @@
215217
</xs:complexType>
216218

217219
<xs:complexType name="tags">
218-
<xs:sequence>
219-
<xs:element name="tag" type="xs:string" minOccurs="1" maxOccurs="2"/>
220-
</xs:sequence>
221-
<xs:assert test="count(tag[. = $semanticPointTag]) = 1 and count(tag[. = $semanticPropertyTag]) > 0"/>
220+
<xs:element name="tag" minOccurs="1" maxOccurs="2">
221+
<xs:alternative test="position() = 1" type="thing-description:semanticPointTag"/>
222+
<xs:alternative test="position() = 2" type="thing-description:semanticPropertyTag"/>
223+
<xs:alternative type="xs:error"/> <!-- If more than two tags are present -->
224+
</xs:element>
222225
</xs:complexType>
223226

224227
<xs:complexType name="state">

0 commit comments

Comments
 (0)