axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From din...@apache.org
Subject svn commit: r447794 - in /webservices/axis2/trunk/c/axiom/src/parser/guththila: guththila_xml_reader_wrapper.c guththila_xml_writer_wrapper.c
Date Tue, 19 Sep 2006 09:56:18 GMT
Author: dinesh
Date: Tue Sep 19 02:56:18 2006
New Revision: 447794

URL: http://svn.apache.org/viewvc?view=rev&rev=447794
Log:
modified to work with windows

Modified:
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c

Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c?view=diff&rev=447794&r1=447793&r2=447794
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c Tue Sep 19 02:56:18 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-
+ 
 #include <axiom_xml_reader.h>
 #include <axis2_env.h>
 #include <axis2_utils.h>
@@ -24,100 +24,99 @@
 
 
 
-int AXIS2_CALL
+int AXIS2_CALL 
 guththila_xml_reader_wrapper_next(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
-
+                             const axis2_env_t *env);
 
-axis2_status_t AXIS2_CALL
+        
+axis2_status_t AXIS2_CALL 
 guththila_xml_reader_wrapper_free(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
-
-
-int AXIS2_CALL
+                             const axis2_env_t *env);
+           
+        
+int AXIS2_CALL 
 guththila_xml_reader_wrapper_get_attribute_count(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
-
-axis2_char_t* AXIS2_CALL
+                                            const axis2_env_t *env);
+        
+axis2_char_t* AXIS2_CALL 
 guththila_xml_reader_wrapper_get_attribute_name_by_number(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        int i);
-
+                                                     const axis2_env_t *env,
+                                                     int i);
+        
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_attribute_prefix_by_number(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        int i);
-
+                                                       const axis2_env_t *env,
+                                                       int i);
+                                                     
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_attribute_value_by_number(
-    axiom_xml_reader_t *parser,
-    const axis2_env_t *env,
-    int i);
-
-
-axis2_char_t* AXIS2_CALL
+                                                axiom_xml_reader_t *parser,
+                                                const axis2_env_t *env,
+                                                int i);
+        
+        
+axis2_char_t* AXIS2_CALL 
 guththila_xml_reader_wrapper_get_attribute_namespace_by_number(
-    axiom_xml_reader_t *parser,
-    const axis2_env_t *env,
-    int i);
+                                                 axiom_xml_reader_t *parser,
+                                                 const axis2_env_t *env,
+                                                 int i);
 
-
-axis2_char_t* AXIS2_CALL
+                                
+axis2_char_t* AXIS2_CALL 
 guththila_xml_reader_wrapper_get_value(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
-
-int AXIS2_CALL
+                                  const axis2_env_t *env);
+                                                      
+int AXIS2_CALL 
 guththila_xml_reader_wrapper_get_namespace_count(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
+                                            const axis2_env_t *env);
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_namespace_uri_by_number(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        int i);
-
+                                                    const axis2_env_t *env,
+                                                    int i);
+                                               
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_namespace_prefix_by_number(
-    axiom_xml_reader_t *parser,
-    const axis2_env_t *env,
-    int i);
-
+                                                axiom_xml_reader_t *parser,
+                                                const axis2_env_t *env,
+                                                int i); 
+                                                
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_prefix(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
-
+                                   const axis2_env_t *env);   
+        
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_name(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
+                                 const axis2_env_t *env); 
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_pi_target(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
+                                      const axis2_env_t *env);
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_pi_data(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
+                                     const axis2_env_t *env);
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_dtd(axiom_xml_reader_t *parser,
-        const axis2_env_t *env);
+                                     const axis2_env_t *env);                                     
 
 axis2_status_t AXIS2_CALL
 guththila_xml_reader_wrapper_xml_free(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        void *data);
+                                 const axis2_env_t *env,
+                                 void *data);
 
 
 /*********** guththila_xml_reader_wrapper_impl_t wrapper struct   *******************/
 
 typedef struct guththila_xml_reader_wrapper_impl
 {
-    axiom_xml_reader_t parser;
+    axiom_xml_reader_t parser;    
     guththila_t *guththila_parser;
     guththila_reader_t *reader;
     int event_map[10];
-
-}
-guththila_xml_reader_wrapper_impl_t;
+    
+}guththila_xml_reader_wrapper_impl_t;
 
 /********************************* Macro ***************************************/
 
