The "import" element of ZConfig schemas is inhomogenous:

  *  with a "package" attribute it imports a component
     from a Python package

  *  with an "src" attribute it imports a schema
     from an URL

It would be better if the type of the imported
object (schema or component) were orthogonal
to the location from where the object is found
(in a package or via an URL).

A use case is the import of the section types
defined in "Zope.Startup.zopeschema.xml" for
other ZEO applications that require access to the
same ZODB database(s). It is far more
convenient to access this schema via "package"+"file"
than an URL.

The attached patch adds an additional "type" attribute
to the "import" element. It can take values "schema"
or "component" and determines the type of object to
be imported. Its default value ("") is handled to
provide backward compatibility.


Attachment: zconfig_import.pat
Description: ZConfig patch to make 'import' more orthogonal with respect to type of imported object and import location

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to