Dieter Maurer wrote:
Jim Fulton wrote at 2006-3-11 18:03 -0500:
Where is this documented?
I do not know. I saw a feature description in the mailing list.
Fred and Tres (the authors) should be able to tell you whether
there is a formal documentation and where you can find it.
Let's pursue this a bit.
Would it be possible to write a configuration file that loaded
it's own schemas?
Yes -- with some restrictions: as I described in my previous mail.
The feature essentially works as follows:
You have an abstract section type in your primary
schema, usually usable in a multisection.
Examples: ZServer server, ZODB storage, the general extension
abstract section type
In your module/package, you define your own section type
implementing the abstract section type in its "component.xml".
You are completely free in its keys and subsections.
In the configuration file, you import your module/package (which
makes available the definitions in its "component.xml") and
instantiate one or more of the section types defined there.
Your application/module looks for the sections of "its" type
and uses them.
The restriction: you cannot have new keys on the top level -- all
must be nested in a section type defined by your "component.xml".
But, this, I consider an advantage (ZConfig here behave similar
to a "ConfigParser" approach).
So the example I gave won't work. In a schema, I have to have an
abstract type for each thing I might want to add. But I don't know what
I want to add. This doesn't sound very extensible.
I can't fathom the ZConfig documentation so I don't really know what
an abstract type is. I don't know how restrictive it has to be.
Can I define an abstract type that matched anything?
Can I define a schema that just defines an abstract type that
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
Zope3-dev mailing list