Or cinclude another pipeline match to return a XML dummy file

<cinclude src="cocoon:/maybeexists/foo.xml"/>

<map:match pattern="maybeexists/**">
  <map:act type="resource-exists" src="{1}">
     <map:generate type="file" src="{../1}"/>
     <map:serialize type="xml"/>
  </map:act>
  <map:generate type="file" src="notfound.xml"/>
  <map:serialize type="xml"/>
</map:match>

HTH, Alfred (preferring cinclude over xinclude).

> -----Original Message-----
> From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
> Sent: Dienstag, 10. Juni 2003 22:23
> To: [EMAIL PROTECTED]
> Subject: Re: conditional cincludes?
> 
> 
> Hello Luke,
> 
> you can either use the DirectoryGenerator or the new 
> implementation of 
> XInclude in Cocoon 2.1 having a fallback element.
> 
> Joerg
> 
> Luke Penca wrote:
> > How do I check for the instance of a file before attempting 
> to cinclude 
> > it?  Basically, I don't want the pipeline to die if the 
> file isn't found.
> > 
> > Thanks,
> > 
> > Luke.....
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to