You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Milo Hyson <mi...@cyberlifelabs.com> on 2003/04/30 01:16:41 UTC

Multi-source XML pipeline model

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 
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.

Thanks in advance. :)

-- 
Milo Hyson
CyberLife Labs



---------------------------------------------------------------------
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


Re: Multi-source XML pipeline model

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Milo Hyson wrote, On 30/04/2003 11.05:
> Nicola Ken Barozzi wrote:
> 
>> [In Cocoon]" All data transformed by the pipeline emanates from one 
>> place and has to be processed by the same set of transformations."
>>
>> This is not correct; Cocoon has aggregation, and conditions inside 
>> pipelines, and pipeline chanining... 
> 
> 
> My bad. The information on aggregation was not very prominently placed 
> in the Cocoon documentation. Having read that info now, and other 
> sources around the net, I see that Cocoon does indeed support the 
> multi-source model. However, the question now is can Cocoon be 
> integrated into a Servlet environment strictly as a presentation engine? 
> Looking around at places such as Cocoon Wiki, the answer seems to be no 
> -- at least not in the same manner as JSPs.
> 
>  From what I can tell, Cocoon can process the output from a Servlet 
> (either embedded within the Cocoon context or sourced from an external 
> URL), but it cannot execute within the context of an external Servlet. 

It can. Cocoon in an Avalon Component that can be used anywhere, and 
even not in servlets.

> It seems that, no matter what, Cocoon always executes within its own 
> application context (please correct me if I am wrong). What I'd like to 
> see is a lightweight version of Cocoon that can be embedded within a 
> Tomcat app to handle the view components. Any plans or available work on 
> something like this?

In fact we have now a bean and a cli environment in which Cocoon 
operates. Cocoon can even be used as a Servlet filter (IIRC we already 
have code for it).

I invite you to the Cocoon mailing lists so you can have all the info 
you need.

>> You start right on saying Cocoon is not correct and maybe need to 
>> maintain a new community project... I'd say it would be polite to ask 
>> Cocooners first. We (Cocooners) are very open to new ideas and proposals.
> 
> That's exactly why I posted what I did -- to gain feedback from those in 
> the know. Based on the information I had at the time (including 
> discussions with people who use Cocoon)

on cocoon-users mailing list?

, it appeared the multi-source
> model was not supported. Therefore, I took the proactive approach and 
> rolled-my-own-pipeline. It appears I did reinvent the wheel (at least 
> somewhat), thus the reason why I stopped work on XFormer until I could 
> discuss the matter further.

:-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
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


Re: Multi-source XML pipeline model

Posted by Bruno Dumon <br...@outerthought.org>.
On Wed, 2003-04-30 at 11:05, Milo Hyson wrote:
> Nicola Ken Barozzi wrote:
> 
> > [In Cocoon]" All data transformed by the pipeline emanates from one 
> > place and has to be processed by the same set of transformations."
> >
> > This is not correct; Cocoon has aggregation, and conditions inside 
> > pipelines, and pipeline chanining... 
> 
> My bad. The information on aggregation was not very prominently placed 
> in the Cocoon documentation. Having read that info now, and other 
> sources around the net, I see that Cocoon does indeed support the 
> multi-source model. However, the question now is can Cocoon be 
> integrated into a Servlet environment strictly as a presentation engine? 
> Looking around at places such as Cocoon Wiki, the answer seems to be no 
> -- at least not in the same manner as JSPs.
> 
>  From what I can tell, Cocoon can process the output from a Servlet 
> (either embedded within the Cocoon context or sourced from an external 
> URL), but it cannot execute within the context of an external Servlet. 
> It seems that, no matter what, Cocoon always executes within its own 
> application context (please correct me if I am wrong). What I'd like to 
> see is a lightweight version of Cocoon that can be embedded within a 
> Tomcat app to handle the view components.

Just handle the request in your own servlet and then forward it to
Cocoon (using the standard servlet mechanism:
RequestDispatcher.forward).

