axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r345821 [7/8] - in /webservices/axis2/trunk/c: ./ include/ modules/test/om/src/ modules/util/src/ modules/xml/guththila/ modules/xml/om/src/ modules/xml/om/test/ modules/xml/parser/ modules/xml/parser/guththila/impl/src/ modules/xml/parser/...
Date Mon, 21 Nov 2005 03:57:03 GMT
Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/src/axis2_guththila_wrapper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/src/axis2_guththila_wrapper.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/src/axis2_guththila_wrapper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/src/axis2_guththila_wrapper.c Sun Nov 20 19:53:26 2005
@@ -97,6 +97,14 @@
 axis2_guththila_wrapper_get_pi_data(axis2_pull_parser_t *parser,
                                      axis2_env_t **env);
 
+axis2_char_t* AXIS2_CALL
+axis2_guththila_wrapper_get_dtd(axis2_pull_parser_t *parser,
+                                     axis2_env_t **env);                                     
+
+axis2_status_t AXIS2_CALL
+axis2_guththila_wrapper_xml_free(axis2_pull_parser_t *parser,
+                                 axis2_env_t **env,
+                                 void *data);
 
 
 /*********** axis2_guththila_wrapper_impl_t wrapper struct   *******************/
@@ -139,21 +147,26 @@
 /********************************************************************************/
 
 AXIS2_DECLARE(axis2_pull_parser_t *)
