Hi Holger There are a couple of problems here. One is that the error message is a bit misleading and leads you to think that there's some problem with the type definition (in your case "typeMLSTRING00250") when in fact it's a problem with the _use_ of that type.
The second problem is that I think XmlBeans has been overzealous. It is true that if you define something like your ARTICLE_STATUS definition using <complexContent> that the referenced base type must be a complex type (see http://www.w3.org/TR/xmlschema-1/#src-ct step 1). However I can't find anything in the spec which goes the one step further and also insists that the base type must be defined (either explicitly or implicitly) with <complexContent> i.e. it should be fine for a type defined using <complexContent> to be an extension of a <complexType> which has <simpleContent>. However (as you saw from the error message) at the moment XmlBeans does go that one step further and insists that if the type uses <complexContent> then so must the base type. I think this is a bug and have raised a JIRA (see http://issues.apache.org/jira/browse/XMLBEANS-239) with a) a smaller repro (based on your schema) and b) a patch to fix it. In the meantime if you have control over the schema you can change all of the _uses_ that cause the above error to <simpleContent>. I have tried that and it removed all errors (still had 1 warning about something else) when compiling your schema. Hope that helps. Cheers, Lawrence > -----Original Message----- > From: Holger Rieß [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 18, 2005 11:10 PM > To: [email protected] > Subject: Re: scomp problem with complextype and simplecontent > > Hi Lawrence, > > the original schema is from BMECAT.ORG and has more then 7000 lines. I > will send you this schema in seperate mail. > > There are 5 definitions like > > <xsd:complexType name="typeMLSTRING00050"> > <xsd:simpleContent> > <xsd:restriction base="dtMLSTRING"> > <xsd:maxLength value="50"/> > <xsd:minLength value="1"/> > </xsd:restriction> > </xsd:simpleContent> > </xsd:complexType> > <xsd:complexType name="typeMLSTRING00080"> > <xsd:simpleContent> > <xsd:restriction base="dtMLSTRING"> > <xsd:maxLength value="80"/> > <xsd:minLength value="1"/> > </xsd:restriction> > </xsd:simpleContent> > </xsd:complexType> > <xsd:complexType name="typeMLSTRING00250"> > <xsd:simpleContent> > <xsd:restriction base="dtMLSTRING"> > <xsd:maxLength value="250"/> > <xsd:minLength value="1"/> > </xsd:restriction> > </xsd:simpleContent> > </xsd:complexType> > <xsd:complexType name="typeMLSTRING06000"> > <xsd:simpleContent> > <xsd:restriction base="dtMLSTRING"> > <xsd:maxLength value="6000"/> > <xsd:minLength value="1"/> > </xsd:restriction> > </xsd:simpleContent> > </xsd:complexType> > <xsd:complexType name="typeMLSTRING64000"> > <xsd:simpleContent> > <xsd:restriction base="dtMLSTRING"> > <xsd:maxLength value="64000"/> > <xsd:minLength value="1"/> > </xsd:restriction> > </xsd:simpleContent> > </xsd:complexType> > > and they all cause an error in scomp. > > > In line 3681 typeMLSTRIN00250 is used the first time: > > <xsd:element name="ARTICLE_STATUS"> > <xsd:complexType> > <xsd:complexContent> > <xsd:extension base="typeMLSTRING00250"> > <xsd:attribute name="type" > use="required"> > <xsd:simpleType> > <xsd:restriction > base="dtSTRING"> > <xsd:minLength > value="1"/> > <xsd:maxLength > value="20"/> > <xsd:enumeration > value="bargain"/> > <xsd:enumeration > value="core_product"/> > <xsd:enumeration > value="new"/> > <xsd:enumeration > value="new_product"/> > <xsd:enumeration > value="old_product"/> > <xsd:enumeration > value="refurbished"/> > <xsd:enumeration > value="used"/> > <xsd:enumeration > value="others"/> > </xsd:restriction> > </xsd:simpleType> > </xsd:attribute> > </xsd:extension> > </xsd:complexContent> > </xsd:complexType> > </xsd:element> > > IMHO all of the following type definitions are at the top level: > > ... > <xsd:simpleType name="dtSTRING"> > <xsd:restriction base="xsd:string"/> > </xsd:simpleType> > ... > <xsd:complexType name="dtMLSTRING"> > <xsd:simpleContent> > <xsd:extension base="dtSTRING"> > <xsd:attribute name="lang" type="dtLANG" > use="optional"/> > </xsd:extension> > </xsd:simpleContent> > </xsd:complexType> > ... > <xsd:complexType name="typeMLSTRING00250"> > <xsd:simpleContent> > <xsd:restriction base="dtMLSTRING"> > <xsd:maxLength value="250"/> > <xsd:minLength value="1"/> > </xsd:restriction> > </xsd:simpleContent> > </xsd:complexType> > ... > > Thanks, > Holger --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

