W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2001

clarification/errata: circular attributeGroup, ur-type & include

From: <sandygao@ca.ibm.com>
Date: Mon, 20 Aug 2001 12:40:43 -0400
To: xmlschema-dev@w3.org, www-xml-schema-comments@w3.org
Message-ID: <OF6F061236.26703E13-ON85256AAE.00574974@torolab.ibm.com>
Hi there,

[1] circular attributeGroup

Bullet 3 of 3.6.3 from the structure spec disallows the following "direct
circular attribute group reference":

<attributeGroup name="ag">
  <attributeGropu ref="ag"/>
</attributeGroup>

But not the following "indirect" case:

<attributeGroup name="ag1">
  <attributeGropu ref="ag2"/>
</attributeGroup>
<attributeGroup name="ag2">
  <attributeGropu ref="ag1"/>
</attributeGroup>

Is this an erratum? Or is the second case implied to be invalid? Or is the
second case valid (I don't think so :-))?

[2] ur-type

The following two paragraphs are copied from the structure spec:

"[Definition:]  A distinguished ur-type definition is present in each ·XML
Schema·, serving as the root of the type definition hierarchy for that
schema. The ur-type definition, whose name is anyType, has the unique
characteristic that it can function as a complex or a simple type
definition, according to context. Specifically, ·restrictions· of the
ur-type definition can themselves be either simple or complex type
definitions."

"Each simple type definition, whether built-in (that is, defined in [XML
Schemas: Datatypes]) or user-defined, is a ·restriction· of some particular
simple ·base type definition·. For the built-in primitive types, this is
the simple version of the ·ur-type definition·, whose name is
anySimpleType."

Questions:

1. Is ur-type one type or two types?

From the first paragraph, ur-type seems to be one type, with the name
anyType. But from the second paragraph, anySimpleType is also ur-type. Does
this mean ur-type is a group of types, which includes both anyType and
anySimpleType?

2. Is it "ur-type" or "anyType" that can function as a complex or a simple
type definition? Or both?

If "anyType" can act as a simpleType, then is the following valid?

<attribute name="att" type="anyType"/>

Or do we consider anyType as the "complex version" of the ur-type
definition, so that it can only act as a complex type?

[3] include

Assume schema document A includes schema documents B and C, where B has the
same target namespace as A does, and C has no target namespace. Then from
within a certain document, components from which document(s) can be
referred to? That is, how to fill the following table? (R(A,B)=Y means
components in A can refer to components in B.)
R A B C
A Y Y Y
B ? Y ?
C ? ? Y

From the spec, it seems that B can refer to A (bullet 4 of QName resolution
(Schema Document)). How about the other question marks?

Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
sandygao@ca.ibm.com
Received on Monday, 20 August 2001 12:36:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:51 GMT