473,386 Members | 1,738 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,386 software developers and data experts.

xsd.exe and include

I'm using xsd to generate c# classes representing XML files. Mostly for
configuration.

I find that there is a lot of commonality of definitions between the various
xsd files and I would like to split out these common definitions into a
separate xsd file.

I have some idea of how to do this with the .xsd files using include.
However, it is not clear to me that I can then use XSD to generate the cs
files which represent the global definitions and the cs files that use them.

Has anyone done this?

Iain
Nov 12 '05 #1
2 2491
Further to this, this seems pretty simple using include.

However, I cannot get this to work with import which would be my preference.

As far as I can see it makes no effort to read the imported file.

I get warnings that indicate that the types in the import are not declared
and finally an error that says the datatype XXXXX is missing.

Should this work?

Iian
"Iain" <id********@dircon.co.uk> wrote in message
news:#F**************@tk2msftngp13.phx.gbl...
I'm using xsd to generate c# classes representing XML files. Mostly for
configuration.

I find that there is a lot of commonality of definitions between the various xsd files and I would like to split out these common definitions into a
separate xsd file.

I have some idea of how to do this with the .xsd files using include.
However, it is not clear to me that I can then use XSD to generate the cs
files which represent the global definitions and the cs files that use them.
Has anyone done this?

Iain

Nov 12 '05 #2
so apparently, xsd ignores the schemaLocation in the import statement and
you have to put all the xsd files on the command line.

xsd importedFrom.xsd importedto.xsd /c

Now all I'm left with (ha ha ha ha ha) is wondering how to end up with
SEPARATE cs files for each xsd file. doing the import thing looks exactly
as if you've done an include. Shame. It coudl be nice.

(Or have I missed something else?)

Iain
"Iain" <id********@dircon.co.uk> wrote in message
news:eh**************@TK2MSFTNGP09.phx.gbl...
Further to this, this seems pretty simple using include.

However, I cannot get this to work with import which would be my preference.
As far as I can see it makes no effort to read the imported file.

I get warnings that indicate that the types in the import are not declared
and finally an error that says the datatype XXXXX is missing.

Should this work?

Iian

Nov 12 '05 #3

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

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
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: ...
5
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to...
1
by: Minh | last post by:
I've just installed VS.NET 2003 on my Athlon XP 1800+. However I couldn't get any project with STL includes to compile even if I create a new empty project (and added #include <string>). It gave me...
1
by: ya man | last post by:
when i use #include <iostream.h> in some files i get lots of error messages of the kind 'ambiguous symbol this is solved when i use #include <iostream why is that ? and can i use #include...
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...
14
by: Jon Rea | last post by:
I am currently cleaning up an application which was origainlly hashed together with speed of coding in mind and therefore contains quite a few "hacky" shortcuts. As part of this "revamping"...
7
by: Giancarlo Bassi | last post by:
Please, what are here the 11 include files (found over the internet)? */mozzarella.c /* #include #include #include #include #include #include
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.