You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Peter A. Volchek" <Pe...@ti.com.od.ua> on 2002/05/30 17:16:59 UTC

group-all

Hi,
when validating the attached file I got the following error.

DOMPrint.exe -v=always -n -s -f sample.xml
Error at file "sample.xsd", line 11, column 29
   Message: A group whose content is 'all' must only appear as the content type of a complex type definition.

XMLSpy (for example) validates it w/o errors.

The question is: Whom to trust ?

P.S.
When changing the compositor type of the group to be a sequence, the Xerces parses it ok.





Re: group-all

Posted by Khaled Noaman <kn...@ca.ibm.com>.
Your schema needs to meet "Schema Component Constraint: All Group
Limited" from
http://www.w3.org/TR/xmlschema-1/#coss-modelGroup, which states:

  When a model group has {compositor} all all of the following must be
true:
  1 one of the following must be true:
  1.1 It appears as the model group of a model group definition.
  1.2 It appears in a particle with {min occurs}={max occurs}=1, and
  that particle must be part of a pair which constitutes the {content
  type} of a complex type definition.
  2 The {max occurs} of all the particles in the {particles} of the
  group must be 0 or 1.

Clause 1 is not met. The group in the sequence has an all compositor. It
is not in model group definition and isn't the content type of a complex
type definition, because it's part of a sequence.

Khaled

"Peter A. Volchek" wrote:

> Hi,when validating the attached file I got the following error.
> DOMPrint.exe -v=always -n -s -f sample.xmlError at file "sample.xsd",
> line 11, column 29
>    Message: A group whose content is 'all' must only appear as the
> content type of a complex type definition. XMLSpy (for example)
> validates it w/o errors. The question is: Whom to trust ? P.S.When
> changing the compositor type of the group to be a sequence, the Xerces
> parses it ok.
>
>    ----------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>

RE: group-all

Posted by Radovan Chytracek <Ra...@cern.ch>.
Hi,

  XMLSpy is a very nice schema editor, but I would not trust it completely
as its validation is too liberal. My experience is that in most cases when
Xerces-C validates it is valid with other tools as well. Xerces-C is not
100% yet but at least you can check what's already working. I am not sure
you can guess what's wrong in XML Spy.

Cheers
           Radovan
  -----Original Message-----
  From: Peter A. Volchek [mailto:PeterV@ti.com.od.ua]
  Sent: Thursday, 30 May 2002 17:17
  To: Xerces-Dev
  Subject: group-all


  Hi,
  when validating the attached file I got the following error.

  DOMPrint.exe -v=always -n -s -f sample.xml
  Error at file "sample.xsd", line 11, column 29
     Message: A group whose content is 'all' must only appear as the content
type of a complex type definition.

  XMLSpy (for example) validates it w/o errors.

  The question is: Whom to trust ?

  P.S.
  When changing the compositor type of the group to be a sequence, the
Xerces parses it ok.