> Date: Fri, 21 Dec 2007 11:36:00 +0100
> From: [EMAIL PROTECTED]
> 
> Hi,
> 
> I have the following xml stream
> 
> 
>     ...
>     ....
> 
> 
> I'd like to call my WFS transformer which make a call to a 
> WebFeatureService with  xml stream in parameters, and 
> keep  tag in the response.
> 
> th reponse should be :
> 
>        ...
>          xml response of WFS web service
> 
> 
> How can i write my sitemap to do that ?
> Transform a subset of xml stream ?

Nothing special so far as the sitemap goes, I'd say, just include your 
transformer in the pipeline under the appropriate matcher.
The "trick" is in the coding of your WFS transformer - by default have
all the received events passed straight through to the registered
consumer, until you receive a startElement for the wfs:GetFeature.
At that point, start recording the subsequent events (i.e. the contents
of the element) to a buffer or whatever, until there's an endElement
for wfs:GetFeature.  At that point you call your WebFeatureService
with the recorded parameters then send the consumer the
appropriate event stream for the results instead of the original
GetFeature element, in this case the wfs:featureCollection.

Nothing unusual there, many of the existing transformers work the
same way; everything gets passed through until a specific
namespace and/or element is encountered, at which point they
start recording the stream for later processing.  Some of them
have a number of triggering elements, with a field to store the
current state i.e. which of several buffers should currently be used
for the recording.


Andrew.
-- 
http://pseudoq.sourceforge.net/  Open source Java Sudoku app

> 
> thanks  for help !
>    
> 
> -- 
> Sébastien Geindre
> DPREVI/AERO/DEV
> sebastien.geindre __at__ meteo.fr

_________________________________________________________________
Get Hotmail on your mobile, text MSN to 63463!
http://mobile.uk.msn.com/pc/mail.aspx
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to