Hi,
I am trying to validate the following xml against Schema1 which imports Schema2.
 
The schema validation doesn't report any errors, however on validating the xml I get the following errors
"Unknown element ocrq:request"  and then "ocrq:request is not valid for content model ( request|mesage)"
 
Please let me know what I might be doing wrong.
I have validated this xml sucessfully using xerces java parser.
Thanks
 
 
Xml
<?xml version='1.0' standalone='no'?>
<SOAP:Envelope xmlns:SOAP="urn:schemas-xmlsoap-org-soap.v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="urn:schemas-xmlsoap-org-soap.v1 file:///D:/build/ml1/olf/libxml/xsd/SOAPRequest.xsd">
   <SOAP:Body>
      <ocrq:request xmlns:ocrq="urn:or-request">
         <si:sourceInfo xmlns:si="urn:or-sourceInfo">
          </si:sourceInfo>
      </ocrq:request>
   </SOAP:Body>
</SOAP:Envelope>
 
 
Partial Schema1 (SOAPRequest.xsd)
  xmlns:ocrq="urn:ocr-request"
    xmlns:SOAP="urn:schemas-xmlsoap-org-soap.v1"
    elementFormDefault="qualified" attributeFormDefault="qualified">
 
<xsd:import namespace="urn:ocr-request" schemaLocation="Request.xsd"/>
    <xsd:import namespace="urn:ocm-msg" schemaLocation="Msg.xsd"/>
    <xsd:element name="Envelope" type="SOAP:SoapRequestType"/>

    <xsd:complexType name="SoapRequestType">
        <xsd:sequence>
            <xsd:element ref="SOAP:Body"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="Body">
        <xsd:complexType>
            <xsd:choice>
                <xsd:element ref="ocmsg:message"/>
                <xsd:element ref="ocrq:request"/>
            </xsd:choice>
        </xsd:complexType>
 
 
Partial Schema2 (Request.xsd)
<xsd:element name="request" type="ocrq:OCRequestType"/>
 <xsd:complexType name="OCRequestType">
  <xsd:sequence>
   <xsd:element ref="oci:ocInfo" minOccurs="0"/>
   <xsd:element ref="si:sourceInfo"/>
   </xsd:sequence>
 </xsd:complexType>
</xsd:schema>
 
 
 
Thanks


© 2004 OpenLink Financial


Copyright in this message and any attachments remains with us. It is

confidential and may be legally privileged. If this message is not

intended for you it must not be read, copied or used by you or

disclosed to anyone else. Please advise the sender immediately if

you have received this message in error.


Although this message and any attachments are believed to be free of

any virus or other defect that might affect any computer system into

which it is received and opened, it is the responsibility of the

recipient to ensure that it is virus free and no responsibility

is accepted by Open Link Financial, Inc. for any loss or damage in any

way arising from its use.



Reply via email to