You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2005/09/26 13:08:01 UTC
svn commit: r291598 - in /webservices/axis2/trunk/c: ./ include/
modules/xml/om/ modules/xml/om/src/ modules/xml/om/test/
Author: damitha
Date: Mon Sep 26 04:07:37 2005
New Revision: 291598
URL: http://svn.apache.org/viewcvs?rev=291598&view=rev
Log:
Removed include files from source folder and put in root dir/include
folder. Also prefixed the filesnames with axis2c_
Added:
webservices/axis2/trunk/c/include/axis2c_node.h
webservices/axis2/trunk/c/include/axis2c_om_attribute.h
webservices/axis2/trunk/c/include/axis2c_om_comment.h
webservices/axis2/trunk/c/include/axis2c_om_container.h
webservices/axis2/trunk/c/include/axis2c_om_doctype.h
webservices/axis2/trunk/c/include/axis2c_om_document.h
webservices/axis2/trunk/c/include/axis2c_om_element.h
webservices/axis2/trunk/c/include/axis2c_om_namespace.h
webservices/axis2/trunk/c/include/axis2c_om_pi.h
webservices/axis2/trunk/c/include/axis2c_om_text.h
webservices/axis2/trunk/c/include/axis2c_qname.h
webservices/axis2/trunk/c/include/axis2c_stax_ombuilder.h
Modified:
webservices/axis2/trunk/c/maven.xml
webservices/axis2/trunk/c/modules/xml/om/project.properties
webservices/axis2/trunk/c/modules/xml/om/src/node.c
webservices/axis2/trunk/c/modules/xml/om/src/om_attribute.c
webservices/axis2/trunk/c/modules/xml/om/src/om_comment.c
webservices/axis2/trunk/c/modules/xml/om/src/om_doctype.c
webservices/axis2/trunk/c/modules/xml/om/src/om_document.c
webservices/axis2/trunk/c/modules/xml/om/src/om_element.c
webservices/axis2/trunk/c/modules/xml/om/src/om_namespace.c
webservices/axis2/trunk/c/modules/xml/om/src/om_pi.c
webservices/axis2/trunk/c/modules/xml/om/src/om_text.c
webservices/axis2/trunk/c/modules/xml/om/src/qname.c
webservices/axis2/trunk/c/modules/xml/om/test/om_test.c
webservices/axis2/trunk/c/project.properties
Added: webservices/axis2/trunk/c/include/axis2c_node.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_node.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_node.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_node.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_NODE_H_
+#define _AXISC_NODE_H_
+
+#include <apr.h>
+#include <apr_pools.h>
+#include <xmlpullparser.h>
+
+#define TRUE 1 // to be used as boolean values
+#define FALSE 0
+
+
+
+static apr_pool_t *om_pool; // a memory pool to be used for this module
+
+
+enum omtypes{
+ OM_DOCUMENT=10,
+ OM_ELEMENT=20,
+ OM_DOCTYPE=30,
+ OM_COMMENT=40,
+ OM_ATTRIBUTE=50,
+ OM_NAMESPACE=60,
+ OM_PI=70,
+ OM_TEXT=80
+};
+
+struct node_s;
+typedef struct node_s node_t;
+
+/*
+* This is the structure that defines a node in om tree
+* parent - parent node if one is available
+* parser - carries a pointer to the XML_PullParser
+* element_type - the type of the element one of omtypes
+* data_element - stores the structs created for storing xml
+*/
+
+
+struct node_s{
+ struct node_s *parent;
+ struct node_s *prev_sibling;
+ struct node_s *next_sibling;
+ struct node_s *first_child;
+ struct node_s *last_child;
+ XML_PullParser *parser;
+ int element_type;
+ int done;
+ void* data_element;
+};
+
+
+//create a node and allocate memory
+node_t *create_node();
+//free a given nod
+void free_node(node_t *);
+// add a node as a child of parent node
+void node_add_child(node_t *parent,node_t *child);
+// detach a node form the parent and reset the other links
+node_t *node_detach(node_t *node_to_detach);
+// insert a sibling node
+void node_insert_sibling_after(node_t *current_ele,node_t *nodeto_insert);
+void node_insert_sibling_before(node_t *current_ele,node_t *nodeto_insert);
+
+// build the tree
+int node_build(node_t *node);
+
+
+
+void node_set_parent(node_t *parent);
+
+node_t *node_get_next_sibling(node_t *node);
+
+node_t *node_set_next_sibling(node_t *node);
+
+
+
+
+
+
+
+
+
+
+#endif // _AXISC_NODE_
Added: webservices/axis2/trunk/c/include/axis2c_om_attribute.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_attribute.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_attribute.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_attribute.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_ATTRIBUTE_H_
+#define _AXISC_OM_ATTRIBUTE_H_
+
+#include <axis2c_qname.h>
+#include <axis2c_node.h>
+#include <axis2c_om_namespace.h>
+
+
+struct om_attribute_s;
+typedef struct om_attribute_s om_attribute_t;
+
+struct om_attribute_s{
+ char *localname;
+ char *value;
+ om_namespace_t *ns;
+};
+
+om_attribute_t *create_om_attribute(const char *localname,const char *value,om_namespace_t *ns);
+qname_t *om_attribute_get_qname(om_attribute_t *attribute);
+void om_attribute_free(om_attribute_t *attr);
+
+
+
+
+
+
+#endif // _AXISC_ATTRIBUTE_H_
+
Added: webservices/axis2/trunk/c/include/axis2c_om_comment.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_comment.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_comment.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_comment.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_COMMENT_H_
+#define _AXISC_OM_COMMENT_H_
+#include <axis2c_node.h>
+
+
+struct om_comment_s;
+typedef struct om_comment_s om_comment_t;
+struct om_comment_s
+{
+ char *value;
+};
+
+node_t *create_om_comment(const char *value);
+void om_comment_free(node_t *comment_node);
+
+#endif // _AXISC_OM_COMMENT_H_
+
+
+
+
+
+
Added: webservices/axis2/trunk/c/include/axis2c_om_container.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_container.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_container.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_container.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,27 @@
+/*
+ * 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 <axis2c_node.h>
+
+struct om_container_s;
+typedef struct om_container_s om_container_t;
+
+struct om_container_s{
+ node_t *tree;
+};
+
+
+
Added: webservices/axis2/trunk/c/include/axis2c_om_doctype.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_doctype.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_doctype.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_doctype.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_DOCTYPE_H_
+#define _AXISC_OM_DOCTYPE_H_
+#include <axis2c_node.h>
+
+
+struct om_doctype_s;
+typedef struct om_doctype_s om_doctype_t;
+
+struct om_doctype_s
+{
+ char *value;
+};
+
+node_t *create_om_doctype(const char *value);
+char *om_text_get_text(node_t *text_node);
+
+#endif // _AXISC_OM_DOCTYPE_H_
+
Added: webservices/axis2/trunk/c/include/axis2c_om_document.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_document.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_document.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_document.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_DOCUMENT_H_
+#define _AXISC_OM_DOCUMENT_H_
+#include "axis2c_node.h"
+
+struct om_document_s;
+typedef struct om_document_s om_document_t;
+
+struct om_document_s
+{
+ node_t *root_element;
+ node_t *first_child;
+ node_t *last_child;
+};
+
+om_document_t *create_om_document();
+void free_om_document(om_document_t *document);
+
+
+
+
+#endif // _AXISC_OM_DOCUMENT_H_
+
Added: webservices/axis2/trunk/c/include/axis2c_om_element.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_element.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_element.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_element.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_ELEMENT_H_
+#define _AXISC_OM_ELEMENT_H_
+
+#include <axis2c_om_namespace.h>
+#include <axis2c_om_container.h>
+#include <axis2c_om_attribute.h>
+#include <axis2c_node.h>
+#include <apr.h>
+#include <apr_hash.h>
+
+struct om_element_s;
+typedef struct om_element_s om_element_t;
+
+struct om_element_s{
+ om_namespace_t *ns; // current namespace
+ char *localname;
+ //int done;
+ int pns_counter; // prefix namespace counter
+ apr_hash_t *attributes; // a hashtable for storing attributes
+ apr_hash_t *namespaces; // hashtable for storing namespaces
+};
+
+void free_om_element(node_t *element_node);
+/*
+* Create an om element using localname and namespace
+*
+*/
+node_t *create_om_element(const char *localname,om_namespace_t *ns);
+/*
+* create om element using localname namespace and parent element
+*
+*/
+node_t *create_om_element_with_parent(const char *localname,om_namespace_t *ns,node_t *parent);
+
+
+/*
+* Find a namespace in the scope of the document
+* start to find from current element and go up the hierarchy
+*
+*/
+node_t *create_om_element_with_qname_parent(qname_t *qname,node_t *parent);
+
+
+
+
+
+
+om_namespace_t *om_element_find_namespace(node_t *element_node,const char *uri,const char *prefix);
+
+
+// declare a namespace in current element
+om_namespace_t *om_element_declare_namespace(om_element_t *element,om_namespace_t *ns);
+
+om_namespace_t *om_element_find_declared_namespace(om_element_t *element_node,const char *uri,const char *prefix);
+
+om_attribute_t *om_element_add_attribute(om_element_t *element,om_attribute_t *attribute);
+
+om_attribute_t *om_attribute_add_attribute_with_namespace(node_t* element_node,const char *attribute_name,const char *value,om_namespace_t *ns);
+
+static char* construct_key_from_qname(qname_t *qname);
+
+
+static om_namespace_t *om_element_handle_namespace_with_qname(node_t *element_node,qname_t *qname);
+//void om_element_remove_attribute(om_element_t *element,om_attribute_t *attribute);
+
+void om_element_set_namespace(node_t *element_node,om_namespace_t *ns);
+
+om_namespace_t *om_element_declare_namespace_with_nsuri_prefix(om_element_t *element,const char* uri,const char *prefix);
+
+
+
+
+
+
+
+#endif // _AXISC_OM_ELEMENT
+
Added: webservices/axis2/trunk/c/include/axis2c_om_namespace.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_namespace.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_namespace.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_namespace.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_NAMESPACE_H_
+#define _AXISC_OM_NAMESPACE_H_
+
+struct om_namespace_s;
+typedef struct om_namespace_s om_namespace_t;
+
+struct om_namespace_s{
+ char *uri;
+ char *prefix;
+};
+
+
+om_namespace_t *create_om_namespace(const char *uri,const char *prefix);
+void free_om_namespace(om_namespace_t *ns);
+int om_namespace_equals(om_namespace_t *ns1,om_namespace_t *ns2);
+
+#endif // _AXISC_OM_NAMESPACE
+
Added: webservices/axis2/trunk/c/include/axis2c_om_pi.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_pi.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_pi.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_pi.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_PI_H_
+#define _AXISC_OM_PI_H_
+#include <axis2c_node.h>
+
+struct om_pi_s;
+typedef struct om_pi_s om_pi_t;
+struct om_pi_s{
+ char *target;
+ char *value;
+};
+
+node_t *create_om_processing_instruction_with_parent(node_t *parent,const char *target,const char *value);
+
+node_t *create_om_processing_instruction(node_t *parent);
+
+void om_pi_serialize_with_cache(FILE *output_stream);
+
+void om_pi_discard(om_pi_t *om_pi);
+
+
+
+
+
+
+#endif // _AXISC_OM_PI_H_
+
Added: webservices/axis2/trunk/c/include/axis2c_om_text.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_om_text.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_om_text.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_om_text.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_OM_TEXT_H_
+#define _AXISC_OM_TEXT_H_
+#include <axis2c_om_attribute.h>
+
+struct om_text_s;
+typedef struct om_text_s om_text_t;
+
+struct om_text_s
+{
+ char *value;
+ // mtom stuff
+ char *mime_type;
+ int optimize;
+ int is_binary;
+ char *content_id;
+ om_attribute_t *attribute;
+
+};
+
+node_t *create_om_text(const char *value);
+
+char* om_text_get_text(om_text_t *textnode);
+node_t *create_om_text_with_parent(node_t *parent,const char *value);
+
+
+
+
+
+
+
+#endif // _AXISC_OM_TEXT_H_
+
+
Added: webservices/axis2/trunk/c/include/axis2c_qname.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_qname.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_qname.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_qname.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_QNAME_H_
+#define _AXISC_QNAME_H_
+
+static const char XML_NAMESPACE_URI[] ="http://www.w3c.org/XML/1998/namespace";
+
+struct qname_s;
+typedef struct qname_s qname_t;
+
+struct qname_s{
+ char *localpart;
+ char *ns_uri;
+ char *prefix;
+
+};
+
+qname_t *create_qname(const char *localname,const char *ns_uri,const char *prefix);
+void free_qname(qname_t *qn);
+
+#endif // _AXISC_QNAME_H_
+
Added: webservices/axis2/trunk/c/include/axis2c_stax_ombuilder.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_stax_ombuilder.h?rev=291598&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_stax_ombuilder.h (added)
+++ webservices/axis2/trunk/c/include/axis2c_stax_ombuilder.h Mon Sep 26 04:07:37 2005
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef _AXISC_STAX_OMBUILDER_H_
+#define _AXISC_STAX_OMBUILDER_H_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif // _AXISC_STAX_OMBUILDER_H_
+
Modified: webservices/axis2/trunk/c/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/maven.xml?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/maven.xml (original)
+++ webservices/axis2/trunk/c/maven.xml Mon Sep 26 04:07:37 2005
@@ -20,9 +20,11 @@
<project default="axis2c:build-all"
xmlns:j="jelly:core"
xmlns:maven="jelly:maven">
+
<property environment="env"/>
- <property name="apr_home" value="${env.APR_HOME}"/>
- <property name="cutest_home" value="${env.CUTEST_HOME}"/>
+ <property name="apr.home" value="${env.APR_HOME}"/>
+ <property name="cutest.home" value="${env.CUTEST_HOME}"/>
+ <property name="axis2c.include" value="../../../"/>
<goal name="axis2c:build-all">
<maven:reactor basedir="${basedir}"
includes="modules/core/project.xml,modules/xml/project.xml"
Modified: webservices/axis2/trunk/c/modules/xml/om/project.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/project.properties?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/project.properties (original)
+++ webservices/axis2/trunk/c/modules/xml/om/project.properties Mon Sep 26 04:07:37 2005
@@ -17,5 +17,5 @@
freehep.nar.src=src
freehep.nar.outtype=shared
freehep.nar.test.src=test
-#freehep.nar.tests=om_test
+freehep.nar.tests=om_test
freehep.nar.linker.test.arg.end=-Ltarget/nar/lib/i386-Linux-g++ -laxis2c-xml-om-nar-0.0
Modified: webservices/axis2/trunk/c/modules/xml/om/src/node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/node.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/node.c Mon Sep 26 04:07:37 2005
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "node.h"
+#include <axis2c_node.h>
node_t *create_node()
{
@@ -82,6 +82,10 @@
{
node_to_detach->prev_sibling->next_sibling = node_to_detach->next_sibling;
}
+ if( NULL != (node_to_detach->next_sibling))
+ {
+ node_to_detach->next_sibling->prev_sibling = node_to_detach->prev_sibling;
+ }
node_to_detach->parent = NULL;
return node;
}
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_attribute.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_attribute.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_attribute.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_attribute.c Mon Sep 26 04:07:37 2005
@@ -1,4 +1,4 @@
-#include "om_attribute.h"
+#include "axis2c_om_attribute.h"
#include "string.h"
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_comment.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_comment.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_comment.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_comment.c Mon Sep 26 04:07:37 2005
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#include "om_comment.h"
-#include "string.h"
+#include <axis2c_om_comment.h>
+#include <string.h>
node_t *create_om_comment(const char *value)
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_doctype.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_doctype.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_doctype.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_doctype.c Mon Sep 26 04:07:37 2005
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "om_doctype.h"
+#include <axis2c_om_doctype.h>
node_t *create_om_doctype(const char *value)
{
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_document.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_document.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_document.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_document.c Mon Sep 26 04:07:37 2005
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#include "om_document.h"
-#include "stdlib.h"
+#include <axis2c_om_document.h>
+#include <stdlib.h>
om_document_t *create_om_document()
{
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_element.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_element.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_element.c Mon Sep 26 04:07:37 2005
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#include "om_element.h"
-#include "om_attribute.h"
+#include <axis2c_om_element.h>
+#include <axis2c_om_attribute.h>
#include <stdlib.h>
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_namespace.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_namespace.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_namespace.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_namespace.c Mon Sep 26 04:07:37 2005
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "om_namespace.h"
+#include <axis2c_om_namespace.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_pi.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_pi.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_pi.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_pi.c Mon Sep 26 04:07:37 2005
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-#include "om_pi.h"
-#include "stdlib.h"
+#include <axis2c_om_pi.h>
+#include <stdlib.h>
Modified: webservices/axis2/trunk/c/modules/xml/om/src/om_text.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/om_text.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/om_text.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/om_text.c Mon Sep 26 04:07:37 2005
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-#include "om_text.h"
-#include "string.h"
-#include "node.h"
+#include <axis2c_om_text.h>
+#include <string.h>
+#include <axis2c_node.h>
node_t *create_om_text(const char *value)
{
Modified: webservices/axis2/trunk/c/modules/xml/om/src/qname.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/qname.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/qname.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/qname.c Mon Sep 26 04:07:37 2005
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "qname.h"
+#include <axis2c_qname.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
Modified: webservices/axis2/trunk/c/modules/xml/om/test/om_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/test/om_test.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/test/om_test.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/test/om_test.c Mon Sep 26 04:07:37 2005
@@ -1,17 +1,31 @@
-#include <strutil.h>
#include <CuTest.h>
#include <string.h>
#include <stdio.h>
-#include <node.h>
+#include <axis2c_node.h>
-void Testnode_detach(CuTest *tc) {
- node_t test_node = malloc(sizeof(node_t));
- CuAssertStrEquals(tc, expected, actual);
+void Testdetach_node(CuTest *tc) {
+ node_t* parent = create_node();
+ node_t* prev_sibling = create_node();
+ node_add_child(parent, prev_sibling);
+ node_t* test_node = create_node();
+ node_add_child(parent, test_node);
+ node_t* next_sibling = create_node();
+ node_add_child(parent, next_sibling);
+
+ node_t* temp_parent = detach_node(test_node);
+ puts("came");
+ if(0 == temp_parent) puts("parent is null\n");
+ node_t* expected = temp_parent->first_child;
+ printf("came2");
+ if(0 == expected) puts("expected is null\n");
+ node_t* actual = next_sibling;
+
+ CuAssertPtrEquals(tc, expected, actual);
}
- CuSuite* StrUtilGetSuite() {
+ CuSuite* detach_nodeGetSuite() {
CuSuite* suite = CuSuiteNew();
- SUITE_ADD_TEST(suite, TestStrToUpper);
+ SUITE_ADD_TEST(suite, Testdetach_node);
return suite;
}
@@ -19,7 +33,7 @@
CuString *output = CuStringNew();
CuSuite* suite = CuSuiteNew();
- CuSuiteAddSuite(suite, StrUtilGetSuite());
+ CuSuiteAddSuite(suite, detach_nodeGetSuite());
CuSuiteRun(suite);
CuSuiteSummary(suite, output);
Modified: webservices/axis2/trunk/c/project.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/project.properties?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- webservices/axis2/trunk/c/project.properties (original)
+++ webservices/axis2/trunk/c/project.properties Mon Sep 26 04:07:37 2005
@@ -19,6 +19,6 @@
freehep.nar.c.compiler=gcc
freehep.nar.c.linker=gcc
freehep.nar.c.compiler.arg.mid=-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread
-freehep.nar.compile.includepath=src ${cutest_home}/include/ ${apr_home}/include/apr-1 /home/damitha/programs/Guththila-c-p2/src
+freehep.nar.compile.includepath=${axis2c.include}/include ${cutest.home}/include/ ${apr.home}/include/apr-1 /home/damitha/programs/Guththila-c-p2/src
#freehep.nar.tests=om_test
-freehep.nar.linker.test.arg.mid=${cutest_home}/lib/ -lcutest
+freehep.nar.linker.test.arg.mid=-L${cutest.home}/lib/ -lcutest -L${apr.home}/lib -lapr-1