Perry,
I don't know about the particular paper you recall; but there is a point of
view that a schema, whose purpose is to express structural constraints
against which a document may be checked, is different from the
specification of a transform, whose purpose is to operate on a document and
deliver some kind of result therefrom.
The providing of default values for attributes (according to this POV) is
just a particular (privileged) kind of transform. It can be argued that
this should be kept separable from validation as such, and supported
through a different mechanism.
The counter-argument is that the function of a DTD is not, and never has
been, limited merely to providing validation against content models. And
indeed, in SGML, where you have things like tag minimization to think
about, DTDs do much more than simply express modeling constraints. (And
think about entity declarations.) So as so often, the debate poses What
Should Be -- irrespective of what our tools actually do ;-) -- against "in
the real world this is the way we've always done it, and it works well
enough". By specifying that documents be well-formed (parseable but no
schema), XML has opened up this issue further.
(An even more radical position is that validation itself is a kind of
transform, yielding a Boolean "go/no-go" result. I've written about this,
though not to take a position on how to implement attribute defaulting. As
for that, I'd say It Depends. An even murkier in-between case is the
specification of attribute types or of data types in general.)
I've been told that the SGML keyword "#IMPLIED" is meant to say not "this
attribute value is optional", but that "this attribute value is implied --
the processor knows what it is if you don't say". I.e., the stylesheet (or
other process) provides the default.
Cheers,
Wendell
At 03:55 PM 2/26/2003, you wrote:
>I have a vague recollection of an article/conference paper which
>argued that supplying default values for attributes, i.e.,
><ATTLIST foo bar (a|b) "a">, is an undesirable practice.
___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_
"Thus I make my own use of the telegraph, without consulting
the directors, like the sparrows, which I perceive use it
extensively for a perch." -- Thoreau
|