cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Claude Vogel" <vogel.jeancla...@gmail.com>
Subject Re: Custom DOM transformer
Date Mon, 19 Nov 2007 14:11:53 GMT
Thank you, effectively it was just a mistake during my drag and drop to
write my email.

The true code is :
        <map:pipeline>
            <map:match pattern="tentative">
                <map:generate type="stream">
                    <map:parameter name="defaultContentType"
value="text/xml"/>
                </map:generate>
                <map:transform type="testTransformer" />
                <map:serialize type="xml"/>
            </map:match>
        </map:pipeline>

My sitemap contains other pipelines which I don't show here, that's why I
have a matcher.

I tried to remove the transformer to keep just :
        <map:pipeline>
            <map:match pattern="tentative">
                <map:generate type="stream">
                    <map:parameter name="defaultContentType"
value="text/xml"/>
                </map:generate>
                <map:serialize type="xml"/>
            </map:match>
        </map:pipeline>

Effectively, I have the same problem : no XML stream in the http response.
Like said before, I am sure that the body of my incoming HTTP request
contains an XML stream (when I let the "testTransformer" in the pipe I can
log the incoming XML stream).

I am not able to understand where is my mistake and why the HTTP response
body stays empty.

2007/11/16, solprovider@apache.org < solprovider@apache.org>:
>
> The two examples are functionally equivalent.   Both pipelines would
> error without the pattern="tentative" match: the former because no
> pipeline match is found and the latter because no Serializer is
> called.  The map:match element is irrelevant because the match must be
> assumed and no numbered parameters are being set.
>
> This would be fine as the "concerned extract":
>         <map:pipeline>
>             <map:generate type="stream">
>                 <map:parameter name="defaultContentType"
> value="text/xml"/>
>             </map:generate>
>             <map:transform type="testTransformer" />
>             <map:serialize type="xml"/>
>         </map:pipeline>
>
> We should assume the match is for code outside the current concern and
> remained because the OP forgot to remove it as irrelevant.  The
> "mistake" was providing too much code.
>
> solprovider
>
>
> On 11/16/07, warrell harries < warrell.harries@googlemail.com> wrote:
> > Surely some mistake (probably a typo) but your pipeline should be :-
> > <map:pipeline>
> > <map:match pattern="tentative">
> >    <map:generate type="stream">
> >        <map:parameter name="defaultContentType" value="text/xml"/>
> >      </map:generate>
> >     <map:transform type="testTransformer" />
> >     <map:serialize type="xml"/>
> >  </map:match>
> > </map:pipeline>
> >
> > On 16/11/2007, Jean-Claude Vogel <vogel.jeanclaude@gmail.com > wrote:
> > > Here is the concerned extract of my sitemap :
> > >         <map:pipeline>
> > >             <map:generate type="stream">
> > >                 <map:parameter name="defaultContentType"
> > value="text/xml"/>
> > >             </map:generate>
> > >             <map:match pattern="tentative">
> > >                 <map:transform type="testTransformer" />
> > >                 <map:serialize type="xml"/>
> > >             </map:match>
> > >         </map:pipeline>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Mime
View raw message