@@ -128,9 +127,9 @@
 /**********End macros  --  event_map initializing function *********************/
 
 static axis2_status_t guththila_xml_reader_wrapper_init_map(
-    guththila_xml_reader_wrapper_impl_t *parser)
+                            guththila_xml_reader_wrapper_impl_t *parser)
 {
-    if (parser)
+    if(parser)
     {
         parser->event_map[GUTHTHILA_START_DOCUMENT] = AXIOM_XML_READER_START_DOCUMENT;
         parser->event_map[GUTHTHILA_START_ELEMENT]  = AXIOM_XML_READER_START_ELEMENT;
@@ -149,69 +148,69 @@
 
 AXIS2_EXTERN axiom_xml_reader_t * AXIS2_CALL
 axiom_xml_reader_create_for_file(const axis2_env_t *env,
-        char* filename,
-        const char *encoding)
+                                  char* filename,
+                                  const char *encoding)
 {
     guththila_xml_reader_wrapper_impl_t *guththila_impl = NULL;
     axis2_allocator_t *allocator = NULL;
     guththila_t *guththila = NULL;
-
+    
     AXIS2_ENV_CHECK(env, NULL);
-
+    
     guththila_impl = AXIS2_MALLOC(env->allocator,
-            sizeof(guththila_xml_reader_wrapper_impl_t));
-
-    if (!guththila_impl)
+                             sizeof(guththila_xml_reader_wrapper_impl_t));
+    
+    if(!guththila_impl)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
+    
     allocator = axis2_allocator_init(NULL);
-    /*     guththila_env  = guththila_environment_create(allocator,NULL, NULL); */
-
-    guththila_impl->reader =
-        guththila_reader_create_for_file((axis2_env_t *)env, filename);
-
-    if (!(guththila_impl->reader))
+/*     guththila_env  = guththila_environment_create(allocator,NULL, NULL); */
+    
+    guththila_impl->reader = 
+            guththila_reader_create_for_file ( (axis2_env_t *)env, filename);
+    
+    if(!(guththila_impl->reader))
     {
-        AXIS2_FREE(env->allocator, guththila_impl);
+        AXIS2_FREE(env->allocator,guththila_impl);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-    }
-
+    }    
+    
     guththila = guththila_create((axis2_env_t *)env,
-            guththila_impl->reader);
-    if (!guththila)
+                                            guththila_impl->reader);
+    if(!guththila)
     {
-        AXIS2_FREE(env->allocator, guththila_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_FREE(env->allocator,guththila_impl);
+        AXIS2_ERROR_SET(env->error,AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-
+    
+    
     guththila_impl->guththila_parser = guththila;
     guththila_impl->parser.ops = NULL;
     guththila_impl->parser.ops = (axiom_xml_reader_ops_t*)AXIS2_MALLOC(
-                env->allocator,
-                sizeof(axiom_xml_reader_ops_t));
-    if (!(guththila_impl->parser.ops))
-    {
-        guththila_free((axis2_env_t *)env, guththila);
-        AXIS2_FREE(env->allocator, guththila_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
+                                      env->allocator,
+                                       sizeof(axiom_xml_reader_ops_t));
+    if(!(guththila_impl->parser.ops))
+    {   
+      guththila_free ((axis2_env_t *)env, guththila);
+      AXIS2_FREE(env->allocator,guththila_impl);
+      AXIS2_ERROR_SET(env->error,AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+      return NULL;
     }
-
-
+    
+    
     guththila_xml_reader_wrapper_init_map(guththila_impl);
-
-
-    /************** ops *****/
+    
+    
+/************** ops *****/    
     guththila_impl->parser.ops->next = guththila_xml_reader_wrapper_next;
-
+    
     guththila_impl->parser.ops->free = guththila_xml_reader_wrapper_free;
-
+    
     guththila_impl->parser.ops->get_attribute_count =
         guththila_xml_reader_wrapper_get_attribute_count;
     guththila_impl->parser.ops->get_attribute_name_by_number =
@@ -222,11 +221,11 @@
         guththila_xml_reader_wrapper_get_attribute_prefix_by_number;
     guththila_impl->parser.ops->get_attribute_namespace_by_number =
         guththila_xml_reader_wrapper_get_attribute_namespace_by_number;
-
+    
     guththila_impl->parser.ops->get_value = guththila_xml_reader_wrapper_get_value;
     guththila_impl->parser.ops->get_name  = guththila_xml_reader_wrapper_get_name;
     guththila_impl->parser.ops->get_prefix = guththila_xml_reader_wrapper_get_prefix;
-
+    
     guththila_impl->parser.ops->get_namespace_count =
         guththila_xml_reader_wrapper_get_namespace_count;
     guththila_impl->parser.ops->get_namespace_uri_by_number =
@@ -234,10 +233,10 @@
     guththila_impl->parser.ops->get_namespace_prefix_by_number =
         guththila_xml_reader_wrapper_get_namespace_prefix_by_number;
 
-    guththila_impl->parser.ops->get_dtd =
+    guththila_impl->parser.ops->get_dtd=
         guththila_xml_reader_wrapper_get_dtd;
 
-    guththila_impl->parser.ops->xml_free = guththila_xml_reader_wrapper_xml_free;
+    guththila_impl->parser.ops->xml_free = guththila_xml_reader_wrapper_xml_free;        
 
     return &(guththila_impl->parser);
 }
@@ -245,73 +244,72 @@
 /****** pull parser for io create function ***************************/
 
 
-AXIS2_EXTERN axiom_xml_reader_t * AXIS2_CALL
+axiom_xml_reader_t * AXIS2_CALL
 axiom_xml_reader_create_for_io(const axis2_env_t *env,
-        int(*read_input_callback)(char *buffer, int size, void* ctx),
-        int(*close_input_callback)(void *ctx),
-        void *ctx,
-        const char *encoding)
+                                    int (*read_input_callback)(char *buffer,int size,void* ctx),
+                                    int (*close_input_callback)(void *ctx),
+                                    void *ctx,
+                                    const char *encoding)
 {
     guththila_xml_reader_wrapper_impl_t *guththila_impl = NULL;
     axis2_allocator_t *allocator = NULL;
     guththila_t *guththila = NULL;
-
+    
     AXIS2_ENV_CHECK(env, NULL);
-
+    
     guththila_impl = AXIS2_MALLOC(env->allocator,
-            sizeof(guththila_xml_reader_wrapper_impl_t));
-
-    if (!guththila_impl)
+                             sizeof(guththila_xml_reader_wrapper_impl_t));
+    
+    if(!guththila_impl)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
+    
     allocator = axis2_allocator_init(NULL);
-
+    
     /*-------difference of two create function is here--------*/
     guththila_impl->reader =
-        guththila_reader_create_for_io((axis2_env_t *)env, read_input_callback, ctx);
-
-    if (!(guththila_impl->reader))
+        guththila_reader_create_for_io((axis2_env_t *)env,read_input_callback,ctx);
+                                                   
+    if(!(guththila_impl->reader))
     {
-        AXIS2_FREE(env->allocator, guththila_impl);
+        AXIS2_FREE(env->allocator,guththila_impl);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
+    
     guththila = guththila_create((axis2_env_t *)env,
-            guththila_impl->reader);
-    if (!guththila)
+                                                guththila_impl->reader);
+    if(!guththila)
     {
-        AXIS2_FREE(env->allocator, guththila_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_FREE(env->allocator,guththila_impl);
+        AXIS2_ERROR_SET(env->error,AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-
+    
+    
     guththila_impl->guththila_parser = guththila;
     guththila_impl->parser.ops = NULL;
     guththila_impl->parser.ops = (axiom_xml_reader_ops_t*)AXIS2_MALLOC(
-                env->allocator,
-                sizeof(axiom_xml_reader_ops_t));
-    if (!(guththila_impl->parser.ops))
-    {
-        guththila_free((axis2_env_t *)env, guththila);
-        AXIS2_FREE(env->allocator, guththila_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+                                      env->allocator,
+                                       sizeof(axiom_xml_reader_ops_t));
+    if(!(guththila_impl->parser.ops))
+    {   guththila_free( (axis2_env_t *)env, guththila);
+        AXIS2_FREE(env->allocator,guththila_impl);
+        AXIS2_ERROR_SET(env->error,AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-
+    
+    
     guththila_xml_reader_wrapper_init_map(guththila_impl);
-
-
-    /************** ops *****/
+    
+    
+/************** ops *****/
     guththila_impl->parser.ops->next = guththila_xml_reader_wrapper_next;
-
+    
     guththila_impl->parser.ops->free = guththila_xml_reader_wrapper_free;
-
+    
     guththila_impl->parser.ops->get_attribute_count =
         guththila_xml_reader_wrapper_get_attribute_count;
     guththila_impl->parser.ops->get_attribute_name_by_number =
@@ -322,20 +320,20 @@
         guththila_xml_reader_wrapper_get_attribute_prefix_by_number;
     guththila_impl->parser.ops->get_attribute_namespace_by_number =
         guththila_xml_reader_wrapper_get_attribute_namespace_by_number;
-
+    
     guththila_impl->parser.ops->get_value = guththila_xml_reader_wrapper_get_value;
     guththila_impl->parser.ops->get_name  = guththila_xml_reader_wrapper_get_name;
     guththila_impl->parser.ops->get_prefix = guththila_xml_reader_wrapper_get_prefix;
-
+    
     guththila_impl->parser.ops->get_namespace_count =
         guththila_xml_reader_wrapper_get_namespace_count;
     guththila_impl->parser.ops->get_namespace_uri_by_number =
         guththila_xml_reader_wrapper_get_namespace_uri_by_number;
     guththila_impl->parser.ops->get_namespace_prefix_by_number =
         guththila_xml_reader_wrapper_get_namespace_prefix_by_number;
-    guththila_impl->parser.ops->get_dtd =
+    guththila_impl->parser.ops->get_dtd=
         guththila_xml_reader_wrapper_get_dtd;
-
+        
     guththila_impl->parser.ops->xml_free = guththila_xml_reader_wrapper_xml_free;
     return &(guththila_impl->parser);
 }
@@ -344,83 +342,82 @@
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axiom_xml_reader_init()
 {
-    return AXIS2_SUCCESS;
+  return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axiom_xml_reader_cleanup()
 {
-    return AXIS2_SUCCESS;
+  return AXIS2_SUCCESS;
 }
 /* ######################################################################## */
 
 AXIS2_EXTERN axiom_xml_reader_t * AXIS2_CALL
 axiom_xml_reader_create_for_memory(const axis2_env_t *env,
-        void *buffer,
-        int size,
-        const char *encoding,
-        int type)
+				   void *buffer, 
+				   int size,
+				   const char *encoding,
+				   int type)
 {
     guththila_xml_reader_wrapper_impl_t *guththila_impl = NULL;
     axis2_allocator_t *allocator = NULL;
     guththila_t *guththila = NULL;
-
+    
     AXIS2_ENV_CHECK(env, NULL);
-
+    
     guththila_impl = AXIS2_MALLOC(env->allocator,
-            sizeof(guththila_xml_reader_wrapper_impl_t));
-
-    if (!guththila_impl)
+                             sizeof(guththila_xml_reader_wrapper_impl_t));
+    
+    if(!guththila_impl)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
+    
     allocator = axis2_allocator_init(NULL);
-
+    
     /*-------difference of two create function is here--------*/
     guththila_impl->reader =
         guththila_reader_create_for_memory((axis2_env_t *)env, buffer, size, NULL);
-
-    if (!(guththila_impl->reader))
+                                                   
+    if(!(guththila_impl->reader))
     {
-        AXIS2_FREE(env->allocator, guththila_impl);
+        AXIS2_FREE(env->allocator,guththila_impl);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
+    
     guththila = guththila_create((axis2_env_t *)env,
-            guththila_impl->reader);
-    if (!guththila)
+                                                guththila_impl->reader);
+    if(!guththila)
     {
-        AXIS2_FREE(env->allocator, guththila_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_FREE(env->allocator,guththila_impl);
+        AXIS2_ERROR_SET(env->error,AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-
+    
+    
     guththila_impl->guththila_parser = guththila;
     guththila_impl->parser.ops = NULL;
     guththila_impl->parser.ops = (axiom_xml_reader_ops_t*)AXIS2_MALLOC(
-                env->allocator,
-                sizeof(axiom_xml_reader_ops_t));
-    if (!(guththila_impl->parser.ops))
-    {
-        guththila_free((axis2_env_t *)env, guththila);
-        AXIS2_FREE(env->allocator, guththila_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+                                      env->allocator,
+                                       sizeof(axiom_xml_reader_ops_t));
+    if(!(guththila_impl->parser.ops))
+    {   guththila_free( (axis2_env_t *)env, guththila);
+        AXIS2_FREE(env->allocator,guththila_impl);
+        AXIS2_ERROR_SET(env->error,AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-
+    
+    
     guththila_xml_reader_wrapper_init_map(guththila_impl);
-
-
-    /************** ops *****/
+    
+    
+/************** ops *****/
     guththila_impl->parser.ops->next = guththila_xml_reader_wrapper_next;
-
+    
     guththila_impl->parser.ops->free = guththila_xml_reader_wrapper_free;
-
+    
     guththila_impl->parser.ops->get_attribute_count =
         guththila_xml_reader_wrapper_get_attribute_count;
     guththila_impl->parser.ops->get_attribute_name_by_number =
@@ -431,240 +428,240 @@
         guththila_xml_reader_wrapper_get_attribute_prefix_by_number;
     guththila_impl->parser.ops->get_attribute_namespace_by_number =
         guththila_xml_reader_wrapper_get_attribute_namespace_by_number;
-
+    
     guththila_impl->parser.ops->get_value = guththila_xml_reader_wrapper_get_value;
     guththila_impl->parser.ops->get_name  = guththila_xml_reader_wrapper_get_name;
     guththila_impl->parser.ops->get_prefix = guththila_xml_reader_wrapper_get_prefix;
-
+    
     guththila_impl->parser.ops->get_namespace_count =
         guththila_xml_reader_wrapper_get_namespace_count;
     guththila_impl->parser.ops->get_namespace_uri_by_number =
         guththila_xml_reader_wrapper_get_namespace_uri_by_number;
     guththila_impl->parser.ops->get_namespace_prefix_by_number =
         guththila_xml_reader_wrapper_get_namespace_prefix_by_number;
-    guththila_impl->parser.ops->get_dtd =
+    guththila_impl->parser.ops->get_dtd=
         guththila_xml_reader_wrapper_get_dtd;
-
+        
     guththila_impl->parser.ops->xml_free = guththila_xml_reader_wrapper_xml_free;
     return &(guththila_impl->parser);
 }
 
+                               
 
 
 
-
-int AXIS2_CALL
+ int AXIS2_CALL
 guththila_xml_reader_wrapper_next(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                             const axis2_env_t *env)
 {
-    int i = -1;
+    int i =-1;
     AXIS2_ENV_CHECK(env, -1);
     i = guththila_next((axis2_env_t*) env, AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
     return i == -1 ? -1 : AXIS2_INTF_TO_IMPL(parser)->event_map[i];
-
+    
 }
 
-
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_reader_wrapper_free(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                             const axis2_env_t *env)
 {
     guththila_xml_reader_wrapper_impl_t *parser_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env,AXIS2_FAILURE);
     parser_impl = AXIS2_INTF_TO_IMPL(parser);
-    if (parser_impl->reader)
+    if(parser_impl->reader)
 
-        guththila_reader_free(
-            (axis2_env_t *)env,
-            parser_impl->reader);
-
-    if (parser_impl->guththila_parser)
-        guththila_free(
-            (axis2_env_t *)env,
-            parser_impl->guththila_parser);
-
-
-    if (parser->ops)
+      guththila_reader_free(
+			    (axis2_env_t *)env, 
+			    parser_impl->reader);
+    
+    if(parser_impl->guththila_parser)
+      guththila_free(
+				     (axis2_env_t *)env,
+				     parser_impl->guththila_parser);
+                  
+    
+    if(parser->ops)
         AXIS2_FREE(env->allocator, parser->ops);
     AXIS2_FREE(env->allocator, parser_impl);
     return AXIS2_SUCCESS;
 }
-
-
+           
+        
 int AXIS2_CALL
 guththila_xml_reader_wrapper_get_attribute_count(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                                            const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     return guththila_get_attribute_count(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
 }
-
+        
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_attribute_name_by_number(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        int i)
+                                                     const axis2_env_t *env,
+                                                     int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_attribute_name_by_number(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
+    
+    
 }
-
+        
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_attribute_prefix_by_number(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        int i)
+                                                       const axis2_env_t *env,
+                                                       int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_attribute_prefix_by_number(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
+    
+    
 }
 
-
+                                                     
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_attribute_value_by_number(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        int i)
+                                                      const axis2_env_t *env,
+                                                      int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_attribute_value_by_number(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
+    
+    
 }
-
-
+        
+        
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_attribute_namespace_by_number(
-    axiom_xml_reader_t *parser,
-    const axis2_env_t *env,
-    int i)
+                                                 axiom_xml_reader_t *parser,
+                                                 const axis2_env_t *env,
+                                                 int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_attribute_namespace_by_number(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
+    
+    
 }
 
-
+                                
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_value(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                                  const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_value(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    
+    
 }
-
+                                                      
 int AXIS2_CALL
 guththila_xml_reader_wrapper_get_namespace_count(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                                            const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     return guththila_get_namespace_count(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    
+    
 }
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_namespace_uri_by_number(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        int i)
+                                                    const axis2_env_t *env,
+                                                    int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_namespace_uri_by_number(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
+    
+    
 }
-
+                                               
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_namespace_prefix_by_number(
-    axiom_xml_reader_t *parser,
-    const axis2_env_t *env,
-    int i)
+                                                axiom_xml_reader_t *parser,
+                                                const axis2_env_t *env,
+                                                int i)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_namespace_prefix_by_number(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser, i);
+    
+    
 }
-
+                                                
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_prefix(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                                   const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_prefix(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    
+    
 }
-
+        
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_name(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                                 const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return guththila_get_name(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+    
+    
 }
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_pi_target(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                                      const axis2_env_t *env)
 {
     /* guththila_does not support pi's yet*/
     return NULL;
-}
+ }
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_pi_data(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
-{
+                                     const axis2_env_t *env)
+ {
     /* guththila_dose not support yet */
     return NULL;
-}
+ }
 
 axis2_char_t* AXIS2_CALL
 guththila_xml_reader_wrapper_get_dtd(axiom_xml_reader_t *parser,
-        const axis2_env_t *env)
+                                     const axis2_env_t *env)
 {
     printf("not implemented in guththila");
     return NULL;
 }
-
+ 
 axis2_status_t AXIS2_CALL
 guththila_xml_reader_wrapper_xml_free(axiom_xml_reader_t *parser,
-        const axis2_env_t *env,
-        void *data)
+                                 const axis2_env_t *env,
+                                 void *data)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, data, AXIS2_FAILURE);
     AXIS2_FREE(env->allocator,
-            data);
+                   data);
     return AXIS2_SUCCESS;
 }
-
+ 

Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c?view=diff&rev=447794&r1=447793&r2=447794
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c Tue Sep 19 02:56:18 2006
@@ -13,7 +13,7 @@
  *   See the License for the specific language governing permissions and
  *   limitations under the License.
  */
-
+ 
 #include <guththila_xml_writer.h>
 #include <guththila.h>
 #include <axis2_utils.h>
@@ -22,182 +22,182 @@
 /* /\*********************** function prototypes ***********************************\/ */
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_free(axiom_xml_writer_t *writer,
-        const axis2_env_t *env);
-
+                                  const axis2_env_t *env);
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_element(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname);
-
+                                    axiom_xml_writer_t *writer,
+                                    const axis2_env_t *env,
+                                    axis2_char_t *localname);
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_end_start_element(axiom_xml_writer_t *writer,
-        const axis2_env_t *env);
-
+                                               const axis2_env_t *env);
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_element_with_namespace(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri);
-
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri);
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_element_with_namespace_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri,
-    axis2_char_t *prefix);
-
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri,
+                                        axis2_char_t *prefix);
+                                    
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_empty_element(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname);
-
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname);
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_empty_element_with_namespace(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri);
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_empty_element_with_namespace_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri,
-    axis2_char_t *prefix);
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri,
+                                        axis2_char_t *prefix);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_end_element(axiom_xml_writer_t *writer,
-        const axis2_env_t *env);
+                                               const axis2_env_t *env);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_end_document(axiom_xml_writer_t *writer,
-        const axis2_env_t *env);
+                                               const axis2_env_t *env);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_attribute(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *localname,
-        axis2_char_t *value);
-
+                                           const axis2_env_t *env,
+                                           axis2_char_t *localname,
+                                           axis2_char_t *value);
+                                               
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_attribute_with_namespace(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *value,
-    axis2_char_t *namespace_uri);
+                                          axiom_xml_writer_t *writer,
+                                          const axis2_env_t *env,
+                                          axis2_char_t *localname,
+                                          axis2_char_t *value,
+                                          axis2_char_t *namespace_uri);
+                                          
+axis2_status_t AXIS2_CALL
+guththila_xml_writer_wrapper_write_attribute_with_namespace_prefix (
+								    axiom_xml_writer_t *writer,
+								    const axis2_env_t *env,
+								    axis2_char_t *localname,
+								    axis2_char_t *value,
+								    axis2_char_t *namespace_uri,
+								    axis2_char_t *prefix);
+
+axis2_status_t AXIS2_CALL
+guththila_xml_writer_wrapper_write_namespace (
+					      axiom_xml_writer_t *writer,
+					      const axis2_env_t *env,
+					      axis2_char_t *prefix,
+					      axis2_char_t *namespace_uri);
 
