00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #import "imports.h"
00038
00039 class xs__schema;
00040 class xs__simpleType;
00041 class xs__complexType;
00042 class xs__extension;
00043 class xs__restriction;
00044 class xs__sequence;
00045 class xs__choice;
00046 class xs__list;
00047 class xs__union;
00048
00049 class xs__element
00050 { public:
00051
00052 @xsd__NCName name;
00053 @xsd__QName ref;
00054 @xsd__QName type;
00055 @xsd__string default_;
00056 @xsd__string fixed;
00057 @xsd__boolean nillable = false;
00058 @xsd__string minOccurs;
00059 @xsd__string maxOccurs;
00060 xs__simpleType *simpleType;
00061 xs__complexType *complexType;
00062 private:
00063 xs__schema *schemaRef;
00064 xs__element *elementRef;
00065 xs__simpleType *simpleTypeRef;
00066 xs__complexType *complexTypeRef;
00067 public:
00068 xs__element();
00069 ~xs__element();
00070 int traverse(xs__schema&);
00071 void schemaPtr(xs__schema*);
00072 void elementPtr(xs__element*);
00073 void simpleTypePtr(xs__simpleType*);
00074 void complexTypePtr(xs__complexType*);
00075 xs__schema *schemaPtr() const;
00076 xs__element *elementPtr() const;
00077 xs__simpleType *simpleTypePtr() const;
00078 xs__complexType *complexTypePtr() const;
00079 };
00080
00081 enum xs__attribute_use { optional, prohibited, required, default_, fixed_ };
00082
00083 class xs__attribute
00084 { public:
00085 @xsd__NCName name;
00086 @xsd__QName ref;
00087 @xsd__QName type;
00088 @enum xs__attribute_use use = optional;
00089 @xsd__string value;
00090 @xsd__QName wsdl__arrayType;
00091 xs__simpleType *simpleType;
00092 private:
00093 xs__schema *schemaRef;
00094 xs__attribute *attributeRef;
00095 xs__simpleType *simpleTypeRef;
00096 public:
00097 int traverse(xs__schema&);
00098 void schemaPtr(xs__schema*);
00099 void attributePtr(xs__attribute*);
00100 void simpleTypePtr(xs__simpleType*);
00101 xs__schema *schemaPtr() const;
00102 xs__attribute *attributePtr() const;
00103 xs__simpleType *simpleTypePtr() const;
00104 };
00105
00106 class xs__all
00107 { public:
00108 std::vector<xs__element> element;
00109 public:
00110 int traverse(xs__schema&);
00111 };
00112
00113 enum xs__processContents { strict, skip, lax };
00114
00115 typedef char *xs__namespaceList;
00116
00117 class xs__any
00118 { public:
00119 @xs__namespaceList namespace_ = "##any";
00120 @enum xs__processContents processContents = strict;
00121 @xsd__string minOccurs;
00122 @xsd__string maxOccurs;
00123 std::vector<xs__element> element;
00124 public:
00125 int traverse(xs__schema&);
00126 };
00127
00128 class xs__group
00129 { public:
00130 @xsd__NCName name;
00131 @xsd__QName ref;
00132 xs__all *all;
00133 xs__choice *choice;
00134 xs__sequence *sequence;
00135 private:
00136 xs__schema *schemaRef;
00137 xs__group *groupRef;
00138 public:
00139 int traverse(xs__schema&);
00140 void schemaPtr(xs__schema*);
00141 void groupPtr(xs__group*);
00142 xs__schema *schemaPtr() const;
00143 xs__group *groupPtr() const;
00144 };
00145
00146 class xs__choice
00147 { public:
00148 @xsd__string minOccurs;
00149 @xsd__string maxOccurs;
00150 std::vector<xs__element> element;
00151 std::vector<xs__group> group;
00152
00153 std::vector<xs__sequence*> sequence;
00154 std::vector<xs__any> any;
00155 public:
00156 int traverse(xs__schema&);
00157 };
00158
00159 class xs__sequence
00160 { public:
00161 @xsd__string minOccurs;
00162 @xsd__string maxOccurs;
00163 std::vector<xs__element> element;
00164 std::vector<xs__group> group;
00165 std::vector<xs__choice> choice;
00166
00167 std::vector<xs__any> any;
00168 public:
00169 int traverse(xs__schema&);
00170 };
00171
00172 class xs__attributeGroup
00173 { public:
00174 @xsd__NCName name;
00175 @xsd__QName ref;
00176 std::vector<xs__attribute> attribute;
00177 private:
00178 xs__schema *schemaRef;
00179 xs__attributeGroup *attributeGroupRef;
00180 public:
00181 int traverse(xs__schema&);
00182 void schemaPtr(xs__schema*);
00183 void attributeGroupPtr(xs__attributeGroup*);
00184 xs__schema *schemaPtr() const;
00185 xs__attributeGroup *attributeGroupPtr() const;
00186 };
00187
00188 class xs__anyAttribute
00189 { public:
00190 @xs__namespaceList namespace_ = "##any";
00191 @enum xs__processContents processContents = strict;
00192 };
00193
00194 class xs__enumeration
00195 { public:
00196 @xsd__string value;
00197 public:
00198 int traverse(xs__schema&);
00199 };
00200
00201 class xs__pattern
00202 { public:
00203 @xsd__string value;
00204 public:
00205 int traverse(xs__schema&);
00206 };
00207
00208 class xs__simpleContent
00209 { public:
00210 xs__extension *extension;
00211 xs__restriction *restriction;
00212 public:
00213 int traverse(xs__schema&);
00214 };
00215
00216 class xs__simpleType
00217 { public:
00218 @xsd__NMTOKEN name;
00219 xs__restriction *restriction;
00220 xs__list *list;
00221 xs__union *union_;
00222 private:
00223 xs__schema *schemaRef;
00224 int level;
00225 public:
00226 xs__simpleType();
00227 ~xs__simpleType();
00228 int traverse(xs__schema&);
00229 void schemaPtr(xs__schema*);
00230 xs__schema *schemaPtr() const;
00231 int baseLevel();
00232 };
00233
00234 class xs__extension
00235 { public:
00236 @xsd__QName base;
00237 xs__group *group;
00238 xs__all *all;
00239 xs__choice *choice;
00240 xs__sequence *sequence;
00241 std::vector<xs__attribute> attribute;
00242 private:
00243 xs__simpleType *simpleTypeRef;
00244 xs__complexType *complexTypeRef;
00245 public:
00246 int traverse(xs__schema&);
00247 void simpleTypePtr(xs__simpleType*);
00248 void complexTypePtr(xs__complexType*);
00249 xs__simpleType *simpleTypePtr() const;
00250 xs__complexType *complexTypePtr() const;
00251 };
00252
00253 class xs__length
00254 { public:
00255 @xsd__string value;
00256 };
00257
00258 class xs__whiteSpace
00259 { public:
00260 @xsd__string value;
00261 };
00262
00263 class xs__restriction
00264 { public:
00265 @xsd__QName base;
00266 xs__group *group;
00267 xs__all *all;
00268 xs__choice *choice;
00269 xs__sequence *sequence;
00270 std::vector<xs__attribute> attribute;
00271 std::vector<xs__enumeration> enumeration;
00272 std::vector<xs__pattern> pattern;
00273 xs__length *minLength;
00274 xs__length *maxLength;
00275 xs__whiteSpace *whiteSpace;
00276 private:
00277 xs__simpleType *simpleTypeRef;
00278 xs__complexType *complexTypeRef;
00279 public:
00280 int traverse(xs__schema&);
00281 void simpleTypePtr(xs__simpleType*);
00282 void complexTypePtr(xs__complexType*);
00283 xs__simpleType *simpleTypePtr() const;
00284 xs__complexType *complexTypePtr() const;
00285 };
00286
00287 class xs__list
00288 { public:
00289 @xsd__QName itemType;
00290 xs__restriction *restriction;
00291 std::vector<xs__simpleType> simpleType;
00292 private:
00293 xs__simpleType *itemTypeRef;
00294 public:
00295 int traverse(xs__schema&);
00296 void itemTypePtr(xs__simpleType*);
00297 xs__simpleType *itemTypePtr() const;
00298 };
00299
00300 class xs__union
00301 { public:
00302 @xsd__NMTOKENS memberTypes;
00303 std::vector<xs__simpleType> simpleType;
00304 public:
00305 int traverse(xs__schema&);
00306 };
00307
00308 class xs__complexContent
00309 { public:
00310 @xsd__boolean mixed = false;
00311 xs__extension *extension;
00312 xs__restriction *restriction;
00313 public:
00314 int traverse(xs__schema&);
00315 };
00316
00317 class xs__complexType
00318 { public:
00319 @xsd__NMTOKEN name;
00320 @xsd__boolean abstract = false;
00321 xs__simpleContent *simpleContent;
00322 xs__complexContent *complexContent;
00323 xs__all *all;
00324 xs__choice *choice;
00325 xs__sequence *sequence;
00326 xs__any *any;
00327 std::vector<xs__attribute> attribute;
00328 std::vector<xs__attributeGroup> attributeGroup;
00329 xs__anyAttribute *anyAttribute;
00330 private:
00331 xs__schema *schemaRef;
00332 int level;
00333 public:
00334 xs__complexType();
00335 ~xs__complexType();
00336 int traverse(xs__schema&);
00337 void schemaPtr(xs__schema*);
00338 xs__schema *schemaPtr() const;
00339 int baseLevel();
00340 };
00341
00342 class xs__import
00343 { public:
00344 @xsd__anyURI namespace_;
00345 @xsd__anyURI schemaLocation;
00346 private:
00347 xs__schema *schemaRef;
00348 public:
00349 xs__import();
00350 ~xs__import();
00351 int traverse(xs__schema&);
00352 void schemaPtr(xs__schema*);
00353 xs__schema *schemaPtr() const;
00354 };
00355
00356 class xs__include
00357 { public:
00358 @xsd__anyURI schemaLocation;
00359 private:
00360 xs__schema *schemaRef;
00361 public:
00362 int traverse(xs__schema&);
00363 void schemaPtr(xs__schema*);
00364 xs__schema *schemaPtr() const;
00365 };
00366
00367 enum xs__formChoice { unqualified, qualified };
00368
00369 class xs__schema
00370 { public:
00371 @xsd__anyURI targetNamespace;
00372 @xsd__string version;
00373 @enum xs__formChoice attributeFormDefault = unqualified;
00374 @enum xs__formChoice elementFormDefault = unqualified;
00375 std::vector<xs__include> include;
00376 std::vector<xs__import> import;
00377 std::vector<xs__attribute> attribute;
00378 std::vector<xs__element> element;
00379 std::vector<xs__group> group;
00380 std::vector<xs__attributeGroup> attributeGroup;
00381 std::vector<xs__simpleType> simpleType;
00382 std::vector<xs__complexType> complexType;
00383 struct soap *soap;
00384 private:
00385 SetOfString builtinTypeSet;
00386 SetOfString builtinElementSet;
00387 SetOfString builtinAttributeSet;
00388 public:
00389 xs__schema();
00390 xs__schema(struct soap*);
00391 xs__schema(struct soap*, const char*);
00392 ~xs__schema();
00393 int traverse();
00394 int read(const char*);
00395 int error();
00396 void print_fault();
00397 void builtinType(const char*);
00398 void builtinElement(const char*);
00399 void builtinAttribute(const char*);
00400 const SetOfString& builtinTypes() const;
00401 const SetOfString& builtinElements() const;
00402 const SetOfString& builtinAttributes() const;
00403 friend ostream& operator<<(ostream&, const xs__schema&);
00404 friend istream& operator>>(istream&, xs__schema&);
00405 };
00406
00407 extern ostream &operator<<(ostream &o, const xs__schema &e);
00408 extern istream &operator>>(istream &i, xs__schema &e);
00409