This time with the ending: Vadim Gritsenko wrote: > > Carsten Ziegeler wrote: > > >Currently (2.1), we have a static method at the > CocoonComponentManager > >that allows to get the current sitemap component manager. > >This is useful in some scenarios when you want to access a sitemap > >component. If your own component is declared not in the > current sitemap > >but in any parent than usually it can't access the > components declared > >in the current sitemap. > >E.g. the SourceWritingTransformer needs access to the > serializers for > >writing the content. (Let's not discuss if the SWTransformer is the > >best solution for the task it does - it's just one example). > > > > > > But SWT should get serializer from its own sitemap - don't you think? > Otherwise, if it will use current sitemap, and current > sitemap overrides some of the serializers, results will not > be what is expected. > > And if in nested sitemap you use SWT and want it to access > locally declared serializers - then you should declare SWT in > the same sitemap too. WDYT? > Sorry, I disagree :)
Example: - main sitemap has SWT and some serializers - sub sitemap has own special serializer (OSS) and uses the SWT Now it is very natural that you want to use the OSS in the sub sitemap with the SWT without redeclaring the SWT. I think everyone would simply expect that it works - especially the user who might not have that knowledge about internal Avalon component handling. And even I would expect this behaviour. But anyways, this is not about how to use the SWT but if we want to have an official access to the sitemap manager :) Carsten
