[Checkins] SVN: Zope3/trunk/src/ Merge philikon-reduce-zcml branch: Implementation of

Philipp von Weitershausen philikon at philikon.de
Sun Mar 19 11:27:51 EST 2006


Log message for revision 66068:
  Merge philikon-reduce-zcml branch: Implementation of
  http://dev.zope.org/Zope3/ReducingTheAmountOfZCMLDirectives.
  

Changed:
  U   Zope3/trunk/src/buddydemo/configure.zcml
  U   Zope3/trunk/src/bugtracker/configure.zcml
  U   Zope3/trunk/src/bugtracker/vocabulary.py
  U   Zope3/trunk/src/z3checkins/configure.zcml
  U   Zope3/trunk/src/zope/app/apidoc/zcmlmodule/README.txt
  U   Zope3/trunk/src/zope/app/applicationcontrol/configure.zcml
  U   Zope3/trunk/src/zope/app/authentication/configure.zcml
  U   Zope3/trunk/src/zope/app/authentication/groupfolder.zcml
  U   Zope3/trunk/src/zope/app/authentication/password.py
  U   Zope3/trunk/src/zope/app/authentication/password.zcml
  U   Zope3/trunk/src/zope/app/authentication/principalfolder.zcml
  U   Zope3/trunk/src/zope/app/authentication/vocabulary.py
  U   Zope3/trunk/src/zope/app/broken/configure.zcml
  U   Zope3/trunk/src/zope/app/cache/caching.py
  U   Zope3/trunk/src/zope/app/cache/configure.zcml
  U   Zope3/trunk/src/zope/app/catalog/configure.zcml
  U   Zope3/trunk/src/zope/app/component/configure.zcml
  U   Zope3/trunk/src/zope/app/component/contentdirective.py
  U   Zope3/trunk/src/zope/app/component/meta.zcml
  U   Zope3/trunk/src/zope/app/component/metaconfigure.py
  U   Zope3/trunk/src/zope/app/component/metadirectives.py
  U   Zope3/trunk/src/zope/app/component/tests/test_contentdirective.py
  U   Zope3/trunk/src/zope/app/component/tests/test_directives.py
  U   Zope3/trunk/src/zope/app/component/vocabulary.py
  U   Zope3/trunk/src/zope/app/container/browser/ftests/configure.zcml
  U   Zope3/trunk/src/zope/app/container/configure.zcml
  U   Zope3/trunk/src/zope/app/content/__init__.py
  U   Zope3/trunk/src/zope/app/content/configure.zcml
  U   Zope3/trunk/src/zope/app/demo/hellopackage/configure.zcml
  U   Zope3/trunk/src/zope/app/demo/hellopackage/configure_bare.zcml
  U   Zope3/trunk/src/zope/app/demo/insensitivefolder/__init__.py
  U   Zope3/trunk/src/zope/app/demo/insensitivefolder/configure.zcml
  U   Zope3/trunk/src/zope/app/demo/itemvocabulary/configure.zcml
  U   Zope3/trunk/src/zope/app/demo/jobboard/configure.zcml
  U   Zope3/trunk/src/zope/app/demo/passwdauth/configure.zcml
  U   Zope3/trunk/src/zope/app/demo/widget/boolwidget.zcml
  U   Zope3/trunk/src/zope/app/demo/widget/configure.zcml
  U   Zope3/trunk/src/zope/app/demo/widget/intwidget.zcml
  U   Zope3/trunk/src/zope/app/demo/widget/textareawidget.zcml
  U   Zope3/trunk/src/zope/app/demo/widget/textwidget.zcml
  U   Zope3/trunk/src/zope/app/dtmlpage/configure.zcml
  U   Zope3/trunk/src/zope/app/error/__init__.py
  U   Zope3/trunk/src/zope/app/error/configure.zcml
  U   Zope3/trunk/src/zope/app/externaleditor/configure.zcml
  U   Zope3/trunk/src/zope/app/file/configure.zcml
  U   Zope3/trunk/src/zope/app/folder/configure.zcml
  U   Zope3/trunk/src/zope/app/http/configure.zcml
  U   Zope3/trunk/src/zope/app/i18n/configure.zcml
  U   Zope3/trunk/src/zope/app/i18n/locales.zcml
  U   Zope3/trunk/src/zope/app/i18nfile/configure.zcml
  U   Zope3/trunk/src/zope/app/interface/configure.zcml
  U   Zope3/trunk/src/zope/app/interface/vocabulary.py
  U   Zope3/trunk/src/zope/app/mail/configure.zcml
  A   Zope3/trunk/src/zope/app/mail/vocabulary.py
  U   Zope3/trunk/src/zope/app/meta.zcml
  U   Zope3/trunk/src/zope/app/onlinehelp/configure.zcml
  U   Zope3/trunk/src/zope/app/pagetemplate/configure.zcml
  U   Zope3/trunk/src/zope/app/pluggableauth/configure.zcml
  U   Zope3/trunk/src/zope/app/presentation/configure.zcml
  U   Zope3/trunk/src/zope/app/publisher/browser/configure.zcml
  U   Zope3/trunk/src/zope/app/publisher/browser/menumeta.py
  U   Zope3/trunk/src/zope/app/publisher/browser/meta.zcml
  U   Zope3/trunk/src/zope/app/publisher/browser/viewmeta.py
  A   Zope3/trunk/src/zope/app/publisher/browser/vocabulary.py
  U   Zope3/trunk/src/zope/app/publisher/http.zcml
  U   Zope3/trunk/src/zope/app/pythonpage/configure.zcml
  U   Zope3/trunk/src/zope/app/rdb/configure.zcml
  U   Zope3/trunk/src/zope/app/rdb/gadflyda.zcml
  U   Zope3/trunk/src/zope/app/renderer/configure.zcml
  U   Zope3/trunk/src/zope/app/renderer/meta.zcml
  U   Zope3/trunk/src/zope/app/renderer/metaconfigure.py
  U   Zope3/trunk/src/zope/app/renderer/plaintext.py
  U   Zope3/trunk/src/zope/app/renderer/rest.py
  U   Zope3/trunk/src/zope/app/renderer/stx.py
  U   Zope3/trunk/src/zope/app/renderer/vocabulary.py
  UU  Zope3/trunk/src/zope/app/schema/__init__.py
  U   Zope3/trunk/src/zope/app/schema/configure.zcml
  U   Zope3/trunk/src/zope/app/schema/fields.zcml
  U   Zope3/trunk/src/zope/app/schema/interfaces.py
  U   Zope3/trunk/src/zope/app/schema/meta.zcml
  U   Zope3/trunk/src/zope/app/schema/metaconfigure.py
  U   Zope3/trunk/src/zope/app/schema/metadirectives.py
  U   Zope3/trunk/src/zope/app/schema/tests/keywords_vocab.zcml
  U   Zope3/trunk/src/zope/app/schema/tests/simple_vocab.zcml
  U   Zope3/trunk/src/zope/app/schema/tests/test_directives.py
  U   Zope3/trunk/src/zope/app/schema/tests/test_fieldfactory.zcml
  U   Zope3/trunk/src/zope/app/schema/vocabulary.py
  U   Zope3/trunk/src/zope/app/schemacontent/configure.zcml
  U   Zope3/trunk/src/zope/app/security/_protections.zcml
  U   Zope3/trunk/src/zope/app/security/configure.zcml
  U   Zope3/trunk/src/zope/app/security/vocabulary.py
  U   Zope3/trunk/src/zope/app/securitypolicy/configure.zcml
  U   Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py
  U   Zope3/trunk/src/zope/app/session/configure.zcml
  D   Zope3/trunk/src/zope/app/site/meta.zcml
  D   Zope3/trunk/src/zope/app/site/metaconfigure.py
  U   Zope3/trunk/src/zope/app/sqlscript/configure.zcml
  U   Zope3/trunk/src/zope/app/sqlscript/sqlscript.py
  U   Zope3/trunk/src/zope/app/undo/configure.zcml
  U   Zope3/trunk/src/zope/app/workflow/configure.zcml
  U   Zope3/trunk/src/zope/app/workflow/definition.py
  U   Zope3/trunk/src/zope/app/workflow/stateful/configure.zcml
  U   Zope3/trunk/src/zope/app/workflow/stateful/definition.py
  U   Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml
  U   Zope3/trunk/src/zope/app/zptpage/configure.zcml
  A   Zope3/trunk/src/zope/modulealias/README.txt
  U   Zope3/trunk/src/zope/modulealias/metaconfigure.py
  U   Zope3/trunk/src/zope/modulealias/tests/test_modulealias.py
  U   Zope3/trunk/src/zwiki/__init__.py
  U   Zope3/trunk/src/zwiki/configure.zcml

-=-
Modified: Zope3/trunk/src/buddydemo/configure.zcml
===================================================================
--- Zope3/trunk/src/buddydemo/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/buddydemo/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -7,14 +7,14 @@
 
 <i18n:registerTranslations directory="locales" />
 
-<content class=".buddy.Buddy">
+<class class=".buddy.Buddy">
    <implements 
        interface="zope.app.annotation.IAttributeAnnotatable" />
    <require permission="zope.View"
             interface=".interfaces.IBuddy" />
    <require permission="zope.ManageContent"
             set_schema=".interfaces.IBuddy" />
-</content>
+</class>
 
 <browser:page
     for=".interfaces.IBuddy"
@@ -48,9 +48,9 @@
     view="AddBuddy.html"
     />
 
-<content class=".stubpostal.Info">
+<class class=".stubpostal.Info">
   <allow interface=".interfaces.IPostalInfo" />
-</content>
+</class>
 
 <utility
     factory=".stubpostal.Lookup"
@@ -81,14 +81,14 @@
       />
 </browser:pages>
 
-<content class=".buddy.BuddyFolder">
+<class class=".buddy.BuddyFolder">
   <require permission="zope.View"
            interface="zope.app.container.interfaces.IReadContainer"
            />
   <require permission="zope.ManageContent"
            interface="zope.app.container.interfaces.IWriteContainer"
            />
-</content>
+</class>
 
 <browser:addMenuItem
     title="Buddy Folder"

Modified: Zope3/trunk/src/bugtracker/configure.zcml
===================================================================
--- Zope3/trunk/src/bugtracker/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/bugtracker/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -90,72 +90,77 @@
 
   <!-- Setting up the vocabularies for the bug tracker -->  
 
-  <vocabulary
+  <utility
+     component=".vocabulary.StatusVocabulary"
      name="Stati"
-     factory=".vocabulary.StatusVocabulary" />
+     />
 
-  <vocabulary
+  <utility
+     component=".vocabulary.ReleaseVocabulary"
      name="Releases"
-     factory=".vocabulary.ReleaseVocabulary" />
+     />
 
-  <vocabulary
+  <utility
+     component=".vocabulary.PriorityVocabulary"
      name="Priorities"
-     factory=".vocabulary.PriorityVocabulary" />
+     />
 
-  <vocabulary
+  <utility
+     component=".vocabulary.BugTypeVocabulary"
      name="BugTypes"
-     factory=".vocabulary.BugTypeVocabulary" />
+     />
 
-  <vocabulary
+  <utility
+     component=".vocabulary.UserVocabulary"
      name="Users"
-     factory=".vocabulary.UserVocabulary" />
+     />
 
-  <content class=".vocabulary.ManagableVocabulary">
+  <class class=".vocabulary.ManagableVocabulary">
     <allow interface="zope.schema.interfaces.IVocabularyTokenized"/>
     <allow attributes="default title"/>
     <require
         permission="bugtracker.ManageBugTracker"
         attributes="add delete"
         set_attributes="default"/>
-  </content>
+  </class>
 
-  <content class=".vocabulary.StatusVocabulary">
+  <class class=".vocabulary.StatusVocabulary">
     <require like_class=".vocabulary.ManagableVocabulary"/>    
-  </content>
+  </class>
 
-  <content class=".vocabulary.PriorityVocabulary">
+  <class class=".vocabulary.PriorityVocabulary">
     <require like_class=".vocabulary.ManagableVocabulary"/>    
-  </content>
+  </class>
 
-  <content class=".vocabulary.ReleaseVocabulary">
+  <class class=".vocabulary.ReleaseVocabulary">
     <require like_class=".vocabulary.ManagableVocabulary"/>    
-  </content>
+  </class>
 
-  <content class=".vocabulary.BugTypeVocabulary">
+  <class class=".vocabulary.BugTypeVocabulary">
     <require like_class=".vocabulary.ManagableVocabulary"/>    
-  </content>
+  </class>
 
-  <content class=".vocabulary.SimpleTerm">
+  <class class=".vocabulary.SimpleTerm">
     <allow interface="zope.schema.interfaces.ITokenizedTerm"/>
     <allow attributes="title"/>
-  </content>
+  </class>
 
-  <content class=".vocabulary.UserVocabulary">
+  <class class=".vocabulary.UserVocabulary">
     <allow interface="zope.schema.interfaces.IVocabularyTokenized"/>
-  </content>
+  </class>
 
-  <content class=".vocabulary.UserTerm">
+  <class class=".vocabulary.UserTerm">
     <allow
         interface="zope.schema.interfaces.ITokenizedTerm"/>
     <allow attributes="principal title"/>
-  </content>
+  </class>
 
-  <content class=".mail.MailSubscriptions">
+  <class class=".mail.MailSubscriptions">
     <require
         permission="bugtracker.EditBug"
         attributes="addSubscriptions removeSubscriptions" />
     <allow attributes="getSubscriptions" />
-  </content>
+  </class>
 
   <!-- Bug Tracker related configuration -->
 
@@ -164,7 +169,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".tracker.BugTracker">
+  <class class=".tracker.BugTracker">
 
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
@@ -190,7 +195,7 @@
         permission="zope.ManageContent"
         set_schema=".interfaces.IBugTracker" />
 
-  </content>
+  </class>
 
   <adapter 
       for=".interfaces.IBugTracker"
@@ -234,7 +239,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".bug.Bug">
+  <class class=".bug.Bug">
 
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"/>
@@ -260,14 +265,14 @@
         permission="bugtracker.AddBug"
         set_schema=".interfaces.IBug" />
 
-  </content>
+  </class>
 
   <adapter 
       factory=".bug.SearchableText"
       provides=".interfaces.ISearchableText"
       for=".interfaces.IBug" />
 
-  <content class=".bug.BugDependencyAdapter">
+  <class class=".bug.BugDependencyAdapter">
 
     <require
         permission="bugtracker.ViewBug"
@@ -279,7 +284,7 @@
                     addDependents deleteDependents" 
         set_schema=".interfaces.IBugDependencies"/>
 
-  </content>
+  </class>
 
   <adapter
       factory=".bug.BugDependencyAdapter"
@@ -296,15 +301,15 @@
 
   <!-- File and Image Attachment related configuration -->
 
-  <content class="zope.app.file.file.File">
+  <class class="zope.app.file.file.File">
     <implements 
         interface="bugtracker.interfaces.IAttachment" />
-  </content>
+  </class>
 
-  <content class="zope.app.file.image.Image">
+  <class class="zope.app.file.image.Image">
     <implements 
         interface="bugtracker.interfaces.IAttachment" />
-  </content>
+  </class>
 
 
   <!-- Comment related configuration -->
@@ -314,7 +319,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".comment.Comment">
+  <class class=".comment.Comment">
 
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"/>
@@ -332,7 +337,7 @@
         permission="bugtracker.AddComment"
         set_schema=".interfaces.IComment" />
 
-  </content>
+  </class>
 
 
   <!-- XML-RPC presentation -->

Modified: Zope3/trunk/src/bugtracker/vocabulary.py
===================================================================
--- Zope3/trunk/src/bugtracker/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/bugtracker/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -18,13 +18,14 @@
 from persistent import Persistent
 from persistent.dict import PersistentDict
 
-from zope.interface import implements
+from zope.interface import implements, classProvides
 from zope.schema.interfaces import ITokenizedTerm, ITitledTokenizedTerm
 from zope.schema.interfaces import IVocabulary, IVocabularyTokenized
 from zope.schema.vocabulary import getVocabularyRegistry
 from zope.security.proxy import removeSecurityProxy 
 
 from zope.app import zapi
+from zope.app.schema.interfaces import IVocabularyFactory
 from zope.app.annotation.interfaces import IAnnotatable, IAnnotations
 
 from bugtracker.interfaces import IManagableVocabulary, IBugTracker
@@ -131,8 +132,8 @@
 
 
 class StatusVocabulary(ManagableVocabulary):
-
     implements(IStatusVocabulary)
+    classProvides(IVocabularyFactory)
 
     key = 'bugtracker.status.values'
     interface = IBugTracker
@@ -141,8 +142,8 @@
 
 
 class ReleaseVocabulary(ManagableVocabulary):
-
     implements(IReleaseVocabulary)
+    classProvides(IVocabularyFactory)
 
     key = 'bugtracker.release.values'
     interface = IBugTracker
@@ -151,8 +152,8 @@
 
 
 class PriorityVocabulary(ManagableVocabulary):
-
     implements(IPriorityVocabulary)
+    classProvides(IVocabularyFactory)
 
     key = 'bugtracker.priority.values'
     interface = IBugTracker
@@ -161,8 +162,8 @@
 
 
 class BugTypeVocabulary(ManagableVocabulary):
-
     implements(IBugTypeVocabulary)
+    classProvides(IVocabularyFactory)
 
     key = 'bugtracke.bugtype.values'
     interface = IBugTracker
@@ -171,8 +172,8 @@
 
 
 class UserTerm(Persistent):
-
     implements(ITitledTokenizedTerm)
+    classProvides(IVocabularyFactory)
 
     def __init__(self, principal):
         # This is safe here, since we only read non-critical data
@@ -187,8 +188,8 @@
 
 
 class UserVocabulary(object):
-
     implements(IVocabulary, IVocabularyTokenized)
+    classProvides(IVocabularyFactory)
 
     def __init__(self, context):
         self.auth = zapi.principals()

Modified: Zope3/trunk/src/z3checkins/configure.zcml
===================================================================
--- Zope3/trunk/src/z3checkins/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/z3checkins/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -5,7 +5,7 @@
 
 <!-- CheckinMessage content object -->
 
-  <content class=".message.Message">
+  <class class=".message.Message">
 
     <require permission="zope.View"
              interface=".interfaces.IMessage" />
@@ -13,9 +13,9 @@
     <implements
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
 
-  </content>
+  </class>
 
-  <content class=".message.CheckinMessage">
+  <class class=".message.CheckinMessage">
 
     <require permission="zope.View"
              interface=".interfaces.ICheckinMessage" />
@@ -23,9 +23,9 @@
     <implements
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
 
-  </content>
+  </class>
 
-  <content class=".folder.CheckinFolder">
+  <class class=".folder.CheckinFolder">
 
      <require permission="zope.View"
               interface="zope.app.container.interfaces.IReadContainer" />
@@ -49,7 +49,7 @@
      <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
 
-  </content>
+  </class>
 
 <!-- Utilities -->
 

Modified: Zope3/trunk/src/zope/app/apidoc/zcmlmodule/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/zcmlmodule/README.txt	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/apidoc/zcmlmodule/README.txt	2006-03-19 16:27:42 UTC (rev 66068)
@@ -86,7 +86,7 @@
   >>> print '\n'.join([name for name, dir in ns.items()][:3])
   addMenuItem
   addform
-  addview
+  containerViews
 
 
 `quoteNS(ns)`

Modified: Zope3/trunk/src/zope/app/applicationcontrol/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/applicationcontrol/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/applicationcontrol/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -3,12 +3,12 @@
     i18n_domain="zope"
     >
 
-  <content
+  <class
       class=".applicationcontrol.ApplicationControl">
     <require
         permission="zope.ManageApplication"
         interface=".interfaces.IApplicationControl"/>
-  </content>
+  </class>
 
   <adapter 
       for=".interfaces.IApplicationControl"

Modified: Zope3/trunk/src/zope/app/authentication/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/authentication/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -22,15 +22,15 @@
     provides=".interfaces.IQueriableAuthenticator"
     factory=".authentication.QuerySchemaSearchAdapter" />
 
-  <vocabulary
-    name="CredentialsPlugins"
-    factory=".vocabulary.credentialsPlugins"
-   />
+  <utility
+      component=".vocabulary.credentialsPlugins"
+      name="CredentialsPlugins"
+      />
 
-  <vocabulary
-    name="AuthenticatorPlugins"
-    factory=".vocabulary.authenticatorPlugins"
-   />
+  <utility
+      component=".vocabulary.authenticatorPlugins"
+      name="AuthenticatorPlugins"
+      />
 
   <utility
       name="No Challenge if Authenticated"

Modified: Zope3/trunk/src/zope/app/authentication/groupfolder.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/groupfolder.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/authentication/groupfolder.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -5,7 +5,7 @@
     xmlns:i18n="http://namespaces.zope.org/i18n"
     >
 
-  <content class=".groupfolder.GroupInformation">
+  <class class=".groupfolder.GroupInformation">
       <require
           permission="zope.ManageServices"
           interface=".groupfolder.IGroupInformation
@@ -15,16 +15,16 @@
       <implements
           interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
           />
-  </content>
+  </class>
 
-  <content class=".groupfolder.GroupFolder">
+  <class class=".groupfolder.GroupFolder">
     <implements
         interface=".groupfolder.IGroupFolder" />
     <require
         permission="zope.ManageServices"
         interface="zope.app.container.interfaces.IContainer
                  zope.app.container.interfaces.INameChooser" />
-  </content>
+  </class>
 
   <adapter
       provides="zope.app.container.interfaces.INameChooser"

Modified: Zope3/trunk/src/zope/app/authentication/password.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/password.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/authentication/password.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -19,7 +19,9 @@
 import md5
 import sha
 
-from zope.interface import implements
+from zope.interface import implements, classProvides
+from zope.app.schema.interfaces import IVocabularyFactory
+from zope.app.component.vocabulary import UtilityVocabulary
 
 from zope.app.authentication.interfaces import IPasswordManager
 
@@ -102,3 +104,8 @@
     ("MD5", MD5PasswordManager()),
     ("SHA1", SHA1PasswordManager()),
 ]
+
+class PasswordManagerNamesVocabulary(UtilityVocabulary):
+    classProvides(IVocabularyFactory)
+    interface = IPasswordManager
+    nameOnly = True

Modified: Zope3/trunk/src/zope/app/authentication/password.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/password.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/authentication/password.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,11 +2,9 @@
     xmlns="http://namespaces.zope.org/zope"
     i18n_domain="zope">
 
-  <vocabulary
+  <utility
+    component=".password.PasswordManagerNamesVocabulary"
     name="Password Manager Names"
-    factory="zope.app.component.vocabulary.UtilityVocabulary"
-    interface="zope.app.authentication.interfaces.IPasswordManager"
-    nameOnly="True"
     />
 
   <class class=".password.PlainTextPasswordManager">

Modified: Zope3/trunk/src/zope/app/authentication/principalfolder.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/principalfolder.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/authentication/principalfolder.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -4,13 +4,13 @@
     i18n_domain="zope"
     >
 
-  <content class=".principalfolder.InternalPrincipal">
+  <class class=".principalfolder.InternalPrincipal">
     <require
         permission="zope.ManageServices"
         interface=".principalfolder.IInternalPrincipal"
         set_schema=".principalfolder.IInternalPrincipal"
         />
-  </content>
+  </class>
 
   <localUtility class=".principalfolder.PrincipalFolder">
 

Modified: Zope3/trunk/src/zope/app/authentication/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/authentication/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -26,6 +26,7 @@
 import zope.app.dublincore.interfaces
 from zope.app.component.interfaces import ILocalUtility
 from zope.app.i18n import ZopeMessageFactory as _
+from zope.app.schema.interfaces import IVocabularyFactory
 
 from zope.app.authentication import interfaces
 
@@ -89,6 +90,10 @@
     return _pluginVocabulary(
         context, interfaces.IAuthenticatorPlugin, 'authenticatorPlugins')
 
+interface.alsoProvides(authenticatorPlugins, IVocabularyFactory)
+
 def credentialsPlugins(context):
     return _pluginVocabulary(
         context, interfaces.ICredentialsPlugin, 'credentialsPlugins')
+
+interface.alsoProvides(credentialsPlugins, IVocabularyFactory)

Modified: Zope3/trunk/src/zope/app/broken/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/broken/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/broken/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,9 +1,9 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
-  <content class=".broken.Broken">
+  <class class=".broken.Broken">
     <allow interface="zope.app.annotation.interfaces.IAnnotations" />
     <allow attributes="__module__" />
-  </content>
+  </class>
 
   <subscriber
       handler=".broken.installBroken"

Modified: Zope3/trunk/src/zope/app/cache/caching.py
===================================================================
--- Zope3/trunk/src/zope/app/cache/caching.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/cache/caching.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,9 +17,12 @@
 """
 __docformat__ = 'restructuredtext'
 
+from zope.interface import classProvides
+from zope.component import ComponentLookupError
 from zope.app import zapi
 from zope.app.cache.interfaces import ICacheable, ICache
-from zope.component import ComponentLookupError
+from zope.app.component.vocabulary import UtilityVocabulary
+from zope.app.schema.interfaces import IVocabularyFactory
 
 def getCacheForObject(obj):
     """Returns the cache associated with `obj` or ``None``."""
@@ -37,3 +40,8 @@
         return zapi.getPath(obj)
     except (ComponentLookupError, TypeError):
         return None
+
+class CacheNamesVocabulary(UtilityVocabulary):
+    classProvides(IVocabularyFactory)
+    interface = ICache
+    nameOnly = True

Modified: Zope3/trunk/src/zope/app/cache/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/cache/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/cache/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -23,13 +23,11 @@
         />
   </localUtility>
 
-  <vocabulary
+  <utility
+      component=".caching.CacheNamesVocabulary"
       name="Cache Names"
-      factory="zope.app.component.vocabulary.UtilityVocabulary"
-      interface="zope.app.cache.interfaces.ICache"
-      nameOnly="True" />
+      />
 
-
   <!-- Include browser package -->
 
   <include package=".browser" />

Modified: Zope3/trunk/src/zope/app/catalog/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/catalog/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/catalog/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -22,11 +22,11 @@
         />
   </localUtility>
   
-  <content class=".catalog.ResultSet">
+  <class class=".catalog.ResultSet">
     <require
         attributes="__iter__ __len__"
         permission="zope.Public"/>
-  </content>
+  </class>
   
   <subscriber
       handler=".catalog.indexAdded"
@@ -50,7 +50,7 @@
       />
   
   
-  <content class=".field.FieldIndex">
+  <class class=".field.FieldIndex">
     <require
         permission="zope.ManageServices"
         interface=".interfaces.IAttributeIndex
@@ -58,9 +58,9 @@
                   "
         set_schema=".interfaces.IAttributeIndex"
         />
-  </content>
+  </class>
   
-  <content class=".text.TextIndex">
+  <class class=".text.TextIndex">
     <require
         permission="zope.ManageServices"
         interface=".interfaces.IAttributeIndex
@@ -68,7 +68,7 @@
                   "
         set_schema=".interfaces.IAttributeIndex"
         />
-  </content>
+  </class>
   
   <include package=".browser" />
 

Modified: Zope3/trunk/src/zope/app/component/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/component/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -5,7 +5,7 @@
 
   <!-- Registration Framework -->
 
-  <content class=".registration.RegistrationManager">
+  <class class=".registration.RegistrationManager">
     <factory
         id="zope.app.component.RegistrationManager"
         title="Registration Manager" />
@@ -19,7 +19,7 @@
                    zope.app.container.interfaces.INameChooser" 
         attributes="addRegistration"
         />
-  </content>
+  </class>
 
   <!-- ++registrations++ namespace registrations -->
   <view
@@ -77,7 +77,7 @@
     <allow attributes="ISite" />
   </module>
 
-  <content class=".site.LocalSiteManager">
+  <class class=".site.LocalSiteManager">
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
     <require
@@ -87,27 +87,27 @@
         permission="zope.ManageSite"
         interface="zope.component.interfaces.ISiteManager
                    zope.app.container.interfaces.IWriteContainer" />
-  </content>
+  </class>
 
   <!-- TODO: We allow these attributes to be changed. We need some subscriber
        that updated the registries once attributes change. -->
-  <content class=".site.AdapterRegistration">
+  <class class=".site.AdapterRegistration">
     <require
         permission="zope.ManageSite"
         interface=".interfaces.IAdapterRegistration"
         set_schema=".interfaces.IAdapterRegistration"
         />
-  </content>
+  </class>
 
-  <content class=".site.UtilityRegistration">    
+  <class class=".site.UtilityRegistration">    
     <require
         permission="zope.ManageSite"
         interface=".interfaces.IUtilityRegistration"
         set_schema=".interfaces.IUtilityRegistration" 
         />
-  </content>
+  </class>
 
-  <content class=".site.SiteManagementFolder">
+  <class class=".site.SiteManagementFolder">
     <factory />
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
@@ -120,7 +120,7 @@
         interface="zope.app.container.interfaces.IWriteContainer"
         attributes="registrationManager" 
         />
-  </content>
+  </class>
   
   <adapter 
       for="zope.component.interfaces.ISiteManager"
@@ -160,15 +160,15 @@
 
   <!-- Vocabularies -->
 
-  <vocabulary
+  <utility
+      component=".vocabulary.InterfacesVocabulary"
       name="Interfaces"
-      factory=".vocabulary.UtilityVocabulary"
-      interface="zope.interface.interfaces.IInterface" />
+      />
 
-  <vocabulary
-    name="Utility Component Interfaces"
-    factory=".vocabulary.UtilityComponentInterfacesVocabulary" />
+  <utility
+      component=".vocabulary.UtilityComponentInterfacesVocabulary"
+      provides="zope.app.schema.interfaces.IVocabularyFactory"
+      name="Utility Component Interfaces"
+      />
 
 </configure>
-
-

Modified: Zope3/trunk/src/zope/app/component/contentdirective.py
===================================================================
--- Zope3/trunk/src/zope/app/component/contentdirective.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/contentdirective.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,4 +1,4 @@
-##############################################################################
+#############################################################################
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
@@ -17,8 +17,10 @@
 """
 __docformat__ = 'restructuredtext'
 
+import warnings
 from types import ModuleType
 from persistent.interfaces import IPersistent
+from zope.component.interfaces import IFactory
 from zope.component.factory import Factory
 from zope.interface import classImplements
 from zope.schema.interfaces import IField
@@ -31,7 +33,7 @@
 from zope.app.security.protectclass import protectLikeUnto, protectName
 from zope.app.security.protectclass import protectSetAttribute
 
-from metaconfigure import factory
+from zope.app.component.metaconfigure import utility
 
 PublicPermission = 'zope.Public'
 
@@ -44,7 +46,7 @@
     """Security-protection-specific exceptions."""
     pass
 
-class ContentDirective(object):
+class ClassDirective(object):
 
     def __init__(self, _context, class_):
         self.__id = dottedName(class_)
@@ -171,10 +173,20 @@
         # note factories are all in one pile, utilities and content,
         # so addable names must also act as if they were all in the
         # same namespace, despite the utilities/content division
-        factory(_context, factoryObj, id, title, description)
+        utility(_context, IFactory, factoryObj,
+                permission=PublicPermission, name=id)
 
+# BBB 2006/02/24, to be removed after 12 months
+class ContentDirective(ClassDirective):
 
