Me again, attaching the xml and schemas
-----Original Message----- From: Bob Schloss [mailto:[EMAIL PROTECTED] Sent: 05 December 2001 17:23 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: schema validation using xerces This message says that in the schema SoapebXML.xsd, the element <xs:import namespace="http://www.ebxml.org/namespaces/messageHeader" schemaLocation="../webapps/soap/schemas/ebXML.xsd"/> does not match the <xs:schema targetNamespace="foo" ...> which is is the file 'webapps/soap/schemas/ebXML.xsd'. You didn't attach that file so I can't determine if this statement by the schema validator is correct. Bob Priya Mahajan <[EMAIL PROTECTED]> on 12/05/2001 11:24:00 AM Please respond to [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc: Subject: schema validation using xerces 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>> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SoapebXML.xsd
Description: Binary data
ebXML.xsd
Description: Binary data
xlink.xsd
Description: Binary data
xml.xsd
Description: Binary data
TestSoapEnv.xml
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]