xsl-list
[Top] [All Lists]

Basics of XML Schema inheritance

2003-09-12 09:14:32

Hello All,

I have a simple SOAP message for which I would like to define a XML Schema. 
This SOAP message has just 2 elements.

Could any of you please help me out on this one?

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
                <CPG-ENV:SenderID 
xmlns:CPG-ENV="http://www.cpgmarket.com/soap/";>9999998000</CPG-ENV:CPGSenderID>
<SOAP-ENV:Body>
                <CPG-ENV:DocumentID 
xmlns:CPG-ENV="http://www.cpgmarket.com/soap/";>Z2030000000000436060</CPG-ENV: 
DocumentID>
</SOAP-ENV:Envelope>

I have defined an XML Schema based on my understanding, which goes like this

<?xml version="1.0"?>
<xsd:schema targetNamespace="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:cpg="http://www.cpgmarket.com/soap/"; 
xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <xsd:redefine 
schemaLocation="http://schemas.xmlsoap.org/soap/envelope/";>
                <xsd:complexType name="Header">
                        <xsd:complexContent>
                                <xsd:extension base="Header">
                                        <xsd:sequence>
                                                <xsd:element name="SenderID" 
minOccurs="0"/>
                                        </xsd:sequence>
                                </xsd:extension>
                        </xsd:complexContent>
                        <xsd:anyAttribute namespace="##any" 
processContents="lax"/>
                </xsd:complexType>
        </xsd:redefine>
        <xsd:redefine 
schemaLocation="http://schemas.xmlsoap.org/soap/envelope/";>
                <xsd:complexType name="Body">
                        <xsd:complexContent>
                                <xsd:extension base="Body">
                                        <xsd:sequence>
                                                <xsd:element name="DocumentID" 
minOccurs="0"/>
                                        </xsd:sequence>
                                </xsd:extension>
                        </xsd:complexContent>
                        <xsd:anyAttribute namespace="##any" 
processContents="lax"/>
                </xsd:complexType>
        </xsd:redefine>
</xsd:schema>

As you people can guess it does not work.

Any input/suggestions would be highly appreciated.

Regards,

Rajesh


The information transmitted is intended only for the person or entity to which 
it is 
addressed (XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com) and may contain 
confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of, or taking of any 
action in reliance 
upon, this information by persons or entities other than the intended recipient 
is prohibited. 
If you received this in error, please contact the sender and delete the 
material from any computer.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>
  • Basics of XML Schema inheritance, Rao, Rajesh <=