cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Daniel <alexander.dan...@gmx.at>
Subject Re: POST .xml
Date Mon, 18 Feb 2008 10:52:45 GMT
On 16.02.2008, at 12:32, nanomonk wrote:

> and I have pipeline with StreamGenerator:
> -----
> <map:match pattern="upload/setSettings">
> 	<map:generate type="stream">
> 		<map:parameter name="form-name" value="uploadfile"/>
> 		<map:parameter name="defaultContentType" value="text/xml"/>
> 	</map:generate>
> 	<map:serialize type="xml" />
> </map:match>
> -----
> all ok and in source of
> "http://localhost:8888/setSettings? 
> paramone=12345&paramtwo=blablabla" I see
> my .xml.
> But.. I need to get from it some data and process it... I think to  
> do that
> in .xsp. I need to take params of request and according them to do  
> some
> actions... But I don't know how to get DOM Document from this recieved
> .xml...


Maybe the XSLT Transformer can help you: The StreamGenerator reads XML  
from an HttpRequest InputStream and generates SAX Events [1]. After  
the StreamGenerator you can use an XSLT Transformer to transform the  
generated SAX Stream:

<map:match pattern="upload/setSettings">
	<map:generate type="stream">
		<map:parameter name="form-name" value="uploadfile"/>
		<map:parameter name="defaultContentType" value="text/xml"/>
	</map:generate>
         <map:transform src="transform.xslt">
                 <map:parameter name="paramone" value="{request- 
param:paramone}"/>
                 <map:parameter name="paramtwo" value="{request- 
param:paramtwo}"/>
	</map:transform>
	<map:serialize type="xml" />
</map:match>

Alex

[1] http://cocoon.apache.org/2.1/userdocs/stream-generator.html


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message