A
Andrey Brozhko
Hi
The situation:
XML document can be either
<?xml version="1.0" encoding="UTF-8"?>
<test>
<item>1</item>
<item>2</item>
</test>
or
<?xml version="1.0" encoding="UTF-8"?>
<test>testKeyWord</test>
So I have two types defined:
<xs:complexType name="IntegerArray">
<xs:sequence>
<xs:element name="item" type="types:IntegerType"/>
</xs:sequence>
</xs:complexType>
and the second type:
<xs:simpleType name="KeyWord">
<xs:restriction base="xs:string">
<xs:enumeration value="testKeyWord"/>
<xs:enumeration value="testKeyWord2"/>
</xs:restriction>
</xs:simpleType>
Is there any way I can 'merge' lexical spaces of these types together
(similar to what union does for simple types)? If not, what's the
correct way to describe the content of my xml document?
Thanks
Andrey
The situation:
XML document can be either
<?xml version="1.0" encoding="UTF-8"?>
<test>
<item>1</item>
<item>2</item>
</test>
or
<?xml version="1.0" encoding="UTF-8"?>
<test>testKeyWord</test>
So I have two types defined:
<xs:complexType name="IntegerArray">
<xs:sequence>
<xs:element name="item" type="types:IntegerType"/>
</xs:sequence>
</xs:complexType>
and the second type:
<xs:simpleType name="KeyWord">
<xs:restriction base="xs:string">
<xs:enumeration value="testKeyWord"/>
<xs:enumeration value="testKeyWord2"/>
</xs:restriction>
</xs:simpleType>
Is there any way I can 'merge' lexical spaces of these types together
(similar to what union does for simple types)? If not, what's the
correct way to describe the content of my xml document?
Thanks
Andrey