On Tue, 2009-07-14 at 14:09 +0200, Andreas Hartmann wrote: > Hi Thorsten, > > Thorsten Scherler schrieb: > > I have a pub where I till now only added all functionality via modules > > and fallback implementation, meaning till now I do not have a sitemap in > > my pub since I extent from the default pub. > > > > Now I need to use the sitetree Module and with it I need to implement > > the match <map:match pattern="lenyabody-raw-*/*/*/*/*/*/**"/> to create > > my own aggregate of the site. Till now that is the only link that I > > need. > > > > However when I create a sitemap with only this link the pub fails since > > it is loosing the template sitemap. > > are you mounting the parent publication sitemap at the end of your > custom sitemap? > > <map:match pattern="**"> > <map:mount uri-prefix="" src="template-fallback://sitemap.xmap"/> > </map:match> > > There are some issues with mounting sitemaps using the fallback > protocol, but IIRC I got this to work once :)
Hmm, I tried with following sitemap: <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <map:pipelines> <map:pipeline> <map:match pattern="*/**"> <map:mount uri-prefix="{1}" src="fallback://sitemap.xmap"/> </map:match> <map:match pattern="*"> <map:mount uri-prefix="" src="fallback://sitemap.xmap"/> </map:match> </map:pipeline> </map:pipelines> </map:sitemap> but I get: 2009-07-15 01:10:10,268 [SocketListener0-9] ERROR sitemap.handled-errors - Sitemap: error when calling sub-sitemap at <map:mount> - file:///home/thorsten/src/apache/apache-lenya-2.0.2-src/build/lenya/webapp/lenya/pubs/festivales/sitemap.xmap:27:68 at <map:mount> - file:///home/thorsten/src/apache/apache-lenya-2.0.2-src/build/lenya/webapp/global-sitemap.xmap:343:116 at <map:mount> - file:///home/thorsten/src/apache/apache-lenya-2.0.2-src/build/lenya/webapp/sitemap.xmap:680:106 org.apache.cocoon.ProcessingException: Sitemap: error when calling sub-sitemap at <map:mount> - file:///home/thorsten/src/apache/apache-lenya-2.0.2-src/build/lenya/webapp/lenya/pubs/festivales/sitemap.xmap:27:68 at <map:mount> - file:///home/thorsten/src/apache/apache-lenya-2.0.2-src/build/lenya/webapp/global-sitemap.xmap:343:116 at <map:mount> - file:///home/thorsten/src/apache/apache-lenya-2.0.2-src/build/lenya/webapp/sitemap.xmap:680:106 at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:113) ... Caused by: java.net.MalformedURLException: The path after the protocol must not be empty! at org.apache.lenya.cms.cocoon.source.FallbackUri.<init>(FallbackUri.java:60) at org.apache.lenya.cms.cocoon.source.FallbackSourceFactory.findSource(FallbackSourceFactory.java:166) at org.apache.lenya.cms.cocoon.source.FallbackSourceFactory.getSource(FallbackSourceFactory.java:129) Any idea? salu2 > > Good luck! > > -- Andreas > > > > > > I read in > > http://lenya.apache.org/docu20/reference/publications/publication-templating.html: > > "... > > If a sitemap is loaded from a template publication, it is very important > > that the sitemap is completely fallback-enabled. Otherwise, the source > > resolver will resolve sources relatively to the template sitemap instead > > of using the overridden ones. > > > > ... > > <!-- Enter the actual publication --> > > <map:match pattern="*/**"> > > <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}"/> > > </map:match>" > > > > > > However implementing the above snippet actually does not bring back the > > matches of the "extended" template sitemap. > > > > What did I miss? > > > > salu2 > > -- Thorsten Scherler <thorsten.at.apache.org> Open Source <consulting, training and solutions> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
