Dieter Maurer wrote:
Jim Fulton wrote at 2006-3-5 13:56 -0500:

...
Why do you think it's better to have to create a monolithic schema for all
applications bits that want to use the configuration file, rather than letting
individual applications define how to read their own data independently?


You already can do this now with ZConfig -- no need for
a monolithic schema:

  I recently implemented a ZServer based NNTP server.
  There was no monolithic schema required. The new "sectiontype"
  was described in "NNTPServer/component.xml", the configuration
  file simply imported the package and decribed the NNTP-Server.


Formerly, this was possible only for a few abstract types
with corresponding multisections (such as servers, storages, ...).

In modern Zope[2] schemas, there is a general purpose abstract type
precisely for this kind of extensions.

Where is this documented?

Let's pursue this a bit.

Would it be possible to write a configuration file that loaded
it's own schemas?  For example, suppose I wanted to configure
zope and twisted, could I do something like:

  import zope.app.appsetup
  import zope.app.twisted
  import zope.testrunner

  site-definition site.zcml

  interrupt-check-interval 200

  <server>
    type HTTP
    address 8080
  </server>

  <zodb>
    <filestorage>
      path Data.fs
    </filestorage>
  </zodb>

  <accesslog>

    <logfile>
      path access.log
    </logfile>
  </accesslog>

  <eventlog>

    <logfile>
      path z3.log
    </logfile>

    <logfile>
      path STDOUT
    </logfile>
  </eventlog>

  tests-pattern f?tests$
  tests-path src
  module-pattern 
!^(ZConfig|BTrees|persistent|ThreadedAsync|transaction|ZEO|ZODB|twisted|zdaemon|zope[.]testing|)[.]


Then free the main program from having
to specify a schema?

If so, how do I make this so?  Being able to do this *soon* would help
me make progress on simpler Zope packaging and simpler server support.

Jim

--
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
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to