Hello Ricky, ----- Original Message ----- > 1. if a ShorthandedManager is invoked - how is it > possible to get a reference (from within setValues) to > the current element/node? > setValues is called from 5 places within CSSEngine, > most or all of them are inner *handler classes where I > also cannot find the element. >
Since setValues() has an instance of CSSEngine, you should be able to use that instance to call the getDocument() accessor (line 545 of [1], referencing the Document member variable at line 178.) Once you have the document object, you can probably then get to the element via document.getDocumentElement() (Look at the disposeStyleMaps argument at line 496 of [1] for an example.) [1] http://cvs.apache.org/viewcvs.cgi/xml-batik/sources/org/apache/batik/css/engine/CSSEngine.java?annotate=1.37 > 2. the following definition (for html) > { border-color: red; > border-left: dotted; > color: blue } > > must result in a red border with a blue left side. > Due to 1. I cannot check, but I assume that during > evaluation of the shorthanded border-left the "color" > property has not been computed yet. So my solution > would be to evaluate an element twice - how can this > be done? > This is a bit outside my scope of knowledge--CSS Border conflict resolution [2] is quite complex. However, on the Apache FOP team, we do property processing that may be vaguely similar to what you need to do ([3], lines 355-431). [Note: FOP has *not* yet implemented the border conflict resolution scheme.] Basically, there is a chance you may not need a "second pass" for evaluation, if you can come up with a shorthand data structure divided out into its components that is initialized when either (a) the shorthand or (b) one of its components comes up first in the processing. You would just initialize this data structure differently depending on which property first appears. When the other property occurs, then you would update the same data structure. I don't know if this will work, however, and this is just a shot in the dark to your question--I wouldn't be surprised if it had little relevance to your needs. HTH, Glen [2] http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution [3] http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/fo/PropertyList.java?annotate=1.31 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]