SpaceCowboy850 Posted July 29, 2014 Share Posted July 29, 2014 I'm doing some code generation, and for coding reasons, I want to derive from the same base type for all of my XSDs. So this works: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.02"> <xs:include schemaLocation="MessageBase.xsd"/> <xs:element name="ServiceRequest" type="ServiceRequestType_VersionInfo_Request"/> <xs:complexType name="ServiceRequestType_VersionInfo_Request" mixed="true"> <xs:complexContent> <xs:extension base="MessageBase"> <!-- insert schema definition stuff here --> </xs:extension> </xs:complexContent> </xs:complexType></xs:schema> In another file, I have this: <?xml version="1.0" encoding="UTF-8"?><!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by VeriFone, Inc. (VeriFone, Inc.) --><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.5"> <xs:complexType name="MessageBase"/></xs:schema> But I need that first file in its own namespace. If i set a "targetNamespace" on the first file (to put it in its own namespace), then it complains it can't find the MessageBase complexType. I'm not sure what I'm doing wrong. Any ideas? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now