On 09.Jan.2003 -- 10:22 AM, Carsten Ziegeler wrote: > > Christian Haul wrote: > > > > On 09.Jan.2003 -- 09:28 AM, Carsten Ziegeler wrote:
> > > b) Chainers (?) are special components: > > > > > > <map:objects> > > > <map:object name="request-param" ..../> > > > <map:object name="session-attr" ..../> > > > </map:objects> > > > <map:object-chainers> > > > <map:object-chainer name="my_chain ....> > > > <first>request-param</first> > > > <second>session-attr</second> > > > ... > > > </map:object> > > > </map:object-chainers> > > > > > > And I can simply use {request-param:myname} and {my_chain:skin} > > > > > > Personally I would opt for a) because b) adds another component type > > > to the sitemap that is not really needed and it might be confusing > > > that {request-param:myname} is handled by an object component and > > > {my_chain:skin} by an object-chainer. > > > > Right. AFAIK b) has never been proposed. > > > It has! Really? Well, I don't think it's coming back :-) > > > BTW the real differences have been for the case where this 'pipeline' > > in a) spans several stages. > > > Can you expand on this a little bit? OK, the famous mapping example: Suppose there are two sources: request parameters and a XML file. The XML file contains default values. For reasons out of your control, this file contains different keys than the names of the expected request parameters. Thus a mapping needs to take place. Note that lines with a "*)" comment could be inherited from the parent or a central sitemap. i) nest it <map:objects> <map:object name="request-param" ... /> <!-- *) --> <map:object name="xmlfile" ... /> <!-- *) --> <map:object name="map" ... /> <!-- *) --> <map:object name="chain" ... > <first name="request-param"/> <second name="map" ...> <prefix>/this/app/defaults/</prefix> <use name="xmlfile"/> </second> </map:object> </map:objects> ii) construct from intermediates <map:objects> <map:object name="request-param" ... /> <!-- *) --> <map:object name="xmlfile" ... /> <!-- *) --> <map:object name="mymap" ... /> <prefix>/this/app/defaults/</prefix> <use name="xmlfile"/> </map:object> <map:object name="chain" ... > <first name="request-param"/> <second name="mymap"/> </map:object> </map:objects> Now, i) is clearer to me especially, as some declarations could be inherited but ii) will produce slightly faster code. Today, both are possible and can be mixed, which is good IMO. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]