[Bug 5861] Elements with complex types should be allowed to have assertions

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





--- Comment #2 from C. M. Sperberg-McQueen <cmsmcq@w3.org>  2008-09-09 01:29:47 ---
One further note on the design distinction between element
declarations and type definitions, speaking here for myself and not
for the Working Group.

The design distinction is apparently not always obvious to all
observers, the XSD spec probably does an imperfect job of explaining
it or making it clear, and there are certainly some gray areas. But
the basic idea is quite simple.  In our initial design phase the WG
gave the name "the tag/type distinction" to the principle that XSD
distinguishes between two types of information, and correspondingly
two types of schema component.

Context-independent properties which distinguish legal elements from
illegal elements are defined by type definitions.  The name to be
found in the element (its generic identifier, as SGML users say), the
binding of a particular element to a type, and context-relative rules
like identity constraints and nillability are defined in element
declarations.

In SGML and XML DTDs, by contrast, all constraints are captured on the
element declaration and the corresponding attribute list declaration;
there is no notion of a common set of constraints to which several
distinct element declarations may bind their instances.  (DTD authors
commonly capture such commonalities by using parameter
entities. Parameter entities are too low-level to capture such
information reliably and clearly, but the widespread use of parameter
entities to capture common constraints does suggest that vocabulary
designers have often distinguished, however informally, between tag
and type.  XSD tries to make the distinction more regular and
tractable.

Some observers object that if constraints on elements are to be given
in type definitions, not in element declarations, then nillability and
identity constraints should be part of type definitions, not part of
element declarations.  XSD follows SQL in treating both the occurrence
of nil values and referential integrity constraints from the type
system.  (In SQL, both the NOT NULL declaration and the identity of
primary, alternate, and foreign keys are associated not with types but
with columns and sets of columns.)


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 9 September 2008 01:30:25 UTC