Groups | Blog | Home
all groups > dotnet xml > august 2003 >

dotnet xml : Problem creating schema


Andrew Ducker
8/12/2003 12:25:28 PM
I created a Schema (see below) in VS.NET. I then tried to create an XML
document so that I could enter data for it. It gives me the error "An
Error occurred while loading the schema with targetNameSpace
"http://tempuri.org/Folderlist.xsd" referenced in the document. Index(zero
based) must be greater than or equal to zero and less than the size of the
argument list."

Any ideas what could be causing this?

Andy D

XSD:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="Folderlist"
targetNamespace="http://tempuri.org/Folderlist.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/Folderlist.xsd"
xmlns:mstns="http://tempuri.org/Folderlist.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Folders">
<xs:sequence>
<xs:element name="BackupSets" type="BackupSet"
minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="BackupSet">
<xs:sequence>
<xs:element name="FoldersToBackup" type="FolderList"
maxOccurs="1" minOccurs="1" />
<xs:element name="DestinationFolder" type="xs:string"
maxOccurs="1" minOccurs="1" />
<xs:element name="BackupTime" type="xs:time"
minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FolderList">
<xs:sequence>
<xs:element name="Folder" type="xs:string" minOccurs="1"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:schema>

XML file:

<?xml version="1.0" encoding="utf-8" ?>
Andrew Ducker
8/12/2003 3:45:36 PM
Andrew Ducker <Andrew@Ducker.org.uk> wrote in
news:Xns93D5CFCC2686EAndrewDuckerorguk@207.46.248.16:

[quoted text, click to view]

Following this - I tried creating an XML file and using "create schema" to
see if I could do that. Miracle of Miracles it worked. So I copied the
contents of the XML file into a new one. Which didn't work. So I quit
Visual Studio and reopened it and then neither of them worked.

I suspect it's not finding the xsd file at all. Is there something that
redirect http://tempuri.org to the local files? Or some kind of setting I
need to look into?

AddThis Social Bookmark Button