[Zope3-checkins] CVS: Zope3/src/zope/configuration - xmlconfig.py:1.3

Jim Fulton jim@zope.com
Fri, 27 Dec 2002 18:25:19 -0500


Update of /cvs-repository/Zope3/src/zope/configuration
In directory cvs.zope.org:/tmp/cvs-serv14661

Modified Files:
	xmlconfig.py 
Log Message:
Added support for directives that can use data in text nodes.

Complex directives can implement a method, zcmlText to except data
from text nodes.


=== Zope3/src/zope/configuration/xmlconfig.py 1.2 => 1.3 ===
--- Zope3/src/zope/configuration/xmlconfig.py:1.2	Wed Dec 25 09:13:33 2002
+++ Zope3/src/zope/configuration/xmlconfig.py	Fri Dec 27 18:25:18 2002
@@ -86,6 +86,13 @@
     def setDocumentLocator(self, locator):
         self.__locator = locator
 
+    def characters(self, text):
+        stack = self.__stack
+        if len(stack) > 1:
+            base = stack[-1][0]
+            if hasattr(base, 'zcmlText'):
+                base.zcmlText(text)
+
     def startElementNS(self, name, qname, attrs):
         stack = self.__stack
         if not stack: