(self, ref)
return ref in uploads
Return true if there is an upload node with the given ref
Return true if there is an upload node with the given ref
Return true if there is an upload node with the given ref
def is_attachment(self, ref):
        """Return true if there is an upload node with the given ref """
        try:
            uploads = self.xform.__upload_refs
        except AttributeError:
            itr = self.xform.find('{h}body').iterfind(".//{f}upload[@ref]")
            uploads = self.xform.__upload_refs = set(node.attrib["ref"] for node in itr)
        return ref in uploads
def is_attachment ( self , ref ) : try : uploads = self . xform . __upload_refs except AttributeError : itr = self . xform . find ( '{h}body' ) . iterfind ( ".//{f}upload[@ref]" ) uploads = self . xform . __upload_refs = set ( node . attrib [ "ref" ] for node in itr ) return ref in uploads