Witam. Jestem w trackie pisania projektu, który ma zawierać między innymi xml i xml schema. Pojawiają mi się takie 3 błędy:
86, 15 s4s-elt-must-match.1: The content of 'dana' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: sequence.
63, 47 src-element.3: Element 'autor' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.
39, 15 cvc-complex-type.2.4.d: Invalid content was found starting with element 'o_artykule'. No child element is expected at this point.
XML:
<?xml version="1.0" encoding="UTF-8"?> <mojehobby xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nonamespaceschemalocation="schema.xsd"> <naglowek> <naglowek_glowny> Moje hobby </naglowek_glowny> <podnaglowek>
muzyka
</podnaglowek>
</naglowek>
<images>
<zdjecie src="AP4.jpg" href=""></zdjecie>
<zdjecie src="COSTER1.jpg" href=""></zdjecie>
<zdjecie src="TSF2.jpg" href=""></zdjecie>
</images>
<dana>
<artykul>
<tytul>
Historia
</tytul>
<naglowek_artykulu>
O muzyce i nauce
</naglowek_artykulu>
<tresc_artykulu>
<tresc>
</tresc>
</tresc_artykulu>
</artykul>
</dana>
<o_artykule>
<autor>
<imie_autora>Krzysztof</imie_autora>
<nazwisko_autora>Stencel</nazwisko_autora>
</autor>
<data>15.12.2019</data>
</o_artykule>
<stopka href="">
<tresc></tresc>
<data></data>
</stopka>
</mojehobby>
XML SCHEMA:
<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="krotki_string">
<xs:restriction base="xs:string">
<xs:maxLength value="30"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="article">
<xs:restriction base="xs:string">
<xs:minLength value="400"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="imie">
<xs:restriction base="xs:string">
<xs:maxLength value="25"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nazwisko">
<xs:restriction base="xs:string">
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="data">
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="tresc">
</xs:complexType>
<xs:complexType name="image">
<xs:attribute name="src"/>
<xs:attribute ref="href"/>
</xs:complexType>
<xs:complexType name="images">
xs:sequence
<xs:element name="zdjecie" type="image" maxOccurs="3"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="tresc_artykulu">
xs:sequence
<xs:element name="tresc" type="article" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="footer">
xs:sequence
<xs:element name="tresc" type="krotki_string"/>
<xs:element name="data" type="data"/>
</xs:sequence>
</xs:complexType>
<xs:element name="o_artykule">
xs:complexType
xs:sequence
<xs:element name="autor" type="simpleType">
xs:complexType
xs:sequence
<xs:element name="imie_autora" type="imie"/>
<xs:element name="nazwisko_autora" type="nazwisko"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="data" type="data"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="naglowek">
xs:complexType
xs:sequence
<xs:element name="naglowek_glowny" type="krotki_string"/>
<xs:element name="podnaglowek" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="dana">
xs:sequence
<xs:complexType name="artykul">
xs:sequence
<xs:element name="tytul" type="krotki_string"/>
<xs:element name="naglowek_artykulu" type="krotki_string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="tresc_artykulu">
xs:sequence
<xs:element name="tresc" type="article" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:sequence>
</xs:element>
<xs:element name="mojehobby">
xs:complexType
xs:sequence
<xs:element ref="naglowek"/>
<xs:element name="images" type="images"/>
<xs:element ref="dana"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:attribute name="href"/>
</xs:schema>
Czy jest ktoś w stanie mi pomóc?