aspose file tools*
The moose likes XML and Related Technologies and the fly likes how to import 2 xsd's which have same namespace? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to import 2 xsd Watch "how to import 2 xsd New topic
Author

how to import 2 xsd's which have same namespace?

vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
Hi I have a xsd (schema1.xsd) which refers to elements from two other xsd's. schema1.xsd is as follows

As can be seen the 2 imported xsd's have the same namespace. element2 is present within schema2.xsd and element3 is present within schema3.xsd. With the above xsd I get the following error: src-resolve: Cannot resolve the name 'typ:element3' to a(n) 'element declaration' component.

I have come up with a workaround by introducing a fourth schema. now schema1.xsd is as follows:

schema4.xsd is as follows:

Does anyone know of a better solution?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to import 2 xsd's which have same namespace?
 
Similar Threads
Unqualified elment - but still have prefix at the root
using JiBX
Oracle BPEL result SOAP message
Help me for xsd creation
JAXB issue | Jboss error on startup