Problem creating DataSet structure from xsd: The same table (...) cannot be the child table in two nested relations.

Suppose we have an object hierarchy in XSD.
For example, let us take Control, Label, TextBox and LinkLabel windows
controls.
Each control has some properties which are represented as elements.
Some of the elements are of complex types as well, like bounds - of type
rectangle.
(See full example in the bottom of the letter.)

DataSet.ReadXMLSchema fails to parse such XSD file.
The problem is caused by complex type as an element of the base type of
hierarchy.
(In the example this type is called rectangle.)
More specifically, when parsing the example XSD file DataSet.ReadSchema
would
1. Create table for "allowedObject" complex type.
2. Create table named "label" for label complex type.
3. Create table "bounds" for bounds element of complex type "rectangle".
4. Create table "textBox" for textBox complex type.
5. Try to create "bounds" table for bounds element of complex type
"rectangle" and fail because this table already exists.

From my point of view is a serious restriction of functionality.
I am using Visual Studio 2002 and .NET Framework 1.0.
Is it fixed in Framework 1.1?

Can you think of a workaround for this problem?
Please do not suggest to inherit control from rectangle, because in real
schema I have more then one complex property.
I can add "font" to this example to illustrate it.

Thank you.


<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
 <xs:complexType name="rectangle">
  <xs:sequence>
   <xs:element name="left" type="xs:int" />
   <xs:element name="top" type="xs:int" />
   <xs:element name="width" type="xs:int" />
   <xs:element name="height" type="xs:int" />
  </xs:sequence>
 </xs:complexType>
 <xs:complexType name="control">
  <xs:sequence>
   <xs:element name="bounds" type="rectangle" />
   <xs:element name="name" type="xs:string" />
   <xs:element name="text" type="xs:string" />
  </xs:sequence>
 </xs:complexType>
 <xs:complexType name="label">
  <xs:complexContent>
   <xs:extension base="control">
    <xs:sequence>
     <xs:element name="preferedHeight" type="xs:int" />
     <xs:element name="preferedWidth" type="xs:int" />
    </xs:sequence>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
 <xs:complexType name="linkLabel">
  <xs:complexContent>
   <xs:extension base="label">
    <xs:sequence>
     <xs:element name="link" type="xs:string" />
    </xs:sequence>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
 <xs:complexType name="textBox">
  <xs:complexContent>
   <xs:extension base="control">
    <xs:sequence>
     <xs:element name="maxLength" type="xs:int" />
    </xs:sequence>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
 <xs:complexType name="allowedObject">
  <xs:choice>
   <xs:element name="label" type="label" />
   <xs:element name="textBox" type="textBox" />
   <xs:element name="linkLabel" type="linkLabel" />
  </xs:choice>
 </xs:complexType>
 <xs:complexType name="resource">
  <xs:sequence minOccurs="0" maxOccurs="unbounded">
   <xs:element name="allowedObject" type="allowedObject" />
  </xs:sequence>
 </xs:complexType>
 <xs:element name="MyDataSet" type="resource" msdata:IsDataSet="true" />
</xs:schema>


0
11/19/2003 8:07:36 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
978 Views

Similar Articles

[PageSpeed] 30

Reply:

Similar Artilces:

more than two MX record
Hi gurus I have and exchange 2000 server, two statics ip, two routers.- each router has it own Ip address.- my mx record points to one of my public IP and all email comes through this using one of my router, then my router push all email to my spam firewall and my firewall push those emails to my exchange server. I want some of my outside user to send email using the other router and bypass my spam firewall. do I just create another MX record pointing to the next static ip and use my router to forward those email directly to my exchange server my MX record mail.domain.com can I cr...

Problem shortcuts in Word
Hello, I work with Word 2008. In the beginning there is no problem, but suddenly i have problem with shortcuts. When i want to do "cmd c" it make an other shortcuts same thing for "cmd s", "cmd v" and surly some other. But when i write there is no problem "c" is "c"... If somebody have an idea please help me. Thank you. Unless you indicate your specific update level of Office as well as OS X & describe what the keystrokes *are* doing contrary to what you expect there isn't much we can offer. -- Regards |:>)...

encoding problem in Outlook 2007 importing Outlook 2000 personal folders
I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese characters in the subject became unreadable but it's ok to display in message body. In Outlook 2000, there's no problem to display the Chinese characters in the subject. What's wrong with Outlook 2007? What setttings should I change to fix the problem? Thanks. cyl <u8526505@gmail.com> wrote: > I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese > characters in the subject became unreadable but it's ok to display in > message body. In Outlook 2000, there's no problem t...

Comparing two spreadsheets
Is there any way to compare one large spreadsheet against another to ascertain what names are missing off of the second file that are on the first one? I hope I explained that clearly because my brain has turned to mush at this point. -- Thanks, Alex F. Buiel II abuiel@hotmail.com Hi see: http://www.cpearson.com/excel/duplicat.htm#InOneNotOther -- Regards Frank Kabel Frankfurt, Germany Alex F. Buiel II wrote: > Is there any way to compare one large spreadsheet against another to > ascertain what names are missing off of the second file that are on > the first one? I hope I exp...

