You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Thorsten Scherler <th...@juntadeandalucia.es> on 2009/07/14 11:56:11 UTC
Minimal sitemap for pub
Hi all,
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.
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 Java <consulting, training and solutions>
Sociedad Andaluza para el Desarrollo de la Sociedad
de la Información, S.A.U. (SADESI)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Minimal sitemap for pub
Posted by Thorsten Scherler <th...@apache.org>.
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: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Minimal sitemap for pub
Posted by Andreas Hartmann <an...@apache.org>.
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 :)
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
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Minimal sitemap for pub
Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Tue, 2009-07-14 at 11:56 +0200, Thorsten Scherler wrote:
> Hi all,
>
> 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.
>
> 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?
I found as further background:
http://markmail.org/message/suizkip6l6eoqxt2
salu2
--
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>
Sociedad Andaluza para el Desarrollo de la Sociedad
de la Información, S.A.U. (SADESI)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org