You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by e nio <en...@yahoo.com> on 2002/12/31 19:52:38 UTC
Lost in the pipeline - cocoon/documentation
Am trying to follow the pipelines for cocoon to
display the index.xml, for example when I type on the
browser http://localhost:8080/cocoon/documentation
I followed it from the main sitemap.xmap -> to a
documentation sitemap.xmap. I lost track once the
matcher has hit this partof the
documentation/sitemap.xmap:
194 <map:aggregate element="site">
195 <map:part src="cocoon:/book-{1}.xml"/>
196 <map:part src="cocoon:/body-{1}.xml"
label="content"/>
Im not sure what happens when this aggregates. Does
aggregate holds a big file while it compose the parts
and after it the aggregate gets transformed? What does
the cocoon:/ do? It seems it jumps to this but can
not confirm:
94 <map:match pattern="**book-**.xml">
95 <map:call resource="book">
96 <map:parameter name="resource" value="{2}" />
Is the first ** same as the second ** sorrounding
**book**.xml ? and the parameter resource={2} is
passed to whom? is it to line 65?
65 <map:resources>
66 <map:resource name="book">
67 <map:generate src="xdocs/{../1}book.xml"/>
Any clarification will help..Thanks.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Lost in the pipeline - cocoon/documentation
Posted by Joerg Heinicke <jo...@gmx.de>.
Hello,
I don't know exactly to which files you refer ( I don't have a Cocoon
installation on this computer), but everything you say seems to be correct.
e nio wrote:
> Am trying to follow the pipelines for cocoon to display the
> index.xml, for example when I type on the browser
> http://localhost:8080/cocoon/documentation
>
> I followed it from the main sitemap.xmap -> to a documentation
> sitemap.xmap. I lost track once the matcher has hit this partof the
> documentation/sitemap.xmap:
>
> 194 <map:aggregate element="site"> 195 <map:part
> src="cocoon:/book-{1}.xml"/> 196 <map:part
> src="cocoon:/body-{1}.xml" label="content"/>
>
> Im not sure what happens when this aggregates. Does aggregate holds a
> big file while it compose the parts and after it the aggregate gets
> transformed?
Yes.
> What does the cocoon:/ do?
The pseudo-protocol cocoon:/ starts an internal sitemap request in the
current sitemap, cocoon:// in the root sitemap.
> It seems it jumps to this but can not confirm:
>
> 94 <map:match pattern="**book-**.xml">
> 95 <map:call resource="book">
> 96 <map:parameter name="resource" value="{2}" />
Yes, it looks so.
> Is the first ** same as the second ** sorrounding **book**.xml?
What do you mean with "same"? ** matches on "everything" including
pseudo directory slashes '/'.
So "**book-**.xml" matches on
test/testbook-test.xml
book-.xml
test/book-test/test.xml
and so on. The first ** in the matcher can be refered by {1}, the second
by {2}.
> and the parameter resource={2} is passed to whom? is it to line 65?
>
> 65 <map:resources>
> 66 <map:resource name="book">
> 67 <map:generate src="xdocs/{../1}book.xml"/>
Again it looks so. {../1} now refers to first ** in the match pattern
above. Also you can refer to the second via {../2}. Or as it is done
above send this parameter via <map:parameter/> and use a new/real name
in the resource with {resource}. I prefer the way using
<map:parameter/>, so you can use the <map:resource/> independently of
the <map:match/> it is called from.
> Any clarification will help..Thanks.
Regards,
Joerg
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>