Glen Mazza wrote:
Victor, not to rush you, but how agreeable are you in general on switching to integer enumerations for FOP properties? (Given Alt-Design, Peter obviously approves.) I checked Alt-Design's PropNames.java[1] and liked what I saw. It doesn't necessarily have to be that particular design, just the idea of integer constants in general.
There are some ugly considerations. I think at the FO level properties should be prepared into redy-to-use bundles. At some point something has to deal with the oddities called "compound properties".
They're shorthands, with some slightly different inheritance characteristics. I think Arved may have come to the same conclusion.
It would be really nice to have a getLeaderLength() which returns a MinOptMax. this means the getLeaderLength() has: - resolve percentages and functions - deal with the leader-length shorthand setting before this - deal with inheritance (n/a here, fortunately)
Or getLeaderLengthMin(), getLeaderLengthOpt(), getLeaderLengthMax(), with all values resolved.
One of the complications in the maintenance code is that the code in the FO layout routines had to deal with resolving percentages. OTOH, the generator is mainly so ugly because Keiron et al. tried hard to press the shorthand handling into a common scheme. There should be better solutions for either problem.
While I haven't done the corresponding properties for alt.design yet, shorthand and compound properties are handled, if not prettily, at least coherently. Percentages will. I think, be resolved by tightly integrating the processing of FO nodes and areas within PageSequence, so that these values are resolved as early as possible. For example, the relevant reference-area will be made available from the area construction logic to the FO tree builder for resolution of the properties at the time of parsing. In most cases, the area will be dimensioned at this time, but where not, the linkage between FO node and area will be established.
+1If we are at it, I'd vote for dumping generating the property classes and check the java files into CVS.
Peter -- Peter B. West <http://www.powerup.com.au/~pbwest/resume.html>