Thomas,

Thanks for your help.

As a start, I am going to do something even simpler. 
I create a BridgeContext SVG, parse a simple CSS, and retrieve a property
e.g. font-size (defined both in HTML CSS and SVG CSS). 

I understand BridgeContext is for SVG CSS, but I can still use that to parse
a HTML CSS and retrieve properties defined in SVG CSS (e.g. font-size). Am I
correct?

But my questions are:
1. How can i parse a stylesheet after I create a BridgeContext? I can't find
any parse function for stylesheet?
2. How can I retrieve specified property in the parsed CSS thru
BridgeContext?

Thank you for your help again.
Sam

-----Original Message-----
From: Thomas E Deweese [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 3:38 PM
To: Batik Users
Subject: [RE] RE: Using Batik as a HTML CSS engine


>>>>> "SC" == Sam Cheung <[EMAIL PROTECTED]> writes:

SC> Thomas, Thanks a lot for your feedback.  So what I need to do
SC> implement a HTML css engine based on the abstract CSS engine in
SC> Batik?

SC> 1. come up a ValueManager for HTML CSS.  
SC> 2. come up a ShortHandManager for HTML css.

    Just to be 100% clear it will most likely be a set of
ValueManager's and ShorthandManagers (in the worst case one for each
HTML CSS property, many can probably be mostly borrowed from the SVG
CSS properties already in Batik).

SC> anything else?

    You will likely need to implement batik.css.engine.CSSContext.
Most of the methods here are pretty simple (or can be stolen from
Batik's implementation in batik.bridge.BridgeContext).  However the
two hard one's to implement are 'getBlockWidth' and 'getBlockHeight').

    Remember while Batik has a CSS Parser and CSS Cascade engine it
does not have a CSS Block Layout engine.  So if you want to calculate
the proper size of HTML tables for example you are in for a lot of
work (in fact I'm thinking that the Batik CSS structure isn't
sufficent for this case).  If you just want to know the bg color for
the table then it should be pretty easy.

    Perhaps I/we didn't make this as clear as it should have been at
the start.

---------------------------------------------------------------------
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]

Reply via email to