You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Schmid, David" <sc...@cajvc.com> on 2001/10/25 17:38:47 UTC

What is circular import?

Hello

 I notice on the changes lists that 'circular import' has recently been
supported. Can somebody explain what this is?

 The reason I ask is that I am hoping it might fix a problem I am having
using Schema with Xerces. My schema definitions are necessarily spread
across many .xsd files. I have a toplevel.xsd that imports them all,
preserving their namespaces, that my instance documents use. The problem is,
I would like all the imported .xsd files to use some shared common basic
type definitions, like Color, that I have defined in a globals.xsd file. If
I import or include globals.xsd into each of the non-toplevel.xsds, each
.xsd is fine on its own, but I get various clashes and problems in
toplevel.xsd, I think because globals.xsd has in effect been included many
times by each of the .xsds. Can some kind soul suggest a solution to this?

Thanks




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: What is circular import?

Posted by Khaled Noaman <kn...@ca.ibm.com>.
When Schema A imports Schema B, and at the same time Schema B imports Schema A,
that situation represents a circular import.

I would suggest that you import globals.xsd into each of the non-toplevel.xsds,
and use the latest nightly build of Xerces-C to parse your schema to see if you
are still having problems.

Regards,
Khaled

"Schmid, David" wrote:

> Hello
>
>  I notice on the changes lists that 'circular import' has recently been
> supported. Can somebody explain what this is?
>
>  The reason I ask is that I am hoping it might fix a problem I am having
> using Schema with Xerces. My schema definitions are necessarily spread
> across many .xsd files. I have a toplevel.xsd that imports them all,
> preserving their namespaces, that my instance documents use. The problem is,
> I would like all the imported .xsd files to use some shared common basic
> type definitions, like Color, that I have defined in a globals.xsd file. If
> I import or include globals.xsd into each of the non-toplevel.xsds, each
> .xsd is fine on its own, but I get various clashes and problems in
> toplevel.xsd, I think because globals.xsd has in effect been included many
> times by each of the .xsds. Can some kind soul suggest a solution to this?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org