Re: XHTML : "attribute minimization", terseness of.

On Thu, 2 Mar 2000, Sean Champ wrote:
 
> thanks for the link, Arjun :)

Please read the entire thread.  There's a widespread confusion here
that the HTML specs are helping to perpetuate.

> as far as I know, "boolean" has been around a lot longer than "HTML",

No one is arguing about the term, or its meaning.  The point is
whether SGML *supports* such a concept applied to attributes, and the
answer is an unequivocal no.  "Boolean attribute" is a terminological
invention in the HTML spec with no basis.

>  I don't see why "boolean" shouldn't be a possible attribute-type
>     in the (container | object ) "SGML", as well.

It just isn't, period.  ISO 8879 (the SGML standard) doesn't have it,
and that's that.

> would it be more acceptible, to whomever (people) or whatever
> (software or language-specifications)  [ who | that ] have a
> problem with it, if we use the word "binary" instead of "boolean"?

That may be more "accurate" in one sense, but there's more to it,
unfortunately.

  1.  With a declaration like this

     <!ATTLIST  foo
                bar  (baz)   #IMPLIED
                >
    
      The 'bar' attribute can be asserted or not asserted; if
      asserted, it takes the full form <foo bar="baz"> or the
      minimized form <foo baz>, which are two equivalent ways
      of saying the same one of two things (the other is not
      to have the attribute specification at all in the tag.)

  2.  With a declaration like this

     <!ATTLIST  foo
                bar (baz|blort)  #REQUIRED
                >

      Now the 'bar' attribute is *required* to be asserted, with
      one of two values; the corresponding minimized forms will
      be <foo baz> and <foo blort>.

In both cases, there is a 'bar' attribute.  In both cases, there are
two "values".  Why should one be "binary" and not the other?  

>  instead of redundant declarations like  <dl compact="compact">
>  let's use:  <dl compact="1"> instead.

I think you've missed a very important point: in <dl compact>, the
'compact' part is not the *name*: it's the *value*.  The declaration
could just as well have been

   <!ATTLIST  dl
              flurble  (compact)   #IMPLIED
              >

With which, the full form would have been <dl flurble="compact">, and
the minimized form would have been... yup, <dl compact>.

This, btw, is also why forms such as <h1 center> or <td top right> are
completely legal - though don't expect your wowser to grok.  The rule
involved is that, if the values of an attribute are restricted to an
explicit name token group, then the *name*, the '=', and the quotes
delimiting the value can be omitted, leaving just the *value*.

There are two reasons for the "redundancy":

   1.  The attribute was given a name the same as the only assertable
       value it could take.
   2.  XML's regularizing rules, in relation to SGML, prohibit the
       minimization that would suppress the name.

(1) was apparently in deference to a common (mis)understanding of
things like 'compact' (and 'ismap', etc) as attribute names - after
all, SGML was only retrofitted to a taghappy chaos called HTML - when
this wasn't really necessary.  As for (2), perhaps this message posted
during the Great Triage may be of interest:)

  http://lists.w3.org/Archives/Public/w3c-sgml-wg/1996Sep/0122.html



Arjun

Received on Thursday, 2 March 2000 16:35:54 UTC