Le mardi 08 f�vrier 2005 � 14:16 +0100, Erik Bruchez a �crit :
> Eric van der Vlist wrote:
>
> > In the Java API spec, you say:
> >
> > 4.3. Declaring Inputs and Outputs
> > The processor must declare its inputs and outputs. This is done in the
> > default constructor by calling the addInputInfo and addOutputInfo
> > methods and passing an object of type ProcessorInputOutputInfo.
> >
> > However, that's not always the case and some processors (including the
> > pipeline processor) are able to use dynamic inputs and outputs.
>
> Yes, this text is out of date. I just checked in a change to the doc to
> make it less confusing.
Where can I get and/or see it?
>
> In fact the API and documentation should be updated to reflect better
> the current possibilities:
>
> o Mandatory static inputs / outputs
> o Optional static inputs / outputs
> o Dynamic inputs / outputs
>
> > I'll need the same kind of feature...
> >
> > Can you point me on either a documentation or an example of
> > implementation to get me started?
>
> For dynamic inputs, it's easy: you just don't declare them in the
> constructor. But then you can still use the readInputXxx() API.
>
> For dynamic outputs, you deal with it in your createOutput() method.
>
> See JavaProcessor.java for examples. This processor has only dynamic
> inputs and outputs, except for the "config" input.
>From what I see, the thing would be:
* Derive a processor from ProcessorImpl.
* The actions (since there will be outputs) will be triggered
through the createOutput() method that expects a ProcessorOutput
object.
* This return object can be derived from
ProcessorImpl.ProcessorOutputImpl and the only abstract method
which is abstract and requires to be overloaded (if you have no
dynamic outputs) is readImpl that sends the output as a stream
of SAX events --the delegation processor doesn't overload any
other methods.
* The other methods to overload in
ProcessorImpl.ProcessorOutputImpl seem to deal with dynamic
outputs, cache and validation and I don't find it obvious to
guess their roles from the code. Could you briefly explain what
they are used for?
BTW, is the SimpleProcessor class deprecated or just reserved for simple
cases with only static outputs?
Thanks,
Eric (sorry to ask so many questions, but the doc is outdated and the
comments are sparse!)
--
Carnet web :
http://eric.van-der-vlist.com/blog?t=category&a=Fran%C3%A7ais
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user