Martin Holmes wrote:

Hi there,

I'm moving a project from an old version of Cocoon to Cocoon 2.1.7, and I've hit a very odd sitemap problem. The root sitemap for Cocoon has this matcher:

<map:match pattern="**.css">
  <map:read mime-type="text/css" src="{1}.css"/>
</map:match>

My project resides in a subfolder called "katakana", and it has this matcher:

<map:match pattern="**.css">
  <map:read mime-type="text/css" src="css/{1}.css"/>
</map:match>

In the old version of Cocoon, the matcher in my sitemap was happily overriding the matcher in the root sitemap, so any call for this file:

.../katakana/style.css

would result in the resource being retrieved from:

.../katakana/css/style.css


In 2.1.7, though, it appears that the root sitemap is overriding my project sitemap. Any call for

.../katakana/style.css

tries to retrieve the resource from .../katakana/style.css, and fails.

However, if I comment out the matcher in the root sitemap, then my matcher works, and the resource is correctly retrieved from .../katakana/css/style.css.

Does anyone know what could be causing this? I thought sitemaps always cascaded downwards, with subfolder sitemaps overriding any similar settings in sitemaps further up the tree.

All help appreciated,
Martin

No. Sitemaps are processed from the top down. Cocoon finds the appropriate match in the root sitemap and then processes it. That match can then mount a subsitemap to continue figuring out what to do. Subsitemaps are not even looked at until they have to be (i.e. - a map:mount is done).

Since you have a pattern of **.css in the root sitemap that matcher will match any request that ends in .css.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to