cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject Re: [C2] Sitemap factories
Date Tue, 03 Oct 2000 11:32:55 GMT

--- Ross Burton <ross.burton@mail.com> wrote:
> 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.

For now the engine is able to put a message to System.out I think via
<xsl:message> during sitemap transformation into java code.

> 
> 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?  :-)

Not during sitemap to code transformation because this would mean to
physicaly include the map:components parts of the parent sitemap
document (well thinking about it now someone will enlight me if such a
thing is possible if the sitemap.xsl gets loaded a paramter defining
where the parent sitemaps location is). 

Also not knowing the inherited sitemaps at that stage (transformation
into java code) will delegate a ComponentNotFoundException during
run/request time.

Giacomo

=====
--
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/

Mime
View raw message