W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: Pretty Printer for SAC Parser

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Mon, 02 Jul 2012 17:10:34 +0200
Message-ID: <4FF1B9EA.5040308@kozea.fr>
To: www-style@w3.org
Le 01/07/2012 22:57, Dominic Chambers a ťcrit :
> I wonder if anyone can help. I need a streaming CSS parser for Java that
> is capable of performing an identity transform on any valid CSS document
> -- a canonical identity transform is fine.


What are you trying to do?

I was not satisfied with SAC so I made tinycss[1]. Itís not Java, but it 
should run on Jython (though I havenít tried). Itís not streaming, but 
it shouldnít be too hard to keep the tokenizer, rip the parser apart, 
and keep the parts youíre interested in.

[1] http://packages.python.org/tinycss/

But again, it all depends on what you really want to do and under what 

tinycss is only missing small parts to be usable for eg. a minifier. I 
will add these eventually but havenít bothered yet because nobody asked 
for it.

Simon Sapin
Received on Monday, 2 July 2012 15:11:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:18 UTC