Hello, all! I use Batik CSS engine to visualize XML documents. It can be easily separated from other Batik packages. But there is a problem with it. The CSS engine requires that DOM stylable elements implement the CSSStylableElement interface.
In some cases it can't be realized, as DOM implementation can't be modified. In my situation I "hacked" the batik implementation to workaround the problem. But it is not a clear way. It will be very helpful to introduce a special abstraction layer that allows use the engine with any DOM implementation. Something like Eclipse's adapters technique can be used. -----Original Message----- From: Thomas DeWeese [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 6:25 AM To: Batik Users Subject: Re: Separate CSS Engine? Hi all, Like Cameron I think that this is essentially already done. The list of constants in CSSConstants is just for convenience, Except for a small number those constants aren't used by the CSSEngine. You can easily configure your own subclass of CSSEngine to support any set of properties you want. I don't think the small space savings afforded by separating the constants is really all that useful but if someone wants to produce a patch they could. Since you say you have already applied the CSS engine to another XML grammar I suspect that I may be missing something important in your request. Cameron McCormack wrote: > Jamie Browning: > >>>However, as an XML utility, the CSS engine could stand alone. >>>Applying CSS to an XML document is a general task, not limited to >>>SVG. A standalone CSS engine might be useful for other developers >>>working with XML and CSS, using other XML dialects. >>>To achieve this, the properties supported by the engine would need to >>>be decoupled, perhaps using some pluggable mechanism. >> >>I think this is an excellent idea. > > > And also not very difficult, since the CSS engine really isn't very > coupled to the rest of Batik. See how the SVGCSSEngine class extends > the abstract CSSEngine to add the managers for all of the types that SVG > supports. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]