473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

XSD.exe w/Include: What am I doing wrong?

I'm running into problems using XSD.exe to generate classes from XSD files using the <Include> functionality.
Being a complete newbie with this, I am obviously missing something obvious

I have defined two schemas, XMLSchema1 and XMLSchema2 with the same target namespace: "TestSpace", each with one complextype element defined. In the XSD designer for XMLSchema2, I have included XMLSchema1

When I run XSD.exe

XSD.exe XMLSchema1.xsd XMLSchema2.xsd /

I get the following

"A schema with the namespace "TestSpace" has already been added.

I thought that using <Include> means that you _must_ have the same target namespace defined?

Nov 12 '05 #1
1 3045
When you have xs:include statement in a given schema, there is no need to
reference the included schema as a commnad line argument to xsd.

For example, following should work (assuming XMLSchema1.xsd contains include
statement for XMLSchema2.xsd) :

XSD.exe XMLSchema1.xsd /c

(as long as the included schema can be resolved)

When you have xs:import statement, you do need to specified all imported
schemas on the command line.

Hope this helps.
Raghu/..
"David" <an*******@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
I'm running into problems using XSD.exe to generate classes from XSD files using the <Include> functionality. Being a complete newbie with this, I am obviously missing something obvious:
I have defined two schemas, XMLSchema1 and XMLSchema2 with the same target namespace: "TestSpace", each with one complextype element defined. In the
XSD designer for XMLSchema2, I have included XMLSchema1.
When I run XSD.exe:

XSD.exe XMLSchema1.xsd XMLSchema2.xsd /c

I get the following:

"A schema with the namespace "TestSpace" has already been added."

I thought that using <Include> means that you _must_ have the same target namespace defined?

Nov 12 '05 #2

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

Similar topics

9
by: Andy Jacobs | last post by:
Hi All I've tried as many combinations as I can think of but I'm not getting any where. This is what I have: <? $menu = 'menus/' . $HTTP_GET_VARS . '.inc'; echo $menu; ?>
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
4
by: Anthony Lansbergen | last post by:
Hi, My (pre)compiler(s) (borland C++ builder 5 and g++) both seems to have a problem with the new include format. In stead of #include <iostream.h> I want to say #include <iostream>. This...
6
by: atv | last post by:
Alright, i have some questions concerning include files en global variables.I hope someone is willing to answer these. 1).Why is it that if i define a global variable in a file, say main.c, and...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
9
by: zolli | last post by:
Hi, I've been banging my head against this for a while now. Hoping someone here can shed some light on what's going on. On including stdlib.h in a file, I'm seeing the following errors: ...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
3
by: Dave Kelly | last post by:
From a html page menu I need to pass 2 variables. <a href="signup.php?var1=list-PINSS.php&var2=blurb-PINSS.php"><h3>Padre Island National Sea Shore</h3></a><br> These go to a php web page...
3
by: Gunnar G | last post by:
Hi. Now I have this file function A() { if (file_exists("a/foo.inc") echo "exists"; include "a/foo.inc"; ....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.