On Mon, 2006-09-18 at 13:32 +0300, Sjur Moshagen wrote: > 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" />
This should work in all sub dir. Meaning {$xdocs}/index.de.xml will not match since there is no "/" in the path. {$xdocs}/sample/index.de.xml should match. > <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"> Never used the <map:match type="i18n"/> Can you point us to the docu? Need to go now. salu2 > <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 > -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)