users@jaxb.java.net

Re: AW: Problem validating a mixed content tag

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 19 May 2004 14:59:48 -0700

OK, I investigated the problem.

Essentially, the problem is in the case where you have a complex type
with a mixed content and another type that derives from it. I created a
shorter version to illustrate this.

According to the errata of the schema spec (E1-5), unless the derived
class explicitly says mixed="true", somehow the derived type isn't
considered to have a mixed content model.

I don't really believe this, but then given how terribly broken the
schema spec is, I'm not that surprised either. Or I could be just
reading it wrong.

If I'm reading the spec right, then the behavior you are seeing is
correct, because text is indeed not allowed in that context.

You can explicitly say mixed=true on the derived type, and I confirmed
that then the RI would allow the text just fine.

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net