File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Namespace and Package Name Problem 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 "Namespace and Package Name Problem" Watch "Namespace and Package Name Problem" New topic
Author

Namespace and Package Name Problem

claude jones
Greenhorn

Joined: Dec 14, 2001
Posts: 24
Hello,
I am trying to assemble a schema from multiple schema documents with different namespaces and then use Castor to generate the classes.
I have created the following schema definition which validates successfully

I have also updated the \org\exolab\castor\builder\castorbuilder.properties file and modified the XML namespace mapping to Java packages as follows:

The problem occurs when I try and generate the classes based on the camera.xsd.
The imported schemas (nikon, olympus, pentax) source files don�t get generated. Instead the source files are all bundled in the com.customobjects.camera package defined for the camera.xsd.

This does not map to the information specified in the \org\exolab\castor\builder\castorbuilder.properties.
The definitions for the �Class/Member Variables� are all wrong.
For example, I would expect the Lens type to have a package name of com.customobjects.lens not com.customobjects.camera.lens.
Does anyone know a solution to this problem? Is this a bug in Castor or am I doing something wrong?
Any help would be appreciated.
Thanks you very much!
Claude Jones.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Namespace and Package Name Problem