# CSS Parser README

[Formerly the Steady State CSS2 Parser]

Welcome to the CSS Parser Project, which is a continuation of the Steady State CSS2 Parser. Steady State Software Ltd. is now defunct, and with the aim of breathing new life into the CSS Parser, it has moved to SourceForge.

As an initial SourceForge release (0.9.4), only a few minor changes are being included - this is to smooth the transition from the 0.9.3 release that has been around for a couple of years now. The intention is to quickly move to a 1.0 release. So all people with modifications - sign on as a developer and get those bug fixes and improvements in!

## What's Included

    primary.css  - Steady State Web style sheet
    changes.html - A record of significant changes between releases
    license.html - LGPL document
    readme.html  - This file
    ss_css2.jar  - JAR containing the CSS2 Parser
    build.xml    - Ant build file

    samples/     - Some demonstration applications
    src/         - Source code for Parser, W3C DOM, and W3C SAC interfaces
    stylesheets/ - Collection of test style sheets

## What's Required

To compile the source, you'll need:

- The Java Compiler Compiler (JavaCC) from java.net

## Documentation

This is still in a non-existent state, but will be fixed for the 1.0 release. In the meantime...

Refer to the Document Object Model Level 2 Style Recommendation for details of the DOM interfaces.

Refer to the SAC: The Simple API for CSS home page for details of the SAC interfaces.

## Getting Started

To test that everything is working, try building the sample applications with "ant samples" and then run the simple CSS browser with "java -cp build browser.StyleBrowser".

### Example of usage

    java.io.Reader r = new java.io.FileReader(pathName);
    com.steadystate.css.parser.CSSOMParser parser = new com.steadystate.css.parser.CSSOMParser();
    java.io.InputSource is = new java.io.InputSource(r);
    org.w3c.dom.css.CSSStyleSheet styleSheet = parser.parseStyleSheet(is);

## Some Current Limitations

- The `media` attribute of interface `StyleSheet` is not implemented
- The `parentRule` attribute of interface `CSSRule` is not implemented
- `ImportRule` doesn't import a style sheet
- Conversion between units of `CSSPrimitiveValue` is not implemented

Copyright (c) 2004 David Schweinsberg