[Zope-dev] [ZConfig] "import" inhomogenous
Dieter Maurer
dieter at handshake.de
Tue Feb 17 13:10:18 EST 2004
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.
--
Dieter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zconfig_import.pat
Type: application/x-path
Size: 1580 bytes
Desc: ZConfig patch to make 'import' more orthogonal with
respect to type of imported object and import location
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20040217/5b6f2068/zconfig_import.bin
More information about the Zope-Dev
mailing list