Alternatively, you could do the request-handling in a Cocoon "Action".

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: Multi-source XML pipeline model

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Milo Hyson wrote, On 30/04/2003 11.05:
> Nicola Ken Barozzi wrote:
> 
>> [In Cocoon]" All data transformed by the pipeline emanates from one 
>> place and has to be processed by the same set of transformations."
>>
>> This is not correct; Cocoon has aggregation, and conditions inside 
>> pipelines, and pipeline chanining... 
> 
> 
> My bad. The information on aggregation was not very prominently placed 
> in the Cocoon documentation. Having read that info now, and other 
> sources around the net, I see that Cocoon does indeed support the 
> multi-source model. However, the question now is can Cocoon be 
> integrated into a Servlet environment strictly as a presentation engine? 
> Looking around at places such as Cocoon Wiki, the answer seems to be no 
> -- at least not in the same manner as JSPs.
> 
>  From what I can tell, Cocoon can process the output from a Servlet 
> (either embedded within the Cocoon context or sourced from an external 
> URL), but it cannot execute within the context of an external Servlet. 

It can. Cocoon in an Avalon Component that can be used anywhere, and 
even not in servlets.

> It seems that, no matter what, Cocoon always executes within its own 
> application context (please correct me if I am wrong). What I'd like to 
> see is a lightweight version of Cocoon that can be embedded within a 
> Tomcat app to handle the view components. Any plans or available work on 
> something like this?

In fact we have now a bean and a cli environment in which Cocoon 
operates. Cocoon can even be used as a Servlet filter (IIRC we already 
have code for it).

I invite you to the Cocoon mailing lists so you can have all the info 
you need.

>> You start right on saying Cocoon is not correct and maybe need to 
>> maintain a new community project... I'd say it would be polite to ask 
>> Cocooners first. We (Cocooners) are very open to new ideas and proposals.
> 
> That's exactly why I posted what I did -- to gain feedback from those in 
> the know. Based on the information I had at the time (including 
> discussions with people who use Cocoon)

on cocoon-users mailing list?

, it appeared the multi-source
> model was not supported. Therefore, I took the proactive approach and 
> rolled-my-own-pipeline. It appears I did reinvent the wheel (at least 
> somewhat), thus the reason why I stopped work on XFormer until I could 
> discuss the matter further.

:-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Multi-source XML pipeline model

Posted by Milo Hyson <mi...@cyberlifelabs.com>.
Nicola Ken Barozzi wrote:

> [In Cocoon]" All data transformed by the pipeline emanates from one 
> place and has to be processed by the same set of transformations."
>
> This is not correct; Cocoon has aggregation, and conditions inside 
> pipelines, and pipeline chanining... 

My bad. The information on aggregation was not very prominently placed 
in the Cocoon documentation. Having read that info now, and other 
sources around the net, I see that Cocoon does indeed support the 
multi-source model. However, the question now is can Cocoon be 
integrated into a Servlet environment strictly as a presentation engine? 
Looking around at places such as Cocoon Wiki, the answer seems to be no 
-- at least not in the same manner as JSPs.

 From what I can tell, Cocoon can process the output from a Servlet 
(either embedded within the Cocoon context or sourced from an external 
URL), but it cannot execute within the context of an external Servlet. 
It seems that, no matter what, Cocoon always executes within its own 
application context (please correct me if I am wrong). What I'd like to 
see is a lightweight version of Cocoon that can be embedded within a 
Tomcat app to handle the view components. Any plans or available work on 
something like this?

> You start right on saying Cocoon is not correct and maybe need to 
> maintain a new community project... I'd say it would be polite to ask 
> Cocooners first. We (Cocooners) are very open to new ideas and proposals.

That's exactly why I posted what I did -- to gain feedback from those in 
the know. Based on the information I had at the time (including 
discussions with people who use Cocoon), it appeared the multi-source 
model was not supported. Therefore, I took the proactive approach and 
rolled-my-own-pipeline. It appears I did reinvent the wheel (at least 
somewhat), thus the reason why I stopped work on XFormer until I could 
discuss the matter further.

-- 
Milo Hyson
CyberLife Labs



---------------------------------------------------------------------
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


Re: Multi-source XML pipeline model

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Nicola Ken Barozzi wrote:
> This is not correct; Cocoon has aggregation, and conditions inside 
> pipelines, and pipeline chanining...

