W3C home > Mailing lists > Public > public-sml@w3.org > December 2007

[Bug 5063] Inheritance of some SML reference constraints

From: <bugzilla@wiggum.w3.org>
Date: Wed, 05 Dec 2007 07:00:21 +0000
CC:
To: public-sml@w3.org
Message-Id: <E1IzoF3-0007AK-GG@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5063





------- Comment #6 from kumarp@microsoft.com  2007-12-05 07:00 -------
Proposal:
SML target* constraints and SML identity constraints are handled as defined
below:
1.      Constraint can be specified on global and local element declarations.
2.      Constraint is attached to the element declaration schema component.
3.      If a constraint is present on a particle P in a complex type definition
then all of the following must be true:
a.      The constraint must be present on all particles having the same name as
P.
b.      The value of all such constraints must be identical.
4.      Each complex type definition CT has the following additional properties
attached to the complex type definition schema component. The value of these
properties for xs:anyType is empty.
a.      {targetTypeConstraintList}
b.      {targetElementConstraintList}
c.      {targetRequiredConstraintList}
d.      {identityConstraintList}
5.      The value of each property corresponding to constraint C, defined
above, can be either empty or a list of (qname, value) pairs. For each such
pair,
a.      ‘qname’ is the name of a particle P within CT 
b.      ‘value’ is the non-null value of the constraint C on P. 
6.      For a given complex type CT, a property corresponding to constraint C
is assigned value V as follows:
a.      If CT is derived by extension from a simple type definition then for
each element declaration ED, with name qn, contained  in CT, 
i.      If ED does not have constraint C then skip ED.
ii.     If there is already an entry in V for qn, then skip ED.
iii.    If ED has constraint C defined then add an entry (qn, value of C) to
the list V
b.      If CT is derived by extension from a complex type definition BT then
the property values are calculated as defined in 7.a and then for each
constraint property in BT,
i.      For each entry in the property
1.      If there is a corresponding entry in CT, then ensure that the entry in
CT is identical to to that in BT.
2.      Otherwise, copy the entry in BT to the list in CT.
c.      If CT is derived by restriction from base type BT then, the property
values are calculated as defined in 7.a. Now, for each constraint property in
BT,
i.      For each entry in the property
1.      If there is a corresponding entry in CT, then ensure that the entry in
CT is correct restriction of that in BT. In case of identity constraint, the
entries must be identical. Two identity constraints are considered identical if
they have the same qname.
2.      If there is no corresponding entry in CT then copy the entry in BT to
the list in CT.
7.      Validation: If element P has type CT and has child C then, the
appropriate entries from {*ConstrainList} properties are used for validating C.
Received on Wednesday, 5 December 2007 07:00:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:56:08 UTC