[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py Fixed a bug that Marius just pointed out. It should now be possible to

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Jul 16 07:22:32 EDT 2004


Log message for revision 26575:
  Fixed a bug that Marius just pointed out. It should now be possible to 
  use custom namespaces not starting with http://namespaces.zope.org/ as 
  well.
  


Changed:
  U   Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py


-=-
Modified: Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py	2004-07-16 10:05:08 UTC (rev 26574)
+++ Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py	2004-07-16 11:22:32 UTC (rev 26575)
@@ -112,10 +112,7 @@
 
     def getFullName(self):
         """Get the full name of the namespace."""
-        name = self.__realname__
-        if name != 'ALL' and not name.startswith('http://namespaces.zope.org/'):
-            name = 'http://namespaces.zope.org/' + name
-        return name
+        return self.__realname__
 
     def getQuotedName(self):
         """Get the full name, but quoted for a URL."""
@@ -232,13 +229,16 @@
             self._makeDocStructure()
 
         key = unquoteNS(key)
-        if not (key == 'ALL' or key.startswith('http://namespaces.zope.org/')):
-            key = 'http://namespaces.zope.org/' + key
-        if not namespaces.has_key(key):
-            return default
-        return Namespace(self, key)
+        if namespaces.has_key(key):
+            return Namespace(self, key)
 
+        full_key = 'http://namespaces.zope.org/' + key
+        if namespaces.has_key(full_key):
+            return Namespace(self, full_key)        
+        
+        return default
 
+
     def items(self):
         """See zope.app.container.interfaces.IReadContainer"""
         if namespaces is None or subdirs is None:



More information about the Zope3-Checkins mailing list