Logo Search packages:      
Sourcecode: ocrfeeder version File versions  Download package

def odf::element::Element::addAttrNS (   self,
  namespace,
  localpart,
  value 
)

Add an attribute to the element
    In case you need to add an attribute the library doesn't know about
    then you must provide the full qualified name
    It will not check that the attribute is legal according to the schema.

Definition at line 207 of file element.py.

00207                                                     :
        """ Add an attribute to the element
            In case you need to add an attribute the library doesn't know about
            then you must provide the full qualified name
            It will not check that the attribute is legal according to the schema.
        """
        allowed_attrs = self.allowed_attributes()
        prefix = _nsassign(namespace)
        if not self.namespaces.has_key(namespace):
            self.namespaces[namespace] = prefix
#       if allowed_attrs and (namespace, localpart) not in allowed_attrs:
#           raise AttributeError, "Attribute %s:%s is not allowed in element <%s>" % ( prefix, localpart, self.type)
        c = AttrConverters()
        self.attributes[prefix + ":" + localpart] = c.convert((namespace, localpart), value, self.qname)

    def getAttr(self, namespace, localpart):


Generated by  Doxygen 1.6.0   Back to index