Hi,

   the derivation by restriction has some constraints, for some
reference, please see the following table:
http://www.w3.org/TR/xmlschema-0/#restrictsTable and
http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-Type-Definiti
on . You'll see that anyType has { minOccurs, maxOccurs } as { 1, 1 }
which can't be restricted.

Cheers

        Radovan

Radovan Chytracek                CERN, IT/DB, LCG (SEAL in POOL)
mailto:[EMAIL PROTECTED] Web: http://cern.ch/chytrace
phone: +41 22 76 74578           fax: +41 22 76 77155
 

> -----Original Message-----
> From: Tony Dodd [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 16, 2004 12:24 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Schema problem
> 
> 
> Dear Gareth
> 
> Error at file C:\anc\Texts/test.xsd, line 8, char 30
>   Message: Invalid value '0' for attribute: 'maxOccurs'. 
> 
> Tony
> 
> >-----Original Message-----
> >From: Gareth Reakes [mailto:[EMAIL PROTECTED]
> >Sent: 16 June 2004 11:05
> >To: [EMAIL PROTECTED]
> >Subject: Re: Schema problem
> >
> >Hi Tony,
> >
> >     could you post the error message?
> >
> >Gareth
> >
> >
> >
> >-- 
> >Gareth Reakes, Managing Director      Parthenon Computing
> >+44-1865-811184                  http://www.parthcomp.com
> >On Wed, 16 Jun 2004, Tony Dodd wrote:
> >
> >> Is the value maxoccurs=0 legal?
> >>
> >> The following simple schema file gives an error (together with a
> >> simple xml file with element root) in Xerces C (2.5.0) but 
> >not in Xerces Java (2.6.2).
> >>
> >> <?xml version="1.0" encoding="UTF-8"?> <xs:schema
> >> xmlns:xs='http://www.w3.org/2001/XMLSchema'>
> >>         <xs:complexType name="Test" mixed="false">
> >>                 <xs:complexContent>
> >>                         <xs:restriction base="xs:anyType">
> >>                                 <xs:sequence>
> >>                                         <xs:any 
> processContents="lax"
> >> minOccurs="0" maxOccurs="0"/>
> >>                                 </xs:sequence>
> >>                         </xs:restriction>
> >>                 </xs:complexContent>
> >>         </xs:complexType>
> >>       <xs:element name="root" type="Test"/> </xs:schema>
> >>
> >> Thanks
> >>
> >> Tony Dodd
> >> Oxford University Research Technology Group
> >>
> >>
> >> 
> ---------------------------------------------------------------------
> >> 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]
> >
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to