--- parser3/src/classes/xnode.C 2003/03/18 16:00:06 1.54.2.10.2.2 +++ parser3/src/classes/xnode.C 2003/03/20 08:11:12 1.54.2.10.2.4 @@ -7,7 +7,7 @@ #include "classes.h" #ifdef XML -static const char* IDENT_XNODE_C="$Date: 2003/03/18 16:00:06 $"; +static const char* IDENT_XNODE_C="$Date: 2003/03/20 08:11:12 $"; #include "pa_vmethod_frame.h" @@ -139,7 +139,7 @@ static void _insertBefore(Request& r, co GdomeException exc; if(GdomeNode *retNode=gdome_n_insertBefore(selfNode, newChild, refChild, &exc)) { // write out result - r.write_no_lang(ValuePtr(new VXnode(&pool, &r.charsets, retNode))); + r.write_no_lang(ValuePtr(new VXnode(&&r.charsets, retNode))); } else throw Exception( method_name, @@ -156,7 +156,7 @@ static void _replaceChild(Request& r, co GdomeException exc; if(GdomeNode *retNode=gdome_n_replaceChild(selfNode, newChild, refChild, &exc)) { // write out result - r.write_no_lang(ValuePtr(new VXnode(&pool, &r.charsets, retNode))); + r.write_no_lang(ValuePtr(new VXnode(&&r.charsets, retNode))); } else throw Exception( method_name, @@ -172,7 +172,7 @@ static void _removeChild(Request& r, con GdomeException exc; if(GdomeNode *retNode=gdome_n_removeChild(selfNode, oldChild, &exc)) { // write out result - r.write_no_lang(ValuePtr(new VXnode(&pool, &r.charsets, retNode))); + r.write_no_lang(ValuePtr(new VXnode(&&r.charsets, retNode))); } else throw Exception( method_name, @@ -188,7 +188,7 @@ static void _appendChild(Request& r, con GdomeException exc; if(GdomeNode *retNode=gdome_n_appendChild(selfNode, newChild, &exc)) { // write out result - r.write_no_lang(ValuePtr(new VXnode(&pool, &r.charsets, retNode))); + r.write_no_lang(ValuePtr(new VXnode(&&r.charsets, retNode))); } else throw Exception( method_name, @@ -215,7 +215,7 @@ static void _cloneNode(Request& r, const GdomeException exc; // write out result - r.write_no_lang(ValuePtr(new VXnode(&pool, &r.charsets, gdome_n_cloneNode(node, deep, &exc)))); + r.write_no_lang(ValuePtr(new VXnode(&&r.charsets, gdome_n_cloneNode(node, deep, &exc)))); } // DOM1 element @@ -285,7 +285,7 @@ static void _getAttributeNode(Request& r GdomeException exc; if(GdomeAttr *attr=gdome_el_getAttributeNode(element, r.transcode(name).get(), &exc)) { // write out result - r.write_no_lang(ValuePtr(new VXnode(&pool, &r.charsets, (GdomeNode *)attr))); + r.write_no_lang(ValuePtr(new VXnode(&&r.charsets, (GdomeNode *)attr))); } else if(exc) throw Exception( method_name, @@ -295,12 +295,12 @@ static void _getAttributeNode(Request& r // Attr setAttributeNode(in Attr newAttr) raises(DOMException); static void _setAttributeNode(Request& r, const String& method_name, MethodParams* params) { GdomeElement *element=get_self_element(r, method_name); - GdomeAttr * newAttr=as_attr(pool, method_name, params, 0, "newAttr must be ATTRIBUTE node"); + GdomeAttr * newAttr=as_attr(method_name, params, 0, "newAttr must be ATTRIBUTE node"); GdomeException exc; if(GdomeAttr *returnAttr=gdome_el_setAttributeNode(element, newAttr, &exc)) { // write out result - r.write_no_lang(ValuePtr(new VXnode(&pool, &r.charsets, (GdomeNode *)returnAttr))); + r.write_no_lang(ValuePtr(new VXnode(&&r.charsets, (GdomeNode *)returnAttr))); } else throw Exception( method_name, @@ -310,7 +310,7 @@ static void _setAttributeNode(Request& r // Attr removeAttributeNode(in Attr oldAttr) raises(DOMException); static void _removeAttributeNode(Request& r, const String& method_name, MethodParams* params) { GdomeElement *element=get_self_element(r, method_name); - GdomeAttr * oldAttr=as_attr(pool, method_name, params, 0, "oldAttr must be ATTRIBUTE node"); + GdomeAttr * oldAttr=as_attr(method_name, params, 0, "oldAttr must be ATTRIBUTE node"); GdomeException exc; gdome_el_removeAttributeNode(element, oldAttr, &exc); @@ -334,9 +334,9 @@ static void _getElementsByTagName(Reques for(gulong i=0; ihash(Exception::undefined_source).put( + result->hash(0).put( skey, - ValuePtr(new VXnode(&pool, &r.charsets, gdome_nl_item(nodes, i, &exc)))); + ValuePtr(new VXnode(&&r.charsets, gdome_nl_item(nodes, i, &exc)))); } } else if(exc) throw Exception( @@ -367,8 +367,8 @@ static void _getElementsByTagNameNS(Requ const String& skey(new String); *skey << pool.format_integer(i); - result->hash(Exception::undefined_source).put(skey, - ValuePtr(new VXnode(&pool, &r.charsets, gdome_nl_item(nodes, i, &exc)))); + result->hash(0).put(skey, + ValuePtr(new VXnode(&&r.charsets, gdome_nl_item(nodes, i, &exc)))); } } @@ -435,18 +435,18 @@ static void selectNodesHandler(Request& case XPATH_NODESET: if(res->nodesetval) if(int size=res->nodesetval->nodeNr) { - HashStringValue& hash=vhash->hash(Exception::undefined_source); + HashStringValue& hash=vhash->hash(0); for(int i=0; inodesetval->nodeTab[i])))); + ValuePtr(new VXnode(&&r.charsets, gdome_xml_n_mkref(res->nodesetval->nodeTab[i])))); } } break; default: - throw Exception(Exception::undefined_type, + throw Exception(0, expression, "wrong xmlXPathEvalExpression result type (%d)", res->type); break; // never @@ -468,7 +468,7 @@ static void selectNodeHandler(Request& r expression, "resulted not in a single node (%d)", res->nodesetval->nodeNr); - result=ValuePtr(new VXnode(&pool, &r.charsets, gdome_xml_n_mkref(res->nodesetval->nodeTab[0]))); + result=ValuePtr(new VXnode(&&r.charsets, gdome_xml_n_mkref(res->nodesetval->nodeTab[0]))); } break; case XPATH_BOOLEAN: