You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Jacob K Asiedu <ka...@cs.umb.edu> on 2005/05/11 23:17:27 UTC

XMLBeans problems with xs:group ref

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
kasiedu@cs.umb.edu
http://efg.cs.umb.edu
phone (+1)617 287 6481 
fax (+1)617 287 6499 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


Re: XMLBeans problems with xs:group ref

Posted by Jacob K Asiedu <ka...@cs.umb.edu>.
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
kasiedu@cs.umb.edu
http://efg.cs.umb.edu
phone (+1)617 287 6481 
fax (+1)617 287 6499 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org