Diff for /parser3/src/classes/xdoc.C between versions 1.151 and 1.154

version 1.151, 2007/02/28 19:09:23 version 1.154, 2007/04/23 10:30:10
Line 158  private: Line 158  private:
   
 static void writeNode(Request& r, VXdoc& xdoc, xmlNode* node) {  static void writeNode(Request& r, VXdoc& xdoc, xmlNode* node) {
         if(!node)          if(!node)
                 throw Exception("parser.runtime",                  throw Exception(PARSER_RUNTIME,
                         0,                          0,
                         "error creating node"); // OOM, bad name, things like that                          "error creating node"); // OOM, bad name, things like that
   
Line 399  static void _create(Request& r, MethodPa Line 399  static void _create(Request& r, MethodPa
   
                 // must be last action in if, see after if}                  // must be last action in if, see after if}
         } else { // [localName]          } else { // [localName]
                 if (VFile* vfile=param.as_vfile(String::L_UNSPECIFIED)){                  if(const String* value = param.get_string()){
                         xmldoc=xmlParseMemory(vfile->value_ptr(), vfile->value_size());                          xmlChar* localName=r.transcode(*value);
                         if(!xmldoc || xmlHaveGenericErrors())  
                                 throw XmlException(0);  
                 } else {  
                         xmlChar* localName=r.transcode(param.as_string());  
 #if 0  #if 0
                 GdomeDocumentType *documentType=gdome_di_createDocumentType (                          GdomeDocumentType *documentType=gdome_di_createDocumentType (
                         docimpl,                                   docimpl, 
                         r.transcode(qualifiedName),                                   r.transcode(qualifiedName), 
                         0/*publicId*/,                                   0/*publicId*/, 
                         0/*systemId*/,                                   0/*systemId*/, 
                         &exc);                                  &exc);
                 if(!documentType || exc || xmlHaveGenericErrors())                          if(!documentType || exc || xmlHaveGenericErrors())
                         throw Exception(                                  throw Exception(
                                 method_name,                                           method_name, 
                                 exc);                                          exc);
                 /// +xalan createXMLDecl ?                          /// +xalan createXMLDecl ?
 #endif  #endif
                         xmldoc=xmlNewDoc(0);                          xmldoc=xmlNewDoc(0);
                         if(!xmldoc || xmlHaveGenericErrors())                          if(!xmldoc || xmlHaveGenericErrors())
Line 427  static void _create(Request& r, MethodPa Line 423  static void _create(Request& r, MethodPa
   
                         set_encoding=true;                          set_encoding=true;
                         // must be last action in if, see after if}                          // must be last action in if, see after if}
                   } else {
                           VFile* vfile=param.as_vfile(String::L_UNSPECIFIED);
                           xmldoc=xmlParseMemory(vfile->value_ptr(), vfile->value_size());
                           if(!xmldoc || xmlHaveGenericErrors())
                                   throw XmlException(0);
                 }                  }
         }          }
         // must be first action after if}          // must be first action after if}
Line 486  static void param_option_over_output_opt Line 487  static void param_option_over_output_opt
                 else if(s=="no")                  else if(s=="no")
                         output_option=0;                          output_option=0;
                 else                  else
                         throw Exception("parser.runtime",                          throw Exception(PARSER_RUNTIME,
                                 &s,                                  &s,
                                 "%s must be either 'yes' or 'no'", option_name);                                  "%s must be either 'yes' or 'no'", option_name);
         }          }
Line 576  static Xdoc2buf_result xdoc2buf(Request& Line 577  static Xdoc2buf_result xdoc2buf(Request&
   
         xmlCharEncodingHandler *renderer=xmlFindCharEncodingHandler(render_encoding);          xmlCharEncodingHandler *renderer=xmlFindCharEncodingHandler(render_encoding);
         if(!renderer)          if(!renderer)
                 throw Exception("parser.runtime",                  throw Exception(PARSER_RUNTIME,
                         0,                          0,
                         "encoding '%s' not supported", render_encoding);                          "encoding '%s' not supported", render_encoding);
         // UTF-8 renderer contains empty input/output converters,           // UTF-8 renderer contains empty input/output converters, 
Line 774  static void _transform(Request& r, Metho Line 775  static void _transform(Request& r, Metho
                                 hash->for_each<Add_xslt_param_info*>(add_xslt_param, &info);                                  hash->for_each<Add_xslt_param_info*>(add_xslt_param, &info);
                                 transform_params[hash->count()*2]=0;                                                              transform_params[hash->count()*2]=0;                            
                         } else                          } else
                                 throw Exception("parser.runtime",                                  throw Exception(PARSER_RUNTIME,
                                         0,                                          0,
                                         "transform parameters parameter must be hash");                                          "transform parameters parameter must be hash");
         }          }

Removed from v.1.151  
changed lines
  Added in v.1.154


E-mail: