users@jaxb.java.net

Re: Unique Particle Attribution

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 12 Feb 2003 13:11:55 -0800

> So, the schema looks something like this:
>
> <xs:complexType name="FilerType">
> <xs:sequence>
> <xs:choice>
> <xs:element ref="name"/>
> <xs:element ref="ssn"/>
> <xs:sequence>
> <xs:element ref="name"/>
> <xs:element ref="ssn"/>
> </xs:sequence>
> </xs:choice>
> <xs:element name="address" type="AddressType"/>
> </xs:sequence>
> </xs:complexType>

You can change the definition from (name|ssn|(name,ssn)),address to
(name,ssn?)?,address to avoid this problem. This is a standard
technique to avoid non-deterministic content model error in DTD.


> Is there anything I can do to avoid this error? Is this something is
> behaving as specified or is it going to be fixed in the FCS?

This is an error of your schema and XJC is correctly rejecting it. Any
conforming XML Schema processor is required to detect this error. This
behavior will be the same in FCS.

regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com