You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Vincent Hennebert <vh...@gmail.com> on 2009/10/28 12:09:24 UTC

Re: svn commit: r830476 - in /xmlgraphics/fop/trunk/src/java: META-INF/services/org.apache.fop.events.model.EventModelFactory org/apache/fop/accessibility/AccessibilityEventProducer.java

> Author: jeremias
> Date: Wed Oct 28 09:09:55 2009
> New Revision: 830476
> 
> URL: http://svn.apache.org/viewvc?rev=830476&view=rev
> Log:
> Added missing EventModelFactory to avoid error:
>   java.lang.IllegalStateException: Event model doesn't contain the definition for org.apache.fop.accessibility.AccessibilityEventProducer
> 
> Modified:
>     xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
>     xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java

How was I supposed to know that those files needed to be modified? Where
is the documentation for that? I took the FOValidationEventProducer
interface as a model and it didn’t have that EventModelFactory
sub-class. And when I tested my change by crafting an input file that
would trigger the event I didn’t get that IllegalStateException. I just
got the error message relating to the event as expected. The reason why
still is a mystery for me.


Vincent

Re: svn commit: r830476 - in /xmlgraphics/fop/trunk/src/java: META-INF/services/org.apache.fop.events.model.EventModelFactory org/apache/fop/accessibility/AccessibilityEventProducer.java

Posted by Simon Pepping <sp...@leverkruid.eu>.
On Wed, Oct 28, 2009 at 12:07:20PM +0000, Vincent Hennebert wrote:
> Jeremias Maerki wrote:
> > http://xmlgraphics.apache.org/fop/trunk/events.html#event-model
> > 
> > "For a given application, there can be multiple event models active at
> > the same time. In FOP, each renderer is considered to be a plug-in and
> > provides its own specific event model. The individual event models are
> > provided through an EventModelFactory. This interface is implemented for
> > each event model and registered through the service provider mechanism
> > (see the plug-ins section for details)."
> 
> Ok. Maybe that???s just me, but after reading that section, I still fail
> to understand what an ???event object model??? is. And since that section
> starts by explaining implementation details (names of parameters not
> provided by the JVM, need of QDox), I???m inclined to skip it all. After
> all, I???m not a developer, but a user of the library.
> 
> 
> > And http://xmlgraphics.apache.org/fop/trunk/events.html#plug-ins
> 
> That section starts with ???The event subsystem is extensible.??? I don???t
> want to extend it, I just want to use it!
> 
> And nowhere is it written that something must also be added to the build
> file. This is all confusing.

I agree with the observation that the documentation is not well suited
to FOP developers who want to add events. I would like to see a 'howto
add one or more events' document. The documentation page on the web
site http://xmlgraphics.apache.org/fop/trunk/events.html stops too
early. For me it was about sufficient, but only because I decided to
reuse one of the event producers and added my message to the catch all
EventFormatter.xml file. Even so, I had problems getting my event file
rebuilt. Preferably the documentation page has a short and a longer
writeup, without an explanation of the philosophy. It would probably
also be good to have such a document for those who want to extend the
system.

Until now we were saved by the fact that Jeremias is around to check
our actions, but we should be able to add events even without him, and
we are not yet there.

Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

Re: svn commit: r830476 - in /xmlgraphics/fop/trunk/src/java: META-INF/services/org.apache.fop.events.model.EventModelFactory org/apache/fop/accessibility/AccessibilityEventProducer.java

Posted by Vincent Hennebert <vh...@gmail.com>.
Jeremias Maerki wrote:
> http://xmlgraphics.apache.org/fop/trunk/events.html#event-model
> 
> "For a given application, there can be multiple event models active at
> the same time. In FOP, each renderer is considered to be a plug-in and
> provides its own specific event model. The individual event models are
> provided through an EventModelFactory. This interface is implemented for
> each event model and registered through the service provider mechanism
> (see the plug-ins section for details)."

Ok. Maybe that’s just me, but after reading that section, I still fail
to understand what an ‘event object model’ is. And since that section
starts by explaining implementation details (names of parameters not
provided by the JVM, need of QDox), I’m inclined to skip it all. After
all, I’m not a developer, but a user of the library.


> And http://xmlgraphics.apache.org/fop/trunk/events.html#plug-ins

That section starts with “The event subsystem is extensible.” I don’t
want to extend it, I just want to use it!

And nowhere is it written that something must also be added to the build
file. This is all confusing.

But I guess I shall feel free to improve it as I see fit.


Sorry for the rant, but I had to get that off my chest.
Vincent


> On 28.10.2009 12:09:24 Vincent Hennebert wrote:
>>> Author: jeremias
>>> Date: Wed Oct 28 09:09:55 2009
>>> New Revision: 830476
>>>
>>> URL: http://svn.apache.org/viewvc?rev=830476&view=rev
>>> Log:
>>> Added missing EventModelFactory to avoid error:
>>>   java.lang.IllegalStateException: Event model doesn't contain the definition for org.apache.fop.accessibility.AccessibilityEventProducer
>>>
>>> Modified:
>>>     xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
>>>     xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java
>> How was I supposed to know that those files needed to be modified? Where
>> is the documentation for that? I took the FOValidationEventProducer
>> interface as a model and it didn’t have that EventModelFactory
>> sub-class. And when I tested my change by crafting an input file that
>> would trigger the event I didn’t get that IllegalStateException. I just
>> got the error message relating to the event as expected. The reason why
>> still is a mystery for me.
>>
>>
>> Vincent
> 
> 
> 
> 
> Jeremias Maerki
> 

Re: svn commit: r830476 - in /xmlgraphics/fop/trunk/src/java: META-INF/services/org.apache.fop.events.model.EventModelFactory org/apache/fop/accessibility/AccessibilityEventProducer.java

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
http://xmlgraphics.apache.org/fop/trunk/events.html#event-model

"For a given application, there can be multiple event models active at
the same time. In FOP, each renderer is considered to be a plug-in and
provides its own specific event model. The individual event models are
provided through an EventModelFactory. This interface is implemented for
each event model and registered through the service provider mechanism
(see the plug-ins section for details)."

And http://xmlgraphics.apache.org/fop/trunk/events.html#plug-ins

On 28.10.2009 12:09:24 Vincent Hennebert wrote:
> > Author: jeremias
> > Date: Wed Oct 28 09:09:55 2009
> > New Revision: 830476
> > 
> > URL: http://svn.apache.org/viewvc?rev=830476&view=rev
> > Log:
> > Added missing EventModelFactory to avoid error:
> >   java.lang.IllegalStateException: Event model doesn't contain the definition for org.apache.fop.accessibility.AccessibilityEventProducer
> > 
> > Modified:
> >     xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
> >     xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java
> 
> How was I supposed to know that those files needed to be modified? Where
> is the documentation for that? I took the FOValidationEventProducer
> interface as a model and it didn’t have that EventModelFactory
> sub-class. And when I tested my change by crafting an input file that
> would trigger the event I didn’t get that IllegalStateException. I just
> got the error message relating to the event as expected. The reason why
> still is a mystery for me.
> 
> 
> Vincent




Jeremias Maerki