You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Martin Holmes <mh...@uvic.ca> on 2006/06/15 19:15:29 UTC

Sitemap problem with 2.1.7

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


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


Re: Sitemap problem with 2.1.7

Posted by Ralph Goers <Ra...@dslextreme.com>.
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Sitemap problem with 2.1.7

Posted by Martin Holmes <mh...@uvic.ca>.
Lars Huttar wrote:
> Martin Holmes wrote:
>>...
>> 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.
> I would expect that to depend on whether the super-sitemap's <map:mount> 
> for the subsitemap occurs before or after its <map:match pattern="**.css">.
> Is the relative order of those two different, between Cocoon 2.1.7 and 
> your older version?

That was it! The old Cocoon was auto-mounting all sitemaps after its own 
match elements, but the new one had the default mount catch-all before 
these matches, for some reason.

Cheers,
Martin


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


Re: Sitemap problem with 2.1.7

Posted by Lars Huttar <la...@sil.org>.
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.
I would expect that to depend on whether the super-sitemap's <map:mount> 
for the subsitemap occurs before or after its <map:match pattern="**.css">.
Is the relative order of those two different, between Cocoon 2.1.7 and 
your older version?

Lars


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