cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Eberhardt" <colin.eberha...@tecsphere.com>
Subject Resource re-use between sitemaps
Date Fri, 11 Feb 2005 15:14:00 GMT
Dear All,

I am creating a few cocoon applications which have common patterns. I
have created a common sitemap and a number of sub-sitemaps. The
sub-sitemaps are able to access all the components defined in the common
sitemap, however if I try to call a resource which is defined in the
common sitemap cocoon complains that it is unable to find the specified
resource.

Here is a very simple example of what I am trying to achieve...


Here is the base sitemaps:

<?xml version="1.0" encoding="ISO-8859-1"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
	<map:components>
		<map:generators default="file"/>
		<map:transformers default="xslt"/>
		<map:serializers default="html"/>
		<map:readers default="resource"/>
		<map:matchers default="wildcard"/>
	</map:components>
	<map:resources>
		<map:resource name="common-resource">
			<map:generate src="test.html" type="file" />
			<map:serialize type="html" />
	    	</map:resource>
	</map:resources>
	<map:pipelines>
		<map:pipeline>		
			<map:mount check-reload="yes"
src="subsitemap.xmap" uri-prefix=""/>
		</map:pipeline>		
	</map:pipelines>
</map:sitemap>

And here is the sitemap which it references:

<?xml version="1.0" encoding="ISO-8859-1"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
	<map:components>
		<map:generators default="file"/>
		<map:transformers default="xslt"/>
		<map:serializers default="html"/>
		<map:readers default="resource"/>
		<map:matchers default="wildcard"/>
	</map:components>	
	<map:pipelines>
		<map:pipeline>
			<map:call resource="common-resource"/>
		</map:pipeline>		
	</map:pipelines>
</map:sitemap>


However, the call to the resource named "common-resource" fails.

What am I doing wrong, or are resources not re-useable!

Colin Eberhardt
Software Engineer
eMail: colin.eberhardt@tecsphere.com

TecSphere Ltd
Centre for Advanced Industry
Coble Dene, Royal Quays
Newcastle upon Tyne NE29 6DE
United Kingdom

Direct Dial: +44 (191) 270 31 13
Fax: +44 (191) 270 31 09
http://www.tecsphere.com




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


Mime
View raw message