--- parser3/src/classes/xdoc.C 2002/06/27 11:56:18 1.93.2.1 +++ parser3/src/classes/xdoc.C 2002/06/27 08:32:18 1.94 @@ -4,7 +4,7 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: xdoc.C,v 1.93.2.1 2002/06/27 11:56:18 paf Exp $ + $Id: xdoc.C,v 1.94 2002/06/27 08:32:18 paf Exp $ */ #include "classes.h" #ifdef XML @@ -332,13 +332,15 @@ GdomeElement *gdome_doc_createElementNS GdomeAttr *gdome_doc_createAttributeNS (GdomeDocument *self, GdomeDOMString *namespaceURI, GdomeDOMString *qualifiedName, GdomeException *exc); */ + static void _create(Request& r, const String& method_name, MethodParams *params) { + //_asm int 3; Pool& pool=r.pool(); VXdoc& vdoc=*static_cast(r.self); - Value& param=params->get(params->size()-1); + Value& param=params->get(0); GdomeDocument *document; - if(param.get_junction()) { // {...} + if(param.get_junction()) { // {} Temp_lang temp_lang(r, String::UL_XML); const String& xml=r.process_to_string(param); @@ -381,18 +383,6 @@ static void _create(Request& r, const St /// +xalan createXMLDecl ? } - - // URI - const char *URI_cstr; - if(params->size()>1) { // absolute(param) - const String& URI=params->as_string(0, "URI must be string"); - URI_cstr=r.absolute(URI).cstr(); - } else // default = disk path to requested document - URI_cstr=r.info.path_translated; - xmlDoc *doc=gdome_xml_doc_get_xmlDoc(document); - if(URI_cstr) - doc->URL=pool.transcode_buf2xchar(URI_cstr, strlen(URI_cstr)); - // replace any previous parsed source vdoc.set_document(document); } @@ -798,9 +788,8 @@ MXdoc::MXdoc(Pool& apool) : MXnode(apool /// parser // ^xdoc::create{qualifiedName} - // ^xdoc::create[xml] - // ^xdoc::create[URI][xml] - add_native_method("create", Method::CT_DYNAMIC, _create, 1, 2); + // ^xdoc::_create[xml] + add_native_method("create", Method::CT_DYNAMIC, _create, 1, 1); // for backward compatibility with <=v 1.82 2002/01/31 11:51:46 paf add_native_method("set", Method::CT_DYNAMIC, _create, 1, 1);