Re: Hash

On Mon, 24 Jan 2000 03:38:35 -0800 (PST),
=?iso-8859-1?q?Matthew=20Brealey?= (thelawnet@yahoo.com) wrote:
> 
> There is rather a gulf between what CSS says about identifiers and what
> HTML says:

That isn't necessarily a problem.  If an identifier that is valid in
HTML cannot be represented in CSS, then the problematic characters can
be escaped.  If an identifier valid in CSS cannot occur in HTML, then
it can't occur in an HTML document.  It might be possible in some
application of XML, so it shouldn't be excluded from CSS.

> Correct would be:
> 
> HASH = #{name}
> name = {namestart}{namechar}+
> namestart = [a-zA-Z]|{escape}
> namechar = [a-z0-9-]|{escape}

That wouldn't work, because it wouldn't match the HASH in 'color:
#00ff00;'.  If there were separate tokens for id selectors and colors,
how would they be distinguished for a color that could match both
(e.g., 'color: #ffc')?

> Having proposed these changes, I also have a question - should invalid
> (HTML) IDs result in the ruleset being ignored - can invalid IDs be
> parsed?

HTML does not specify error-handling behavior.

-David

L. David Baron    Sophomore, Harvard (Physics)    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.     <URL: http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                      <URL: http://www.webstandards.org/css/ >

Received on Monday, 24 January 2000 09:14:56 UTC