Altova User Forum


Important: this is not a Support Forum! Experienced users might answer from time to time questions posted here.
If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Schema location error Options · View
xmlaltovauser12
Posted: Thursday, April 07, 2011 6:22:00 PM
Rank: Newbie

Joined: 4/7/2011
Posts: 3
Hello Altova users

I am using xml spy enterprise edition 2011 software to validate xml file agaist xsd file. But both the files are well formed. But when i put a refrence of schema file in xml file then it gives me an error as

Unable to locate a reference to a supported schema type (DTD, W3C Schema) within this document instance.

Both the files (xml and xsd) are in the same directory(location).

Xml file

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://abc.org/sample/cgi/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://abc.org/sample/cgi/1.0/abc.xsd">
<configuration-metadata>
<configuration-name>Configuration with all the datastores</configuration-name>
</configuration-metadata>
</configuration>


xsd file

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://abc.org/sample/cgi/1.0"
xmlns:ab="http://abc.org/sample/cgi/1.0"
elementFormDefault="qualified">
<element name="configuration">
<complexType>
</complexType>
</element>

</schema>
vlad
Posted: Thursday, April 07, 2011 7:06:55 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,477
Location: Mauritius
schemaLocation attribute must contain two values - first is the target namespace of your schema and second is the file path.

Instead of typing by hand, simply use built-in XMLSpy menu command Assign Schema which will ensure that the reference to your schema is properly added to your XML instance file.
xmlaltovauser12
Posted: Thursday, April 07, 2011 8:26:35 PM
Rank: Newbie

Joined: 4/7/2011
Posts: 3
I got an error resolved..

This is what i changed in my xml file.


<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://eobjects.org/analyzerbeans/configuration/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eobjects.org/analyzerbeans/configuration/1.0 abc.xsd">
</configuration>
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova User Forums Terms of Service.

Please note that the Altova User Forum was launched so that our users have the possibility to interact and exchange their experiences regarding Altova's product line with one another. It must be pointed out that our support engineers and software engineers regularly post answers to questions in the user forum as an extra service, however this is not a replacement for the regular support mechanism and we cannot in anyway guarantee that a question will be answered or give a specific timeframe for an answer.The user forum was not intended to replace the online support form, but was implemented as an additional source of information after repeated requests for a user based forum in which users can help one another.