W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

<annotation> not allowed in <component ref="..."/> ?

From: <Simon.Cox@csiro.au>
Date: Tue, 25 Mar 2003 10:01:52 +0800
Message-ID: <116D27C8E12BD411B3AB00B0D022B0B801D7A976@yate.wa.csiro.au>
To: xmlschema-dev@w3.org
Cc: gml30.rwg@opengis.org, kevin.chong@fractaltechnologies.com

I wonder if anyone can verify my interpretation of a Xerces schema
validation error.  

Our schema has type definitions containing components like:

  <complexType name="DictionaryEntryType">
    <attributeGroup ref="gml:AssociationAttributeGroup">
        <documentation>Some text</documentation>

Xerces complains:

"Error at file C:\dev\schemas\src\gml/base/dictionary.xsd, line 78, char 57
  Message: A <attributeGroup> declaration that has a ref attribute, cannot
have child content."

In http://www.w3.org/TR/xmlschema-1/#cAttribute_Group_Definitions I find the

"The example above illustrates a pattern which recurs in the XML
representation of schemas: The same element, in this case attributeGroup,
serves both to define and to incorporate by reference. In the first case the
name attribute is required, in the second the ref attribute is required, and
the element must be empty."  

This appears to imply that it is not allowed to have an <annotation> child
in a declaration (particle-use?) that uses the ref="..." form, even though
an <annotation> does not contribute to the infoset.  Is this correct?  Or is
Xerces being a little over-zealous??

Simon.Cox@csiro.au  CSIRO Exploration & Mining
26 Dick Perry Avenue, Kensington WA 6151
PO Box 1130, Bentley WA 6102  AUSTRALIA
T: +61 (8) 6436 8639  F: +61 (8) 6436 8555  C: +61 (4) 0330 2672
Received on Monday, 24 March 2003 21:02:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC