[Zope3-dev] RFC: ZConfig and other formats for ZCML
Jim Fulton
jim at zope.com
Sun Jan 22 10:21:04 EST 2006
Fred Drake wrote:
> On 1/21/06, Jim Fulton <jim at zope.com> wrote:
>
>>are really attributes of foo. In ZCML, this might have been:
>>
>> <foo
>> x="1"
>> y="2"
>> />
>
>
> Except this breaks down in the case of ZConfig <multikey> elements,
> which allow configuration like this:
>
> <foo>
> x = 1
> x = 2
> y = 3
> </foo>
Maybe. My thought that this might be handled by
cheating in the sax events. (Or maybe we shouldn't
exactly do sax events.) In the event that says "here's
a tag named 'foo'", we'd provide a list for the value of
x. Or we could do separate events for each option.
I think we definately need separate events for top-level
options.
> There are also ways to arrange configuration like this:
>
> <search-path>
> directory1
> directory2
> directory3
> </search-path>
Really? Is this documented anywhere? Is it used anywhere?
> So the mapping between ZCML and ZConfig isn't entirely obvious to me.
Agreed. I didn't mean to suggest that it was obvious. I do think
it's possible. I expect crafting this mapping will be part of the
implementation excercise.
Another issue is that it seems that it is possible for a ZConfig
configuration file to include configurations for multiple aplications.
At least I think that was an original goal. I know that, for Zope and ZEO,
a single file is used for zdaemon and application options. Presumably
an application ignores options it doesn't use, but I don't understand how
this works.
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