Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Schema - Overwrite Element - ComplexType

Reply
Thread Tools

XML Schema - Overwrite Element - ComplexType

 
 
Istvan
Guest
Posts: n/a
 
      08-22-2006
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

 
Reply With Quote
 
 
 
 
Istvan
Guest
Posts: n/a
 
      08-22-2006
.....

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>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Element + complextype name in xml schema Nicolas Mailhot XML 4 04-11-2005 07:36 AM
complexType in Xml Schema Peter Theill XML 2 11-25-2004 08:22 PM
xml schema complextype indicator tsolbjor XML 0 07-19-2004 01:17 PM
XML-Schema: How can I use a complexType without a certain order of elements? Wolfgang XML 2 10-07-2003 07:50 AM



Advertisments