In a part of the sitemap I want to check if a requested file exists,
if it doesn't i want to return the contents of a default file.

Is this the way I should implement something like that
or are the easier methods? :

<map:match pattern="annotation\*"
  <map:select type="fileexists">
     <map:parameter name="filename" value="annotation\{1}"/>

     <map:when test="fileexists">
          <map:generate src="annotation\{1}"/>
     </map:when>
     <map:otherwise>
         <map:generate src="annotation\default.xml"/>
      </map:otherwise>
  </map:select>
  <map:transform src="annotation.xsl"/>
</map:match>

---------------------------------------------------------------------
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]>

Reply via email to