I have a schema (actually 2, 1 included in another). As far as I can tell, all of my schemas match-up.
And, as far as I can tell, the files are valid. I have tested the schema validation from within XMLSpy and from within a VB application using the MSXML parser. All confirm that the XML files conform to the schemas. I'm getting an error in a Java program that I'm working on using the Xerces processor. As far as I can tell, it's a 1.x version. I know the actual code for the schema validation is proper because other schema files validate just fine (I've noticed that they don't have specific namespaces defined). The error message is: General Schema Error: Schema in file:/C:/SchemaValidation/Schemas/MyCompany_v3_0.xsd has a different target namespace from the one specified in the instance document :. My schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="urn:us:my:company" xmlns:myco="urn:us:my:company" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0"> <xs:include schemaLocation="Common_v3_0.xsd"/> <xs:element name="SubmissionGroup" type="myco:SubmissionGroupType"> ... schema stuff here ... </xs:element> <xs:element name="SystemRecordCountValues" type="nei:SystemRecordCountValuesType"/> </xs:schema> My XML file: <?xml version="1.0" encoding="UTF-8"?> <SubmissionGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:us:my:company" xsi:schemaLocation="urn:us:my:company MyCompany_v3_0.xsd" schemaVersion="1.1"> <SystemRecordCountValues schemaVersion="1.1"> ... valid xml document ... </SystemRecordCountValues> </SubmissionGroup> Any ideas? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
