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

Re: a small doubt

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 12 Dec 2001 12:00:52 +0000
Message-ID: <1352564293.20011212120052@jenitennison.com>
To: Rahul Srivastava <Rahul.Srivastava@Sun.COM>
CC: xmlschema-dev@w3.org
Hi Rahul,

> Is the following valid...
> <xsd:attribute name="attr"/>
> <xsd:attributeGroup name="attrGrp">
>    <xsd:attribute name="attr"/>
>    <xsd:attribute ref="attr" />
> </xsd:attributeGroup>
> ...when attributeFormDefault is qualified/unqualified.

You cannot have two attribute uses of the same name and target
namespace within a particular attribute group (or within a particular
complex type).

So assuming that you have a target namespace, I think it's valid when
the attributeFormDefault is unqualified (since the global attr is in
the target namespace while the local attr is in no namespace), but
invalid when the attributeFormDefault is qualified (since then both
attr attributes are in the target namespace).

It's invalid if you don't have a target namespace, no matter what
attributeFormDefault is.



Jeni Tennison
Received on Wednesday, 12 December 2001 07:00:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:56 UTC