Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.
The following page has been changed by NicoVerwer: http://wiki.apache.org/cocoon/SitemapURIModule The comment on the change is: Described a problem with this module. ------------------------------------------------------------------------------ - This is an input module that determines the absolute URI to the base of the sitemap. It can help you to make your Cocoon application relocatable. The problem with this was described by Gianugo [http://www.rabellino.it/blog/index.php?title=things_to_remember_for_the_next_cocoon_p&more=1&c=1&tb=1&pb=1]: @@ -14, +13 @@ The code for this input module is attached to this page (see 'attachments' under 'more actions'). + == Problems == + + This module does not work correctly if the sitemap-URI changes during the request. + Such a change may occur because of a sitemap-redirection or a call to Flowscript. + The cause for this problem is, that the SitemapURIModule computes the sitemap-base-URI by subtracting the sitemap-URI from the request-URI: + + request-URI - sitemap-URI = sitemap-base-URI + + For example, suppose that you have a sitemap mounted at "/a/b/", and the request-URI is "/a/b/c/d", you get + + "/a/b/c/d" - "c/d" = "/a/b/" + + If the pipeline redirects "c/d" to "e", + + <map:match pattern="c/d"> + <map:redirect-to uri="e"/> + </map:match> + + the sitemap-URI changes to "e". + In this case, the base-sitemap-URI cannot be computed: + + "/a/b/c/d" - "e" = ??? + + As far as I can see, this is not easily solved in the input module itself. Somehow, the base-sitemap-URI should be computed at the start of the request. +
