-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Javier,

On 6/1/16 3:19 PM, Javier Puerto wrote:
> 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:match>
> 
> <map:handle-errors> <map:reader src="empty.xml"/> 
> </map:handle-errors>
> 
> </map:pipeline>
> 
> 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.

Thanks.

How can I reference a matcher from a different pipeline? Do I need to
address it any differently than I would if the matcher were in the
same pipeline?

Speaking of caching, I'd prefer for the "remote-handler" matcher to
re-try pretty regularly. Do matchers cache at all under normal
circumstances? I've never bothered attempting to configure any caching
in Cocoon before.

Thanks,
- -chris

> 2016-06-01 19:56 GMT+02:00 Christopher Schultz 
> <ch...@christopherschultz.net
> <mailto:ch...@christopherschultz.net>>:
> 
> 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
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> <mailto:users-unsubscr...@cocoon.apache.org> For additional
> commands, e-mail: users-h...@cocoon.apache.org 
> <mailto:users-h...@cocoon.apache.org>
> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXUDY/AAoJEBzwKT+lPKRY7TcP/jxbYNldkn7MFFwKKR9SYtEd
Ow6XBZ/dTyXhrcSWz9lyOulZ2/WqHpar7S1jwPmYSx+Ga9FOlWghU+5CYI3Ohovi
R+v44GTLaydwp2QnqG7sEXl3l2UxY83pzGl/1ae5M5BTULPdkM8LTRNl1U1bssAC
W2BY2ScSv5g8psLLc7dKOCfY7QQqwz84M6YVzorLsUJ96NETvuKn2yvWoYYs+iuX
LZrFTRWDwbWxedm5fArFoNYd1uYgslvc4Ua7sZbv3qLimy8ms1h61vABbI/bUcwM
M2JxXIgOAsMc7MGVuw5jjZQOSvg7S/8H/QUPQ+BflXlEBkaZNnz0RFN7wTGgEjVl
fzdyY9FF9QxVQysfyaFquJqZCbvIRy1c7vpzpG5B3NXVm92ZFrfVgOr1vFb4tcY2
nR7FQoCZ2ZuHtNcPgyNhk2MpHtjkj14mFq0jIyxzRu/A6Ltd//pyw7cGosP7xzFn
+12KdigPK45nSRo7TOlSxv7RZ7FfYFwOj2UeXP/5xPoaWom5PoYemzSn7HULr4NM
MSX7v02Ndb0ZBKEn7O1YOLdQmaQTYGnTPP7zhJ2jaccHAxz5RmbjWR2r0EE3MtdO
6Gu2KC/PqiIJF3qM6l/xcLHRRSilh+Xl/qu/0cUIGbzWtgAfkkZAWP42DT/pzA/o
I0gdBU+WWcqZaPCEFYcf
=89az
-----END PGP SIGNATURE-----

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

Reply via email to