W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2008

Re: [xmlschema-dev] <none>

From: George Cristian Bina <george@oxygenxml.com>
Date: Fri, 05 Dec 2008 10:10:10 +0200
Message-ID: <4938E1E2.4060702@oxygenxml.com>
To: bharathkr@huawei.com
Cc: xmlschema-dev@w3.org

That is invalid.
You cannot have minOccurs and maxOccurs for xs:all inside a named group. 
If you look in the schema for schemas you can see that group is defined 
to be of type namedGroup that specifies the element all as below, 
prohibiting the use of the minOccurs and maxOccurs attributes:

<xs:element name="all">
source="http://www.w3.org/TR/xmlschema-1/#element-all"> Specifies that
             the child elements can appear in any order. Each child 
element can occur 0 or 1
             <xs:restriction base="xs:all">
                 <xs:group ref="xs:allModel"/>
                 <xs:attribute name="minOccurs" use="prohibited"/>
                 <xs:attribute name="maxOccurs" use="prohibited"/>
                 <xs:anyAttribute namespace="##other" 

Best Regards,
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

bharath wrote:
> Hi..
> For the following schema, altova is giving error but LIBXML is not 
> giving any error. Please reply me whether the following is a valid 
> schema or invalid schema.
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>        <xsd:group name="group">
>               <xsd:all minOccurs="0" maxOccurs="0">
>                      <xsd:element name="e1"/>
>               </xsd:all>
>        </xsd:group>
> </xsd:schema>
> Thanks and Regards,
> Bharath.
> ********************************************************************************************************
>  This e-mail and attachments contain confidential information from 
> HUAWEI, which is intended only for the person or entity whose address is 
> listed above. Any use of the information contained herein in any way 
> (including, but not limited to, total or partial disclosure, 
> reproduction, or dissemination) by persons other than the intended 
> recipient's) is prohibited. If you receive this e-mail in error, please 
> notify the sender by phone or email immediately and delete it!
Received on Friday, 5 December 2008 08:10:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:15 UTC