1 /****************************************************************** 2 * $Id: xsd2c.h,v 1.3 2004/10/15 13:35:39 snowdrop Exp $ 3 * 4 * CSOAP Project: A SOAP client/server library in C 5 * Copyright (C) 2003 Ferhat Ayaz 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library; if not, write to the 19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 * Boston, MA 02111-1307, USA. 21 * 22 * Email: ayaz@jprogrammer.net 23 */ 24 #ifndef XSD2C_H 25 #define XSD2C_H 26 27 #include <libxml/tree.h> 28 29 30 31 #define XSD_ALL_STR "all" 32 #define XSD_ANNOTATION_STR "annotation" 33 #define XSD_ANY_STR "" 34 #define XSD_ANY_ATTRIBUTE_STR "any" 35 #define XSD_APPINFO_STR "appInfo" 36 #define XSD_ATTRIBUTE_STR "attribute" 37 #define XSD_ATTRIBUTE_GROUP_STR "attributeGroup" 38 #define XSD_CHOICE_STR "choice" 39 #define XSD_COMPLEX_TYPE_STR "complexType" 40 #define XSD_COMPLEX_CONTENT_STR "complexContent" 41 #define XSD_DOCUMENTATION_STR "documentation" 42 #define XSD_ELEMENT_STR "element" 43 #define XSD_ENUMERATION_STR "enumeration" 44 #define XSD_EXTENSION_STR "extension" 45 #define XSD_FIELD_STR "field" 46 #define XSD_GROUP_STR "group" 47 #define XSD_IMPORT_STR "import" 48 #define XSD_INCLUDE_STR "include" 49 #define XSD_KEY_STR "key" 50 #define XSD_KEYREF_STR "keyref" 51 #define XSD_LIST_STR "list" 52 #define XSD_NOTATION_STR "notation" 53 #define XSD_REDEFINE_STR "redefine" 54 #define XSD_RESTRICTION_STR "restriction" 55 #define XSD_SCHEMA_STR "schema" 56 #define XSD_SELECTOR_STR "selector" 57 #define XSD_SEQUENCE_STR "sequence" 58 #define XSD_SIMPLE_CONTENT_STR "simpleContent" 59 #define XSD_SIMPLE_TYPE_STR "simpleType" 60 #define XSD_UNION_STR "union" 61 #define XSD_UNIQUE_STR "unique" 62 #define XSD_MIN_INCLUSIVE_STR "minInclusive" 63 #define XSD_MAX_INCLUSIVE_STR "maxInclusive" 64 #define XSD_MIN_EXCLUSIVE_STR "minExclusive" 65 #define XSD_MAX_EXCLUSIVE_STR "maxExclusive" 66 67 #define ATTR_TYPE_STR "type" 68 #define ATTR_NAME_STR "name" 69 #define ATTR_BASE_STR "base" 70 #define ATTR_VALUE_STR "value" 71 #define ATTR_MIN_OCCURS_STR "minOccurs" 72 #define ATTR_MAX_OCCURS_STR "maxOccurs" 73 74 #define ATTR_VALUE_UNBOUNDED "unbounded" 75 76 enum _xsdAttr 77 { 78 ATTR_UNKNOWN, 79 ATTR_TYPE, 80 ATTR_NAME, 81 ATTR_BASE, 82 ATTR_MIN_OCCURS, 83 ATTR_MAX_OCCURS 84 }; 85 86 enum _xsdKeyword 87 { 88 XSD_UNKNOWN, 89 XSD_ALL, 90 XSD_ANNOTATION, 91 XSD_ANY, 92 XSD_ANY_ATTRIBUTE, 93 XSD_APPINFO, 94 XSD_ATTRIBUTE, 95 XSD_ATTRIBUTE_GROUP, 96 XSD_CHOICE, 97 XSD_COMPLEX_TYPE, 98 XSD_COMPLEX_CONTENT, 99 XSD_DOCUMENTATION, 100 XSD_ELEMENT, 101 XSD_ENUMERATION, 102 XSD_EXTENSION, 103 XSD_FIELD, 104 XSD_GROUP, 105 XSD_IMPORT, 106 XSD_INCLUDE, 107 XSD_KEY, 108 XSD_KEYREF, 109 XSD_LIST, 110 XSD_NOTATION, 111 XSD_REDEFINE, 112 XSD_RESTRICTION, 113 XSD_SCHEMA, 114 XSD_SELECTOR, 115 XSD_SEQUENCE, 116 XSD_SIMPLE_CONTENT, 117 XSD_SIMPLE_TYPE, 118 XSD_UNION, 119 XSD_UNIQUE, 120 XSD_MIN_INCLUSIVE, 121 XSD_MAX_INCLUSIVE, 122 XSD_MIN_EXCLUSIVE, 123 XSD_MAX_EXCLUSIVE, 124 }; 125 126 typedef enum _xsdKeyword xsdKeyword; 127 typedef enum _xsdAttr xsdAttr; 128 129 int xsdEngineRun(xmlNodePtr xsdNode, const char* destDir); 130 void xsdSetDestDir(const char* destDir); 131 xmlNodePtr xsdLoadFile(const char* filename); 132 xmlNodePtr wsdlLoadFile(const char* filename); 133 134 #endif 135