On 1/24/06, Andreas Hartmann <[EMAIL PROTECTED]> wrote: > Thorsten Scherler wrote: > > <map:mount src="module-resources.xmap" pass-through="true"/> > We live and learn ... > Why didn't you tell this earlier, this would have spared us the > whole usecase-*.xmap business! :)
I cannot find useful documentation on a pass-through attribute for map:mount. Would someone point to some? > > The module should also > > handle the fallback to the static resource, so handling it in the core > > should be useless. > That would be possible, but it would require each module to serve its > static resources on its own. This would at least require mounting a > core sitemap for that purpose, e.g.: > global-sitemap.xmap -> modules/foo/sitemap.xmap -> resources.xmap > Maybe this is the cleaner solution (less automagic), but it requires > additional code in each module to serve the resources. > > With the locationmap not. > OK, that seems to be the holy grail ... > Would it require an extensive redesign, or could you implement a locationmap > in a single place to allow us to get our feet wet? I have been reading the posts about location map, but am not certain how it is being implemented. It sounds like a replacement for fallback, but is it a static list of resources, or is it context-sensitive? I hope for automatic context-sensitive fallback (without using any special protocol.) Using module "logo" in pub "pub1" based on pub template "template1", each element is checked in the pub1/modules/logo, then template1/modules/logo, then lenya/modules/logo. The top level would probably also search lenya/resources for the correct file, but doing so should check pub1/lenya/resources, then template1/lenya/resources, then lenya/resources. The context sensitivity is needed so each level can override the parent. If given name=lenya, the "Lenya" logo could be found in lenya/modules/logo, but should return the file from pub1/modules/logo if it exists, assuming we are in pub1; pub2 may not override the file. This should be implemented in the file protocol so it works without the developer needing to specify a special protocol. The file protocol just needs the prioritized list of locations for the current request, then loops through them until it finds the correct file. Lenya should add to the location map based on each XMAP it loads. We might also want an XMAP element to force a location into the location map: <map:location add="./mydirectory"/> While we are working on the file protocol, we should also add file security, and a standard (configurable) response for "Not Found/Not Allowed". If a visitor is not allowed to access the pub1/modules/logo/lenya.gif, it returns lenya/modules/logo/lenya.gif. The same error should return if the file does not exist or is not allowed. solprovider --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
