Forwarded message 1
Part 1
5.1 Attribute Declaration Constraints
Constraint on Schemas: Attribute Declaration Properties Correct
...
2 {min occurs} and {max occurs} must be present if and only if {scope} is
not global;
I assume that this is accomplished by the default constraints for an absent
use value of minOccurs = 0 & maxOccurs = 1 when the scope is not local. It
would be better if the spec was clearer on this.
This is an example from the primer that does not explicitly list
minOccurs/maxOccurs but technically defines values for it with an absent
use.
<xsd:complexType name="PurchaseOrderType">
<xsd:element name="shipTo" type="Address"/>
<xsd:element name="billTo" type="Address"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
4 if there is a {value constraint},
4 its string must be schema-valid with respect to the {simple type
definition} as defined in String Valid (§3.13);
its second part (default or fixed) must be present if and only if
its {scope} is not global.
Notation is messed up with the extra four.
Mark
--
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/