473,793 Members | 2,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Schema Editor Problems in VS.NET

I have an XML document and a schema. It validates fine, but when I try to
switch to data view there's a problem. So I tried "Create Schema" and got
the error:
An error occurred while loading the schema with targetNameSpace
"http://tempuri.org/XMLFile1.xsd" referenced in this document.
Index (zero based) must be greater or equal to zero and less than the size
of the argument list.

I can't find any help on this error, or see any reason why it should
occurring.

I've made this as simple as I can and I just can't see where the problem is
occurring.

Andy D

My XML is:

<?xml version="1.0" encoding="utf-8" ?>
<Names xmlns="http://tempuri.org/XMLFile1.xsd">
<name>Andy</name>
<name>Bob</name>
<name>Charles </name>
<name>Derek</name>
</Names>

my XSD is:

<?xml version="1.0" ?>
<xs:schema id="Names" targetNamespace ="http://tempuri.org/XMLFile1.xsd"
xmlns:mstns="ht tp://tempuri.org/XMLFile1.xsd"
xmlns="http://tempuri.org/XMLFile1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="u rn:schemas-
microsoft-com:xml-msdata"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
<xs:element name="Names" msdata:IsDataSe t="true" msdata:Locale=" en-
GB" msdata:EnforceC onstraints="Fal se">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="name" nillable="true"
type="xs:string "></xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Nov 11 '05 #1
3 1512
Hi Andrew,

Thanks again for using Microsoft Newsgroup Support. I have sent your
question on to one of our support teams for a response. I will let you
know when I hear back from them.

Thanks for your patience.

Brett Keown
Microsoft Support
br*****@online. microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 11 '05 #2
br*****@online. microsoft.com (Brett Keown [MSFT]) wrote in
news:$i******** ******@cpmsftng xa06.phx.gbl:
Hi Andrew,

Thanks again for using Microsoft Newsgroup Support. I have sent your
question on to one of our support teams for a response. I will let
you know when I hear back from them.

Thanks for your patience.


Just got back from a weekend away, worked out the problem - there was no
element defined. Being new to xsd I hadn't realised that I couldn't just
have a complex type with other complex types inside it.

However, it would have been nice if I'd been told "warning, you have no
root element" or if the schema creator had let me know in some way that one
was necessary.

Cheers,

Andy D
Nov 11 '05 #3
Great Andrew,

Glad to hear that you figured this out. I will submit a DCR asking that a notification message be put in for that type of error. Thanks again for using the
Microsoft Newsgroups!

Brett Keown
Microsoft Developer Support
br*****@nospam. microsoft.com

To email me directly, please remove the "nospam" from my email address.

This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.

Nov 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1337
by: Michael Wein | last post by:
Hello, does anyone know of a tool that automatically anonymizes a DTD or XML Schema? By anonymizing I mean renaming all elements/type definitions but still containing the structure, esp. the references/dependencies. Background: we have problems handling an XML Schema with our XML editor and the vendor requires the schema for debugging purposes. But unfortunately the XML Schema comes from a different company and contains confident...
4
2357
by: Oskar Stuffer | last post by:
Hi! I'm using the msv tool which uses xerces to validate a XML document against a XML Schema definition. This is my XML Schema definition: <?xml version="1.0" encoding="ISO-8859-1"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3
1606
by: Xamle Eng | last post by:
I am looking for a data oriented schema-enforcing XML editor. By schema-enforcing I mean an editor that doesn't just have a button to verify the schema - I want an editor that actively enforces it and makes it difficult or impossible to generate data not conforming to the schema. I have downloaded many XML editors, both free/open-source and evaluation copies of commercial software but so far none of them fits my requirements. Many of...
1
1580
by: mflll | last post by:
How does one say in one schema that one wants an element defined in another schema. For example, I want to include in the Employee definition, an Address element defined in the schema http://test.org.Address Here is the schema defining the Employee: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://test.org/emp" xmlns="http://test.org/emp"
4
1222
by: cmay | last post by:
I am beginning to wonder if it is not possible to get this working. I am trying to do: <root> <a/> <b/> <c/> </root>
5
7284
by: hello | last post by:
How can I define the schema so that myage element has to be double or null? <xs:simpleType name="myage"> <xs:restriction base="xs:double"> <xs:enumeration value="null"/> </xs:restriction> </xs:simpleType> </xs:schema>
3
1759
by: Lord0 | last post by:
I *think* I need to be able to validate subsets of an XML document using different schema. The functionality I'm trying to implement is this. a) External suppliers produce an XML document containing multiple User records. The external supplier validates this entire document using schema 1. This document is then uploaded to our system. b) Our system then checks that the supplied document "looks okay", minimally, using Schema 2. Schema...
5
1732
by: Grant Robertson | last post by:
I am only just learning about schema basics. I am trying to understand some fundamental principles about what can be specified within a schema. If I define an enumerated list of values for an attribute in the root element, is it then possible to limit which child elements may appear depending on the value of that attribute? This enumerated attribute would be used to specify a sub-type for this particular instance of a document. For...
1
1855
by: Johann Höchtl | last post by:
Hello! I am searching for a visual schema editor for eclipse. The only ones i came across was the altova XMLSpy and oxygen, both are commercial. Are there any good free editors available? Schema validation would be nice but is not a must. Greetings, Johann
9
3020
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13> <binaryobject3></binaryobject3>
0
9671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10433
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10161
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9035
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.