-class LocalUtilityDirective(ContentDirective):
+    def __init__(self, _context, class_):
+        warnings.warn_explicit(
+            "The 'content' alias for the 'class' directive has been "
+            "deprecated and will be removed in Zope 3.5.\n",
+            DeprecationWarning, _context.info.file, _context.info.line)        
+        super(ContentDirective, self).__init__(_context, class_)
+
+class LocalUtilityDirective(ClassDirective):
     r"""localUtility directive handler.
 
     Examples:

Modified: Zope3/trunk/src/zope/app/component/meta.zcml
===================================================================
--- Zope3/trunk/src/zope/app/component/meta.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/meta.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -29,6 +29,7 @@
         handler="zope.app.component.metaconfigure.utility"
         />
 
+    <!-- BBB 2006/02/24, to be removed after 12 months -->
     <meta:directive
         name="factory"
         schema=".metadirectives.IFactoryDirective"
@@ -63,7 +64,7 @@
     <meta:complexDirective
         name="class"
         schema=".metadirectives.IClassDirective"
-        handler=".contentdirective.ContentDirective"
+        handler=".contentdirective.ClassDirective"
         >
 
       <meta:subdirective
@@ -88,6 +89,7 @@
 
     </meta:complexDirective>
 
+    <!-- BBB 2006/02/24, to be removed after 12 months -->
     <meta:complexDirective
         name="content"
         schema=".metadirectives.IClassDirective"

Modified: Zope3/trunk/src/zope/app/component/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/component/metaconfigure.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/metaconfigure.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -267,7 +267,22 @@
         args = (provides.__module__ + '.' + provides.getName(), provides)
                )
 
+# BBB 2006/02/24, to be removed after 12 months
 def factory(_context, component, id, title=None, description=None):
+    try:
+        dottedname = component.__module__ + "." + component.__name__
+    except AttributeError:
+        dottedname = '...'
+    warnings.warn_explicit(
+        "The 'factory' directive has been deprecated and will be "
+        "removed in Zope 3.5.  Use the 'utility' directive instead:\n"
+        '  <utility\n'
+        '      provides="zope.component.interfaces.IFactory"\n'
+        '      component="%s"\n'
+        '      name="%s"\n'
+        '      />' % (dottedname, id),
+        DeprecationWarning, _context.info.file, _context.info.line)
+    
     if title is not None:
         component.title = title
 

Modified: Zope3/trunk/src/zope/app/component/metadirectives.py
===================================================================
--- Zope3/trunk/src/zope/app/component/metadirectives.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/metadirectives.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -317,6 +317,7 @@
         required=False,
         )
 
+# BBB 2006/02/24, to be removed after 12 months
 class IFactoryDirective(zope.interface.Interface):
     """Define a factory"""
 

Modified: Zope3/trunk/src/zope/app/component/tests/test_contentdirective.py
===================================================================
--- Zope3/trunk/src/zope/app/component/tests/test_contentdirective.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/tests/test_contentdirective.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -49,9 +49,9 @@
       </configure>
       """ % s)
 
-class TestContentDirective(PlacelessSetup, unittest.TestCase):
+class TestClassDirective(PlacelessSetup, unittest.TestCase):
     def setUp(self):
-        super(TestContentDirective, self).setUp()
+        super(TestClassDirective, self).setUp()
         XMLConfig('meta.zcml', zope.app.component)()
         XMLConfig('meta.zcml', zope.app.security)()
 
@@ -62,8 +62,8 @@
 
     def testEmptyDirective(self):
         f = configfile("""
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
-</content>
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
+</class>
                        """)
         xmlconfig(f)
 
@@ -73,9 +73,9 @@
             "zope.app.component.tests.exampleclass.IExample"), None)
 
         f = configfile("""
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
   <implements interface="zope.app.component.tests.exampleclass.IExample" />
-</content>
+</class>
                        """)
         xmlconfig(f)
         self.failUnless(IExample.implementedBy(ExampleClass))
@@ -91,12 +91,12 @@
             "zope.app.component.tests.exampleclass.IExample2"), None)
 
         f = configfile("""
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
   <implements interface="
            zope.app.component.tests.exampleclass.IExample
            zope.app.component.tests.exampleclass.IExample2
                        " />
-</content>
+</class>
                        """)
         xmlconfig(f)
         self.failUnless(IExample.implementedBy(ExampleClass))
@@ -111,26 +111,26 @@
     def testRequire(self):
         f = configfile("""
 <permission id="zope.View" title="Zope view permission" />
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
     <require permission="zope.View"
                       attributes="anAttribute anotherAttribute" />
-</content>
+</class>
                        """)
         xmlconfig(f)
 
     def testAllow(self):
         f = configfile("""
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
     <allow attributes="anAttribute anotherAttribute" />
-</content>
+</class>
                        """)
         xmlconfig(f)
 
     def testMimic(self):
         f = configfile("""
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
     <require like_class="zope.app.component.tests.exampleclass.ExampleClass" />
-</content>
+</class>
                        """)
         xmlconfig(f)
 
@@ -145,13 +145,13 @@
         f = configfile("""
 <permission id="zope.Foo" title="Zope Foo Permission" />
 
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
   <factory
       id="test.Example"
       title="Example content"
       description="Example description"
       />
-</content>
+</class>
                        """)
         xmlconfig(f)
         factory = zapi.getUtility(IFactory, 'test.Example')
@@ -162,12 +162,12 @@
         f = configfile("""
 <permission id="zope.Foo" title="Zope Foo Permission" />
 
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
     <factory
       title="Example content"
       description="Example description"
     />
-</content>
+</class>
                        """)
         xmlconfig(f)
         self.assertRaises(ComponentLookupError, zapi.getUtility, IFactory, 
@@ -181,13 +181,13 @@
     def testFactoryPublicPermission(self):
 
         f = configfile("""
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
     <factory
       id="test.Example"
       title="Example content"
       description="Example description"
     />
-</content>
+</class>
             """)
         xmlconfig(f)
         factory = zapi.getUtility(IFactory, 'test.Example')
@@ -197,7 +197,7 @@
 def test_suite():
     suite = unittest.TestSuite()
     loader = unittest.TestLoader()
-    suite.addTest(loader.loadTestsFromTestCase(TestContentDirective))
+    suite.addTest(loader.loadTestsFromTestCase(TestClassDirective))
     suite.addTest(loader.loadTestsFromTestCase(TestFactorySubdirective))
     return suite
 

Modified: Zope3/trunk/src/zope/app/component/tests/test_directives.py
===================================================================
--- Zope3/trunk/src/zope/app/component/tests/test_directives.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/tests/test_directives.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -18,6 +18,7 @@
 import re
 import unittest
 import pprint
+import warnings
 from cStringIO import StringIO
 
 from zope.interface import Interface, implements
@@ -1366,8 +1367,11 @@
             ))
         self.assertRaises(ValueError, xmlconfig, config, testing=1)
 
+    # BBB 2006/02/24, to be removed after 12 months
     def testFactory(self):
