// $Id: common.h,v 1.14 2003/05/10 06:46:42 ta_muto Exp $
// The common header file.

#ifndef __wax_common_h
#define __wax_common_h

//*************************
//*** standard include  ***
//*************************
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>

//#include <libxml/tree.h>
//#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
//#include <libxml/xmlmemory.h>
//#include <libxml/debugXML.h>
//#include <libxml/HTMLtree.h>
//#include <libxml/xmlIO.h>
//#include <libxml/DOCBparser.h>
//#include <libxml/xinclude.h>
//#include <libxml/catalog.h>
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>

//*************************
//*** include wax-libs  ***
//*************************
#include <errorCode.h>
#include <CXmlStr.h>

//*************************
//*** utilities, macros ***
//*************************
namespace wax {
	#define DEBUG()	printf("%s(%d)\n", __FILE__, __LINE__)
	
	bool checkBoolean(const xmlChar* value, bool defValue=true);
	xmlChar* trimPath(const xmlChar* path);

	xmlChar* C2UTF8(const char* text);
	
	void sleepTimer(int second);
	
	bool makeDir(const xmlChar* dirName);
	void removeDir(const xmlChar* dirName);

	void commonInit();
	void commonExit();
}

#endif
