users@jaxb.java.net

Re: Generate java packages to reflect structure of schema tree?

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Sat, 3 Nov 2007 18:12:16 +0100

Hi.

> I have a fairly large schema directory tree with several levels to
> compile. Each directory has numerous files.
> I would like to generate the bindings such that it generates java
> packages reflecting the directory structure of
> my schema tree.
>
> Is there a way to accomplish this more efficiently than to:
>
> * compile each directory separately and specified a package for each
> directory (vbery tedious and verbose in maven)
> * Specify a package customization for each schema file (very
> painfully tedious)
>
> What would be nice is some mode in xjc that just does the right thing by
> taking the specified package name and map it to base package (fixing any
> invalid java names in the process) and then for each sub-directory map
> it to a sub-package corresponding to the sub-directory name.
>
> Shall I file an RFE on this? What is the best approach for this problem
> using the latest JAXB release. TIA.

I believe you're dealing with OGC schemas, am I right? If so, I've
compiled half of their schema stack with JAXB 1. Let me know, I'll
post notes on my experience then.

Bye.
/lexi