- From: Bob Schloss <rschloss@us.ibm.com>
- Date: Wed, 21 Feb 2001 08:57:54 -0500
- To: xMLSchema-dev@w3.org
Michael Anderson asks:
> what will be the behaviour for the following definition:
> <complexType>
> <attribute name="foo" use="prohibited"/>
> <anyAttribute/>
> </complexType>
I think one can only use <attribute ... use="prohibited"/> in a
restriction,
and <anyAttribute> in the base definition of the complexType or in an
extension,
if you do not specify namespace.
Therefore, if the <anyAttribute> occurs later in the type deriviation
chain,
even "foo" will be legal. If the <attribute use="prohibited"> occurs later
in the
type derivation chain, foo will not be legal. I do not think you can
specify
both the <anyAttribute> without namespace and the <attribute .. use
="prohibited"> at the same
level of the type derivation hierarchy.
However, the question still remains, what if this is a restriction, the
base complexType had anyAttribute with no namespace, and this type is
<complexType name="derivedType">
<complexContent>
<restriction base="baseType">
...
</restriction>
<attribute name="foo" use="prohibited"/>
<anyAttribute namespace="##targetNamespace"/>
</complexContent>
</complexType>
Bob Schloss
Received on Wednesday, 21 February 2001 08:58:54 UTC