-axis2_status_t AXIS2_CALL
-guththila_xml_writer_wrapper_write_attribute_with_namespace_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *value,
-    axis2_char_t *namespace_uri,
-    axis2_char_t *prefix);
 
 axis2_status_t AXIS2_CALL
-guththila_xml_writer_wrapper_write_namespace(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *prefix,
-    axis2_char_t *namespace_uri);
-
-
-axis2_status_t AXIS2_CALL
-guththila_xml_writer_wrapper_write_default_namespace(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *namespace_uri);
+guththila_xml_writer_wrapper_write_default_namespace (axiom_xml_writer_t *writer,
+						      const axis2_env_t *env,
+						      axis2_char_t *namespace_uri);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_comment(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *value);
-
+                                           const axis2_env_t *env,
+                                           axis2_char_t *value);
+                                           
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_processing_instruction(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *target);
-
+							  axiom_xml_writer_t *writer,
+							  const axis2_env_t *env,
+							  axis2_char_t *target);
+                                           
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_processing_instruction_data(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *target,
-    axis2_char_t *data);
-
+							       axiom_xml_writer_t *writer,
+							       const axis2_env_t *env,
+							       axis2_char_t *target,
+							       axis2_char_t *data);
+                                           
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_cdata(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *data);
+                                         const axis2_env_t *env,
+                                         axis2_char_t *data);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_dtd(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *dtd);
+                                         const axis2_env_t *env,
+                                         axis2_char_t *dtd);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_entity_ref(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *name);
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *name);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_document(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env);
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_document_with_version(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *version);
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *version);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_document_with_version_encoding(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *encoding,
-    axis2_char_t *version);
-
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *encoding,
+                                         axis2_char_t *version);
+                                         
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_characters(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *text);
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *text);
 
 axis2_char_t* AXIS2_CALL