-
+        def ignorewarning(message, category, filename, lineno, file=None):
+            pass
+        warnings.showwarning = ignorewarning
         self.assertRaises(ComponentLookupError, zapi.createObject, 'foo')
 
         xmlconfig(StringIO(template % (
@@ -1382,6 +1386,7 @@
         from factory import X
         self.assertEqual(zapi.createObject('foo.bar').__class__, X)
 
+        warnings.resetwarnings()
 
 class ParticipationStub(object):
 
@@ -1407,13 +1412,13 @@
     def testFactory(self):
         f = configfile('''
 <permission id="zope.Foo" title="Zope Foo Permission" />
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
+<class class="zope.app.component.tests.exampleclass.ExampleClass">
     <factory
       id="test.Example"
       title="Example content"
       description="Example description"
        />
-</content>''')
+</class>''')
         xmlconfig(f)
         obj = createObject('test.Example')
         self.failUnless(zapi.isinstance(obj, exampleclass.ExampleClass))
@@ -1481,11 +1486,11 @@
     # inherently sets the instances as well as the class attributes.
 
     def testSimpleMethodsPlural(self):
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 attributes="m1 m3"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1))
         self.assertDeclaration(declaration, m1P=P1, m3P=P1)
 
@@ -1503,11 +1508,11 @@
         self.assertSetattrState(**state)
 
     def test_set_attributes(self):
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 set_attributes="m1 m3"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1))
         apply_declaration(module.template_bracket % declaration)
         checker = selectChecker(module.test_instance)
@@ -1519,11 +1524,11 @@
 
         self.assertEqual(queryInterface(PREFIX+"S"), None)
 
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 set_schema="%s"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1, PREFIX+"S"))
         apply_declaration(module.template_bracket % declaration)
 
@@ -1543,11 +1548,11 @@
         self.assertEqual(queryInterface(PREFIX+"S"), None)
         self.assertEqual(queryInterface(PREFIX+"S2"), None)
 
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 set_schema="%s %s"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1, PREFIX+"S", PREFIX+"S2"))
         apply_declaration(module.template_bracket % declaration)
 
@@ -1569,11 +1574,11 @@
 
         self.assertEqual(queryInterface(PREFIX+"I"), None)
 
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 interface="%s"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1, PREFIX+"I"))
         # m1 and m2 are in the interface, so should be set, and m3 should not:
         self.assertDeclaration(declaration, m1P=P1, m2P=P1)
@@ -1587,12 +1592,12 @@
         self.assertEqual(queryInterface(PREFIX+"I3"), None)
         self.assertEqual(queryInterface(PREFIX+"I4"), None)
 
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 interface="  %s
                                              %s  "/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1, PREFIX+"I3", PREFIX+"I4"))
         self.assertDeclaration(declaration, m3P=P1, m2P=P1)
 
@@ -1606,10 +1611,10 @@
 
     def testCompositeNoPerm(self):
         # Establish rejection of declarations lacking a permission spec.
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 attributes="m1"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class"))
         self.assertRaises(ZopeXMLConfigurationError,
                           self.assertDeclaration,
@@ -1618,46 +1623,46 @@
 
 
     def testCompositeMethodsPluralElementPerm(self):
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 attributes="m1 m3"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1))
         self.assertDeclaration(declaration,
                                m1P=P1, m3P=P1)
 
     def testCompositeInterfaceTopPerm(self):
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 interface="%s"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1, PREFIX+"I"))
         self.assertDeclaration(declaration,
                                m1P=P1, m2P=P1)
 
 
     def testSubInterfaces(self):
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 interface="%s"/>
-                          </content>'''
+                          </class>'''
                        % (PREFIX+"test_class", P1, PREFIX+"I2"))
         # m1 and m2 are in the interface, so should be set, and m3 should not:
         self.assertDeclaration(declaration, m1P=P1, m2P=P1)
 
 
     def testMimicOnly(self):
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 attributes="m1 m2"/>
-                          </content>
-                          <content class="%s">
+                          </class>
+                          <class class="%s">
                             <require like_class="%s" />
-                          </content>
+                          </class>
                           ''' % (PREFIX+"test_base", P1,
                 PREFIX+"test_class", PREFIX+"test_base"))
         # m1 and m2 are in the interface, so should be set, and m3 should not:
@@ -1666,17 +1671,17 @@
 
 
     def testMimicAsDefault(self):
-        declaration = ('''<content class="%s">
+        declaration = ('''<class class="%s">
                             <require
                                 permission="%s"
                                 attributes="m1 m2"/>
-                          </content>
-                          <content class="%s">
+                          </class>
+                          <class class="%s">
                             <require like_class="%s" />
                             <require
                                 permission="%s"
                                 attributes="m2 m3"/>
-                          </content>
+                          </class>
                           ''' % (PREFIX+"test_base", P1,
                 PREFIX+"test_class", PREFIX+"test_base", P2))
 

Modified: Zope3/trunk/src/zope/app/component/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/component/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/component/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -19,7 +19,7 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.interface import implements, Interface
+from zope.interface import implements, classProvides, Interface
 from zope.interface.interfaces import IInterface
 from zope.interface.verify import verifyObject
 from zope.schema.interfaces import IVocabulary, IVocabularyTokenized
@@ -27,9 +27,10 @@
 
 from zope.app import zapi
 from zope.app.i18n import ZopeMessageFactory as _
+from zope.app.schema.interfaces import IVocabularyFactory
 from zope.app.interface.vocabulary import ObjectInterfacesVocabulary
 
-from interfaces import IUtilityRegistration
+from zope.app.component.interfaces import IUtilityRegistration
 
 
 class UtilityTerm(object):
@@ -93,7 +94,7 @@
     We are now ready to create a vocabulary that we can use; in our case
     everything is global, so the context is None.
 
-    >>> vocab = UtilityVocabulary(None, IObject)
+    >>> vocab = UtilityVocabulary(None, interface=IObject)
     >>> import pprint
     >>> pprint.pprint(vocab._terms.items())
     [(u'object1', <UtilityTerm object1, instance of Object>),
@@ -159,7 +160,8 @@
 
     >>> ztapi.provideUtility(IInterface, IObject,
     ...                      'zope.app.utility.vocabulary.IObject')
-    >>> vocab = UtilityVocabulary(None, 'zope.app.utility.vocabulary.IObject')
+    >>> vocab = UtilityVocabulary(
+    ...     None, interface='zope.app.utility.vocabulary.IObject')
     >>> pprint.pprint(vocab._terms.items())
     [(u'object1', <UtilityTerm object1, instance of Object>),
      (u'object2', <UtilityTerm object2, instance of Object>),
@@ -170,26 +172,36 @@
     case the UtilityTerm's value is not the utility itself but the name of the
     utility.
 
-    >>> vocab = UtilityVocabulary(None, IObject, nameOnly=True)
+    >>> vocab = UtilityVocabulary(None, interface=IObject, nameOnly=True)
     >>> pprint.pprint([term.value for term in vocab])
     [u'object1', u'object2', u'object3']
     """
-
     implements(IVocabularyTokenized)
+    classProvides(IVocabularyFactory)
 
-    def __init__(self, context, interface, nameOnly=False):
-        if nameOnly is not False:
-            nameOnly = True
-        if isinstance(interface, (str, unicode)):
-            interface = zapi.getUtility(IInterface, interface)
-        self.interface = interface
-        utils = zapi.getUtilitiesFor(interface, context)
-        self._terms = dict([(name, UtilityTerm(nameOnly and name or util, name))
-                            for name, util in utils])
+    # override these in subclasses
+    interface = Interface
+    nameOnly = False
 
+    def __init__(self, context, **kw):
+        if kw:
+            # BBB 2006/02/24, to be removed after 12 months
+            # the 'interface' and 'nameOnly' parameters are supposed to be
+            # set as class-level attributes in custom subclasses now.
+            self.nameOnly = bool(kw.get('nameOnly', False))
+            interface = kw.get('interface', Interface)
+            if isinstance(interface, (str, unicode)):
+                interface = zapi.getUtility(IInterface, interface)
+            self.interface = interface
+
+        utils = zapi.getUtilitiesFor(self.interface, context)
+        self._terms = dict(
+            (name, UtilityTerm(self.nameOnly and name or util, name))
+            for name, util in utils)
+
     def __contains__(self, value):
         """See zope.schema.interfaces.IBaseVocabulary"""
-        return value in [term.value for term in self._terms.values()]
+        return value in (term.value for term in self._terms.values())
 
     def getTerm(self, value):
         """See zope.schema.interfaces.IBaseVocabulary"""
@@ -217,8 +229,13 @@
         """See zope.schema.interfaces.IIterableVocabulary"""
         return len(self._terms)
 
+class InterfacesVocabulary(UtilityVocabulary):
+    classProvides(IVocabularyFactory)
+    interface = IInterface
 
+
 class UtilityComponentInterfacesVocabulary(ObjectInterfacesVocabulary):
+    classProvides(IVocabularyFactory)
 
     def __init__(self, context):
         if IUtilityRegistration.providedBy(context):

Modified: Zope3/trunk/src/zope/app/container/browser/ftests/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/ftests/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/container/browser/ftests/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,12 +2,12 @@
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser">
 
-  <content class=".test_contents.ReadOnlyContainer">
+  <class class=".test_contents.ReadOnlyContainer">
     <require
         permission="zope.ManageContent"
         interface="zope.app.container.interfaces.IReadContainer"
         />
-  </content>
+  </class>
 
   <browser:containerViews
       for="zope.app.container.interfaces.IReadContainer"

Modified: Zope3/trunk/src/zope/app/container/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/container/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/container/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -63,8 +63,8 @@
       factory=".contained.ContainerSublocations"
       />
 
-  <content class=".constraints.ItemTypePrecondition">
+  <class class=".constraints.ItemTypePrecondition">
     <allow interface=".constraints.IItemTypePrecondition" />
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/content/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/content/__init__.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/content/__init__.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -16,12 +16,17 @@
 $Id$
 """
 __docformat__ = 'restructuredtext'
+from zope.interface import classProvides
 from zope.app.interface import queryType
+from zope.app.schema.interfaces import IVocabularyFactory
 from zope.app.content.interfaces import IContentType
+from zope.app.component.vocabulary import UtilityVocabulary
 
 def queryContentType(object):
     """Returns the interface implemented by object which implements
     `IContentType`."""
     return queryType(object, IContentType)
 
-
+class ContentTypesVocabulary(UtilityVocabulary):
+    classProvides(IVocabularyFactory)
+    interface = IContentType

Modified: Zope3/trunk/src/zope/app/content/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/content/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/content/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,13 +2,12 @@
     xmlns="http://namespaces.zope.org/zope">
 
   <interface
-      interface="zope.app.content.interfaces.IContentType" />
+      interface="zope.app.content.interfaces.IContentType"
+      />
 
-  <vocabulary
+  <utility
+      component=".ContentTypesVocabulary"
       name="Content Types"
-      factory="zope.app.component.vocabulary.UtilityVocabulary"
-      interface="zope.app.content.interfaces.IContentType" />
+      />
 
 </configure>
-
-

Modified: Zope3/trunk/src/zope/app/demo/hellopackage/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/hellopackage/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/hellopackage/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -29,7 +29,7 @@
 
 This is defined by HelloClass in hellomodule.
 -->
-<content class=".hellomodule.HelloClass">
+<class class=".hellomodule.HelloClass">
   <implements 
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
       />
@@ -56,7 +56,7 @@
       permission="zope.View"
       attributes="getHello"
       />
-</content>
+</class>
 
 <!--
 Create a hello.html view for Hello object.

Modified: Zope3/trunk/src/zope/app/demo/hellopackage/configure_bare.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/hellopackage/configure_bare.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/hellopackage/configure_bare.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -6,7 +6,7 @@
    i18n_domain="hellopackage"
    >
 
-<content class=".hellomodule.HelloClass">
+<class class=".hellomodule.HelloClass">
   <factory
       id="hellopackage.Hello"
       title="Hello world"
@@ -16,7 +16,7 @@
       permission="zope.View"
       attributes="getHello"
       />
-</content>
+</class>
 
 <browser:page
     name="hello.html"

Modified: Zope3/trunk/src/zope/app/demo/insensitivefolder/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/demo/insensitivefolder/__init__.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/insensitivefolder/__init__.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,21 +17,22 @@
 """
 __docformat__ = 'restructuredtext'
 
+from zope.component import adapts
+from zope.component.interfaces import IFactory
+from zope.interface import implements, implementedBy
+from zope.interface import directlyProvides, directlyProvidedBy 
+from zope.publisher.interfaces import NotFound
+
 from zope.app import zapi
 from zope.app.folder import Folder
 from zope.app.folder.interfaces import IFolder
 from zope.app.container.traversal import ContainerTraverser
 from zope.app.container.interfaces import IReadContainer
-from zope.component.interfaces import IFactory
-from zope.interface import \
-     implements, implementedBy, directlyProvides, directlyProvidedBy 
-from zope.publisher.interfaces import NotFound
+from zope.app.i18n import ZopeMessageFactory as _
 
-
 class CaseInsensitiveContainerTraverser(ContainerTraverser):
+    adapts(IReadContainer)
 
-    __used_for__ = IReadContainer
-
     def publishTraverse(self, request, name):
         """See zope.publisher.interfaces.browser.IBrowserPublisher"""
         subob = self._guessTraverse(name) 
@@ -63,8 +64,8 @@
     """A Factory that creates case-insensitive Folders."""
     implements(IFactory)
 
-    title = "Case-Insensitive Folder Factory"
-    description = "A Factory that creates case-insensitive Folders."
+    title = _("Case insensitive Folder")
+    description = _("A simple case insensitive Folder.")
 
     def __call__(self):
         """See zope.component.interfaces.IFactory

Modified: Zope3/trunk/src/zope/app/demo/insensitivefolder/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/insensitivefolder/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/insensitivefolder/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -22,9 +22,10 @@
       />
 
 <!-- Case-insensitive Folder Registration -->
-<factory
-    id="zope.CaseInsensitiveFolder"
+<utility
     component=".caseInsensitiveFolderFactory"
+    name="zope.CaseInsensitiveFolder"
+    permission="zope.Public"
     />
 
 <browser:addMenuItem

Modified: Zope3/trunk/src/zope/app/demo/itemvocabulary/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/itemvocabulary/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/itemvocabulary/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -7,19 +7,19 @@
     name="Items"
     factory=".ItemVocabulary" />
 
-<content class=".ItemVocabulary">
+<class class=".ItemVocabulary">
   <allow interface="zope.schema.interfaces.IVocabulary"/>
   <allow interface="zope.schema.interfaces.IVocabularyTokenized"/>
-</content>
+</class>
 
-<content class=".ItemTerm">
+<class class=".ItemTerm">
   <allow interface="zope.schema.interfaces.ITokenizedTerm"/>
   <allow attributes="title"/>
-</content>
+</class>
 
 <!-- Sample Content Component and Views -->
 
-<content class=".browser.DefaultItemFolder">
+<class class=".browser.DefaultItemFolder">
   <require like_class="zope.app.content.folder.Folder"/>
 
   <require
@@ -29,7 +29,7 @@
   <require
       permission="zope.ManageContent"
       set_schema=".browser.IDefaultItem" />
-</content>
+</class>
 
 <browser:addMenuItem
     class=".browser.DefaultItemFolder"

Modified: Zope3/trunk/src/zope/app/demo/jobboard/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/jobboard/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/jobboard/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -5,7 +5,7 @@
     i18n_domain="jobboardi18n"
     >
 
-<content class="zope.app.demo.jobboard.job.JobList">
+<class class="zope.app.demo.jobboard.job.JobList">
   <implements interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
   />
   <factory
@@ -14,7 +14,7 @@
       />
   <allow interface=".interfaces.IJobList" />
   <implements interface="zope.app.container.interfaces.IItemContainer" />
-</content>
+</class>
 
 <browser:addMenuItem
     title="I18N Job Board"
@@ -23,9 +23,9 @@
     permission="zope.ManageContent"
     />
 
-<content class=".job.Job">
+<class class=".job.Job">
   <allow interface="zope.app.demo.jobboard.interfaces.IJob" />
-</content>
+</class>
 
 <browser:page
     name="index.html"

Modified: Zope3/trunk/src/zope/app/demo/passwdauth/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/passwdauth/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/passwdauth/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -3,7 +3,7 @@
     xmlns:browser="http://namespaces.zope.org/browser"
     i18n_domain="demo_passwdauth">
 
-<content class=".PasswdPrincipalSource">
+<class class=".PasswdPrincipalSource">
   <factory
       id="zope.app.principalsources.PasswdPrincipalSource"
       permission="zope.ManageServices"/>
@@ -11,7 +11,7 @@
   <require
       permission="zope.ManageContent"
       set_schema=".interfaces.IFileBasedPrincipalSource"/>
-</content>
+</class>
 
 <browser:addform
     schema=".interfaces.IFileBasedPrincipalSource" 

Modified: Zope3/trunk/src/zope/app/demo/widget/boolwidget.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/widget/boolwidget.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/widget/boolwidget.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,7 +2,7 @@
     xmlns="http://namespaces.zope.org/zope"
     i18n_domain="zope">
 
-  <content class=".boolwidget.DemoBoolWidget">
+  <class class=".boolwidget.DemoBoolWidget">
 
     <require permission="zope.View" 
         interface=".interfaces.IDemoBoolWidget"
@@ -12,6 +12,6 @@
         set_schema=".interfaces.IDemoBoolWidget"
         />
 
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/demo/widget/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/widget/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/widget/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -4,7 +4,7 @@
     xmlns:zcml="http://namespaces.zope.org/zcml"
     i18n_domain="zope">
 
-  <content class="zope.app.demo.widget.app.DemoWidgetContainer">
+  <class class="zope.app.demo.widget.app.DemoWidgetContainer">
 
     <implements 
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
@@ -15,7 +15,7 @@
     <require permission="zope.ManageContent" 
         interface="zope.app.container.interfaces.IWriteContainer" />
 
-  </content>
+  </class>
 
   <!-- demo widgets -->
   <include file="boolwidget.zcml" />

Modified: Zope3/trunk/src/zope/app/demo/widget/intwidget.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/widget/intwidget.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/widget/intwidget.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,7 +2,7 @@
     xmlns="http://namespaces.zope.org/zope"
     i18n_domain="zope">
 
-  <content class=".intwidget.DemoIntWidget">
+  <class class=".intwidget.DemoIntWidget">
 
     <require permission="zope.View" 
         interface=".interfaces.IDemoIntWidget"
@@ -12,6 +12,6 @@
         set_schema=".interfaces.IDemoIntWidget"
         />
 
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/demo/widget/textareawidget.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/widget/textareawidget.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/widget/textareawidget.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,7 +2,7 @@
     xmlns="http://namespaces.zope.org/zope"
     i18n_domain="zope">
 
-  <content class=".textareawidget.DemoTextAreaWidget">
+  <class class=".textareawidget.DemoTextAreaWidget">
 
     <require permission="zope.View" 
         interface=".interfaces.IDemoTextAreaWidget"
@@ -12,6 +12,6 @@
         set_schema=".interfaces.IDemoTextAreaWidget"
         />
 
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/demo/widget/textwidget.zcml
===================================================================
--- Zope3/trunk/src/zope/app/demo/widget/textwidget.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/demo/widget/textwidget.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,7 +2,7 @@
     xmlns="http://namespaces.zope.org/zope"
     i18n_domain="zope">
 
-  <content class=".textwidget.DemoTextWidget">
+  <class class=".textwidget.DemoTextWidget">
 
     <require permission="zope.View" 
         interface=".interfaces.IDemoTextWidget"
@@ -12,6 +12,6 @@
         set_schema=".interfaces.IDemoTextWidget"
         />
 
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/dtmlpage/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/dtmlpage/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/dtmlpage/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -9,7 +9,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".dtmlpage.DTMLPage">
+  <class class=".dtmlpage.DTMLPage">
     <factory
         id="zope.app.DTMLPage"
         title="DTML Page"
@@ -35,7 +35,7 @@
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
        />
-  </content>
+  </class>
 
   <adapter 
       for="zope.app.folder.interfaces.IFolder"

Modified: Zope3/trunk/src/zope/app/error/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/error/__init__.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/error/__init__.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,12 +1,29 @@
-# Make directory a package.
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Error logging utility
 
+$Id$
+"""
+from zope.app.error.error import RootErrorReportingUtility
+from zope.app.error.error import ErrorReportingUtility
+from zope.app.error.error import globalErrorReportingUtility
+
 ###############################################################################
 # BBB: 12/14/2004
+import sys
+sys.modules['zope.app.errorservice'] = sys.modules[__name__]
 
-from error import RootErrorReportingUtility
-from error import ErrorReportingUtility
-from error import globalErrorReportingUtility
-
 RootErrorReportingService = RootErrorReportingUtility
 ErrorReportingService = ErrorReportingUtility
 globalErrorReportingService = globalErrorReportingUtility

Modified: Zope3/trunk/src/zope/app/error/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/error/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/error/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,12 +1,6 @@
 <configure 
     xmlns="http://namespaces.zope.org/zope">
 
-  <!-- BBB: 12/15/2004 -->
-  <modulealias
-    module="zope.app.error"
-    alias="zope.app.errorservice" />
-
-
   <localUtility class=".error.ErrorReportingUtility">
     <factory
         id="zope.app.ErrorLogging"
@@ -21,7 +15,7 @@
         />
   </localUtility>
 
-  <content class=".error.RootErrorReportingUtility">
+  <class class=".error.RootErrorReportingUtility">
     <require
         permission="zope.Public"
         interface=".interfaces.IErrorReportingUtility"
@@ -30,7 +24,7 @@
         permission="zope.ManageServices"
         interface=".interfaces.ILocalErrorReportingUtility"
         />
-  </content>
+  </class>
 
   <utility
       provides=".interfaces.IErrorReportingUtility"

Modified: Zope3/trunk/src/zope/app/externaleditor/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/externaleditor/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/externaleditor/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -13,10 +13,10 @@
       permission="zope.View"
       />
 
-  <content class="zope.app.file.File">
+  <class class="zope.app.file.File">
     <implements
         interface="zope.app.externaleditor.interfaces.IExternallyEditable"
         />
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/file/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/file/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/file/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -24,7 +24,7 @@
 
   <!-- content classes -->
 
-  <content class=".file.File">
+  <class class=".file.File">
     <factory
         id="zope.app.content.File"
         title="File"
@@ -44,9 +44,9 @@
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
        />
-  </content>
+  </class>
 
-  <content class=".image.Image">
+  <class class=".image.Image">
     <factory
         id="zope.app.content.Image"
         title="Image"
@@ -66,7 +66,7 @@
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
         />
-  </content>
+  </class>
 
   <adapter
       factory=".image.ImageSized"

Modified: Zope3/trunk/src/zope/app/folder/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/folder/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/folder/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -8,7 +8,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".folder.Folder">
+  <class class=".folder.Folder">
     <factory
         id="zope.app.content.Folder"
         title="Folder"
@@ -29,7 +29,7 @@
         permission="zope.ManageContent"
         interface="zope.app.container.interfaces.IWriteContainer"
         />
-  </content>
+  </class>
 
   <adapter
       for=".interfaces.IFolder"

Modified: Zope3/trunk/src/zope/app/http/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/http/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/http/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,8 +1,8 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
-<content class=".put.NullResource">
+<class class=".put.NullResource">
   <allow interface="zope.app.http.interfaces.INullResource" />
-</content>
+</class>
 
 <view
   for="zope.app.container.interfaces.ISimpleReadContainer"

Modified: Zope3/trunk/src/zope/app/i18n/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/i18n/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/i18n/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -53,7 +53,7 @@
        />
 
   <!-- Setup Message Catalogs -->
-  <content class=".messagecatalog.MessageCatalog">
+  <class class=".messagecatalog.MessageCatalog">
     <factory id="zope.app.MessageCatalog" />
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
@@ -62,7 +62,7 @@
         interface="zope.i18n.interfaces.IMessageCatalog" />
     <require permission="zope.ManageSite"
         attributes="setMessage getMessageIds" />
-  </content>
+  </class>
 
 
   <!-- Setup Export and Import Filters -->

Modified: Zope3/trunk/src/zope/app/i18n/locales.zcml
===================================================================
--- Zope3/trunk/src/zope/app/i18n/locales.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/i18n/locales.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,57 +1,57 @@
 <configure
    xmlns="http://namespaces.zope.org/zope">
 
-  <content class="zope.i18n.format.NumberFormat">
+  <class class="zope.i18n.format.NumberFormat">
     <allow interface="zope.i18n.interfaces.INumberFormat" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.format.DateTimeFormat">
+  <class class="zope.i18n.format.DateTimeFormat">
     <allow interface="zope.i18n.interfaces.IDateTimeFormat" />
-  </content>
+  </class>
 
 
-  <content class="zope.i18n.locales.LocaleIdentity">
+  <class class="zope.i18n.locales.LocaleIdentity">
     <allow interface="zope.i18n.interfaces.locales.ILocaleIdentity" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleVersion">
+  <class class="zope.i18n.locales.LocaleVersion">
     <allow interface="zope.i18n.interfaces.locales.ILocaleVersion" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleDisplayNames">
+  <class class="zope.i18n.locales.LocaleDisplayNames">
     <allow interface="zope.i18n.interfaces.locales.ILocaleDisplayNames" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleTimeZone">
+  <class class="zope.i18n.locales.LocaleTimeZone">
     <allow interface="zope.i18n.interfaces.locales.ILocaleTimeZone" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleFormat">
+  <class class="zope.i18n.locales.LocaleFormat">
     <allow interface="zope.i18n.interfaces.locales.ILocaleFormat" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleFormatLength">
+  <class class="zope.i18n.locales.LocaleFormatLength">
     <allow interface="zope.i18n.interfaces.locales.ILocaleFormatLength" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleCalendar">
+  <class class="zope.i18n.locales.LocaleCalendar">
     <allow interface="zope.i18n.interfaces.locales.ILocaleCalendar" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleDates">
+  <class class="zope.i18n.locales.LocaleDates">
     <allow interface="zope.i18n.interfaces.locales.ILocaleDates" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleCurrency">
+  <class class="zope.i18n.locales.LocaleCurrency">
     <allow interface="zope.i18n.interfaces.locales.ILocaleCurrency" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.LocaleNumbers">
+  <class class="zope.i18n.locales.LocaleNumbers">
     <allow interface="zope.i18n.interfaces.locales.ILocaleNumbers" />
-  </content>
+  </class>
 
-  <content class="zope.i18n.locales.Locale">
+  <class class="zope.i18n.locales.Locale">
     <allow interface="zope.i18n.interfaces.locales.ILocale" />
-  </content>
+  </class>
 
 </configure>
\ No newline at end of file

Modified: Zope3/trunk/src/zope/app/i18nfile/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/i18nfile/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/i18nfile/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -18,7 +18,7 @@
 
   <!-- content classes -->
 
-  <content class=".i18nfile.I18nFile">
+  <class class=".i18nfile.I18nFile">
     <factory
         id="zope.app.content.I18nFile"
         title="I18n File"
@@ -43,9 +43,9 @@
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
        />
-  </content>
+  </class>
 
-  <content class=".i18nimage.I18nImage">
+  <class class=".i18nimage.I18nImage">
     <factory
         id="zope.app.content.I18nImage"
         title="I18n Image"
@@ -71,7 +71,7 @@
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
        />
-  </content>
+  </class>
 
 
   <!-- include browser package -->

Modified: Zope3/trunk/src/zope/app/interface/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/interface/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/interface/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,7 +1,8 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
-  <vocabulary
+  <utility
+      component=".vocabulary.ObjectInterfacesVocabulary"
       name="Object Interfaces"
-      factory=".vocabulary.ObjectInterfacesVocabulary" />
+      />
 
 </configure>

Modified: Zope3/trunk/src/zope/app/interface/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/interface/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/interface/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,10 +17,11 @@
 """
 __docformat__ = 'restructuredtext'
 
-from zope.interface import providedBy
+from zope.interface import classProvides, providedBy
 from zope.security.proxy import removeSecurityProxy
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm 
 from zope.app.component.interface import interfaceToName
+from zope.app.schema.interfaces import IVocabularyFactory
 
 
 class ObjectInterfacesVocabulary(SimpleVocabulary):
@@ -50,6 +51,7 @@
      'zope.app.interface.vocabulary.I3',
      'zope.interface.Interface']
     """
+    classProvides(IVocabularyFactory)
 
     def __init__(self, context):
         # Remove the security proxy so the values from the vocabulary

Modified: Zope3/trunk/src/zope/app/mail/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/mail/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/mail/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -23,11 +23,9 @@
 
   <interface interface="zope.app.mail.interfaces.IMailDelivery" />
 
-  <vocabulary
+  <utility
+      component=".vocabulary.MailDeliveryNames"
       name="Mail Delivery Names"
-      factory="zope.app.component.vocabulary.UtilityVocabulary"
-      interface="zope.app.mail.interfaces.IMailDelivery"
-      nameOnly="True" />
+      />
 
-
 </configure>

Copied: Zope3/trunk/src/zope/app/mail/vocabulary.py (from rev 66067, Zope3/branches/philikon-reduce-zcml/src/zope/app/mail/vocabulary.py)

Modified: Zope3/trunk/src/zope/app/meta.zcml
===================================================================
--- Zope3/trunk/src/zope/app/meta.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/meta.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -13,8 +13,4 @@
 <include package="zope.app.schema" file="meta.zcml" />
 <include package="zope.app.container.browser" file="meta.zcml" />
 
-<!-- BBB: Goes away in 3.3 -->
-<include package="zope.app.site" file="meta.zcml" />
-
-
 </configure>

Modified: Zope3/trunk/src/zope/app/onlinehelp/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/onlinehelp/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -3,7 +3,7 @@
    i18n_domain="zope"
    >
 
-  <content class=".onlinehelp.OnlineHelp">
+  <class class=".onlinehelp.OnlineHelp">
     <require
         permission="zope.View"
         interface=".interfaces.ISourceTextOnlineHelpTopic"
@@ -12,34 +12,34 @@
         permission="zope.View"
         attributes="context"
         />
-  </content>
+  </class>
 
   <!-- this is the generic help topic implementation -->
-  <content class=".onlinehelptopic.OnlineHelpTopic">
+  <class class=".onlinehelptopic.OnlineHelpTopic">
     <require
         permission="zope.View"
         interface=".interfaces.ISourceTextOnlineHelpTopic"
         />
-  </content>
+  </class>
 
   <!-- explicit restructured help topic implementation -->
-  <content class=".onlinehelptopic.RESTOnlineHelpTopic">
+  <class class=".onlinehelptopic.RESTOnlineHelpTopic">
     <require
         permission="zope.View"
         interface=".interfaces.IRESTOnlineHelpTopic"
         />
-  </content>
+  </class>
 
   <!-- explicit structured help topic implementation -->
-  <content class=".onlinehelptopic.STXOnlineHelpTopic">
+  <class class=".onlinehelptopic.STXOnlineHelpTopic">
     <require
         permission="zope.View"
         interface=".interfaces.ISTXOnlineHelpTopic"
         />
-  </content>
+  </class>
 
   <!-- explicit page template help topic implementation -->
-  <content class=".onlinehelptopic.ZPTOnlineHelpTopic">
+  <class class=".onlinehelptopic.ZPTOnlineHelpTopic">
     <factory
         id="onlinehelp.topic.zpt"
         />
@@ -47,14 +47,14 @@
         permission="zope.View"
         interface=".interfaces.IZPTOnlineHelpTopic"
         />
-  </content>
+  </class>
 
-  <content class=".onlinehelptopic.OnlineHelpResource">
+  <class class=".onlinehelptopic.OnlineHelpResource">
     <require
         permission="zope.View"
         interface=".interfaces.IOnlineHelpResource"
         />
-  </content>
+  </class>
 
   <!-- Setup OnlineHelp Root as a Utility -->
   <utility

Modified: Zope3/trunk/src/zope/app/pagetemplate/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pagetemplate/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/pagetemplate/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,8 +1,8 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
-  <content class=".viewpagetemplatefile.BoundPageTemplate">
+  <class class=".viewpagetemplatefile.BoundPageTemplate">
     <allow attributes="__call__ __str__ __name__" />
-  </content>
+  </class>
 
   <adapter
       for="*"
@@ -17,9 +17,9 @@
       factory=".urlquote.URLQuote"
       name="url"/> 
 
- <content class="zope.tales.tales.Iterator">
+ <class class="zope.tales.tales.Iterator">
     <allow interface="zope.tales.interfaces.ITALESIterator" />
- </content>
+ </class>
 
  <class class=".engine.ZopePathExpr">
     <allow attributes="__call__" />

Modified: Zope3/trunk/src/zope/app/pluggableauth/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pluggableauth/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/pluggableauth/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -32,7 +32,7 @@
         handler=".PluggableAuthenticationAddSubscriber"
         />
 
-  <content class=".BTreePrincipalSource">
+  <class class=".BTreePrincipalSource">
     <factory
         id="zope.app.principalsources.BTreePrincipalSource"
         />
@@ -47,9 +47,9 @@
     <allow
         interface=".interfaces.IPrincipalSource"
         />
-  </content>
+  </class>
 
-  <content class=".SimplePrincipal">
+  <class class=".SimplePrincipal">
     <factory
         id="zope.app.principals.SimplePrincipal"
         />
@@ -60,7 +60,7 @@
         permission="zope.ManageSite"
         set_schema=".interfaces.IUserSchemafied"
         />
-  </content>
+  </class>
 
   <browser:view
       name="login"

Modified: Zope3/trunk/src/zope/app/presentation/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/presentation/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/presentation/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -4,13 +4,13 @@
     i18n_domain="zope"
     >
 
-  <content class=".registration.PageRegistration">
+  <class class=".registration.PageRegistration">
     <require
         permission="zope.ManageSite"
         interface=".interfaces.IPageRegistration"
         set_schema=".interfaces.IPageRegistration"
         />
-  </content>
+  </class>
   
   <class class=".registration.Registered">
     <allow attributes="registrations" />
@@ -37,7 +37,7 @@
 
   <!-- Page Folder -->
 
-  <content class=".pagefolder.PageFolder">
+  <class class=".pagefolder.PageFolder">
     <factory
         id="zope.app.presentation.pagefolder.PageFolder"
         title="View Folder"
@@ -56,7 +56,7 @@
         set_schema=".interfaces.IPageFolderInfo"
         attributes="registrationManager applyDefaults" 
         />
-  </content>
+  </class>
   
   <adapter
       for=".interfaces.IPageFolder"
@@ -87,7 +87,7 @@
 
   <!-- Page Templates  -->
   
-  <content class=".zpt.ZPTTemplate">
+  <class class=".zpt.ZPTTemplate">
     <factory
         title="ZPT Template"
         description="Persistent View Page Template"
@@ -104,7 +104,7 @@
         interface=".interfaces.IZPTTemplate"
         set_schema=".interfaces.IZPTTemplate"
         />
-  </content>
+  </class>
   
   <adapter
       for=".interfaces.IZPTTemplate"

Modified: Zope3/trunk/src/zope/app/publisher/browser/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/publisher/browser/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -8,10 +8,9 @@
 <interface
   interface="zope.publisher.interfaces.browser.IBrowserSkinType" />
 
-<vocabulary
+<utility
     name="Browser Skins"
-    factory="zope.app.component.vocabulary.UtilityVocabulary"
-    interface="zope.publisher.interfaces.browser.IBrowserSkinType"
+    component=".vocabulary.BrowserSkinsVocabulary"
     />
 
 <!-- BBB 2006/02/18, to be removed after 12 months -->
@@ -21,49 +20,49 @@
     bbb_aware="true"
     />
 
-<content class="zope.publisher.browser.BrowserRequest">
+<class class="zope.publisher.browser.BrowserRequest">
   <allow
     interface="zope.publisher.interfaces.browser.IBrowserApplicationRequest"
     attributes="response locale __str__"
     />
   <allow
     interface="zope.component.interfaces.IPresentationRequest" />
-</content>
+</class>
 
-<content class="zope.publisher.browser.TestRequest">
+<class class="zope.publisher.browser.TestRequest">
   <allow
     interface="zope.publisher.interfaces.browser.IBrowserApplicationRequest"
     attributes="response"
     />
   <allow
     interface="zope.component.interfaces.IPresentationRequest" />
-</content>
+</class>
 
-<content class="zope.publisher.browser.BrowserResponse">
+<class class="zope.publisher.browser.BrowserResponse">
   <allow
     interface="zope.publisher.interfaces.http.IHTTPResponse"
     />
-</content>
+</class>
 
-<content class="zope.app.publisher.browser.fileresource.FileResource">
+<class class="zope.app.publisher.browser.fileresource.FileResource">
   <allow interface="zope.publisher.interfaces.browser.IBrowserPublisher" />
   <allow attributes="GET HEAD __call__" />
-</content>
+</class>
 
-<content class="zope.app.publisher.browser.i18nfileresource.I18nFileResource">
+<class class="zope.app.publisher.browser.i18nfileresource.I18nFileResource">
   <allow interface="zope.publisher.interfaces.browser.IBrowserPublisher" />
   <allow attributes="GET HEAD __call__" />
-</content>
+</class>
 
-<content class=".pagetemplateresource.PageTemplateResource">
+<class class=".pagetemplateresource.PageTemplateResource">
   <allow interface="zope.publisher.interfaces.browser.IBrowserPublisher" />
   <allow attributes="__call__" />
-</content>
+</class>
 
-<content class=".directoryresource.DirectoryResource">
+<class class=".directoryresource.DirectoryResource">
   <allow interface="zope.publisher.interfaces.browser.IBrowserPublisher" />
   <allow attributes="get __getitem__" />
-</content>
+</class>
 
 <browser:page
     name=""

Modified: Zope3/trunk/src/zope/app/publisher/browser/menumeta.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/menumeta.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/publisher/browser/menumeta.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -34,7 +34,7 @@
 
 from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.app.container.interfaces import IAdding
-from zope.app.component.contentdirective import ContentDirective
+from zope.app.component.contentdirective import ClassDirective
 from zope.app.publisher.interfaces.browser import AddMenu
 
 
@@ -255,7 +255,7 @@
                 "A permission must be specified when a class is used")
         factory = "BrowserAdd%s__%s.%s" % (
             forname, class_.__module__, class_.__name__)
-        ContentDirective(_context, class_).factory(_context, id=factory)
+        ClassDirective(_context, class_).factory(_context, id=factory)
 
     extra = {'factory': factory}
 

Modified: Zope3/trunk/src/zope/app/publisher/browser/meta.zcml
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/meta.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/publisher/browser/meta.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -69,24 +69,6 @@
 
     </meta:complexDirective>
 
-    <meta:complexDirective
-        name="addview"
-        schema=".metadirectives.IViewDirective"
-        handler=".viewmeta.addview"
-        >
-
-      <meta:subdirective
-          name="page"
-          schema=".metadirectives.IViewPageSubdirective"
-          />
-
-      <meta:subdirective
-          name="defaultPage"
-          schema=".metadirectives.IViewDefaultPageSubdirective"
-          />
-
-    </meta:complexDirective>
-
     <meta:directive
         name="defaultView"
         schema=".metadirectives.IDefaultViewDirective"

Modified: Zope3/trunk/src/zope/app/publisher/browser/viewmeta.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/viewmeta.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/publisher/browser/viewmeta.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -356,19 +356,6 @@
                     _context.info),
             )
 
-def addview(_context, name, permission,
-            layer=IDefaultBrowserLayer, class_=None,
-            allowed_interface=None, allowed_attributes=None,
-            menu=None, title=None
-            ):
-    return view(_context, name,
-                'zope.app.container.interfaces.IAdding',
-                permission,
-                layer, class_,
-                allowed_interface, allowed_attributes,
-                menu, title
-                )
-
 # transient _handle_menu registry
 _registeredMenus = {}
 

Added: Zope3/trunk/src/zope/app/publisher/browser/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/publisher/browser/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Browser vocabularies
+
+$Id$
+"""
+from zope.interface import classProvides
+from zope.publisher.interfaces.browser import IBrowserSkinType
+from zope.app.component.vocabulary import UtilityVocabulary
+from zope.app.schema.interfaces import IVocabularyFactory
+
+class BrowserSkinsVocabulary(UtilityVocabulary):
+    classProvides(IVocabularyFactory)
+    interface = IBrowserSkinType


Property changes on: Zope3/trunk/src/zope/app/publisher/browser/vocabulary.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/publisher/http.zcml
===================================================================
--- Zope3/trunk/src/zope/app/publisher/http.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/publisher/http.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,17 +2,17 @@
    xmlns="http://namespaces.zope.org/zope"
    package="zope.publisher.http">
 
-  <content class="zope.publisher.http.HTTPRequest">
+  <class class="zope.publisher.http.HTTPRequest">
     <require
         permission="zope.View"
         interface="zope.publisher.interfaces.http.IHTTPApplicationRequest"/>
-  </content>
+  </class>
 
-  <content class="zope.publisher.http.URLGetter">
+  <class class="zope.publisher.http.URLGetter">
     <require
         permission="zope.View" 
         attributes="get __getitem__ __str__" />
-  </content>
+  </class>
 
   <class class="zope.publisher.http.DirectResult">
     <allow interface="zope.publisher.http.IResult" />

Modified: Zope3/trunk/src/zope/app/pythonpage/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pythonpage/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/pythonpage/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -8,7 +8,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
   
-  <content class=".PythonPage">
+  <class class=".PythonPage">
       <factory
         id="zope.app.pythonpage.PythonPage"
         title="Python Page"
@@ -25,7 +25,7 @@
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable" 
         />
-  </content>
+  </class>
 
 
   <!-- browser directives -->

Modified: Zope3/trunk/src/zope/app/rdb/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/rdb/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/rdb/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -8,26 +8,26 @@
       title="[zope.app.rdb.Use] Use Database Connections"
       />
 
-  <content class="zope.app.rdb.ZopeConnection">
+  <class class="zope.app.rdb.ZopeConnection">
     <require
         permission="zope.ManageContent"
         interface="zope.app.rdb.interfaces.IZopeConnection"
         />
-  </content>
+  </class>
 
-  <content class="zope.app.rdb.ZopeCursor">
+  <class class="zope.app.rdb.ZopeCursor">
     <require
         permission="zope.ManageContent"
         interface="zope.app.rdb.interfaces.IZopeCursor"
         />
-  </content>
+  </class>
 
-  <content class="zope.app.rdb.Row">
+  <class class="zope.app.rdb.Row">
     <require
         permission="zope.ManageContent"
         attributes="__getattr__"
         />
-  </content>
+  </class>
 
   <localUtility class="zope.app.rdb.ZopeDatabaseAdapter">
 
@@ -37,7 +37,7 @@
 
   </localUtility>
 
-  <content class="zope.app.rdb.ResultSet">
+  <class class="zope.app.rdb.ResultSet">
     <!-- require zope.View for all list methods -->
     <require
         permission="zope.View"
@@ -50,7 +50,7 @@
         permission="zope.View"
         attributes="columns"
         />
-  </content>
+  </class>
 
   <include file="gadflyda.zcml" />
 

Modified: Zope3/trunk/src/zope/app/rdb/gadflyda.zcml
===================================================================
--- Zope3/trunk/src/zope/app/rdb/gadflyda.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/rdb/gadflyda.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,6 +1,6 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
-  <content class="zope.app.rdb.gadflyda.GadflyAdapter">
+  <class class="zope.app.rdb.gadflyda.GadflyAdapter">
     <factory
         title="Gadfly Database Adapter" />
     <require
@@ -9,16 +9,16 @@
     <require
         permission="zope.ManageServices"
         interface="zope.app.rdb.interfaces.IZopeDatabaseAdapterManagement" />
-  </content>
+  </class>
 
-  <content class="zope.app.rdb.gadflyda.GadflyAdapterCursor">
+  <class class="zope.app.rdb.gadflyda.GadflyAdapterCursor">
     <allow
         interface="zope.app.rdb.interfaces.IZopeCursor" />
-  </content>
+  </class>
 
-  <content class="zope.app.rdb.gadflyda.GadflyAdapterConnection">
+  <class class="zope.app.rdb.gadflyda.GadflyAdapterConnection">
     <allow
         interface="zope.app.rdb.interfaces.IZopeConnection" />
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/renderer/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/renderer/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/renderer/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -5,17 +5,18 @@
 
   <!-- Source Type Vocabulary Setup -->
 
-  <vocabulary
+  <utility
+      component=".vocabulary.SourceTypeVocabulary"
+      provides="zope.app.schema.interfaces.IVocabularyFactory"
       name="SourceTypes"
-      factory=".vocabulary.SourceTypeVocabulary" />
+      />
 
   <!-- Plain Text Support -->
 
-  <factory
+  <utility
       component=".plaintext.PlainTextSourceFactory"
-      id="zope.source.plaintext"
-      title="Plain Text" 
-      description="Plain Text Source" />
+      name="zope.source.plaintext"
+      />
 
   <browser:view
       name=""
@@ -25,11 +26,10 @@
 
   <!-- STX support -->
 
-  <factory
+  <utility
       component=".stx.StructuredTextSourceFactory"
-      id="zope.source.stx"
-      title="Structured Text (STX)"
-      description="Structured Text (STX) Source" />
+      name="zope.source.stx"
+      />
 
   <browser:view
       name=""
@@ -39,11 +39,10 @@
 
   <!-- ReST support -->
 
-  <factory
+  <utility
       component=".rest.ReStructuredTextSourceFactory"
-      id="zope.source.rest"
-      title="ReStructured Text (ReST)"
-      description="ReStructured Text (ReST) Source" />
+      name="zope.source.rest"
+      />
 
   <browser:view
       name=""

Modified: Zope3/trunk/src/zope/app/renderer/meta.zcml
===================================================================
--- Zope3/trunk/src/zope/app/renderer/meta.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/renderer/meta.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,6 +2,7 @@
     xmlns="http://namespaces.zope.org/zope"
     xmlns:meta="http://namespaces.zope.org/meta">
 
+  <!-- BBB 2006/02/24, to be removed after 12 months -->
   <meta:directive
      namespace="http://namespaces.zope.org/renderer"
      name="renderer"

Modified: Zope3/trunk/src/zope/app/renderer/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/renderer/metaconfigure.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/renderer/metaconfigure.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -15,6 +15,9 @@
 
 $Id$
 """
+# BBB 2006/02/24, to be removed after 12 months
+
+import warnings
 from zope.app import zapi
 from zope.app.component.metaconfigure import handler
 from zope.configuration.fields import GlobalInterface, GlobalObject
@@ -43,6 +46,22 @@
 
 # TODO: Does not seem to be tested
 def renderer(_context, sourceType, for_, factory):
+    def dottify(obj):
+        try:
+            return obj.__module__ + '.' + obj.__name__
+        except AttributeError:
+            return '...'
+    warnings.warn_explicit(
+        "The 'renderer' directive has been deprecated and will be "
+        "removed in Zope 3.5.  Use the 'view' directive instead:\n"
+        '  <browser:view\n'
+        '      name=""\n'
+        '      for="%s"\n'
+        '      class="%s"\n'
+        '      permission="zope.Public"\n'
+        '      />' % (dottify(sourceType), dottify(factory)),
+        DeprecationWarning, _context.info.file, _context.info.line)
+
     _context.action(
         discriminator = ('view', sourceType, u'', for_, 'default'),
         callable = handler,

Modified: Zope3/trunk/src/zope/app/renderer/plaintext.py
===================================================================
--- Zope3/trunk/src/zope/app/renderer/plaintext.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/renderer/plaintext.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -16,18 +16,19 @@
 $Id$
 """
 from zope.interface import implements
+
 from zope.app.publisher.browser import BrowserView
-
+from zope.app.i18n import ZopeMessageFactory as _
 from zope.app.renderer.interfaces import ISource, IHTMLRenderer
 from zope.app.renderer import SourceFactory
 
-
 class IPlainTextSource(ISource):
     """Marker interface for a plain text source. Note that an implementation
     of this interface should always derive from unicode or behave like a
     unicode class."""
 
-PlainTextSourceFactory = SourceFactory(IPlainTextSource)
+PlainTextSourceFactory = SourceFactory(
+    IPlainTextSource, _("Plain Text"), _("Plain Text Source"))
 
 
 class PlainTextToHTMLRenderer(BrowserView):

Modified: Zope3/trunk/src/zope/app/renderer/rest.py
===================================================================
--- Zope3/trunk/src/zope/app/renderer/rest.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/renderer/rest.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -22,6 +22,7 @@
 
 from zope.interface import implements
 from zope.app.publisher.browser import BrowserView
+from zope.app.i18n import ZopeMessageFactory as _
 from zope.app.renderer.interfaces import ISource, IHTMLRenderer
 from zope.app.renderer import SourceFactory
 
@@ -32,7 +33,9 @@
     behave like a unicode class."""
 
 
-ReStructuredTextSourceFactory = SourceFactory(IReStructuredTextSource)
+ReStructuredTextSourceFactory = SourceFactory(
+    IReStructuredTextSource, _("ReStructured Text (ReST)"),
+    _("ReStructured Text (ReST) Source"))
 
 
 class ZopeTranslator(HTMLTranslator):

Modified: Zope3/trunk/src/zope/app/renderer/stx.py
===================================================================
--- Zope3/trunk/src/zope/app/renderer/stx.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/renderer/stx.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -18,10 +18,11 @@
 import re
 
 from zope.interface import implements
-from zope.app.publisher.browser import BrowserView
 from zope.structuredtext.document import Document
 from zope.structuredtext.html import HTML
 
+from zope.app.publisher.browser import BrowserView
+from zope.app.i18n import ZopeMessageFactory as _
 from zope.app.renderer.interfaces import ISource, IHTMLRenderer
 from zope.app.renderer import SourceFactory
 
@@ -31,7 +32,9 @@
     implementation of this interface should always derive from unicode or
     behave like a unicode class."""
 
-StructuredTextSourceFactory = SourceFactory(IStructuredTextSource)
+StructuredTextSourceFactory = SourceFactory(
+    IStructuredTextSource, _("Structured Text (STX)"),
+    _("Structured Text (STX) Source"))
 
 
 class StructuredTextToHTMLRenderer(BrowserView):

Modified: Zope3/trunk/src/zope/app/renderer/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/renderer/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/renderer/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -15,12 +15,16 @@
 
 $Id$
 """
+from zope.interface import alsoProvides
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 
 from zope.app import zapi
 from zope.app.renderer.interfaces import ISource
+from zope.app.schema.interfaces import IVocabularyFactory
 
 def SourceTypeVocabulary(context):
     return SimpleVocabulary(
         [SimpleTerm(name, title=factory.title) for name, factory in 
          zapi.getFactoriesFor(ISource)])
+
+alsoProvides(SourceTypeVocabulary, IVocabularyFactory)

Modified: Zope3/trunk/src/zope/app/schema/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/schema/__init__.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/__init__.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1 +1,20 @@
-# Make this a Python package.
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Schemas
+
+$Id$
+"""
+# we want to hook-up our own vocabulary registry; importing the module
+# is enough for that
+import zope.app.schema.vocabulary


Property changes on: Zope3/trunk/src/zope/app/schema/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: Zope3/trunk/src/zope/app/schema/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schema/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,12 +17,12 @@
 
   </localUtility>
 
-  <content class=".schema.SchemaRegistration">
+  <class class=".schema.SchemaRegistration">
     <require
       permission="zope.ManageServices"
       interface="zope.app.component.interfaces.IUtilityRegistration"
       set_schema="zope.app.component.interfaces.IUtilityRegistration" />
-  </content>
+  </class>
 
   <include file="fields.zcml" />
   <include package=".browser" />

Modified: Zope3/trunk/src/zope/app/schema/fields.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schema/fields.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/fields.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,6 +1,6 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
-  <content class="zope.schema.Field">
+  <class class="zope.schema.Field">
 
     <factory
         id="zope.schema.Field"
@@ -31,9 +31,9 @@
 	set_schema="zope.schema.interfaces.IField"
 	/>
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Container">
+  <class class="zope.schema.Container">
 
     <factory
         id="zope.schema.Container"
@@ -42,9 +42,9 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Iterable">
+  <class class="zope.schema.Iterable">
 
     <factory
         id="zope.schema.Iterable"
@@ -53,9 +53,9 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Orderable">
+  <class class="zope.schema.Orderable">
 
     <factory
         id="zope.schema.Orderable"
@@ -68,9 +68,9 @@
 	set_schema="zope.schema.interfaces.IMinMax"
 	/>
 
-  </content>
+  </class>
 
-  <content class="zope.schema.MinMaxLen">
+  <class class="zope.schema.MinMaxLen">
 
     <factory
         id="zope.schema.MinMaxLen"
@@ -83,9 +83,9 @@
 	set_schema="zope.schema.interfaces.IMinMaxLen"
 	/>
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Bytes">
+  <class class="zope.schema.Bytes">
 
     <factory
 	id="zope.schema.Bytes"
@@ -95,9 +95,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.BytesLine">
+  <class class="zope.schema.BytesLine">
 
     <factory
 	id="zope.schema.BytesLine"
@@ -107,9 +107,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Text">
+  <class class="zope.schema.Text">
 
     <factory
 	id="zope.schema.Text"
@@ -121,9 +121,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.TextLine">
+  <class class="zope.schema.TextLine">
 
     <factory
 	id="zope.schema.TextLine"
@@ -133,9 +133,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Bool">
+  <class class="zope.schema.Bool">
 
     <factory
 	id="zope.schema.Bool"
@@ -144,9 +144,9 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Int">
+  <class class="zope.schema.Int">
 
     <factory
 	id="zope.schema.Int"
@@ -156,9 +156,9 @@
     <require like_class="zope.schema.Orderable" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Float">
+  <class class="zope.schema.Float">
 
     <factory
 	id="zope.schema.Float"
@@ -168,9 +168,9 @@
     <require like_class="zope.schema.Orderable" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Tuple">
+  <class class="zope.schema.Tuple">
 
     <factory
 	id="zope.schema.Tuple"
@@ -179,9 +179,9 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.List">
+  <class class="zope.schema.List">
 
     <factory
 	id="zope.schema.List"
@@ -190,9 +190,9 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Set">
+  <class class="zope.schema.Set">
 
     <factory
 	id="zope.schema.Set"
@@ -201,9 +201,9 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Password">
+  <class class="zope.schema.Password">
 
     <factory
 	id="zope.schema.Password"
@@ -213,9 +213,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Dict">
+  <class class="zope.schema.Dict">
 
     <factory
 	id="zope.schema.Dict"
@@ -225,9 +225,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Datetime">
+  <class class="zope.schema.Datetime">
 
     <factory
 	id="zope.schema.Datetime"
@@ -237,9 +237,9 @@
     <require like_class="zope.schema.Orderable" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.SourceText">
+  <class class="zope.schema.SourceText">
 
     <factory
 	id="zope.schema.SourceText"
@@ -249,9 +249,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Object">
+  <class class="zope.schema.Object">
 
     <factory
 	id="zope.schema.Object"
@@ -262,9 +262,9 @@
        permission="zope.ManageContent"
        interface="zope.schema.interfaces.IObject" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.URI">
+  <class class="zope.schema.URI">
 
     <factory
 	id="zope.schema.URI"
@@ -274,9 +274,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Id">
+  <class class="zope.schema.Id">
 
     <factory
 	id="zope.schema.Id"
@@ -286,9 +286,9 @@
     <require like_class="zope.schema.MinMaxLen" />
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.InterfaceField">
+  <class class="zope.schema.InterfaceField">
 
     <factory
 	id="zope.schema.InterfaceField"
@@ -297,14 +297,14 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.vocabulary.SimpleTerm">
+  <class class="zope.schema.vocabulary.SimpleTerm">
     <allow interface="zope.schema.interfaces.ITitledTokenizedTerm" />
-  </content>
+  </class>
 
-  <content class="zope.schema.vocabulary.SimpleVocabulary">
+  <class class="zope.schema.vocabulary.SimpleVocabulary">
     <allow interface="zope.schema.interfaces.IVocabularyTokenized" />
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/schema/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/schema/interfaces.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/interfaces.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -19,6 +19,13 @@
 from zope.interface.interfaces import IInterface
 from zope.app.container.interfaces import IAdding
 
+class IVocabularyFactory(Interface):
+    """Can create vocabularies."""
+
+    def __call__(self, context):
+        """The context provides a location that the vocabulary can make use
+        of."""
+
 class ISchemaUtility(Interface):
     pass
 

Modified: Zope3/trunk/src/zope/app/schema/meta.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schema/meta.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/meta.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,6 +2,7 @@
     xmlns="http://namespaces.zope.org/zope"
     xmlns:meta="http://namespaces.zope.org/meta">
 
+  <!-- BBB 2006/02/24, to be removed after 12 months -->
   <meta:directive 
       namespace="http://namespaces.zope.org/zope"
       name="vocabulary" 

Modified: Zope3/trunk/src/zope/app/schema/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/schema/metaconfigure.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/metaconfigure.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -15,8 +15,9 @@
 
 $Id$
 """
+import warnings
 from zope.interface import directlyProvides
-from vocabulary import IVocabularyFactory
+from zope.app.schema.interfaces import IVocabularyFactory
 from zope.app.component.metaconfigure import utility
 
 class FactoryKeywordPasser(object):
@@ -30,9 +31,23 @@
         return self.factory(object, **self.kwargs)
 
 
+# BBB 2006/02/24, to be removed after 12 months
 def vocabulary(_context, name, factory, **kw):
+    try:
+        dottedname = factory.__module__ + "." + factory.__name__
+    except AttributeError:
+        dottedname = '...'
+    warnings.warn_explicit(
+        "The 'vocabulary' directive has been deprecated and will be "
+        "removed in Zope 3.5.  Use the 'utility' directive instead to "
+        "register the class as a named utility:\n"
+        '  <utility\n'
+        '      provides="zope.app.schema.interfaces.IVocabularyFactory"\n'
+        '      component="%s"\n'
+        '      name="%s"\n'
+        '      />' % (dottedname, name),
+        DeprecationWarning, _context.info.file, _context.info.line)
     if kw:
         factory = FactoryKeywordPasser(factory, kw)
     directlyProvides(factory, IVocabularyFactory)
     utility(_context, IVocabularyFactory, factory, name=name)
-

Modified: Zope3/trunk/src/zope/app/schema/metadirectives.py
===================================================================
--- Zope3/trunk/src/zope/app/schema/metadirectives.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/metadirectives.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -19,6 +19,7 @@
 from zope.interface import Interface
 from zope.schema import TextLine
 
+# BBB 2006/02/24, to be removed after 12 months
 class IVocabularyDirective(Interface):
     '''Define a named vocabulary.
 

Modified: Zope3/trunk/src/zope/app/schema/tests/keywords_vocab.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schema/tests/keywords_vocab.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/tests/keywords_vocab.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,5 +1,7 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
+  <!-- BBB 2006/02/24, to be removed after 12 months -->
+
   <include package="zope.app.schema" file="meta.zcml"/>
 
   <vocabulary

Modified: Zope3/trunk/src/zope/app/schema/tests/simple_vocab.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schema/tests/simple_vocab.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/tests/simple_vocab.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,5 +1,7 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
+  <!-- BBB 2006/02/24, to be removed after 12 months -->
+
   <include package="zope.app.schema" file="meta.zcml"/>
 
   <vocabulary

Modified: Zope3/trunk/src/zope/app/schema/tests/test_directives.py
===================================================================
--- Zope3/trunk/src/zope/app/schema/tests/test_directives.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/tests/test_directives.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -15,7 +15,10 @@
 
 $Id$
 """
+# BBB 2006/02/24, to be removed after 12 months
+
 import unittest
+import warnings
 
 from zope.app.testing.placelesssetup import PlacelessSetup
 from zope.configuration import xmlconfig
@@ -35,6 +38,16 @@
     extra_keywords = {"filter": "my-filter",
                       "another": "keyword"}
 
+    def setUp(self):
+        super(DirectivesTest, self).setUp()
+        def ignorewarning(message, category, filename, lineno, file=None):
+            pass
+        warnings.showwarning = ignorewarning
+
+    def tearDown(self):
+        super(DirectivesTest, self).tearDown()
+        warnings.resetwarnings()
+
     def check_vocabulary_get(self, kw={}):
         context = object()
         registry = ZopeVocabularyRegistry()

Modified: Zope3/trunk/src/zope/app/schema/tests/test_fieldfactory.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schema/tests/test_fieldfactory.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/tests/test_fieldfactory.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -7,7 +7,7 @@
   <include package="zope.app.security" file="meta.zcml" />
   <include package="zope.app.security" file="configure.zcml" />
 
-  <content class="zope.schema.Field">
+  <class class="zope.schema.Field">
 
     <factory
 	title="Basic Field"
@@ -31,9 +31,9 @@
 	interface="zope.schema.interfaces.IField"
 	/>
 
-  </content>
+  </class>
 
-  <content class="zope.schema.Text">
+  <class class="zope.schema.Text">
 
     <factory
 	title="Text Field"
@@ -41,9 +41,9 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
-  <content class="zope.schema.TextLine">
+  <class class="zope.schema.TextLine">
 
     <factory
 	title="Text Line Field"
@@ -51,6 +51,6 @@
 
     <require like_class="zope.schema.Field" />
 
-  </content>
+  </class>
 
 </configure>
\ No newline at end of file

Modified: Zope3/trunk/src/zope/app/schema/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/schema/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schema/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -20,16 +20,8 @@
 from zope.schema.interfaces import IVocabularyRegistry
 from zope.schema import vocabulary
 from zope.testing import cleanup
+from zope.app.schema.interfaces import IVocabularyFactory
 
-
-class IVocabularyFactory(Interface):
-    """Can create vocabularies."""
-
-    def __call__(self, context):
-        """The context provides a location that the vocabulary can make use
-        of."""
-
-
 class ZopeVocabularyRegistry(object):
     """IVocabularyRegistry that supports global and local utilities."""
 

Modified: Zope3/trunk/src/zope/app/schemacontent/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schemacontent/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/schemacontent/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -19,20 +19,20 @@
 
   </localUtility>
 
-  <content class=".content.ContentComponentDefinitionRegistration">
+  <class class=".content.ContentComponentDefinitionRegistration">
     <require
       permission="zope.ManageServices"
       interface="zope.app.component.interfaces.IUtilityRegistration"
       set_schema="zope.app.component.interfaces.IUtilityRegistration"
       />
-  </content>
+  </class>
 
 <!-- Content Component Instance -->
 
-  <content class=".content.ContentComponentInstance">
+  <class class=".content.ContentComponentInstance">
     <implements
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
-  </content>
+  </class>
 
   <include package=".browser" />
 

Modified: Zope3/trunk/src/zope/app/security/_protections.zcml
===================================================================
--- Zope3/trunk/src/zope/app/security/_protections.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/security/_protections.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -5,120 +5,120 @@
 
 <!-- ===================================================================== -->
 
-<content class="BTrees.IIBTree.IIBTree">
+<class class="BTrees.IIBTree.IIBTree">
    <allow attributes="__str__ __contains__ __getitem__ __iter__ __len__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKey minKey values" /> 
-</content>
-<content class="BTrees.IIBTree.IIBucket">
+</class>
+<class class="BTrees.IIBTree.IIBucket">
    <allow attributes="__contains__ __getitem__ __iter__ __len__ __str__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKeyminKey values" /> 
-</content>
-<content class="BTrees.IIBTree.IISet">
+</class>
+<class class="BTrees.IIBTree.IISet">
    <allow attributes="__contains__ __iter__ __len__ __str__ has_key insert
                       keys maxKey minKey" /> 
-</content>
-<content class="BTrees.IIBTree.IITreeIterator">
+</class>
+<class class="BTrees.IIBTree.IITreeIterator">
    <allow attributes="__iter__ __str__ __getitem__ __len__
                       __contains__ next" /> 
-</content>
+</class>
 
 <!-- ===================================================================== -->
 
-<content class="BTrees.IOBTree.IOBTree">
+<class class="BTrees.IOBTree.IOBTree">
    <allow attributes="__str__ __contains__ __getitem__ __iter__ __len__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKey minKey values" /> 
-</content>
-<content class="BTrees.IOBTree.IOBucket">
+</class>
+<class class="BTrees.IOBTree.IOBucket">
    <allow attributes="__contains__ __getitem__ __iter__ __len__ __str__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKeyminKey values" /> 
-</content>
-<content class="BTrees.IOBTree.IOSet">
+</class>
+<class class="BTrees.IOBTree.IOSet">
    <allow attributes="__contains__ __iter__ __len__ __str__ has_key insert
                       keys maxKey minKey" /> 
-</content>
-<content class="BTrees.IOBTree.IOTreeIterator">
+</class>
+<class class="BTrees.IOBTree.IOTreeIterator">
    <allow attributes="__iter__ __str__ __getitem__ __len__
                       __contains__ next" /> 
-</content>
+</class>
 
 <!-- ===================================================================== -->
 
-<content class="BTrees.OIBTree.OIBTree">
+<class class="BTrees.OIBTree.OIBTree">
    <allow attributes="__str__ __contains__ __getitem__ __iter__ __len__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKey minKey values" /> 
-</content>
-<content class="BTrees.OIBTree.OIBucket">
+</class>
+<class class="BTrees.OIBTree.OIBucket">
    <allow attributes="__contains__ __getitem__ __iter__ __len__ __str__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKeyminKey values" /> 
-</content>
-<content class="BTrees.OIBTree.OISet">
+</class>
+<class class="BTrees.OIBTree.OISet">
    <allow attributes="__contains__ __iter__ __len__ __str__ has_key insert
                       keys maxKey minKey" /> 
-</content>
-<content class="BTrees.OIBTree.OITreeIterator">
+</class>
+<class class="BTrees.OIBTree.OITreeIterator">
    <allow attributes="__iter__ __str__ __getitem__ __len__ 
                       __contains__ next" /> 
-</content>
+</class>
 
 <!-- ===================================================================== -->
 
-<content class="BTrees.OOBTree.OOBTree">
+<class class="BTrees.OOBTree.OOBTree">
    <allow attributes="__str__ __contains__ __getitem__ __iter__ __len__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKey minKey values" /> 
-</content>
-<content class="BTrees.OOBTree.OOBucket">
+</class>
+<class class="BTrees.OOBTree.OOBucket">
    <allow attributes="__contains__ __getitem__ __iter__ __len__ __str__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKeyminKey values" /> 
-</content>
-<content class="BTrees.OOBTree.OOSet">
+</class>
+<class class="BTrees.OOBTree.OOSet">
    <allow attributes="__contains__ __iter__ __len__ __str__ has_key insert
                       keys maxKey minKey" /> 
-</content>
-<content class="BTrees.OOBTree.OOTreeIterator">
+</class>
+<class class="BTrees.OOBTree.OOTreeIterator">
    <allow attributes="__iter__ __str__ __getitem__ __len__
                       __contains__ next" /> 
-</content>
+</class>
 
 <!-- ===================================================================== -->
 
-<content class="BTrees.IFBTree.IFBTree">
+<class class="BTrees.IFBTree.IFBTree">
    <allow attributes="__str__ __contains__ __getitem__ __iter__ __len__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKey minKey values" /> 
-</content>
-<content class="BTrees.IFBTree.IFBucket">
+</class>
+<class class="BTrees.IFBTree.IFBucket">
    <allow attributes="__contains__ __getitem__ __iter__ __len__ __str__
                       byValue get has_key items iteritems iterkeys
                       itervalues keys maxKeyminKey values" /> 
-</content>
-<content class="BTrees.IFBTree.IFSet">
+</class>
+<class class="BTrees.IFBTree.IFSet">
    <allow attributes="__contains__ __iter__ __len__ __str__ has_key insert
                       keys maxKey minKey" /> 
-</content>
-<content class="BTrees.IFBTree.IFTreeIterator">
+</class>
+<class class="BTrees.IFBTree.IFTreeIterator">
    <allow attributes="__iter__ __str__ __getitem__ __len__
                       __contains__ next" /> 
-</content>
+</class>
 
 <!-- ===================================================================== -->
 
-<content class="persistent.list.PersistentList">
+<class class="persistent.list.PersistentList">
    <allow attributes="__getitem__ __getslice__ __len__ __iter__
                       __contains__ index count" /> 
-</content>
-<content class="persistent.dict.PersistentDict">
+</class>
+<class class="persistent.dict.PersistentDict">
    <allow attributes="__getitem__ __len__ __iter__ get has_key
                       __copy__ keys values items iterkeys iteritems
                       itervalues __contains__" /> 
-</content>
+</class>
 
 <!-- ===================================================================== -->
 

Modified: Zope3/trunk/src/zope/app/security/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/security/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/security/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -10,14 +10,15 @@
                    Public resources are always accessible."
       />
 
-  <vocabulary
+  <utility
+      component=".vocabulary.PermissionsVocabulary"
       name="Permissions"
-      factory="zope.app.component.vocabulary.UtilityVocabulary"
-      interface="zope.security.interfaces.IPermission" />
+      />
 
-  <vocabulary
+  <utility
+      component=".vocabulary.PermissionIdsVocabulary"
       name="Permission Ids"
-      factory=".vocabulary.PermissionIdsVocabulary" />
+      />
 
   <include file="globalmodules.zcml" />
   <include file="_protections.zcml" />
@@ -51,18 +52,18 @@
      handler=".permission.unsetIdOnDeactivation"
      />
 
-  <content class=".permission.Permission">
+  <class class=".permission.Permission">
     <allow interface=".interfaces.IPermission" />
-  </content>
+  </class>
 
-  <content class=".principalregistry.Principal">
+  <class class=".principalregistry.Principal">
     <allow interface=".interfaces.IPrincipal" />
-  </content>
+  </class>
 
-  <content class=".settings.PermissionSetting">
+  <class class=".settings.PermissionSetting">
     <require permission="zope.Public"
              attributes="getName getDescription __str__" />
-  </content>
+  </class>
 
   <adapter factory=".NoLogout" />
 

Modified: Zope3/trunk/src/zope/app/security/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/security/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/security/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,26 +17,31 @@
 
 $Id$
 """
+import warnings
 import zope.deprecation
 
 from zope.security.checker import CheckerPublic
 from zope.app import zapi
-from zope.interface import implements
+from zope.interface import implements, classProvides
 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
 from zope.schema.interfaces import ISourceQueriables
-from zope.app.security.interfaces import IPermission, IAuthentication
+from zope.security.interfaces import IPermission
+from zope.app.security.interfaces import IAuthentication
 from zope.app.security.interfaces import PrincipalLookupError
+from zope.app.security.interfaces import IPrincipalSource
 from zope.app.component import queryNextUtility
+from zope.app.component.vocabulary import UtilityVocabulary
+from zope.app.schema.interfaces import IVocabularyFactory
 
 # BBB Backward Compatibility
 zope.deprecation.__show__.off()
 from zope.exceptions import NotFoundError
 zope.deprecation.__show__.on()
 
-import warnings
+class PermissionsVocabulary(UtilityVocabulary):
+    classProvides(IVocabularyFactory)
+    interface = IPermission
 
-from interfaces import IPrincipalSource
-
 class PermissionIdsVocabulary(SimpleVocabulary):
     """A vocabular of permission IDs.
 
@@ -97,6 +102,8 @@
 
         >>> tearDown()
     """
+    classProvides(IVocabularyFactory)
+
     def __init__(self, context):
         terms = []
         permissions = zapi.getUtilitiesFor(IPermission, context)

Modified: Zope3/trunk/src/zope/app/securitypolicy/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/securitypolicy/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -83,9 +83,10 @@
 
   <!-- Vocabularies -->
 
-  <vocabulary
+  <utility
+      component=".vocabulary.RoleIdsVocabulary"
       name="Role Ids"
-      factory=".vocabulary.RoleIdsVocabulary" />
+      />
 
   <!-- Registering documentation with API doc -->
   <configure
@@ -102,5 +103,4 @@
 
   </configure>
 
-
 </configure>

Modified: Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,9 +17,10 @@
 
 $Id$
 """
-from zope.interface import implements
+from zope.interface import implements, classProvides
+from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
 from zope.app import zapi
-from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
+from zope.app.schema.interfaces import IVocabularyFactory
 from zope.app.securitypolicy.interfaces import IRole
 from zope.app.securitypolicy.interfaces import IGrantVocabulary
 
@@ -57,6 +58,7 @@
        >>> tearDown()
 
     """
+    classProvides(IVocabularyFactory)
 
     def __init__(self, context):
         terms = []
@@ -68,7 +70,5 @@
 
 class GrantVocabulary(SimpleVocabulary):
     """A vocabular for getting the RadioWidget via the Choice field."""
-    
+    classProvides(IVocabularyFactory)
     implements(IGrantVocabulary)
-
-

Modified: Zope3/trunk/src/zope/app/session/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/session/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/session/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -26,45 +26,45 @@
       permission="zope.Public"
       />
 
-  <content class=".session.Session">
+  <class class=".session.Session">
     <allow interface=".interfaces.ISession" />
     <implements interface="zope.app.traversing.interfaces.IPathAdapter" />
-  </content>
+  </class>
 
-  <content class=".http.CookieClientIdManager">
+  <class class=".http.CookieClientIdManager">
     <require
         interface=".http.ICookieClientIdManager"
         permission="zope.Public" />
     <require
         set_schema=".http.ICookieClientIdManager"
         permission="zope.ManageServices" />
-  </content>
+  </class>
 
-  <content class=".session.PersistentSessionDataContainer">
+  <class class=".session.PersistentSessionDataContainer">
     <require
         interface=".interfaces.ISessionDataContainer"
         permission="zope.Public" />
     <require
         set_schema=".interfaces.ISessionDataContainer"
         permission="zope.ManageServices" />
-  </content>
+  </class>
 
-  <content class=".session.RAMSessionDataContainer">
+  <class class=".session.RAMSessionDataContainer">
     <require
         interface=".interfaces.ISessionDataContainer"
         permission="zope.Public" />
     <require
         set_schema=".interfaces.ISessionDataContainer"
         permission="zope.ManageServices" />
-  </content>
+  </class>
 
-  <content class=".session.SessionData">
+  <class class=".session.SessionData">
     <allow interface=".interfaces.ISessionData" />
-  </content>
+  </class>
 
-  <content class=".session.SessionPkgData">
+  <class class=".session.SessionPkgData">
     <allow interface=".interfaces.ISessionPkgData" />
-  </content>
+  </class>
 
   <subscriber
       for="zope.app.appsetup.IDatabaseOpenedEvent"

Deleted: Zope3/trunk/src/zope/app/site/meta.zcml
===================================================================
--- Zope3/trunk/src/zope/app/site/meta.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/site/meta.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,36 +0,0 @@
-<configure
-    xmlns:meta="http://namespaces.zope.org/meta">
-
-  <meta:directives namespace="http://namespaces.zope.org/zope">
-
-    <meta:complexDirective
-        name="localService"
-        schema="zope.app.component.metadirectives.IClassDirective"
-        handler=".metaconfigure.LocalServiceDirective"
-        >
-
-      <meta:subdirective
-          name="implements"
-          schema="zope.app.component.metadirectives.IImplementsSubdirective"
-          />
-
-      <meta:subdirective
-          name="require"
-          schema="zope.app.component.metadirectives.IRequireSubdirective"
-          />
-
-      <meta:subdirective
-          name="allow"
-          schema="zope.app.component.metadirectives.IAllowSubdirective"
-          />
-
-      <meta:subdirective
-          name="factory"
-          schema="zope.app.component.metadirectives.IFactorySubdirective"
-          />
-
-    </meta:complexDirective>
-
-  </meta:directives>
-
-</configure>

Deleted: Zope3/trunk/src/zope/app/site/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/site/metaconfigure.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/site/metaconfigure.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -1,37 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Local Service Directive
-
-$Id$
-"""
-__docformat__ = "reStructuredText"
-import zope.deprecation
-from zope.interface import classImplements
-from zope.app.component.contentdirective import ContentDirective
-
-zope.deprecation.__show__.off()
-from zope.app.site.interfaces import ISimpleService
-zope.deprecation.__show__.on()
-
-class LocalServiceDirective(ContentDirective):
-
-    def __init__(self, _context, class_):
-        if not ISimpleService.implementedBy(class_):
-            classImplements(class_, ISimpleService)
-        super(LocalServiceDirective, self).__init__(_context, class_)
-
-zope.deprecation.deprecated(
-    'LocalServiceDirective',
-    'The concept of services has been removed. Use utilities instead. '
-    'The reference will be gone in Zope 3.3.')

Modified: Zope3/trunk/src/zope/app/sqlscript/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/sqlscript/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/sqlscript/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -3,11 +3,10 @@
     i18n_domain="zope"
     >
 
-  <vocabulary
+  <utility
+      component=".sqlscript.ConnectionNamesVocabulary"
       name="Connection Names"
-      factory="zope.app.component.vocabulary.UtilityVocabulary"
-      interface="zope.app.rdb.interfaces.IZopeDatabaseAdapter" 
-      nameOnly="True" />
+      />
 
   <permission
       id="zope.AddSQLScripts"
@@ -19,7 +18,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".sqlscript.SQLScript">
+  <class class=".sqlscript.SQLScript">
     <factory
         id="zope.app.content.SQLScript"
         title="SQL Script"
@@ -33,23 +32,23 @@
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
         />
-  </content>
+  </class>
 
 
   <!-- Arguments Directives -->
-  <content class=".sqlscript.Arguments">
+  <class class=".sqlscript.Arguments">
     <require
         permission="zope.ManageContent"
         interface="zope.interface.common.mapping.IEnumerableMapping"
         />
-  </content>
+  </class>
 
   <!-- SQL DTML Directives -->
-  <content class=".dtml.SQLDTML">
+  <class class=".dtml.SQLDTML">
     <require
         permission="zope.ManageContent"
         attributes="__call__" />
-  </content>
+  </class>
 
 
   <!-- include browser package -->

Modified: Zope3/trunk/src/zope/app/sqlscript/sqlscript.py
===================================================================
--- Zope3/trunk/src/zope/app/sqlscript/sqlscript.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/sqlscript/sqlscript.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -21,12 +21,14 @@
 from persistent import Persistent
 from persistent.dict import PersistentDict
 
-from zope.interface import implements
+from zope.interface import implements, classProvides
 from zope.interface.common.mapping import IEnumerableMapping
 
 from zope.app import zapi
 from zope.app.rdb import queryForResults
 from zope.app.container.contained import Contained
+from zope.app.schema.interfaces import IVocabularyFactory
+from zope.app.component.vocabulary import UtilityVocabulary
 from zope.app.cache.caching import getCacheForObject, getLocationForCache
 from zope.app.rdb.interfaces import IZopeDatabaseAdapter
 
@@ -203,3 +205,8 @@
 
     return parseArguments(text[length:], result)
 
+
+class ConnectionNamesVocabulary(UtilityVocabulary):
+    classProvides(IVocabularyFactory)
+    interface = IZopeDatabaseAdapter
+    nameOnly = True

Modified: Zope3/trunk/src/zope/app/undo/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/undo/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/undo/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -25,7 +25,7 @@
       />
 
 
-  <content class="zope.app.undo.ZODBUndoManager">
+  <class class="zope.app.undo.ZODBUndoManager">
     <require
         permission="zope.UndoOwnTransactions"
         interface="zope.app.undo.interfaces.IPrincipalUndo"
@@ -34,7 +34,7 @@
         permission="zope.UndoAllTransactions"
         interface="zope.app.undo.interfaces.IUndo"
         />
-  </content>
+  </class>
 
   <!-- Browser directives -->
 

Modified: Zope3/trunk/src/zope/app/workflow/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/workflow/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/workflow/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -39,23 +39,23 @@
 
   <!-- Process Definition Name Vocabualry -->
 
-  <vocabulary
-     name="ProcessDefinitions"
-     factory=".definition.ProcessDefinitionVocabulary"
-     />
+  <utility
+      component=".definition.ProcessDefinitionVocabulary"
+      name="ProcessDefinitions"
+      />
 
-  <content class=".definition.ProcessDefinitionVocabulary">
+  <class class=".definition.ProcessDefinitionVocabulary">
       <allow interface="zope.schema.interfaces.IVocabularyTokenized"/>
-  </content>
+  </class>
 
-  <content class=".definition.ProcessDefinitionTerm">
+  <class class=".definition.ProcessDefinitionTerm">
       <allow interface="zope.schema.interfaces.ITokenizedTerm"/>
-  </content>
+  </class>
 
 
   <!-- Process Instance Container -->
 
-  <content 
+  <class 
         class="zope.app.workflow.definition.ProcessDefinitionElementContainer">
 
     <implements
@@ -71,7 +71,7 @@
         permission="zope.workflow.ManageProcessDefinitions"
         interface="zope.app.container.interfaces.IWriteContainer"
         />
-  </content>
+  </class>
 
   <adapter
       factory="zope.app.workflow.instance.ProcessInstanceContainerAdapter"

Modified: Zope3/trunk/src/zope/app/workflow/definition.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/definition.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/workflow/definition.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -18,13 +18,14 @@
 from persistent import Persistent
 from persistent.dict import PersistentDict
 
-from zope.interface import implements
+from zope.interface import implements, classProvides
 
 from zope.schema.interfaces import ITokenizedTerm
 from zope.schema.interfaces import IVocabularyTokenized
 
 from zope.app import zapi
 from zope.app.container.contained import Contained, setitem, uncontained
+from zope.app.schema.interfaces import IVocabularyFactory
 from zope.app.workflow.interfaces import IProcessDefinitionElementContainer
 from zope.app.workflow.interfaces import IProcessDefinition
 
@@ -107,6 +108,7 @@
 class ProcessDefinitionVocabulary(object):
     """Vocabulary providing available process definition names."""
     implements(IVocabularyTokenized)
+    classProvides(IVocabularyFactory)
 
     def __init__(self, context):
         self.sm = zapi.getSiteManager(context)

Modified: Zope3/trunk/src/zope/app/workflow/stateful/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/workflow/stateful/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -2,7 +2,7 @@
 
 <!-- Stateful ProcessDefintion -->
 
-<content
+<class
     class=".definition.StatefulProcessDefinition">
   <factory
       id="zope.app.workflow.StatefulProcessDefinition"
@@ -22,12 +22,12 @@
       permission="zope.workflow.ManageProcessDefinitions"
       interface="zope.app.container.interfaces.IReadContainer"
       />
-</content>
+</class>
 
 
 <!-- States Container -->
 
-<content class=".definition.StatesContainer">
+<class class=".definition.StatesContainer">
   <factory
       id="zope.app.workflow.StatefulStatesContainer"
       />
@@ -38,11 +38,11 @@
   <implements
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
       />
-</content>
+</class>
 
 <!-- State -->
 
-<content class=".definition.State">
+<class class=".definition.State">
   <factory
       id="zope.app.workflow.StatefulState"
       />
@@ -54,15 +54,16 @@
   <implements
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
       />
-</content>
+</class>
 
-<vocabulary
+<utility
+    component=".definition.StateNamesVocabulary"
     name="Workflow State Names"
-    factory=".definition.StateNamesVocabulary" />
+    />
 
 <!-- Transitions Container -->
 
-<content class=".definition.TransitionsContainer">
+<class class=".definition.TransitionsContainer">
   <factory
       id="zope.app.workflow.StatefulTransitionsContainer"
       />
@@ -73,11 +74,11 @@
   <implements
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
       />
-</content>
+</class>
 
 <!-- Transition -->
 
-<content class=".definition.Transition">
+<class class=".definition.Transition">
   <factory
       id="zope.app.workflow.StatefulTransition"
       />
@@ -89,11 +90,11 @@
   <implements
       interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
       />
-</content>
+</class>
 
 <!-- ContentWorkflowsManager -->
 
-<content
+<class
     class=".contentworkflow.ContentWorkflowsManager">
   <factory
     id="zope.app.workflow.ContentWorkflowsManager"
@@ -111,7 +112,7 @@
     interface=".interfaces.IContentWorkflowsManager"
     attributes="cpRegistry"
     />
-</content>
+</class>
 
 <class class=".instance.StatefulProcessInstance">
   <require

Modified: Zope3/trunk/src/zope/app/workflow/stateful/definition.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/definition.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/workflow/stateful/definition.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -18,7 +18,7 @@
 from persistent import Persistent
 from persistent.dict import PersistentDict
 
-from zope.interface import implements
+from zope.interface import implements, classProvides
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 from zope.security.checker import CheckerPublic
 
@@ -26,6 +26,7 @@
 from zope.app.container.contained import Contained, containedEvent
 from zope.event import notify
 from zope.app.event.objectevent import ObjectEvent, modified
+from zope.app.schema.interfaces import IVocabularyFactory
 from zope.app.workflow.definition import ProcessDefinition
 from zope.app.workflow.definition import ProcessDefinitionElementContainer
 from zope.app.workflow.stateful.interfaces import IStatefulProcessDefinition
@@ -53,6 +54,7 @@
 class StateNamesVocabulary(SimpleVocabulary):
     """Vocabulary providing the names of states in a local process definition.
     """
+    classProvides(IVocabularyFactory)
 
     def __init__(self, context):
         terms = [SimpleTerm(name) for name in self._getStateNames(context)]
@@ -102,8 +104,8 @@
 
 class StatefulProcessDefinition(ProcessDefinition):
     """Stateful workflow process definition."""
-
     implements(IStatefulProcessDefinition, IReadContainer)
+    classProvides(IVocabularyFactory)
 
     def __init__(self):
         super(StatefulProcessDefinition, self).__init__()

Modified: Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -3,7 +3,7 @@
 
   <interface interface=".testobject.IWorkflowData"/>
 
-  <content class=".testobject.TestObject">
+  <class class=".testobject.TestObject">
 
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"/>
@@ -21,6 +21,6 @@
         interface=".testobject.ITestObject"
         set_schema=".testobject.ITestObject" />
 
-  </content>
+  </class>
 
 </configure>

Modified: Zope3/trunk/src/zope/app/zptpage/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/app/zptpage/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -8,7 +8,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".zptpage.ZPTPage">
+  <class class=".zptpage.ZPTPage">
     <factory
         id="zope.app.content.ZPTPage"
         title="ZPT Page"
@@ -30,7 +30,7 @@
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
         />
-  </content>
+  </class>
 
   <adapter 
       for="zope.app.folder.interfaces.IFolder"

Copied: Zope3/trunk/src/zope/modulealias/README.txt (from rev 66067, Zope3/branches/philikon-reduce-zcml/src/zope/modulealias/README.txt)

Modified: Zope3/trunk/src/zope/modulealias/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/modulealias/metaconfigure.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/modulealias/metaconfigure.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -25,11 +25,16 @@
 __docformat__ = 'restructuredtext'
 import sys
 import types
+import warnings
 
 class ModuleAliasException(Exception):
     pass
 
 def define_module_alias(_context, module, alias):
+    warnings.warn_explicit(
+        "The 'modulealais' directive has been deprecated and will be "
+        "removed in Zope 3.5.  Manipulate sys.modules manually instead.",
+        DeprecationWarning, _context.info.file, _context.info.line)    
     _context.action(
         discriminator = None,
         callable = alias_module,
@@ -49,4 +54,3 @@
             '"alias" module %s already exists in sys.modules' % alias)
     
     sys.modules[alias] = module_ob
-

Modified: Zope3/trunk/src/zope/modulealias/tests/test_modulealias.py
===================================================================
--- Zope3/trunk/src/zope/modulealias/tests/test_modulealias.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zope/modulealias/tests/test_modulealias.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,6 +17,7 @@
 """
 import unittest
 import sys
+import warnings
 from zope.configuration import xmlconfig
 from zope.configuration.config import ConfigurationContext
 # math is imported as an example module to test with
@@ -37,15 +38,22 @@
 
 
 class Test(unittest.TestCase):
+
     def setUp(self):
         self.keys = sys.modules.keys()
 
+        def ignorewarning(message, category, filename, lineno, file=None):
+            pass
+        warnings.showwarning = ignorewarning
+
     def tearDown(self):
         keys = sys.modules.keys()
         for key in keys:
             if key not in self.keys:
                 del sys.modules[key]
-        
+
+        warnings.resetwarnings()
+
     def test_definemodulealias(self):
         context = ConfigurationContext()
         from zope.modulealias.metaconfigure import alias_module

Modified: Zope3/trunk/src/zwiki/__init__.py
===================================================================
--- Zope3/trunk/src/zwiki/__init__.py	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zwiki/__init__.py	2006-03-19 16:27:42 UTC (rev 66068)
@@ -17,3 +17,7 @@
 """
 from zope.i18nmessageid import MessageFactory
 ZWikiMessageFactory = MessageFactory("zwiki")
+
+# BBB
+import sys
+sys.modules['zope.app.wiki'] = sys.modules[__name__]

Modified: Zope3/trunk/src/zwiki/configure.zcml
===================================================================
--- Zope3/trunk/src/zwiki/configure.zcml	2006-03-19 10:54:17 UTC (rev 66067)
+++ Zope3/trunk/src/zwiki/configure.zcml	2006-03-19 16:27:42 UTC (rev 66068)
@@ -7,9 +7,6 @@
    i18n_domain="zwiki"
    >
 
-  <!-- Backward compatibility -->
-  <modulealias module="zwiki" alias="zope.app.wiki" />
-
   <!-- Security definitions -->
 
   <role
@@ -89,7 +86,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".wiki.Wiki">
+  <class class=".wiki.Wiki">
 
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
@@ -115,7 +112,7 @@
         permission="zwiki.AddWikiPage"
         interface="zope.app.container.interfaces.IWriteContainer"/>
 
-  </content>
+  </class>
 
   <!-- Mail Subscriptions support -->
   <adapter
@@ -144,7 +141,7 @@
       type="zope.app.content.interfaces.IContentType"
       /> 
 
-  <content class=".wikipage.WikiPage">
+  <class class=".wikipage.WikiPage">
 
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
@@ -161,7 +158,7 @@
         permission="zwiki.AddWikiPage"
         set_schema=".interfaces.IWikiPage" />
 
-  </content>
+  </class>
 
   <adapter
       factory=".wikipage.WikiPageHierarchyAdapter"
@@ -189,7 +186,7 @@
       type="zope.app.content.interfaces.IContentType"
       />
 
-  <content class=".comment.Comment">
+  <class class=".comment.Comment">
 
     <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
@@ -205,7 +202,7 @@
         permission="zwiki.CommentWikiPage"
         set_schema=".interfaces.IComment" />
 
-  </content>
+  </class>
 
   <adapter
      for=".interfaces.IComment"



More information about the Checkins mailing list