Re: Re: draft-ietf-html-style-00.txt & class as a general selector

lilley ([email protected])
Fri, 8 Dec 1995 12:56:12 +0000 (GMT)


Chris Wilson says:

> > Chris Lilley wrote:
> >So in this example, [ is exactly equivalent to my use of @. It means
> >that an attribute value is coming.
> >...
> >The ] does not make it easier to parse. The end of the attribute
> >value and the start of the declaration are clearly delimited by
> >the {

> I would say [...] _encapsulates_ an attribute
> specification. The end of the attribute value might otherwise need to be
> terminated by a ) or a , (context sensitivity or grouping, respectively).

Context sensitivity _requires_ (using current syntax) ( and ) anyway.

(LI) (LI) ) { stuff}
(@snap=crackle) (foo.hello there) bar @id=three blind mice { stuff }

Grouping _requires_ ,

H1, H2 { stuff }
foo.hello there, bar @id=three blind mice { stuff }

So it is not a case of "might otherwise require". There is absolutely no
ambiguity and no need to terminate anything with a superfluous extra token.

I suspect the only reason you think it is needed is the choice of [ as a
token to announce that an attribute value is coming. We are used to seeing [
matched up with ]

> >> Ah, but the class attribute specification is obviously not meant to
> scale.
> >
> >Why not?
>
> I didn't mean it *shouldn't* be intended to scale, just that the
> specification was obviously a one-shot deal, meant for specifying class and
> nothing else.

Yes. A syntactic wrinkle. By examining the parsing requirements in terms
of a sequence of tokens needed to avoid ambiguity and provide a well
defined syntax, I was able to show exactly what tokens were replaced by
the short form for class

Tell me, if I have foo.bar, should that be followed by a trailing ] or not. Why?

> >To make them more consistent? Fine. Although, as I say, the trailing
> >square bracket is not doing anything.
>
> I'd still vote for it, the same way I wish <LI> were forced to be a
> container.

LI *is a container. What is your point here?

-- 
Chris Lilley, Technical Author and JISC representative to W3C 
+-------------------------------------------------------------------+
|  Manchester and North Training & Education Centre   ( MAN T&EC )  |
+-------------------------------------------------------------------+
| Computer Graphics Unit,             Email: [email protected] |
| Manchester Computing Centre,        Voice: +44 161 275 6045       |
| Oxford Road, Manchester, UK.          Fax: +44 161 275 6040       |
| M13 9PL                            BioMOO: ChrisL                 |
| Timezone: UTC        URI: http://info.mcc.ac.uk/CGU/staff/lilley/ | 
+-------------------------------------------------------------------+