[Zope3-dev] Re: yagni on overrides?
Martijn Faassen
faassen at startifact.com
Fri Apr 27 10:15:29 EDT 2007
Tres Seaver wrote:
[snip]
> One example of such an implementation would be an optional, lxml-based
> directive which uses the native structure of the ZCML file and XPath.
> E.g. to include only adapters from a package ::
>
> <select package="my.package" file="configure.zcml">
> <path>//adapter//path>
> </select>
>
> The XPath processor would need to be passed the current namespace
> mapping here, if we want to select items from the non-default namespace.
> Otherwise, this would function pretty much like the 'include' directive
> (it might even use that diretive's handler under the hood).
>
> With an egg-based story, we can more easily use stuff which depends on a
> third-party library like lxml; folks who can't install lxml just lose
> this feature.
In general, I don't like relying on the syntactic structure of ZCML
files for this. I'd prefer to have a semantic of configuration actions
and a way to disable them.
If this can be a quick fix that helps people, so be it, but I think a
way to manipulate configuration actions from Python code is a better
overall approach.
Regards,
Martijn
More information about the Zope3-dev
mailing list