W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2003

Basics of XML Schema inheritance

From: Rao, Rajesh <rajesh.rao@cpgmarket.com>
Date: Fri, 12 Sep 2003 18:04:38 +0200
Message-ID: <A21E613DAB376745A032635245904472D18A16@cpgsrv02.net.cpgmarket.com>
To: <xmlschema-dev@w3.org>


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 (xmlschema-dev@w3.org) 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.
Received on Friday, 12 September 2003 12:22:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:39 GMT