I'm actually not sure about that myself. I _think_ it should be an error since 
the "Owner" element in the first group reference is really different than the 
"Owner" element in the second group reference. Why is group reference used in 
this case instead of element reference (if you used element reference instead, 
there would be no issue)? Do you know? This is a "grey" area of the spec, I'll 
have to do some digging.
However, I am surprised that this in itself causes you to not be able to 
generate the binding, after all, like you said, it is a warning.

Thanks,
Radu

-----Original Message-----
From: Jacob K Asiedu [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 11, 2005 2:21 PM
To: dev@xmlbeans.apache.org
Subject: Re: XMLBeans problems with xs:group ref


I forgot to attach the schema..

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="root">
        <xs:complexType>
            <xs:sequence>
                <xs:group ref="Owner" minOccurs="1" maxOccurs="unbounded"/>
                <xs:element name="test">
                <xs:complexType>
                <xs:sequence>
                    <xs:group ref="Owner" minOccurs="1" 
maxOccurs="unbounded"/>
                </xs:sequence>
                </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:group name="Owner">
        <xs:sequence>
            <xs:element name="Owners" type="OwnerType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en-us">Entities having 
legal possession of the data collection content. Owners are defined only 
for the entire data collection, not for individual descriptions etc. (= 
http://www.loc.gov/ marc.relators/own)</xs:documentation>
                </xs:annotation>
                <xs:unique name="Owners_UniqueAgentRole">
                    <xs:selector xpath="Agent"/>
                    <xs:field xpath="@ref"/>
                    <xs:field xpath="@role"/>
                </xs:unique>
            </xs:element>
        </xs:sequence>
    </xs:group>
    <xs:complexType name="OwnerType">
        <xs:sequence>
            <xs:element name="Agent">
                <xs:complexType>
                    <xs:simpleContent>
                        <xs:extension base="xs:string">
                            <xs:attribute name="role" type="xs:string"/>
                            <xs:attribute name="ref" type="xs:string"/>
                        </xs:extension>
                    </xs:simpleContent>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:schema>


Jacob K Asiedu wrote:

> I cannot generated source code from the following schema. This because 
> the reference to the group "Owner" is included more than once.
> An error message that says "warning: sch-props-correct.2: Duplicate 
> identity constraint: Owners_UniqueAgentRole"
> comes up..I think it is an error on the part of XMLbeans but i am not 
> sure..Any help will be appreciated.
>
>

-- 
Jacob K. Asiedu
Software Engineer, Computer Science Dept.
UMASS-Boston
[EMAIL PROTECTED]
http://efg.cs.umb.edu
phone (+1)617 287 6481 
fax (+1)617 287 6499 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to