users@jaxb.java.net

Unable to include schema with no target namespace

From: Ellis Brover <Ellis.Brover_at_toyota.com.au>
Date: Tue, 28 Jan 2003 10:06:23 +1100

The JAXB 1.0 beta appears to have problems with the "chameleon" XML schema
design pattern, i.e. where a schema with targetNamespace "A" includes a
schema which has no targetNamespace.

The correct behaviour in this case is for the included schema to "inherit"
the targetNamespace of the including schema.

When I run xjc over the including schema, however, I get an error:

     parsing a schema...
     The target namespace of the included schema "" doesnt agree with the
expected value "{1}"
       line 3 of common.xsd

followed by lots of consequential errors. Note that in my example, the
included schema is common.xsd.

Regards,
Ellis.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                               DISCLAIMER
* This email and any attachment may contain confidential information.
  If you are not the intended recipient you are not authorised to copy
  or disclose all or any part of it without the prior written consent
  of Toyota.
* Opinions expressed in this email and any attachment are those of the
  sender and not necessarily the opinions of Toyota.
* Please scan this email and any attachment for viruses. Toyota does
  not accept any responsibility for problems caused by viruses, whether
  it is Toyota's fault or not.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -