W3C home > Mailing lists > Public > www-style@w3.org > January 2004

Re: [css-d] CSS Javascript API

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 02 Jan 2004 03:26:35 +0100
To: Ian Hickson <ian@hixie.ch>
Cc: www-style@w3.org
Message-ID: <3fffb65f.168507250@smtp.bjoern.hoehrmann.de>

* Ian Hickson wrote:
>On Thu, 1 Jan 2004, Bjoern Hoehrmann wrote:
>> I need an interface (or interfaces) for tree-style access to cascading
>> style sheets to write general purpose CSS processing tools.
>Could you be more specific? DOM2 CSS does satisfy what you describe,

I gave some examples... Say I want to write a general purpose CSS pretty
printer based on DOM Level 2 CSS. I would need a DOM implementation. I
tried to write one and failed [1].

Even if it would be possible to implement the specification [2] suggests
that the implementation should not provide the UnknownRule interface. My
pretty printer would thus be limited to CSS Level 2.0 style sheets in
contrast to the intention of beeing a general purpose tool.

And, would you use a CSS pretty printer that drops all comments in your
style sheets? I would not.

[1] http://lists.w3.org/Archives/Public/www-style/2001Sep/0093.html
[2] http://lists.w3.org/Archives/Public/www-style/2003Oct/0347.html

>> A CSS DOM Use Cases and Requirements document would probably be helpful.
>Indeed, unfortunately I don't really know what the use cases and
>requirements _are_. That is what I am trying to find out. :-)


  CSS DOM Use Cases and Requirements
  W3C Working Draft ...
  Status of this Document
  Table of Contents
  1. Use Cases

    We have no idea, please send comments to www-style@w3.org.

  A. References


However, to make a start, I need a Selector API that

  * is at least as sophisticated as [3]
  * is forward-compatible in a usable manner
  * includes support for CSS Level 3 Selectors
  * allows to query for the selectors specifity
  * provides access to comments as in e.g. a/**/b {...}
  * allows to query pseudo classes, attribute selectors, and
    pseudo elements for their associated element type selector

[3] http://www.w3.org/Style/CSS/SAC/doc/org/w3c/css/sac/Selector.html
Received on Thursday, 1 January 2004 21:26:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:25 GMT