-guththila_xml_writer_wrapper_get_prefix(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *uri);
+guththila_xml_writer_wrapper_get_prefix(  axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *uri);
 
 axis2_status_t AXIS2_CALL
-guththila_xml_writer_wrapper_set_prefix(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *prefix,
-        axis2_char_t *uri);
+guththila_xml_writer_wrapper_set_prefix(  axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *prefix,
+                                         axis2_char_t *uri);
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_set_default_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *uri);
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *uri);
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_encoded(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *text,
-    int in_attr);
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *text,
+                                         int in_attr);
 
 void* AXIS2_CALL
 guththila_xml_writer_wrapper_get_xml(axiom_xml_writer_t *writer,
-        const axis2_env_t *env);
+                                     const axis2_env_t *env);
 
 
 
@@ -205,10 +205,9 @@
 
 typedef struct guththila_xml_writer_wrapper_impl
 {
-    axiom_xml_writer_t writer;
-    guththila_t *parser;
-}
-guththila_xml_writer_wrapper_impl_t;
+  axiom_xml_writer_t writer;
+  guththila_t *parser;
+}guththila_xml_writer_wrapper_impl_t;
 
 
 /* /\***************************** Macros ******************************************\/ */
@@ -219,58 +218,58 @@
 
 AXIS2_EXTERN axiom_xml_writer_t * AXIS2_CALL
 axiom_xml_writer_create(const axis2_env_t *env,
-        axis2_char_t *filename,
-        axis2_char_t *encoding,
-        int is_prefix_default,
-        int compression)
+                        axis2_char_t *filename,
+                        axis2_char_t *encoding,
+                        int is_prefix_default,
+                        int compression)
 {
     guththila_xml_writer_wrapper_impl_t *writer_impl;
-
+  
     axis2_allocator_t *allocator;
     AXIS2_ENV_CHECK(env, NULL);
-
+    
     writer_impl = (guththila_xml_writer_wrapper_impl_t *)AXIS2_MALLOC(env->allocator,
-            sizeof(guththila_xml_writer_wrapper_impl_t));
+                   sizeof(guththila_xml_writer_wrapper_impl_t));
 
