xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Blakeley <...@coolcat.com.au>
Subject Re: Multi-source XML pipeline model
Date Wed, 30 Apr 2003 08:18:59 GMT
Milo Hyson wrote:
> I've been researching the use of XML processing pipelines in large-scale 
> projects. Not finding anything that met my needs (Cocoon included), I 
> started experimenting with my own ideas. I've recently published a 
> whitepaper discussing my studies and would like to see what the 
> community has to say. Please take a look at 
> http://projects.cyberlifelabs.com/xformer and let me know whether or not 
> I'm on crack (I usually am, figuratively speaking). Please let me know 

I have been working on something that similar, in essence independent 
process that waits for data from one or more sources, process it and 
pass it on. I have not just focused on XML data but any data. You push a 
piece of data into a named slot and it is up to the process to decide 
whether to process the data and send it on. The inputs and outputs are 
configurable and not know to the process. I modeled it on a simplistic 
understanding of a neuron.

The process is an interface and therefore can be anything, I am aiming 
to have the process be a scripts, velocity template, XLST 
Transformation, file writer, file reader, database reader writer query etc..
Process can be grouped and nested. Eventually a process group could be 
use as a libry object for black box operation.

This is still very expermental and I am converting it to run on Avalon 
but it might give you some ideas.

below is a fragment of a process config file

<process-group name="http-tplates" 
className="attain.nox.flow.DefaultProcessGroup" trace="false" spawn="1">

	<in-port name="IN" className="org.dom4j.Document" />
	<out-port name="OUT" className="java.lang.Boolean" />
	<out-port name="ERROR" className="java.lang.Exception" />

<!-- #NOTE: velocity.Template produces output as a String -->

	<process name="catListTPlate" 
className="attain.nox.flow.velocity.Template" trace="false" >
	<connect source="catListTPlate" source-port="ERROR" listener="." 
listener-port="ERROR" />						
	<connect source="catListTPlate" source-port="OUT" listener="." 
listener-port="OUT" />	
	<process name="catItemTPlate" 
className="attain.nox.flow.velocity.Template" trace="false" >
	<connect source="catItemTPlate" source-port="ERROR" listener="." 
listener-port="ERROR" />					
	<connect source="catItemTPlate" source-port="OUT" listener="." 
listener-port="OUT" />		
	<process name="orderEditTPlate" 
className="attain.nox.flow.velocity.Template" trace="false" >
	<connect source="orderEditTPlate" source-port="ERROR" listener="." 
listener-port="ERROR" />				
	<connect source="orderEditTPlate" source-port="OUT" listener="." 
listener-port="OUT" />			

	<process name="switch" className="attain.nox.flow.xml.XPathSwitch" 
trace="false" >

		<switch xpath="//form/[flow = 'listcat']" >
			<connect listener="tplates/catListTPlate" listener-port="IN" />	
		<switch xpath="//form/[flow = 'itemcat']" >
			<connect listener="tplates/catItemTPlate" listener-port="IN" />	
		<switch xpath="//form/[flow = 'orderedit']" >
			<connect listener="tplates/orderEditTPlate" listener-port="IN" />	

	<connect source="switch" source-port="ERROR" listener="." 
listener-port="ERROR" />			
	<connect source="." source-port="IN" listener="switch" 
listener-port="IN" />				


> if I'm reinventing the wheel as I'd rather use a more mature existing 
> framework than have to begin maintaining a new community project -- I 
> will if necessary.

Peter Blakeley - Attain Consultants - mobile: 0427-723-814

Virus-Protection, Firewalls, Auditing, Upgrades, Repairs, Troubleshooting

Windows 2000, XP, Design, Setup, Management, Troubleshooting	

Web site design, Java programming, JEE2, JSP, Servlets, RMI, EJB, XML, 
Workflow, Accounting, Web Services

[ attainconsult.com ]
[ coolcat.com.au ]

"Why open source? because I prefer to surf the wave to the beach rather 
than swim all the way in."

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message