|
|
| version 1.26, 2002/01/14 15:29:41 | version 1.30, 2002/01/24 13:26:01 |
|---|---|
| Line 18 | Line 18 |
| extern "C" { | extern "C" { |
| #include "gdomecore/gdome-xml-node.h" | #include "gdomecore/gdome-xml-node.h" |
| }; | |
| #include "gdomecore/gdome-xml-document.h" | #include "gdomecore/gdome-xml-document.h" |
| }; | |
| #include "gdome.h" | #include "gdome.h" |
| #include "libxml/xpath.h" | #include "libxml/xpath.h" |
| Line 27 extern "C" { | Line 27 extern "C" { |
| class xmlXPathObject_auto_ptr { | class xmlXPathObject_auto_ptr { |
| public: | public: |
| explicit xmlXPathObject_auto_ptr(xmlXPathObject *_P = 0) | explicit xmlXPathObject_auto_ptr(xmlXPathObject *_APtr = 0) |
| : _Owns(_P != 0), _Ptr(_P) {} | : _Owns(_APtr != 0), _Ptr(_APtr) {} |
| xmlXPathObject_auto_ptr(const xmlXPathObject_auto_ptr& _Y) | xmlXPathObject_auto_ptr(const xmlXPathObject_auto_ptr& _Y) |
| : _Owns(_Y._Owns), _Ptr(_Y.release()) {} | : _Owns(_Y._Owns), _Ptr(_Y.release()) {} |
| xmlXPathObject_auto_ptr& operator=(const xmlXPathObject_auto_ptr& _Y) | xmlXPathObject_auto_ptr& operator=(const xmlXPathObject_auto_ptr& _Y) |
| Line 60 private: | Line 60 private: |
| class xmlXPathContext_auto_ptr { | class xmlXPathContext_auto_ptr { |
| public: | public: |
| explicit xmlXPathContext_auto_ptr(xmlXPathContext *_P = 0) | explicit xmlXPathContext_auto_ptr(xmlXPathContext *_APtr = 0) |
| : _Owns(_P != 0), _Ptr(_P) {} | : _Owns(_APtr != 0), _Ptr(_APtr) {} |
| xmlXPathContext_auto_ptr(const xmlXPathContext_auto_ptr& _Y) | xmlXPathContext_auto_ptr(const xmlXPathContext_auto_ptr& _Y) |
| : _Owns(_Y._Owns), _Ptr(_Y.release()) {} | : _Owns(_Y._Owns), _Ptr(_Y.release()) {} |
| xmlXPathContext_auto_ptr& operator=(const xmlXPathContext_auto_ptr& _Y) | xmlXPathContext_auto_ptr& operator=(const xmlXPathContext_auto_ptr& _Y) |
| Line 405 static void _selectX(Request& r, const S | Line 405 static void _selectX(Request& r, const S |
| xmlXPathObject_auto_ptr res( | xmlXPathObject_auto_ptr res( |
| xmlXPathEvalExpression(BAD_CAST pool.transcode(expression)->str, ctxt.get())); | xmlXPathEvalExpression(BAD_CAST pool.transcode(expression)->str, ctxt.get())); |
| if(xmlHaveGenericErrors()) { | |
| GdomeException exc=0; | |
| throw Exception(0, 0, | |
| &expression, | |
| exc); | |
| } | |
| Value *result=0; | Value *result=0; |
| if(res.get()) | if(res.get()) |
| handler(pool, expression, res, result); | handler(pool, expression, res, result); |
| Line 434 static void selectNodesHandler(Pool& poo | Line 441 static void selectNodesHandler(Pool& poo |
| } | } |
| hash.put(skey, new(pool) VXnode(pool, | hash.put(skey, new(pool) VXnode(pool, |
| gdome_xml_n_mkref(res->nodesetval->nodeTab[0]))); | gdome_xml_n_mkref(res->nodesetval->nodeTab[i]))); |
| } | } |
| result=vhash; | result=vhash; |
| } | } |