Re: multiply-connected graph of schema import

Michael Kay <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.