aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/extensions
Commit message (Collapse)AuthorAgeFilesLines
* Fed up with all those trailing whitespaces. Let's remove them all (once... ↵Vincent Hennebert2008-07-2417-69/+69
| | | | | | and for all?) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@679326 13f79535-47bb-0310-9956-ffa450edef68
* Replace occurrences of File.toURL() by File.toURI().toURL() (recommended as ↵Andreas L. Delmelle2008-07-131-1/+1
| | | | | | of Java 6, where File.toURL() is deprecated) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@676297 13f79535-47bb-0310-9956-ffa450edef68
* Minor tweak: use XG Commons version of the interfaceAndreas L. Delmelle2008-06-221-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@670336 13f79535-47bb-0310-9956-ffa450edef68
* Merged branchJeremias Maerki2008-04-142-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@647742 13f79535-47bb-0310-9956-ffa450edef68
* Added new extension element: fox:external-document. It allows to add whole ↵Jeremias Maerki2007-12-272-0/+188
| | | | | | | | | documents such as multi-page TIFF images to be inserted as peers to a page-sequence. Each image will make up an entire page. See the documentation for details. ATM, only single pages are possible. Multi-page images will be supported with the new image package. Some preparations for page-position="only" but the implementation is incomplete and "only" has no effect, yet. (Just uploaded some stuff I once started) Some javadoc cleanups. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@607032 13f79535-47bb-0310-9956-ffa450edef68
* * Javadoc update: use {@inheritDoc} instead of @see where applicable, ↵Andreas L. Delmelle2007-07-1814-37/+36
| | | | | | | | | | removal of some @author tags * Additional code cleanup: removal of unused imports (mainly in the fo.flow package) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557337 13f79535-47bb-0310-9956-ffa450edef68
* Fixes for issues introduced with fox:destination:Jeremias Maerki2007-04-043-99/+24
| | | | | | | | DestinationElementMapping masks ExtensionElementMapping. That caused the tests for widow/orphan extension on tables to fail. Improved Block child validation code (will need to be done for all FOs where fox:destination should be valid. Currently works only as child of fo:block or above fo:page-sequence where no layout managers are constructed. No LMMaker for fox:destination. Improved the handling there so adding the extension element to the list there isn't necessary. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@525526 13f79535-47bb-0310-9956-ffa450edef68
* No change; just add svn:keywords and svn:Id properties on new filesVincent Hennebert2007-04-033-210/+210
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@525081 13f79535-47bb-0310-9956-ffa450edef68
* - fix minor checkstyle issuesVincent Hennebert2007-04-033-1/+40
| | | | | | | | - add missing headers - add an entry in status.xml for the new named destinations feature git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@525078 13f79535-47bb-0310-9956-ffa450edef68
* changes to support named destinationJay Bryant2007-04-013-0/+171
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@524602 13f79535-47bb-0310-9956-ffa450edef68
* Code cleanup: Andreas L. Delmelle2007-01-112-2/+2
| | | | | | | | | | | - avoid unnecessary calls to getLogger(); LengthBase gets its own logger, LMs log to the AbstractLM logger - CommonBorderPaddingBackground no longer implements Cloneable (changes suggested by Richard Wheeldon) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@495371 13f79535-47bb-0310-9956-ffa450edef68
* Don't swallow the exception. At least log it.Jeremias Maerki2006-10-071-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@453919 13f79535-47bb-0310-9956-ffa450edef68
* Implemented limited support for extension properties through new methods on ↵Jeremias Maerki2006-09-112-0/+30
| | | | | | | | | | ElementMapping (backwards-compatible). Moved block-progression-unit into the fox: namespace. Implemented new extension properties: fox:orphan-content-limit and fox:widow-content-limit for fo:table and fo:list-block. See documentation for details. Bugfix in ElementListUtils.removeLegalBreaks (concerning box/glue combinations). Added a unit test to cover the problem. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@442282 13f79535-47bb-0310-9956-ffa450edef68
* Changed license headers and updated NOTICE file according to: ↵Jeremias Maerki2006-07-2818-90/+108
| | | | | | http://www.apache.org/legal/src-headers.html git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@426576 13f79535-47bb-0310-9956-ffa450edef68
* XML Graphics Commons 1.0 replaced with a SVN snapshot (containing the XMP ↵Jeremias Maerki2006-06-208-138/+168
| | | | | | | | | | | framework). Reworked the XMP support for PDF to use the XMP framework from XML Graphics Commons. XMP metadata embedded in fo:declarations is now properly handled. Its values are copied to the Info object according to the rules from PDF/A-1. Metadata values from the user agent (title, author etc.) are properly merged with metadata from the XSL-FO document. UserAgent metadata overrides FO metadata. Note: This is useful and active even if you don't activate PDF/A support. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@415688 13f79535-47bb-0310-9956-ffa450edef68
* Simply subclassing did not work as expected. Made a copy now.Jeremias Maerki2006-05-021-2/+17
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@398947 13f79535-47bb-0310-9956-ffa450edef68
* Introduced "ignored namespaces" list on FopFactory. Attributes from ignored ↵Jeremias Maerki2006-04-282-5/+44
| | | | | | | | | | | namespaces are not complained about. Not done for elements, yet. Added support for foreign attributes (attributes in a non-FO namespace) on formatting objects, for example to specify additional (proprietary) hints for rendering i-f-o and e-g. First usage example is PCLRendererContext which the PCLGraphics2DAdapter uses to decide whether to paint natively using HP GL/2 or using a bitmap. PCL Renderer revived: Basic framework constructed based on the old one. Still incomplete (no border painting, incomplete Graphics2D implementation, problems with reference orientation, no kerning etc.). The PCL Renderer implements PCL5 (monochrome) and HP GL/2. Work in progress! Added UnitConv helper class which could also be useful elsewhere (Could be a candidate for Commons). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@397806 13f79535-47bb-0310-9956-ffa450edef68
* The about attribute must have the "rdf" namespace prefix.Jeremias Maerki2006-03-231-0/+6
| | | | | | Adobe Acrobat uses an outdated namespace URI for the PDF/A identification, so do the same as Adobe Distiller: write the PDF/A identification twice, once with each namespace URI. Reason: Acrobat is probably the best tool to verify PDF/A conformance right now. jHove covers only part of ISO 19005-1. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@388126 13f79535-47bb-0310-9956-ffa450edef68
* Added missing package description.Jeremias Maerki2006-03-221-0/+22
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@387818 13f79535-47bb-0310-9956-ffa450edef68
* More work on PDF/A-1:Jeremias Maerki2006-02-221-0/+3
| | | | | | | | | ID entry is now generated in the trailer. More conformance checks especially for fonts. PDF/A Identification Schema for XMP added. Almost finished. Only color space checking is left to do, I think. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@379798 13f79535-47bb-0310-9956-ffa450edef68
* XMP metadata generation from the PDFInfo object now conforms to PDF/A-1 ↵Jeremias Maerki2006-02-171-0/+3
| | | | | | | | | | (6.7.3 in ISO 19005-1:2005(E)). On PDFDocument, it is now possible to set the PDF-A mode which triggers conformance checks where necessary. The first PDF/A-1b conformance checks are now in the code. When conformance problems are detected, the new PDFConformanceException (subclass of RuntimeException since this would be a programmer error) is thrown. PDF Renderer got a setting (through rendering options and XML configuration) to set the PDF/A-1 mode. Default is "disabled". git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378560 13f79535-47bb-0310-9956-ffa450edef68
* DOM2SAX code replaced. Copied and adapted from Xalan-J: ↵Jeremias Maerki2006-02-171-1/+1
| | | | | | | | http://svn.apache.org/repos/asf/xalan/java/trunk/src/org/apache/xalan/xsltc/trax/DOM2SAX.java There were issues with well-formedness and namespace prefixes when an XMP fragment was serialized to XML. Now this works fine. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378503 13f79535-47bb-0310-9956-ffa450edef68
* Initial support for XMP metadata (PDF 1.4) under fo:declarations. Both ↵Jeremias Maerki2006-02-177-0/+419
| | | | | | | | | | | | | | | | xmpmeta and RDF elements can be used as root elements for XMP metadata. Extracted DOM2SAX functionality from XMLXMLHandler into utility class since it is now reused elsewhere. New DOMBuilderContentHandlerFactory is used to create ContentHandlers that build generic DOMs. New DelegatingContentHandler is a convenience base class modelled after XMLFilterImpl but as passive SAX receiver. It is used by DOMBuilderContentHandlerFactory. Refactored FOTreeBuilder. FO tree building is now in a special ContentHandler which can be replaced temporarily when handling foreign XML like SVG or XMP. Extension Elements wanting the set their own ContentHandlers (instead of using the standard FO tree building mechanism) return a non-null value in getContentHandlerFactory(). The old mechanism is still supported (MathML, Plan and Barcode4J still use that). However, SVG support is changed to use a ContentHandlerFactory. Extension elements for xmpmeta and RDF elements making use of the new DOM build-up using ContentHandlerFactory. XMP metadata is passed to the renderer as ExtensionAttachment to the document. Only PDFRenderer uses the XMP extension attachment at this time. The PDFRenderer automatically builds XMP metadata based on the basic metadata information in the PDFInfo object if no explicit XMP metadata has been added to the XSL-FO document. XMP metadata merging is not implemented because this would involve a more sophisticated XMP infrastructure. That also means that XMP metadata is not validated. It's passed into the PDF as is. The PDF library now provides the PDFMetadata class to embed XMP metadata in PDFs version >=1.4. stream contents use a special filter list which is initially empty, so non-PDF-aware XMP readers can extract (and optionally modify) the XMP metadata. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378482 13f79535-47bb-0310-9956-ffa450edef68
* New feature: "Intermediate format" (IF). The IF is basically the XML dialect ↵Jeremias Maerki2006-01-172-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | written by the area tree renderer (XMLRenderer). A new parser for this format allows reparsing a serialized and possibly modified area tree and rendering it to the final target format. More details on the Wiki at http://wiki.apache.org/xmlgraphics-fop/AreaTreeIntermediateXml. No advanced features have been implemented, yet, only the basic functionality. The whole change should be fully backwards-compatible WRT the outer FOP API except maybe for FOTreeBuilder.addElementMapping(), and the area tree XML which got small changes. The area tree has been cleaned up. The serializability has been restored. The CachedRenderPagesModel works again and can, in certain situations, decrease the maximum amount of memory held at one point in time. Some adjustments were necessary in the area tree to help the work of the AreaTreeParser. The AreaTreeParser is new and is responsible for parsing area tree XML files and adding pages to a RenderPagesModel instance. It is SAX-based and should be pretty efficient. XMLUnit (http://xmlunit.sourceforge.net, BSD license) is a new dependency for the test code. It is used to verify the correctness of the intermediate format code. It doesn't have to be installed for the build to run through, though. ElementMapping got a new method getDOMImplementation() which provides the DOMImplementation used to handle a subdocument of a particular namespace. For example, SVG uses Batik's SVG DOM. The AreaTreeParser needs that to properly recreate foreign objects because it can't use the mechanism of the FO tree. The default implementation returns null. The ElementMapping instances are no longer maintained by the FOTreeBuilder, but by the newly created ElementMappingRegistry class. It is expected that the instance of this class is moved from the FOTreeBuilder and the AreaTreeParser's Handler class to the "environment class" once it is created to cut down on the startup time for each processed document. The XMLRenderer has been slightly modified to improve the serialization/deserialization qualities of the area tree XML format. The XMLRenderer can now mimic another renderer (see mimicRenderer(Renderer)) in order to use its font setup. That way it is made certain that the reparsed area tree will render to the final target format exactly as expected. Fixed a bug in the XMLHandlerRegistry which did not always return the right XMLHandler for every situation. Added a DefaultErrorListener to the util package. I've had problems with Xalan-J swallowing exceptions with its default ErrorListener, so I added a simple one for convenience and use in AreaTreeParser. Example code for working with the AreaTreeParser can be found in examples/embedding. Documentation will follow. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@369753 13f79535-47bb-0310-9956-ffa450edef68
* NOTE: API changes in a backwards-incompatible way: ↵Jeremias Maerki2005-12-151-2/+2
| | | | | | | | | | FOUserAgent.setResolution() -> FOUserAgent.setSourceResolution() and FOUserAgent.setTargetResolution() Resolution parameter to the user agent is split into: - a source resolution used to determine the pixel size in SVG images and bitmap without resolution information - a target resolution used to specify the output resolution of bitmap images generated by bitmap renderers and bitmaps generated by Batik for filter effects. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@357081 13f79535-47bb-0310-9956-ffa450edef68
* Made the FO tree a little more consistent by renaming getName() to ↵Jeremias Maerki2005-11-112-7/+12
| | | | | | getLocalName() and adding additional methods like: getNamespaceURI() and getNormalNamespacePrefix(). getName() now returns the fully qualified name combined from getLocalName() and getNormalNamespacePrefix(). For special cases you can call getName(String) to return a different namespace prefix. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@332545 13f79535-47bb-0310-9956-ffa450edef68
* Package documentation.Jeremias Maerki2005-10-272-0/+44
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@328824 13f79535-47bb-0310-9956-ffa450edef68
* Initial work on enhancing the extension facilities to register special ↵Jeremias Maerki2005-09-021-0/+38
| | | | | | | | | | | | | | 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
* An additional comment so this line will not be activated accidentally. The ↵Jeremias Maerki2005-09-011-0/+1
| | | | | | | | problem was a backwards-incompatible chnage in Batik for which a patch has been submitted: http://issues.apache.org/bugzilla/show_bug.cgi?id=36455 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265675 13f79535-47bb-0310-9956-ffa450edef68
* Reverting my earlier change to make FOP compile with Batik 1.6 again. I'm ↵Jeremias Maerki2005-09-011-1/+1
| | | | | | investigating this problem further. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265663 13f79535-47bb-0310-9956-ffa450edef68
* Set not only the base URL for the SVG Document but also the URI. Otherwise, ↵Jeremias Maerki2005-08-311-1/+3
| | | | | | relatively referenced documents or images inside an SVG defined in a fo:instream-foreign-object don't get resolved. This fixes certain problems with examples/fo/svg/external.fo. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265578 13f79535-47bb-0310-9956-ffa450edef68
* Bugzilla #36082 Jeremias Maerki2005-08-151-4/+6
| | | | | | | | | | | | | | | | | | | | | 1. Addresses the URI resolving issue as discussed in this bug by providing a FOP implementation of the URIResolver interface as well as the capabilities to set a URIResolver on the FOUserAgent object. 2. Modifies the BMPReader to extract the resolution information. 3. Fixes a possible array bounds exception in BMPImage which can happen for BMP images with extra bytes at the end. 4. Provides some infrastructure in ImageFactory in preparation of external configuration of multiple prioritised image providers per mime type. 5. Sets a proper base URL in SVGElement. 6. Provides test cases and test images for the different formats and resolutions. Submitted by: Manuel Mall <mm.at.arcus.com.au> Patch slightly modified: - EPS sample graphic exchanged with a very simple and more importantly much smaller one generated by Barcode4J. - Enabled resolution checking for some of the format-specific testcases (especially after working around resolution detection for PNG) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@232786 13f79535-47bb-0310-9956-ffa450edef68
* Removing unused import.Finn Bock2005-07-281-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225743 13f79535-47bb-0310-9956-ffa450edef68
* 1.) fox:label converted to 1.1 fo:bookmark-title.Glen Mazza2005-01-062-77/+0
| | | | | | | 2.) FObj, FObjMixed, InlineLevel made abstract. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198227 13f79535-47bb-0310-9956-ffa450edef68
* PR:Glen Mazza2005-01-042-117/+0
| | | | | | | | | | | Obtained from: Submitted by: Reviewed by: Converted fox:outline to fo:bookmark. fox:label/fo:bookmark-title still to be done. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198221 13f79535-47bb-0310-9956-ffa450edef68
* Switched from fox:bookmarks to fo:bookmark-tree (of XSL 1.1 2WD). Two moreGlen Mazza2005-01-022-73/+0
| | | | | | | | bookmark-related FO's (fox:outline and fox:label) need conversion and will be done next. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198216 13f79535-47bb-0310-9956-ffa450edef68
* New exception hierarchy rooted in SAXException and throw clauses onFinn Bock2004-10-284-15/+12
| | | | | | | | | property parsing and retrieval. PR: 31899 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198106 13f79535-47bb-0310-9956-ffa450edef68
* Fix a regression in pdfoutline.fo, the method signature for addCharactersFinn Bock2004-10-241-0/+2
| | | | | | | changed during patch 31699. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198100 13f79535-47bb-0310-9956-ffa450edef68
* Fix a regression in pdfoutline.fo. Supply empty createPropertyList andFinn Bock2004-10-241-0/+24
| | | | | | | | | | | | | processNode methods since the extension elements handles all attributes themself. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198099 13f79535-47bb-0310-9956-ffa450edef68
* Second phase of performance improvement.Finn Bock2004-10-191-2/+6
| | | | | | | | | - Move from addProperties() to processNode(). PR: 31699 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198064 13f79535-47bb-0310-9956-ffa450edef68
* Second phase of performance improvement. Pass the propertyList intoFinn Bock2004-10-191-2/+3
| | | | | | | | | processNode(..) and addCharacters(..). PR: 31699 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198056 13f79535-47bb-0310-9956-ffa450edef68
* More detaching from AddLMVisitor those FO's which don't/don't currentlyGlen Mazza2004-08-044-23/+0
| | | | | | | generate areas. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197855 13f79535-47bb-0310-9956-ffa450edef68
* PR:Glen Mazza2004-08-042-12/+0
| | | | | | | | | | | | Obtained from: Submitted by: Reviewed by: Start of conversion of AddLMVisitor to FObj.AddLayoutManager(): removed acceptVisitor() methods from FO's that don't need LM's (e.g., those FO's not yet implemented or those that don't return areas anyway). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197854 13f79535-47bb-0310-9956-ffa450edef68
* PR:Glen Mazza2004-08-031-1/+4
| | | | | | | | | | Obtained from: Submitted by: Reviewed by: New Batik library and updated SVGElement to handle it. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197852 13f79535-47bb-0310-9956-ffa450edef68
* 1.) Moved from FOPException to SAXParseException for addProperties()Glen Mazza2004-08-012-4/+4
| | | | | | | | | 2.) FONode: locator object added, its three components (file, line, col) removed 3.) FONode: new attributeError() method created for attribute problems in input FO. 4.) Removed some setup() methods in the FO's, placed them in addProperties() instead. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197847 13f79535-47bb-0310-9956-ffa450edef68
* Removed the FOTreeVisitor interface in favor of a moreGlen Mazza2004-07-276-18/+18
| | | | | | | | direct connection to (the subclassable) AddLMVisitor in the FO's. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197845 13f79535-47bb-0310-9956-ffa450edef68
* Switch from IllegalArgumentException to SAXParseException for errors found ↵Glen Mazza2004-07-271-1/+4
| | | | | | in the input FO. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197843 13f79535-47bb-0310-9956-ffa450edef68
* Renamed end() method to somewhat clearer endOfNode().Glen Mazza2004-07-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197842 13f79535-47bb-0310-9956-ffa450edef68
* Renamed FONode.addChild() to somewhat clearer FONode.addChildNode().Glen Mazza2004-07-242-10/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197821 13f79535-47bb-0310-9956-ffa450edef68
* 1.) Moved the SAXParser-creating method from FOFileHandler to ↵Glen Mazza2004-07-202-4/+32
| | | | | | | | | | | | | | | CommandLineOptions, the latter being the class directly using it. 2.) Decoupled the SVG classes from apps.FOFileHandler, the SVG classes for some reason want a string containing a name of a SAXParser. We'll need to look in the future for the actual need for this--normally error messages are done by the caller, not the callee. It would appear that Batik can generate a SAXParser name by default, and use that when not explicitly overridden by the caller. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197804 13f79535-47bb-0310-9956-ffa450edef68