00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __XML_SCHEMA_TYPES_H__
00013 #define __XML_SCHEMA_TYPES_H__
00014
00015 #include <libxml/xmlversion.h>
00016
00017 #ifdef LIBXML_SCHEMAS_ENABLED
00018
00019 #include <libxml/schemasInternals.h>
00020 #include <libxml/xmlschemas.h>
00021
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00026 typedef enum {
00027 XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
00028 XML_SCHEMA_WHITESPACE_PRESERVE = 1,
00029 XML_SCHEMA_WHITESPACE_REPLACE = 2,
00030 XML_SCHEMA_WHITESPACE_COLLAPSE = 3
00031 } xmlSchemaWhitespaceValueType;
00032
00033 XMLPUBFUN void XMLCALL
00034 xmlSchemaInitTypes (void);
00035 XMLPUBFUN void XMLCALL
00036 xmlSchemaCleanupTypes (void);
00037 XMLPUBFUN xmlSchemaTypePtr XMLCALL
00038 xmlSchemaGetPredefinedType (const xmlChar *name,
00039 const xmlChar *ns);
00040 XMLPUBFUN int XMLCALL
00041 xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
00042 const xmlChar *value,
00043 xmlSchemaValPtr *val);
00044 XMLPUBFUN int XMLCALL
00045 xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
00046 const xmlChar *value,
00047 xmlSchemaValPtr *val,
00048 xmlNodePtr node);
00049 XMLPUBFUN int XMLCALL
00050 xmlSchemaValidateFacet (xmlSchemaTypePtr base,
00051 xmlSchemaFacetPtr facet,
00052 const xmlChar *value,
00053 xmlSchemaValPtr val);
00054 XMLPUBFUN int XMLCALL
00055 xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
00056 xmlSchemaWhitespaceValueType fws,
00057 xmlSchemaValType valType,
00058 const xmlChar *value,
00059 xmlSchemaValPtr val,
00060 xmlSchemaWhitespaceValueType ws);
00061 XMLPUBFUN void XMLCALL
00062 xmlSchemaFreeValue (xmlSchemaValPtr val);
00063 XMLPUBFUN xmlSchemaFacetPtr XMLCALL
00064 xmlSchemaNewFacet (void);
00065 XMLPUBFUN int XMLCALL
00066 xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
00067 xmlSchemaTypePtr typeDecl,
00068 xmlSchemaParserCtxtPtr ctxt,
00069 const xmlChar *name);
00070 XMLPUBFUN void XMLCALL
00071 xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
00072 XMLPUBFUN int XMLCALL
00073 xmlSchemaCompareValues (xmlSchemaValPtr x,
00074 xmlSchemaValPtr y);
00075 XMLPUBFUN xmlSchemaTypePtr XMLCALL
00076 xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
00077 XMLPUBFUN int XMLCALL
00078 xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
00079 const xmlChar *value,
00080 unsigned long actualLen,
00081 unsigned long *expectedLen);
00082 XMLPUBFUN xmlSchemaTypePtr XMLCALL
00083 xmlSchemaGetBuiltInType (xmlSchemaValType type);
00084 XMLPUBFUN int XMLCALL
00085 xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
00086 int facetType);
00087 XMLPUBFUN xmlChar * XMLCALL
00088 xmlSchemaCollapseString (const xmlChar *value);
00089 XMLPUBFUN xmlChar * XMLCALL
00090 xmlSchemaWhiteSpaceReplace (const xmlChar *value);
00091 XMLPUBFUN unsigned long XMLCALL
00092 xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
00093 XMLPUBFUN int XMLCALL
00094 xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
00095 xmlSchemaFacetPtr facet,
00096 const xmlChar *value,
00097 xmlSchemaValPtr val,
00098 unsigned long *length);
00099 XMLPUBFUN int XMLCALL
00100 xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
00101 xmlSchemaValType valType,
00102 const xmlChar *value,
00103 xmlSchemaValPtr val,
00104 unsigned long *length,
00105 xmlSchemaWhitespaceValueType ws);
00106 XMLPUBFUN int XMLCALL
00107 xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
00108 const xmlChar *value,
00109 xmlSchemaValPtr *val,
00110 xmlNodePtr node);
00111 XMLPUBFUN int XMLCALL
00112 xmlSchemaGetCanonValue (xmlSchemaValPtr val,
00113 const xmlChar **retValue);
00114 XMLPUBFUN int XMLCALL
00115 xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
00116 const xmlChar **retValue,
00117 xmlSchemaWhitespaceValueType ws);
00118 XMLPUBFUN int XMLCALL
00119 xmlSchemaValueAppend (xmlSchemaValPtr prev,
00120 xmlSchemaValPtr cur);
00121 XMLPUBFUN xmlSchemaValPtr XMLCALL
00122 xmlSchemaValueGetNext (xmlSchemaValPtr cur);
00123 XMLPUBFUN const xmlChar * XMLCALL
00124 xmlSchemaValueGetAsString (xmlSchemaValPtr val);
00125 XMLPUBFUN int XMLCALL
00126 xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
00127 XMLPUBFUN xmlSchemaValPtr XMLCALL
00128 xmlSchemaNewStringValue (xmlSchemaValType type,
00129 const xmlChar *value);
00130 XMLPUBFUN xmlSchemaValPtr XMLCALL
00131 xmlSchemaNewNOTATIONValue (const xmlChar *name,
00132 const xmlChar *ns);
00133 XMLPUBFUN xmlSchemaValPtr XMLCALL
00134 xmlSchemaNewQNameValue (const xmlChar *namespaceName,
00135 const xmlChar *localName);
00136 XMLPUBFUN int XMLCALL
00137 xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
00138 xmlSchemaWhitespaceValueType xws,
00139 xmlSchemaValPtr y,
00140 xmlSchemaWhitespaceValueType yws);
00141 XMLPUBFUN xmlSchemaValPtr XMLCALL
00142 xmlSchemaCopyValue (xmlSchemaValPtr val);
00143 XMLPUBFUN xmlSchemaValType XMLCALL
00144 xmlSchemaGetValType (xmlSchemaValPtr val);
00145
00146 #ifdef __cplusplus
00147 }
00148 #endif
00149
00150 #endif
00151 #endif