    /*
     * call-seq:
     *  register_variable(name, value)
     *
     * Register the variable +name+ with +value+.
     */
    static VALUE register_variable(VALUE self, VALUE name, VALUE value)
    {
       xmlXPathContextPtr ctx;
       xmlXPathObjectPtr xmlValue;
       Data_Get_Struct(self, xmlXPathContext, ctx);

       xmlValue = xmlXPathNewCString(StringValuePtr(value));

       xmlXPathRegisterVariable( ctx,
          (const xmlChar *)StringValuePtr(name),
          xmlValue
       );

       return self;
    }