-    if (!writer_impl)
+    if(!writer_impl)
     {
 
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-    allocator = axis2_allocator_init(NULL);
-    writer_impl->parser = guththila_create((axis2_env_t *)env, NULL);
-
-    if (!(writer_impl->parser))
-    {
-        AXIS2_FREE(env->allocator, writer_impl);
-        AXIS2_FREE(env->allocator, allocator);
+   
+   allocator = axis2_allocator_init(NULL); 
+    writer_impl->parser = guththila_create ((axis2_env_t *)env, NULL);
+    
+    if(!(writer_impl->parser))
+      {
+        AXIS2_FREE(env->allocator,writer_impl);
+        AXIS2_FREE(env->allocator,allocator);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-    }
+      }
 
     guththila_create_xml_stream_writer((axis2_env_t*) env,
-            writer_impl->parser,
-            filename);
+						       writer_impl->parser, 
+						       filename);
 
-    if (!(writer_impl->parser->xsw))
+    if(!(writer_impl->parser->xsw))
     {
-        AXIS2_FREE(env->allocator, writer_impl->parser);
-        AXIS2_FREE(env->allocator, writer_impl);
-        AXIS2_FREE(env->allocator, allocator);
+        AXIS2_FREE(env->allocator,writer_impl->parser);
+	AXIS2_FREE (env->allocator, writer_impl);
+        AXIS2_FREE(env->allocator,allocator);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
+    
     writer_impl->writer.ops = NULL;
     writer_impl->writer.ops = (axiom_xml_writer_ops_t*)AXIS2_MALLOC(env->allocator,
-            sizeof(axiom_xml_writer_ops_t));
-    if (!(writer_impl->writer.ops))
+                                    sizeof(axiom_xml_writer_ops_t));
+    if(!(writer_impl->writer.ops))
     {
-        AXIS2_FREE(env->allocator, writer_impl);
-        AXIS2_FREE(env->allocator, allocator);
-
+        AXIS2_FREE(env->allocator,writer_impl);
+        AXIS2_FREE(env->allocator,allocator);
+        
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
@@ -278,118 +277,118 @@
     writer_impl->writer.ops->free = guththila_xml_writer_wrapper_free;
     writer_impl->writer.ops->write_start_element = guththila_xml_writer_wrapper_write_start_element;
     writer_impl->writer.ops->write_start_element_with_namespace =
-        guththila_xml_writer_wrapper_write_start_element_with_namespace;
+            guththila_xml_writer_wrapper_write_start_element_with_namespace;
     writer_impl->writer.ops->write_start_element_with_namespace_prefix =
-        guththila_xml_writer_wrapper_write_start_element_with_namespace_prefix;
-
+            guththila_xml_writer_wrapper_write_start_element_with_namespace_prefix;
+    
     writer_impl->writer.ops->write_empty_element = guththila_xml_writer_wrapper_write_empty_element;
     writer_impl->writer.ops->write_empty_element_with_namespace  =
-        guththila_xml_writer_wrapper_write_empty_element_with_namespace;
+            guththila_xml_writer_wrapper_write_empty_element_with_namespace;
     writer_impl->writer.ops->write_empty_element_with_namespace_prefix =
-        guththila_xml_writer_wrapper_write_empty_element_with_namespace_prefix;
-
+            guththila_xml_writer_wrapper_write_empty_element_with_namespace_prefix;
+    
     writer_impl->writer.ops->write_end_element =
-        guththila_xml_writer_wrapper_write_end_element;
+            guththila_xml_writer_wrapper_write_end_element;
     writer_impl->writer.ops->write_end_document =
-        guththila_xml_writer_wrapper_write_end_document;
-
+            guththila_xml_writer_wrapper_write_end_document;
+    
     writer_impl->writer.ops->write_attribute =
-        guththila_xml_writer_wrapper_write_attribute;
+            guththila_xml_writer_wrapper_write_attribute;
     writer_impl->writer.ops->write_attribute_with_namespace =
-        guththila_xml_writer_wrapper_write_attribute_with_namespace;
+            guththila_xml_writer_wrapper_write_attribute_with_namespace;
     writer_impl->writer.ops->write_attribute_with_namespace_prefix =
-        guththila_xml_writer_wrapper_write_attribute_with_namespace_prefix;
+            guththila_xml_writer_wrapper_write_attribute_with_namespace_prefix;
     writer_impl->writer.ops->write_namespace =
-        guththila_xml_writer_wrapper_write_namespace;
+            guththila_xml_writer_wrapper_write_namespace;
     writer_impl->writer.ops->write_default_namespace =
-        guththila_xml_writer_wrapper_write_default_namespace;
+            guththila_xml_writer_wrapper_write_default_namespace;
     writer_impl->writer.ops->write_comment =
-        guththila_xml_writer_wrapper_write_comment;
+            guththila_xml_writer_wrapper_write_comment;
     writer_impl->writer.ops->write_processing_instruction =
-        guththila_xml_writer_wrapper_write_processing_instruction;
+            guththila_xml_writer_wrapper_write_processing_instruction;
     writer_impl->writer.ops->write_processing_instruction_data =
-        guththila_xml_writer_wrapper_write_processing_instruction_data;
+            guththila_xml_writer_wrapper_write_processing_instruction_data;
     writer_impl->writer.ops->write_cdata =
-        guththila_xml_writer_wrapper_write_cdata;
+            guththila_xml_writer_wrapper_write_cdata;
     writer_impl->writer.ops->write_dtd =
-        guththila_xml_writer_wrapper_write_dtd;
+            guththila_xml_writer_wrapper_write_dtd;
     writer_impl->writer.ops->write_entity_ref =
-        guththila_xml_writer_wrapper_write_entity_ref;
+            guththila_xml_writer_wrapper_write_entity_ref;
     writer_impl->writer.ops->write_start_document =
-        guththila_xml_writer_wrapper_write_start_document;
+            guththila_xml_writer_wrapper_write_start_document;
     writer_impl->writer.ops->write_start_document_with_version =
-        guththila_xml_writer_wrapper_write_start_document_with_version;
+            guththila_xml_writer_wrapper_write_start_document_with_version;
     writer_impl->writer.ops->write_start_document_with_version_encoding =
-        guththila_xml_writer_wrapper_write_start_document_with_version_encoding;
+            guththila_xml_writer_wrapper_write_start_document_with_version_encoding;
     writer_impl->writer.ops->write_characters =
-        guththila_xml_writer_wrapper_write_characters;
+            guththila_xml_writer_wrapper_write_characters;
     writer_impl->writer.ops->get_prefix =
-        guththila_xml_writer_wrapper_get_prefix;
+            guththila_xml_writer_wrapper_get_prefix;
     writer_impl->writer.ops->set_prefix = guththila_xml_writer_wrapper_set_prefix;
     writer_impl->writer.ops->set_default_prefix =
-        guththila_xml_writer_wrapper_set_default_prefix;
+            guththila_xml_writer_wrapper_set_default_prefix;
     writer_impl->writer.ops->write_encoded =
-        guththila_xml_writer_wrapper_write_encoded;
+            guththila_xml_writer_wrapper_write_encoded;
     writer_impl->writer.ops->get_xml =
-        guththila_xml_writer_wrapper_get_xml;
+            guththila_xml_writer_wrapper_get_xml;
 
-    return &(writer_impl->writer);
+   return &(writer_impl->writer);
 }
 
 AXIS2_EXTERN axiom_xml_writer_t * AXIS2_CALL
 axiom_xml_writer_create_for_memory(const axis2_env_t *env,
-        axis2_char_t *encoding,
-        int is_prefix_default,
-        int compression,
-        int type)
-{
-    guththila_xml_writer_wrapper_impl_t *writer_impl = NULL;
-
-    axis2_allocator_t *allocator = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
-
-    writer_impl = (guththila_xml_writer_wrapper_impl_t *)AXIS2_MALLOC(env->allocator,
-            sizeof(guththila_xml_writer_wrapper_impl_t));
+                                   axis2_char_t *encoding,
+                                   int is_prefix_default,
+                                   int compression,
+				   int type)
+{
+  guththila_xml_writer_wrapper_impl_t *writer_impl = NULL;
+  
+  axis2_allocator_t *allocator = NULL;
+  AXIS2_ENV_CHECK(env, NULL);
+    
+  writer_impl = (guththila_xml_writer_wrapper_impl_t *)AXIS2_MALLOC(env->allocator,
+								    sizeof(guththila_xml_writer_wrapper_impl_t));
 
-    if (!writer_impl)
+    if(!writer_impl)
     {
-
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
+      
+      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+      return NULL;
     }
-
-    allocator = axis2_allocator_init(NULL);
+   
+    allocator = axis2_allocator_init(NULL); 
     /* creating guththila parser */
-    writer_impl->parser = guththila_create((axis2_env_t *)env, NULL);
-
-    if (!(writer_impl->parser))
-    {
-        AXIS2_FREE(env->allocator, writer_impl);
-        AXIS2_FREE(env->allocator, allocator);
+    writer_impl->parser = guththila_create ((axis2_env_t *)env, NULL);
+    
+    if(!(writer_impl->parser))
+      {
+        AXIS2_FREE(env->allocator,writer_impl);
+        AXIS2_FREE(env->allocator,allocator);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-    }
+      }
     /* guththila xml stream writer for memory */
     guththila_create_xml_stream_writer_for_memory((axis2_env_t*) env,
-            writer_impl->parser);
+						       writer_impl->parser);
 
