code: def makeproperty(ns, cls=None, name=None, docstring='', descendant=True):
          def get_property(self):
              if cls is None:
                  xpath = '%s:%s' % (ns, name)
              else:
                  xpath = '%s:%s' % (ns, cls.__name__)
              xpath = self._node.xpath(xpath, namespaces=SLDNode._nsmap)
              if len(xpath) == 1:
                  if cls is None:
                      return xpath[0].text
                  else:
                      elem = cls.__new__(cls)
                      cls.__init__(elem, self, descendant=descendant)
                      return elem
              else:
                  return None
          def set_property(self, value):
              if cls is None:
                  xpath = '%s:%s' % (ns, name)
              else:
                  xpath = '%s:%s' % (ns, cls.__name__)
              xpath = self._node.xpath(xpath, namespaces=SLDNode._nsmap)
              if len(xpath) == 1:
                  if cls is None:
                      xpath[0].text = value
                  else:
                      xpath[0] = value._node
              else:
                  if cls is None:
                      elem = self._node.makeelement('{%s}%s' % (SLDNode._nsmap[ns], name), nsmap=SLDNode._nsmap)
                      elem.text = value
                      self._node.append(elem)
                  else:
                      self._node.append(value._node)
          def del_property(self):
              if cls is None:
                  xpath = '%s:%s' % (ns, name)
              else:
                  xpath = '%s:%s' % (ns, cls.__name__)
              xpath = self._node.xpath(xpath, namespaces=SLDNode._nsmap)
              if len(xpath) == 1:
                  self._node.remove(xpath[0])
          return property(get_property, set_property, del_property, docstring)