You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2005/10/24 03:32:09 UTC

svn commit: r327905 [1/3] - in /webservices/axis2/trunk/c: include/ modules/xml/om/src/ xdocs/api/

Author: samisa
Date: Sun Oct 23 18:31:44 2005
New Revision: 327905

URL: http://svn.apache.org/viewcvs?rev=327905&view=rev
Log:
Updates related to doc comments and formatting applied

Modified:
    webservices/axis2/trunk/c/include/axis2_om_attribute.h
    webservices/axis2/trunk/c/include/axis2_om_comment.h
    webservices/axis2/trunk/c/include/axis2_om_doctype.h
    webservices/axis2/trunk/c/include/axis2_om_document.h
    webservices/axis2/trunk/c/include/axis2_om_element.h
    webservices/axis2/trunk/c/include/axis2_om_namespace.h
    webservices/axis2/trunk/c/include/axis2_om_node.h
    webservices/axis2/trunk/c/include/axis2_om_output.h
    webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h
    webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
    webservices/axis2/trunk/c/include/axis2_om_text.h
    webservices/axis2/trunk/c/include/axis2_qname.h
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_document.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_namespace.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_node.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_output.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_processing_instruction.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_text.c
    webservices/axis2/trunk/c/modules/xml/om/src/axis2_qname.c
    webservices/axis2/trunk/c/xdocs/api/doxygenconf