Don't forget XInclude and XSLT document(), although use of the latter
has issues which should be kept in mind.

J.Pietschmann


---------------------------------------------------------------------
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


Re: Multi-source XML pipeline model

Posted by Milo Hyson <mi...@cyberlifelabs.com>.
Nicola Ken Barozzi wrote:

> [In Cocoon]" All data transformed by the pipeline emanates from one 
> place and has to be processed by the same set of transformations."
>
> This is not correct; Cocoon has aggregation, and conditions inside 
> pipelines, and pipeline chanining... 

My bad. The information on aggregation was not very prominently placed 
in the Cocoon documentation. Having read that info now, and other 
sources around the net, I see that Cocoon does indeed support the 
multi-source model. However, the question now is can Cocoon be 
integrated into a Servlet environment strictly as a presentation engine? 
Looking around at places such as Cocoon Wiki, the answer seems to be no 
-- at least not in the same manner as JSPs.

 From what I can tell, Cocoon can process the output from a Servlet 
(either embedded within the Cocoon context or sourced from an external 
URL), but it cannot execute within the context of an external Servlet. 
It seems that, no matter what, Cocoon always executes within its own 
application context (please correct me if I am wrong). What I'd like to 
see is a lightweight version of Cocoon that can be embedded within a 
Tomcat app to handle the view components. Any plans or available work on 
something like this?

> You start right on saying Cocoon is not correct and maybe need to 
> maintain a new community project... I'd say it would be polite to ask 
> Cocooners first. We (Cocooners) are very open to new ideas and proposals.

That's exactly why I posted what I did -- to gain feedback from those in 
the know. Based on the information I had at the time (including 
discussions with people who use Cocoon), it appeared the multi-source 
model was not supported. Therefore, I took the proactive approach and 
rolled-my-own-pipeline. It appears I did reinvent the wheel (at least 
somewhat), thus the reason why I stopped work on XFormer until I could 
discuss the matter further.

-- 
Milo Hyson
CyberLife Labs



Re: Multi-source XML pipeline model

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Milo Hyson wrote, On 30/04/2003 1.16:
> I've been researching the use of XML processing pipelines in large-scale 
> projects. Not finding anything that met my needs (Cocoon included)

I've read the paper, and there are some things I don't understand:

[In Cocoon]" All data transformed by the pipeline emanates from one 
place and has to be processed by the same set of transformations."

This is not correct; Cocoon has aggregation, and conditions inside 
pipelines, and pipeline chanining...

...
>  Please let me know
> 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.

You start right on saying Cocoon is not correct and maybe need to 
maintain a new community project... I'd say it would be polite to ask 
Cocooners first. We (Cocooners) are very open to new ideas and proposals.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Multi-source XML pipeline model

Posted by Peter Blakeley <de...@coolcat.com.au>.
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" >
		<template>cat-list-http.vm</template>
	</process>
	<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" >
		<template>cat-item-http.vm</template>
	</process>
	<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" >
		<template>order-edit-http.vm</template>
	</process>
	<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>		
		<switch xpath="//form/[flow = 'itemcat']" >
			<connect listener="tplates/catItemTPlate" listener-port="IN" />	
		</switch>		
		<switch xpath="//form/[flow = 'orderedit']" >
			<connect listener="tplates/orderEditTPlate" listener-port="IN" />	
		</switch>		

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

</process-group>



> 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

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

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

INTERNET
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


Re: Multi-source XML pipeline model

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Milo Hyson wrote, On 30/04/2003 1.16:
> I've been researching the use of XML processing pipelines in large-scale 
> projects. Not finding anything that met my needs (Cocoon included)

I've read the paper, and there are some things I don't understand:

[In Cocoon]" All data transformed by the pipeline emanates from one 
place and has to be processed by the same set of transformations."

This is not correct; Cocoon has aggregation, and conditions inside 
pipelines, and pipeline chanining...

...
>  Please let me know
> 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.

You start right on saying Cocoon is not correct and maybe need to 
maintain a new community project... I'd say it would be polite to ask 
Cocooners first. We (Cocooners) are very open to new ideas and proposals.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
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