Re: [CSS21] Lack of version control for content

* Christian Roth wrote:
>>  @version 2.0; 
>>  x { list-style-type: Hiragana; }
>>  @version 2.1;
>>  x { background-color: Menu; }
>
>I don't think this makes any sense; either it's a valid CSS X
>stylesheet, or it isn't. If it is (supposed to be) valid, we only need
>one declaration of version (like in XML, XSLT, ...). 

Well, if you can do

  @version 2.0;
  @import url(data:text/css,@version%202.0...);
  @import url(data:text/css,@version%202.1...);

You should be able to do the above aswell. Indeed, it doesn't make any
sense, but that's what people will do if they don't like the results.

>Wouldn't validation come almost for free using existing tools, if there
>was a defined,  equivalent mapping from current syntax to XML-based
>syntax for easier machine processing? Writing a translator from one
>representation to the other and back (albeit possibly normalized) should
>be possible quite easily using the core grammar of CSS (which is common
>for all existing and future versions). Admittedly, I haven't done it so
>far, and writing the Schema will be a tedious task for sure.

The ISO/IEC work on DSDL (RELAX NG, NVDL, DTLL, CRDL, Schematron,
SVRL, etc.) is indeed approaching a point where this could make sense,
but this certainly does not come for free. You would have to make such
a mapping first which is not trivial, you need an actively maintained
parser that generates something that can be mapped into this format,
you would have to make the schemas, and find clever ways to translate
the XML-based observations back into CSS terminology ('element "foo"
not allowed here' would not quite fit a Validator).

This goes along with ensuring that you have e.g. line/column or
similar location information so the error can be highlighted in the
Validation result, and you would of course need tools that support the
XML-based schema formats (again, actively maintained) and they would
need to interoperate with your infrastructure. Oh, and someone would
have to do it of course.

>The only fear I have is that it will not change much for the situation:
>Noone will stop you from modifying the Schema to your liking; so you
>just reference your proprietary one  in your CSS, and we have the same
>interoperability problems we have now when throwing this "valid" CSS at
>some implementation.

We don't have a problem with people using proprietary features. At
least about http://www.w3.org/StyleSheets/Mail/message I see no-one
complaining. It's not clear how valuable strict conformance to some
W3C-sanctioned profile really is, or more to the point, if people
would like to use some non-standard feature and pass the Validator,
they will just find ways to work around the Validator. We can see
this with people trying to write custom DTDs, scripts, sniffing code,
and so on to bypass the W3C Markup Validator. 

>Having standardized Schemas to be referenced, however, is nothing else
>than having just a specific version declaration in the CSS (PUBLIC id in
>DTD speak).

That depends on the schemas and the version declaration. It does not
matter much either, it would not be difficult to let the Validator
tell whether a style sheet conforms to /any/ sanctioned schema. And
if it does not, that's perhaps worth a note, but again, these tools
are there to help authors write better code, not to inflict specific
standards upon authors who made an educated choice to not comply.

>One use case for versioning I have come up with is for the author to
>declare which version/level of CSS he intends to write in his
>stylesheet. When validating, he gets a warning when he has failed to so
>so, or when throwing it at a UA, that one can issue a warning that this
>version/level is not supported. Sure enough, this is not interesting to
>end users, but only for authors, and probably not a vital feature, really...

Well, `@version 3.0` is really a meaningless statement at the moment,
so would `@version 4.0` be until all CSS 4.0 Recommendations are out.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Friday, 26 August 2005 06:43:04 UTC