forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <sju...@mac.com>
Subject Re: i18n/dispatcher: language selection contract
Date Mon, 18 Sep 2006 10:32:36 GMT
Den 15. sep. 2006 kl. 13.37 skrev Sjur Moshagen:

> On to the next step:-)

In the project sitemap, I'm trying to match on the filename and the  
locale, none of which works. The following sitemap snippet works:

     <map:pipeline>
       <map:match pattern="**.languages.xml">
           <map:generate src="cocoon://{1}.xml" />
           <map:transform src="{properties:resources.stylesheets}/ 
document-to-languages.xsl" />
           <map:serialize encoding="UTF-8" type="xml"/>
       </map:match>
     </map:pipeline>


This snippet does not work (slightly more complex matching):

     <map:pipeline>
       <map:match pattern="**/*.languages.xml">
           <map:generate src="cocoon://{1}/{2}.xml" />
           <map:transform src="{properties:resources.stylesheets}/ 
document-to-languages.xsl" />
           <map:serialize encoding="UTF-8" type="xml"/>
       </map:match>
     </map:pipeline>

This neither (simple matching followed by i18n matching):

     <map:pipeline>
       <map:match pattern="**.languages.xml">
         <map:match type="i18n" pattern="{1}.*.xml">
           <map:generate src="cocoon://{../1}.xml" />
           <map:transform src="{properties:resources.stylesheets}/ 
document-to-languages.xsl" />
           <map:serialize encoding="UTF-8" type="xml"/>
         </map:match>
       </map:match>
     </map:pipeline>


Both the last two sitemaps causes the following error:

Resource Not Found

Message: Resource Not Found

Description: The requested resource "/index.languages.xml" could not  
be found

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Apache Cocoon 2.2.0-dev



I can't see what I'm doing wrong here. Both the failing snippets  
should be standard and straightforward matching.

Sjur


Mime
View raw message