cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sreedhar Chintalapaty" <schintalap...@ptc.com>
Subject RE: Some Design Help, please
Date Thu, 07 Mar 2002 21:45:18 GMT
Thanks for the clue.

I looked into my Cocoon/sitemap.xmap. Here's what I found for Bonebreaker
AND MyApplication:
	<map:match pattern="bonebreaker/**">
		<map:mount uri-prefix="bonebreaker/" src="bonebreaker/"
check-reload="yes"/>
	</map:match>
....
	<map:match pattern="MyApplication/**">
		<map:mount uri-prefix="MyApplication/" src="MyApplication/"
check-reload="yes"/>
	</map:match>

With this, bonebreaker works but myapplication doesn't.

I changed the mount src for MyApplication, so it looks like:
	<map:match pattern="MyApplication/**">
		<map:mount uri-prefix="MyApplication/" src="MyApplication/sitemap.xmap"
check-reload="yes"/>
	</map:match>

While waiting for the replies, I changed my Pipeline to have nested
matchers:

--------------------------------------------------
<map:pipeline>

	<!-- homepage -->
	<map:match pattern="">
		<map:redirect-to session="false" uri="gvs/home/home.section"/>
	</map:match>

	<!-- pages -->
	<map:match pattern="*/*.**">

		<!-- Home -->
		<map:match pattern="home/*.**">
			<map:act type="request">
				<map:parameter name="parameters" value="true"/>
				<map:generate src="control/home/{../../1}.xml{requestQuery}"/>
				<map:transform type="xslt" src="view/xsl/html/{../../2}.xsl">
					<map:parameter name="section" value="home"/>
					<map:parameter name="toc-file" value="/control/config/toc.xml"/>
					<map:parameter name="base-url" value="/cocoon/gvs"/>
				</map:transform>
				<map:transform type="xslt" src="view/xsl/html/menupage.xsl">
					<map:parameter name="section" value="home"/>
					<map:parameter name="request-url" value="{../../1}.{../../2}"/>
					<map:parameter name="toc-file" value="/control/config/toc.xml"/>
					<map:parameter name="css-stylesheet" value="default.css"/>
					<map:parameter name="base-url" value="/cocoon/gvs"/>
				</map:transform>
				<map:serialize/>
			</map:act>
		</map:match>

		<!-- ... More Matchers here ... -->

<map:pipeline>
--------------------------------------------------

Now it works.

Thanks a lot,

Sreedhar


-----Original Message-----
From: Andreas Hartmann [mailto:user@cocooncenter.de]
Sent: Thursday, March 07, 2002 4:22 PM
To: cocoon-users@xml.apache.org; schintalapaty@ptc.com
Subject: RE: Some Design Help, please



Hi Sreedhar,


>I am trying to fit bonebreaker into a new folder structure to learn some
>site map fundas, and I am getting the following error:
>	org.apache.cocoon.ResourceNotFoundException:
>		No pipeline matched request: gvs//home/home.section

That might be a problem with your URI prefix.
Could you post a snippet from your main sitemap?

Greetings,
Andreas

