[Zope3-checkins] SVN: Zope3/trunk/ Usage example of meta:provides and zcml:condition.

Marius Gedminas marius at pov.lt
Sun Feb 20 12:02:42 EST 2005


Log message for revision 29228:
  Usage example of meta:provides and zcml:condition.
  
  As a result, you can now use zwiki and bugtracker even if you remove apidoc.
  
  

Changed:
  U   Zope3/trunk/package-includes/apidoc-meta.zcml
  U   Zope3/trunk/src/bugtracker/configure.zcml
  U   Zope3/trunk/src/zwiki/configure.zcml

-=-
Modified: Zope3/trunk/package-includes/apidoc-meta.zcml
===================================================================
--- Zope3/trunk/package-includes/apidoc-meta.zcml	2005-02-20 17:00:37 UTC (rev 29227)
+++ Zope3/trunk/package-includes/apidoc-meta.zcml	2005-02-20 17:02:42 UTC (rev 29228)
@@ -1,4 +1,5 @@
-<configure>
+<configure xmlns:meta="http://namespaces.zope.org/meta">
   <include package="zope.app.apidoc.classmodule" file="meta.zcml"/>
   <include package="zope.app.apidoc.bookmodule" file="meta.zcml"/>
-</configure>
\ No newline at end of file
+  <meta:provides feature="apidoc" />
+</configure>

Modified: Zope3/trunk/src/bugtracker/configure.zcml
===================================================================
--- Zope3/trunk/src/bugtracker/configure.zcml	2005-02-20 17:00:37 UTC (rev 29227)
+++ Zope3/trunk/src/bugtracker/configure.zcml	2005-02-20 17:02:42 UTC (rev 29228)
@@ -4,6 +4,7 @@
    xmlns:mail="http://namespaces.zope.org/mail"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    xmlns:apidoc="http://namespaces.zope.org/apidoc"
+   xmlns:zcml="http://namespaces.zope.org/zcml"
    i18n_domain="bugtracker"
    >
 
@@ -384,6 +385,6 @@
   <i18n:registerTranslations directory="locales" />
 
   <!-- Register application with API Doc Tool -->
-  <apidoc:rootModule module="bugtracker" />
+  <apidoc:rootModule module="bugtracker" zcml:condition="have apidoc" />
 
 </configure>

Modified: Zope3/trunk/src/zwiki/configure.zcml
===================================================================
--- Zope3/trunk/src/zwiki/configure.zcml	2005-02-20 17:00:37 UTC (rev 29227)
+++ Zope3/trunk/src/zwiki/configure.zcml	2005-02-20 17:02:42 UTC (rev 29228)
@@ -2,6 +2,7 @@
    xmlns="http://namespaces.zope.org/zope"
    xmlns:mail="http://namespaces.zope.org/mail"
    xmlns:apidoc="http://namespaces.zope.org/apidoc"
+   xmlns:zcml="http://namespaces.zope.org/zcml"
    i18n_domain="zope"
    >
 
@@ -278,6 +279,6 @@
   <include package=".browser" />
 
   <!-- Register application with API Doc Tool -->
-  <apidoc:rootModule module="zwiki" />
+  <apidoc:rootModule module="zwiki" zcml:condition="have apidoc" />
 
 </configure>



More information about the Zope3-Checkins mailing list