Re: multiply-connected graph of schema import

On 14/04/2011 14:15, Paul Harrison wrote:
> Is a multiply-connected (but non-circular) graph of schema imports allowed?
>
> e.g  B imports A
>         C imports B
>         D imports C and A
>
> Some tools seem to get a little confused by this sort of thing
>
> Regards,
> 	Paul
>
>
It's not only allowed, it's often essential.

The rule is that if a schema document A references a schema component in 
namespace N, then it must include an xs:import for namespace N.

It's true however that the rules in the spec leave a lot to be desired 
(XSD 1.1 improves them, though not as much as I would like), and as a 
result, implementations are not 100% consistent.

xs:include is different - there's never a need to have circular 
includes, but they certainly shouldn't cause any problems if you do.

Michael Kay
Saxonica

Received on Friday, 15 April 2011 10:57:50 UTC