    /*
     * call-seq:
     *   attributes
     *
     * Get a hash of the attributes for this DTD.
     */
    static VALUE attributes(VALUE self)
    {
      xmlDtdPtr dtd;
      VALUE hash;

      Data_Get_Struct(self, xmlDtd, dtd);

      hash = rb_hash_new();

      if(!dtd->attributes) return hash;

      xmlHashScan((xmlHashTablePtr)dtd->attributes, element_copier, (void *)hash);

      return hash;
    }