cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Burton <ross.bur...@mail.com>
Subject Re: [C2] Sitemap factories
Date Mon, 02 Oct 2000 22:07:48 GMT
Giacomo Pati wrote:
> 
> Is it the concern of the sitemap maintainer to be aware of the fact that a matcher/selector
is a factory or not?
> 
> Now a sitemap maintainer has to distinguish between them as with:
> 
>   <map:matcher name="foo" src="my.FooMatcher"/>
>   <map:matcher name="bar" factory="my.BarMatcherFactory"/>
> 
> In fact the sitemap itself is able to determine if the class specified above implements
CodeFactory or not. So the snippet above could be written as:
> 
>   <map:matcher name="foo" src="my.FooMatcher"/>
>   <map:matcher name="bar" src="my.BarMatcherFactory"/>
> 
> The consequences are that a factory class could not be inherited from a parent sitemap.
> 
> What do you think, is it valuable to let the sitemap check what interface a matcher/selector
implements or is it important to see that in the sitemap.

If a factory class was used, could the sitemap compiler print a message
to the logs stating that it cannot be used in inherited sitemaps?  I
like the transparency of having a single src=".." attribute, but the
lack of feedback over the consequences is not good.

Would it be possible for a sub-sitemap to know about the factory
matchers and if one of them was used, alert the user to what they are
doing?  :-)

Ross

Mime
View raw message