XSD problem - cannot find the declaration of root element

Viewed 49

I've got a problem validating my XML file against my XML Schema. Everything works perfectly except it shows that it cannot find the declaration of countries root element.

Here is part of my XML file:

<?xml version="1.0" encoding="UTF-8"?>

<countries xmlns="https://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="kraje.xsd">
    <!-- I don't paste everything that's inside the countries element 
         since it's not causing errors -->
</countries>

Here is part of my XSD file:

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="countries" type="countriesType"/>

    <xs:complexType name="countriesType">
        <xs:sequence>
            <xs:element ref="country"/>
        </xs:sequence>
    </xs:complexType>

</xs:schema>
1 Answers
Related