XSD restrictions/extensions

A

Arinté

I have this in my xsd:

<xsd:complexType name="basic_option">
<xsd:attribute name="action" type="tns:line_action"/>
</xsd:complexType>

<xsd:simpleType name="line_action">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="add"/>
<xsd:enumeration value="delete"/>
<xsd:enumeration value="remove"/>
<xsd:enumeration value="suspend"/>
<xsd:enumeration value="restore"/>
<xsd:enumeration value="update"/>
</xsd:restriction>
</xsd:simpleType>

<xsd:element name="call_forward_dont_answer">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="tns:basic_option">
<xsd:sequence>
<xsd:element name="paths"
type="tns:path_type"/>
<xsd:element name="number_of_rings"
type="tns:number_of_rings_type"/>
<xsd:element name="ring_to_number"
type="tns:telephone_number_type"/>
</xsd:sequence>
<xsd:attribute name="action"
type="tns:action_enum_5"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>

So for call_forward_dont_answer, I want to extend basic option and a
few more elements/fields, but then the action should only be add and
Remove. If I do extension then I can't change the attribute type, but
then if I do restriction then I can't add new elements/fields?

What should I do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top