zopefoundation / Zope

Zope is an open-source web application server.
https://zope.readthedocs.io
Other
357 stars 101 forks source link

Please provide some information about the entries in the documentation. #1072

Closed me-kell closed 1 year ago

me-kell commented 1 year ago

Please provide some information about the entries in the documentation Configuring and Running Zope and specially the Zope configuration reference.

What is the meaning of the following (marked in red border) lines (see image below)? They repeat but sometimes there is no explanation.

Are they headings, directives or ...?

Are there somewhere documented? Is there some documentation how to configure zope.conf?

I've read and re-read Configuring and Running Zope and specially the Zope configuration reference but find not really usefull to understand how to configure zope.conf

image

d-maurer commented 1 year ago

What is the meaning of the following (marked in red border) lines (see image below)? They repeat but sometimes there is no explanation.

Are they headings, directives or ...?

They are (ZConfig) abstract types.

As you might know, Zope uses the advanced configuration facility ZConfig (you should find detailed documentation on the WEB).

Zope's base configuration schema is Zope2.Startup:wsgischema.xml. You find there the definition of zope.product.base as abstracttype and derived from it the sectiontype product-config. You use a sectiontype's name as section in the configuration file, e.g.

  <product-config timelogging>
     filebase $CLIENTHOME/requests
  </product-config>

As you can see, wsgischema.xml contains <import package="ZODB"/> which includes ZODB:component.xml. This defines the abstract types ZODB.storage and ZODB.database. In the Zope configuration file, you will typically use filestorage or zeoclient as section types derived from ZODB.storage and zodb_db as section type derived from ZODB.database.

me-kell commented 1 year ago

@d-maurer Thanks a lot for the very valuable explanation.

I still have a question. What is the meaning of * and + after? Do they mean "0..n" and "1..n"? And what does two consecutive lines with zodb.storage* mean?

zodb.storage*
zodb.storage*
zodb.database+
d-maurer commented 1 year ago

me-kell wrote at 2022-12-4 04:02 -0800:

@d-maurer Thanks a lot for the very valuable explanation.

I still have a question. What is the meaning of * and + after? Do they mean "0..n" and "1..n"?

You would like to consult the ZConfig documentation, especially writing-schema.rst.

For the section element you find there: ... name (basic-key) The name of the section, as it must be given in a configuration instance, , or +. If the value is or this attribute is omitted, any name not already specified as a key may be used. If the value is or +, the attribute attribute must be specified. If the value is , any name is allowed, or the name may be omitted. If the value is +, any name is allowed, but some name must be provided.

And what does two consecutive lines with zodb.storage* mean? Each stand for an arbitrary instance of a zodb.storage section. The * suffix was used to indicate that you can name the section (with a name not yet used) or omit it.

Something similar applies to zodb.database+: it indicates an instance of a zodb.database section; the suffix + indicates that you must explicitly name the section (with a name not already used).

In short: the + and * occurences in the example indicate how the corresponding sections can be named.

me-kell commented 1 year ago

@d-maurer Thank you very much indeed!

dataflake commented 1 year ago

Looks like the question is answered.