cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo Rivera <agalla...@agsoftware.dnsalias.com>
Subject Re: example in the Cocoon book
Date Thu, 10 Oct 2002 12:10:54 GMT
you can buy it at

www.amazon.com search for the keyword Cocoon

Antonio Gallardo

El Jueves, 10 de Octubre de 2002 05:41, Robert Siqueira escribió:
>   Hello All !!!
>
>         Sorry my ignorance.. but, when I found this cocoon book !?!?!?
>
>  thanks..
>
> Sylvain.Thevoz@swisscom.com wrote:
> > Thank you Matthew for your explanation, it works fine.
> > And your book is really the best reference for Cocoon I have seen.
> >
> > Sylvain
> >
> > -----Message d'origine-----
> > De: Matthew Langham [mailto:mlangham@s-und-n.de]
> > Date: jeudi, 10. octobre 2002 11:33
> > À: cocoon-users@xml.apache.org
> > Objet: RE: example in the Cocoon book
> >
> >
> > Thank you Matthew, but could you explain why!?
> > <<
> > Sure.... :-)
> >
> > 1. <map:pipeline>
> > 2.     <map:match pattern="download">
> > 3.         <map:act type="request">
> > 4.             <map:parameter name="parameters" value="true"/>
> > 6.             <map:act type="resource-exists">
> > 7.                 <map:parameter name="url" value="download/{file}"/>
> >
> > 8.                 <map:read src="download/{../file}"/>
> > 9.             </map:act>
> > 10.            <map:generate src="filenotfound.xml"/>
> > 11.            <map:transform src="filenotfound2html.xsl"/>
> > 12.            <map:serialize/>
> > 13.        </map:act>
> > 14.    </map:match>
> > 15.</map:pipeline>
> >
> > This has to do with the nesting of components. Each time a component is
> > nested inside another one we need to go "up the tree". Notice how the
> > "resource-exists" action is nested inside the "request" action. Also
> > notice that the Reader is inside the resource-exists action.
> >
> > Ok, now - the map:parameter attribute of the resource-exists action
> > "belongs" to it - so it is at the same level and we can use "{file}" to
> > access the parameter that the request action provides to the sitemap.
> >
> > The Reader is however "underneath" or "inside" the resource-exists
> > action, so it needs to go up one step to access the same file parameter.
> >
> > This was the non-programmer explanation. Carsten or others can provide a
> > perhaps more exact explanation.
> >
> > Matthew
> >
> > -----Original Message-----
> > From: Sylvain.Thevoz@swisscom.com [mailto:Sylvain.Thevoz@swisscom.com]
> > Sent: Thursday, October 10, 2002 11:19 AM
> > To: cocoon-users@xml.apache.org
> > Subject: RE: example in the Cocoon book
> >
> > Thank you Matthew, but could you explain why!?
> >
> > Is the line 7. <map:parameter name="url" value="download/{file}"/>  is
> > correct?
> >
> > Thank you
> > Sylvain
> >
> > -----Message d'origine-----
> > De: Matthew Langham [mailto:mlangham@s-und-n.de]
> > Date: jeudi, 10. octobre 2002 11:17
> > À: cocoon-users@xml.apache.org
> > Objet: RE: example in the Cocoon book
> >
> > Hi,
> >
> > guess what - this is a bug in the book :).
> >
> >
> > 8.                 <map:read src="download/{file}"/>
> > <<
> >
> > That line should read:
> >
> >                    <map:read src="download/{../file}"/>
> >
> > Matthew
> >
> > -----Original Message-----
> > From: Sylvain.Thevoz@swisscom.com [mailto:Sylvain.Thevoz@swisscom.com]
> > Sent: Thursday, October 10, 2002 10:05 AM
> > To: cocoon-users@xml.apache.org
> > Subject: example in the Cocoon book
> >
> > Hello,
> >
> > I'm reading the Cocoon book written by Matthew and Carsten and one
> > example in it doesn't work.
> >
> > The pipeline fragment is:
> >
> > 1. <map:pipeline>
> > 2.     <map:match pattern="download">
> > 3.         <map:act type="request">
> > 4.             <map:parameter name="parameters" value="true"/>
> > 6.             <map:act type="resource-exists">
> > 7.                 <map:parameter name="url" value="download/{file}"/>
> > 8.                 <map:read src="download/{file}"/>
> > 9.             </map:act>
> > 10.            <map:generate src="filenotfound.xml"/>
> > 11.            <map:transform src="filenotfound2html.xsl"/>
> > 12.            <map:serialize/>
> > 13.        </map:act>
> > 14.    </map:match>
> > 15.</map:pipeline>
> >
> > All seem to work except the line 8.
> > Cocoon detect that the {file} exists (line 7) but it can't read it (line
> > 8). It returns a HTTP error 404 (file not found).
> >
> > Anyone has an idea?
> > How to check (debug) the value {file}?
> >
> > Thank you
> > Sylvain
> >
> > ---------------------------------------------------------------------
> > 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>
> >
> > ---------------------------------------------------------------------
> > 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