You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Usorov, Evgeny" <EU...@kbv.de> on 2004/08/10 16:36:44 UTC

import and include schemas when building typelibs

Hallo

when i build reusable typelibs, it is necessary to deal with many schemas. Now i have following situation where 
the import of the schema don't work. I know that Xerces do not perform 2ximports when they reference
to the same namespace but different files. My example is a bit different: i have 3-schemas and only
two different namespaces: "ns_1" and "ns_2":

a.xsd has namespace "ns_1" and imports types from b.xsd with namespace "ns_2"
b.xsd has namespace "ns_2" and imports types from c.xsd with namespace "ns_1"
c.xsd has namespace "ns_1" (so a.xsd and c.xsd have the same namespace)

So when validating a.xsd, Xerces-parser (2.6.2) don't find types in c.xsd and show an error
that b.xsd is not valid.

Now the only solution is: a.xsd should include c.xsd This is a funny situation, to use in b.xsd
types from c.xsd, i can not include directly the interesting file, instead go around and manipulate
a.xsd. And when doing so, my b.xsd is not valid without a.xsd. So i have always to think about
which files are included and which are imported. For example: I whant to develop new d.xsd that
uses types from b.xsd. I have problem if I forgot to include/import c.xsd. And so on...

This is only an example, but what to do if i have 10-20 schemas and 4-10 namespaces ?

The behaviour of Xerces, not to resolve 2ximports of the same namespace, produces such situations. It is not developer-friendly.


Evgeny Usorov


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