Imported schemata can import schemata which import schemata which...
Figure 1. Figure
Declarations/Definitions belong to target namespace of where the occur (i.e. the value of the targetNamespace attribute nearest to them).
You don't have specify where imports of imported schemata are located.
At minimum you need to import the namespace of all definitions/declarations used.