docs: def makeproperty(ns, cls=None, name=None, docstring='', descendant=True):
          """
          Make a property on an instance of an SLDNode. If cls is omitted, the
          property is assumed to be a text node, with no corresponding class
          object. If name is omitted, the property is assumed to be a complex
          node, with a corresponding class wrapper.
  
          @type         ns: string
          @param        ns: The namespace of this property's node.
          @type        cls: class
          @param       cls: Optional. The class of the child property.
          @type       name: string
          @param      name: Optional. The name of the child property.
          @type  docstring: string
          @param docstring: Optional. The docstring to attach to the new property.
          @type  descendant: boolean
          @param descendant: Does this element descend from the parent, or is it a sibling?
  
          @rtype:  property attribute
          @return: A property attribute for this named property.
          """
          def get_property(self):
              """
              A generic property getter.
              """
              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):
              """
              A generic property setter.
              """
              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):
              """
              A generic property deleter.
              """
              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)