Hi Cristopher,

I more used to version 2.2 but it should be the same. By you description I
think about creating a new pipeline with a matcher to handle the external
request with a specific error handler[1] that contains a reader with an
empty file.

It should be something like:

<map:pipeline type="caching">

  <map:match pattern="remote-handler/**">
    <map:reader src="http://remote-server/{1}"/>

    <map:reader src="empty.xml"/>


Then you could substitute all your calls to external resources that needs
to produce an empty XML in case of error to call to the new matcher. This
way you can tune up the external pipeline for caching if it's needed.

I hope it helps.



2016-06-01 19:56 GMT+02:00 Christopher Schultz <ch...@christopherschultz.net

> Hash: SHA1
> All,
> Using Cocoon 2.1, I've got an aggregate generator like this:
>   <map:match pattern="foo.html">
>     <map:aggregate element="bar">
>       <map:part src="/path/to/main.xml" />
>       <map:part src="http://remote-server/baz.xml"; />
>     </map:aggregate>
>     ...
>   </map:match>
> There are times when "remote-server" is not available and I'd like to
> basically include nothing at that location within the aggregate document
> .
> Can I do that within the <map:aggregate> or <map:part> elements, or is
> it better to wrap the <map:part> another <map:match> with an error
> handled?
> Followup question: how can I configure an error handler to do whatever
> I want? I only want this particular behavior to happen for this
> particular <map:part> ... presumably, I'll want other behavior in
> other situations.
> Thanks,
> - -chris
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> iEYEARECAAYFAldPIeUACgkQ9CaO5/Lv0PBW7wCfZtyG7w8bcgOuVn80V4NZtxoy
> n10AnAtqYx0F2uHml7wbEPh4Bg9G3s3Y
> =aPSk
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to