cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Nofftz <alexan...@nofftz.name>
Subject Content negiation / fallback if document not found
Date Fri, 13 Jan 2006 16:51:04 GMT
Hi!

I want to do something like Apache Webserver's content negotiation using
MultiViews with Cocoon.

For example, I have documents like this:

  doc.de.xml
  doc.fr.xml
  doc.xml    (default language)

And want to do something like this:

  <map:act type="locale">
    <map:match pattern="doc">
      try {
        <map:generate src="doc.{../language}.xml"/>
      } catch (FileNotFoundException e) {
        <map:generate src="doc.xml"/>
      }
      <map:serialize/>
    </map:match>
  </map:act>

Is something like this possible?

Thanks in advance,
  Alex

-- 
Alexander Nofftz, Leverkusen, Germany, EU, Terra, Solar System
Alexander@Nofftz.name --- http://www.AlexNofftz.de/
Jabber: alexnofftz@amessage.de (Jabber?! http://de.wikipedia.org/wiki/Jabber)

Mime
View raw message