users@jaxb.java.net

xjc - multiple binding files

From: Hank Ratzesberger <hankr_at_crustal.ucsb.edu>
Date: Tue, 24 Jun 2003 16:02:22 -0700

[Thanks to Ed and Ryan at Sun for prior help,
hopefully I'll be a contributor soon...]


I have class name conflicts between two
schema files representing two namespaces.
I have tried two things to separate
the schemas into two packages in order to
avoid the collision:

1) adding a second .xjb file for first
   schema to the xjc command line:
   -b gmlstub.xjb

2) adding another bindings element to the
   the main xjb file (that I used to solve other
   class name conflicts):

<jxb:bindings schemaLocation="gml.xjb" node="/xs:schema">
  <jxb:package name="org.opengis.gml"/>
</jxb:bindings>

In both cases I get essentially the same error message
reported by xjc:

"file:gml.xjb" is not a part of this compilation line 17 of iso19115.xjb

Or slightly different if specified on the command line.

To summarize, I have two schemas, one uses/extends some of
the types of the other, but sans the namespace prefix,
declares elements of the same name as the other.

Tips, Tricks, RTFM's welcome.

Thanks,
Hank

============================================
Replying to a list? I'll get my copy there!

Hank Ratzesberger
http://crustal.ucsb.edu/ | http://neesgrid.org/
Institute for Crustal Studies
University of California, Santa Barbara
============================================