xml_schema_builder.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef XML_SCHEMA_BUILDER_H
00019 #define XML_SCHEMA_BUILDER_H
00020 
00029 #include <xml_schema_defines.h>
00030 #include <xml_schema_annotated.h>
00031 #include <xml_schema.h>
00032 #include <axiom.h>
00033 #include <axis2_hash.h>
00034 #include <xml_schema_collection.h>
00035 #include <axiom_util.h>
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046 
00047 
00048 
00049 typedef struct xml_schema_builder 
00050                     xml_schema_builder_t;
00051 typedef struct xml_schema_builder_ops 
00052                     xml_schema_builder_ops_t;
00053 
00054 #define XML_SCHEMA_NS "http://www.w3.org/2001/XMLSchema"
00055 
00056 
00057 struct xml_schema_builder_ops
00058 {
00059     xml_schema_t* (AXIS2_CALL *
00060     build)(
00061             xml_schema_builder_t *builder,
00062             const axis2_env_t *env,
00063             axiom_document_t *om_doc,
00064             axis2_char_t *uri);
00065            
00066     xml_schema_t* (AXIS2_CALL *
00067     build_with_root_node)(
00068             xml_schema_builder_t *builder,
00069             const axis2_env_t *env,
00070             axiom_node_t *om_node,
00071             axis2_char_t *uri);
00072             
00073     axis2_status_t (AXIS2_CALL *
00074     free)(xml_schema_builder_t *builder,
00075           const axis2_env_t *env);            
00076 };
00077 
00078 struct xml_schema_builder
00079 {
00080     xml_schema_builder_ops_t *ops;
00081 };
00082 
00083 
00084 AXIS2_EXTERN xml_schema_builder_t * AXIS2_CALL
00085 xml_schema_builder_create(
00086         const axis2_env_t *env,
00087         xml_schema_collection_t *sch_collection);
00088 
00089 /***************** Macros *****************************************************/
00090 
00091 #define XML_SCHEMA_BUILDER_FREE(builder, env) \
00092         ((builder)->ops->free(builder, env))
00093 
00094 #define XML_SCHEMA_BUILDER_BUILD(builder, env, om_doc, uri) \
00095         ((builder)->ops->build(builder, env, om_doc, uri))
00096         
00097 #define XML_SCHEMA_BUILDER_BUILD_WITH_ROOT_NODE(builder, env, om_node, uri) \
00098         ((builder)->ops->build_with_root_node(builder, env, om_node, uri))
00099         
00100 /**************** end macros **************************************************/
00101 
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106 #endif /* XML_SCHEMA_BUILDER_H */

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1