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

Re: attribute use="prohibited"

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 21 Feb 2001 15:21:55 +0000
To: Michael Anderson <michael@research.canon.com.au>
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <f5bg0h8cb8s.fsf@cogsci.ed.ac.uk>
Michael Anderson <michael@research.canon.com.au> writes:

> 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?

The former.

> 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?

It's not disallowed.  There can of course be only one attribute of the 
name 'foo' on any given element, that's an XML 1.0 well-formedness

The REC should make clear that the explicit declaration takes
precedence over the wildcard -- it implies that indirectly now, but it 
won't hurt to make it more explicit.

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Wednesday, 21 February 2001 10:21:59 UTC

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