Hi,
I use a fileexistsaction which checks if a file exists and if it doesn't it
substitutes a parameter with a default name.
snap from my sitemap:
<map:match pattern="annotation/**.xml">
<map:act type="fileexists" src="docs/annotation/{1}.xml">
<map:parameter name="default"
value="docs/annotation/default.xml"/>
<map:generate src="{the-file}"/>
</map:act>
<map:serialize/>
</map:match>
HTH,
Michael Homeijer
-----Original Message-----
From: Simone Gianni [mailto:[EMAIL PROTECTED]]
Sent: zaterdag 20 oktober 2001 17:47
To: [EMAIL PROTECTED]
Subject: If file exists
Hi all ..
.. sorry .. today I'm flooding this mailing list :))
I would like to know if there is a way to make something if a given
file
exists.
Actually i'm doing a lot of content aggregations, and i'm searching
a way
to aggregate a document only if the given document is there. I've tried to
put it on a different pipe, then aggregate it with
"cocoon:/thepipe/etc../etc..", but if the generator of the subpipe doesn't
find the document it drops both the subpipe and the aggregation.
Thanks, and ciao ..
Simone
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
FileExistsAction.java
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>