-    if (!(writer_impl->parser->xsw))
+    if(!(writer_impl->parser->xsw))
     {
-        AXIS2_FREE(env->allocator, writer_impl->parser);
-        AXIS2_FREE(env->allocator, writer_impl);
-        AXIS2_FREE(env->allocator, allocator);
+        AXIS2_FREE(env->allocator,writer_impl->parser);
+	AXIS2_FREE (env->allocator, writer_impl);
+        AXIS2_FREE(env->allocator,allocator);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
+    
     writer_impl->writer.ops = NULL;
     writer_impl->writer.ops = (axiom_xml_writer_ops_t*)AXIS2_MALLOC(env->allocator,
-            sizeof(axiom_xml_writer_ops_t));
-    if (!(writer_impl->writer.ops))
+                                    sizeof(axiom_xml_writer_ops_t));
+    if(!(writer_impl->writer.ops))
     {
-        AXIS2_FREE(env->allocator, writer_impl);
-        AXIS2_FREE(env->allocator, allocator);
-
+        AXIS2_FREE(env->allocator,writer_impl);
+        AXIS2_FREE(env->allocator,allocator);
+        
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
@@ -397,102 +396,102 @@
     writer_impl->writer.ops->free = guththila_xml_writer_wrapper_free;
     writer_impl->writer.ops->write_start_element = guththila_xml_writer_wrapper_write_start_element;
     writer_impl->writer.ops->write_start_element_with_namespace =
-        guththila_xml_writer_wrapper_write_start_element_with_namespace;
+            guththila_xml_writer_wrapper_write_start_element_with_namespace;
     writer_impl->writer.ops->write_start_element_with_namespace_prefix =
-        guththila_xml_writer_wrapper_write_start_element_with_namespace_prefix;
-
+            guththila_xml_writer_wrapper_write_start_element_with_namespace_prefix;
+    
     writer_impl->writer.ops->write_empty_element = guththila_xml_writer_wrapper_write_empty_element;
     writer_impl->writer.ops->write_empty_element_with_namespace  =
-        guththila_xml_writer_wrapper_write_empty_element_with_namespace;
+            guththila_xml_writer_wrapper_write_empty_element_with_namespace;
     writer_impl->writer.ops->write_empty_element_with_namespace_prefix =
-        guththila_xml_writer_wrapper_write_empty_element_with_namespace_prefix;
-
+            guththila_xml_writer_wrapper_write_empty_element_with_namespace_prefix;
+    
     writer_impl->writer.ops->write_end_element =
-        guththila_xml_writer_wrapper_write_end_element;
+            guththila_xml_writer_wrapper_write_end_element;
     writer_impl->writer.ops->write_end_document =
-        guththila_xml_writer_wrapper_write_end_document;
-
+            guththila_xml_writer_wrapper_write_end_document;
+    
     writer_impl->writer.ops->write_attribute =
-        guththila_xml_writer_wrapper_write_attribute;
+            guththila_xml_writer_wrapper_write_attribute;
     writer_impl->writer.ops->write_attribute_with_namespace =
-        guththila_xml_writer_wrapper_write_attribute_with_namespace;
+            guththila_xml_writer_wrapper_write_attribute_with_namespace;
     writer_impl->writer.ops->write_attribute_with_namespace_prefix =
-        guththila_xml_writer_wrapper_write_attribute_with_namespace_prefix;
+            guththila_xml_writer_wrapper_write_attribute_with_namespace_prefix;
     writer_impl->writer.ops->write_namespace =
-        guththila_xml_writer_wrapper_write_namespace;
+            guththila_xml_writer_wrapper_write_namespace;
     writer_impl->writer.ops->write_default_namespace =
-        guththila_xml_writer_wrapper_write_default_namespace;
+            guththila_xml_writer_wrapper_write_default_namespace;
     writer_impl->writer.ops->write_comment =
-        guththila_xml_writer_wrapper_write_comment;
+            guththila_xml_writer_wrapper_write_comment;
     writer_impl->writer.ops->write_processing_instruction =
-        guththila_xml_writer_wrapper_write_processing_instruction;
+            guththila_xml_writer_wrapper_write_processing_instruction;
     writer_impl->writer.ops->write_processing_instruction_data =
-        guththila_xml_writer_wrapper_write_processing_instruction_data;
+            guththila_xml_writer_wrapper_write_processing_instruction_data;
     writer_impl->writer.ops->write_cdata =
-        guththila_xml_writer_wrapper_write_cdata;
+            guththila_xml_writer_wrapper_write_cdata;
     writer_impl->writer.ops->write_dtd =
-        guththila_xml_writer_wrapper_write_dtd;
+            guththila_xml_writer_wrapper_write_dtd;
     writer_impl->writer.ops->write_entity_ref =
-        guththila_xml_writer_wrapper_write_entity_ref;
+            guththila_xml_writer_wrapper_write_entity_ref;
     writer_impl->writer.ops->write_start_document =
-        guththila_xml_writer_wrapper_write_start_document;
+            guththila_xml_writer_wrapper_write_start_document;
     writer_impl->writer.ops->write_start_document_with_version =
-        guththila_xml_writer_wrapper_write_start_document_with_version;
+            guththila_xml_writer_wrapper_write_start_document_with_version;
     writer_impl->writer.ops->write_start_document_with_version_encoding =
-        guththila_xml_writer_wrapper_write_start_document_with_version_encoding;
+            guththila_xml_writer_wrapper_write_start_document_with_version_encoding;
     writer_impl->writer.ops->write_characters =
-        guththila_xml_writer_wrapper_write_characters;
+            guththila_xml_writer_wrapper_write_characters;
     writer_impl->writer.ops->get_prefix =
-        guththila_xml_writer_wrapper_get_prefix;
+            guththila_xml_writer_wrapper_get_prefix;
     writer_impl->writer.ops->set_prefix = guththila_xml_writer_wrapper_set_prefix;
     writer_impl->writer.ops->set_default_prefix =
-        guththila_xml_writer_wrapper_set_default_prefix;
+            guththila_xml_writer_wrapper_set_default_prefix;
     writer_impl->writer.ops->write_encoded =
-        guththila_xml_writer_wrapper_write_encoded;
+            guththila_xml_writer_wrapper_write_encoded;
     writer_impl->writer.ops->get_xml =
-        guththila_xml_writer_wrapper_get_xml;
+            guththila_xml_writer_wrapper_get_xml;
 
-    return &(writer_impl->writer);
+   return &(writer_impl->writer);
 
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_free(axiom_xml_writer_t *writer,
-        const axis2_env_t *env)
+                                  const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    if (AXIS2_INTF_TO_IMPL(writer)->parser)
-    {
-        if (AXIS2_INTF_TO_IMPL(writer)->parser->xsw)
-            guththila_xml_writer_free((axis2_env_t *)env,
-                    AXIS2_INTF_TO_IMPL(writer)->parser);
-
-        guththila_free((axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(writer)->parser);
-    }
-
-    if (writer->ops)
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
+    if(AXIS2_INTF_TO_IMPL(writer)->parser)
+      {
+	if (AXIS2_INTF_TO_IMPL(writer)->parser->xsw)
+	  guththila_xml_writer_free((axis2_env_t *)env,
+						   AXIS2_INTF_TO_IMPL(writer)->parser);
+
+	guththila_free ((axis2_env_t *)env, 
+					AXIS2_INTF_TO_IMPL(writer)->parser);
+      }
+            
+    if(writer->ops)
         AXIS2_FREE(env->allocator, writer->ops);
 
     if (writer)
-        AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(writer));
+      AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(writer));
 
     return AXIS2_SUCCESS;
 }
