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

Re: attribute use="prohibited"

From: Michael Anderson <michael@research.canon.com.au>
Date: Tue, 20 Feb 2001 11:28:01 +1100
Message-ID: <3A91BA11.3B1E0501@research.canon.com.au>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
"Henry S. Thompson" wrote:

> <snip>
>
> I've _just_ fixed this bug in the working draft.  The intention has
> always been (and XSV at least implements) that _unlike_ for content
> models, if you omit an attribute altogether it _does_ get copied when
> deriving by restriction.  So to get rid of an attribute, you need to
> use use="prohibited".

Thanks.

I'm curious, what will be the behaviour for the following definition

<complexType>
  <attribute name="foo" use="prohibited"/>
  <anyAttribute/>
</complexType>

Will this satisfy constraints on schemas in the next working draft?
If so, can I use foo in an instance? Ie does the prohibition just remove the
attribute from my use pairs available, or does it specifically prevent its use
in an instance, even by a wildcard?

On a side note, is it mentioned in any of the rules that the below is ambiguous
and not allowed?
<complexType>
  <attribute name="foo"/>
  <anyAttribute/>
</complexType>
ct-props-correct.3 says I can't have identical attribute use pairs, but nothing
about an attribute use pair being in the namespace of the wildcard.
cvc-complex-type.1.3 says to match an attribute infoItem look in the pairs OR
wildcard.  What if it's in both?

cheers,
mick.
Received on Monday, 19 February 2001 19:28:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC