Witam mam problem ze schematem.
Wyświetla mi się następujący błąd :
Validation 10, 46 src-resolve: Cannot resolve the name 'ocenaType' to a(n) 'type definition' component.
Validation 21, 90 src-resolve: Cannot resolve the name 'ocenaType' to a(n) 'type definition' component.
Może ktoś ma pomysł ??
index.xml
<?xml version="1.0"?>
<kartae xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com style.xsd">
<wynik>
<przedmiot>Matematyka</przedmiot>
<ocena> +4.0 </ocena>
</wynik>
<wynik>
<przedmiot>Polski</przedmiot>
<ocena> plus dobry </ocena>
</wynik>
<wynik>
<przedmiot>Chemia</przedmiot>
<ocena> 4.5 </ocena>
</wynik>
</kartae>
style.xsd
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com"
elementFormDefault="qualified">
<xs:element name="kartae" type="elem_glow"/>
<xs:element name="wynik" type="wynikType" />
<xs:element name="przedmiot" type="xs:string"/>
<xs:element name="ocena" type="ocenaType"/>
<xs:complexType name="elem_glow">
<xs:sequence>
<xs:element name="wynik" type="wynikType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="wynikType">
<xs:sequence>
<xs:element name="przedmiot" type="xs:string" maxOccurs="unbounded"/>
<xs:element name="ocena" type="ocenaType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ocenaType">
<xs:complexType>
<xs:choice>
<!--ocena słowna-->
<xs:element name="ocena">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="dostateczny"/>
<xs:enumeration value="plus dostateczny"/>
<xs:enumeration value="dobry"/>
<xs:enumeration value="plus dobry"/>
<xs:enumeration value="bardzo dobry"/>
<xs:enumeration value="plus bardzo dobry"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<!--ocena ulamkowa-->
<xs:element name="ocena">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[2-5]\.(0|5)"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<!--ocena ze znakiem-->
<xs:element name="ocena">
<xs:simpleType>
<xs:restriction base="xs:string">
<!--nie wiem jak wstawić pusty znak, więc wstawiam kropkę. (Spacja nie działa)-->
<xs:pattern value="\.[2-5]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Dzięki za pomoc z góry.
Nikt się nie spotkał z tym problemem??