Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » ComplexType error help
ComplexType error help [message #43799] Thu, 06 May 2004 14:15 Go to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Ed,
I have the following ComplexType :
<xs:complexType abstract="false" mixed="false" name="Array">
<xs:annotation/>
<xs:group maxOccurs="1" minOccurs="0" ref="Q1:Array"/>
<xs:attributeGroup ref="Q1:arrayAttributes"/>
<xs:attributeGroup ref="Q1:commonAttributes"/>
</xs:complexType>

.... which is the base type for this ComplexType in another schema:
<xs:complexType abstract="false" mixed="false" name="TaxInfoArray">
<xs:complexContent>
<xs:restriction base="Z1:Array">
<xs:sequence maxOccurs="1" minOccurs="1">
<xs:element maxOccurs="unbounded" minOccurs="0"
name="TaxInfo" type="Q1:TaxInfo"/>
</xs:sequence>
<xs:attributeGroup ref="Z1:arrayAttributes"/>
<xs:attributeGroup ref="Z1:commonAttributes"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>

I'm getting the following validation error for the second type : XSD: The
restricted content type must accept a subset of the content accepted by the
base type.

What is causing this error?

thanks,

lp
Re: ComplexType error help [message #43829 is a reply to message #43799] Thu, 06 May 2004 15:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

<xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="TaxInfo" type="Q1:TaxInfo"/>
> </xs:sequence>
is not a subset of
> <xs:group maxOccurs="1" minOccurs="0" ref="Q1:Array"/>
but without group knowing what "Q1:Array" is, it is hard to say more.

norwood sisson

Lance Phillips wrote:
> Ed,
> I have the following ComplexType :
> <xs:complexType abstract="false" mixed="false" name="Array">
> <xs:annotation/>
> <xs:group maxOccurs="1" minOccurs="0" ref="Q1:Array"/>
> <xs:attributeGroup ref="Q1:arrayAttributes"/>
> <xs:attributeGroup ref="Q1:commonAttributes"/>
> </xs:complexType>
>
> ... which is the base type for this ComplexType in another schema:
> <xs:complexType abstract="false" mixed="false" name="TaxInfoArray">
> <xs:complexContent>
> <xs:restriction base="Z1:Array">
> <xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="TaxInfo" type="Q1:TaxInfo"/>
> </xs:sequence>
> <xs:attributeGroup ref="Z1:arrayAttributes"/>
> <xs:attributeGroup ref="Z1:commonAttributes"/>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
>
> I'm getting the following validation error for the second type : XSD: The
> restricted content type must accept a subset of the content accepted by the
> base type.
>
> What is causing this error?
>
> thanks,
>
> lp
Re: ComplexType error help [message #43859 is a reply to message #43799] Thu, 06 May 2004 16:01 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

I'd have to see the definition of the "Array" group to provide a detailed
answer. XSD uses a DFA subsetting algorithm to determine this diagnostic; the
base type must accept anything that the restricted type allows...


Lance Phillips wrote:

> Ed,
> I have the following ComplexType :
> <xs:complexType abstract="false" mixed="false" name="Array">
> <xs:annotation/>
> <xs:group maxOccurs="1" minOccurs="0" ref="Q1:Array"/>
> <xs:attributeGroup ref="Q1:arrayAttributes"/>
> <xs:attributeGroup ref="Q1:commonAttributes"/>
> </xs:complexType>
>
> ... which is the base type for this ComplexType in another schema:
> <xs:complexType abstract="false" mixed="false" name="TaxInfoArray">
> <xs:complexContent>
> <xs:restriction base="Z1:Array">
> <xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="TaxInfo" type="Q1:TaxInfo"/>
> </xs:sequence>
> <xs:attributeGroup ref="Z1:arrayAttributes"/>
> <xs:attributeGroup ref="Z1:commonAttributes"/>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
>
> I'm getting the following validation error for the second type : XSD: The
> restricted content type must accept a subset of the content accepted by the
> base type.
>
> What is causing this error?
>
> thanks,
>
> lp
Re: ComplexType error help [message #586793 is a reply to message #43799] Thu, 06 May 2004 15:40 Go to previous message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
<xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="TaxInfo" type="Q1:TaxInfo"/>
> </xs:sequence>
is not a subset of
> <xs:group maxOccurs="1" minOccurs="0" ref="Q1:Array"/>
but without group knowing what "Q1:Array" is, it is hard to say more.

norwood sisson

Lance Phillips wrote:
> Ed,
> I have the following ComplexType :
> <xs:complexType abstract="false" mixed="false" name="Array">
> <xs:annotation/>
> <xs:group maxOccurs="1" minOccurs="0" ref="Q1:Array"/>
> <xs:attributeGroup ref="Q1:arrayAttributes"/>
> <xs:attributeGroup ref="Q1:commonAttributes"/>
> </xs:complexType>
>
> ... which is the base type for this ComplexType in another schema:
> <xs:complexType abstract="false" mixed="false" name="TaxInfoArray">
> <xs:complexContent>
> <xs:restriction base="Z1:Array">
> <xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="TaxInfo" type="Q1:TaxInfo"/>
> </xs:sequence>
> <xs:attributeGroup ref="Z1:arrayAttributes"/>
> <xs:attributeGroup ref="Z1:commonAttributes"/>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
>
> I'm getting the following validation error for the second type : XSD: The
> restricted content type must accept a subset of the content accepted by the
> base type.
>
> What is causing this error?
>
> thanks,
>
> lp
Re: ComplexType error help [message #586809 is a reply to message #43799] Thu, 06 May 2004 16:01 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31640
Registered: July 2009
Senior Member
Lance,

I'd have to see the definition of the "Array" group to provide a detailed
answer. XSD uses a DFA subsetting algorithm to determine this diagnostic; the
base type must accept anything that the restricted type allows...


Lance Phillips wrote:

> Ed,
> I have the following ComplexType :
> <xs:complexType abstract="false" mixed="false" name="Array">
> <xs:annotation/>
> <xs:group maxOccurs="1" minOccurs="0" ref="Q1:Array"/>
> <xs:attributeGroup ref="Q1:arrayAttributes"/>
> <xs:attributeGroup ref="Q1:commonAttributes"/>
> </xs:complexType>
>
> ... which is the base type for this ComplexType in another schema:
> <xs:complexType abstract="false" mixed="false" name="TaxInfoArray">
> <xs:complexContent>
> <xs:restriction base="Z1:Array">
> <xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="TaxInfo" type="Q1:TaxInfo"/>
> </xs:sequence>
> <xs:attributeGroup ref="Z1:arrayAttributes"/>
> <xs:attributeGroup ref="Z1:commonAttributes"/>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
>
> I'm getting the following validation error for the second type : XSD: The
> restricted content type must accept a subset of the content accepted by the
> base type.
>
> What is causing this error?
>
> thanks,
>
> lp


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:ComplexType error help
Next Topic:XMI 2.0 spec. questions
Goto Forum:
  


Current Time: Sat Dec 05 05:59:05 GMT 2020

Powered by FUDForum. Page generated in 0.02615 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top