cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Homeijer <M.Homei...@devote.nl>
Subject Implementing FileExistSelector
Date Thu, 09 Aug 2001 10:07:21 GMT
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message