Ошибка:Ошибка проверки в схеме XML для ComplexType
s4s-elt-must-match.1: The content of 'viviendas' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: complextype.
Схема:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://wwww.vivienda.io"
xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.vivienda.io">
<xs:element name="viviendas">
<xs:complextype>
<xs:sequence maxoccurs="unbounded">
<xs:element name="vivienda" minoccurs="1">
<xs:complextype>
<xs:sequence>
<xs:element name="direccion">
<xs:complextype>
<xs:sequence>
<xs:element name="calle"></xs:element>
<xs:element name="numero"></xs:element>
<xs:element name="localidad"></xs:element>
<xs:element name="provincia"></xs:element>
</xs:sequence>
</xs:complextype>
</xs:element>
<xs:element name="refCatastral"></xs:element>
<xs:element name="habitaciones">
<xs:complextype>
<xs:sequence>
<xs:element name="habitacion" minoccurs="1">
<xs:complextype>
<xs:attribute name="area" use="required" type="xs:string">
<xs:complextype>
<xs:restriction base="xs:integer">
<xs:mininclusive value="1"/>
<xs:maxlength value="2"/>
</xs:restriction>
</xs:complextype>
</xs:attribute>
<xs:attribute name="tipo" use="required" >
<xs:complextype>
<xs:restriction base="xs:string">
<xs:pattern value="salon|cocina|baño|dormitorio"/>
</xs:restriction>
</xs:complextype>
</xs:attribute>
</xs:complextype>
</xs:element>
</xs:sequence>
</xs:complextype>
</xs:element>
<xs:element name="servicios">
<xs:complextype>
<xs:sequence>
<xs:element name="servicio" minoccurs="1"></xs:element>
</xs:sequence>
</xs:complextype>
</xs:element>
</xs:sequence>
</xs:complextype>
</xs:element>
<xs:element name="comprador" minoccurs="0" maxoccurs="1">
<xs:complextype>
<xs:attribute name="dni" use="required">
<xs:simpletype>
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{9}[A-Z]{1}"/>
</xs:restriction>
</xs:simpletype>
</xs:attribute>
<xs:sequence>
<xs:element name="nombre"></xs:element>
<xs:element name="edad" >
<xs:simpletype>
<xs:restriction base="xs:integer">
<xs:mininclusive value="1"/>
</xs:restriction>
</xs:simpletype>
</xs:element>
<xs:element name="ref_catastral"></xs:element>
</xs:sequence>
</xs:complextype>
</xs:element>
</xs:sequence>
</xs:complextype>
</xs:element>
</xs:schema>
Привет @Salve, добро пожаловать в StackOverflow! На этот раз я исправил несколько вопросов в вашем сообщении, но в будущем обязательно сделайте следующее: (1) Не используйте теги в заголовках вопросов; (2): попытайтесь сделать свой заголовок вопроса ясным указанием на вашу проблему; (3): не размещайте ссылки на контент/код, просто отправьте код напрямую –