// $Id: CXUActionBase.h,v 1.4 2003/05/10 06:46:47 ta_muto Exp $
// The class which supports XUpdate functions

#ifndef __wax_CXUActionBase_h
#define __wax_CXUActionBase_h

#include <common.h>
#include <CEnvironment.h>

namespace wax {
	class CXUActionBase {
	public:
		static xmlChar* getSelect(xmlNodePtr cur);
		static xmlDocPtr parse(CEnvironment* runenv, xmlNodePtr cur, CCollection& vars, xmlChar*& connect);
	protected:
		static xmlNodePtr parseInternal(CEnvironment* runenv, xmlNodePtr cur, xmlNsPtr ns, xmlNsPtr nsXUpdate, xmlNodePtr parent, CCollection& vars, xmlChar*& connect, bool& hasError);
		static xmlNodePtr addSibling(xmlNodePtr base, xmlNodePtr node);
		
		static xmlNodePtr newElementNode(xmlNodePtr retItem, xmlNsPtr ns, const xmlChar* name, xmlNodePtr& node, bool& hasError);
		static xmlNodePtr newTextNode(xmlNodePtr retItem, const xmlChar* content, bool& hasError);
	} ;
}

#endif