Modified: webservices/axis2/trunk/c/include/axis2_om_attribute.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_attribute.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_attribute.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_attribute.h Sun Oct 23 18:31:44 2005
@@ -31,59 +31,56 @@
 {
 #endif
 
+    struct axis2_om_attribute;
+    struct axis2_om_attribute_ops;
+
 /**
- * @defgroup axis2_om_text OM Text
+ * @defgroup axis2_om_attribute OM Attribute
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-
-    struct axis2_om_attribute;
-    struct axis2_om_attribute_ops;
-/** @endcond */
-
-
-/**  \struct axis2_om_attribute
+/**
  *   \brief OM attribute operations struct
- *
- *   Encapsulator struct for axis2_om_attribute_t
+ *   Encapsulator struct for axis2_om_attribute
  */
     typedef struct axis2_om_attribute_ops
     {
-   /**
-    *  Free an axis2_om_attribute struct
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
-    *  @return Status code
-    */
+      /**
+        * Free an axis2_om_attribute struct
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+        * @param om_attribute pointer to attribute struct to be freed
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
+        */
 
-        axis2_status_t (*axis2_om_attribute_ops_free) (axis2_environment_t *
+        AXIS2_DECLARE_DATA axis2_status_t (AXIS2_CALL *axis2_om_attribute_ops_free) (axis2_environment_t *
                                                        environment,
                                                        struct
                                                        axis2_om_attribute *
                                                        om_attribute);
 
-   /** 
-    *  Creates and returns a qname struct for this attribute
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
-    *  @param om_attribute
-    *  @return returns null on error 
-    */
+      /** 
+        * Creates and returns a qname struct for this attribute
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+        * @param om_attribute pointer to attribute struct for which the qname is to be returned
+        * @return returns qname for given attribute. NULL on error 
+        */
 
-        axis2_qname_t
-            *(*axis2_om_attribute_ops_get_qname) (axis2_environment_t *
+        AXIS2_DECLARE_DATA axis2_qname_t
+            *(AXIS2_CALL *axis2_om_attribute_ops_get_qname) (axis2_environment_t *
                                                   environment,
                                                   struct axis2_om_attribute *
                                                   om_attribute);
 
-   /**
-    * Serialize operation
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
-    * @param om_output OM output handler to be used in serializing
-    * @return Status code
-    */
+      /**
+        * Serialize operation
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+        * @param om_attribute pointer to attribute struct to be serialized
+        * @param om_output OM output handler to be used in serializing
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
+        */
 
-        int (*axis2_om_attribute_ops_serialize) (axis2_environment_t *
+        AXIS2_DECLARE_DATA int (AXIS2_CALL *axis2_om_attribute_ops_serialize) (axis2_environment_t *
                                                  environment,
                                                  struct axis2_om_attribute *
                                                  om_attribute,
@@ -92,35 +89,31 @@
 
     } axis2_om_attribute_ops_t;
 
-/** \struct axis2_om_attribute
- *   \brief OM attribute struct
- *
- *   Handles the XML attribute in OM
- */
-
+  /**
+    * \brief OM attribute struct
+    * Handles the XML attribute in OM
+    */
     typedef struct axis2_om_attribute
     {
-    /** operations of attributes */
+        /** operations of attribute struct */
         axis2_om_attribute_ops_t *ops;
-
-    /** localname of this attribute  */
+        /** localname of this attribute  */
         axis2_char_t *localname;
-    /** value of this attribute */
+        /** value of this attribute */
         axis2_char_t *value;
-    /** attribute namespace */
+        /** attribute namespace */
         axis2_om_namespace_t *ns;
     } axis2_om_attribute_t;
 
-/**
- * creates an om_attribute structure 
- * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
- * @param localname The local part of the attribute name
- * @param value normalized attribute value
- * @param ns The namespace name, if any, of the attribute 
- * @return The a pointer to newly created attribute struct 
- */
-
-    axis2_om_attribute_t *axis2_om_attribute_create (axis2_environment_t *
+  /**
+    * creates an om_attribute structure 
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param localname The local part of the attribute name. Mandatory, cannot be NULL
+    * @param value normalized attribute value. Mandatory, cannot be NULL
+    * @param ns namespace, if any, of the attribute. Optional, can be NULL
+    * @return a pointer to newly created attribute struct 
+    */
+    AXIS2_DECLARE(axis2_om_attribute_t *) axis2_om_attribute_create (axis2_environment_t *
                                                      environment,
                                                      const axis2_char_t *
                                                      localname,
@@ -130,8 +123,11 @@
                                                      ns);
 
 /* macros */
+/** free given attribute */
 #define axis2_om_attribute_free(environment, om_attribute) ((om_attribute)->ops->axis2_om_attribute_ops_free(environment, om_attribute))
+/** get qname of given attribute */
 #define axis2_om_attribute_get_qname(environment, om_attribute) ((om_attribute)->ops->axis2_om_attribute_ops_get_qname(environment, om_attribute))
+/** serialize given attribute */
 #define axis2_om_attribute_serialize(environment, om_attribute,om_ouput) ((om_attribute)->ops->axis2_om_attribute_ops_serialize(environment, om_attribute,om_output))
 
 /** @} */

Modified: webservices/axis2/trunk/c/include/axis2_om_comment.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_comment.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_comment.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_comment.h Sun Oct 23 18:31:44 2005
@@ -29,67 +29,65 @@
 {
 #endif
 
+    struct axis2_om_comment;
+    struct axis2_om_comment_ops;
+
 /**
- * @defgroup axis2_om_comment OM comment
+ * @defgroup axis2_om_comment OM Comment
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-    struct axis2_om_comment;
-    struct axis2_om_comment_ops;
-/** @endcond */
-
-/** @struct axis2_om_comment_ops
- *   @brief OM comment operations struct
- *   Encapsulator struct for operations of axis2_om_comment_t
- */
 
+  /** 
+    *   @brief OM comment operations struct
+    *   Encapsulator struct for operations of axis2_om_comment_t
+    */
     typedef struct axis2_om_comment_ops
     {
-  /**
-    * Free a axis2_comment struct
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
-    * @param comment pointer to the axis2_commnet 
-    * @returns status code
-    */
-        axis2_status_t (*axis2_om_comment_ops_free) (axis2_environment_t *
+      /**
+        * Free a axis2_comment struct
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+        * @param comment pointer to axis2_commnet struct to be freed
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
+        */
+        AXIS2_DECLARE_DATA axis2_status_t (AXIS2_CALL *axis2_om_comment_ops_free) (axis2_environment_t *
                                                      environment,
                                                      struct axis2_om_comment *
                                                      comment);
 
     } axis2_om_comment_ops_t;
 
-/** \struct axis2_om_comment
-    \brief OM comment struct
-
-    Handles the XML comment in OM
-*/
+  /** 
+    * \brief OM comment struct
+    * Handles the XML comment in OM
+    */
     typedef struct axis2_om_comment
     {
-    /** operations struct */
+        /** operations struct */
         axis2_om_comment_ops_t *ops;
-    /** value */
-        char *value;
+        /** comment text */
+        axis2_char_t *value;
     } axis2_om_comment_t;
 
-/**
- * Create a comment struct and stores in in a node struct and returns a pointer
- * to the axis2_om_comment_t struct
- * the data_element field of node struct points to the acctual axis2_comment struct
- * The element type of axis2_om_node_t struct will be of type AXIS2_OM_COMMENT
- * @param value value of the comment
- * @param comment_node This is an out parameter, stores the acctual om_comment in
- *        this node struct pointer
- * @return pointer to a node_t struct containing the comment struct
- */
-    axis2_om_comment_t *axis2_om_comment_create (axis2_environment_t *
+  /**
+    * Creates a comment struct
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param value comment text
+    * @param comment_node This is an out parameter. Mandatory, cannot be NULL.
+    *                       Returns the node corresponding to the comment created.
+    *                       Node type will be set to AXIS2_OM_COMMENT
+    * @return a pointer to the newly created comment struct
+    */
+    AXIS2_DECLARE(axis2_om_comment_t *) axis2_om_comment_create (axis2_environment_t *
                                                  environment,
                                                  const axis2_char_t * value,
                                                  axis2_om_node_t **
                                                  comment_node);
 
+/** free given comment */
 #define axis2_om_comment_free(environment, comment) ((comment)->ops->axis2_om_comment_ops_free(environment, comment))
+
 /** @} */
 
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/include/axis2_om_doctype.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_doctype.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_doctype.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_doctype.h Sun Oct 23 18:31:44 2005
@@ -29,66 +29,66 @@
 {
 #endif
 
+    struct axis2_om_doctype;
+    struct axis2_om_doctype_ops;
+
 /**
- * @defgroup axis2_om_text OM Text
+ * @defgroup axis2_om_doctype OM Doctype
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-    struct axis2_om_doctype;
-    struct axis2_om_doctype_ops;
-/** @endcond */
-
-/** @struct axis2_om_doctype_ops
-    @brief OM doctype operations struct
-
-    Encapsulator struct for operations of axis2_om_doctype_t
-*/
+  /**
+    * \brief OM doctype operations struct
+    * Encapsulator struct for operations of axis2_om_doctype
+    */
     typedef struct axis2_om_doctype_ops
     {
-    /**
-	 *	free the axis2_om_doctype_t struct
-	 * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
-	 * @param om_doc pointer to axis2_om_doctype_t struct
-	 * @returns status code
-	 */
-        axis2_status_t (*axis2_om_doctype_ops_free) (axis2_environment_t *
+      /**
+        * free doctype struct
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+        * @param om_doctype pointer to doctype struct to be freed
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
+        */
+        AXIS2_DECLARE_DATA axis2_status_t (AXIS2_CALL *axis2_om_doctype_ops_free) (axis2_environment_t *
                                                      environment,
                                                      struct axis2_om_doctype *
                                                      om_doctype);
     } axis2_om_doctype_ops_t;
 
-/** \struct axis2_om_doctype
-    \brief OM doctype struct
-
-    Handles the XML document type in OM
-*/
+  /**
+    * \brief OM doctype struct
+    * Handles XML document type in OM
+    */
     typedef struct axis2_om_doctype
     {
+        /** Doctype related operations */
         axis2_om_doctype_ops_t *ops;
-        char *value;
+        /** Doctype value */
+        axis2_char_t *value;
     } axis2_om_doctype_t;
 
-/**
- * Create a doctype struct and stores in in a node struct and returns a pointer
- * to the axis2_axis2_om_doctype_t struct
- * the data_element field of node struct points to the acctual axis2_doctype_t struct
- * The element type of axis2_om_node_t struct will be of type AXIS2_OM_DOCTYPE
- * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
- * @param node This is an outparameter
- * @return pointer to a axis2_om_node_t struct containing the doctype struct
- */
-
-    axis2_om_doctype_t *axis2_om_doctype_create (axis2_environment_t *
+  /**
+    * Creates a doctype struct
+    * @param environment Environment. MUST  NOT be NULL, if NULL behaviour is undefined.
+    * @param parent parent of the new node. Optinal, can be NULL. 
+    * @param value doctype value 
+    * @param node This is an out parameter. Mandatory, cannot be NULL.
+    *                       Returns the node corresponding to the doctype created.
+    *                       Node type will be set to AXIS2_OM_DOCTYPE
+    * @return pointer to newly created doctype struct 
+    */
+    AXIS2_DECLARE(axis2_om_doctype_t *) axis2_om_doctype_create (axis2_environment_t *
                                                  environment,
                                                  axis2_om_node_t * parent,
                                                  const axis2_char_t * value,
                                                  axis2_om_node_t ** node);
 
+/** free given doctype */    
 #define axis2_om_doctype_free(environment, doctype) ((doctype)->ops->axis2_om_doctype_ops_free(environment, doctype))
 
 /** @} */
+    
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/include/axis2_om_document.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_document.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_document.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_document.h Sun Oct 23 18:31:44 2005
@@ -21,131 +21,190 @@
 #include <axis2_om_node.h>
 #include <axis2_defines.h>
 
-/*typedef struct axis2_om_stax_builder_t axis2_om_stax_builder_t;*/
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 
 /**
- * @file axis2_om_node.h
- * @brief om_document represents a xml document
- *	
+ * @file axis2_om_document.h
+ * @brief om_document represents an XML document
  */
 
-typedef struct axis2_om_stax_builder axis2_om_stax_builder_t;
-
 #define CHAR_SET_ENCODING "UTF-8"
 #define XML_VERSION	"1.0"
 
-/** @cond */
-struct axis2_om_document;
-struct axis2_om_document_ops;
-/** @endcond */
-
-/** @struct axis2_om_document_ops
-    @brief OM document operations struct
-
-    Encapsulator struct for operations of axis2_om_document_t
-*/
-typedef struct axis2_om_document_ops
-{
+    struct axis2_om_document;
+    struct axis2_om_document_ops;
+    struct axis2_om_stax_builder;
+
+/**
+ * @defgroup axis2_om_document OM Document
+ * @ingroup axis2_om 
+ * @{
+ */
+
+  /** 
+    * @brief OM document operations struct
+    * Encapsulator struct for operations of axis2_om_document_t
+    */
+    typedef struct axis2_om_document_ops
+    {
 
-    /** 
-     *  Free axis2_om_document_t struct
-     *	@param document 
-     */
-    axis2_status_t (*axis2_om_document_ops_free) (axis2_environment_t *
+      /** 
+        * Frees document struct
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.        
+        * @param document pointer to document struct to be freed
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
+        */
+        AXIS2_DECLARE_DATA axis2_status_t (AXIS2_CALL *axis2_om_document_ops_free) (axis2_environment_t *
+                                                      environment,
+                                                      struct axis2_om_document
+                                                      * document);
+
+      /**
+        * Builds the next node if the builder is not finished with input xml stream
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.        
+        * @param document document whose next node is to be built. Mandatory, cannot be NULL
+        * @return pointer to the next node. NULL on error.
+        */
+        AXIS2_DECLARE_DATA axis2_om_node_t
+            *(AXIS2_CALL *axis2_om_document_ops_build_next) (axis2_environment_t *
                                                   environment,
                                                   struct axis2_om_document *
                                                   document);
 
-    /**
-     *	causes the parser to proceed if the xml input is not finised yet
-     *	@param document 
-     */
-    axis2_om_node_t *(*axis2_om_document_ops_build_next) (axis2_environment_t
-                                                          * environment,
-                                                          struct
-                                                          axis2_om_document *
-                                                          document);
-
-    /**
-     *	adds the child node as a child to the back of the list
-     */
-      axis2_status_t (*axis2_om_document_ops_add_child) (axis2_environment_t *
+      /**
+        * adds the child node to the document. To the back of the children list.
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.        
+        * @param document document to add the child. Mandatory, cannot be NULL.
+        * @param child child node to be added. Mandatory, cannot be NULL.
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
+        */
+        AXIS2_DECLARE_DATA axis2_status_t (AXIS2_CALL *axis2_om_document_ops_add_child)
+            (axis2_environment_t * environment,
+             struct axis2_om_document * document, axis2_om_node_t * child);
+
+      /**
+        * Gets the root element of the document.
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.        
+        * @param document document to return the root of
+        * @return returns a pointer to the root node. If no root present, this method tries to 
+        *             build the root. Returns NULL on error. 
+        */
+        AXIS2_DECLARE_DATA axis2_om_node_t
+            * (AXIS2_CALL *axis2_om_document_ops_get_root_element) (axis2_environment_t *
                                                          environment,
                                                          struct
                                                          axis2_om_document *
-                                                         document,
-                                                         axis2_om_node_t *
-                                                         child);
-
-    /**
-     *	This cause the parser to proceed 	
-     *	@param document
-     *	@ returns The first 
-     */
-    axis2_om_node_t
-        *(*axis2_om_document_ops_get_root_element) (axis2_environment_t *
-                                                    environment,
-                                                    struct axis2_om_document *
-                                                    document);
-
-    axis2_om_node_t
-        *(*axis2_om_document_ops_get_next_sibling) (axis2_environment_t *
-                                                    environment,
-                                                    struct axis2_om_document *
-                                                    document);
-
-
-    axis2_om_node_t
-        *(*axis2_om_document_ops_get_first_child) (axis2_environment_t *
-                                                   environment,
-                                                   struct axis2_om_document *
-                                                   document);
+                                                         document);
 
-    axis2_om_node_t
-        *(*axis2_om_document_ops_get_next_child) (axis2_environment_t *
-                                                  environment,
-                                                  struct axis2_om_document *
-                                                  document);
-} axis2_om_document_ops_t;
-
-
-typedef struct axis2_om_document
-{
-    axis2_om_document_ops_t *ops;
-    axis2_om_node_t *root_element;
-    axis2_om_node_t *last_child;
-    axis2_om_node_t *first_child;
-    axis2_bool_t done;
-    axis2_om_stax_builder_t *builder;
-    axis2_char_t *char_set_encoding;
-    axis2_char_t *xml_version;
-
-} axis2_om_document_t;
+      /**
+        * Gets the next sibling of the current element of document's builder
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.        
+        * @param document document to be used
+        * @return returns a pointer to the next sibling. Tries to build the document
+        *           till the next sibling is found. Returns NULL if no sibling is present.
+        *           On error, returns NULL and set the error. 
+        */
+        AXIS2_DECLARE_DATA axis2_om_node_t
+            * (AXIS2_CALL *axis2_om_document_ops_get_next_sibling) (axis2_environment_t *
+                                                         environment,
+                                                         struct
+                                                         axis2_om_document *
+                                                         document);
 
-/**
-    *	creates and returns axis2_om_document returns null if there isn't enough memory
-    *  @param root pointer to document's root node IF NUll is parsed a document root
-    *         will be set to NULL
-    *  @param builder pointer to xml builder 
+      /**
+        * Gets the first child of the document's root node. get_root_element must have been 
+        *       caled before this method is called.
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.        
+        * @param document document to be used
+        * @return returns a pointer to the first child. Tries to build the document
+        *           till the first child is found. Returns NULL if no child is present.
+        *           On error, returns NULL and sets the error. 
+        */
+        AXIS2_DECLARE_DATA axis2_om_node_t
+            * (AXIS2_CALL *axis2_om_document_ops_get_first_child) (axis2_environment_t *
+                                                        environment,
+                                                        struct
+                                                        axis2_om_document *
+                                                        document);
+
+      /**
+        * Gets the next child of the document's current node. get_first_child must have been 
+        *       caled before this method is called.
+        * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.        
+        * @param document document to be used
+        * @return returns a pointer to the next child. Tries to build the document
+        *           till the next child is found. Returns NULL if no child is present.
+        *           On error, returns NULL and sets the error. 
+        */
+        AXIS2_DECLARE_DATA axis2_om_node_t
+            * (AXIS2_CALL *axis2_om_document_ops_get_next_child) (axis2_environment_t *
+                                                       environment,
+                                                       struct
+                                                       axis2_om_document *
+                                                       document);
+    } axis2_om_document_ops_t;
+
+  /**
+    * \brief OM document struct
+    * Handles the XML document in OM
+    */
+    typedef struct axis2_om_document
+    {
+        /** operations of document struct */
+        axis2_om_document_ops_t *ops;
+        /** root element */
+        axis2_om_node_t *root_element;
+        /** last child */
+        axis2_om_node_t *last_child;
+        /** first child */
+        axis2_om_node_t *first_child;
+        /** done building the document */
+        axis2_bool_t done;
+        /** builder of the document */
+        struct axis2_om_stax_builder *builder;
+        /** char set encoding */        
+        axis2_char_t *char_set_encoding;
+        /** XML version */
+        axis2_char_t *xml_version;
+    } axis2_om_document_t;
+
+  /**
+    * creates a document
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param root pointer to document's root node. Optional, can be NULL
+    * @param builder pointer to xml builder 
+    * @return pointer to the newly created document.
     */
-axis2_om_document_t *axis2_om_document_ops_create (axis2_environment_t *
-                                                   environment,
-                                                   axis2_om_node_t * root,
-                                                   axis2_om_stax_builder_t *
-                                                   builder);
+    AXIS2_DECLARE(axis2_om_document_t *) axis2_om_document_ops_create (axis2_environment_t *
+                                                       environment,
+                                                       axis2_om_node_t * root,
+                                                       struct
+                                                       axis2_om_stax_builder
+                                                       *builder);
 
+/** frees given document */
 #define axis2_om_document_free(environment, document) ((document)->ops->axis2_om_document_ops_free(environment, document))
+/** adds a child to document */
 #define axis2_om_document_add_child(environment, document, child) ((document)->ops->axis2_om_document_ops_add_child(environment, document, child))
+/** builds next node of document */
 #define axis2_om_document_build_next(environment, document) ((document)->ops->axis2_om_document_ops_build_next(environment, document))
+/** gets the root eleemnt of given document */
 #define axis2_om_document_get_root_element(environment, document) ((document)->ops->axis2_om_document_ops_get_root_element(environment, document))
+/** gets the next sibling of given document's current node */
 #define axis2_om_document_get_next_sibling(environment, document) ((document)->ops->axis2_om_document_ops_get_next_sibling(environment, document))
+/** gets the first child of given document's root node */
 #define axis2_om_document_get_first_child(environment, document) ((document)->ops->axis2_om_document_ops_get_first_child(environment, document))
+/** gets the next child of given document's current node */
 #define axis2_om_document_get_next_child(environment, document) ((document)->ops->axis2_om_document_ops_get_next_child(environment, document))
 
-/*	to implement
- *	get first child with qname
- *	get children iterator
- *	get children with name
- */
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
 
-#endif /* AXIS2_OM_DOCUMENT_H */
+#endif                          /* AXIS2_OM_DOCUMENT_H */

Modified: webservices/axis2/trunk/c/include/axis2_om_element.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_element.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_element.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_element.h Sun Oct 23 18:31:44 2005
@@ -28,22 +28,19 @@
 {
 #endif
 
+    struct axis2_om_element;
+    struct axis2_om_element_ops;
+
 /**
- * @defgroup axis2_om_element OM element
+ * @defgroup axis2_om_element OM Element
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-
-    struct axis2_om_element;
-    struct axis2_om_element_ops;
-/** @endcond */
 
-/** @struct axis2_om_element_ops
-    @brief OM element operations struct
-
-    Encapsulator struct for operations of axis2_om_element_t
+/** 
+  * @brief OM element operations struct
+  * Encapsulator struct for operations of axis2_om_element_t
 */
 
 
@@ -168,7 +165,7 @@
 
     } axis2_om_element_ops_t;
 
-/** \struct axis2_om_element
+/**
     \brief OM element struct
 
     Handles the XML element in OM

Modified: webservices/axis2/trunk/c/include/axis2_om_namespace.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_namespace.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_namespace.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_namespace.h Sun Oct 23 18:31:44 2005
@@ -31,18 +31,17 @@
 {
 #endif
 
+    struct axis2_om_namespace;
+    struct axis2_om_namespace_ops;
+    
 /**
- * @defgroup axis2_om_text OM Text
+ * @defgroup axis2_om_namespace OM Namespace
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-    struct axis2_om_namespace;
-    struct axis2_om_namespace_ops;
-/** @endcond */
 
-/** \struct axis2_om_namespace_ops_t
+/** 
     \brief OM Namespace operations struct
 
     Encapsulator struct for operations of axis2_om_namespace_t
@@ -89,7 +88,7 @@
 
     } axis2_om_namespace_ops_t;
 
-/** \struct axis2_om_namespace_t
+/** 
     \brief OM namespace struct
 
     Handles the XML namespace in OM

Modified: webservices/axis2/trunk/c/include/axis2_om_node.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_node.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_node.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_node.h Sun Oct 23 18:31:44 2005
@@ -17,9 +17,16 @@
 #ifndef AXIS2_OM_NODE_H
 #define AXIS2_OM_NODE_H
 
+/** @defgroup axis2_om AXIOM (Axis Object Model)
+  * @ingroup axis2
+  * @{
+  */
+
+/** @} */
+
 /**
  * @file axis2_om_node.h
- * @brief defines axis2_om_node_t struct and its operations
+ * @brief defines axis2_om_node struct and its operations
  */
 #include <axis2_environment.h>
 
@@ -28,23 +35,19 @@
 {
 #endif
 
+    struct axis2_om_node;
+    struct axis2_om_node_ops;
+    struct axis2_om_output;
+
 /**
  * @defgroup axis2_om_node  OM Node
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-    struct axis2_om_node;
-    struct axis2_om_node_ops;
-    typedef struct axis2_om_output axis2_om_output_t;
-/** @endcond */
-
 /** 
  *   Types used in OM 
  */
-
-
     typedef enum axis2_om_types_t
     {
         AXIS2_OM_INVALID = 0,
@@ -59,17 +62,16 @@
     } axis2_om_types_t;
 
 
-/** @struct axis2_om_node_ops
-    @brief OM Node operations struct
-
-    Encapsulator struct for operations of axis2_om_node_t
-*/
+  /** 
+    * @brief OM Node operations struct
+    * Encapsulator struct for operations of axis2_om_node_t
+    */
 
     typedef struct axis2_om_node_ops
     {
    /**
     * Free an om node and its all children
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
     * @return status code
     */
         axis2_status_t (*axis2_om_node_ops_free) (axis2_environment_t *
@@ -78,7 +80,7 @@
                                                   om_node);
    /**
     *   Add child node as child to parent
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
     * @param parent
     * @param child  
     * @return status code   
@@ -92,7 +94,7 @@
 
     /**
      *  detach this node from the node and reset the links
-     * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+     * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
      *  @return a pointer to detached node 
      */
         struct axis2_om_node *(*axis2_om_node_ops_detach) (axis2_environment_t
@@ -103,7 +105,7 @@
 
    /**
     *  Inserts a sibling node after the current node
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
     *  @param current_node  
     *  @param node_to_insert the node that will be inserted 
     *  @return return status code 
@@ -115,7 +117,7 @@
 
    /**
     * Inserts a sibling node after the current node
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
     *  @param current_node   
     *  @param node_to_insert the node that will be inserted 
     *  @return status code
@@ -128,7 +130,7 @@
 
    /**
     * set a parent node to a given node
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
     * @param child_node  
     * @param parent the node that will be set as parent
     * @return status code
@@ -143,7 +145,7 @@
 
    /** get the first child of a node
     *  returns the first child node of this node
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
     * @param 
     *  @return returns a pointer to first child if there is no child returns null
     */
@@ -155,7 +157,7 @@
    /**
     * get the next child of this node
     * This function should only be called after a call to get_first_child function
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
     *  @param parent_node
     *  @return pointer to next child , if there isn't next child returns null
     */
@@ -166,8 +168,7 @@
                                                   parent_node);
 
    /**
-    *   serialize operation of node
-    * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+    * serialize operation of node
     * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.    
     *    @returns status code
     */
@@ -176,7 +177,7 @@
                                                          environment,
                                                          struct axis2_om_node
                                                          * om_node,
-                                                         axis2_om_output_t *
+                                                         struct axis2_om_output *
                                                          om_output);
 
 

Modified: webservices/axis2/trunk/c/include/axis2_om_output.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_output.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_output.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_output.h Sun Oct 23 18:31:44 2005
@@ -32,7 +32,7 @@
 #endif
 
 /**
- * @defgroup axis2_om_output OM_output
+ * @defgroup axis2_om_output OM Output
  * @ingroup axis2_om 
  * @{
  */
@@ -40,13 +40,13 @@
     static const char *DEFAULT_CHAR_SET_ENCODING = "utf-8";
 
 
-/** \struct axis2_om_output
+/** 
     \brief OM Output struct
 
     The XML writer interface struct of om
 */
 
-    struct axis2_om_output
+    typedef struct axis2_om_output
     {
         /* The xml writer */
         void *xml_writer;
@@ -61,7 +61,7 @@
         axis2_char_t *xml_version;
 
         axis2_bool_t ignore_xml_declaration;
-    };
+    } axis2_om_output_t;
 /**
  * creates output struct and returns a pointer to newly created struct
  * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.

Modified: webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h Sun Oct 23 18:31:44 2005
@@ -29,18 +29,18 @@
 {
 #endif
 
+    struct axis2_om_processing_instruction;
+    struct axis2_om_processing_instruction_ops;
+    
+    
 /**
- * @defgroup axis2_om_text OM Text
+ * @defgroup axis2_om_processing_instruction OM Processing Instruction
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-    struct axis2_om_processing_instruction;
-    struct axis2_om_processing_instruction_ops;
-/** @endcond */
 
-/** @struct axis2_om_processing_instruction_ops
+/** 
     @brief OM text operations struct
 
     Encapsulator struct for operations of axis2_om_processing_instruction
@@ -58,7 +58,7 @@
              struct axis2_om_processing_instruction * om_pi);
     } axis2_om_processing_instruction_ops_t;
 
-/** \struct axis2_om_processing_instruction
+/** 
     \brief OM processing_instruction
 
     Handles the XML processing instructions in OM

Modified: webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_stax_builder.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_stax_builder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_stax_builder.h Sun Oct 23 18:31:44 2005
@@ -38,17 +38,17 @@
 
     axis2_om_node_t *(*axis2_om_stax_builder_ops_next) (axis2_environment_t *
                                                         environment,
-                                                        axis2_om_stax_builder_t
+                                                        struct axis2_om_stax_builder
                                                         * builder);
 
       axis2_status_t (*axis2_om_stax_builder_ops_discard_current_element)
         (axis2_environment_t * environment,
-         axis2_om_stax_builder_t * builder);
+         struct axis2_om_stax_builder * builder);
 
 
 } axis2_om_stax_builder_ops_t;
 
-struct axis2_om_stax_builder
+typedef struct axis2_om_stax_builder
 {
     axis2_om_stax_builder_ops_t *ops;
     void *parser;
@@ -57,7 +57,7 @@
     axis2_bool_t done;
     axis2_bool_t parser_accessed;
     axis2_bool_t cache;
-};
+} axis2_om_stax_builder_t;
 
 /**
  *	create an stax_om_builder

Modified: webservices/axis2/trunk/c/include/axis2_om_text.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_text.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_text.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_text.h Sun Oct 23 18:31:44 2005
@@ -14,12 +14,6 @@
  * limitations under the License.
  */
 
-/** @defgroup axis2_om AXIOM (Axis Object Model)
-  * @ingroup axis2
-  * @{
-  */
-
-/** @} */
 #ifndef AXIS2_OM_TEXT_H
 #define AXIS2_OM_TEXT_H
 
@@ -30,45 +24,47 @@
 
 #include <axis2_environment.h>
 #include <axis2_om_node.h>
+#include <axis2_om_output.h>
 
 #ifdef __cplusplus
 extern "C"
 {
 #endif
 
+    struct axis2_om_text;
+    struct axis2_om_text_ops;
+
 /**
  * @defgroup axis2_om_text OM Text
  * @ingroup axis2_om 
  * @{
  */
 
-/** @cond */
-    struct axis2_om_text;
-    struct axis2_om_text_ops;
-/** @endcond */
-
-/** @struct axis2_om_text_ops
-    @brief OM text operations struct
-
-    Encapsulator struct for operations of axis2_om_text_t
-*/
+  /** 
+    * @brief OM text operations struct
+    * Encapsulator struct for operations of axis2_om_text
+    */
     typedef struct axis2_om_text_ops
     {
-  /**
-	* Free an axis2_om_text_t structure
-    * @return Status code
-    */
-        axis2_status_t (*axis2_om_text_ops_free) (axis2_environment_t *
+      /**
+        * Free an axis2_om_text struct
+        * @param environment environment. Mandatory, MUST NOT be NULL, if NULL behaviour is undefined.
+        * @param om_text pointer to om text struct to be freed
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
+        */
+        AXIS2_DECLARE(axis2_status_t) (*axis2_om_text_ops_free) (axis2_environment_t *
                                                   environment,
                                                   struct axis2_om_text *
                                                   om_text);
 
-  /**
-    * Serialize operation
-    * @param om_output OM output handler to be used in serializing
-    * @return Status code
-    */
-        axis2_status_t (*axis2_om_text_ops_serialize) (axis2_environment_t *
+      /**
+        * Serialize operation
+        * @param environment environment. Mandatory, MUST NOT be NULL, if NULL behaviour is undefined.
+        * @param om_text pointer to om text struct to be serialized
+        * @param om_output OM output handler to be used in serializing
+        * @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
+        */
+        AXIS2_DECLARE(axis2_status_t) (*axis2_om_text_ops_serialize) (axis2_environment_t *
                                                        environment,
                                                        const struct
                                                        axis2_om_text *
@@ -77,48 +73,36 @@
                                                        om_output);
     } axis2_om_text_ops_t;
 
-/** \struct axis2_om_text
+/** 
     \brief OM Text struct
-
     Handles the XML text in OM
 */
     typedef struct axis2_om_text
     {
-  /**
-    * OM text related operations
-    */
+        /** OM text related operations */
         axis2_om_text_ops_t *ops;
-
-   /**
-	* Text value
-	*/
+        /** Text value */
         axis2_char_t *value;
-
-   /**
-    * The following fields are for MTOM
-    */
-        /*axis2_om_namespace_t *ns; */
+        /** The following fields are for MTOM
+            TODO: Implement MTOM support */
         axis2_char_t *mime_type;
-        int optimize;
+        axis2_bool_t optimize;
         axis2_char_t *localname;
-        int is_binary;
+        axis2_bool_t is_binary;
         axis2_char_t *content_id;
-        /*axis2_om_attribute_t *attribute; */
     } axis2_om_text_t;
 
 
-/**
- * Creates a text struct and stores it in a node struct and returns a pointer
- * to the newly created text struct
- * @param environment Environment. MUST  NOT be NULL, if NULL behaviour is undefined.
- * @param parent Parent of the new node. If null newly created node becomes a root node
- *          The parent element must be of type AXIS2_OM_ELEMENT
- * @param value Text value 
- * @param node Out parameter to store the newly created node
- * @return pointer to newly created text struct 
- */
-
-    axis2_om_text_t *axis2_om_text_create (axis2_environment_t * environment,
+  /**
+    * Creates a new text struct
+    * @param environment Environment. MUST  NOT be NULL, if NULL behaviour is undefined.
+    * @param parent parent of the new node. Optinal, can be NULL. 
+    *          The parent element must be of type AXIS2_OM_ELEMENT
+    * @param value Text value 
+    * @param node Out parameter to store the newly created node
+    * @return pointer to newly created text struct 
+    */
+    AXIS2_DECLARE(axis2_om_text_t *) axis2_om_text_create (axis2_environment_t * environment,
                                            axis2_om_node_t * parent,
                                            const axis2_char_t * value,
                                            axis2_om_node_t ** node);

Modified: webservices/axis2/trunk/c/include/axis2_qname.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_qname.h?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_qname.h (original)
+++ webservices/axis2/trunk/c/include/axis2_qname.h Sun Oct 23 18:31:44 2005
@@ -25,12 +25,12 @@
 #include <axis2_defines.h>
 #include <axis2_environment.h>
 
+struct axis2_qname;
+struct axis2_qname_ops;
 
 static const axis2_char_t XML_NAMESPACE_URI[] =
     "http://www.w3c.org/XML/1998/namespace";
 
-struct axis2_qname;
-struct axis2_qname_ops;
 
 typedef struct axis2_qname_ops
 {

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c Sun Oct 23 18:31:44 2005
@@ -18,19 +18,17 @@
 #include <string.h>
 #include <axis2_defines.h>
 
-
-
-axis2_status_t axis2_om_attribute_impl_free (axis2_environment_t *
+axis2_status_t AXIS2_CALL axis2_om_attribute_impl_free (axis2_environment_t *
                                              environment,
                                              axis2_om_attribute_t *
                                              attribute);
 
-axis2_qname_t *axis2_om_attribute_impl_get_qname (axis2_environment_t *
+axis2_qname_t * AXIS2_CALL axis2_om_attribute_impl_get_qname (axis2_environment_t *
                                                   environment,
                                                   axis2_om_attribute_t *
                                                   attribute);
 
-axis2_status_t axis2_om_attribute_impl_serialize (axis2_environment_t *
+axis2_status_t AXIS2_CALL axis2_om_attribute_impl_serialize (axis2_environment_t *
                                                   environment,
                                                   axis2_om_attribute_t *
                                                   attribute,
@@ -46,7 +44,7 @@
 {
     axis2_om_attribute_t *attribute = NULL;
     if (!localname)
-    {   /** localname is mandatory */
+    {   /* localname is mandatory */
         environment->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
         return NULL;
     }
@@ -155,17 +153,18 @@
     }
 
     if (attribute->ns && attribute->ns->uri && attribute->ns->prefix)
-        status = axis2_om_output_write (environment, om_output, AXIS2_OM_ATTRIBUTE, 4,
-                                        attribute->localname,
-                                        attribute->value, attribute->ns->uri,
-                                        attribute->ns->prefix);
+        status =
+            axis2_om_output_write (environment, om_output, AXIS2_OM_ATTRIBUTE,
+                                   4, attribute->localname, attribute->value,
+                                   attribute->ns->uri, attribute->ns->prefix);
     else if (attribute->ns && attribute->ns->uri)
-        status = axis2_om_output_write (environment, om_output, AXIS2_OM_ATTRIBUTE, 3,
-                                        attribute->localname,
-                                        attribute->value, attribute->ns->uri);
+        status =
+            axis2_om_output_write (environment, om_output, AXIS2_OM_ATTRIBUTE,
+                                   3, attribute->localname, attribute->value,
+                                   attribute->ns->uri);
     else
-        status = axis2_om_output_write (environment, om_output, AXIS2_OM_ATTRIBUTE, 2,
-                                        attribute->localname,
-                                        attribute->value);
+        status =
+            axis2_om_output_write (environment, om_output, AXIS2_OM_ATTRIBUTE,
+                                   2, attribute->localname, attribute->value);
     return status;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c Sun Oct 23 18:31:44 2005
@@ -17,48 +17,48 @@
 #include <axis2_om_comment.h>
 #include <string.h>
 
-/**
- *	free a axis2_comment struct
- * @param comment pointer to the axis2_commnet 
- *
- */
-axis2_status_t axis2_om_comment_impl_free(axis2_environment_t *environment, axis2_om_comment_t *comment);
+axis2_status_t AXIS2_CALL axis2_om_comment_impl_free (axis2_environment_t * environment,
+                                           axis2_om_comment_t * comment);
 
-axis2_om_comment_t *axis2_om_comment_create(axis2_environment_t *environment, const axis2_char_t *value, axis2_om_node_t **node)
+axis2_om_comment_t *
+axis2_om_comment_create (axis2_environment_t * environment,
+                         const axis2_char_t * value, axis2_om_node_t ** node)
 {
     *node = NULL;
     axis2_om_comment_t *comment = NULL;
-    
+
     if (!node)
     {
         environment->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
         return NULL;
     }
 
-    *node = axis2_om_node_create(environment);
+    *node = axis2_om_node_create (environment);
     if (!*node)
     {
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
-    
-    comment = (axis2_om_comment_t *) axis2_malloc(environment->allocator, sizeof(axis2_om_comment_t));
+
+    comment =
+        (axis2_om_comment_t *) axis2_malloc (environment->allocator,
+                                             sizeof (axis2_om_comment_t));
     if (!comment)
     {
-		axis2_om_node_free(environment, *node);
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        axis2_om_node_free (environment, *node);
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
-    
+
     comment->value = NULL;
-    
+
     if (value)
     {
-        comment->value = axis2_strdup(environment->string, value);
+        comment->value = axis2_strdup (environment->string, value);
         if (!comment->value)
         {
-            axis2_om_node_free(environment, *node);
-            axis2_free(environment->allocator, comment);
+            axis2_om_node_free (environment, *node);
+            axis2_free (environment->allocator, comment);
             environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
             return NULL;
         }
@@ -66,33 +66,38 @@
 
     (*node)->data_element = comment;
     (*node)->node_type = AXIS2_OM_COMMENT;
-	
+
     /* operations */
     comment->ops = NULL;
-    comment->ops = (axis2_om_comment_ops_t*) axis2_malloc(environment->allocator, sizeof(axis2_om_comment_ops_t));
+    comment->ops =
+        (axis2_om_comment_ops_t *) axis2_malloc (environment->allocator,
+                                                 sizeof
+                                                 (axis2_om_comment_ops_t));
     if (!comment->ops)
     {
-        axis2_om_node_free(environment, *node);
-        axis2_free(environment->allocator, comment);
-        axis2_free(environment->allocator, comment->value);
+        axis2_om_node_free (environment, *node);
+        axis2_free (environment->allocator, comment);
+        axis2_free (environment->allocator, comment->value);
         environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
         return NULL;
     }
-    
+
     comment->ops->axis2_om_comment_ops_free = axis2_om_comment_impl_free;
-    
+
     return comment;
 }
 
 
-axis2_status_t axis2_om_comment_impl_free(axis2_environment_t *environment, axis2_om_comment_t *comment)
+axis2_status_t
+axis2_om_comment_impl_free (axis2_environment_t * environment,
+                            axis2_om_comment_t * comment)
 {
     if (comment)
     {
-		if (comment->value)
-		{
-	    	axis2_free(environment->allocator, comment->value);
-		}
-		axis2_free(environment->allocator, comment);
+        if (comment->value)
+        {
+            axis2_free (environment->allocator, comment->value);
+        }
+        axis2_free (environment->allocator, comment);
     }
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c Sun Oct 23 18:31:44 2005
@@ -1,57 +1,63 @@
  /*
- * 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.
- */
+  * 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_om_doctype.h>
 
-axis2_status_t axis2_om_doctype_impl_free(axis2_environment_t *environment, axis2_om_doctype_t *doctype);
+axis2_status_t AXIS2_CALL axis2_om_doctype_impl_free (axis2_environment_t * environment,
+                                           axis2_om_doctype_t * doctype);
 
-axis2_om_doctype_t *axis2_om_doctype_create(axis2_environment_t *environment, axis2_om_node_t *parent, const axis2_char_t *value, axis2_om_node_t **node)
+axis2_om_doctype_t *
+axis2_om_doctype_create (axis2_environment_t * environment,
+                         axis2_om_node_t * parent, const axis2_char_t * value,
+                         axis2_om_node_t ** node)
 {
     axis2_om_doctype_t *doctype = NULL;
-    
+
     if (!node)
     {
         environment->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
         return NULL;
     }
 
-    *node = axis2_om_node_create(environment);
+    *node = axis2_om_node_create (environment);
     if (!*node)
     {
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
-    
-    doctype = (axis2_om_doctype_t *) axis2_malloc(environment->allocator, sizeof(axis2_om_doctype_t));
+
+    doctype =
+        (axis2_om_doctype_t *) axis2_malloc (environment->allocator,
+                                             sizeof (axis2_om_doctype_t));
     if (!doctype)
     {
-		axis2_om_node_free(environment, *node);
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        axis2_om_node_free (environment, *node);
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
-    
+
     doctype->value = NULL;
-    
+
     if (value)
     {
-        doctype->value = axis2_strdup(environment->string, value);
+        doctype->value = axis2_strdup (environment->string, value);
         if (!doctype->value)
         {
-            axis2_om_node_free(environment, *node);
-            axis2_free(environment->allocator, doctype);
+            axis2_om_node_free (environment, *node);
+            axis2_free (environment->allocator, doctype);
             environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
             return NULL;
         }
@@ -59,39 +65,44 @@
 
     (*node)->data_element = doctype;
     (*node)->node_type = AXIS2_OM_DOCTYPE;
-	
-	if (parent)
+
+    if (parent)
     {
         (*node)->parent = parent;
         axis2_om_node_add_child (environment, parent, (*node));
     }
-	
+
     /* operations */
     doctype->ops = NULL;
-    doctype->ops = (axis2_om_doctype_ops_t*) axis2_malloc(environment->allocator, sizeof(axis2_om_doctype_ops_t));
+    doctype->ops =
+        (axis2_om_doctype_ops_t *) axis2_malloc (environment->allocator,
+                                                 sizeof
+                                                 (axis2_om_doctype_ops_t));
     if (!doctype->ops)
     {
-        axis2_om_node_free(environment, *node);
-        axis2_free(environment->allocator, doctype);
-        axis2_free(environment->allocator, doctype->value);
+        axis2_om_node_free (environment, *node);
+        axis2_free (environment->allocator, doctype);
+        axis2_free (environment->allocator, doctype->value);
         environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
         return NULL;
     }
-    
+
     doctype->ops->axis2_om_doctype_ops_free = axis2_om_doctype_impl_free;
-    
+
     return doctype;
 }
 
 
-axis2_status_t axis2_om_doctype_impl_free(axis2_environment_t *environment, axis2_om_doctype_t *doctype)
+axis2_status_t
+axis2_om_doctype_impl_free (axis2_environment_t * environment,
+                            axis2_om_doctype_t * doctype)
 {
     if (doctype)
     {
-		if (doctype->value)
-		{
-	    	axis2_free(environment->allocator, doctype->value);
-		}
-		axis2_free(environment->allocator, doctype);
+        if (doctype->value)
+        {
+            axis2_free (environment->allocator, doctype->value);
+        }
+        axis2_free (environment->allocator, doctype);
     }
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_document.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_document.c?rev=327905&r1=327904&r2=327905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_document.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_document.c Sun Oct 23 18:31:44 2005
@@ -18,225 +18,284 @@
 #include <axis2_om_document.h>
 #include <axis2_om_stax_builder.h>
 
-axis2_status_t axis2_om_document_impl_free(axis2_environment_t *environment, axis2_om_document_t * document);
-axis2_status_t axis2_om_document_impl_add_child(axis2_environment_t *environment, axis2_om_document_t *document,
-				  axis2_om_node_t *child);
-axis2_om_node_t *axis2_om_document_impl_build_next(axis2_environment_t *environment, axis2_om_document_t *document);
-axis2_om_node_t *axis2_om_document_impl_get_root_element(axis2_environment_t *environment, axis2_om_document_t *document);
-axis2_om_node_t *axis2_om_document_impl_get_next_sibling(axis2_environment_t *environment, axis2_om_document_t *document);
-axis2_om_node_t *axis2_om_document_impl_get_first_child(axis2_environment_t *environment, axis2_om_document_t *document);
-axis2_om_node_t *axis2_om_document_impl_get_next_child(axis2_environment_t *environment, axis2_om_document_t *document);
-
-axis2_om_document_t *axis2_om_document_create(axis2_environment_t *environment, axis2_om_node_t * root, axis2_om_stax_builder_t * builder)
+axis2_status_t AXIS2_CALL axis2_om_document_impl_free (axis2_environment_t * environment,
+                                            axis2_om_document_t * document);
+axis2_status_t AXIS2_CALL axis2_om_document_impl_add_child (axis2_environment_t *
+                                                 environment,
+                                                 axis2_om_document_t *
+                                                 document,
+                                                 axis2_om_node_t * child);
+axis2_om_node_t * AXIS2_CALL axis2_om_document_impl_build_next (axis2_environment_t *
+                                                    environment,
+                                                    axis2_om_document_t *
+                                                    document);
+axis2_om_node_t * AXIS2_CALL axis2_om_document_impl_get_root_element (axis2_environment_t
+                                                          * environment,
+                                                          axis2_om_document_t
+                                                          * document);
+axis2_om_node_t * AXIS2_CALL axis2_om_document_impl_get_next_sibling (axis2_environment_t
+                                                          * environment,
+                                                          axis2_om_document_t
+                                                          * document);
+axis2_om_node_t * AXIS2_CALL axis2_om_document_impl_get_first_child (axis2_environment_t *
+                                                         environment,
+                                                         axis2_om_document_t *
+                                                         document);
+axis2_om_node_t * AXIS2_CALL axis2_om_document_impl_get_next_child (axis2_environment_t *
+                                                        environment,
+                                                        axis2_om_document_t *
+                                                        document);
+
+axis2_om_document_t *
+axis2_om_document_create (axis2_environment_t * environment,
+                          axis2_om_node_t * root,
+                          axis2_om_stax_builder_t * builder)
 {
 
-    axis2_om_document_t *document = (axis2_om_document_t *) axis2_malloc(environment->allocator, sizeof(axis2_om_document_t));
-    
+    axis2_om_document_t *document =
+        (axis2_om_document_t *) axis2_malloc (environment->allocator,
+                                              sizeof (axis2_om_document_t));
+
     if (!document)
     {
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
     document->builder = builder;
     document->root_element = root;
     document->first_child = NULL;
     document->last_child = NULL;
-    
+
     document->char_set_encoding = NULL;
-    document->char_set_encoding = (axis2_char_t*) axis2_strdup(environment->string, CHAR_SET_ENCODING);
-    
+    document->char_set_encoding =
+        (axis2_char_t *) axis2_strdup (environment->string,
+                                       CHAR_SET_ENCODING);
+
     if (!document->char_set_encoding)
     {
-        axis2_free(environment->allocator, document);
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;        
-		return NULL;
+        axis2_free (environment->allocator, document);
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
-    
+
     document->xml_version = NULL;
-    document->xml_version = (axis2_char_t*) axis2_strdup(environment->string, XML_VERSION);
+    document->xml_version =
+        (axis2_char_t *) axis2_strdup (environment->string, XML_VERSION);
     if (!document->xml_version)
     {
-        axis2_free(environment->allocator, document);
-        axis2_free(environment->allocator, document->char_set_encoding);
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;        
-		return NULL;
+        axis2_free (environment->allocator, document);
+        axis2_free (environment->allocator, document->char_set_encoding);
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
-    
+
     document->done = AXIS2_FALSE;
-    
-    if(builder)
+
+    if (builder)
     {
         builder->document = document;
     }
-    
+
     /* operations */
     document->ops = NULL;
-    document->ops = (axis2_om_document_ops_t*) axis2_malloc(environment->allocator, sizeof(axis2_om_document_ops_t));
-    
+    document->ops =
+        (axis2_om_document_ops_t *) axis2_malloc (environment->allocator,
+                                                  sizeof
+                                                  (axis2_om_document_ops_t));
+
     if (!document->ops)
     {
-        axis2_free(environment->allocator, document);
-        axis2_free(environment->allocator, document->char_set_encoding);
-        axis2_free(environment->allocator, document->xml_version);
-		environment->error->errorno = AXIS2_ERROR_NO_MEMORY;        
-		return NULL;
+        axis2_free (environment->allocator, document);
+        axis2_free (environment->allocator, document->char_set_encoding);
+        axis2_free (environment->allocator, document->xml_version);
+        environment->error->errorno = AXIS2_ERROR_NO_MEMORY;
+        return NULL;
     }
-    
+
     document->ops->axis2_om_document_ops_free = axis2_om_document_impl_free;
-    document->ops->axis2_om_document_ops_add_child = axis2_om_document_impl_add_child;
-    document->ops->axis2_om_document_ops_build_next = axis2_om_document_impl_build_next;
-    document->ops->axis2_om_document_ops_get_root_element = axis2_om_document_impl_get_root_element;
-    document->ops->axis2_om_document_ops_get_next_sibling = axis2_om_document_impl_get_next_sibling;
-    document->ops->axis2_om_document_ops_get_first_child = axis2_om_document_impl_get_first_child;
-    document->ops->axis2_om_document_ops_get_next_child = axis2_om_document_impl_get_next_child;
+    document->ops->axis2_om_document_ops_add_child =
+        axis2_om_document_impl_add_child;
+    document->ops->axis2_om_document_ops_build_next =
+        axis2_om_document_impl_build_next;
+    document->ops->axis2_om_document_ops_get_root_element =
+        axis2_om_document_impl_get_root_element;
+    document->ops->axis2_om_document_ops_get_next_sibling =
+        axis2_om_document_impl_get_next_sibling;
+    document->ops->axis2_om_document_ops_get_first_child =
+        axis2_om_document_impl_get_first_child;
+    document->ops->axis2_om_document_ops_get_next_child =
+        axis2_om_document_impl_get_next_child;
     return document;
 }
 
 
-axis2_status_t axis2_om_document_impl_free(axis2_environment_t *environment, axis2_om_document_t * document)
+axis2_status_t
+axis2_om_document_impl_free (axis2_environment_t * environment,
+                             axis2_om_document_t * document)
 {
-	if(document)
-	{
-		if(document->char_set_encoding)
-			axis2_free(environment->allocator, document->char_set_encoding);
-		if(document->xml_version)
-			axis2_free(environment->allocator, document->xml_version);
-        
-        (document->root_element)->ops->axis2_om_node_ops_free(environment, document->root_element);
-        
-        axis2_free(environment->allocator, document);
-	}
+    if (document)
+    {
+        if (document->char_set_encoding)
+            axis2_free (environment->allocator, document->char_set_encoding);
+        if (document->xml_version)
+            axis2_free (environment->allocator, document->xml_version);
+
+        (document->root_element)->ops->axis2_om_node_ops_free (environment,
+                                                               document->
+                                                               root_element);
+
+        axis2_free (environment->allocator, document);
+    }
     return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t axis2_om_document_impl_add_child(axis2_environment_t *environment, axis2_om_document_t *document,
-				  axis2_om_node_t *child)
+axis2_status_t
+axis2_om_document_impl_add_child (axis2_environment_t * environment,
+                                  axis2_om_document_t * document,
+                                  axis2_om_node_t * child)
 {
-   if (!document || ! child)
+    if (!document || !child)
     {
         environment->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
         return AXIS2_FAILURE;
     }
-    
-    if(!(document->root_element) && child)
-   {
+
+    if (!(document->root_element) && child)
+    {
         document->root_element = child;
-       return AXIS2_SUCCESS;
-   
-   }
-   
-   if(document->root_element && child)
-   {
-        return axis2_om_node_add_child(environment, document->root_element,child);
-   }
-   
-   return AXIS2_FAILURE;
-   
+        return AXIS2_SUCCESS;
+
+    }
+
+    if (document->root_element && child)
+    {
+        return axis2_om_node_add_child (environment, document->root_element,
+                                        child);
+    }
+
+    return AXIS2_FAILURE;
+
 }
 
-axis2_om_node_t *axis2_om_document_impl_build_next(axis2_environment_t *environment, axis2_om_document_t *document)
+axis2_om_node_t *
+axis2_om_document_impl_build_next (axis2_environment_t * environment,
+                                   axis2_om_document_t * document)
 {
-	if (!document)
+    if (!document)
     {
         environment->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
         return NULL;
     }
-	
-	if (!(document->root_element))
-	{
-		return axis2_om_stax_builder_next(environment, document->builder);
-	}
-	else if (document->root_element->done)
-		return NULL; /* Nothing wrong but done with pulling */
-	
-   return axis2_om_stax_builder_next(environment, document->builder);
+
+    if (!(document->root_element))
+    {
+        return axis2_om_stax_builder_next (environment, document->builder);
+    }
+    else if (document->root_element->done)
+        return NULL;            /* Nothing wrong but done with pulling */
+
+    return axis2_om_stax_builder_next (environment, document->builder);
 }
 
 
-axis2_om_node_t *axis2_om_document_impl_get_root_element(axis2_environment_t *environment, axis2_om_document_t *document)
+axis2_om_node_t *
+axis2_om_document_impl_get_root_element (axis2_environment_t * environment,
+                                         axis2_om_document_t * document)
 {
     axis2_status_t status = AXIS2_SUCCESS;
-        if(document && document->root_element)
-        {
+    axis2_om_node_t *node = NULL;
+    if (document && document->root_element)
+    {
+        return document->root_element;
+    }
+    else
+    {
+        node =
+            (document)->ops->axis2_om_document_ops_build_next (environment,
+                                                               document);
+        if (document->root_element)
             return document->root_element;
-        }
         else
-        {   
-            status = (document)->ops->axis2_om_document_ops_build_next(environment, document);
-            if (document->root_element)
-                return document->root_element;
-            else
-            {
-                if (status != AXIS2_SUCCESS)
-                    environment->error->errorno = status;
-                return NULL;
-            }
+        {
+            if (status != AXIS2_SUCCESS)
+                environment->error->errorno = AXIS2_ERROR_INVALID_DOCUMENT_STATE_ROOT_NULL;
+            return NULL;
         }
+    }
 }
 
-axis2_om_node_t *axis2_om_document_impl_get_next_sibling(axis2_environment_t *environment, axis2_om_document_t *document)
+axis2_om_node_t *
+axis2_om_document_impl_get_next_sibling (axis2_environment_t * environment,
+                                         axis2_om_document_t * document)
 {
     axis2_om_node_t *lastchild = NULL;
-    if(document && document->builder && document->builder->lastnode)
+    axis2_om_node_t *current_node = NULL;
+    if (document && document->builder && document->builder->lastnode)
     {
         lastchild = document->builder->lastnode;
-        if(!(lastchild->parent))
+        if (!(lastchild->parent))
         {
-            return NULL; /* if parent is null there can't be siblings */
+            return NULL;        /* if parent is null there can't be siblings */
         }
-        while( !(lastchild->next_sibling) && !(lastchild->parent->done))
-            axis2_om_document_build_next(environment, document); 
+        while (!(lastchild->next_sibling) && !(lastchild->parent->done))
+            current_node = axis2_om_document_build_next (environment, document);
         return lastchild->next_sibling;
     }
     return NULL;
 }
 
-axis2_om_node_t *axis2_om_document_impl_get_first_child(axis2_environment_t *environment, axis2_om_document_t *document)
+axis2_om_node_t *
+axis2_om_document_impl_get_first_child (axis2_environment_t * environment,
+                                        axis2_om_document_t * document)
 {
     axis2_om_node_t *current_child = NULL;
+    axis2_om_node_t *current_node = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
     current_child = document->builder->lastnode;
-    if(current_child)
+    if (current_child)
     {
-        while(!(current_child->first_child)&& !(current_child->done))
+        while (!(current_child->first_child) && !(current_child->done))
         {
-           status = axis2_om_document_build_next(environment, document);
+            current_node = axis2_om_document_build_next (environment, document);
         }
 
-        if(current_child->first_child)
+        if (current_child->first_child)
             return current_child->first_child;
         else
         {
             if (status != AXIS2_SUCCESS)
                 environment->error->errorno = status;
             return NULL;
-        }        
+        }
     }
-    return NULL;    
+    return NULL;
 }
 
-axis2_om_node_t *axis2_om_document_impl_get_next_child(axis2_environment_t *environment, axis2_om_document_t *document)
+axis2_om_node_t *
+axis2_om_document_impl_get_next_child (axis2_environment_t * environment,
+                                       axis2_om_document_t * document)
 {
     axis2_om_node_t *current_child = NULL;
+    axis2_om_node_t *current_node = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
     current_child = document->builder->lastnode;
-    if(current_child && current_child->parent->first_child)
+    if (current_child && current_child->parent->first_child)
     {
-        status = axis2_om_document_build_next(environment, document);
+        current_node = axis2_om_document_build_next (environment, document);
 
-        if(current_child->last_child)
+        if (current_child->last_child)
             return current_child->last_child;
         else
         {
             if (status != AXIS2_SUCCESS)
                 environment->error->errorno = status;
             return NULL;
-        }        
+        }
     }
     else
     {
         environment->error->errorno = AXIS2_ERROR_INVALID_ITERATOR_STATE;
-        return NULL;    
+        return NULL;
     }
 }