RE: Omitting attribute declarations in restrictions

This is from the spec, Complex Type Definition with complex content
(subheading of §3.4.2):

"{attribute uses} A union of sets of attribute uses as follows: 

1 The set of attribute uses corresponding to the <attribute> [children], if
any. 

2 The {attribute uses} of the attribute groups ·resolved· to by the ·actual
value·s of the ref [attribute] of the <attributeGroup> [children], if any. 

3 The {attribute uses} of the type definition ·resolved· to by the ·actual
value· of the base [attribute], unless the <restriction> alternative is
chosen, in which case some members of that type definition's {attribute
uses} may not be included, namely those whose {attribute declaration}'s
{name} and {target namespace} are the same as one of the following:

3.1 The {name} and {target namespace} of the {attribute declaration} of an
attribute use in the set per clause 1 or clause 2 above; 

3.2 what would have been the {name} and {target namespace} of the {attribute
declaration} of an attribute use in the set per clause 1 above but for the
·actual value· of the use [attribute] of the relevant <attribute> among the
[children] of <restriction> being prohibited."

I would hold the opinion that this means you don't _have_ to copy attributes
from the base type, but if you do then what you copy will override what's in
the base type (3.1). Typically you will copy an attribute if you want to
make it prohibited (3.2).

Regards,

Steen

/**
 * Steen Lehmann - <mailto:slehmann@silverstream.com>
 * Senior Software Engineer (R&D), SilverStream Software 
 * <http://www.silverstream.com>
 */ 

> -----Original Message-----
> From: Simon.Cox@csiro.au [mailto:Simon.Cox@csiro.au]
> Sent: Thursday, March 07, 2002 3:31 AM
> To: xmlschema-dev@w3.org
> Subject: Omitting attribute declarations in restrictions
> 
> 
> I recall that it has been stated many times that, 
> in the definition of complex types derived by restriction, 
> although it is necessary to "copy down" the element content model, 
> attributes and their use contraints do not have to be copied 
> down from the
> base type.  
> 
> Can some one please point me to where this is explained in the spec?
> 
> _____
> Simon.Cox@csiro.au  CSIRO Exploration & Mining
> 26 Dick Perry Avenue, Kensington WA 6151
> PO Box 1130, Bentley WA 6102  AUSTRALIA
> T: +61 (8) 6436 8639  F: +61 (8) 6436 8555  C: +61 (4) 0330 2672
> http://www.csiro.au/page.asp?type=resume&id=CoxSimon
> 

Received on Thursday, 7 March 2002 03:05:47 UTC