Attribute Default Value Syntactically Correct VC proposal

Paul Grosso scripsit:

> PE132 Validity of default attribute values (again)
> --------------------------------------------------
> This comes down to the wording in section 3.3.2 where we say
> "only the syntactic constraints of the type are required here"
> but then we argued about what "syntactic" means.
> 
> CONSENSUS:  It is a violation of the Attribute Default Legal VC 
> for the default value not to be one of those specified in the
> enumerated list for enumerated type attributes.
> 
> ACTION to John:  Propose new language for "Validity constraint: 
> Attribute Default Legal" to solve the ambiguity here.

Here it is:

Validity constraint: Attribute Default Value Syntactically Correct

The declared default value MUST meet the syntactic constraints of the
declared attribute type.  That is, the default value of an attribute:

* of type IDREF or ENTITY must match the Name production

* of type IDREFS or ENTITIES must match the Names production

* of type NMTOKEN must match the Nmtoken production

* of type NMTOKENS must match the Nmtokens production

* of an enumerated type (either a NOTATION type or an enumeration)
  must match one of the enumerated values

Note that only the syntactic constraints of the type are required here.
Other constraints (e.g. that the value be the name of a declared unparsed
entity, for an attribute of type ENTITY) will be reported by a validating
parser only if an element without a specification for this attribute
actually occurs.

--
John Cowan  www.ccil.org/~cowan  www.reutershealth.com  jcowan@reutershealth.com
We want more school houses and less jails; more books and less arsenals;
more learning and less vice; more constant work and less crime; more
leisure and less greed; more justice and less revenge; in fact, more of
the opportunities to cultivate our better natures.  --Samuel Gompers

Received on Monday, 1 November 2004 20:53:48 UTC