I have a schema that is generating this error. I saw another post about this, but it related to a case where an element and a complex type had the same name. This is not exactly what I'm doing so I thought I'd ask if this is something that I can create a customization for or whether it is actually a bug in the RI.
My goal is to create a schema where a <filer> can contain a <name> or a <ssn> or both (but it must have at least one of them). I couldn't figure out any other way to express this than:
<filer> = <name> | <ssn> | <name> <ssn>
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>
This is causing the following error when I run xjc:
cos-nonambig: "":name and "":name (or elements from their substitution group) violate "Unique Particle Attribution".
line 20 of DiscoverBankruptcy.xsd
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?
Thank you very much,
Sean Rohead