Diff for /parser3/src/classes/xnode.C between versions 1.32 and 1.35

version 1.32, 2002/01/24 14:10:08 version 1.35, 2002/01/28 10:50:03
Line 12 Line 12
 #include "pa_charset.h"  #include "pa_charset.h"
 #include "pa_request.h"  #include "pa_request.h"
 #include "pa_vxnode.h"  #include "pa_vxnode.h"
   #include "pa_vxdoc.h"
 #include "pa_vvoid.h"  #include "pa_vvoid.h"
   
 #include "xnode.h"  #include "xnode.h"
Line 23  extern "C" { Line 24  extern "C" {
 #include "gdome.h"  #include "gdome.h"
 #include "libxml/xpath.h"  #include "libxml/xpath.h"
   
   // defines 
   
   #define XNODE_CLASS_NAME "xnode"
   
 // classes  // classes
   
 class xmlXPathObject_auto_ptr {  class xmlXPathObject_auto_ptr {
Line 91  private: Line 96  private:
         xmlXPathContext *_Ptr;          xmlXPathContext *_Ptr;
 };  };
   
 // defines  
   
 #define XNODE_CLASS_NAME "xnode"  
   
 // helpers  // helpers
   
 GdomeNode *as_node(Pool& pool, const String& method_name, MethodParams *params,   GdomeNode *as_node(Pool& pool, const String& method_name, MethodParams *params, 
                                                 int index, const char *msg) {                                                  int index, const char *msg) {
         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)
                 throw Exception(0, 0,                  throw Exception(0, 0,
                         &method_name,                          &method_name,
                         msg);                          msg);
Line 212  static void _hasChildNodes(Request& r, c Line 214  static void _hasChildNodes(Request& r, c
 }  }
   
 // Node cloneNode(in boolean deep);  // Node cloneNode(in boolean deep);
 /// @test ownerDocument=?  
 static void _cloneNode(Request& r, const String& method_name, MethodParams *params) {  static void _cloneNode(Request& r, const String& method_name, MethodParams *params) {
         Pool& pool=r.pool();          Pool& pool=r.pool();
         VXnode& vnode=*static_cast<VXnode *>(r.self);          VXnode& vnode=*static_cast<VXnode *>(r.self);
Line 398  static void _selectX(Request& r, const S Line 399  static void _selectX(Request& r, const S
         GdomeDocument *dome_document=gdome_n_ownerDocument(dome_node, &exc);          GdomeDocument *dome_document=gdome_n_ownerDocument(dome_node, &exc);
         if(!dome_document) // document does not own itself, so ownerDocument = 0          if(!dome_document) // document does not own itself, so ownerDocument = 0
                 dome_document=GDOME_DOC(dome_node); // and we need downcast                  dome_document=GDOME_DOC(dome_node); // and we need downcast
         xmlDoc *xml_document=((_Gdome_xml_Document *)dome_document)->n;          xmlDoc *xml_document=gdome_xml_doc_get_xmlDoc(dome_document);
     xmlXPathContext_auto_ptr ctxt(xmlXPathNewContext(xml_document));      xmlXPathContext_auto_ptr ctxt(xmlXPathNewContext(xml_document));
         ctxt->node=gdome_xml_n_get_xmlNode(dome_node);          ctxt->node=gdome_xml_n_get_xmlNode(dome_node);
         /*error to stderr for now*/          /*error to stderr for now*/

Removed from v.1.32  
changed lines
  Added in v.1.35


E-mail: