Diff for /parser3/src/classes/xdoc.C between versions 1.108.2.6 and 1.108.2.9

version 1.108.2.6, 2003/02/06 15:33:15 version 1.108.2.9, 2003/02/17 17:05:03
Line 41  extern "C" { Line 41  extern "C" {
   
 // class  // class
   
 class MXdoc : public MXnode {  class MXdoc: public MXnode {
 public: // VStateless_class  public: // VStateless_class
         ValuePtr create_new_value() { return ValuePtr(new VXdoc(0); }          ValuePtr create_new_value() { return ValuePtr(new VXdoc(0); }
   
Line 52  public: // Methoded Line 52  public: // Methoded
         void configure_admin(Request& r);          void configure_admin(Request& r);
 };  };
   
   // global variable
   
   MethodedPtr xdoc_class(new MXdoc);
   
 // helper classes  // helper classes
   
 class xmlOutputBuffer_auto_ptr {  class xmlOutputBuffer_auto_ptr {
Line 306  static void _getElementsByTagName(Reques Line 310  static void _getElementsByTagName(Reques
                 for(gulong i=0; i<length; i++) {                  for(gulong i=0; i<length; i++) {
                         String& skey=*new(pool) String(pool);                          String& skey=*new(pool) String(pool);
                         {                          {
                                 char *buf=(char *)pool.malloc(MAX_NUMBER);                                  char *buf=new(pool) char[MAX_NUMBER];
                                 snprintf(buf, MAX_NUMBER, "%d", i);                                  snprintf(buf, MAX_NUMBER, "%d", i);
                                 skey << buf;                                  skey << buf;
                         }                          }
Line 341  static void _getElementsByTagNameNS(Requ Line 345  static void _getElementsByTagNameNS(Requ
                 gulong length=gdome_nl_length(nodes, &exc);                  gulong length=gdome_nl_length(nodes, &exc);
                 for(gulong i=0; i<length; i++) {                  for(gulong i=0; i<length; i++) {
                         String& skey=*new(pool) String(pool);                          String& skey=*new(pool) String(pool);
                         {                          skey << pool.format_integer(i);
                                 char *buf=(char *)pool.malloc(MAX_NUMBER);  
                                 snprintf(buf, MAX_NUMBER, "%d", i);  
                                 skey << buf;  
                         }  
   
                         result.hash(0).put(skey, new(pool) VXnode(pool, gdome_nl_item(nodes, i, &exc)));                          result.hash(0).put(skey, new(pool) VXnode(pool, gdome_nl_item(nodes, i, &exc)));
                 }                  }
Line 656  static void xdoc2buf(Pool& pool, VXdoc& Line 656  static void xdoc2buf(Pool& pool, VXdoc&
                                         gnome_buf, gnome_size,                                           gnome_buf, gnome_size, 
                                         true/*as_text*/);                                          true/*as_text*/);
         else if(*parser_size=gnome_size) {          else if(*parser_size=gnome_size) {
                 *parser_buf=(char *)pool.malloc(gnome_size);                  *parser_buf=(char *)pool.copy(gnome_buf, gnome_size);
                 memcpy(*parser_buf, gnome_buf, gnome_size);  
         } else          } else
                 *parser_buf=0;                  *parser_buf=0;
 }  }
Line 800  static void _transform(Request& r, Strin Line 799  static void _transform(Request& r, Strin
                 if(!vparams.is_string())                  if(!vparams.is_string())
                         if(Hash *params=vparams.get_hash(&method_name)) {                          if(Hash *params=vparams.get_hash(&method_name)) {
                                 const char* *current_transform_param=transform_params=                                  const char* *current_transform_param=transform_params=
                                         (const char* *)pool.malloc(sizeof(const char* )*(params.count()*2+1));                                          new(pool) const char*[params.count()*2+1];
                                 params.for_each(add_xslt_param, &current_transform_param);                                  params.for_each(add_xslt_param, &current_transform_param);
                                 transform_params[params.count()*2]=0;                                                             transform_params[params.count()*2]=0;                           
                         } else                          } else
Line 918  MXdoc::MXdoc(Pool& apool) : MXnode(apool Line 917  MXdoc::MXdoc(Pool& apool) : MXnode(apool
 void MXdoc::configure_admin(Request& r) {  void MXdoc::configure_admin(Request& r) {
 }  }
   
 // global variable  # else
   
 Methoded *Xdoc_class;  // global variable
   
 // creator  MethodedPtr xdoc_class(0); // fictive
   
 #endif  #endif
   
 Methoded *MXdoc_create(Pool& pool) {  
         return   
 #ifdef XML  
                 Xdoc_class=new(pool) MXdoc(pool)  
 #else  
                 0  
 #endif  
         ;  
 }  

Removed from v.1.108.2.6  
changed lines
  Added in v.1.108.2.9


E-mail: