Peter Klotz wrote:
<map:call resource="resourcename"/> is a sitemap internal redirect for reusing pipeline fragments and so you can do first steps of a pipeline on another place than the resource.
See also <map:resource/>.
I hear you saying this but when I try this
<map:resources> <map:resource name="chunk"> <map:read src="work/{service}/index.html" mime-type="text/html"/> </map:resource> </map:resources>
and have a pipeline
<map:pipeline> ... <map:transform type="xslt" .../> <map:call resource="chunk"> <map:parameter name="service" value="{1}"/> </map:call> </map:pipeline>
It shouldn't be a problem being inside a selector?
No, the selector is not the problem.
In the generation phase of the pipline I get log records so I can see if the pipeline is really executed completely. And thus I can really see that immediately the resource is called and the generation and transformation is definitely not executed!
Yes, of course ;-) see below.
Could it be that the behaviour changed after Cocoon 2.0.4 that I'm using?
No.
The problem seems to be that the called resource is treated as if the content is part of the calling pipeline. That means that I cannot use a generator or read after a transformer.
This is exactly the problem. You can only have one generator or one map:read in your pipeline (independent of map:call/map:resource). And because map:call/map:resource are only reusable pipeline fragments, there is no difference having the stuff from map:resource at the end of your pipeline where you have map:call. As I said it's only a sitemap internal redirect.
I tried exchanging the above read with a <map:generate/> and <map:serialize/> and got a error that the generator is already set in the pipeline.
That's correct, the typical error message.
I think this restriction is bad in this case. The transformer does not create any output (docbook chunked HTML generation into files), therefore it would not be a problem to have a generator afterwards. And a called resource should behave like a sub-pipeline which it definitely does not at the moment. Instead it behaves like a macro.
It's a general restriction of the sitemap, it's part of the /sitemap contract/. What you want to do is to chunk your DocBook file ad to deliver the index.html of the chunk output? Difficult, I don't see any solution for this. We always do the DocBook transformation offline and deliver the resulting pages with a reader as you tried it.
Maybe extending the HTMLGenerator is an option for you. It could start the transformation and afterwards return the HTML file. Otherwise you must rethink the complete work flow.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]