Code generation with types from other schemas

I want to be able to define types in one schema, and then use them in other 
schemas.  So far so good.  Now I also want to be able to generate classes 
from these schemas and use them independantly, and in their own namespaces.

For example,
schema1.xsd ==> schema1.cs
schema2.xsd ==> schema2.cs
where there are types from schema1 used in schema2.

When I use xsd.exe to generate schema2.cs and an <xs:import> element, it 
works, but also regenerates the types from the schema1.cs.

I guess the question is, is there a simple way to generate code for what I'm 
trying to do, or do I need to write some custom utility?

I alse took a look at XsdGenerator, which has some nice features as well, 
but it seems I need a bit from both of these, as well as some custom work.

Any comments/suggestions?


Daniel1 (174)
6/2/2005 4:10:03 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 56


Similar Artilces:

put back the bar code for envelopes
The United State post office would appreciate it if you gave MS Word users the ability to print zip code bar codes on the bottom of our envelopes again, so would I! ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane.

Complex coding question re: recordset
If I have an open form and am positioned on a new record with no bound field having been changed (dirty = false) and I call a public function which opens a recordset on the same table that my form is bound to and then do a series of movenexts , can my form become dirty? I'm getting strange results and am wondering if this could be the cause. What I am trying to do is to programatically retrieve a given record by doing an applyfilter. However, what seems to be happening is that somehow my record has become dirty and therefore the form is wanting to do a save before executing t...

Exchange server and huge emails generated to postmaster
I have been trying find a solution for a serious problem on exchanger server 2003 (on SBS2003). Recently probably due to a virus infection a lot emails were being generated to postmaster (1 million in 10 hours) plus badmail in badmail queue. Have checked it with norton corporate a/v but can not find any viruses. Also tried stinger but no viruses found. Have emptied all the queues. Used microsofts anti-adware program to check for adware and trojans. It came up clean. Still getting loads of emails. The only way to stop it is to stop the exchange information store service, but just dismounting...

Schema Importing
With v1.2, you can NOT delete any fields in the database. What happens if I add 2 fields and then decide I do not need them. Then I import a backup schema (before the fields were added), do the 2 fields go away or are they still there? James they are still there..only way to get rid of them would be to restore from a backup of the database before you made the changes -- ======================= John O'Donnell Microsoft CRM MVP "James" <> wrote in message news:33D6D727-24BF-4DA9-AA8C-F1D9815C85E...

I try to assign category based on subject in appointment (code included)
Below i wrote code to assign a categorie to a calendar item based on the word "vrij" in the subject. I think this code should work.. but somehow it doesnt I use Outlook 2003 with macro security set to lowest level. The code is placed in "this outlook session" Any ideas why it doesnt work ?? ==================================================== Dim WithEvents colRDVItems As Items Private Sub Application_Startup() Dim NS As Outlook.NameSpace Set NS = Application.GetNamespace("MAPI") Set colRDVItems = NS.GetDefaultFolder(olFolderCalendar).Items Set NS = Nothing E...

Auto Account Number Generation
Here's a newbie question for which I have not yet been able to find a solution. Whenever creating a new account, I'd like the form to automatically display an account number in the accountnumber field that is one more than the max in the table. How can I automtically create this? That is how can I run a query on form load that looks up the current max account number then add one to it? ANy help would be appreciated. Only way to do this is through writing some code. For example you could achieve this using a callout. When you save a new account you can have the callout scan ...

Reason Code Reports
How can I run a report regarding reason codes? I have made it so that you need to give a reason before making a return. If someone makes a return, I want to know can I run this sort of report? -- Thank You,; Vince Just run a sales detail report and unhide them. You can filter by them also. Werd. mt "Vince" <> wrote in message > How can I run a report regarding reason codes? I have made it so that you > need to give a reason before making a return. If someone ma...

Accounts with multiple Relationship Types
Hi all! With some of our company' s Accounts we have multiple Relationship Types (eg. a Reseller can be a Customer too etc). How can we insert this information in Microsoft CRM 1.2? Is it necessary to create custom fields in the Account Form? Thanks a lot! Elena Galiatsou Athens, Greece You could choose a "primary" relationship type from the combo box, and then add a memo field to track additional relationship types. Not elegant, but I think it's the best you can do with version 1.0/1.2. Mike "SiEBEN Innovative Solutions" <> wrote i...