-
-axis2_status_t AXIS2_CALL
+        
+ axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_element(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname)
+                                    axiom_xml_writer_t *writer,
+                                    const axis2_env_t *env,
+                                    axis2_char_t *localname)
 {
     int status = AXIS2_SUCCESS;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
     guththila_write_start_element(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        localname);
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    localname);
     return status;
 }
 
@@ -505,445 +504,445 @@
 /*                     (axis2_env_t *)env, */
 /*                     AXIS2_INTF_TO_IMPL(writer)->guththila_writer); */
 /* } */
-
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_element_with_namespace(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri)
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri)
 {
-    int status = AXIS2_SUCCESS;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+  int status = AXIS2_SUCCESS;
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error,namespace_uri, AXIS2_FAILURE);
     guththila_write_start_element_with_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        localname,
-        namespace_uri);
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    localname,
+                    namespace_uri);
     return status;
 }
-
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_element_with_namespace_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri,
-    axis2_char_t *prefix)
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri,
+                                        axis2_char_t *prefix)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname,  AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, prefix, AXIS2_FAILURE);
-    guththila_write_start_element_with_prefix_and_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        prefix, namespace_uri, localname);
-    return AXIS2_SUCCESS;
-
+ guththila_write_start_element_with_prefix_and_namespace(
+		    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    prefix, namespace_uri, localname);
+ return AXIS2_SUCCESS;
+    
 }
-
-axis2_status_t AXIS2_CALL
+                                    
+ axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_empty_element(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname)
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
-    guththila_write_empty_element(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser, localname);
-    return AXIS2_SUCCESS;
-
-
+     guththila_write_empty_element(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser, localname);
+     return AXIS2_SUCCESS;
+    
+    
 }
-
+        
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_empty_element_with_namespace(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri)
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
-    guththila_write_empty_element_with_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        namespace_uri, localname);
-    return AXIS2_SUCCESS;
+     guththila_write_empty_element_with_namespace(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    namespace_uri, localname);
+     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_empty_element_with_namespace_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *namespace_uri,
-    axis2_char_t *prefix)
+                                        axiom_xml_writer_t *writer,
+                                        const axis2_env_t *env,
+                                        axis2_char_t *localname,
+                                        axis2_char_t *namespace_uri,
+                                        axis2_char_t *prefix)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, prefix, AXIS2_FAILURE);
-
-    guththila_write_empty_element_with_prefix_and_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        prefix, namespace_uri, localname);
+    
+ guththila_write_empty_element_with_prefix_and_namespace(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    prefix, namespace_uri, localname);
     return AXIS2_SUCCESS;
-
-
+    
+    
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_end_element(axiom_xml_writer_t *writer,
-        const axis2_env_t *env)
+                                               const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    guththila_write_end_element(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser);
-    return AXIS2_SUCCESS;
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
+     guththila_write_end_element(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser);
+     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_end_document(axiom_xml_writer_t *writer,
-        const axis2_env_t *env)
+                                               const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     guththila_write_end_document(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser);
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser);
     return AXIS2_SUCCESS;
-
+    
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_attribute(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *localname,
-        axis2_char_t *value)
+                                           const axis2_env_t *env,
+                                           axis2_char_t *localname,
+                                           axis2_char_t *value)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
     guththila_write_attribute(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        localname, value);
-    return AXIS2_SUCCESS;
-
-
-
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    localname, value);
+    return AXIS2_SUCCESS;
+                        
+    
+    
 }
-
+                                               
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_attribute_with_namespace(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *value,
-    axis2_char_t *namespace_uri)
+                                          axiom_xml_writer_t *writer,
+                                          const axis2_env_t *env,
+                                          axis2_char_t *localname,
+                                          axis2_char_t *value,
+                                          axis2_char_t *namespace_uri)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname,  AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
-
-    guththila_write_attribute_with_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        namespace_uri, localname, value);
+    
+     guththila_write_attribute_with_namespace(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    namespace_uri, localname, value);
     return AXIS2_SUCCESS;
 }
-
+                                          
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_attribute_with_namespace_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *localname,
-    axis2_char_t *value,
-    axis2_char_t *namespace_uri,
-    axis2_char_t *prefix)
+                                          axiom_xml_writer_t *writer,
+                                          const axis2_env_t *env,
+                                          axis2_char_t *localname,
+                                          axis2_char_t *value,
+                                          axis2_char_t *namespace_uri,
+                                          axis2_char_t *prefix)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, prefix , AXIS2_FAILURE);
-    guththila_write_attribute_with_prefix_and_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        prefix, namespace_uri, localname, value);
-    return AXIS2_SUCCESS;
-
-
-
+     guththila_write_attribute_with_prefix_and_namespace(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    prefix, namespace_uri, localname, value);
+     return AXIS2_SUCCESS;
+    
+    
+    
 }
-
+                                          
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_namespace(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *prefix,
-        axis2_char_t *namespace_uri)
+                                             const axis2_env_t *env,
+                                             axis2_char_t *prefix,
+                                             axis2_char_t *namespace_uri)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     /*     AXIS2_PARAM_CHECK(env->error, prefix , AXIS2_FAILURE); */
     /* when defult namespace comes prefix is null */
-    guththila_write_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        prefix, namespace_uri);
-    return AXIS2_SUCCESS;
+     guththila_write_namespace(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    prefix, namespace_uri);
+     return AXIS2_SUCCESS;
 
 }
 
 
 axis2_status_t AXIS2_CALL
