
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="package" type="typeA"/> <!-- тип typeA --> <xs:complexType name="typeA"> <xs:sequence> <xs:element name="tag"> <xs:complexType> <xs:complexContent> <xs:restriction base="typeB"> <xs:choice> <xs:element name="tag" type="xs:string"/> </xs:choice> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <!-- тип typeB --> <xs:complexType name="typeB"> <xs:choice> <xs:element name="tag" type="xs:string"/> <xs:element name="tag" type="xs:time"/> </xs:choice> </xs:complexType> </xs:schema>

There are nodes with the same name, but with a different type of value. In this case, the time and string values. How can you describe them? In the complexType, with this entry, an error occurs, saying that the two names are the same.