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 #ifndef GWENHYWFAR_XSD_H
00029 #define GWENHYWFAR_XSD_H
00030
00031 #include <gwenhywfar/gwenhywfarapi.h>
00032 #include <gwenhywfar/bufferedio.h>
00033 #include <gwenhywfar/stringlist.h>
00034 #include <gwenhywfar/types.h>
00035 #include <gwenhywfar/xml.h>
00036 #include <stdio.h>
00037
00038
00039 typedef struct GWEN_XSD_ENGINE GWEN_XSD_ENGINE;
00040
00041
00042 typedef const char* (*GWEN_XSD_GETCHARVALUE_FN)(GWEN_XSD_ENGINE *e,
00043 const char *path,
00044 int idx,
00045 const char *defVal);
00046 typedef int (*GWEN_XSD_GETINTVALUE_FN)(GWEN_XSD_ENGINE *e,
00047 const char *path,
00048 int idx,
00049 int defVal);
00050 typedef const void* (*GWEN_XSD_GETBINVALUE_FN)(GWEN_XSD_ENGINE *e,
00051 const char *path,
00052 int idx,
00053 const void *defVal,
00054 unsigned int defValSize,
00055 unsigned int *returnValueSize);
00056
00057 GWEN_XSD_ENGINE *GWEN_XSD_new();
00058 void GWEN_XSD_free(GWEN_XSD_ENGINE *e);
00059
00060
00061
00062
00063
00064 const char* GWEN_XSD_GetCharValue(GWEN_XSD_ENGINE *e,
00065 const char *path,
00066 int idx,
00067 const char *defVal);
00068 int GWEN_XSD_GetIntValue(GWEN_XSD_ENGINE *e,
00069 const char *path,
00070 int idx,
00071 int defVal);
00072 const void *GWEN_XSD_GetBinValue(GWEN_XSD_ENGINE *e,
00073 const char *path,
00074 int idx,
00075 const void *defVal,
00076 unsigned int defValSize,
00077 unsigned int *returnValueSize);
00078
00079 int GWEN_XSD_ImportSchema(GWEN_XSD_ENGINE *e,
00080 GWEN_XMLNODE *xmlNode,
00081 const char *fname);
00082
00083 const char *GWEN_XSD_GetCurrentTargetNameSpace(const GWEN_XSD_ENGINE *e);
00084 int GWEN_XSD_SetCurrentTargetNameSpace(GWEN_XSD_ENGINE *e, const char *s);
00085
00086 int GWEN_XSD_SetNamespace(GWEN_XSD_ENGINE *e,
00087 const char *prefix,
00088 const char *name,
00089 const char *url,
00090 const char *localUrl);
00091
00092 int GWEN_XSD_ImportStart(GWEN_XSD_ENGINE *e);
00093 int GWEN_XSD_ImportEnd(GWEN_XSD_ENGINE *e);
00094
00095
00096 int GWEN_XSD_ProfileToXml(GWEN_XSD_ENGINE *e,
00097 GWEN_XMLNODE *n);
00098
00099 int GWEN_XSD_ProfileFromXml(GWEN_XSD_ENGINE *e,
00100 GWEN_XMLNODE *nRoot);
00101
00102 int GWEN_XSD_GlobalizeNode(GWEN_XSD_ENGINE *e,
00103 GWEN_XMLNODE *node);
00104
00105
00106 #endif