[Zope3-dev] Re: yagni on overrides?
Jim Fulton
jim at zope.com
Fri Apr 27 10:19:42 EDT 2007
On Apr 27, 2007, at 10:15 AM, Martijn Faassen wrote:
> 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.
I agree.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list