Hi, I am using xerces 1.4.3 and jdk 1.3. I want to validate a an xml document with a schema using xerces. I am using the DOMParser to do this.I also want the schema location to be configurable and not provided in the instance document. So, I tried setting the schemaLocation using the parser property provided by the DOMParser. I am a little confused as to where I should be using the "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation" and the "http://apache.org/xml/properties/schema/external-schemaLocation" properties. When I just had simple xml instance documents without any namespaces, I was using the noNamespaceSchemaLocation as part of my validating code and it was validating fine. But, when I tried to validate an xml instance document with namespaces, I started getting the following errors :
The xml document is not valid according to the schema :: <error>1:120: General Schema Error: Schema in C:\jakarta-tomcat\webapps\soap\schemas\SoapebXML.xsd has a different target namespace from the one specified in the instance document :.</error> My root element is as below : <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope"> and the schema is attached below. Can someone tell me what I am doing wrong? Also, if I change the property to use the 'external-schemaLocation' then the parser just cannot recognize the schema at all. Thanks, Priya <<SoapebXML.xsd>>
SoapebXML.xsd
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]