Hi > Am 26.01.2015 um 11:03 schrieb Bertrand Delacretaz <bdelacre...@apache.org>: > > On Mon, Jan 26, 2015 at 10:39 AM, Jeff Young <j...@adobe.com> wrote: >> ...If we do use a property, it should be inherited so it can be >> put on entire sub-trees easily... > > Yes that's my idea, just put sling:script=thymeleaf on /apps/foo to > indicate that thymeleaf is the preferred engine for scripts found > anywhere under /apps/foo, in case multiple engines are mapped to the > same script extension.
Maybe we should add somewhat more to be able to declare a mapping from extension to concrete script language name, which in turn must exactly match what the Script Engine declares, e.g. sling:script = [ „html=thymeleaf“, „js=nashorn“ ] So the property is (optionally) multi-value and consists of a a string describing a name-value pair to map the script file extension to the language name. The adapter factory can then consider the script resource, the extension, this mapping and quickly find the appropriate engine. Since I would not expect that many sling:script properties all over places, I would think we could run a simple query on startup to gather the properties and then register an event listener to get informed of updates ... Regards Felix