I checked current HEAD today - the problem is still there.

Leszek Gawron wrote:

could anybody try to confirm what I see?:

make a test directory. put this sitemap there:

<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
<map:pipelines>
<map:pipeline>
<map:match pattern="*_cf">
<map:generate type="request"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="*_llf">
<map:aggregate element="aggregate">
<map:part src="cocoon:/{1}_cf"/>
</map:aggregate>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="index1">
<map:aggregate element="sitepage">
<map:part src="cocoon:/test_llf" element="test"/>
</map:aggregate>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="index2">
<map:aggregate element="sitepage">
<map:part src="cocoon://test/test_llf" element="test"/>
</map:aggregate>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>


request: http://localhost:8888/test/test_lff - works
request: http://localhost:8888/test/index1 - works
request: http://localhost:8888/test/index2 - does not work

the error will tell you that test_cf was not matched. It looks for test_cf in the main sitemap and not in test/test_cf - clearly looks like wrong context.

This sample uses one sitemap only but http://localhost:8888/test/index2 simulates calling other sitemap.

change this:

            <map:match pattern="*_llf">
                <map:aggregate element="aggregate">
                    <map:part src="cocoon:/{1}_cf"/>
                </map:aggregate>
                <map:serialize type="xml"/>
            </map:match>

into this:

            <map:match pattern="*_llf">
                <map:aggregate element="aggregate">
                    <map:part src="cocoon://test/{1}_cf"/>
                </map:aggregate>
                <map:serialize type="xml"/>
            </map:match>

and all links will work

Look like if you generate your multiply aggregated sources and use cocoon:// pseudo protocol subsequent calls to cocoon:/ will fail finding no match because they will be resolved in wrong context.

If you keep using only global cocoon:// protocol everything will work.
If you keep everything in single sitemap and use cocoon:/ only it will also work.


sorry for code quotations. I still do not get it why my Mozilla Thunderbird got "Paste without formatting" disabled.



--
Leszek Gawron                                      [EMAIL PROTECTED]



Reply via email to