> I suggest we would need:
> 
> 1) a CSSGenerator to convert the CSS to XML as SAX (a wrapper around the
> batik SAC parser).
> 
> 2) a CSSCascadeTransformer to "cascade" the styles and apply them to the
> document being styled. This would copy the appropriate style attributes to
> each element of the document.

There was some discussion about doing this on the Mulberry XSLT list a
couple months back. I've since dropped the list -- since I don't have time
to keep up with it these days -- so there may also be more recent
discussion.

In any case, it was suggested that, in general, it might not be possible to
have this always give the expected results in an efficient manner.  The
problem IIRC was basically that the CSS inheritance rules combined with
allowing for multiple CSS meant that the entire XHTML tree would have to be
evaluated against the entire XML style tree for each XHTML element (with
some recursion happening along the way for things like tables in tables).  

I think you'd be mostly ok if you stuck with only allowing a single CSS. You
may also want need restrictions on things like pseudo classes?  Some people
might see that as too restrictive, but otherwise you're trying to bite off
an awfully large problem.

FWIW, several people appear to have implemented things that go the other
way: spit out a single CSS given a styled XHTML file (worse case, you can
always generate IDs and map each element individually).


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to