I currently have two XSD schemes and one is a "light" version of the other. Right now I have everything in the "light" version repeated in the "complete" schema, but this becomes a pain when I need to make a change, and it goes against the DRY principle anyways, so I was wondering if there was an element that served to include another schema into a schema, so I can have my "complete" inherit from the "light" schema to reduce maintenance hurdles.
In the Imports dialog box, in the Import New Schema as list, select XSD Import, XSD Include, or XSD Redefine, as appropriate, and then click Add. In the BizTalk Type Picker dialog box, expand the Schema node in the project tree, select the schema that you want to import, include, or redefine, and then click OK.
Deal with multiple XML schemas A restriction on the XML schema import is that only one XML schema can be loaded as source or target schema. If you want to load multiple XML schemas, please create a schema including or importing the XML schemas you want to combine.
xsd" /> where 'res' is a folder where the XSD is residing and this folder is at the same level of the folder from where you are referencing it. If you are giving Absolute path, then you need to write <xs:include schemaLocation="file:D:/workspace/Test/res/header.
There are two methods for this.
<xsd:include schemaLocation="pathToFile" />
should be used for including files of the same namespace.
<xsd:import namespace="namespace" schemaLocation="pathToFile" />
should be used for include files in a different namespace. Usually you will specify the namespace given as the targetNamespace of the imported schema.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With