Populate List Box
Need some ideas. I have a list box from which our clients will be able to select which form they want to preview or print. However, each client should only have selections available that apply specifically to their company. For example: Company A will require forms 1, 2, 3, 6 and 7 Company B will require forms 1, 6 and 7 Company C will require forms 4, 5 and 6 I have some code right now to handle a simple two form variation: If Forms("Main").Controls("Form1Req") = "Yes" and Forms("Main").Controls ("Form2Req") = "No" Then Me.L...

Code to combine workbooks
Hi, I need to combine several workbooks into one workbook. Say, individual workbooks are named A, B and C, the master workbook is Master. They all have the same format and are stored in directory c:\Data. Please can anyone help and send me the code Thanks Andy Sub GrabData() Dim varr As Variant Dim rng As Range Dim i As Long Dim sh As Worksheet Dim wkbk as Workbook varr = Array("A.xls", "B.xls", "c.xls") Set sh = Workbooks("Master.xls").Worksheets(1) For i = LBound(varr) To UBound(varr) Set wkbk = Workbooks.Open("c:\Data\" & var...

Error codes
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I am trying to apply rules to messages in my inbox, I have created 2 new rules and have highlighted all the messages to apply the rules, except it can't apply the rules as an error code 4362 comes up. What does it mean and how can I rectify it? On 2010-02-04 07:42:53 -0500, said: > I am trying to apply rules to messages in my inbox, I have created 2 > new rules and have highlighted all the messages to apply the rules, > except it can't apply the rules as an error ...

Mapisp32.exe has generated errors and will be shut down
One of my coworkers is getting this error whenever Outlook97 checks for email. She is running Office97 Pro in WIndows 2000 on a 600mhz PIII with 128MB RAM. >-----Original Message----- >One of my coworkers is getting this error whenever >Outlook97 checks for email. She is running Office97 Pro in >WIndows 2000 on a 600mhz PIII with 128MB RAM. >. > I almost forgot to mention that I tried the fix listed in Microsoft Article 296412, with no success. Here is the URL to that fix.;en- us;296412 ...

Efficiently Generate 88 New Chart Sheets
Gang, I've got a simple X*Y chart with year (1977-present) on the x-axis and an estimate of deer population size on the y-axis (actually, there may ultimately be 2 estimates/series). There is nothing really all that fancy about it. It will be updated each year with the current year's estimate. The problem is, I need 87 more just like it - 1 for each of the 88 units that I manage. I have been reading VBA and Excel books and I have yet to find an example on how to "mass produce" a bunch of chart sheets. I take that back - a simple "FOR NEXT" loop will generate t...

Using Float Type Variables for Primary on SQL 2005
We seem to have hit an oddity. We have a stored procedure that gets the next sequence number. It is protected by a transaction so no two processes could update the table of ids at the same time. Every so often, we get duplicates. How could that happen? Is the value based on mantissa? If so, is there a way to expanded it? Keep in mind, I can't change the type from float. Any help is greatly appreciated. Thanks in advance On 2010-07-19 16:19, RG wrote: > We seem to have hit an oddity. > Please don't multi-post. If you have to post to multiple newsgroup...

back spacing is deleting what was already typed.
As I type a Document and need to add a word, or phrase by back-spacing Word deletes what was already typed letter by letter on that line. How do I correct the settings? That's what Backspace does on a computer. If you just want to go backward, use the left arrow key. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA "TinaMarie" <> wrote in message > As I type a Document and need to add a word, or ph...

How to know that character type in one cell of xls is more that s.
Q : How to know that character type in one cell of xls is more that s... E.g How i will come to know that i typed more than specified charater, when i am typing in that particular cell Your character to test is in A1 In another cell enter =CODE(A1)>CODE("s"). You will get TRUE or FALSE Or use =IF(CODE(A1)>CODE("s"),"Bigger","Not bigger") -- Bernard V Liengme remove caps from email "Dharamendra" <Dharamendra> wrote in message news:C2427962-5283-43FD-B9B0-5B367EA2470A@microso...

create a csv file type format for a centrally access address book
Hello, We have Outlook 2003 clients on a LAN with a Small Business Server 2003 Standard editon box. We require a single fax document sent to new or existing clients with using our shared fax service from the SBS. Is there a way to create a .CSV file type format in Microsoft Excel for our new client database and import this information into Exchange as a seperate address book for fax use? Thank you in advance for your assistance. Joe See my response to your post in the contacts newsgroup.=20 --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart...

duplicate supplier code
I have one supplier and two supplier codes. One is MTT and the other is MT. How do I -properly- convert all of the items from MT to MTT? How do I -properly- delete the vendor? I recommend that you get your Microsoft Partner to fix this one for you. Regards, Ivan Brebner "daytraitors" <> wrote in message >I have one supplier and two supplier codes. > One is MTT and the other is MT. > > How do I -properly- convert all of the items from MT to MTT? > > How do I -...

My code stops after the record saves....form never closes
Users are going into to update a number, and they want to close the form before the record gets saved, thus losing their changes. I created an Exit button, which should save the record change and close the form. Here's the code: If Me.Dirty Then RunCommand acCmdSaveRecord End If Forms![frmRMSHours]![Act Hours] = Me![Text9] DoCmd.Close If the record is dirty, they press Exit and the record saves. They have to press Exit again and the form closes. If the record is not dirty, the form will close when pressing Exit. What am I doing wrong? To save ...

Operator Overload between different types
I'm trying to implement the overload for two different kinds of objects. I tryed for example: Dog1 + Dog2; Dog Dog::operator+(Dog& s) { return this->nBau + s.nBau; } it works fine. I need something... Dog1 + Cat1; ??? Dog::operator+(Cat& s) { return ???; } How can i implement my overload between different types and what type of object must return? I can only compile my program only specifing "return 0" in overload function but it doesn't work. Maybe i must implement overload function as static function outside class Dog? Some help please. My final n...

internet explorer mime type resubmit to window error
I have an web-app that can produce a receipt by submiting a html table into a new window and setting the mime type to Excel. This functionality works fine. If the user does not close this window and goes to create a new receipt then the excel plugin within explorer simply copies the data within the previous window into the new window and ignores the new data. Is there any solution to this problem? First, I don't know what I'm talking about. Second, it does sound like some kind of caching problem. Is there anyway you can force the web application to refresh the cached data? ...

How does one make VS compile unsafe code
Hi, This is not the first time I've used unsafe code in C# projects. Usually, I simply check the box in the project properties telling it to allow unsafe code. I've done that for this project, yet VS is telling that, "Unsafe code may only appear in compiling with / unsafe." So, here's the command line being used to compile: C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /unsafe- / nowarn:618,1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt / warn:4 I'm betting that this is complaining because the switch that appears above is "...

cross-referencing new reference types
I created a new reference type for a document: Text box (instead of Figure or Table, etc.). Sometimes after I save and close my document, Text box is in the list of reference types that can be cross-referenced and sometimes it is not. When it is gone, I have to recreate Text box as a type, then word recognizes those that are already there so I can cross-reference them again. How do I avoid this intermittent loss??? Caption labels are stored in the Nomal template, so if you lose them I'm guessing that you are somehow prevented from saving to the Normal template. Try savin...

what is cannot complete operation error code 0x80040155
my clip art is gone how do I get it back You need to re-register the Ole32.dll Start, run, type in the open box regsvr32 ole32.dll If that doesn't work... You receive a "Clipart cannot complete the operation" error message when you try to insert clip art in an Office XP program or in an Office 2003 program -- Mary Sauer MSFT MVP news:// "dredrhino" <

DLL tell what type of application is running.
I'm writing a general purpose error handler that will be used by Windows Apps, Web Apps, Window's Services, ... In other words - just about any program will be calling it. Part of this error routine would be to put up a message box if it's a windows app but only if it's a windows app. How can I make sure that the application that is running is actually a Window's app. I currently am passing in parameters to display the message if appropriate but I want to make sure that somebody doesn't by accident call the routine with a message to display for something ...