Victor Mote wrote:
I am trying to clean out some of the high cost (from a memory standpoint)
stuff that is in the FO Tree. Right now, we are storing for each node a
String containing the name of that node (e.g. "fo:root"), which generally
seems like a waste.

I removed this in the maintenance branch and changed the getName() methods to return a constant. There are a few places where the name was overridden by a derived class - easy to change, once found. Somehow I never got around to do this in HEAD.

The String seems to be mainly used in error messages.

Last time I checked there were quite a few places checking if (something.getName().equals("fo:stuff")) { ... In the maintenance branch I replaced most of this with if (something instanceof FOStuff) {... but there are still a few left. I believe in HEAD there are some more tricky statements, possibly involving changing names dynamically. If so, this should be corrected, of course.

Can
anyone think of a situation where that would not be appropriate, e.g. where
there is ambiguity about what XML element created an FO object?

I'd say FO objects can only be created by elements from the FO namespace. The mapping from XML elements to Java objects (classes) should be pretty unambiguous.

J.Pietschmann


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



Reply via email to