troubleshooting Question

Schema Extending

Avatar of sureshkumar
sureshkumar asked on
Web Languages and StandardsXML
10 Comments1 Solution1317 ViewsLast Modified:
I am having one schema, I would like to create a new schema by extending existing schema. In the extended schema. I would like to do following things in the extended schema.
1. Add new elements for one of the sequence which is mentioned in first/existing schema.
2. Add new enumeration for one of the element which is mentioned in first/existing schema.

For example,
1.
First Schema:
-----------------------------------------------------------------------------------------------------------------------
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.suresh.com/standards/xml" targetNamespace="http://www.suresh.com/standards/xml" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="1.8.0">
<xsd:complexType name="Payment_Type">
  <xsd:sequence>
     <xsd:element ref="PaymentPlanCd" minOccurs="0"/>
     <xsd:element ref="DayMonthDue" minOccurs="0"/>
  </xsd:sequence>
<xsd:complexType>
<xsd:complexType name="ListOfCodes">
 <xsd:simpleContent>
  <xsd:restriction base="OpenEnum">
    <xsd:enumeration value="10"/>
    <xsd:enumeration value="11"/>
    <xsd:enumeration value="2D"/>
  </xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>
---------------------------------------------------------------------------------------------------------------------------

Second Schema:
---------------------------------------------------------
I would like to have all elements which are there in first schema and i want to add element called <BillPlayType> to the Payment_type.

Please let give me some sample XML too by considering Second Schema.

2. Adding enumeration to existing vlaues, For the ListOfCode elements i would like to add 50,60,70. so that in XML i can use either 10,11,50 or etc.

Thank you
suresh kumar
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros