Re: C.12 types of declared values for attributes?
At 01:23 PM 10/17/96 CDT, Michael Sperberg-McQueen wrote:
>On 23 October 1996, the ERB will vote to decide the following
>question. A straw poll indicates the ERB is leaning to keeping
>NAME(S) and NMTOKEN(S) but losing NUMBER(S) and NUTOKEN(S).
>C.12 Should XML change the set of types available for attributes?
>E.g. by suppressing NAME(S), NUMBER(S), NMTOKEN(S), NUTOKEN(S) and
>adding constraints in the form of regular expressions, ISO dates,
>language-code, external-id, type IDREF, ... (7.9.4, 11.3.3)
/* suppressing strong urge to blast SGML's "typing" of attributes */
If an att spec is going to have the lexical form name="value", and a XML
parser (as opposed to a validator) won't have a DTD, aren't we left with just
<!ATTLIST foo bar CDATA #IMPLIED>?
For a XML validator (which presumably will need a DTD), the issue becomes one
of a meaningful/useful set of "data types".
If regexps and such are within scope, then considerations such as keeping
names and losing numbers is missing the forest for the trees. Just use
regexps and be done with it.
OTOH, if the choice is restricted to which out of the original set to
retain, then losing all of them except CDATA (perhaps renamed to
RCDATA??;-)) is the
logical choice: an inadequate and overlapping set of alternatives is just
needless complexity. Pass detailed validation to the application -- since
it's the app's bailiwick to grok the attribute semantically.
"Features whose purpose is to cause errors should be removed" -- Erik Naggum