axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r450414 - in /webservices/axis2/trunk/c/xml_schema: include/xml_schema_simple_type_restriction.h src/xml_schema_any.c src/xml_schema_builder.c src/xml_schema_obj_table.c
Date Wed, 27 Sep 2006 12:05:55 GMT
Author: nandika
Date: Wed Sep 27 05:05:54 2006
New Revision: 450414

URL: http://svn.apache.org/viewvc?view=rev&rev=450414
Log:
changes to xml_schema to run schema code generator

Modified:
    webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_restriction.h
    webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c
    webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c
    webservices/axis2/trunk/c/xml_schema/src/xml_schema_obj_table.c

Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_restriction.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_restriction.h?view=diff&rev=450414&r1=450413&r2=450414
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_restriction.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_restriction.h Wed
Sep 27 05:05:54 2006
@@ -126,7 +126,7 @@
 
 #define XML_SCHEMA_SIMPLE_TYPE_RESTRICTION_GET_BASE_TYPE(simple_type_restriction, env) \
       (((xml_schema_simple_type_restriction_t *) simple_type_restriction)->ops->\
-            get_max_occurs(simple_type_restriction, env))
+            get_base_type(simple_type_restriction, env))
 
 #define XML_SCHEMA_SIMPLE_TYPE_RESTRICTION_SET_BASE_TYPE(simple_type_restriction,\
          env, base_type) \

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c?view=diff&rev=450414&r1=450413&r2=450414
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c Wed Sep 27 05:05:54 2006
@@ -157,22 +157,22 @@
         return NULL;
     }
     axis2_hash_set(any_impl->ht_super,
-            AXIS2_STRDUP("AXIS_XML_SCHEMA_ANY", env),
+            AXIS2_STRDUP("XML_SCHEMA_ANY", env),
             AXIS2_HASH_KEY_STRING, &(any_impl->any));
 
     axis2_hash_set(any_impl->ht_super,
-            AXIS2_STRDUP("AXIS_XML_SCHEMA_PARTICLE", env),
+            AXIS2_STRDUP("XML_SCHEMA_PARTICLE", env),
             AXIS2_HASH_KEY_STRING, any_impl->particle);
 
     annotated = XML_SCHEMA_PARTICLE_GET_BASE_IMPL(any_impl->particle, env);
     if (annotated)
     {
         axis2_hash_set(any_impl->ht_super,
-                AXIS2_STRDUP("AXIS_XML_SCHEMA_ANNOTATED", env),
+                AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
                 AXIS2_HASH_KEY_STRING, annotated);
 
         axis2_hash_set(any_impl->ht_super,
-                AXIS2_STRDUP("AXIS_XML_SCHEMA_OBJ", env),
+                AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
                 AXIS2_HASH_KEY_STRING, XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
     }
 

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c?view=diff&rev=450414&r1=450413&r2=450414
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c Wed Sep 27 05:05:54 2006
@@ -968,46 +968,44 @@
         return AXIS2_FAILURE;
 
     ht_ns = AXIOM_ELEMENT_GET_NAMESPACES(om_ele, env);
-    if (!ht_ns)
-    {   /* no namespaces available */
-        return AXIS2_SUCCESS;
-    }
-
-    ht_sch_ns = XML_SCHEMA_GET_PREFIX_TO_NAMESPACE_MAP(schema, env);
-    if (!ht_sch_ns)
-        return AXIS2_FAILURE;
-
-    for (hi_ns = axis2_hash_first(ht_ns, env); hi_ns;
-            hi_ns = axis2_hash_next(env, hi_ns))
+    if (ht_ns)
     {
-        void *val = NULL;
-        axis2_hash_this(hi_ns, NULL, NULL, &val);
-        if (val)
+        ht_sch_ns = XML_SCHEMA_GET_PREFIX_TO_NAMESPACE_MAP(schema, env);
+        if (!ht_sch_ns)
+            return AXIS2_FAILURE;
+    
+        for (hi_ns = axis2_hash_first(ht_ns, env); hi_ns;
+                hi_ns = axis2_hash_next(env, hi_ns))
         {
-            axis2_char_t *uri = NULL;
-            axis2_char_t *prefix = NULL;
-            uri = AXIOM_NAMESPACE_GET_URI((axiom_namespace_t*)val, env);
-            prefix =
-                AXIOM_NAMESPACE_GET_PREFIX((axiom_namespace_t*)val, env);
-
-            if (prefix && AXIS2_STRCMP(prefix, "") != 0)
+            void *val = NULL;
+            axis2_hash_this(hi_ns, NULL, NULL, &val);
+            if (val)
             {
-                axis2_hash_set(ht_sch_ns, prefix,
-                        AXIS2_HASH_KEY_STRING, uri);
-
-                if (uri && AXIS2_STRCMP(uri, XML_SCHEMA_NS) == 0)
+                axis2_char_t *uri = NULL;
+                axis2_char_t *prefix = NULL;
+                uri = AXIOM_NAMESPACE_GET_URI((axiom_namespace_t*)val, env);
+                prefix =
+                    AXIOM_NAMESPACE_GET_PREFIX((axiom_namespace_t*)val, env);
+    
+                if (prefix && AXIS2_STRCMP(prefix, "") != 0)
                 {
-                    XML_SCHEMA_SET_SCHEMA_NS_PREFIX(schema, env, prefix);
+                    axis2_hash_set(ht_sch_ns, prefix,
+                            AXIS2_HASH_KEY_STRING, uri);
+    
+                    if (uri && AXIS2_STRCMP(uri, XML_SCHEMA_NS) == 0)
+                    {
+                        XML_SCHEMA_SET_SCHEMA_NS_PREFIX(schema, env, prefix);
+                    }
+                }
+                else
+                {
+                    /** default namespace [xmlns=""] */
+                    axis2_hash_set(ht_sch_ns, "", AXIS2_HASH_KEY_STRING, uri);
                 }
-            }
-            else
-            {
-                /** default namespace [xmlns=""] */
-                axis2_hash_set(ht_sch_ns, "", AXIS2_HASH_KEY_STRING, uri);
             }
         }
     }
-
+    /** note: targetNamespace may availabe even though namespace declarations not available
*/ 
     target_ns_qn = axis2_qname_create(env, "targetNamespace", NULL, NULL);
 
     contain = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE(om_ele, env, target_ns_qn);

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_obj_table.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_obj_table.c?view=diff&rev=450414&r1=450413&r2=450414
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_obj_table.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_obj_table.c Wed Sep 27 05:05:54 2006
@@ -127,6 +127,8 @@
     }
     obj_table_impl->obj_table.ops->free =
         xml_schema_obj_table_free;
+    obj_table_impl->obj_table.ops->put =
+        xml_schema_obj_table_put;
     obj_table_impl->obj_table.ops->get_count =
         xml_schema_obj_table_get_count;
     obj_table_impl->obj_table.ops->get_item =



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


Mime
View raw message