Martin,
I tracked this down to a but in the Java processor, which was only exposing declared inputs. I checked in a fix, which should make it soon to an unstable build.
-Erik
Martin Schulte wrote:
Hi Eric!
addInput() is called when the pipeline engine is connecting inputs to outputs, so this should allow you at runtime to know exactly all the inputs that are connected. This is the mechanism used by the XSLT processor, for example, to get additional inputs.
This is as opposed to getInputsInfo(), which returns the InputInfo declared statically by the processor.
When exactly are you calling getInputs()? Maybe you are calling the method prior to the processor being conneced.
Here is a snipplet from my code: public ListInput() { addInputInfo( new ProcessorInputOutputInfo( "required-input" ) ); addOutputInfo( new ProcessorInputOutputInfo( "list" ) ); }
public void generateList( PipelineContext pipelineContext, ContentHandler contentHandler ) { try { Map inputMap = getInputs(); Set keySet = inputMap.keySet(); Iterator it = keySet.iterator(); contentHandler.startDocument(); contentHandler.startElement( "", "inputs", "inputs", new AttributesImpl() ); while ( it.hasNext() ) { String inputName = (String)it.next(); addStringElement( contentHandler, "input", inputName ); logger.debug( "generateList: input="+inputName ); } contentHandler.endElement( "", "inputs", "inputs" ); contentHandler.endDocument(); } catch ( Exception e ) { throw new OXFException( e ); } }
and this is the except from my .xpl-file: <p:processor name="oxf:java"> <p:input name="config"> <config sourcepath="oxf:/" class="ListInput"/> </p:input> <p:input name="required-config"> <config> <name>Martin</name> </config> </p:input> <p:input name="optional-input" href="#instance"/> <p:output name="list" id="save-list"/> </p:processor>
Both in the log and in the output to what I forward the list I only see "required-input", not "optional-input".
The complete example is in the attached .jar-file (if you can read, please send me a note, Eric!).
Thanks a lot,
Martin
------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user
