[Zope3-checkins] CVS: Zope3/doc/zcml/namespaces.zope.org/zope - include.stx:1.3
Marius Gedminas
mgedmin@codeworks.lt
Thu, 12 Dec 2002 11:47:13 -0500
Update of /cvs-repository/Zope3/doc/zcml/namespaces.zope.org/zope
In directory cvs.zope.org:/tmp/cvs-serv3327/doc/zcml/namespaces.zope.org/zope
Modified Files:
include.stx
Log Message:
Allow <include package="foo.bar.*" /> in zcml. This will include every
subpackage of foo.bar which contains a 'configure.zcml' file.
=== Zope3/doc/zcml/namespaces.zope.org/zope/include.stx 1.2 => 1.3 ===
--- Zope3/doc/zcml/namespaces.zope.org/zope/include.stx:1.2 Tue Jun 11 08:27:02 2002
+++ Zope3/doc/zcml/namespaces.zope.org/zope/include.stx Thu Dec 12 11:46:43 2002
@@ -2,18 +2,28 @@
Attributes
- * package, optional, a dotted name of the Python Package to include from
+ * package, optional, a dotted name of the Python Package to include from.
+ If the name ends in '.*', the appropriately named zcml files from all
+ direct subpackages of the given package are included (subpackages that do
+ not have appropriately named files are skipped without producing an error).
+
+ * file, optional, the filename of the zcml file to include (configure.zcml by
+ default)
- * file, the filename of the zcml file to include
-
Example
Including the Contact zcml file from the ZopeProducts.Contact package::
-
+
<include package=".Contact" file="Contact.zcml" />
-
+
Another spelling of the same thing::
-
+
<include package="ZopeProducts.Contact" file="Contact.zcml" />
-
-
+
+ Including every package in ZopeProducts::
+
+ <include package="ZopeProducts.*" />
+
+ Including meta.zcml from every subpackage of the current package::
+
+ <include package=".*" file="meta.zcml" />