-guththila_xml_writer_wrapper_write_default_namespace(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *namespace_uri)
+guththila_xml_writer_wrapper_write_default_namespace (axiom_xml_writer_t *writer,
+                                             const axis2_env_t *env,
+                                             axis2_char_t *namespace_uri)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE);
     guththila_write_default_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        namespace_uri);
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    namespace_uri);
     return AXIS2_SUCCESS;
-
+    
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_comment(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *value)
+                                           const axis2_env_t *env,
+                                           axis2_char_t *value)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
-    guththila_write_comment(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        value);
+     guththila_write_comment(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    value);
     return AXIS2_SUCCESS;
-
+    
 }
 
-
+                                           
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_processing_instruction(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *target)
+                                           axiom_xml_writer_t *writer,
+                                           const axis2_env_t *env,
+                                           axis2_char_t *target)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, target, AXIS2_FAILURE);
-    /*     return guththila_write_processing_instruction( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
-    /*                     target); */
-    return AXIS2_SUCCESS;
-
+/*     return guththila_write_processing_instruction( */
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
+/*                     target); */
+    return AXIS2_SUCCESS;    
+    
 }
-
+                                           
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_processing_instruction_data(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *target,
-    axis2_char_t *data)
+                                           axiom_xml_writer_t *writer,
+                                           const axis2_env_t *env,
+                                           axis2_char_t *target,
+                                           axis2_char_t *data)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, target, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, data, AXIS2_FAILURE);
-    /*     return guththila_write_processing_instruction_data( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
-    /*                     target, data); */
-    return AXIS2_SUCCESS;
+/*     return guththila_write_processing_instruction_data( */
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
+/*                     target, data); */
+    return AXIS2_SUCCESS;    
 }
-
+                                           
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_cdata(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *data)
+                                         const axis2_env_t *env,
+                                         axis2_char_t *data)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, data, AXIS2_FAILURE);
-    /*     return guththila_write_cdata( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
-    /*                     data); */
-    return AXIS2_SUCCESS;
+/*     return guththila_write_cdata( */
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
+/*                     data); */
+    return AXIS2_SUCCESS;                        
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_dtd(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *dtd)
+                                         const axis2_env_t *env,
+                                         axis2_char_t *dtd)
 {
     /* AXIS2_ENV_CHECK( env, AXIS2_FAILURE); */
-    /*     AXIS2_PARAM_CHECK(env->error, dtd, AXIS2_FAILURE); */
-    /*     return guththila_write_dtd( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
-    /*                     dtd); */
-    return 0;
+/*     AXIS2_PARAM_CHECK(env->error, dtd, AXIS2_FAILURE); */
+/*     return guththila_write_dtd( */
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
+/*                     dtd); */
+  return 0;
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_entity_ref(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *name)
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *name)
 {
     /* AXIS2_ENV_CHECK( env, AXIS2_FAILURE); */
-    /*     AXIS2_PARAM_CHECK(env->error, name, AXIS2_FAILURE); */
-    /*     return guththila_write_entity_ref( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
-    /*                     name); */
-    return 0;
-
+/*     AXIS2_PARAM_CHECK(env->error, name, AXIS2_FAILURE); */
+/*     return guththila_write_entity_ref( */
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
+/*                     name); */
+  return 0;
+    
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_document(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env)
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    guththila_write_start_document(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser);
-    return AXIS2_SUCCESS;
+     AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
+      guththila_write_start_document(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser);
+      return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_document_with_version(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *version)
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *version)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, version, AXIS2_FAILURE);
     /* return guththila_write_start_document_with_version( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
-    /*                     version); */
-    guththila_write_start_document(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser);
-    return AXIS2_SUCCESS;
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
+/*                     version); */
+      guththila_write_start_document(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser);
+      return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_start_document_with_version_encoding(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *encoding,
-    axis2_char_t *version)
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *encoding,
+                                         axis2_char_t *version)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, encoding, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, version, AXIS2_FAILURE);
-
-    /*     return guththila_write_start_document_with_version_encoding( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
-    /*                     encoding, version); */
-    guththila_write_start_document(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser);
-    return AXIS2_SUCCESS;
+    
+/*     return guththila_write_start_document_with_version_encoding( */
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, */
+/*                     encoding, version); */
+      guththila_write_start_document(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser);
+      return AXIS2_SUCCESS;
 }
 
-
+                                         
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_characters(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *text)
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *text)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, text, AXIS2_FAILURE);
-    guththila_write_characters(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser,
-        text);
+     guththila_write_characters(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser,
+                    text);
     return AXIS2_SUCCESS;
 }
 
 axis2_char_t* AXIS2_CALL
-guththila_xml_writer_wrapper_get_prefix(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *uri)
+guththila_xml_writer_wrapper_get_prefix(  axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *uri)
 {
-    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_ENV_CHECK( env, NULL);
     AXIS2_PARAM_CHECK(env->error, uri, NULL);
-    return guththila_get_prefix_for_namespace(
-                (axis2_env_t *)env,
-                AXIS2_INTF_TO_IMPL(writer)->parser, uri);
+   return guththila_get_prefix_for_namespace(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser, uri);
 }
 
 axis2_status_t AXIS2_CALL
-guththila_xml_writer_wrapper_set_prefix(axiom_xml_writer_t *writer,
-        const axis2_env_t *env,
-        axis2_char_t *prefix,
-        axis2_char_t *uri)
+guththila_xml_writer_wrapper_set_prefix( axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *prefix,
+                                         axis2_char_t *uri)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, prefix, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
-    guththila_write_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser, prefix, uri);
+ guththila_write_namespace (
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser, prefix, uri);
     return AXIS2_SUCCESS;
-
+    
 }
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_set_default_prefix(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *uri)
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *uri)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
-    guththila_write_default_namespace(
-        (axis2_env_t *)env,
-        AXIS2_INTF_TO_IMPL(writer)->parser, uri);
-    return AXIS2_SUCCESS;
+ guththila_write_default_namespace(
+                    (axis2_env_t *)env,
+                    AXIS2_INTF_TO_IMPL(writer)->parser, uri);
+ return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_encoded(
-    axiom_xml_writer_t *writer,
-    const axis2_env_t *env,
-    axis2_char_t *text,
-    int in_attr)
+                                         axiom_xml_writer_t *writer,
+                                         const axis2_env_t *env,
+                                         axis2_char_t *text,
+                                         int in_attr)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, text, AXIS2_FAILURE);
-    /*     return guththila_write_encoded( */
-    /*                     (axis2_env_t *)env, */
-    /*                     AXIS2_INTF_TO_IMPL(writer)->parser, text,
-    		       in_attr); */
+/*     return guththila_write_encoded( */
+/*                     (axis2_env_t *)env, */
+/*                     AXIS2_INTF_TO_IMPL(writer)->parser, text,
+		       in_attr); */
     return AXIS2_SUCCESS;
 }
 
 void* AXIS2_CALL
 guththila_xml_writer_wrapper_get_xml(axiom_xml_writer_t *writer,
-        const axis2_env_t *env)
+                                     const axis2_env_t *env)
 {
-    char *buffer = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    buffer = guththila_get_memory_buffer((axis2_env_t *)env,
-            AXIS2_INTF_TO_IMPL(writer)->parser);
-    return (void*)buffer ;
+  char *buffer = NULL;
+  AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
+  buffer = guththila_get_memory_buffer((axis2_env_t *)env,
+						       AXIS2_INTF_TO_IMPL(writer)->parser);
+  return (void*)buffer ;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message