473,324 Members | 2,254 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,324 software developers and data experts.

XML Schema - Overwrite Element - ComplexType

Hi !

Can somebody tell me if it's possible to overwrite an element
definition when I derive an complexType (with extension, or something
like this ) ?

The base complexType looks like:

<xs:complexType name="statechangetype">
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="State" type="statetype"/>
<xs:element name="Condition" type="conditiontype" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="When" type="whentype" minOccurs="0"/>
<xs:element name="Restriction" type="restrictiontype" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

and in the derived complexType, I want to overwrite the element from
the base complexType "State" like this way:

<xs:complexType name="bubblestatechangetype">
<xsd:extension base="statechangetype">
<xs:sequence>
<xs:element name="State" type="bubblevaluetype"/>
</xs:sequence>
</xsd:extension>
</xs:complexType>
Thanks.

Best regards, Istvan

Aug 22 '06 #1
1 1902
.....

This type "statetype":

<xs:simpleType name="statetype">
<xs:restriction base="xs:string">
<xs:enumeration value="R"/>
<xs:enumeration value="O"/>
<xs:enumeration value="F"/>
</xs:restriction>
</xs:simpleType>

should be replaced by "bubblevaluetype" :

<xs:simpleType name="bubblevaluetype">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="300"/>
</xs:restriction>
</xs:simpleType>

Aug 22 '06 #2

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

Similar topics

1
by: Alex Sab | last post by:
Hi, I am having trouble describing in a schema that elements can be mandatory in one part and not mandatory in another part of the xml document. Here is a sample xml file <Model:Templates>...
4
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could...
0
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
0
by: Deep Purple | last post by:
I started with the following error... ------------------------------------------------------- An error occured while loading the schema with TargetNamespace 'http://www.w3.org/2001/XMLSchema'...
1
by: billa1972 | last post by:
Hi, I am trying to hook into Yellow Freight's rating webservice. Below is the wsdl. When i try and create a proxy file with wsdl.exe i get the following errors, see below. Also, when i...
5
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in...
3
by: Eric Lilja | last post by:
Hello again, I'm having a new problem converting a dtd to an xml schema. This once is a little bit more complicated than in my previous question. The following file validates correctly: <?xml...
2
by: Krzysztof Nogal | last post by:
Hi, I have following problem with XML Schema definition. I have following element InitialEcrHeader: <xs:complexType name="InitialEcrHeader"> <xs:complexContent> <xs:extension...
0
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.