Peter Donald wrote: > > At 12:04 PM 6/23/2002 +0200, you wrote: > > > From: Stefano Mazzocchi [mailto:[EMAIL PROTECTED]] > > > > > > > Leo (A Cocoon developer) saids a killer feature would be to change > > > > cocoon to not be directly referentiable. > > > > > > Stefano (another Cocoon developer) asks how this is possible > > > if the direct referencing of components is hardcoded into the > > > sitemap semantics. > > > >Leo (the Cocoon "developer" first mentioned, although strictly speaking > >he's not a committer to Cocoon and has contributes very few patches) > >wonders what "directly referentiable" means. > > Essentially whether you use a local namespace per component or access a > global namespace from every component. If you use local namespaces for > components they indirectly refer to components in global namespace.
Example: <sitemap> <components> <generators> <generator name="blah" src="com.mystuff.MyGenerator"/> </generators> ... </components> <pipelines> <pipeline> <match pattern="**"> <generate type="blah" src="{1}.xml"/> ... </match> </pipeline </pipelines> </sitemap> the sitemap semantics perform a direct lookup of the component implementing the "Generator" interface, using the 'generate/@type' attribute to match the 'generators/@name' attribute. This is the assembly information we have and can be included in the same sitemap or in the parent sitemaps. Using the ComponentManager that Berin proposed for A5, the above is easy to implement using. Generator generator = (Generator) lookup(Generator.ROLE,"blah"); which appears (to us) much more elegant than Generator generator = (Generator) lookup(Generator.ROLE+"/blah"); You could say that we could use: Generator generator = (Generator) lookup("blah"); but in that case, you'd have to implement proper namespacing, such as Generator generator = (Generator) lookup("generator:blah"); to avoid conflicts with other components called 'blah', or, following ICANN patterns, get back to Generator generator = (Generator) lookup(Generator.ROLE+":blah"); Generator generator = (Generator) lookup(Generator.ROLE+"/blah"); Generator generator = (Generator) lookup(Generator.ROLE+"[blah]"); or other ways to encode the 2d-mapping into a 1d component query string. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. <[EMAIL PROTECTED]> Friedrich Nietzsche -------------------------------------------------------------------- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>