Originally posted by: csalac
I have an XML Schema that was built using other schema files as input. Each of these other schemas makes use of a common.xsd that contains common elements (address, phone, contact info, etc). This schema validates in XMLSpy. I used this schema to create an input type tree in WTX. The type tree created fine (with the exception of the pesky Global element, but I eliminated that and pointed to the root of the schema.) However, when I try to run a test XML file, created by XMLSpy, through this input card I get the following error:
Error (-1), "XMLParser: Input XML data is invalid."
SAXParseException, Error
line: 4 column: 31 Global complexType:'Phone' declared more than once or also declared as simpleType
Error (-1), "XMLParser: Input XML data is invalid."
SAXParseException, Error
line: 23 column: 37 Global complexType:'ContactInfo' declared more than once or also declared as simpleType
Error (-1), "XMLParser: Input XML data is invalid."
SAXParseException, Error
line: 33 column: 33 Global complexType:'Address' declared more than once or also declared as simpleType
Error (-1), "XMLParser: Input XML data is invalid."
SAXParseException, Error
line: 56 column: 30 Global complexType:'Name' declared more than once or also declared as simpleType
Error (-1), "XMLParser: Input XML data is invalid."
SAXParseException, Error
line: 68 column: 34 Global complexType:'DateSpan' declared more than once or also declared as simpleType
These are all elements that come from the common schema that is imported into all the schemas used by the main schema. So Xerxes seems to object to the fact that I have imported common.xsd into multiple schemas, however XMLSpy considers this perfectly valid (and is also, I believe, an XML best practice).
In the metadata in my input card all the namespaces used by the main schema, including common, are defined.
Is there a way to make Xerxes believe this is a valid schema? The whole point of importing the schemas is for re-usability as they are used by other schemas as well. So dumping everything into my main schema isn't really an option.
I have attached the XML file XMLSpy created from the schema for reference, although the data in there is garbage.
#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender#DataExchange