Sjur Moshagen wrote: > skrev Sjur Moshagen: > > >1) it would be nice if it could return all available locales for > >the matching document in a sitemap parameter. As it is now, I need > >to do some sitemap magic to aggregate the list of all candidate > >documents, then process the aggregation and finally deliver the > >result. This is error prone and slow, compared to returning a list > >of found documents by a Java component that needs to do the job > >anyway. > > That sitemap magic wasn't that easy:-( > > The idea was to use the directory generator to get a listing of all > files matching the pattern {RequestDoc}.{Locale}.{Extension}. > > The bad thing is that it does not seem the directory generator is > included in Forrest: > > Internal Server Error > > Message: null > > Description: No details available. > > Sender: org.apache.cocoon.servlet.CocoonServlet > > Source: Cocoon Servlet > > Request URI > > index.languages.xml > cause > > Type 'directory' does not exist for 'map:generate' at file:/Users/ > sjur/Documents/i18n/sd/src/documentation/sitemap.xmap:97:52 > request-uri > > /index.languages.xml > > > The directory generator would have given me a nice xml snippet > containing all and only localised file, from which I easily could > have extracted the needed info. Any suggestions on an alternative route?
Perhaps you need to declare the DirectoryGenerator in your project sitemap. See examples in main/webapp/revisions.xmap and i18n.xmap -David