| ComplexType error help [message #43799] | 
Thu, 06 May 2004 10:15   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 12:01   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 11:40   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
<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 12:01   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.42141 seconds