cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Czernay <lis...@czernay.com>
Subject Re: Problems resolving internal paths
Date Wed, 01 Jan 2003 18:57:09 GMT


Reinhard Poetz wrote:
> Hi Alexander,
> 
> Try to use relative paths in your src attributes (your base directory is
> always the current sitemap) - this should solve your resource not found
> problems.
> 
> Regards,
> Reinhard
> 
> 

Isn't there any way to get absolute paths? I wanted to keep all the 
needed images in a special directory that I redirect all image-calls to 
via the sitemap, but I don't understand how that would work. And even if 
I had to use relative paths, what file are they relative to (XML, XSLT, 
sitemap, ...)? Is there any way to find out where Cocoon actually tries 
to read the files from? I browsed through the log-files, but I can only 
find information on the URL the browser requested, but not the files 
actually read by Cocoon.

Thanks for your help,

Alexander




>>-----Original Message-----
>>From: Alexander Czernay [mailto:listen@czernay.com]
>>Sent: Wednesday, January 01, 2003 7:21 PM
>>To: cocoon-users@xml.apache.org
>>Subject: Problems resolving internal paths
>>
>>
>>I have a file structure serving two sites with the same XML data, but
>>with different XSLTs for layout:
>>
>>/cocoon/    <-- Tomcat's application path
>>/cocoon/k8    <--- the main site
>>/cocoon/k8/xml    <--- XML files
>>/cocoon/k8/alexander    <--- first site's XSLTs and CSSs etc...
>>/cocoon/k8/moritz    <--- second site's XSLTs and CSSs etc...
>>
>>Now I just modified the sample sitemap to mount the new sitemap in
>>/cocoon/k8:
>>
>><map:pipeline>
>>   <map:match pattern="k8/**">
>>     <map:mount check-reload="yes" src="k8/sitemap.xmap" uri-prefix="k8"/>
>>   </map:match>
>></map:pipeline>
>>
>>Inside the k8/sitemap.xmap I mount the two other sitemaps for the two
>>sites (why do I have to use k8/moritz/sitemap.xmap instead of just
>>moritz/sitemap.xmap here?):
>>
>><map:match pattern="moritz/**">
>>   <map:mount check-reload="yes" src="k8/moritz/sitemap.xmap"
>>uri-prefix="moritz"/>
>></map:match>
>>
>><map:match pattern="alexander/**">
>>   <map:mount check-reload="yes" src="k8/alexander/sitemap.xmap"
>>uri-prefix="alexander"/>
>></map:match>
>>
>>And finally I construct my HTML pages this way:
>>
>><map:match pattern="projects/*.html">
>>  <map:aggregate element="page">
>>   <map:part src="menu.xml"/>   <-- menu.xml is in /cocoon/k8/alexander
>>   <map:part src="k8/xml/projects/{1}.xml"/> <-- .xml is in /cocoon/k8/xml
>>  </map:aggregate>
>>  <map:transform src="project.xsl"> <-- project.xsl is in
>>/cocoon/k8/alexander
>>   <map:parameter name="menu_main" value="projects"/>
>>   <map:parameter name="menu_sub" value="{1}"/>
>>   <map:parameter name="path" value="projects"/>
>>  </map:transform>
>>  <map:serialize type="html"/>
>></map:match>
>>
>>I always get a resource not found (so I think my paths are wrong). I
>>also have to always refresh the sitemap in /cocoon/k8 to get Cocoon to
>>reload the sitemaps in /cocoon/k8/alexander (at least it seems to me).
>>
>>What am I doing wrong? How do I get some root-relative paths? I tried
>>cocoon:// and context:// and also /...
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>Please check that your question  has not already been answered in the
>>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>>
>>To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
>>For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>>
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 
> 




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message