Re: Proprietary identifier names

On Fri, 21 Feb 2003, Etan Wexler wrote:
>
> The public use of proprietary identifiers, once coined, is inevitable. And
> public use is likely to be widespread, I would say, given the prevalence of
> such user agents as Microsoft Office and Mozilla's Gecko.

I wish... ;-)


> > The initial hyphen is guaranteed never to clash with any official CSS
> > property, because indeed in the official grammar, an identifier cannot
> > start with a hyphen.
>
> There, the problem has been stated quite simply. Any conformant
> implementation, upon finding a bare initial hyphen-minus where a property
> name should be, must conclude that the entity at hand is not a Cascading
> Style Sheet. Since the error recovery for this situation is unspecified,
> interoperability goes out the window.

This, of course, is one of the many reasons I am so strongly in favour of
making it very explicit that any stream of characters should have a well
defined interpretation.

At a basic level it is very simple: you hit an unexpected character, and
therefore parse the declaration as an unknown stream of tokens, honouring
the nesting of {}, [], and (), and the special rules for '' and ""
strings, and /* */ comments, until you reach the end of the declaration
or the end of the block.


> Sorry, but that still doesn't work for CSS1 user agents

There aren't any, so in the real world that really isn't an important
consideration. Any new UAs wouldn't implement CSS1 anyway, they'd
implement the CSS1 profile of CSS2 or CSS3.


> So, Christian, my advice to you is based both on my uptight observance of
> the published syntaxes and on your stated desire to maintain compatibility
> with existing XML+CSS user agents. If you want to use a bare hyphen-minus,
> put it at the end of the identifier. If you want to use an initial
> hyphen-minus, escape it, as in '\-vnd-construct'.

That works for property and @rule identifiers, but fails to solve the
problem for values (a leading underscore has the same problem).

   counter-increment: -moz-magic;

...will be ignored by compliant UAs, but:

   counter-increment: _moz-magic;

...or

   counter-increment: \-moz-magic;

...will not, and will therefore change the semantics of the stylesheet,
which is precisely what we are trying to avoid.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 22 February 2003 14:52:45 UTC