|
|
| version 1.40, 2002/02/26 12:49:45 | version 1.41, 2002/03/27 15:30:35 |
|---|---|
| Line 103 GdomeNode *as_node(Pool& pool, const Str | Line 103 GdomeNode *as_node(Pool& pool, const Str |
| Value& value=params->as_no_junction(index, msg); | Value& value=params->as_no_junction(index, msg); |
| if(!(strcmp(value.type(), VXNODE_TYPE)==0 | if(!(strcmp(value.type(), VXNODE_TYPE)==0 |
| || strcmp(value.type(), VXDOC_TYPE)==0)) | || strcmp(value.type(), VXDOC_TYPE)==0)) |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &method_name, | &method_name, |
| msg); | msg); |
| Line 118 GdomeAttr * as_attr(Pool& pool, const St | Line 118 GdomeAttr * as_attr(Pool& pool, const St |
| GdomeNode *node=as_node(pool, method_name, params, index, msg); | GdomeNode *node=as_node(pool, method_name, params, index, msg); |
| GdomeException exc; | GdomeException exc; |
| if(gdome_n_nodeType(node, &exc)!=GDOME_ATTRIBUTE_NODE) | if(gdome_n_nodeType(node, &exc)!=GDOME_ATTRIBUTE_NODE) |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &method_name, | &method_name, |
| msg); | msg); |
| Line 143 static void _insertBefore(Request& r, co | Line 143 static void _insertBefore(Request& r, co |
| VXnode& result=*new(pool) VXnode(pool, retNode); | VXnode& result=*new(pool) VXnode(pool, retNode); |
| r.write_no_lang(result); | r.write_no_lang(result); |
| } else | } else |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 161 static void _replaceChild(Request& r, co | Line 161 static void _replaceChild(Request& r, co |
| // write out result | // write out result |
| r.write_no_lang(*new(pool) VXnode(pool, retNode)); | r.write_no_lang(*new(pool) VXnode(pool, retNode)); |
| } else | } else |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 178 static void _removeChild(Request& r, con | Line 178 static void _removeChild(Request& r, con |
| // write out result | // write out result |
| r.write_no_lang(*new(pool) VXnode(pool, retNode)); | r.write_no_lang(*new(pool) VXnode(pool, retNode)); |
| } else | } else |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 195 static void _appendChild(Request& r, con | Line 195 static void _appendChild(Request& r, con |
| // write out result | // write out result |
| r.write_no_lang(*new(pool) VXnode(pool, retNode)); | r.write_no_lang(*new(pool) VXnode(pool, retNode)); |
| } else | } else |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 237 GdomeElement *get_self_element(Request& | Line 237 GdomeElement *get_self_element(Request& |
| GdomeException exc; | GdomeException exc; |
| if(gdome_n_nodeType(node, &exc)!=GDOME_ELEMENT_NODE) | if(gdome_n_nodeType(node, &exc)!=GDOME_ELEMENT_NODE) |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &method_name, | &method_name, |
| "method can be called on node of ELEMENT type"); | "method can be called on node of ELEMENT type"); |
| Line 270 static void _setAttribute(Request& r, co | Line 270 static void _setAttribute(Request& r, co |
| pool.transcode(attribute_value).get(), | pool.transcode(attribute_value).get(), |
| &exc); | &exc); |
| if(exc) | if(exc) |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 284 static void _removeAttribute(Request& r, | Line 284 static void _removeAttribute(Request& r, |
| GdomeException exc; | GdomeException exc; |
| gdome_el_removeAttribute(element, pool.transcode(name).get(), &exc); | gdome_el_removeAttribute(element, pool.transcode(name).get(), &exc); |
| if(exc) | if(exc) |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 301 static void _getAttributeNode(Request& r | Line 301 static void _getAttributeNode(Request& r |
| VXnode& result=*new(pool) VXnode(pool, (GdomeNode *)attr); | VXnode& result=*new(pool) VXnode(pool, (GdomeNode *)attr); |
| r.write_no_lang(result); | r.write_no_lang(result); |
| } else if(exc) | } else if(exc) |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 318 static void _setAttributeNode(Request& r | Line 318 static void _setAttributeNode(Request& r |
| VXnode& result=*new(pool) VXnode(pool, (GdomeNode *)returnAttr); | VXnode& result=*new(pool) VXnode(pool, (GdomeNode *)returnAttr); |
| r.write_no_lang(result); | r.write_no_lang(result); |
| } else | } else |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 332 static void _removeAttributeNode(Request | Line 332 static void _removeAttributeNode(Request |
| GdomeException exc; | GdomeException exc; |
| gdome_el_removeAttributeNode(element, oldAttr, &exc); | gdome_el_removeAttributeNode(element, oldAttr, &exc); |
| if(exc) | if(exc) |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 360 static void _getElementsByTagName(Reques | Line 360 static void _getElementsByTagName(Reques |
| 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))); |
| } | } |
| } else if(exc) | } else if(exc) |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| Line 410 static void _normalize(Request& r, const | Line 410 static void _normalize(Request& r, const |
| GdomeException exc; | GdomeException exc; |
| gdome_n_normalize(selfNode, &exc); | gdome_n_normalize(selfNode, &exc); |
| if(exc) | if(exc) |
| throw Exception(0, 0, | throw Exception( |
| &method_name, | &method_name, |
| exc); | exc); |
| } | } |
| Line 441 static void _selectX(Request& r, const S | Line 441 static void _selectX(Request& r, const S |
| if(xmlHaveGenericErrors()) { | if(xmlHaveGenericErrors()) { |
| GdomeException exc=0; | GdomeException exc=0; |
| throw Exception(0, 0, | throw Exception(&expression, exc); |
| &expression, | |
| exc); | |
| } | } |
| Value *result=0; | Value *result=0; |
| Line 481 static void selectNodesHandler(Pool& poo | Line 479 static void selectNodesHandler(Pool& poo |
| } | } |
| break; | break; |
| default: | default: |
| throw Exception(0, 0, | throw Exception(0, |
| &expression, | &expression, |
| "wrong xmlXPathEvalExpression result type (%d)", res->type); | "wrong xmlXPathEvalExpression result type (%d)", res->type); |
| break; // never | break; // never |
| Line 498 static void selectNodeHandler(Pool& pool | Line 496 static void selectNodeHandler(Pool& pool |
| case XPATH_NODESET: | case XPATH_NODESET: |
| if(res->nodesetval && res->nodesetval->nodeNr) { // empty result strangly has NODESET res->type | if(res->nodesetval && res->nodesetval->nodeNr) { // empty result strangly has NODESET res->type |
| if(res->nodesetval->nodeNr>1) | if(res->nodesetval->nodeNr>1) |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &expression, | &expression, |
| "resulted not in a single node (%d)", res->nodesetval->nodeNr); | "resulted not in a single node (%d)", res->nodesetval->nodeNr); |
| Line 518 static void selectNodeHandler(Pool& pool | Line 516 static void selectNodeHandler(Pool& pool |
| gdome_str_mkref_dup((const gchar *)res->stringval)).get())); | gdome_str_mkref_dup((const gchar *)res->stringval)).get())); |
| break; | break; |
| default: | default: |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &expression, | &expression, |
| "wrong xmlXPathEvalExpression result type (%d)", res->type); | "wrong xmlXPathEvalExpression result type (%d)", res->type); |
| break; // never | break; // never |
| Line 538 static void selectBoolHandler(Pool& pool | Line 536 static void selectBoolHandler(Pool& pool |
| break; | break; |
| // else[nodeset] fall down to default | // else[nodeset] fall down to default |
| default: | default: |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &expression, | &expression, |
| "wrong xmlXPathEvalExpression result type (%d)", res->type); | "wrong xmlXPathEvalExpression result type (%d)", res->type); |
| break; // never | break; // never |
| Line 558 static void selectNumberHandler(Pool& po | Line 556 static void selectNumberHandler(Pool& po |
| break; | break; |
| // else[nodeset] fall down to default | // else[nodeset] fall down to default |
| default: | default: |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &expression, | &expression, |
| "wrong xmlXPathEvalExpression result type (%d)", res->type); | "wrong xmlXPathEvalExpression result type (%d)", res->type); |
| break; // never | break; // never |
| Line 583 static void selectStringHandler(Pool& po | Line 581 static void selectStringHandler(Pool& po |
| break; | break; |
| // else[nodeset] fall down to default | // else[nodeset] fall down to default |
| default: | default: |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &expression, | &expression, |
| "wrong xmlXPathEvalExpression result type (%d)", res->type); | "wrong xmlXPathEvalExpression result type (%d)", res->type); |
| break; // never | break; // never |