>
>The Bonebreaker application itself works perfectly. I wonder why it is
>trying to find a match for "gvs//home/home.section" instead of
>"gvs/home/home.section"? This is probably a frequently made newbie faux
>paus
>with a stock answer, perhaps?
>
>Differences between Bonebreaker and MyApplication:
>
>My directory Structure is quite different from that of Bonebreaker;
>however,
>I am using only the files that came with Bonebreaker, but relocated
>according to my desired directory structure.
>
>--------------------------------------------------
>Bonebreaker Folder Structure
>
>Bonebreaker
>|---- css
>|	|---- default.css
>|
>|---- documents
>|	|----	cc
>|		|----	home.xml
>|
>|	|----	company
>|		|---- home.xml
>|
>|	|----	dh
>|		|----	home.xml
>|
>|	|----	fr
>|		|----	home.xml
>|
>|	|----	home
>|		|----	home.xml
>|
>|	|----	links
>|		|----	home.xml
>|---- stylesheets
>	|----	bike.xsl
>	|----	menu.xsl
>	|----	menupage.xsl
>	|----	page.xsl
>	|----	section.xsl
>
>--------------------------------------------------
>
>My Application Folder Structure
>
>GVS
>|---- content
>|---- control
>	|---- config
>		|---- toc.xml
>
>	|---- home
>		|---- home.xml
>
>|---- view
>	|---- xsl
>		|---- html
>			|---- bike.xsl
>			|---- menu.xsl
>			|---- menupage.xsl
>			|---- page.xsl
>			|---- section.xsl
>
>--------------------------------------------------
>
>--------------------------------------------------
>Pipeline in Bonebreaker Sitemap:
>
><map:pipeline>
>	<!-- ====== homepage ======  -->
>	<map:match pattern="">
>		<map:redirect-to session="false" uri="bonebreaker/home/home.section"/>
>	</map:match>
>	<!-- ====== pages ====== -->
>	<map:match pattern="*/*.**">
>		<map:act type="request">
>			<map:parameter name="parameters" value="true"/>
>			<map:generate src="documents/{../1}/{../2}.xml{requestQuery}"/>
>			<map:transform type="xslt" src="stylesheets/{../3}.xsl">
>				<map:parameter name="section" value="{1}"/>
>				<map:parameter name="toc-file" value="../documents/toc.xml"/>
>				<map:parameter name="base-url" value="/cocoon/bonebreaker"/>
>			</map:transform>
>			<map:transform type="xslt" src="stylesheets/menupage.xsl">
>				<map:parameter name="section" value="{../1}"/>
>				<map:parameter name="request-url" value="{../2}.{../3}"/>
>				<map:parameter name="toc-file" value="../documents/toc.xml"/>
>				<map:parameter name="css-stylesheet" value="default.css"/>
>				<map:parameter name="base-url" value="/cocoon/bonebreaker"/>
>			</map:transform>
>			<map:serialize/>
>		</map:act>
>	</map:match>
>	<!-- ====== css stylesheets ====== -->
>	<map:match pattern="*.css">
>		<map:read src="css/{1}.css" mime-type="text/css"/>
>	</map:match>
></map:pipeline>
>--------------------------------------------------
>
>Pipeline in MyApplication Sitemap (All matchers look like the one for home
>below, only with "home" replaced by something else):
>
><map:pipeline>
>	<!-- home/*.** -->
>	<map:match pattern="home/*.**">
>		<map:select type="request">
>			<map:parameter name="parameters" value="true"/>
>			<map:generate src="control/home/{../1}.xml{requestQuery}"/>
>			<!-- Setup Transformation #1 -->
>			<map:transform type="xslt" src="view/xsl/html/{../2}.xsl">
>				<map:parameter name="section" value="home"/>
>				<map:parameter name="toc-file" value="/control/config/toc.xml"/>
>				<map:parameter name="base-url" value="/cocoon/gvs"/>
>			</map:transform>
>
>			<!-- Setup Transformation #2 -->
>			<map:transform type="xslt" src="view/xsl/html/menupage.xsl">
>				<map:parameter name="section" value="home"/>
>				<map:parameter name="request-url" value="{../1}.{../2}"/>
>				<map:parameter name="toc-file" value="/control/config/toc.xml"/>
>				<map:parameter name="css-stylesheet" value="default.css"/>
>				<map:parameter name="base-url" value="/cocoon/gvs"/>
>			</map:transform>
>			<map:serialize/>
>		</map:select >
>	</map:match>
>
>	<!-- css stylesheets -->
>	<map:match pattern="*.css">
>		<map:read src="view/css/{1}.css" mime-type="text/css"/>
>	</map:match>
></map:pipeline>
>
>--------------------------------------------------
>
>I do have the request Selector defined in my Selectors; and I did modify
>toc.xml so it has all the "sections" I need.
>
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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