Outlook 2003 PST problems
I just installed Office 2003 professional on a new computer & am having problems with outlook. I copied my Outlook.pst file into the appropriate directory & although it is recognized the calendar is not working properly. I cannot attach any of the colored labels to my appointments - so everything is pretty much in black & white. I totally uninstalled & reinstalled office... first removing my pst file... but there appears to be an ini file... or something that is retaining some information... does anyone know of a fix for the labels... or how to TOTALLY uninstall office (so I...

How do I link data workbooks to a create a graph?
I am attempting to take workbooks from the last 4 months, each with a daily data sheet, and link Mondays, Tuesdays, Wednesdays, etc. to time of day and staffing levels. I want the final result to be charts that show the relationship between staffing levels, incoming call volume, and time of day. hi Andrea, Many things are possible in Excel & I'd say that you could probably find a way of linking all the workbooks. However, I think any "easier" approach would involve opening each file & copying the data from each sheet in each file to a single sheet in one file (with...

Problem with Authentication
The CRM application was running smooth. But now I can't logging. It ask my credentials and than return a 401.1 error. I had already reinstalled the CRM server but it won't work. I'm accessing it in the same local network. I'm running CRM 3.0 in SBS. Best regards, Erico Hi When you open a Internet explorer and type the name of the CRM server, it prompts for user and password ? Are you logged in with domain credentials ( AD user ) ? If you are, so add url of the crm server in Local intranet. Enable "Automatic logon only in intranet", this is under security,c...

calendar problem
Dear all, I am using both mail and calendar function in outlook 2002. Everything is ok until recently, when I try to make a new appointment or checking any old appointments, an error message "out of memory or resource, try to close some windows..." pop up. The mail function is still ok. Can anyone tell me how can I solve this? I have already installed sp2. The version of office is the professional one with frontpage. Thanks. tp ...

Create a Variable from First 4-5 chars of a existing value ??
In a current table, the values in a particular field are all items like: MD45 Tuesday PM or TX341 Friday AM or FL12 Monday PM ...in other words...2 parts seperated by a space. The first part is always a State Abbrv. followed by either a 2 or 3 char. number. That first part will always be 4-5 characters long (or...everthing before the first Space). I'm needing to create a varible that is the First Part of the existing value.. ..in other words...the variable would need to be (from the above examples)... MD45 or TX341 or FL12 I'm kind of familiar with LEFT command. Would usin...

pivot table grand totals not showing for all columns...
i have a pivot table that shows the grand total for some columns, but not for others... there are no differences in the data layout, yet this happens? any clues as to why? and how I can get the grand totals to show for all fields. thanx in the PivotTable floating toolbar, click PviotTable, then Table Options, select 'Grand totals for columns' option. ...

Vista blue screen problem...please help!
I've seen some other threads, here are the dump files: 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' (http://rapidshare.com/files/347103149/Minidump.rar.html) Please, help me out here. -- ceVil It might be better to know at what point the bsod occurs and what the actual err.msg given is "ceVil" <guest@unknown-email.com> wrote in message news:0b9a0c60b90bf6c0be88bda30f2820ab@nntp-gateway.com... > > I've seen some other threads, here are the dump files: > 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' > (...

SQL 2005 patition table
Hi, I have 20 million (5 type record ids -- 2-3gb)records need to be loaded into a table daily. Is it a good idea to have a a patiotion table seperated by reciord type id. 1. It will be faster for retrieval in performance? 2. What is the drawbacks ot have a partitioned table instead of regular table? Thanks, Mecn My opinion is 1) It will be fatser if the user searches on particular typeid , if he/she searches on typedid 1 and 5 then it will 'scan' two partitions 2) You have to have some experience to maintain partitons "Mecn" <mecn@yahoo.com> ...

problem #4
Hi, I am facing this new problem... i.e a user has installed Office 2003 on win2k prof platform.. whenever she is working on a outlook.. she gets a Microsoft error message... saying to send the report or don't send the report... Usually I have seen this problem in IE... But for outlook it is new to me... after clicking on send or don't send report.. the outlook closes. And there are no IE open..... and if atall it is open.. the IE does not close... Need your help regards, KAH What is logged to the Event Viewer regarding this? Try one of the following already; http://www.howt...

95 and 97 problem
For some unknown reason there is Excel 95 and 97 on this pc.When i double click on an Excel file, the pc defaults to the 95 program (Which incidently doesn't work properly). So my question is how do i get the pc to default to 97. Cheers Craig Craig, Have a look at Windows Help. From Windows 2000 Help (Index under Programs Associating with File Types) To change which program starts when you open a file In My Computer or Windows Explorer, on the View menu, click Folder Options. Click the File Types tab. In the list of file types, click the one you want to change. Click Edit. In Act...

Can not Create cases
I'm having a problem creating cases. Everytime I try to create a new case I get the message Duplicate Record. A record of this type with this name already exists. Please choose a different name and try again. No what I use for the account, title or subject. Even Log Error Category: None Event ID 3 Description MSCRM Platform Error Report: ---------------------------------------------------------------------------- ---------------------------- Error: The statement has been terminated. Error Message: The statement has been terminated. Error Details: Details on this error have not be...

Can an activity be created and managed by a Team Member?
Hello, I was thinking that TM where allowed to create and manage activities because in the Security Team Member Group the “Create New Proposal or Activity” box is checked. But when trying it, a problem occurred. They are allowed to fill the Summary Information for a new activity, but after clicking on the save button, nothing appear in the Proposal and Actities view, neither in the project Center. Looking at it from an administrator account the activities do exist but are not visible for the TM who created them. So what’s the problem? ...

Date problem
I can't believe there's no post on this, but I can't find it. I've tried the solutions I could find (see below) and still get the error: "The expression is typed incorrectly or it is too complex to be evaluated. For example....Try simplifying...." I have a date field, formatted as Date/Time, General Date, default Value = Now(). I like having the date and the time - in case we need it. I want to run a report on calls taken just for one day. I have CallDate: CallDateAndTime in my query, with "criteria" as Between ([Forms]![frmReports]![txtStartDate]) A...

sync problems
I have all of my info on an HP Ipac. I had to reformat the hard drive and I did not make a back-up file. I am trying to move everything back to the computer but it says there is an error with syncing it. How can I move everything from the PDA back to Outlook again? Please help- thanks ...

Office 2007 - HELP
I have used Word for many years and love it - not too thrilled with the changes in Office 2007, but my bigger issue is with Publisher 2007. I have an image that I have used in Word just fine - meaning, the on screen colors are correct and when printed the colors are correct. Someone sent me a Publisher file and asked me to add the image - I did this - now the image is messed up - the colors are correct on screen, but when printed FROM MY computer the image colors are all wrong - but if I transport the file to a different computer it prints fine I have reinstalled Office - no good Any id...

Installation Problem!!
I am having a problem installing MSCRM 1.2. My configuration consists of a Domain Controller running Win 2000 Server SP4 . I am trying to install MSCRM on a member of the domain running Windows 2000 Server SP4. There is a DNS Server on the DC which is integrated with AD, and a SQL Server 2000 running on the Win 2K machine. The install errors out when CRM creates the root business with the message: Setup was unable to install Microsoft CRM Server. Setup was unable to provision your organization. Setup was unable to create the root business. The configuration of ASP.NET seems to be ok, the pr...

Extender-Create a new data entry window
Is it possible to create a new extender form or window (not sure of the terminology) to enter data into Dynamics? Specifically the Sales Forecast Window in Manufacturing is terrible for entering data, everytime you move to the right, it the scrolling window jumps back to the top and you have to find the item again. Anyway, I would like a new window to enter a sales forecast, is this possible? thanks -- Doug Unfortunately Extender data is stored in Extender tables and cannot be stored in the Sales Forecast tables. I agree with you that the data entry screen is horrible. I am tal...

Pivot Table #56
I am trying to create a Pivot table in Excel, using Microsoft Query linking to SQL database. SQL stores the date as Date/Time. It becomes impossible to group in Excel using Pivot Table, by date/time. I want to create a record in Microsoft query using the date field, but convert to Date only as dd/mm/yyyy and retain the format as Date and not as Text. I have tried Left(Date,11) and Convert(VARCHAR,1,101), none of them work. Could someone help me with the correct syntax. Microsoft query does not recognize MID. Thanks Krish ...

Problems Creating a disclaimer in Exchange 2003
I am trying to create a server based disclaimer that will stamp all of my smtp emails going to the internet. I have been following KB article 317680 with no luck. I get an error like the one below. Binding Display Name Specified: smtpscriptinghost ** Registration Failed ** Err.Number (HRESULT) = 0x1AD Err.Description = ActiveX component can't create object ProgID = cdo.ss_smtponarrival COM Category = {FF3CAA23-00B9-11d2-9DFB-00C04FA322BA} Corresponding Event = onarrival ** Have you registered your sink COM class on this machine? I am puttin...

Resource editor problems
Hello all, Under VC++ 7.1... Please consider these two lines: IDC_ARROW_ADD_CANCEL DISCARDABLE "res\\cur00004.cur" IDC_ARROW_ADD_CANCEL CURSOR DISCARDABLE "res\\cur00004.cur" The second is a hand-edited change to the first. Both will compile just fine in the resource compiler. However, after I use a text editor to make this change, I cannot open the .rc file in the resource editor. The resource editor issues the following error open attempting to open the .rc file: error RC2135 : file not found: CURSOR Can anyone shed light on what's going on here? Thanks, Dave ...

Using Checkboxes to add data to a table.
I have been having trouble developing this form for a couple of days. It seems the solution should be simple but so am I. I have an input form with four text boxes. I need to use the same data and create a new line in the table for up to but not always 9 different company positions. I was given a possible way of keeping the info on the form for the next position using the AfterUpdate event and setting the default back to the same box. But in using his suggestion I get #NAME? for the boxes with text when I select the next new record. The boxes with numbers come back the way he said it wo...