cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <kpiroum...@apache.org>
Subject [SITEMAP] The order of processing
Date Wed, 24 Apr 2002 11:34:48 GMT
G'day!

I'm getting a strange behavior of the sitemap processor. Here goes the
problem.

1. Preliminaries:

/samples/sitemap.xmap - automounted from the root sitemap
/samples/i18n/sitemap.xmap - automounted from the samples sitemap

By default, samples sitemap displays directory listing of the mounted
directory, but in i18n sitemap I've added this matcher:

                <!-- Default pipeline -->
                <map:match pattern="">
                    <map:redirect-to uri="cocoon:/simple.xml"/>
                </map:match>

So, now when an URL like '/cocoon/samples/i18n/' is requested the default
page is displayed (and not the directory listing).

The default (simple.xml) page is composed using aggregation from a menu (at
left) and the main content.

2. The problem:

Now the most funny part starts. I send request to the default URL and get a
page that contains 3 parts! Those are: the menu as it should be, content
part truncated at the bottom and THE DIRECTORY LISTING attached to the
bottom of the page! So, the result is composed from TWO sitemaps at the same
time. But i18n sitemap contains absolutely no references to its parent!

Call to the '/cocoon/samples/i18n/simple.xml' returns a page without the
directory listing.

3. Cause

Logs show that the content part throws multiple Exceptions (that are, BTW,
related to the latest backward incompatible changes in I18nTransformer). So,
I suspect that the processing went like this:

            <map:aggregate element="site">
                <map:part src="cocoon:/menu/{../0}"/>  <!-- === OK === -->
                <map:part src="cocoon:/content/{../0}" label="content"/>
<!-- === ERROR during transformation === -->
                <!-- === Output from the parent sitemap is included here
=== -->
            </map:aggregate>

4. Questions:

Am I doing something wrong/unnatural with the sitemap?
What should be the correct behavior of sitemap processor in such cases?
Is it possible to return 500 status if one of the parts in aggregation
fails?
Why the parent sitemap is invoked on error?

Thanks for any answers/comments/bugfixes!

Regards,
  Konstantin
_________________________________________
Konstantin Piroumian
Lead Developer
ICQ#: 2297575
( Work Tel#:  +7 095 795 0520 * 1288
+ More ways to contact me
i See more about me
_________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message