    /*
     *  call-seq:
     *    namespace_definitions()
     *
     *  returns a list of Namespace nodes defined on _self_
     */
    static VALUE namespace_definitions(VALUE self)
    {
      /* this code in the mode of xmlHasProp() */
      xmlNodePtr node ;

      Data_Get_Struct(self, xmlNode, node);

      VALUE list = rb_ary_new();

      xmlNsPtr ns = node->nsDef;

      if(!ns) return list;

      while(NULL != ns) {
        rb_ary_push(list, Nokogiri_wrap_xml_namespace(node->doc, ns));
        ns = ns->next;
      }

      return list;
    }