[Zope3-checkins] CVS: Zope3/src/zope/app/xml - field.py:1.3.14.1 w3cschemalocations.py:1.4.12.1

Grégoire Weber zope@i-con.ch
Sun, 22 Jun 2003 10:24:07 -0400


Update of /cvs-repository/Zope3/src/zope/app/xml
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zope/app/xml

Modified Files:
      Tag: cw-mail-branch
	field.py w3cschemalocations.py 
Log Message:
Synced up with HEAD

=== Zope3/src/zope/app/xml/field.py 1.3 => 1.3.14.1 ===
--- Zope3/src/zope/app/xml/field.py:1.3	Thu Apr 10 05:05:13 2003
+++ Zope3/src/zope/app/xml/field.py	Sun Jun 22 10:23:36 2003
@@ -19,15 +19,15 @@
 from zope.schema import Bytes
 from zope.schema.fieldproperty import FieldProperty
 from xml.parsers.expat import ParserCreate, ExpatError
+from zope.interface import implements
 
 NotWellFormedXML = u"NotWellFormedXML"
 
 class XML(Bytes):
-    
-    __implements__ = IXML
+    implements(IXML)
 
     check_wellformedness = FieldProperty(IXML['check_wellformedness'])
-    
+
     def _validate(self, value):
         super(XML, self)._validate(value)
         if not self.check_wellformedness:
@@ -37,4 +37,3 @@
             parser.Parse(value, True)
         except ExpatError, e:
             raise ValidationError(NotWellFormedXML)
-        


=== Zope3/src/zope/app/xml/w3cschemalocations.py 1.4 => 1.4.12.1 ===
--- Zope3/src/zope/app/xml/w3cschemalocations.py:1.4	Wed Apr 30 16:13:23 2003
+++ Zope3/src/zope/app/xml/w3cschemalocations.py	Sun Jun 22 10:23:36 2003
@@ -27,7 +27,7 @@
     """
     schema_uris = getW3CXMLSchemaLocations(xmltext.source)
     schema_interfaces = getInterfacesForXMLSchemaLocations(schema_uris)
-    setInstanceInterfaces(xmltext, schema_interfaces)
+    directlyProvides(xmltext, *schema_interfaces)
 
 def getInterfacesForXMLSchemaLocations(schema_uris):
     """
@@ -39,9 +39,6 @@
         if interface is not None:
             result.append(interface)
     return result
-
-def setInstanceInterfaces(ob, interfaces):
-    directlyProvides(ob, *interfaces)
 
 def getW3CXMLSchemaLocations(xml):
     """Give list of URIs of the schema an XML document promises to implement.