I have translated a DTD to an XML Schema (XSD) file by hand, and the Schema View in Visual Studio .NET 2003 seems to diplay everything properly.
However, when I specify the schemalocation in my xml files, VS.NET still reports that no schema could be located. Here are the relevant (maybe) portions of the files:
FROM THE SCHEMA FILE (mydoc-v2.xsd)
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
FROM THE XML FILE (myTestDoc.xml):
<mydoc
xmlns="http://tempuri.org/mydoc-v2.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="file:///C:/Dev/mydoc-v2.xsd">
VISUAL STUDIO .NET 2003 ERROR MSG:
C:\Dev\myTestDoc.xml(1): Visual Studio could not locate a schema for this document. Validation can only ensure this is a well formed XML document and cannot validate the data against a schema.
Any help with this is greatly appreciated.
- VSW