-axis2_pull_parser_create(axis2_env_t **env,void* stream)
+axis2_pull_parser_create_for_file(axis2_env_t **env,char* filename)
 {
+    axis2_guththila_wrapper_impl_t *guththila_impl = NULL;
+    guththila_allocator_t *allocator = NULL;
+    guththila_environment_t *guththila_env = NULL;
+    guththila_reader_t *reader = NULL;
+    guththila_xml_pull_parser_t *guththila = NULL;
+    
     AXIS2_ENV_CHECK(env, NULL);
     
-    axis2_guththila_wrapper_impl_t *guththila_impl = 
-        AXIS2_MALLOC((*env)->allocator, sizeof(axis2_guththila_wrapper_impl_t));
+    guththila_impl = AXIS2_MALLOC((*env)->allocator,
+                             sizeof(axis2_guththila_wrapper_impl_t));
     
     if(!guththila_impl)
           AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
     
-    guththila_allocator_t *allocator  = guththila_allocator_init(NULL);
-    guththila_environment_t *guththila_env = guththila_environment_create(
-                                              allocator,NULL, NULL, NULL, NULL);
+    allocator = guththila_allocator_init(NULL);
+    guththila_env  = guththila_environment_create(allocator,NULL, NULL);
     
-    guththila_reader_t *reader = guththila_reader_create(guththila_env,stream);
+    reader = guththila_reader_create_for_file(guththila_env, filename);
     
     if(!reader)
     {
@@ -161,8 +174,7 @@
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
     }    
     
-    guththila_xml_pull_parser_t *guththila = guththila_xml_pull_parser_create(
-                                                guththila_env,reader);
+    guththila = guththila_xml_pull_parser_create(guththila_env,reader);
     if(!guththila)
     {
         AXIS2_FREE((*env)->allocator,guththila_impl);
@@ -215,10 +227,107 @@
     guththila_impl->parser.ops->get_namespace_prefix_by_number =
         axis2_guththila_wrapper_get_namespace_prefix_by_number;
 
+    guththila_impl->parser.ops->get_dtd=
+        axis2_guththila_wrapper_get_dtd;
+
+    guththila_impl->parser.ops->xml_free = axis2_guththila_wrapper_xml_free;        
+
     return &(guththila_impl->parser);
 }
 
+/****** pull parser for memory create function ***************************/
+
 
+AXIS2_DECLARE(axis2_pull_parser_t *)
+axis2_pull_parser_create_for_memory(axis2_env_t **env,
+                                    int (*read_input_callback)(char *buffer,int size),
+                                    void (*close_input_callback)(void))
+{
+    axis2_guththila_wrapper_impl_t *guththila_impl = NULL;
+    guththila_allocator_t *allocator = NULL;
+    guththila_environment_t *guththila_env = NULL;
+    guththila_reader_t *reader = NULL;
+    guththila_xml_pull_parser_t *guththila = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    
+    guththila_impl = AXIS2_MALLOC((*env)->allocator,
+                             sizeof(axis2_guththila_wrapper_impl_t));
+    
+    if(!guththila_impl)
+          AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    
+    allocator = guththila_allocator_init(NULL);
+    guththila_env  = guththila_environment_create(allocator,NULL, NULL);
+    
+    /*-------difference of two create function is here--------*/
+    reader = guththila_reader_create_for_memory(guththila_env,
+                     read_input_callback, close_input_callback); 
+                                                   
+    if(!reader)
+    {
+        AXIS2_FREE((*env)->allocator,guththila_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }    
+    
+    guththila = guththila_xml_pull_parser_create(guththila_env,reader);
+    if(!guththila)
+    {
+        AXIS2_FREE((*env)->allocator,guththila_impl);
+        AXIS2_FREE((*env)->allocator,reader);
+        AXIS2_ERROR_SET((*env)->error,AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
+    
+    guththila_impl->guththila_parser = guththila;
+    guththila_impl->guththila_env = guththila_env;
+    guththila_impl->parser.ops = NULL;
+    guththila_impl->parser.ops = (axis2_pull_parser_ops_t*)AXIS2_MALLOC(
+                                      (*env)->allocator,
+                                       sizeof(axis2_pull_parser_ops_t));
+    if(!(guththila_impl->parser.ops))
+    {   guththila_xml_pull_parser_free( guththila_env, guththila);
+        AXIS2_FREE((*env)->allocator,guththila_impl);
+        AXIS2_FREE((*env)->allocator,reader);
+        AXIS2_ERROR_SET((*env)->error,AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
+    
+    axis2_guththila_wrapper_init_map(guththila_impl);
+    
+    
+/************** operations *****/    
+    guththila_impl->parser.ops->next = axis2_guththila_wrapper_next;
+    
+    guththila_impl->parser.ops->free = axis2_guththila_wrapper_free;
+    
+    guththila_impl->parser.ops->get_attribute_count =
+        axis2_guththila_wrapper_get_attribute_count;
+    guththila_impl->parser.ops->get_attribute_name_by_number =
+        axis2_guththila_wrapper_get_attribute_name_by_number;
+    guththila_impl->parser.ops->get_attribute_value_by_number =
+        axis2_guththila_wrapper_get_attribute_value_by_number;
+    guththila_impl->parser.ops->get_attribute_prefix_by_number =
+        axis2_guththila_wrapper_get_attribute_prefix_by_number;
+    guththila_impl->parser.ops->get_attribute_namespace_by_number =
+        axis2_guththila_wrapper_get_attribute_namespace_by_number;
+    
+    guththila_impl->parser.ops->get_value = axis2_guththila_wrapper_get_value;
+    guththila_impl->parser.ops->get_name  = axis2_guththila_wrapper_get_name;
+    guththila_impl->parser.ops->get_prefix = axis2_guththila_wrapper_get_prefix;
+    
+    guththila_impl->parser.ops->get_namespace_count =
+        axis2_guththila_wrapper_get_namespace_count;
+    guththila_impl->parser.ops->get_namespace_uri_by_number =
+        axis2_guththila_wrapper_get_namespace_uri_by_number;
+    guththila_impl->parser.ops->get_namespace_prefix_by_number =
+        axis2_guththila_wrapper_get_namespace_prefix_by_number;
+    guththila_impl->parser.ops->get_dtd=
+        axis2_guththila_wrapper_get_dtd;
+        
+    guththila_impl->parser.ops->xml_free = axis2_guththila_wrapper_xml_free;
+    return &(guththila_impl->parser);
+}
 int AXIS2_CALL 
 axis2_guththila_wrapper_next(axis2_pull_parser_t *parser,
                              axis2_env_t **env)
@@ -406,3 +515,22 @@
     /* guththila_dose not support yet */
     return NULL;
  }
+
+ axis2_char_t* AXIS2_CALL
+axis2_guththila_wrapper_get_dtd(axis2_pull_parser_t *parser,
+                                     axis2_env_t **env)
+{
+    printf("not implemented in guththila");
+}
+ 
+axis2_status_t AXIS2_CALL
+axis2_guththila_wrapper_xml_free(axis2_pull_parser_t *parser,
+                                 axis2_env_t **env,
+                                 void *data)
+{
+    AXIS2_FUNC_PARAM_CHECK(parser, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, data, AXIS2_FAILURE);
+    GUTHTHILA_FREE(AXIS2_INTF_TO_IMPL(parser)->guththila_env->allocator,
+                   data);
+    return AXIS2_SUCCESS;
+}

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/src/guththila_xml_writer_wrapper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/src/guththila_xml_writer_wrapper.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/src/guththila_xml_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/src/guththila_xml_writer_wrapper.c Sun Nov 20 19:53:26 2005
@@ -230,7 +230,7 @@
     
     
     allocator = guththila_allocator_init(NULL);
-    writer_impl->guththila_env = guththila_environment_create(allocator, NULL,  NULL, NULL, NULL);
+    writer_impl->guththila_env = guththila_environment_create(allocator, NULL,  NULL);
     writer_impl->guththila_writer = guththila_create_xml_stream_writer(
                                                     writer_impl->guththila_env,
                                                     stream, encoding , 
@@ -323,9 +323,11 @@
 {
     AXIS2_FUNC_PARAM_CHECK(writer, env, AXIS2_FAILURE);
     if(AXIS2_INTF_TO_IMPL(writer)->guththila_writer)
-    {     /* should be implemented */}
+        guththila_xml_stream_writer_free(
+            AXIS2_INTF_TO_IMPL(writer)->guththila_env, writer);
+            
     if(AXIS2_INTF_TO_IMPL(writer)->guththila_env)
-    {    /* should be implemented */ }
+        guththila_environment_free(AXIS2_INTF_TO_IMPL(writer)->guththila_env);
     if(writer->ops)
         AXIS2_FREE((*env)->allocator, writer->ops);
     AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(writer));
@@ -711,8 +713,8 @@
                                          axis2_env_t **env,
                                          axis2_char_t *uri)
 {
-    AXIS2_FUNC_PARAM_CHECK(writer, env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, uri, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(writer, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, uri, NULL);
     return guththila_xml_stream_writer_get_prefix(
                     AXIS2_INTF_TO_IMPL(writer)->guththila_env,
                     AXIS2_INTF_TO_IMPL(writer)->guththila_writer, uri);

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile Sun Nov 20 19:53:26 2005
@@ -14,8 +14,7 @@
 
 
 
-
-SOURCES = $(libtest_guththila_la_SOURCES) $(guththila_test_SOURCES)
+SOURCES = $(guththila_test_SOURCES)
 
 srcdir = .
 top_srcdir = ../../../../..
@@ -53,25 +52,13 @@
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/axis2_config.h
 CONFIG_CLEAN_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(prglibdir)" "$(DESTDIR)$(prgbindir)"
-prglibLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(prglib_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-libtest_guththila_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libtest_guththila_la_OBJECTS = guththila_test.lo
-libtest_guththila_la_OBJECTS = $(am_libtest_guththila_la_OBJECTS)
+am__installdirs = "$(DESTDIR)$(prgbindir)"
 prgbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(prgbin_PROGRAMS)
-am_guththila_test_OBJECTS = main.$(OBJEXT)
+am_guththila_test_OBJECTS = guththila_test.$(OBJEXT)
 guththila_test_OBJECTS = $(am_guththila_test_OBJECTS)
-guththila_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	libtest_guththila.la
+am__DEPENDENCIES_1 =
+guththila_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp
 am__depfiles_maybe = depfiles
@@ -83,20 +70,26 @@
 CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libtest_guththila_la_SOURCES) $(guththila_test_SOURCES)
-DIST_SOURCES = $(libtest_guththila_la_SOURCES) \
-	$(guththila_test_SOURCES)
+SOURCES = $(guththila_test_SOURCES)
+DIST_SOURCES = $(guththila_test_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
 ETAGS = etags
 CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/damitha/projects/c/conftools/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /home/nandika/axis2/c/conftools/missing --run aclocal-1.9
 AMDEP_FALSE = #
 AMDEP_TRUE = 
-AMTAR = ${SHELL} /home/damitha/projects/c/conftools/missing --run tar
+AMTAR = ${SHELL} /home/nandika/axis2/c/conftools/missing --run tar
 AR = ar
-AUTOCONF = ${SHELL} /home/damitha/projects/c/conftools/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/damitha/projects/c/conftools/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/damitha/projects/c/conftools/missing --run automake-1.9
+AUTOCONF = ${SHELL} /home/nandika/axis2/c/conftools/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/nandika/axis2/c/conftools/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/nandika/axis2/c/conftools/missing --run automake-1.9
 AWK = gawk
 CC = gcc
 CCDEPMODE = depmode=gcc3
@@ -122,19 +115,19 @@
 ECHO_T = 
 EGREP = grep -E
 EXEEXT = 
-F77 = g77
+F77 = f95
 FFLAGS = -g -O2
 INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}
 INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LDFLAGS =  -L/home/damitha/programs/cutest/lib/
+LDFLAGS =  -L/home/nandika/software/cutest/lib/
 LIBOBJS = 
 LIBS = -lcutest -ldl
 LIBTOOL = $(SHELL) $(top_builddir)/libtool
 LN_S = ln -s
 LTLIBOBJS = 
-MAKEINFO = ${SHELL} /home/damitha/projects/c/conftools/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/nandika/axis2/c/conftools/missing --run makeinfo
 OBJEXT = o
 PACKAGE = axis2
 PACKAGE_BUGREPORT = 
@@ -152,7 +145,7 @@
 ac_ct_AR = ar
 ac_ct_CC = gcc
 ac_ct_CXX = g++
-ac_ct_F77 = g77
+ac_ct_F77 = f95
 ac_ct_RANLIB = ranlib
 ac_ct_STRIP = strip
 am__fastdepCC_FALSE = #
@@ -179,7 +172,7 @@
 host_vendor = redhat
 includedir = ${prefix}/include
 infodir = ${prefix}/info
-install_sh = /home/damitha/projects/c/conftools/install-sh
+install_sh = /home/nandika/axis2/c/conftools/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localstatedir = ${prefix}/var
@@ -196,22 +189,13 @@
 target_cpu = i686
 target_os = linux-gnu
 target_vendor = redhat
-prgbindir = $(prefix)/bin/unit_test
-prglibdir = $(prefix)/lib/unit_test
-prglib_LTLIBRARIES = libtest_guththila.la
-AM_CPPFLAGS = $(CPPFLAGS) -g
-libtest_guththila_la_SOURCES = guththila_test.c
-libtest_guththila_la_LIBADD = $(LDFLAGS) -L$(top_builddir)/modules/xml/parser/guththila/src -laxis2_guththila
-INCLUDES = -I$(top_builddir)/include \
-            -I${CUTEST_HOME}/include
-
-guththila_test_SOURCES = main.c
-guththila_test_LDADD = $(LDFLAGS) libtest_guththila.la  \
-                            -L$(top_builddir)/modules/xml/parser/guththila/src -laxis2_guththila \
-                            -L$(top_builddir)/modules/xml/parser/guththila/impl/src -lguththila \
-                            -L$(top_builddir)/modules/util/src -laxis2_util
-
-all: all-am
+prgbindir = $(prefix)/bin/system_test            
+SUBDIRS = 
+AM_CPPFLAGS = $(CPPFLAGS) -g -pthread
+guththila_test_SOURCES = guththila_test.c
+guththila_test_LDADD = $(LDFLAGS)  -L$(top_builddir)/modules/xml/parser/guththila/impl/src -lguththila 
+INCLUDES = -I$(top_builddir)/modules/xml/parser/guththila/impl/src
+all: all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
@@ -244,35 +228,6 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-prglibLTLIBRARIES: $(prglib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(prglibdir)" || $(mkdir_p) "$(DESTDIR)$(prglibdir)"
-	@list='$(prglib_LTLIBRARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    f=$(am__strip_dir) \
-	    echo " $(LIBTOOL) --mode=install $(prglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(prglibdir)/$$f'"; \
-	    $(LIBTOOL) --mode=install $(prglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(prglibdir)/$$f"; \
-	  else :; fi; \
-	done
-
-uninstall-prglibLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@set -x; list='$(prglib_LTLIBRARIES)'; for p in $$list; do \
-	  p=$(am__strip_dir) \
-	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(prglibdir)/$$p'"; \
-	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(prglibdir)/$$p"; \
-	done
-
-clean-prglibLTLIBRARIES:
-	-test -z "$(prglib_LTLIBRARIES)" || rm -f $(prglib_LTLIBRARIES)
-	@list='$(prglib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libtest_guththila.la: $(libtest_guththila_la_OBJECTS) $(libtest_guththila_la_DEPENDENCIES) 
-	$(LINK) -rpath $(prglibdir) $(libtest_guththila_la_LDFLAGS) $(libtest_guththila_la_OBJECTS) $(libtest_guththila_la_LIBADD) $(LIBS)
 install-prgbinPROGRAMS: $(prgbin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	test -z "$(prgbindir)" || $(mkdir_p) "$(DESTDIR)$(prgbindir)"
@@ -311,8 +266,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-include ./$(DEPDIR)/guththila_test.Plo
-include ./$(DEPDIR)/main.Po
+include ./$(DEPDIR)/guththila_test.Po
 
 .c.o:
 	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -345,6 +299,77 @@
 	-rm -f libtool
 uninstall-info-am:
 
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -355,10 +380,23 @@
 	mkid -fID $$unique
 tags: TAGS
 
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@ -371,7 +409,7 @@
 	    $$tags $$unique; \
 	fi
 ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
@@ -420,22 +458,38 @@
 	    || exit 1; \
 	  fi; \
 	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
 check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(prglibdir)" "$(DESTDIR)$(prgbindir)"; do \
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(prgbindir)"; do \
 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
 	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installcheck: installcheck-am
+installcheck: installcheck-recursive
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
 	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@@ -451,71 +505,73 @@
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
 
 clean-am: clean-generic clean-libtool clean-prgbinPROGRAMS \
-	clean-prglibLTLIBRARIES mostlyclean-am
+	mostlyclean-am
 
-distclean: distclean-am
+distclean: distclean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-libtool distclean-tags
 
-dvi: dvi-am
+dvi: dvi-recursive
 
 dvi-am:
 
-html: html-am
+html: html-recursive
 
-info: info-am
+info: info-recursive
 
 info-am:
 
-install-data-am: install-prgbinPROGRAMS install-prglibLTLIBRARIES
+install-data-am: install-prgbinPROGRAMS
 
 install-exec-am:
 
-install-info: install-info-am
+install-info: install-info-recursive
 
 install-man:
 
 installcheck-am:
 
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
 
 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
 	mostlyclean-libtool
 
-pdf: pdf-am
+pdf: pdf-recursive
 
 pdf-am:
 
-ps: ps-am
+ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-prgbinPROGRAMS \
-	uninstall-prglibLTLIBRARIES
+uninstall-am: uninstall-info-am uninstall-prgbinPROGRAMS
+
+uninstall-info: uninstall-info-recursive
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-prgbinPROGRAMS clean-prglibLTLIBRARIES \
-	ctags distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-prgbinPROGRAMS \
+	clean-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-exec install-exec-am install-info \
 	install-info-am install-man install-prgbinPROGRAMS \
-	install-prglibLTLIBRARIES install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-info-am \
-	uninstall-prgbinPROGRAMS uninstall-prglibLTLIBRARIES
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am uninstall-prgbinPROGRAMS
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.am?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.am Sun Nov 20 19:53:26 2005
@@ -1,17 +1,10 @@
-prgbindir=$(prefix)/bin/unit_test
-prglibdir=$(prefix)/lib/unit_test
-prglib_LTLIBRARIES = libtest_guththila.la
-AM_CPPFLAGS = $(CPPFLAGS) -g
-libtest_guththila_la_SOURCES = guththila_test.c
+prgbindir=$(prefix)/bin/system_test            
+prgbin_PROGRAMS = guththila_test
+SUBDIRS = 
+AM_CPPFLAGS = $(CPPFLAGS) -g -pthread
 
-libtest_guththila_la_LIBADD = $(LDFLAGS) -L$(top_builddir)/modules/xml/parser/guththila/src -laxis2_guththila
-INCLUDES = -I$(top_builddir)/include \
-            -I${CUTEST_HOME}/include
+guththila_test_SOURCES = guththila_test.c
 
-prgbin_PROGRAMS = guththila_test
-guththila_test_SOURCES = main.c
-guththila_test_LDADD   =  $(LDFLAGS) libtest_guththila.la  \
-                            -L$(top_builddir)/modules/xml/parser/guththila/src -laxis2_guththila \
-                            -L$(top_builddir)/modules/xml/parser/guththila/impl/src -lguththila \
-                            -L$(top_builddir)/modules/util/src -laxis2_util
+guththila_test_LDADD   =  $(LDFLAGS)  -L$(top_builddir)/modules/xml/parser/guththila/impl/src -lguththila 
 
+INCLUDES =  -I$(top_builddir)/modules/xml/parser/guththila/impl/src

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.in
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.in?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.in (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/test/Makefile.in Sun Nov 20 19:53:26 2005
@@ -14,8 +14,7 @@
 
 @SET_MAKE@
 
-
-SOURCES = $(libtest_guththila_la_SOURCES) $(guththila_test_SOURCES)
+SOURCES = $(guththila_test_SOURCES)
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -53,25 +52,13 @@
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/axis2_config.h
 CONFIG_CLEAN_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(prglibdir)" "$(DESTDIR)$(prgbindir)"
-prglibLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(prglib_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-libtest_guththila_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libtest_guththila_la_OBJECTS = guththila_test.lo
-libtest_guththila_la_OBJECTS = $(am_libtest_guththila_la_OBJECTS)
+am__installdirs = "$(DESTDIR)$(prgbindir)"
 prgbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(prgbin_PROGRAMS)
-am_guththila_test_OBJECTS = main.$(OBJEXT)
+am_guththila_test_OBJECTS = guththila_test.$(OBJEXT)
 guththila_test_OBJECTS = $(am_guththila_test_OBJECTS)
-guththila_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	libtest_guththila.la
+am__DEPENDENCIES_1 =
+guththila_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp
 am__depfiles_maybe = depfiles
@@ -83,11 +70,17 @@
 CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libtest_guththila_la_SOURCES) $(guththila_test_SOURCES)
-DIST_SOURCES = $(libtest_guththila_la_SOURCES) \
-	$(guththila_test_SOURCES)
+SOURCES = $(guththila_test_SOURCES)
+DIST_SOURCES = $(guththila_test_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
 ETAGS = etags
 CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -196,22 +189,13 @@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
-prgbindir = $(prefix)/bin/unit_test
-prglibdir = $(prefix)/lib/unit_test
-prglib_LTLIBRARIES = libtest_guththila.la
-AM_CPPFLAGS = $(CPPFLAGS) -g
-libtest_guththila_la_SOURCES = guththila_test.c
-libtest_guththila_la_LIBADD = $(LDFLAGS) -L$(top_builddir)/modules/xml/parser/guththila/src -laxis2_guththila
-INCLUDES = -I$(top_builddir)/include \
-            -I${CUTEST_HOME}/include
-
-guththila_test_SOURCES = main.c
-guththila_test_LDADD = $(LDFLAGS) libtest_guththila.la  \
-                            -L$(top_builddir)/modules/xml/parser/guththila/src -laxis2_guththila \
-                            -L$(top_builddir)/modules/xml/parser/guththila/impl/src -lguththila \
-                            -L$(top_builddir)/modules/util/src -laxis2_util
-
-all: all-am
+prgbindir = $(prefix)/bin/system_test            
+SUBDIRS = 
+AM_CPPFLAGS = $(CPPFLAGS) -g -pthread
+guththila_test_SOURCES = guththila_test.c
+guththila_test_LDADD = $(LDFLAGS)  -L$(top_builddir)/modules/xml/parser/guththila/impl/src -lguththila 
+INCLUDES = -I$(top_builddir)/modules/xml/parser/guththila/impl/src
+all: all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
@@ -244,35 +228,6 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-prglibLTLIBRARIES: $(prglib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(prglibdir)" || $(mkdir_p) "$(DESTDIR)$(prglibdir)"
-	@list='$(prglib_LTLIBRARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    f=$(am__strip_dir) \
-	    echo " $(LIBTOOL) --mode=install $(prglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(prglibdir)/$$f'"; \
-	    $(LIBTOOL) --mode=install $(prglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(prglibdir)/$$f"; \
-	  else :; fi; \
-	done
-
-uninstall-prglibLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@set -x; list='$(prglib_LTLIBRARIES)'; for p in $$list; do \
-	  p=$(am__strip_dir) \
-	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(prglibdir)/$$p'"; \
-	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(prglibdir)/$$p"; \
-	done
-
-clean-prglibLTLIBRARIES:
-	-test -z "$(prglib_LTLIBRARIES)" || rm -f $(prglib_LTLIBRARIES)
-	@list='$(prglib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libtest_guththila.la: $(libtest_guththila_la_OBJECTS) $(libtest_guththila_la_DEPENDENCIES) 
-	$(LINK) -rpath $(prglibdir) $(libtest_guththila_la_LDFLAGS) $(libtest_guththila_la_OBJECTS) $(libtest_guththila_la_LIBADD) $(LIBS)
 install-prgbinPROGRAMS: $(prgbin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	test -z "$(prgbindir)" || $(mkdir_p) "$(DESTDIR)$(prgbindir)"
@@ -311,8 +266,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_test.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_test.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -345,6 +299,77 @@
 	-rm -f libtool
 uninstall-info-am:
 
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -355,10 +380,23 @@
 	mkid -fID $$unique
 tags: TAGS
 
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@ -371,7 +409,7 @@
 	    $$tags $$unique; \
 	fi
 ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
@@ -420,22 +458,38 @@
 	    || exit 1; \
 	  fi; \
 	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
 check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(prglibdir)" "$(DESTDIR)$(prgbindir)"; do \
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(prgbindir)"; do \
 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
 	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installcheck: installcheck-am
+installcheck: installcheck-recursive
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
 	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@@ -451,71 +505,73 @@
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
 
 clean-am: clean-generic clean-libtool clean-prgbinPROGRAMS \
-	clean-prglibLTLIBRARIES mostlyclean-am
+	mostlyclean-am
 
-distclean: distclean-am
+distclean: distclean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-libtool distclean-tags
 
-dvi: dvi-am
+dvi: dvi-recursive
 
 dvi-am:
 
-html: html-am
+html: html-recursive
 
-info: info-am
+info: info-recursive
 
 info-am:
 
-install-data-am: install-prgbinPROGRAMS install-prglibLTLIBRARIES
+install-data-am: install-prgbinPROGRAMS
 
 install-exec-am:
 
-install-info: install-info-am
+install-info: install-info-recursive
 
 install-man:
 
 installcheck-am:
 
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
 
 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
 	mostlyclean-libtool
 
-pdf: pdf-am
+pdf: pdf-recursive
 
 pdf-am:
 
-ps: ps-am
+ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-prgbinPROGRAMS \
-	uninstall-prglibLTLIBRARIES
+uninstall-am: uninstall-info-am uninstall-prgbinPROGRAMS
+
+uninstall-info: uninstall-info-recursive
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-prgbinPROGRAMS clean-prglibLTLIBRARIES \
-	ctags distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-prgbinPROGRAMS \
+	clean-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-exec install-exec-am install-info \
 	install-info-am install-man install-prgbinPROGRAMS \
-	install-prglibLTLIBRARIES install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-info-am \
-	uninstall-prgbinPROGRAMS uninstall-prglibLTLIBRARIES
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am uninstall-prgbinPROGRAMS
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/test/guththila_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/test/guththila_test.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/test/guththila_test.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/test/guththila_test.c Sun Nov 20 19:53:26 2005
@@ -0,0 +1,186 @@
+#include <guththila_environment.h>
+#include <guththila_defines.h>
+#include <guththila_xml_pull_parser.h>
+#include <guththila_xml_stream_writer.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+FILE *f;
+
+int read_input(char *buffer,int size)
+{
+  
+   return fread(buffer,sizeof(char), size, f);
+}
+
+void close_input(void)
+{
+    fclose(f);
+}
+
+
+
+int main(int argc,char *argv[])
+{
+    guththila_allocator_t *allocator = NULL;
+    guththila_environment_t *env = NULL;
+    guththila_reader_t *reader = NULL;
+    guththila_reader_t *reader_mem = NULL;
+    guththila_xml_pull_parser_t *parser = NULL;
+    guththila_attribute_t *a = NULL;
+    guththila_element_t *e = NULL;
+    guththila_xml_stream_writer_t *writer;
+    int ia =0;
+    int d =0;
+    int ix =0;
+    char *p =0;
+    int token = 0;
+    char *filename = "test.xml";
+    if(argc > 1)
+        filename = argv[1];
+
+    allocator = guththila_allocator_init(NULL);
+    env       = guththila_environment_create(allocator,NULL,NULL);
+  
+    reader    = guththila_reader_create_for_file(env,filename);
+    parser = guththila_xml_pull_parser_create(env,reader);
+    guththila_xml_pull_parser_read(env,parser);
+
+    printf("running test");
+
+do{
+  token = guththila_xml_pull_parser_next(env,parser);
+  if(token==-1) break;
+    switch(token)
+    {
+        case GUTHTHILA_START_DOCUMENT:
+            printf ("<?xml ");
+	        ix = guththila_xml_pull_parser_get_attribute_count (env,parser);
+	        for (; ix > 0; ix--)
+	        {
+		    	a = guththila_xml_pull_parser_get_attribute (env,parser);
+		        p = guththila_xml_pull_parser_get_attribute_name (env,parser, a);
+		        printf ("%s=\"", p);
+                GUTHTHILA_FREE(env->allocator, p);
+		        p = guththila_xml_pull_parser_get_attribute_value (env,parser, a);
+		        printf ("%s\" ", p);
+		        GUTHTHILA_FREE (env->allocator,p);
+	        }
+	        printf ("?>");
+            break;
+    
+        case GUTHTHILA_SPACE:
+            break;
+        
+        case GUTHTHILA_START_ELEMENT:
+            {
+	             printf ("<");
+        	     p = guththila_xml_pull_parser_get_prefix (env,parser);
+        	     if (p)
+	             {
+            		printf ("%s:", p);
+                    GUTHTHILA_FREE(env->allocator, p);
+        	     }
+                 
+                 p = guththila_xml_pull_parser_get_name (env,parser);
+	             printf ("%s", p);
+                 GUTHTHILA_FREE(env->allocator, p);
+	    	    
+                 ia = guththila_xml_pull_parser_get_attribute_count (env,parser);
+	             for ( ; ia > 0; ia--)
+        	     { 
+	        	    p = guththila_xml_pull_parser_get_attribute_namespace_by_number (env,parser, ia);
+        		    if (p)
+		            {
+        		        printf (" %s:", p);
+                        GUTHTHILA_FREE(env->allocator, p);
+		                
+                        p = guththila_xml_pull_parser_get_attribute_name_by_number (env,parser, ia);
+        		        printf ("%s=\"", p);
+                        GUTHTHILA_FREE(env->allocator, p);
+                        
+    		            p = guththila_xml_pull_parser_get_attribute_value_by_number (env,parser, ia);
+            		    printf ("%s\"", p);
+                        GUTHTHILA_FREE(env->allocator, p);
+		            }
+        	        else
+        		    {
+		                p = guththila_xml_pull_parser_get_attribute_name_by_number (env,parser, ia);
+        		        printf (" %s=\"", p);
+                        GUTHTHILA_FREE(env->allocator, p);
+                        
+		                p = guththila_xml_pull_parser_get_attribute_value_by_number (env,parser, ia);
+        		        printf ("%s\"", p);
+                        GUTHTHILA_FREE(env->allocator, p);
+        		    }
+	            } 
+            	    e = guththila_stack_last (env,parser->dep);
+	                d = e->depth->count;
+	                    
+    	        for (; d > 0; d--)
+	            {
+		            p = guththila_xml_pull_parser_get_namespace_prefix_by_number (env,parser, d);
+        		    if (strncmp (p, "xmlns", 5))
+		            printf (" xmlns:");
+        		    printf ("%s=\"", p);
+                    GUTHTHILA_FREE(env->allocator, p);
+                    
+    		        p = guththila_xml_pull_parser_get_namespace_uri_by_number (env,parser, d);
+	    	        printf ("%s\" ", p);
+		         }
+        	    if (guththila_event == GUTHTHILA_START_ELEMENT)
+	                  printf (">");
+    	        else
+	              printf ("/>");
+        	    }
+        	    break;
+         
+        case GUTHTHILA_END_ELEMENT:
+           	    printf ("</");
+                p = guththila_xml_pull_parser_get_prefix (env,parser);
+        	    if (p)
+	            {
+		            printf ("%s:", p);
+                    GUTHTHILA_FREE(env->allocator, p);
+	            }
+	            
+                p = guththila_xml_pull_parser_get_name (env,parser);
+	            printf ("%s", p);
+	            printf (">");
+                GUTHTHILA_FREE(env->allocator, p);
+            break;
+            
+        case GUTHTHILA_CHARACTER:
+                p = guththila_xml_pull_parser_get_value (env,parser);
+                if(p)
+                printf("%s",p);
+                GUTHTHILA_FREE(env->allocator, p);
+            break;
+            
+        case GUTHTHILA_EMPTY_ELEMENT:
+             break;
+         default:
+         break;
+    }
+       
+ 
+}while(1);
+
+printf("\n");
+guththila_xml_pull_parser_free(env,parser);
+
+
+
+
+printf("\n\n\n\n");
+writer = guththila_create_xml_stream_writer(env,stdout,NULL,1);
+guththila_xml_stream_writer_write_start_document_with_version(env,writer,"1.0");
+guththila_xml_stream_writer_write_start_element(env,writer,"test");
+guththila_xml_stream_writer_write_attribute(env,writer,"test","axis2c");
+guththila_xml_stream_writer_write_comment(env,writer,"Hello");
+printf("\n\n\n\n");
+guththila_xml_stream_writer_free(env, writer);
+
+guththila_environment_free(env);
+
+}

Modified: webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile Sun Nov 20 19:53:26 2005
@@ -62,7 +62,7 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libaxis2_libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libaxis2_libxml2_la_OBJECTS = libxml2.lo
+am_libaxis2_libxml2_la_OBJECTS = axis2_libxml2_wrapper.lo
 libaxis2_libxml2_la_OBJECTS = $(am_libaxis2_libxml2_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp
@@ -80,14 +80,14 @@
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/damitha/projects/c/conftools/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /home/nandika/axis2/c/conftools/missing --run aclocal-1.9
 AMDEP_FALSE = #
 AMDEP_TRUE = 
-AMTAR = ${SHELL} /home/damitha/projects/c/conftools/missing --run tar
+AMTAR = ${SHELL} /home/nandika/axis2/c/conftools/missing --run tar
 AR = ar
-AUTOCONF = ${SHELL} /home/damitha/projects/c/conftools/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/damitha/projects/c/conftools/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/damitha/projects/c/conftools/missing --run automake-1.9
+AUTOCONF = ${SHELL} /home/nandika/axis2/c/conftools/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/nandika/axis2/c/conftools/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/nandika/axis2/c/conftools/missing --run automake-1.9
 AWK = gawk
 CC = gcc
 CCDEPMODE = depmode=gcc3
@@ -113,19 +113,19 @@
 ECHO_T = 
 EGREP = grep -E
 EXEEXT = 
-F77 = g77
+F77 = f95
 FFLAGS = -g -O2
 INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}
 INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LDFLAGS =  -L/home/damitha/programs/cutest/lib/
+LDFLAGS =  -L/home/nandika/software/cutest/lib/
 LIBOBJS = 
 LIBS = -lcutest -ldl
 LIBTOOL = $(SHELL) $(top_builddir)/libtool
 LN_S = ln -s
 LTLIBOBJS = 
-MAKEINFO = ${SHELL} /home/damitha/projects/c/conftools/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/nandika/axis2/c/conftools/missing --run makeinfo
 OBJEXT = o
 PACKAGE = axis2
 PACKAGE_BUGREPORT = 
@@ -143,7 +143,7 @@
 ac_ct_AR = ar
 ac_ct_CC = gcc
 ac_ct_CXX = g++
-ac_ct_F77 = g77
+ac_ct_F77 = f95
 ac_ct_RANLIB = ranlib
 ac_ct_STRIP = strip
 am__fastdepCC_FALSE = #
@@ -170,7 +170,7 @@
 host_vendor = redhat
 includedir = ${prefix}/include
 infodir = ${prefix}/info
-install_sh = /home/damitha/projects/c/conftools/install-sh
+install_sh = /home/nandika/axis2/c/conftools/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localstatedir = ${prefix}/var
@@ -189,7 +189,7 @@
 target_vendor = redhat
 lib_LTLIBRARIES = libaxis2_libxml2.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_libxml2_la_SOURCES = libxml2.c
+libaxis2_libxml2_la_SOURCES = axis2_libxml2_wrapper.c
 libaxis2_libxml2_la_LIBADD = -L${LIBXML2_LIB} -lxml2 $(LDFLAGS)
 INCLUDES = -I$(top_builddir)/include -I${CUTEST_HOME}/include \
             -I$(top_builddir)/modules/util/src \
@@ -265,7 +265,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-include ./$(DEPDIR)/libxml2.Plo
+include ./$(DEPDIR)/axis2_libxml2_wrapper.Plo
 
 .c.o:
 	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \

Modified: webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.am?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.am Sun Nov 20 19:53:26 2005
@@ -1,6 +1,6 @@
 lib_LTLIBRARIES = libaxis2_libxml2.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_libxml2_la_SOURCES = libxml2.c
+libaxis2_libxml2_la_SOURCES = axis2_libxml2_wrapper.c
 
 libaxis2_libxml2_la_LIBADD = -L${LIBXML2_LIB} -lxml2 $(LDFLAGS)
 INCLUDES = -I$(top_builddir)/include -I${CUTEST_HOME}/include \

Modified: webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.in
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.in?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.in (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/Makefile.in Sun Nov 20 19:53:26 2005
@@ -62,7 +62,7 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libaxis2_libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libaxis2_libxml2_la_OBJECTS = libxml2.lo
+am_libaxis2_libxml2_la_OBJECTS = axis2_libxml2_wrapper.lo
 libaxis2_libxml2_la_OBJECTS = $(am_libaxis2_libxml2_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp
@@ -189,7 +189,7 @@
 target_vendor = @target_vendor@
 lib_LTLIBRARIES = libaxis2_libxml2.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_libxml2_la_SOURCES = libxml2.c
+libaxis2_libxml2_la_SOURCES = axis2_libxml2_wrapper.c
 libaxis2_libxml2_la_LIBADD = -L${LIBXML2_LIB} -lxml2 $(LDFLAGS)
 INCLUDES = -I$(top_builddir)/include -I${CUTEST_HOME}/include \
             -I$(top_builddir)/modules/util/src \
@@ -265,7 +265,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxml2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/axis2_libxml2_wrapper.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \

Added: webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/axis2_libxml2_wrapper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/axis2_libxml2_wrapper.c?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/axis2_libxml2_wrapper.c (added)
+++ webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/axis2_libxml2_wrapper.c Sun Nov 20 19:53:26 2005
@@ -0,0 +1,700 @@
+/*
+ *   Copyright 2004,2005 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+ 
+ #include <axis2_pull_parser.h>
+ #include <libxml/xmlreader.h>
+ #include <axis2_defines.h>
+ #include <axis2.h>
+ #include <string.h>
+ 
+ /*************************** Function Prototypes ******************************/
+ 
+int AXIS2_CALL
+axis2_libxml2_wrapper_next(axis2_pull_parser_t *parser,
+                               axis2_env_t **env);
+                 
+axis2_status_t AXIS2_CALL 
+axis2_libxml2_wrapper_free(axis2_pull_parser_t *parser,
+                           axis2_env_t **env);
+           
+int AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_count(axis2_pull_parser_t *parser,
+                                          axis2_env_t **env);
+        
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_name_by_number(axis2_pull_parser_t *parser,
+                                                   axis2_env_t **env,
+                                                   int i);
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_prefix_by_number(axis2_pull_parser_t *parser,
+                                                     axis2_env_t **env,
+                                                     int i);
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_value_by_number(axis2_pull_parser_t *parser,
+                                                     axis2_env_t **env,
+                                                     int i);
+        
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_namespace_by_number
+                                                    (axis2_pull_parser_t *parser,
+                                                     axis2_env_t **env,
+                                                     int i);
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_value(axis2_pull_parser_t *parser,
+                                axis2_env_t **env);
+                                                      
+int AXIS2_CALL 
+axis2_libxml2_wrapper_get_namespace_count(axis2_pull_parser_t *parser,
+                                          axis2_env_t **env);
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_namespace_uri_by_number(axis2_pull_parser_t *parser,
+                                                  axis2_env_t **env,
+                                                  int i);
+                                               
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_namespace_prefix_by_number(axis2_pull_parser_t *parser,
+                                                	 axis2_env_t **env,
+                                                	 int i); 
+                                                
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_prefix(axis2_pull_parser_t *parser,
+                                 axis2_env_t **env);   
+        
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_name(axis2_pull_parser_t *parser,
+                               axis2_env_t **env); 
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_pi_target(axis2_pull_parser_t *parser,
+                                    axis2_env_t **env);
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_pi_data(axis2_pull_parser_t *parser,
+                                  axis2_env_t **env);
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_dtd(axis2_pull_parser_t *parser,
+                                  axis2_env_t **env);                                  
+                                  
+axis2_status_t AXIS2_CALL
+axis2_libxml2_wrapper_xml_free(axis2_pull_parser_t *parser,
+                               axis2_env_t **env,
+                               void *data);
+
+void axis2_libxml2_wrapper_fill_maps(axis2_pull_parser_t *parser,
+                                            axis2_env_t **env);
+                                   
+/************* End function parameters , axis2_libxml2_wrapper_impl_t struct ***/
+
+typedef struct axis2_libxml2_wrapper_impl_t
+{
+	axis2_pull_parser_t parser;
+	
+	xmlTextReaderPtr reader;
+	int current_event;
+	int current_attribute_count;
+    int current_namespace_count;
+	int event_map[18];
+    /* assuming that max ns and attri will be 20 */
+    
+    int namespace_map[20];
+    int attribute_map[20];
+}axis2_libxml2_wrapper_impl_t;
+
+/****************** End struct , Macro *****************************************/
+
+#define AXIS2_INTF_TO_IMPL(p) ((axis2_libxml2_wrapper_impl_t*)p)
+#define AXIS2_IMPL_TO_INTF(p) &(p->parser)
+
+
+/********************* End Macro  , event_map init function **********************/
+
+static axis2_status_t axis2_libxml2_wrapper_init_map(
+                                      axis2_libxml2_wrapper_impl_t *parser)
+{   
+    int i=0;
+    if(parser)
+    {
+        for(i=0;i<18;i++)
+           parser->event_map[i] = -1;
+        
+        parser->event_map[XML_READER_TYPE_ELEMENT] = 
+                    AXIS2_PULL_PARSER_START_ELEMENT;
+        
+        parser->event_map[XML_READER_TYPE_ELEMENT] = 
+                    AXIS2_PULL_PARSER_START_ELEMENT;
+        
+        parser->event_map[XML_READER_TYPE_DOCUMENT] = 
+                    AXIS2_PULL_PARSER_START_DOCUMENT;
+        
+        parser->event_map[XML_READER_TYPE_TEXT] = AXIS2_PULL_PARSER_CHARACTER;
+        
+        parser->event_map[XML_READER_TYPE_CDATA] = AXIS2_PULL_PARSER_CDATA;
+        
+        parser->event_map[XML_READER_TYPE_SIGNIFICANT_WHITESPACE] = 
+                    AXIS2_PULL_PARSER_SPACE;
+        
+        parser->event_map[XML_READER_TYPE_WHITESPACE] = AXIS2_PULL_PARSER_SPACE;
+        
+        parser->event_map[XML_READER_TYPE_END_ELEMENT] = 
+                    AXIS2_PULL_PARSER_END_ELEMENT;
+        
+        parser->event_map [XML_READER_TYPE_ENTITY_REFERENCE] = 
+                    AXIS2_PULL_PARSER_ENTITY_REFERANCE;
+        
+        parser->event_map [XML_READER_TYPE_END_ENTITY] = AXIS2_PULL_PARSER_SPACE;
+        
+        parser->event_map[XML_READER_TYPE_ENTITY] = AXIS2_PULL_PARSER_SPACE;
+            
+        parser->event_map[XML_READER_TYPE_PROCESSING_INSTRUCTION] =
+                    AXIS2_PULL_PARSER_PROCESSING_INSTRUCTION;
+                    
+        parser->event_map[XML_READER_TYPE_COMMENT] = AXIS2_PULL_PARSER_COMMENT;
+        
+        parser->event_map[XML_READER_TYPE_DOCUMENT_TYPE] =
+                    AXIS2_PULL_PARSER_DOCUMENT_TYPE;
+        return AXIS2_SUCCESS;
+    }
+    return AXIS2_FAILURE;
+}
+
+
+
+
+/*******************************************************************************/
+AXIS2_DECLARE(axis2_pull_parser_t *)
+axis2_pull_parser_create_for_file(axis2_env_t **env,char *filename)
+{
+    
+	axis2_libxml2_wrapper_impl_t *wrapper_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(filename, env, NULL);
+    
+    wrapper_impl = (axis2_libxml2_wrapper_impl_t*)AXIS2_MALLOC((*env)->allocator,
+         sizeof(axis2_libxml2_wrapper_impl_t));
+    if(!wrapper_impl)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    
+    wrapper_impl->reader =  xmlNewTextReaderFilename(filename);
+    if(!(wrapper_impl->reader))
+    {
+        AXIS2_FREE((*env)->allocator, wrapper_impl);
+      /*  AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CREATING_LIBXML_READER, NULL);
+        */
+    }
+	
+    
+    wrapper_impl->current_event = -1;
+    
+    axis2_libxml2_wrapper_init_map(wrapper_impl);
+	
+    
+    wrapper_impl->parser.ops = NULL;
+    wrapper_impl->parser.ops = (axis2_pull_parser_ops_t*)AXIS2_MALLOC((*env)->allocator,
+                                sizeof(axis2_pull_parser_ops_t));
+    
+    if(!(wrapper_impl->parser.ops))
+    {
+        xmlFreeTextReader(wrapper_impl->reader);
+        AXIS2_FREE((*env)->allocator, wrapper_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+	/* operations */
+	
+	wrapper_impl->parser.ops->free = axis2_libxml2_wrapper_free;
+    wrapper_impl->parser.ops->next = axis2_libxml2_wrapper_next;
+    wrapper_impl->parser.ops->xml_free = axis2_libxml2_wrapper_xml_free;
+    
+    wrapper_impl->parser.ops->get_attribute_count =
+        axis2_libxml2_wrapper_get_attribute_count;
+    wrapper_impl->parser.ops->get_attribute_name_by_number =
+        axis2_libxml2_wrapper_get_attribute_name_by_number;
+    wrapper_impl->parser.ops->get_attribute_value_by_number = 
+        axis2_libxml2_wrapper_get_attribute_value_by_number;
+    wrapper_impl->parser.ops->get_attribute_namespace_by_number =
+        axis2_libxml2_wrapper_get_attribute_namespace_by_number;
+    wrapper_impl->parser.ops->get_attribute_prefix_by_number =
+        axis2_libxml2_wrapper_get_attribute_prefix_by_number;
+    
+    wrapper_impl->parser.ops->get_value =
+        axis2_libxml2_wrapper_get_value;
+    wrapper_impl->parser.ops->get_prefix =
+        axis2_libxml2_wrapper_get_prefix;
+    wrapper_impl->parser.ops->get_name =
+        axis2_libxml2_wrapper_get_name;
+        
+        
+    wrapper_impl->parser.ops->get_namespace_count =
+        axis2_libxml2_wrapper_get_namespace_count;
+    wrapper_impl->parser.ops->get_namespace_prefix_by_number =
+        axis2_libxml2_wrapper_get_namespace_prefix_by_number;
+    wrapper_impl->parser.ops->get_namespace_uri_by_number =
+        axis2_libxml2_wrapper_get_namespace_uri_by_number;
+        
+    wrapper_impl->parser.ops->get_pi_target =
+        axis2_libxml2_wrapper_get_pi_target;
+    wrapper_impl->parser.ops->get_pi_data =
+        axis2_libxml2_wrapper_get_pi_data;
+        
+    wrapper_impl->parser.ops->get_dtd =
+        axis2_libxml2_wrapper_get_dtd;    
+	return &(wrapper_impl->parser);
+}
+
+/************** create function for io callback function **********************/
+/*
+AXIS2_DECLARE(axis2_pull_parser_t *)
+axis2_pull_parser_create_for_memory(axis2_env_t **env,int )
+{
+    
+	axis2_libxml2_wrapper_impl_t *wrapper_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(filename, env, NULL);
+    
+    wrapper_impl = (axis2_libxml2_wrapper_impl_t*)AXIS2_MALLOC((*env)->allocator,
+         sizeof(axis2_libxml2_wrapper_impl_t));
+    if(!wrapper_impl)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    
+    wrapper_impl->reader =  xmlNewTextReaderFilename(filename);
+    if(!(wrapper_impl->reader))
+    {
+        AXIS2_FREE((*env)->allocator, wrapper_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CREATING_LIBXML_READER, NULL);
+        
+    }
+	
+    
+    wrapper_impl->current_event = -1;
+    
+    axis2_libxml2_wrapper_init_map(wrapper_impl);
+	
+    
+    wrapper_impl->parser.ops = NULL;
+    wrapper_impl->parser.ops = (axis2_pull_parser_ops_t*)AXIS2_MALLOC((*env)->allocator,
+                                sizeof(axis2_pull_parser_ops_t));
+    
+    if(!(wrapper_impl->parser.ops))
+    {
+        xmlFreeTextReader(wrapper_impl->reader);
+        AXIS2_FREE((*env)->allocator, wrapper_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+
+	
+	wrapper_impl->parser.ops->free = axis2_libxml2_wrapper_free;
+    wrapper_impl->parser.ops->next = axis2_libxml2_wrapper_next;
+    wrapper_impl->parser.ops->xml_free = axis2_libxml2_wrapper_xml_free;
+    
+    wrapper_impl->parser.ops->get_attribute_count =
+        axis2_libxml2_wrapper_get_attribute_count;
+    wrapper_impl->parser.ops->get_attribute_name_by_number =
+        axis2_libxml2_wrapper_get_attribute_name_by_number;
+    wrapper_impl->parser.ops->get_attribute_value_by_number = 
+        axis2_libxml2_wrapper_get_attribute_value_by_number;
+    wrapper_impl->parser.ops->get_attribute_namespace_by_number =
+        axis2_libxml2_wrapper_get_attribute_namespace_by_number;
+    wrapper_impl->parser.ops->get_attribute_prefix_by_number =
+        axis2_libxml2_wrapper_get_attribute_prefix_by_number;
+    
+    wrapper_impl->parser.ops->get_value =
+        axis2_libxml2_wrapper_get_value;
+    wrapper_impl->parser.ops->get_prefix =
+        axis2_libxml2_wrapper_get_prefix;
+    wrapper_impl->parser.ops->get_name =
+        axis2_libxml2_wrapper_get_name;
+        
+        
+    wrapper_impl->parser.ops->get_namespace_count =
+        axis2_libxml2_wrapper_get_namespace_count;
+    wrapper_impl->parser.ops->get_namespace_prefix_by_number =
+        axis2_libxml2_wrapper_get_namespace_prefix_by_number;
+    wrapper_impl->parser.ops->get_namespace_uri_by_number =
+        axis2_libxml2_wrapper_get_namespace_uri_by_number;
+	return &(wrapper_impl->parser);
+}
+	
+*/	
+
+
+
+int AXIS2_CALL
+axis2_libxml2_wrapper_next(axis2_pull_parser_t *parser,
+                               axis2_env_t **env)
+{
+    int ret_val = 0;
+    int node = 2;
+    int empty_check = 0;
+    axis2_libxml2_wrapper_impl_t *parser_impl; 
+     
+    AXIS2_FUNC_PARAM_CHECK(parser,env, -1);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    /* if end_element event after empty element event is not required remove
+        this if close */
+    if(parser_impl->current_event == AXIS2_PULL_PARSER_EMPTY_ELEMENT)
+    {
+        /* if the previous event was a empty element then create an end element
+            event */
+        parser_impl->current_event = AXIS2_PULL_PARSER_END_ELEMENT;
+        return AXIS2_PULL_PARSER_END_ELEMENT;        
+    }
+    
+    ret_val = xmlTextReaderRead(parser_impl->reader);
+    
+    if(ret_val == 1)
+    {
+        node = xmlTextReaderNodeType(parser_impl->reader);
+        parser_impl->current_event = parser_impl->event_map[node];
+        parser_impl->current_attribute_count=0;
+        parser_impl->current_namespace_count=0;
+        
+        if(node == XML_READER_TYPE_ELEMENT)
+        {
+            empty_check = xmlTextReaderIsEmptyElement(parser_impl->reader);
+            axis2_libxml2_wrapper_fill_maps(parser , env);
+        }
+        if(empty_check == 1)
+        {
+            parser_impl->current_event =  AXIS2_PULL_PARSER_EMPTY_ELEMENT;
+            return AXIS2_PULL_PARSER_EMPTY_ELEMENT;         
+        }
+        return parser_impl->event_map[node];
+    }
+    else
+        return -1;
+}
+                 
+axis2_status_t AXIS2_CALL 
+axis2_libxml2_wrapper_free(axis2_pull_parser_t *parser,
+                           axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(parser,env, AXIS2_FAILURE);
+    
+    if(AXIS2_INTF_TO_IMPL(parser)->reader)
+        xmlFreeTextReader(AXIS2_INTF_TO_IMPL(parser)->reader);
+    if(parser->ops)
+        AXIS2_FREE((*env)->allocator, parser->ops);
+    AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(parser));
+    return AXIS2_SUCCESS;   
+}
+           
+int AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_count(axis2_pull_parser_t *parser,
+                                          axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl=NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser,env, AXIS2_FAILURE);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    if(parser_impl->current_event == AXIS2_PULL_PARSER_START_ELEMENT)
+        return parser_impl->current_attribute_count;
+    else
+        return 0;
+}
+        
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_name_by_number(axis2_pull_parser_t *parser,
+                                                   axis2_env_t **env,
+                                                   int i)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    
+    if(parser_impl->current_attribute_count >0 && 
+        parser_impl->current_attribute_count >= i)
+    {
+        int ret = xmlTextReaderMoveToAttributeNo(parser_impl->reader,
+                                                 parser_impl->attribute_map[i]);
+        if(ret == 1)
+            return (axis2_char_t*)xmlTextReaderLocalName(parser_impl->reader);
+        else
+            return NULL;
+    }
+    return NULL;
+}
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_prefix_by_number(axis2_pull_parser_t *parser,
+                                                     axis2_env_t **env,
+                                                     int i)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    
+    if(parser_impl->current_attribute_count >0 && 
+        parser_impl->current_attribute_count >= i)
+    {
+        int ret = xmlTextReaderMoveToAttributeNo(parser_impl->reader,
+                                                 parser_impl->attribute_map[i]);
+        if(ret == 1)
+            return (axis2_char_t*)xmlTextReaderPrefix(parser_impl->reader);
+        else
+            return NULL;
+    }
+    return NULL;   
+}
+
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_value_by_number(axis2_pull_parser_t *parser,
+                                                     axis2_env_t **env,
+                                                     int i)
+{
+    
+    axis2_libxml2_wrapper_impl_t *parser_impl;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    
+    if(parser_impl->current_attribute_count >0 && 
+        parser_impl->current_attribute_count >= i)
+    {
+        int ret = xmlTextReaderMoveToAttributeNo(parser_impl->reader,
+                                                 parser_impl->attribute_map[i]);
+        if(ret == 1)
+            return (axis2_char_t*)xmlTextReaderValue(parser_impl->reader);
+        else
+            return NULL;
+    }
+    return NULL; 
+}
+        
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_attribute_namespace_by_number
+                                                    (axis2_pull_parser_t *parser,
+                                                     axis2_env_t **env,
+                                                     int i)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    
+    if(parser_impl->current_attribute_count >0 && 
+        parser_impl->current_attribute_count >= i )
+    {
+        int ret = xmlTextReaderMoveToAttributeNo(parser_impl->reader,
+                                                 parser_impl->attribute_map[i]);
+        
+        
+        if(ret == 1)
+            return (axis2_char_t*)xmlTextReaderNamespaceUri(parser_impl->reader);
+        else
+            return NULL;
+    }
+    return NULL;     
+}
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_value(axis2_pull_parser_t *parser,
+                                axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    /*xmlTextReaderMoveToElement(parser_impl->reader); */
+    return (axis2_char_t*)xmlTextReaderValue(parser_impl->reader);
+}
+                                                      
+int AXIS2_CALL 
+axis2_libxml2_wrapper_get_namespace_count(axis2_pull_parser_t *parser,
+                                          axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser,env, AXIS2_FAILURE);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    if(parser_impl->current_event == AXIS2_PULL_PARSER_START_ELEMENT)
+        return parser_impl->current_namespace_count;
+    else
+        return 0;
+}
+
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_namespace_uri_by_number(axis2_pull_parser_t *parser,
+                                                  axis2_env_t **env,
+                                                  int i)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    
+    if(parser_impl->current_namespace_count >0 && 
+        parser_impl->current_namespace_count >= i )
+    {
+        
+        int ret = xmlTextReaderMoveToAttributeNo(parser_impl->reader,
+                                                 parser_impl->namespace_map[i]);
+        if(ret == 1)
+            return (axis2_char_t*)xmlTextReaderValue(parser_impl->reader);
+        else
+            return NULL;
+    }
+    return NULL; 
+}
+                                               
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_namespace_prefix_by_number(axis2_pull_parser_t *parser,
+                                                	 axis2_env_t **env,
+                                                	 int i)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    
+    if(parser_impl->current_namespace_count >0 && 
+        parser_impl->current_namespace_count >= i ) 
+    {   
+        int ret = xmlTextReaderMoveToAttributeNo(parser_impl->reader,
+                                                 parser_impl->namespace_map[i]);
+        
+        if(ret == 1)
+            return (axis2_char_t*)xmlTextReaderLocalName(parser_impl->reader);
+        else
+            return NULL;
+    } 
+    return NULL; 
+
+    
+    
+}
+                                                
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_prefix(axis2_pull_parser_t *parser,
+                                 axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    xmlTextReaderMoveToElement(parser_impl->reader);
+    return (axis2_char_t*)xmlTextReaderPrefix(parser_impl->reader);
+}
+        
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_name(axis2_pull_parser_t *parser,
+                               axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    /*xmlTextReaderMoveToElement(parser_impl->reader);*/
+    return (axis2_char_t*)xmlTextReaderLocalName(parser_impl->reader);
+    
+}
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_pi_target(axis2_pull_parser_t *parser,
+                                    axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    if(parser_impl->current_event ==  AXIS2_PULL_PARSER_PROCESSING_INSTRUCTION)
+        return (axis2_char_t*)xmlTextReaderLocalName(parser_impl->reader);
+    else
+        return NULL;        
+}
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_dtd(axis2_pull_parser_t *parser,
+                                  axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    if(parser_impl->current_event ==  AXIS2_PULL_PARSER_DOCUMENT_TYPE)
+        return (axis2_char_t*)xmlTextReaderLocalName(parser_impl->reader);
+    else
+        return NULL;        
+}
+
+
+axis2_char_t* AXIS2_CALL
+axis2_libxml2_wrapper_get_pi_data(axis2_pull_parser_t *parser,
+                                  axis2_env_t **env)
+{
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    if(parser_impl->current_event ==  AXIS2_PULL_PARSER_PROCESSING_INSTRUCTION)
+         return (axis2_char_t*)xmlTextReaderValue(parser_impl->reader);
+    else
+    {
+        return NULL;
+    }    
+}
+
+axis2_status_t AXIS2_CALL
+axis2_libxml2_wrapper_xml_free(axis2_pull_parser_t *parser,
+                               axis2_env_t **env,
+                               void *data)
+{
+    AXIS2_FUNC_PARAM_CHECK(parser, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, data, AXIS2_FAILURE);
+    xmlFree(data);
+    return AXIS2_SUCCESS;
+ }
+
+
+void axis2_libxml2_wrapper_fill_maps(axis2_pull_parser_t *parser,
+                                            axis2_env_t **env)
+{
+    int libxml2_attribute_count = 0;
+    int attr_count = 0;
+    int ns_count = 0;
+    int i=0;
+    char *q_name = NULL;
+    axis2_libxml2_wrapper_impl_t *parser_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(parser, env, NULL);
+    parser_impl = AXIS2_INTF_TO_IMPL(parser);
+    
+    libxml2_attribute_count = xmlTextReaderAttributeCount(parser_impl->reader);
+    if(libxml2_attribute_count == 0)
+        return;
+    
+    for(i = 0;i<20;i++)
+    {
+        parser_impl->namespace_map[i] = -1;
+        parser_impl->attribute_map[i] = -1;        
+    }
+    
+    for(i = 0; i < libxml2_attribute_count ; i++)
+    {
+        xmlTextReaderMoveToAttributeNo(parser_impl->reader,i);
+        q_name = xmlTextReaderName(parser_impl->reader);
+        if(q_name != NULL)
+        {    
+           if((strcmp(q_name, "xmlns") == 0) || (strncmp(q_name, "xmlns:",6) == 0))
+           {
+                /* found a namespace */
+               ns_count++;
+               parser_impl->namespace_map[ns_count] = i;
+           }
+           else
+           {
+                /* found an attribute */       
+               attr_count++;
+               parser_impl->attribute_map[attr_count] = i;
+           }
+           
+           xmlFree(q_name);
+           q_name = NULL;
+        }
+        
+        parser_impl->current_attribute_count = attr_count;
+        parser_impl->current_namespace_count = ns_count;
+    }
+    return;
+}

Propchange: webservices/axis2/trunk/c/modules/xml/parser/libxml2/src/axis2_libxml2_wrapper.c
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message