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: 19 Feb 2001 12:51:19 +0000
To: Michael Anderson <michael@research.canon.com.au>
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <f5bg0hakf94.fsf@cogsci.ed.ac.uk>
Michael Anderson <michael@research.canon.com.au> writes:

> Hi all,
> Can somebody help me understanding the function of use="prohibited"
> please.  I can't find any validity or constraint on schema rules to help
> me out.
> My current understanding is that the function use="prohibited" would
> only be useful when restricting a complex type's attribute.  I _assume_
> the idea is that when restricting an attribute whose boolean part is
> false, one can repeat the attribute and replace the use="optional" with
> use="prohibited".  But I can not find ( in derivation-ok-restriction )
> any test that says this is a valid restriction.  Furthermore, this
> functionality seems to have the same effect as if I just do not repeat
> the original attribute, which is allowed under
> derivation-ok-restriction.1.3.

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

> So just omitting the attribute in the
> restricted ct has the same effect as repeating it with
> use="prohibited".

I agree that's what the spec. appears to say, but it's an error of
omission, see above.

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 Monday, 19 February 2001 07:51:22 UTC

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