Source

psilib / processor.py

Diff from to

File processor.py

 import os
 from psiutils import attset, attdel
 from Ft.Xml.Domlette import NonvalidatingReader as nr
-from psiutils import toxmlfile, tags, getname, getClass, stripws, psins
+from psiutils import toxmlfile, tags, getname, getclass, stripws, psins
 
 rsrc, fld, fmnt, cls, nm = u'resource', u'field', u'fragment', u'class', u'name'
 
         fields = [f for f in tags(source, psins, fld)]
         fragments = [f for f in tags(target, psins, fmnt)]
         for fragment in fragments:
-            fclass = getClass(fragment)
+            fclass = getclass(fragment)
             for field in fields:
                 if fclass == getname(field):
                     for child in fragment.childNodes:
     def _expand(self, lo, fragment, end):
         for resource in lo:
             for master in self._templates:
-                if getClass(resource) == getname(master):
+                if getclass(resource) == getname(master):
                     child = master.cloneNode(1)
                     attset(child, nm, getname(resource))
                     attdel(child, cls)
         fields = [f for f in tags(source, psins, fld)]
         fragments = [f for f in tags(target, psins, fmnt)]
         for fragment in fragments:
-            fclass = getClass(fragment)
+            fclass = getclass(fragment)
             for field in fields:
                 if fclass == getname(field):
                     pn = field.parentNode
         dwtemplates = [d.cloneNode(1) for d in self._templates]
         for i in dwtemplates:
             for master in self._templates:
-                if getClass(i) == getname(master):
+                if getclass(i) == getname(master):
                     child = master.cloneNode(1)
                     attset(child, nm, getname(i))
                     attdel(child, cls)
         codeOutsideHTMLIsLocked="false"'''
         tee = 'InstanceEnd'
         instance = child.firstChild
-        ttbe = self._doc.createComment(tbe % getClass(resource))
+        ttbe = self._doc.createComment(tbe % getclass(resource))
         ttee = self._doc.createComment(tee)
         instance.insertBefore(ttbe, instance.firstChild)
         instance.appendChild(ttee)
         if file: self._doc = nr.parseUri(file)
         stripws(self._doc)
         names = [getname(i) for i in tags(self._doc, psins, rsrc)]
-        classes = [getClass(i) for i in tags(self._doc, psins, rsrc)]
+        classes = [getclass(i) for i in tags(self._doc, psins, rsrc)]
         self._unexpanded = [i for i in tags(self._doc, psins, rsrc)
-                            if getClass(i) in names]
+                            if getclass(i) in names]
         self._templates = [i for i in tags(self._doc, psins, rsrc)
                            if getname(i) in classes]
         self._expandTemplatesDW()
         if file: self._doc = nr.parseUri(file)
         stripws(self._doc)
         names = [getname(i) for i in tags(self._doc, psins, rsrc)]
-        classes = [getClass(i) for i in tags(self._doc, psins, rsrc)]
+        classes = [getclass(i) for i in tags(self._doc, psins, rsrc)]
         self._unexpanded = [i for i in tags(self._doc, psins, rsrc)
-                            if getClass(i) in names]
+                            if getclass(i) in names]
         self._templates = [i for i in tags(self._doc, psins, rsrc)
                            if getname(i) in classes]
         self._expandTemplates()