Jump to content

Nested XSDs

Recommended Posts

I've been putting together an XSD for my work. It was ridiculously long due to repeated basic information, so I thought I would make three base XSDs to include int eh main XSD...not to mention these will be re-useable on other XSDs I have to prepare. The issue I'm running into is this...int he Main XSD I come to a sectionI refer to another XSD..<xs:element type=B> (where B is the complexType referred to in B.xsd which already has the target namespace and is setup as an include above. This part works...under that I do a complexType and a sequence, because there are 2 XSDs that can be part of B within the Main XSD.so like this.

Main XSD	<xs:element name="Vehicle" type="Vehicles">		  <xs:complexType>				 <xs:sequence>					   <xs:element name="Passengers" type="Names" />					   <xs:element name="Address" type="Addresses" />				  </xs:sequence>			 </xs:complexType> 	 </xs:element>

the Main XSD could have multiple records with a Vehicle.Each Vehicle could have multiple passengers and addresses for those passengers.in Visual Studio 2008 I get an Warning on the 1st Element "Vehicle" that says"The type attribute cannot be present with either siimpleType or complexType."What is the deal? Any help is greatly appreciated. I try to fix and re-arrange things according to other things online, but i haven't found a case like this in particular. Each time I think i've fixed one warning, I get 4 more...it's almost cyclical.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...