diff options
author | Dmitry Stogov <dmitry@php.net> | 2004-01-22 15:58:03 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2004-01-22 15:58:03 +0000 |
commit | ec2950854aa4ac1a05c1108d1b50758bfe854bdf (patch) | |
tree | f1d865b2e39d4d9bf5394a2bc274bb2973ea7a61 /ext/soap/php_sdl.h | |
parent | 0dd6bd1d9f76a9202e4f88542631368b03c92c8c (diff) | |
download | php-git-ec2950854aa4ac1a05c1108d1b50758bfe854bdf.tar.gz |
XML Schema support was improved
support for content model (<sequence>,<all>,<choice>)
support for top-level <group>
support for <group> 'ref' attribute
support for content model encoding/decoding (incomplete)
support for attribute encoding/decoding (incomplete)
support for <attribute> with inline anonymous <simpleType>
Diffstat (limited to 'ext/soap/php_sdl.h')
-rw-r--r-- | ext/soap/php_sdl.h | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h index fd072f27b5..68812cd0b5 100644 --- a/ext/soap/php_sdl.h +++ b/ext/soap/php_sdl.h @@ -24,6 +24,7 @@ struct _sdl { HashTable *requests; /* array of sdlFunction (references) */ HashTable *attributes; /* array of sdlAttributePtr */ HashTable *attributeGroups; /* array of sdlTypesPtr */ + HashTable *groups; /* array of sdlTypesPtr */ char *target_ns; char *source; }; @@ -44,8 +45,8 @@ struct _sdlSoapBinding { struct _sdlSoapBindingFunctionBody { char *ns; int use; - char *parts; /* not implemented yet */ - char *encodingStyle; /* not implemented yet */ + char *parts; /* not implemented yet */ + char *encodingStyle; /* not implemented yet */ }; struct _sdlSoapBindingFunction { @@ -57,14 +58,6 @@ struct _sdlSoapBindingFunction { sdlSoapBindingFunctionBody falut; }; -/* HTTP Binding Specfic stuff */ -/*********** not implemented yet ************ -struct _sdlHttpBinding -{ - int holder; -}; -*********************************************/ - struct _sdlRestrictionInt { int value; char fixed; @@ -78,7 +71,7 @@ struct _sdlRestrictionChar { }; struct _sdlRestrictions { - HashTable *enumeration; /* array of sdlRestrictionCharPtr */ + HashTable *enumeration; /* array of sdlRestrictionCharPtr */ sdlRestrictionIntPtr minExclusive; sdlRestrictionIntPtr minInclusive; sdlRestrictionIntPtr maxExclusive; @@ -92,15 +85,35 @@ struct _sdlRestrictions { sdlRestrictionCharPtr pattern; }; +typedef enum _sdlContentKind { + XSD_CONTENT_ELEMENT, + XSD_CONTENT_SEQUENCE, + XSD_CONTENT_ALL, + XSD_CONTENT_CHOICE, + XSD_CONTENT_GROUP_REF, + XSD_CONTENT_GROUP +} sdlContentKind; + + +typedef struct _sdlContentModel sdlContentModel, *sdlContentModelPtr; + +struct _sdlContentModel { + sdlContentKind kind; + int min_occurs; + int max_occurs; + union { + sdlTypePtr element; /* pointer to element */ + sdlContentModelPtr group; /* pointer to group */ + HashTable *content; /* array of sdlContentModel for sequnce,all,choice*/ + char *group_ref; /* reference to group */ + } u; +}; + typedef enum _sdlTypeKind { - XSD_TYPEKIND_UNKNOWN, XSD_TYPEKIND_SIMPLE, - XSD_TYPEKIND_COMPLEX, XSD_TYPEKIND_LIST, XSD_TYPEKIND_UNION, - XSD_TYPEKIND_ALL, - XSD_TYPEKIND_SEQUENCE, - XSD_TYPEKIND_CHOICE + XSD_TYPEKIND_COMPLEX } sdlTypeKind; struct _sdlType { @@ -108,13 +121,12 @@ struct _sdlType { char *name; char *namens; int nillable; - int min_occurs; - int max_occurs; - HashTable *elements; /* array of sdlTypePtr */ - HashTable *attributes; /* array of sdlAttributePtr */ + HashTable *elements; /* array of sdlTypePtr */ + HashTable *attributes; /* array of sdlAttributePtr */ sdlRestrictionsPtr restrictions; encodePtr encode; char *ref; + sdlContentModelPtr model; }; struct _sdlParam { @@ -127,10 +139,10 @@ struct _sdlFunction { char *functionName; char *requestName; char *responseName; - HashTable *requestParameters; /* array of sdlParamPtr */ - HashTable *responseParameters; /* array of sdlParamPtr (this should only be one) */ + HashTable *requestParameters; /* array of sdlParamPtr */ + HashTable *responseParameters; /* array of sdlParamPtr (this should only be one) */ struct _sdlBinding* binding; - void* bindingAttributes; /* sdlSoapBindingFunctionPtr */ + void* bindingAttributes; /* sdlSoapBindingFunctionPtr */ }; struct _sdlAttribute { @@ -140,9 +152,9 @@ struct _sdlAttribute { char *id; char *name; char *ref; - char *type; char *use; HashTable *extraAttributes; /* array of xmlNodePtr */ + encodePtr encode; }; sdlPtr get_sdl(char *uri); |