You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FObj.java 30KB

Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Merged revisions 669423,669436,669835,670217,670222,670323,670325,670332,670335-670336,670341,670344,670401,670409,670411-670412,670422-670424,670492 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r669423 | jeremias | 2008-06-19 09:25:46 +0100 (Thu, 19 Jun 2008) | 1 line Simplifications and a Checkstyle fix. ........ r669436 | jeremias | 2008-06-19 10:46:12 +0100 (Thu, 19 Jun 2008) | 2 lines Separation of concerns: Split FOEventHandler into FOEventHandler and FOTreeBuilderContext. The latter contains stuff only used at tree-building stage. FOEventHandler is oriented towards output. ........ r669835 | acumiskey | 2008-06-20 10:18:56 +0100 (Fri, 20 Jun 2008) | 1 line Strict/loose validation of <fo:table-footer/> ordering somehow got lost in processing feedback branch merge. ........ r670217 | acumiskey | 2008-06-21 17:10:03 +0100 (Sat, 21 Jun 2008) | 1 line Moved the contents of TableBody into a new abstract base class TablePart, which is now subclassed by TableBody, TableHeader and TableFooter. ........ r670222 | acumiskey | 2008-06-21 17:28:56 +0100 (Sat, 21 Jun 2008) | 1 line Moved the contents of TableBody into a new abstract base class TablePart, which is now subclassed by TableBody, TableHeader and TableFooter. ........ r670323 | adelmelle | 2008-06-22 10:07:47 +0100 (Sun, 22 Jun 2008) | 1 line Addition to r670217 ........ r670325 | adelmelle | 2008-06-22 10:28:56 +0100 (Sun, 22 Jun 2008) | 1 line Minor javadoc correction ........ r670332 | adelmelle | 2008-06-22 11:21:03 +0100 (Sun, 22 Jun 2008) | 1 line Minor tweak: avoid warning when running through Saxon ........ r670335 | adelmelle | 2008-06-22 11:53:51 +0100 (Sun, 22 Jun 2008) | 1 line Avoid StackOverflow on TableColumn.toString() during debugging. ........ r670336 | adelmelle | 2008-06-22 12:01:27 +0100 (Sun, 22 Jun 2008) | 1 line Minor tweak: use XG Commons version of the interface ........ r670341 | adelmelle | 2008-06-22 12:18:03 +0100 (Sun, 22 Jun 2008) | 2 lines Changed FONode.addCharacters() signature to match the characters() event (use 'length' as a parameter instead of 'end') ........ r670344 | adelmelle | 2008-06-22 12:28:06 +0100 (Sun, 22 Jun 2008) | 1 line Changed signature for static handleWhiteSpaceFor(), and used internally to make the code a bit more compact ........ r670401 | adelmelle | 2008-06-22 20:19:17 +0100 (Sun, 22 Jun 2008) | 1 line Correction: characters() expects a 'length' not an 'endIndex' ........ r670409 | adelmelle | 2008-06-22 21:18:27 +0100 (Sun, 22 Jun 2008) | 1 line Very minor tweak: simplify conditional ........ r670411 | adelmelle | 2008-06-22 21:38:28 +0100 (Sun, 22 Jun 2008) | 2 lines Deleted deprecated interface; unused after r670336 ........ r670412 | adelmelle | 2008-06-22 21:57:43 +0100 (Sun, 22 Jun 2008) | 6 lines Partial fix of FOEventHandler call sequence (see also Bugzilla #45237): call startOfNode() after addChildNode() moved initialization for tableFOs to processNode() moved finishing code to a finalizeNode() method (which is now also used by AbstractRetrieveMarker) restored protected status of startOfNode()/endOfNode() in fo.flow.table package ........ r670422 | adelmelle | 2008-06-22 23:10:55 +0100 (Sun, 22 Jun 2008) | 4 lines Switch FOText to use a java.nio.CharBuffer, and implement the CharSequence interface. TextLayoutManager no longer duplicates the char array, operates on the FOText (charAt(i)) Additionally: endOfNode() for FOText and Character deferred until after white-space handling. ........ r670423 | adelmelle | 2008-06-22 23:17:00 +0100 (Sun, 22 Jun 2008) | 1 line Added missing file from r670422 ........ r670424 | adelmelle | 2008-06-22 23:18:53 +0100 (Sun, 22 Jun 2008) | 1 line Another missing file... ........ r670492 | lfurini | 2008-06-23 10:24:14 +0100 (Mon, 23 Jun 2008) | 2 lines Added support for non-zero borders and padding on page regions. Testcase included, now disabled because it is supposed to run with relaxed validation switched on. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@670500 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Merged revisions 669423,669436,669835,670217,670222,670323,670325,670332,670335-670336,670341,670344,670401,670409,670411-670412,670422-670424,670492 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r669423 | jeremias | 2008-06-19 09:25:46 +0100 (Thu, 19 Jun 2008) | 1 line Simplifications and a Checkstyle fix. ........ r669436 | jeremias | 2008-06-19 10:46:12 +0100 (Thu, 19 Jun 2008) | 2 lines Separation of concerns: Split FOEventHandler into FOEventHandler and FOTreeBuilderContext. The latter contains stuff only used at tree-building stage. FOEventHandler is oriented towards output. ........ r669835 | acumiskey | 2008-06-20 10:18:56 +0100 (Fri, 20 Jun 2008) | 1 line Strict/loose validation of <fo:table-footer/> ordering somehow got lost in processing feedback branch merge. ........ r670217 | acumiskey | 2008-06-21 17:10:03 +0100 (Sat, 21 Jun 2008) | 1 line Moved the contents of TableBody into a new abstract base class TablePart, which is now subclassed by TableBody, TableHeader and TableFooter. ........ r670222 | acumiskey | 2008-06-21 17:28:56 +0100 (Sat, 21 Jun 2008) | 1 line Moved the contents of TableBody into a new abstract base class TablePart, which is now subclassed by TableBody, TableHeader and TableFooter. ........ r670323 | adelmelle | 2008-06-22 10:07:47 +0100 (Sun, 22 Jun 2008) | 1 line Addition to r670217 ........ r670325 | adelmelle | 2008-06-22 10:28:56 +0100 (Sun, 22 Jun 2008) | 1 line Minor javadoc correction ........ r670332 | adelmelle | 2008-06-22 11:21:03 +0100 (Sun, 22 Jun 2008) | 1 line Minor tweak: avoid warning when running through Saxon ........ r670335 | adelmelle | 2008-06-22 11:53:51 +0100 (Sun, 22 Jun 2008) | 1 line Avoid StackOverflow on TableColumn.toString() during debugging. ........ r670336 | adelmelle | 2008-06-22 12:01:27 +0100 (Sun, 22 Jun 2008) | 1 line Minor tweak: use XG Commons version of the interface ........ r670341 | adelmelle | 2008-06-22 12:18:03 +0100 (Sun, 22 Jun 2008) | 2 lines Changed FONode.addCharacters() signature to match the characters() event (use 'length' as a parameter instead of 'end') ........ r670344 | adelmelle | 2008-06-22 12:28:06 +0100 (Sun, 22 Jun 2008) | 1 line Changed signature for static handleWhiteSpaceFor(), and used internally to make the code a bit more compact ........ r670401 | adelmelle | 2008-06-22 20:19:17 +0100 (Sun, 22 Jun 2008) | 1 line Correction: characters() expects a 'length' not an 'endIndex' ........ r670409 | adelmelle | 2008-06-22 21:18:27 +0100 (Sun, 22 Jun 2008) | 1 line Very minor tweak: simplify conditional ........ r670411 | adelmelle | 2008-06-22 21:38:28 +0100 (Sun, 22 Jun 2008) | 2 lines Deleted deprecated interface; unused after r670336 ........ r670412 | adelmelle | 2008-06-22 21:57:43 +0100 (Sun, 22 Jun 2008) | 6 lines Partial fix of FOEventHandler call sequence (see also Bugzilla #45237): call startOfNode() after addChildNode() moved initialization for tableFOs to processNode() moved finishing code to a finalizeNode() method (which is now also used by AbstractRetrieveMarker) restored protected status of startOfNode()/endOfNode() in fo.flow.table package ........ r670422 | adelmelle | 2008-06-22 23:10:55 +0100 (Sun, 22 Jun 2008) | 4 lines Switch FOText to use a java.nio.CharBuffer, and implement the CharSequence interface. TextLayoutManager no longer duplicates the char array, operates on the FOText (charAt(i)) Additionally: endOfNode() for FOText and Character deferred until after white-space handling. ........ r670423 | adelmelle | 2008-06-22 23:17:00 +0100 (Sun, 22 Jun 2008) | 1 line Added missing file from r670422 ........ r670424 | adelmelle | 2008-06-22 23:18:53 +0100 (Sun, 22 Jun 2008) | 1 line Another missing file... ........ r670492 | lfurini | 2008-06-23 10:24:14 +0100 (Mon, 23 Jun 2008) | 2 lines Added support for non-zero borders and padding on page regions. Testcase included, now disabled because it is supposed to run with relaxed validation switched on. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@670500 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 647692,647742,647745 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r647692 | jeremias | 2008-04-14 09:25:22 +0100 (Mon, 14 Apr 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-615152" from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback ................ r647742 | jeremias | 2008-04-14 12:53:29 +0100 (Mon, 14 Apr 2008) | 298 lines Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback into Trunk. Changes on branch: ........ r615153 | jeremias | 2008-01-25 10:07:21 +0100 (Fr, 25 Jan 2008) | 1 line Created temporary branch for processing feedback. ........ r615155 | jeremias | 2008-01-25 10:11:59 +0100 (Fr, 25 Jan 2008) | 1 line Initial commit of what I've built already for those who prefer code to minimalistic design docs. ........ r615278 | jeremias | 2008-01-25 18:25:00 +0100 (Fr, 25 Jan 2008) | 1 line EventProducer interfaces now operational. ........ r615773 | jeremias | 2008-01-28 10:06:16 +0100 (Mo, 28 Jan 2008) | 1 line No casting in client code when creating EventProducer instances. ........ r616242 | vhennebert | 2008-01-29 11:34:45 +0100 (Di, 29 Jan 2008) | 3 lines Trick to avoid hard-coding the class name of EventProducer in the source file. Feel free to revert if it's not ok. ........ r616900 | jeremias | 2008-01-30 21:59:31 +0100 (Mi, 30 Jan 2008) | 1 line Generate event model XMLs in to the build directory: build/gensrc and build/test-gensrc (the latter is new and needs to be setup as source folder in your IDE!) ........ r616907 | jeremias | 2008-01-30 22:12:59 +0100 (Mi, 30 Jan 2008) | 1 line Added an XMLResourceBundle that uses an XML file instead of a properties file to load the translations. The XML format is the same as for Cocoon's XMLResourceBundle. ........ r617097 | vhennebert | 2008-01-31 11:53:21 +0100 (Do, 31 Jan 2008) | 2 lines Minor typo + slight improvement of Javadoc ........ r617176 | jeremias | 2008-01-31 19:14:19 +0100 (Do, 31 Jan 2008) | 5 lines Renamed FopEvent to Event as suggested by Simon. EventProducerCollectorTask.java now reads the EventSeverity from a doclet tag. Added generation of EventProducer translations (including simple merging, no validation, yet) EventFormatter introduced (only basic functionality, yet). Added a simple EventListener implementation that uses EventFormatter to convert the events to human-readable, localized messages that are sent to the log via Commons Logging. ........ r617362 | jeremias | 2008-02-01 08:18:07 +0100 (Fr, 01 Feb 2008) | 1 line Some remaining rename operations based on an earlier discussion. ........ r617413 | jeremias | 2008-02-01 10:46:26 +0100 (Fr, 01 Feb 2008) | 2 lines Extracted formatting functionality into utility class AdvancedMessageFormat.java. AdvancedMessageFormat.java now supports conditional sub-groups (delimited by []). ........ r618682 | jeremias | 2008-02-05 17:07:08 +0100 (Di, 05 Feb 2008) | 1 line Add support for special object formatters (where toString() isn't good enough). ATM, it's hard-coded but could later be hooked into dynamic discovery if we have multiple such formatters. The SAX Locator is the only example for now. ........ r618686 | jeremias | 2008-02-05 17:12:56 +0100 (Di, 05 Feb 2008) | 3 lines Hooked most of FONode into the new event mechanism. The FOUserAgent provides a DefaultEventBroadcaster instance. If a producer method declares throwing an exception, the event is automatically marked FATAL and the dynamic proxy throws an exception right after notifying the listeners. The exceptions are created through the EventExceptionManager. It currently contains only one exception factory for ValidationException. If we need more such factories it's better to register them dynamically. Right now, they're hard-coded. ........ r619313 | jeremias | 2008-02-07 10:14:15 +0100 (Do, 07 Feb 2008) | 1 line Make sure no events are now just silently swallowed because after upgrading a user doesn't know about the event system. ........ r619314 | jeremias | 2008-02-07 10:14:46 +0100 (Do, 07 Feb 2008) | 1 line Log what translation file is being written. ........ r619320 | jeremias | 2008-02-07 10:31:00 +0100 (Do, 07 Feb 2008) | 2 lines FObj hooked into the event system. Code reduction using a protected method on FONode to acquire a FOValidationEventProducer. ........ r619359 | jeremias | 2008-02-07 11:59:19 +0100 (Do, 07 Feb 2008) | 2 lines Fop's QName now extends XGCommons' QName to initiate a transition. Hooked PropertyList into the event mechanism. ........ r631252 | jeremias | 2008-02-26 16:24:33 +0100 (Di, 26 Feb 2008) | 1 line Removed superfluous warning. ........ r631268 | jeremias | 2008-02-26 17:08:11 +0100 (Di, 26 Feb 2008) | 1 line Deprecated two methods which are a problem for localization. Also helps finding additional spots to switch over to the event mechanism. ........ r633852 | jeremias | 2008-03-05 15:20:24 +0100 (Mi, 05 Mrz 2008) | 1 line Add severity to formatting parameters. ........ r633855 | jeremias | 2008-03-05 15:21:57 +0100 (Mi, 05 Mrz 2008) | 4 lines Added support for additional field styles: {<fieldname>,if,<true-text>,<false-text>} {<fieldname>,equals,<test-string>,<true-text>,<false-text>} ........ r633856 | jeremias | 2008-03-05 15:24:04 +0100 (Mi, 05 Mrz 2008) | 2 lines Javadocs and TODOs. EventListeners can change the event severity. ........ r633857 | jeremias | 2008-03-05 15:27:08 +0100 (Mi, 05 Mrz 2008) | 4 lines Javadocs. Moved out event listener registration into a CompositeEventListener. Event broadcaster uses the events effective severity, not the initial value (for the case where listeners override the initial value). Set up a special EventBroadCaster in the FOUserAgent that filters events through a class (FOValidationEventListenerProxy) that adjusts the event severity for relaxed validation. ........ r633858 | jeremias | 2008-03-05 15:32:07 +0100 (Mi, 05 Mrz 2008) | 2 lines Instead of always decentrally checking whether strict validation is enabled or not, this is now done in a special event listener. The event producer method caller simply indicates whether it can recover from the error condition and continue. Started switching to event production in table FOs. ........ r634027 | jeremias | 2008-03-05 21:58:35 +0100 (Mi, 05 Mrz 2008) | 7 lines Moved AdvancedMessageFormat into its own package. AdvancedMessageFormat got the following added functionality: - Alternative conditional regions [ bla {field}] -> [ bla {field1}| even more bla {field2}] - Functions: functions get access to the parameters and they can produce an object that is then formatted ({#gatherContextInfo}) - "if" and "equals" format moved to top-level classes and added by dynamic registration. EventFormatter now supports includes in the form {{includeName}} so you can include other entries from the resource bundle for better reuse. Some more events in table code. ........ r634031 | jeremias | 2008-03-05 22:05:22 +0100 (Mi, 05 Mrz 2008) | 1 line SVN Props ........ r634208 | jeremias | 2008-03-06 11:26:52 +0100 (Do, 06 Mrz 2008) | 2 lines Improved context gathering. Moved GatherContextInfoFunction to an inner class of FONode to reduce visibilities. ........ r634209 | jeremias | 2008-03-06 11:28:14 +0100 (Do, 06 Mrz 2008) | 1 line Made FOPException localizable. ........ r634280 | jeremias | 2008-03-06 15:38:30 +0100 (Do, 06 Mrz 2008) | 2 lines ExceptionFactory is now dynamically registered. More table warnings and errors switch to events. ........ r634326 | jeremias | 2008-03-06 17:08:16 +0100 (Do, 06 Mrz 2008) | 1 line Remaining table FOs switched to events. ........ r634328 | jeremias | 2008-03-06 17:09:21 +0100 (Do, 06 Mrz 2008) | 1 line Deprecated FOP's QName. Mixing with Commons' variant only produces problems. ........ r634381 | jeremias | 2008-03-06 20:12:57 +0100 (Do, 06 Mrz 2008) | 2 lines Made the "invalidChild" event fully localizable by adding a "lookup" field for the optional rule to be displayed. And a few switches to the event system. ........ r634692 | jeremias | 2008-03-07 15:31:43 +0100 (Fr, 07 Mrz 2008) | 1 line More FO tree stuff switched to events. ........ r634712 | jeremias | 2008-03-07 16:19:21 +0100 (Fr, 07 Mrz 2008) | 1 line Avoid an NPE that says nothing (ex. could happen if the message template is wrong). ........ r634738 | jeremias | 2008-03-07 17:38:21 +0100 (Fr, 07 Mrz 2008) | 2 lines Non-FO children were not properly run through validation by FOTreeBuilder. Unified the way that non-FO elements are validated. Some FOs were already fixed. I now fixed the rest, so foreign elements can occur everywhere. ........ r637833 | jeremias | 2008-03-17 12:01:41 +0100 (Mo, 17 Mrz 2008) | 1 line Exception while cloning for RetrieveMarker to be handled by user as suggested by Andreas. ........ r637835 | jeremias | 2008-03-17 12:03:31 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a RuntimeException of no other Exception class is specified for an event as a fallback if someone just sets the event severity to FATAL. ........ r637838 | jeremias | 2008-03-17 12:06:10 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637859 | jeremias | 2008-03-17 13:35:26 +0100 (Mo, 17 Mrz 2008) | 1 line Throw a meaningful exception when the property name is wrong. Otherwise, there will be an ArrayIndexOutOfBoundsException. ........ r637938 | jeremias | 2008-03-17 16:19:51 +0100 (Mo, 17 Mrz 2008) | 1 line Switched pagination package to events. ........ r637947 | jeremias | 2008-03-17 16:45:16 +0100 (Mo, 17 Mrz 2008) | 1 line Removed unlocalizable validation helper methods. ........ r637952 | jeremias | 2008-03-17 16:59:02 +0100 (Mo, 17 Mrz 2008) | 1 line Events on FOTreeBuilder. ........ r638299 | jeremias | 2008-03-18 11:09:30 +0100 (Di, 18 Mrz 2008) | 2 lines Added support for java.util.text's ChoiceFormat to AdvancedMessageFormat. Reuse the regexes as constants. ........ r638302 | jeremias | 2008-03-18 11:17:06 +0100 (Di, 18 Mrz 2008) | 1 line Events for inline-level layout managers. ........ r638774 | jeremias | 2008-03-19 11:17:36 +0100 (Mi, 19 Mrz 2008) | 1 line Added DEBUG level. ........ r638777 | jeremias | 2008-03-19 11:23:40 +0100 (Mi, 19 Mrz 2008) | 3 lines Generalized FOValidationEventListenerProxy into FOPEventListenerProxy, the main proxy for FOP's own event manipulation proxy. Done because of support for overflow="hidden" vs. overflow="error-if-overflow". Switched block-level layout managers to events. Some cleanup along the way. ........ r639222 | jeremias | 2008-03-20 10:27:34 +0100 (Do, 20 Mrz 2008) | 2 lines Some initial work for event forwarding from Batik. Missing errors/exceptions converted to events in PageSequenceMaster. ........ r639270 | jeremias | 2008-03-20 13:50:35 +0100 (Do, 20 Mrz 2008) | 1 line Removed DEBUG event severity again. Promoted constrained geometry adjustment event to INFO level as per discussion. ........ r640395 | jeremias | 2008-03-24 13:39:13 +0100 (Mo, 24 Mrz 2008) | 3 lines Moved the creation of the fallback LoggingEventListener to FOUserAgent so event before the startDocument() SAX event arrive in the log. Dynamic discovery of event models. Renderers and extensions can register renderer-specific event models. Switched the most important parts of the renderers to events (maybe not everything is converted). ........ r640397 | jeremias | 2008-03-24 13:43:04 +0100 (Mo, 24 Mrz 2008) | 1 line Remaining fixcrlfs. Xalan likes to mix CRLF and LF on Windows. ........ r640398 | jeremias | 2008-03-24 13:43:54 +0100 (Mo, 24 Mrz 2008) | 1 line Ignore namespace declarations for property handling. ........ r640463 | jeremias | 2008-03-24 17:59:52 +0100 (Mo, 24 Mrz 2008) | 2 lines Event in area package. Exposed getUserAgent() in Renderer interface (was already public in AbstractRenderer). ........ r642972 | jeremias | 2008-03-31 14:18:39 +0200 (Mo, 31 Mrz 2008) | 1 line Code restructured a bit. ........ r642975 | jeremias | 2008-03-31 14:24:07 +0200 (Mo, 31 Mrz 2008) | 2 lines Plugged fonts package into the event subsystem. Note: I did not follow the same pattern as for the rest as the font package is to be considered FOP-external, so I just added a manual adapter for the FontEventListener. This demonstrates how an external library can be integrated with the event system. Missing warning for unknown formatting objects added. Warning is not issued by the ElementMappingRegistry anymore but by FOTreeBuilder which has access to more context information. ........ r642997 | jeremias | 2008-03-31 16:10:08 +0200 (Mo, 31 Mrz 2008) | 1 line Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process. ........ r642998 | jeremias | 2008-03-31 16:13:40 +0200 (Mo, 31 Mrz 2008) | 1 line Removed unused method. Event formatting should not be part of the Event class. Use EventFormatter.format(Event) instead. ........ r643066 | jeremias | 2008-03-31 19:18:54 +0200 (Mo, 31 Mrz 2008) | 1 line First part of the event subsystem documentation (DRAFT). ........ r643784 | jeremias | 2008-04-02 10:05:33 +0200 (Mi, 02 Apr 2008) | 1 line More documentation. ........ r643785 | jeremias | 2008-04-02 10:06:38 +0200 (Mi, 02 Apr 2008) | 1 line Some nits. ........ r643787 | jeremias | 2008-04-02 10:24:41 +0200 (Mi, 02 Apr 2008) | 1 line Completed javadocs ........ r643824 | jeremias | 2008-04-02 12:00:30 +0200 (Mi, 02 Apr 2008) | 1 line Javadocs. ........ r645847 | vhennebert | 2008-04-08 12:54:16 +0200 (Di, 08 Apr 2008) | 2 lines Minor typo fixes ........ r645848 | vhennebert | 2008-04-08 12:58:30 +0200 (Di, 08 Apr 2008) | 2 lines Another small typo fix ........ r647678 | jeremias | 2008-04-14 09:20:26 +0200 (Mo, 14 Apr 2008) | 1 line Renamed *EventProducer.Factory.create() to *EventProducer.Provider.get() to better reflect what the method does (instances may be cached and reused). ........ ................ r647745 | jeremias | 2008-04-14 13:01:06 +0100 (Mon, 14 Apr 2008) | 1 line svnmerge didn't work for me in this case. Remove svn merge info. ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@647787 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 652821-652822,652835,653036,653045,653048,653106,653144,653202,653204,653311,653564 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r652821 | adelmelle | 2008-05-02 17:58:26 +0100 (Fri, 02 May 2008) | 6 lines Cleanup/Correction after r657673 -> added missing file FObj.java -> pushed retrieve-class-name upwards to AbstractRetrieveMarker as a common property -> corrected use of property-name "retrieve-class-name" in source and testcase -> improved consistency in code-style ........ r652822 | adelmelle | 2008-05-02 18:00:33 +0100 (Fri, 02 May 2008) | 1 line Expand imports... ........ r652835 | adelmelle | 2008-05-02 18:28:25 +0100 (Fri, 02 May 2008) | 3 lines Bugzilla 42703: Fixed a regression introduced by the fix for Bugzilla 44286 ........ r653036 | adelmelle | 2008-05-03 11:21:45 +0100 (Sat, 03 May 2008) | 2 lines Cleanup: improve code-readibility ........ r653045 | adelmelle | 2008-05-03 11:51:16 +0100 (Sat, 03 May 2008) | 2 lines Tweak/correction: save local hash-code (as originally intended...) ........ r653048 | adelmelle | 2008-05-03 11:55:07 +0100 (Sat, 03 May 2008) | 2 lines Tweaks: make fobj member final; have default implementations for some methods throw an UnsupportedOperationException instead of merely logging an error ........ r653106 | acumiskey | 2008-05-03 20:07:18 +0100 (Sat, 03 May 2008) | 1 line Fixed the build. Assignment on final variable fobj. ........ r653144 | acumiskey | 2008-05-03 22:29:09 +0100 (Sat, 03 May 2008) | 1 line Fix that preserves the final status of the fobj member variable. ........ r653202 | adelmelle | 2008-05-04 12:37:31 +0100 (Sun, 04 May 2008) | 2 lines Change private element-generating methods to add the elements to a passed List (improves code-readability and reduces the amount of temporary LinkedList instances) ........ r653204 | adelmelle | 2008-05-04 14:04:28 +0100 (Sun, 04 May 2008) | 4 lines Further refinements: -> use cached auxiliary position where possible (analogous to BlockStackingLM) -> consolidate makeXXXPenalty() helpers ........ r653311 | jeremias | 2008-05-05 07:50:54 +0100 (Mon, 05 May 2008) | 6 lines Bugzilla #43650: PCL Renderer: Improved page format selection so it doesn't interfere with duplex printing. Submitted by: Thomas Margreiter <tm.at.felder.at> Note: I've only been able to verify that the change doesn't have any negative effects on simplex printers. ........ r653564 | adelmelle | 2008-05-05 20:27:10 +0100 (Mon, 05 May 2008) | 2 lines Correction of indentation ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@653718 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Merged revisions 652821-652822,652835,653036,653045,653048,653106,653144,653202,653204,653311,653564 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r652821 | adelmelle | 2008-05-02 17:58:26 +0100 (Fri, 02 May 2008) | 6 lines Cleanup/Correction after r657673 -> added missing file FObj.java -> pushed retrieve-class-name upwards to AbstractRetrieveMarker as a common property -> corrected use of property-name "retrieve-class-name" in source and testcase -> improved consistency in code-style ........ r652822 | adelmelle | 2008-05-02 18:00:33 +0100 (Fri, 02 May 2008) | 1 line Expand imports... ........ r652835 | adelmelle | 2008-05-02 18:28:25 +0100 (Fri, 02 May 2008) | 3 lines Bugzilla 42703: Fixed a regression introduced by the fix for Bugzilla 44286 ........ r653036 | adelmelle | 2008-05-03 11:21:45 +0100 (Sat, 03 May 2008) | 2 lines Cleanup: improve code-readibility ........ r653045 | adelmelle | 2008-05-03 11:51:16 +0100 (Sat, 03 May 2008) | 2 lines Tweak/correction: save local hash-code (as originally intended...) ........ r653048 | adelmelle | 2008-05-03 11:55:07 +0100 (Sat, 03 May 2008) | 2 lines Tweaks: make fobj member final; have default implementations for some methods throw an UnsupportedOperationException instead of merely logging an error ........ r653106 | acumiskey | 2008-05-03 20:07:18 +0100 (Sat, 03 May 2008) | 1 line Fixed the build. Assignment on final variable fobj. ........ r653144 | acumiskey | 2008-05-03 22:29:09 +0100 (Sat, 03 May 2008) | 1 line Fix that preserves the final status of the fobj member variable. ........ r653202 | adelmelle | 2008-05-04 12:37:31 +0100 (Sun, 04 May 2008) | 2 lines Change private element-generating methods to add the elements to a passed List (improves code-readability and reduces the amount of temporary LinkedList instances) ........ r653204 | adelmelle | 2008-05-04 14:04:28 +0100 (Sun, 04 May 2008) | 4 lines Further refinements: -> use cached auxiliary position where possible (analogous to BlockStackingLM) -> consolidate makeXXXPenalty() helpers ........ r653311 | jeremias | 2008-05-05 07:50:54 +0100 (Mon, 05 May 2008) | 6 lines Bugzilla #43650: PCL Renderer: Improved page format selection so it doesn't interfere with duplex printing. Submitted by: Thomas Margreiter <tm.at.felder.at> Note: I've only been able to verify that the change doesn't have any negative effects on simplex printers. ........ r653564 | adelmelle | 2008-05-05 20:27:10 +0100 (Mon, 05 May 2008) | 2 lines Correction of indentation ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@653718 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Merged revisions 652821-652822,652835,653036,653045,653048,653106,653144,653202,653204,653311,653564 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r652821 | adelmelle | 2008-05-02 17:58:26 +0100 (Fri, 02 May 2008) | 6 lines Cleanup/Correction after r657673 -> added missing file FObj.java -> pushed retrieve-class-name upwards to AbstractRetrieveMarker as a common property -> corrected use of property-name "retrieve-class-name" in source and testcase -> improved consistency in code-style ........ r652822 | adelmelle | 2008-05-02 18:00:33 +0100 (Fri, 02 May 2008) | 1 line Expand imports... ........ r652835 | adelmelle | 2008-05-02 18:28:25 +0100 (Fri, 02 May 2008) | 3 lines Bugzilla 42703: Fixed a regression introduced by the fix for Bugzilla 44286 ........ r653036 | adelmelle | 2008-05-03 11:21:45 +0100 (Sat, 03 May 2008) | 2 lines Cleanup: improve code-readibility ........ r653045 | adelmelle | 2008-05-03 11:51:16 +0100 (Sat, 03 May 2008) | 2 lines Tweak/correction: save local hash-code (as originally intended...) ........ r653048 | adelmelle | 2008-05-03 11:55:07 +0100 (Sat, 03 May 2008) | 2 lines Tweaks: make fobj member final; have default implementations for some methods throw an UnsupportedOperationException instead of merely logging an error ........ r653106 | acumiskey | 2008-05-03 20:07:18 +0100 (Sat, 03 May 2008) | 1 line Fixed the build. Assignment on final variable fobj. ........ r653144 | acumiskey | 2008-05-03 22:29:09 +0100 (Sat, 03 May 2008) | 1 line Fix that preserves the final status of the fobj member variable. ........ r653202 | adelmelle | 2008-05-04 12:37:31 +0100 (Sun, 04 May 2008) | 2 lines Change private element-generating methods to add the elements to a passed List (improves code-readability and reduces the amount of temporary LinkedList instances) ........ r653204 | adelmelle | 2008-05-04 14:04:28 +0100 (Sun, 04 May 2008) | 4 lines Further refinements: -> use cached auxiliary position where possible (analogous to BlockStackingLM) -> consolidate makeXXXPenalty() helpers ........ r653311 | jeremias | 2008-05-05 07:50:54 +0100 (Mon, 05 May 2008) | 6 lines Bugzilla #43650: PCL Renderer: Improved page format selection so it doesn't interfere with duplex printing. Submitted by: Thomas Margreiter <tm.at.felder.at> Note: I've only been able to verify that the change doesn't have any negative effects on simplex printers. ........ r653564 | adelmelle | 2008-05-05 20:27:10 +0100 (Mon, 05 May 2008) | 2 lines Correction of indentation ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@653718 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Merged revisions 652821-652822,652835,653036,653045,653048,653106,653144,653202,653204,653311,653564 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r652821 | adelmelle | 2008-05-02 17:58:26 +0100 (Fri, 02 May 2008) | 6 lines Cleanup/Correction after r657673 -> added missing file FObj.java -> pushed retrieve-class-name upwards to AbstractRetrieveMarker as a common property -> corrected use of property-name "retrieve-class-name" in source and testcase -> improved consistency in code-style ........ r652822 | adelmelle | 2008-05-02 18:00:33 +0100 (Fri, 02 May 2008) | 1 line Expand imports... ........ r652835 | adelmelle | 2008-05-02 18:28:25 +0100 (Fri, 02 May 2008) | 3 lines Bugzilla 42703: Fixed a regression introduced by the fix for Bugzilla 44286 ........ r653036 | adelmelle | 2008-05-03 11:21:45 +0100 (Sat, 03 May 2008) | 2 lines Cleanup: improve code-readibility ........ r653045 | adelmelle | 2008-05-03 11:51:16 +0100 (Sat, 03 May 2008) | 2 lines Tweak/correction: save local hash-code (as originally intended...) ........ r653048 | adelmelle | 2008-05-03 11:55:07 +0100 (Sat, 03 May 2008) | 2 lines Tweaks: make fobj member final; have default implementations for some methods throw an UnsupportedOperationException instead of merely logging an error ........ r653106 | acumiskey | 2008-05-03 20:07:18 +0100 (Sat, 03 May 2008) | 1 line Fixed the build. Assignment on final variable fobj. ........ r653144 | acumiskey | 2008-05-03 22:29:09 +0100 (Sat, 03 May 2008) | 1 line Fix that preserves the final status of the fobj member variable. ........ r653202 | adelmelle | 2008-05-04 12:37:31 +0100 (Sun, 04 May 2008) | 2 lines Change private element-generating methods to add the elements to a passed List (improves code-readability and reduces the amount of temporary LinkedList instances) ........ r653204 | adelmelle | 2008-05-04 14:04:28 +0100 (Sun, 04 May 2008) | 4 lines Further refinements: -> use cached auxiliary position where possible (analogous to BlockStackingLM) -> consolidate makeXXXPenalty() helpers ........ r653311 | jeremias | 2008-05-05 07:50:54 +0100 (Mon, 05 May 2008) | 6 lines Bugzilla #43650: PCL Renderer: Improved page format selection so it doesn't interfere with duplex printing. Submitted by: Thomas Margreiter <tm.at.felder.at> Note: I've only been able to verify that the change doesn't have any negative effects on simplex printers. ........ r653564 | adelmelle | 2008-05-05 20:27:10 +0100 (Mon, 05 May 2008) | 2 lines Correction of indentation ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@653718 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 654783,654849,654869,654946,654982,655085,655093,655275,655281,655285,655309,655349,655370 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r654783 | vhennebert | 2008-05-09 13:30:40 +0100 (Fri, 09 May 2008) | 3 lines Checkstyle and minor typo fixes Set svn:keywords and svn:eol-style properties on new files ........ r654849 | acumiskey | 2008-05-09 16:14:37 +0100 (Fri, 09 May 2008) | 1 line Unwanted list self concatenation :). ........ r654869 | acumiskey | 2008-05-09 17:13:47 +0100 (Fri, 09 May 2008) | 1 line Moved the instantiation of the FontManager to the constructor along with all the other aggregated objects. ........ r654946 | adelmelle | 2008-05-09 22:40:14 +0100 (Fri, 09 May 2008) | 6 lines Bugzilla 44794: Added support for page-number-citation and page-number-citation-last of fo:inline. Corrected behavior for page-number-citation-last of fo:block - forward references properly resolved. (+ support for page-number-citation-last on list-related FOs) ........ r654982 | acumiskey | 2008-05-10 00:47:28 +0100 (Sat, 10 May 2008) | 1 line Checkstyle cleanup and javadoc ........ r655085 | adelmelle | 2008-05-10 14:44:09 +0100 (Sat, 10 May 2008) | 5 lines Tweaks: -> remove split in CommonFont: font-size is resolved early, so no need anymore for CachedCommonFont -> allow disabling the PropertyCache via a system property (just in case...) ........ r655093 | adelmelle | 2008-05-10 15:23:56 +0100 (Sat, 10 May 2008) | 1 line Correction: set default to true... ........ r655275 | maxberger | 2008-05-11 08:30:55 +0100 (Sun, 11 May 2008) | 1 line made sure warning for missing glyphs is emitted in all cases ........ r655281 | maxberger | 2008-05-11 10:01:31 +0100 (Sun, 11 May 2008) | 1 line Support character-by-character font-selection strategy on fo:character element ........ r655285 | maxberger | 2008-05-11 10:17:07 +0100 (Sun, 11 May 2008) | 1 line Forgot to update testcases ........ r655309 | adelmelle | 2008-05-11 13:22:22 +0100 (Sun, 11 May 2008) | 3 lines Make the LM clean up on end-of-layout, if possible. Added clearChildNodes() method to FObj to release the reference to the FO's children. ........ r655349 | spepping | 2008-05-11 19:05:51 +0100 (Sun, 11 May 2008) | 2 lines The spec requires rounding, not truncating ........ r655370 | adelmelle | 2008-05-11 22:03:41 +0100 (Sun, 11 May 2008) | 1 line Avoid creation of unnecessary dummy areas. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@655445 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
Initial work on enhancing the extension facilities to register special extensions which create so-called ExtensionAttachment objects which are attached to the formatting object they are attached to. These objects can be evaluated by standard or custom layout managers or simply passed through to the area tree (the latter is NYI). The AreaTreeHandler currently takes ExtensionAttachment objects from fo:root and fo:declarations and wraps them in OffDocumentItems that Renderers can react on to provide additional functionality on document-level (like PDF metadata or PostScript media dictionaries). Since the simple-page-master is available directly from the PageViewport the renderer can take ExtensionAttachment objects directly from there (see PSRenderer.renderPage()). Extension Elements that provide ExtensionAttachments are not added as such to the child element list of a formatting object since they work a little differently and should free memory as soon as possible. The PostScript extension described in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript are now fully implemented but under the namespace URI "http://xmlgraphics.apache.org/fop/postscript", not "http://xml.apache.org/fop/extensions". I'll need to look at namespaces again separately, later. The new PSExtensionElementMapping is currently hard-coded into FOTreeBuilder as are the other ElementMapping classes. OffDocumentItem is now an interface, AbstractOffDocumentItem now providing the base functionality of the former OffDocumentItem class. Lots of clean-up and javadocs while working through this, for example: FObj.childNodes is not public anymore. Instead a special method on fo.flow.InstreamForeignObject provides the child in the one case childNodes was directly accessed. PropertyMaker access in FObj is also done through a method now, propertyListTable is now private. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@267209 13f79535-47bb-0310-9956-ffa450edef68
19 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.fo;
  19. import java.util.Collections;
  20. import java.util.HashMap;
  21. import java.util.Iterator;
  22. import java.util.List;
  23. import java.util.ListIterator;
  24. import java.util.Map;
  25. import java.util.Map.Entry;
  26. import java.util.NoSuchElementException;
  27. import java.util.Set;
  28. import org.xml.sax.Attributes;
  29. import org.xml.sax.Locator;
  30. import org.apache.xmlgraphics.util.QName;
  31. import org.apache.fop.apps.FOPException;
  32. import org.apache.fop.fo.extensions.ExtensionAttachment;
  33. import org.apache.fop.fo.flow.Marker;
  34. import org.apache.fop.fo.flow.table.TableCell;
  35. import org.apache.fop.fo.properties.Property;
  36. import org.apache.fop.fo.properties.PropertyMaker;
  37. /**
  38. * Base class for representation of formatting objects and their processing.
  39. * All standard formatting object classes extend this class.
  40. */
  41. public abstract class FObj extends FONode implements Constants {
  42. /** the list of property makers */
  43. private static final PropertyMaker[] PROPERTY_LIST_TABLE
  44. = FOPropertyMapping.getGenericMappings();
  45. /** pointer to the descendant subtree */
  46. protected FONode firstChild;
  47. /** pointer to the end of the descendant subtree */
  48. protected FONode lastChild;
  49. /** The list of extension attachments, null if none */
  50. private List<ExtensionAttachment> extensionAttachments = null;
  51. /** The map of foreign attributes, null if none */
  52. private Map<QName, String> foreignAttributes = null;
  53. /** Used to indicate if this FO is either an Out Of Line FO (see rec)
  54. * or a descendant of one. Used during FO validation.
  55. */
  56. private boolean isOutOfLineFODescendant = false;
  57. /** Markers added to this element. */
  58. private Map<String, Marker> markers;
  59. private int bidiLevel = -1;
  60. // The value of properties relevant for all fo objects
  61. private String id = null;
  62. // End of property values
  63. /**
  64. * Create a new formatting object.
  65. *
  66. * @param parent the parent node
  67. */
  68. public FObj(FONode parent) {
  69. super(parent);
  70. // determine if isOutOfLineFODescendant should be set
  71. if (parent != null && parent instanceof FObj) {
  72. if (((FObj) parent).getIsOutOfLineFODescendant()) {
  73. isOutOfLineFODescendant = true;
  74. } else {
  75. int foID = getNameId();
  76. if (foID == FO_FLOAT || foID == FO_FOOTNOTE
  77. || foID == FO_FOOTNOTE_BODY) {
  78. isOutOfLineFODescendant = true;
  79. }
  80. }
  81. }
  82. }
  83. /** {@inheritDoc} */
  84. public FONode clone(FONode parent, boolean removeChildren)
  85. throws FOPException {
  86. FObj fobj = (FObj) super.clone(parent, removeChildren);
  87. if (removeChildren) {
  88. fobj.firstChild = null;
  89. }
  90. return fobj;
  91. }
  92. /**
  93. * Returns the PropertyMaker for a given property ID.
  94. * @param propId the property ID
  95. * @return the requested Property Maker
  96. */
  97. public static PropertyMaker getPropertyMakerFor(int propId) {
  98. return PROPERTY_LIST_TABLE[propId];
  99. }
  100. /** {@inheritDoc} */
  101. public void processNode(String elementName, Locator locator,
  102. Attributes attlist, PropertyList pList)
  103. throws FOPException {
  104. setLocator(locator);
  105. pList.addAttributesToList(attlist);
  106. if (!inMarker() || "marker".equals(elementName)) {
  107. bind(pList);
  108. }
  109. warnOnUnknownProperties(attlist, elementName, pList);
  110. }
  111. private void warnOnUnknownProperties(Attributes attlist, String objName, PropertyList propertyList)
  112. throws FOPException {
  113. Map<String, Property> unknowns = propertyList.getUnknownPropertyValues();
  114. for (Entry<String, Property> entry : unknowns.entrySet()) {
  115. FOValidationEventProducer producer = FOValidationEventProducer.Provider.get(getUserAgent()
  116. .getEventBroadcaster());
  117. producer.warnOnInvalidPropertyValue(this, objName,
  118. getAttributeNameForValue(attlist, entry.getValue(), propertyList), entry.getKey(), null,
  119. getLocator());
  120. }
  121. }
  122. private String getAttributeNameForValue(Attributes attList, Property value, PropertyList propertyList)
  123. throws FOPException {
  124. for (int i = 0; i < attList.getLength(); i++) {
  125. String attributeName = attList.getQName(i);
  126. String attributeValue = attList.getValue(i);
  127. Property prop = propertyList.getPropertyForAttribute(attList, attributeName, attributeValue);
  128. if (prop.equals(value)) {
  129. return attributeName;
  130. }
  131. }
  132. return "unknown";
  133. }
  134. /**
  135. * Create a default property list for this element.
  136. * {@inheritDoc}
  137. */
  138. protected PropertyList createPropertyList(PropertyList parent,
  139. FOEventHandler foEventHandler) throws FOPException {
  140. return getBuilderContext().getPropertyListMaker().make(this, parent);
  141. }
  142. /**
  143. * Bind property values from the property list to the FO node.
  144. * Must be overridden in all FObj subclasses that have properties
  145. * applying to it.
  146. * @param pList the PropertyList where the properties can be found.
  147. * @throws FOPException if there is a problem binding the values
  148. */
  149. public void bind(PropertyList pList) throws FOPException {
  150. id = pList.get(PR_ID).getString();
  151. }
  152. /**
  153. * {@inheritDoc}
  154. * @throws FOPException FOP Exception
  155. */
  156. public void startOfNode() throws FOPException {
  157. if (id != null) {
  158. checkId(id);
  159. }
  160. }
  161. /**
  162. * Setup the id for this formatting object.
  163. * Most formatting objects can have an id that can be referenced.
  164. * This methods checks that the id isn't already used by another FO
  165. *
  166. * @param id the id to check
  167. * @throws ValidationException if the ID is already defined elsewhere
  168. * (strict validation only)
  169. */
  170. private void checkId(String id) throws ValidationException {
  171. if (!inMarker() && !id.equals("")) {
  172. Set idrefs = getBuilderContext().getIDReferences();
  173. if (!idrefs.contains(id)) {
  174. idrefs.add(id);
  175. } else {
  176. getFOValidationEventProducer().idNotUnique(this, getName(), id, true, locator);
  177. }
  178. }
  179. }
  180. /**
  181. * Returns Out Of Line FO Descendant indicator.
  182. * @return true if Out of Line FO or Out Of Line descendant, false otherwise
  183. */
  184. boolean getIsOutOfLineFODescendant() {
  185. return isOutOfLineFODescendant;
  186. }
  187. /** {@inheritDoc}*/
  188. protected void addChildNode(FONode child) throws FOPException {
  189. if (child.getNameId() == FO_MARKER) {
  190. addMarker((Marker) child);
  191. } else {
  192. ExtensionAttachment attachment = child.getExtensionAttachment();
  193. if (attachment != null) {
  194. /* This removes the element from the normal children,
  195. * so no layout manager is being created for them
  196. * as they are only additional information.
  197. */
  198. addExtensionAttachment(attachment);
  199. } else {
  200. if (firstChild == null) {
  201. firstChild = child;
  202. lastChild = child;
  203. } else {
  204. if (lastChild == null) {
  205. FONode prevChild = firstChild;
  206. while (prevChild.siblings != null
  207. && prevChild.siblings[1] != null) {
  208. prevChild = prevChild.siblings[1];
  209. }
  210. FONode.attachSiblings(prevChild, child);
  211. } else {
  212. FONode.attachSiblings(lastChild, child);
  213. lastChild = child;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. /**
  220. * Used by RetrieveMarker during Marker-subtree cloning
  221. * @param child the (cloned) child node
  222. * @param parent the (cloned) parent node
  223. * @throws FOPException when the child could not be added to the parent
  224. */
  225. protected static void addChildTo(FONode child, FONode parent)
  226. throws FOPException {
  227. parent.addChildNode(child);
  228. }
  229. /** {@inheritDoc} */
  230. public void removeChild(FONode child) {
  231. FONode nextChild = null;
  232. if (child.siblings != null) {
  233. nextChild = child.siblings[1];
  234. }
  235. if (child == firstChild) {
  236. firstChild = nextChild;
  237. if (firstChild != null) {
  238. firstChild.siblings[0] = null;
  239. }
  240. } else {
  241. FONode prevChild = child.siblings[0];
  242. prevChild.siblings[1] = nextChild;
  243. if (nextChild != null) {
  244. nextChild.siblings[0] = prevChild;
  245. }
  246. }
  247. if (child == lastChild) {
  248. if (child.siblings != null) {
  249. lastChild = siblings[0];
  250. } else {
  251. lastChild = null;
  252. }
  253. }
  254. }
  255. /**
  256. * Find the nearest parent, grandparent, etc. FONode that is also an FObj
  257. * @return FObj the nearest ancestor FONode that is an FObj
  258. */
  259. public FObj findNearestAncestorFObj() {
  260. FONode par = parent;
  261. while (par != null && !(par instanceof FObj)) {
  262. par = par.parent;
  263. }
  264. return (FObj) par;
  265. }
  266. /**
  267. * Check if this formatting object generates reference areas.
  268. * @return true if generates reference areas
  269. * TODO see if needed
  270. */
  271. public boolean generatesReferenceAreas() {
  272. return false;
  273. }
  274. /** {@inheritDoc} */
  275. public FONodeIterator getChildNodes() {
  276. if (hasChildren()) {
  277. return new FObjIterator(this);
  278. }
  279. return null;
  280. }
  281. /**
  282. * Indicates whether this formatting object has children.
  283. * @return true if there are children
  284. */
  285. public boolean hasChildren() {
  286. return this.firstChild != null;
  287. }
  288. /**
  289. * Return an iterator over the object's childNodes starting
  290. * at the passed-in node (= first call to iterator.next() will
  291. * return childNode)
  292. * @param childNode First node in the iterator
  293. * @return A ListIterator or null if childNode isn't a child of
  294. * this FObj.
  295. */
  296. public FONodeIterator getChildNodes(FONode childNode) {
  297. FONodeIterator it = getChildNodes();
  298. if (it != null) {
  299. if (firstChild == childNode) {
  300. return it;
  301. } else {
  302. while (it.hasNext()
  303. && it.nextNode().siblings[1] != childNode) {
  304. //nop
  305. }
  306. if (it.hasNext()) {
  307. return it;
  308. } else {
  309. return null;
  310. }
  311. }
  312. }
  313. return null;
  314. }
  315. /**
  316. * Notifies a FObj that one of it's children is removed.
  317. * This method is subclassed by Block to clear the
  318. * firstInlineChild variable in case it doesn't generate
  319. * any areas (see addMarker()).
  320. * @param node the node that was removed
  321. */
  322. void notifyChildRemoval(FONode node) {
  323. //nop
  324. }
  325. /**
  326. * Add the marker to this formatting object.
  327. * If this object can contain markers it checks that the marker
  328. * has a unique class-name for this object and that it is
  329. * the first child.
  330. * @param marker Marker to add.
  331. */
  332. protected void addMarker(Marker marker) {
  333. String mcname = marker.getMarkerClassName();
  334. if (firstChild != null) {
  335. // check for empty childNodes
  336. for (Iterator iter = getChildNodes(); iter.hasNext();) {
  337. FONode node = (FONode) iter.next();
  338. if (node instanceof FObj
  339. || (node instanceof FOText
  340. && ((FOText) node).willCreateArea())) {
  341. getFOValidationEventProducer().markerNotInitialChild(this, getName(),
  342. mcname, locator);
  343. return;
  344. } else if (node instanceof FOText) {
  345. iter.remove();
  346. notifyChildRemoval(node);
  347. }
  348. }
  349. }
  350. if (markers == null) {
  351. markers = new HashMap<String, Marker>();
  352. }
  353. if (!markers.containsKey(mcname)) {
  354. markers.put(mcname, marker);
  355. } else {
  356. getFOValidationEventProducer().markerNotUniqueForSameParent(this, getName(),
  357. mcname, locator);
  358. }
  359. }
  360. /**
  361. * @return true if there are any Markers attached to this object
  362. */
  363. public boolean hasMarkers() {
  364. return markers != null && !markers.isEmpty();
  365. }
  366. /**
  367. * @return the collection of Markers attached to this object
  368. */
  369. public Map<String, Marker> getMarkers() {
  370. return markers;
  371. }
  372. /** {@inheritDoc} */
  373. protected String getContextInfoAlt() {
  374. StringBuffer sb = new StringBuffer();
  375. if (getLocalName() != null) {
  376. sb.append(getName());
  377. sb.append(", ");
  378. }
  379. if (hasId()) {
  380. sb.append("id=").append(getId());
  381. return sb.toString();
  382. }
  383. String s = gatherContextInfo();
  384. if (s != null) {
  385. sb.append("\"");
  386. if (s.length() < 32) {
  387. sb.append(s);
  388. } else {
  389. sb.append(s.substring(0, 32));
  390. sb.append("...");
  391. }
  392. sb.append("\"");
  393. return sb.toString();
  394. } else {
  395. return null;
  396. }
  397. }
  398. /** {@inheritDoc} */
  399. protected String gatherContextInfo() {
  400. if (getLocator() != null) {
  401. return super.gatherContextInfo();
  402. } else {
  403. ListIterator iter = getChildNodes();
  404. if (iter == null) {
  405. return null;
  406. }
  407. StringBuffer sb = new StringBuffer();
  408. while (iter.hasNext()) {
  409. FONode node = (FONode) iter.next();
  410. String s = node.gatherContextInfo();
  411. if (s != null) {
  412. if (sb.length() > 0) {
  413. sb.append(", ");
  414. }
  415. sb.append(s);
  416. }
  417. }
  418. return (sb.length() > 0 ? sb.toString() : null);
  419. }
  420. }
  421. /**
  422. * Convenience method for validity checking. Checks if the
  423. * incoming node is a member of the "%block;" parameter entity
  424. * as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
  425. *
  426. * @param nsURI namespace URI of incoming node
  427. * @param lName local name (i.e., no prefix) of incoming node
  428. * @return true if a member, false if not
  429. */
  430. protected boolean isBlockItem(String nsURI, String lName) {
  431. return (FO_URI.equals(nsURI)
  432. && ("block".equals(lName)
  433. || "table".equals(lName)
  434. || "table-and-caption".equals(lName)
  435. || "block-container".equals(lName)
  436. || "list-block".equals(lName)
  437. || "float".equals(lName)
  438. || isNeutralItem(nsURI, lName)));
  439. }
  440. /**
  441. * Convenience method for validity checking. Checks if the
  442. * incoming node is a member of the "%inline;" parameter entity
  443. * as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
  444. *
  445. * @param nsURI namespace URI of incoming node
  446. * @param lName local name (i.e., no prefix) of incoming node
  447. * @return true if a member, false if not
  448. */
  449. protected boolean isInlineItem(String nsURI, String lName) {
  450. return (FO_URI.equals(nsURI)
  451. && ("bidi-override".equals(lName)
  452. || "character".equals(lName)
  453. || "external-graphic".equals(lName)
  454. || "instream-foreign-object".equals(lName)
  455. || "inline".equals(lName)
  456. || "inline-container".equals(lName)
  457. || "leader".equals(lName)
  458. || "page-number".equals(lName)
  459. || "page-number-citation".equals(lName)
  460. || "page-number-citation-last".equals(lName)
  461. || "basic-link".equals(lName)
  462. || ("multi-toggle".equals(lName)
  463. && (getNameId() == FO_MULTI_CASE
  464. || findAncestor(FO_MULTI_CASE) > 0))
  465. || ("footnote".equals(lName)
  466. && !isOutOfLineFODescendant)
  467. || isNeutralItem(nsURI, lName)));
  468. }
  469. /**
  470. * Convenience method for validity checking. Checks if the
  471. * incoming node is a member of the "%block;" parameter entity
  472. * or "%inline;" parameter entity
  473. * @param nsURI namespace URI of incoming node
  474. * @param lName local name (i.e., no prefix) of incoming node
  475. * @return true if a member, false if not
  476. */
  477. protected boolean isBlockOrInlineItem(String nsURI, String lName) {
  478. return (isBlockItem(nsURI, lName) || isInlineItem(nsURI, lName));
  479. }
  480. /**
  481. * Convenience method for validity checking. Checks if the
  482. * incoming node is a member of the neutral item list
  483. * as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
  484. * @param nsURI namespace URI of incoming node
  485. * @param lName local name (i.e., no prefix) of incoming node
  486. * @return true if a member, false if not
  487. */
  488. protected boolean isNeutralItem(String nsURI, String lName) {
  489. return (FO_URI.equals(nsURI)
  490. && ("multi-switch".equals(lName)
  491. || "multi-properties".equals(lName)
  492. || "wrapper".equals(lName)
  493. || (!isOutOfLineFODescendant && "float".equals(lName))
  494. || "retrieve-marker".equals(lName)
  495. || "retrieve-table-marker".equals(lName)));
  496. }
  497. /**
  498. * Convenience method for validity checking. Checks if the
  499. * current node has an ancestor of a given name.
  500. * @param ancestorID ID of node name to check for (e.g., FO_ROOT)
  501. * @return number of levels above FO where ancestor exists,
  502. * -1 if not found
  503. */
  504. protected int findAncestor(int ancestorID) {
  505. int found = 1;
  506. FONode temp = getParent();
  507. while (temp != null) {
  508. if (temp instanceof TableCell && (ancestorID == FO_TABLE_HEADER || ancestorID == FO_TABLE_FOOTER)) {
  509. // note that if the retrieve-table-marker is not in a table-header/footer an exception is
  510. // thrown, so no need to reset this flag in that case
  511. ((TableCell) temp).flagAsHavingRetrieveTableMarker();
  512. }
  513. if (temp.getNameId() == ancestorID) {
  514. return found;
  515. }
  516. found += 1;
  517. temp = temp.getParent();
  518. }
  519. return -1;
  520. }
  521. /**
  522. * Clears the list of child nodes.
  523. */
  524. public void clearChildNodes() {
  525. this.firstChild = null;
  526. }
  527. /** @return the "id" property. */
  528. public String getId() {
  529. return id;
  530. }
  531. /** @return whether this object has an id set */
  532. public boolean hasId() {
  533. return (id != null && id.length() > 0);
  534. }
  535. /** {@inheritDoc} */
  536. public String getNamespaceURI() {
  537. return FOElementMapping.URI;
  538. }
  539. /** {@inheritDoc} */
  540. public String getNormalNamespacePrefix() {
  541. return "fo";
  542. }
  543. /** {@inheritDoc} */
  544. public boolean isBidiRangeBlockItem() {
  545. String ns = getNamespaceURI();
  546. String ln = getLocalName();
  547. return !isNeutralItem(ns, ln) && isBlockItem(ns, ln);
  548. }
  549. /**
  550. * Recursively set resolved bidirectional level of FO (and its ancestors) if
  551. * and only if it is non-negative and if either the current value is reset (-1)
  552. * or the new value is less than the current value.
  553. * @param bidiLevel a non-negative bidi embedding level
  554. */
  555. public void setBidiLevel(int bidiLevel) {
  556. assert bidiLevel >= 0;
  557. if ( bidiLevel >= 0 ) {
  558. if ( ( this.bidiLevel < 0 ) || ( bidiLevel < this.bidiLevel ) ) {
  559. this.bidiLevel = bidiLevel;
  560. if ( parent != null ) {
  561. FObj foParent = (FObj) parent;
  562. int parentBidiLevel = foParent.getBidiLevel();
  563. if ( ( parentBidiLevel < 0 ) || ( bidiLevel < parentBidiLevel ) ) {
  564. foParent.setBidiLevel ( bidiLevel );
  565. }
  566. }
  567. }
  568. }
  569. }
  570. /**
  571. * Obtain resolved bidirectional level of FO.
  572. * @return either a non-negative bidi embedding level or -1
  573. * in case no bidi levels have been assigned
  574. */
  575. public int getBidiLevel() {
  576. return bidiLevel;
  577. }
  578. /**
  579. * Obtain resolved bidirectional level of FO or nearest FO
  580. * ancestor that has a resolved level.
  581. * @return either a non-negative bidi embedding level or -1
  582. * in case no bidi levels have been assigned to this FO or
  583. * any ancestor
  584. */
  585. public int getBidiLevelRecursive() {
  586. for ( FONode fn = this; fn != null; fn = fn.getParent() ) {
  587. if ( fn instanceof FObj ) {
  588. int level = ( (FObj) fn).getBidiLevel();
  589. if ( level >= 0 ) {
  590. return level;
  591. }
  592. }
  593. }
  594. return -1;
  595. }
  596. /**
  597. * Add a new extension attachment to this FObj.
  598. * (see org.apache.fop.fo.FONode for details)
  599. *
  600. * @param attachment the attachment to add.
  601. */
  602. void addExtensionAttachment(ExtensionAttachment attachment) {
  603. if (attachment == null) {
  604. throw new NullPointerException(
  605. "Parameter attachment must not be null");
  606. }
  607. if (extensionAttachments == null) {
  608. extensionAttachments = new java.util.ArrayList<ExtensionAttachment>();
  609. }
  610. if (log.isDebugEnabled()) {
  611. log.debug("ExtensionAttachment of category "
  612. + attachment.getCategory() + " added to "
  613. + getName() + ": " + attachment);
  614. }
  615. extensionAttachments.add(attachment);
  616. }
  617. /** @return the extension attachments of this FObj. */
  618. public List/*<ExtensionAttachment>*/ getExtensionAttachments() {
  619. if (extensionAttachments == null) {
  620. return Collections.EMPTY_LIST;
  621. } else {
  622. return extensionAttachments;
  623. }
  624. }
  625. /** @return true if this FObj has extension attachments */
  626. public boolean hasExtensionAttachments() {
  627. return extensionAttachments != null;
  628. }
  629. /**
  630. * Adds a foreign attribute to this FObj.
  631. * @param attributeName the attribute name as a QName instance
  632. * @param value the attribute value
  633. */
  634. public void addForeignAttribute(QName attributeName, String value) {
  635. /* TODO: Handle this over FOP's property mechanism so we can use
  636. * inheritance.
  637. */
  638. if (attributeName == null) {
  639. throw new NullPointerException("Parameter attributeName must not be null");
  640. }
  641. if (foreignAttributes == null) {
  642. foreignAttributes = new java.util.HashMap<QName, String>();
  643. }
  644. foreignAttributes.put(attributeName, value);
  645. }
  646. /** @return the map of foreign attributes */
  647. public Map getForeignAttributes() {
  648. if (foreignAttributes == null) {
  649. return Collections.EMPTY_MAP;
  650. } else {
  651. return foreignAttributes;
  652. }
  653. }
  654. /** {@inheritDoc} */
  655. public String toString() {
  656. return (super.toString() + "[@id=" + this.id + "]");
  657. }
  658. /** Basic {@link FONode.FONodeIterator} implementation */
  659. public static class FObjIterator implements FONodeIterator {
  660. private static final int F_NONE_ALLOWED = 0;
  661. private static final int F_SET_ALLOWED = 1;
  662. private static final int F_REMOVE_ALLOWED = 2;
  663. private FONode currentNode;
  664. private final FObj parentNode;
  665. private int currentIndex;
  666. private int flags = F_NONE_ALLOWED;
  667. FObjIterator(FObj parent) {
  668. this.parentNode = parent;
  669. this.currentNode = parent.firstChild;
  670. this.currentIndex = 0;
  671. this.flags = F_NONE_ALLOWED;
  672. }
  673. /** {@inheritDoc} */
  674. public FObj parentNode() {
  675. return parentNode;
  676. }
  677. /** {@inheritDoc} */
  678. public Object next() {
  679. if (currentNode != null) {
  680. if (currentIndex != 0) {
  681. if (currentNode.siblings != null
  682. && currentNode.siblings[1] != null) {
  683. currentNode = currentNode.siblings[1];
  684. } else {
  685. throw new NoSuchElementException();
  686. }
  687. }
  688. currentIndex++;
  689. flags |= (F_SET_ALLOWED | F_REMOVE_ALLOWED);
  690. return currentNode;
  691. } else {
  692. throw new NoSuchElementException();
  693. }
  694. }
  695. /** {@inheritDoc} */
  696. public Object previous() {
  697. if (currentNode.siblings != null
  698. && currentNode.siblings[0] != null) {
  699. currentIndex--;
  700. currentNode = currentNode.siblings[0];
  701. flags |= (F_SET_ALLOWED | F_REMOVE_ALLOWED);
  702. return currentNode;
  703. } else {
  704. throw new NoSuchElementException();
  705. }
  706. }
  707. /** {@inheritDoc} */
  708. public void set(Object o) {
  709. if ((flags & F_SET_ALLOWED) == F_SET_ALLOWED) {
  710. FONode newNode = (FONode) o;
  711. if (currentNode == parentNode.firstChild) {
  712. parentNode.firstChild = newNode;
  713. } else {
  714. FONode.attachSiblings(currentNode.siblings[0], newNode);
  715. }
  716. if (currentNode.siblings != null
  717. && currentNode.siblings[1] != null) {
  718. FONode.attachSiblings(newNode, currentNode.siblings[1]);
  719. }
  720. if (currentNode == parentNode.lastChild) {
  721. parentNode.lastChild = newNode;
  722. }
  723. } else {
  724. throw new IllegalStateException();
  725. }
  726. }
  727. /** {@inheritDoc} */
  728. public void add(Object o) {
  729. FONode newNode = (FONode) o;
  730. if (currentIndex == -1) {
  731. if (currentNode != null) {
  732. FONode.attachSiblings(newNode, currentNode);
  733. }
  734. parentNode.firstChild = newNode;
  735. currentIndex = 0;
  736. currentNode = newNode;
  737. if (parentNode.lastChild == null) {
  738. parentNode.lastChild = newNode;
  739. }
  740. } else {
  741. if (currentNode.siblings != null
  742. && currentNode.siblings[1] != null) {
  743. FONode.attachSiblings((FONode) o, currentNode.siblings[1]);
  744. }
  745. FONode.attachSiblings(currentNode, (FONode) o);
  746. if (currentNode == parentNode.lastChild) {
  747. parentNode.lastChild = newNode;
  748. }
  749. }
  750. flags &= F_NONE_ALLOWED;
  751. }
  752. /** {@inheritDoc} */
  753. public boolean hasNext() {
  754. return (currentNode != null)
  755. && ((currentIndex == 0)
  756. || (currentNode.siblings != null
  757. && currentNode.siblings[1] != null));
  758. }
  759. /** {@inheritDoc} */
  760. public boolean hasPrevious() {
  761. return (currentIndex != 0)
  762. || (currentNode.siblings != null
  763. && currentNode.siblings[0] != null);
  764. }
  765. /** {@inheritDoc} */
  766. public int nextIndex() {
  767. return currentIndex + 1;
  768. }
  769. /** {@inheritDoc} */
  770. public int previousIndex() {
  771. return currentIndex - 1;
  772. }
  773. /** {@inheritDoc} */
  774. public void remove() {
  775. if ((flags & F_REMOVE_ALLOWED) == F_REMOVE_ALLOWED) {
  776. parentNode.removeChild(currentNode);
  777. if (currentIndex == 0) {
  778. //first node removed
  779. currentNode = parentNode.firstChild;
  780. } else if (currentNode.siblings != null
  781. && currentNode.siblings[0] != null) {
  782. currentNode = currentNode.siblings[0];
  783. currentIndex--;
  784. } else {
  785. currentNode = null;
  786. }
  787. flags &= F_NONE_ALLOWED;
  788. } else {
  789. throw new IllegalStateException();
  790. }
  791. }
  792. /** {@inheritDoc} */
  793. public FONode lastNode() {
  794. while (currentNode != null
  795. && currentNode.siblings != null
  796. && currentNode.siblings[1] != null) {
  797. currentNode = currentNode.siblings[1];
  798. currentIndex++;
  799. }
  800. return currentNode;
  801. }
  802. /** {@inheritDoc} */
  803. public FONode firstNode() {
  804. currentNode = parentNode.firstChild;
  805. currentIndex = 0;
  806. return currentNode;
  807. }
  808. /** {@inheritDoc} */
  809. public FONode nextNode() {
  810. return (FONode) next();
  811. }
  812. /** {@inheritDoc} */
  813. public FONode previousNode() {
  814. return (FONode) previous();
  815. }
  816. }
  817. }