Stef, Unlike extension, you must redefine everything from the base type in the derived type, further restricting the definition as you see fit (as opposed to just placing the things you want to change).
http://www.w3.org/TR/2000/CR-xmlschema-0-20001024/#DerivByRestrict 4.4 Deriving Complex Types by Restriction ....<b>Notice that types derived by restriction must repeat all the components of the base type definition:</b>... Your situation is complicated considering the bit you want to restrict is injected by extension of yet another type. In any case, that's your general problem. Good luck! Ed <complexType name="RootFolder"> <complexContent> <restriction base="Folder"> <attribute name="Guid" type="string" fixed="ROOT"/> </restriction> </complexContent> </complexType> On 3/1/06, stef amerio <[EMAIL PROTECTED]> wrote: > Hello, > > I have defined a "Folder" of "references" to "Items", a "Folder" being > itself an "Item" : > > <complexType name="Item"> > <attribute name="Guid" type="string"/> > </complexType> > > <complexType name="Folder"> > <complexContent> > <extension base="Item"> > <sequence> > <element name="Ref" type="Guid" minOccurs="0" > maxOccurs="unbounded"/> > </sequence> > </extension> > </complexContent> > </complexType> > > Now, I want to define a "RootFolder", as being a "Folder" with a specific > Guid : > > <complexType name="RootFolder"> > <complexContent> > <restriction base="Folder"> > <attribute name="Guid" type="string" fixed="ROOT"/> > </restriction> > </complexContent> > </complexType> > > This does not work. The xmlbeans validation tells me that RootFolder cannot > contains Ref elements. > What I am doing wrong here ? > Thank you for your help. > > PS : I _need_ that RootFolder class be a Folder > > > > --------------------------------------------------------------------- > 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]

