472,993 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

xs:extension problem

Hi again,

I feel like I'm spamming the place, but these are all the things that I encounter during work.
I made a base complex type:
Expand|Select|Wrap|Line Numbers
  1. <xs:complexType name="BaseLocationType">
  2.         <xs:sequence>
  3.             <xs:element name="Path" type="xs:string" maxOccurs="1" minOccurs="1" />
  4.             <xs:element name="Files" type="xs:string" minOccurs="0" maxOccurs="1" />
  5.         </xs:sequence>
  6.     </xs:complexType>
Which I want to extend to define other more specific locations. Like for example:
Expand|Select|Wrap|Line Numbers
  1. <xs:complexType name="LocalDiskType">
  2.         <xs:complexContent>
  3.             <xs:extension base="BaseLocationType">
  4.                 <xs:sequence>
  5.                     <xs:element name="Drive" type="xs:string" minOccurs="1" maxOccurs="1" />
  6.                 </xs:sequence>
  7.             </xs:extension>
  8.         </xs:complexContent>        
  9.     </xs:complexType>
This means that I'm defining my second type and it is derived from my first type. It only adds another element to the type (beeing <Drive>)

If I'm doing something wrong here or if my logic is false, please tell me.

But as far as I can interprete the documentation that I read this should work. This would also imply that I can use this element as follows:
Expand|Select|Wrap|Line Numbers
  1. <Location>
  2.     <LocalDisk>
  3.         <Path></Path>
  4.         <Drive>C</Drive>
  5.     </LocalDisk>
  6. </Location>
Were it not that VS 2003 gives me an error on path, because it's not defined in my xsd according to VS2003.

BUT! Very important! If I leave the <Path> tag out, VS2003 complains because it was expecting a <Path> tag.

I don't know why he does that, but I would love to have a solution that is clean.

- SL33PY
May 10 '06 #1
0 1031

Sign in to post your reply or Sign up for a free account.

Similar topics

by: scorpion | last post by:
I have a simple type like this: <xs:simpleType name="SizeType"> <xs:restriction base="xs:token"> <xs:enumeration value="small"/> <xs:enumeration value="medium"/> <xs:enumeration...
by: dgaucher | last post by:
Hi, I want to consume a Web Service that returns a choice, but my C++ client always receives the same returned type. On the other hand, when I am using a Java client, it is working fine (of...
by: John | last post by:
I am trying to use the xml desinger in .net 1.1 to create the follow schema. where USAddress is derived from Address But when I generate the xml file, the .net xml editor says "The active schema...
by: Jeffry van de Vuurst | last post by:
Hi, I'm working on an xml schema and I'm running into some problems relating substitutionGroups and extensions. This xsd validates fine: There are three elements and three complex types and...
by: Mike Jansen | last post by:
Does anyone know why if I create a complexType based off another complexType using xsd:extension the attributes don't seem to be inherited? Is this a bug/non-implementation in the .NET Schema...
by: SideByEach | last post by:
Check out the sample XML below. Sample XML: <xs:element name="Image"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="Type" type="xs:string"...
by: randar | last post by:
I'm having problems getting an XML document to validate against a fairly complex scenario. Goals: -To have two schemas with two different namespaces, so that I can validate each one seperately...
by: Amol | last post by:
Hi all, I have a case where I have a element that can appear under multiple elements e.g. <AppFunctions> <UseTemplate name="1"/> <MethodSet name="2"> <UseTemplate name="3" /> <MethodCall...
by: RC | last post by:
Please see the example below. What is/are the difference(s) between xs:group and xs:extension <xs:complexType name="personinfo"> <xs:sequence> <xs:element name="firstname" type="xs:string"/>...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.