Re: attribute use="prohibited"

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?

Yes.

> If so, can I use foo in an instance?

Yes.

> 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
constraint.

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.

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