cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <Alfred.Nathan...@swx.com>
Subject RE: conditional cincludes?
Date Tue, 10 Jun 2003 20:34:53 GMT
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:joerg.heinicke@gmx.de]
> Sent: Dienstag, 10. Juni 2003 22:23
> To: cocoon-users@xml.apache.org
> 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: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
>

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: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message