Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 1 | /* |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 2 | * Summary: implementation of XML Schema Datatypes |
| 3 | * Description: module providing the XML Schema Datatypes implementation |
| 4 | * both definition and validity checking |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 5 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 6 | * Copy: See Copyright for the status of this software. |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 7 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 8 | * Author: Daniel Veillard |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | |
| 12 | #ifndef __XML_SCHEMA_TYPES_H__ |
| 13 | #define __XML_SCHEMA_TYPES_H__ |
| 14 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 15 | #include <libxml/xmlversion.h> |
Igor Zlatkovic | 7ae91bc | 2002-11-08 17:18:52 +0000 | [diff] [blame] | 16 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 17 | #ifdef LIBXML_SCHEMAS_ENABLED |
| 18 | |
| 19 | #include <libxml/schemasInternals.h> |
Daniel Veillard | 8bc6cf9 | 2003-02-27 17:42:22 +0000 | [diff] [blame] | 20 | #include <libxml/xmlschemas.h> |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 21 | |
| 22 | #ifdef __cplusplus |
| 23 | extern "C" { |
| 24 | #endif |
| 25 | |
Kasimier T. Buchcik | 6e224f1 | 2005-02-17 11:10:44 +0000 | [diff] [blame] | 26 | typedef enum { |
| 27 | XML_SCHEMA_WHITESPACE_UNKNOWN = 0, |
| 28 | XML_SCHEMA_WHITESPACE_PRESERVE = 1, |
| 29 | XML_SCHEMA_WHITESPACE_REPLACE = 2, |
| 30 | XML_SCHEMA_WHITESPACE_COLLAPSE = 3 |
| 31 | } xmlSchemaWhitespaceValueType; |
| 32 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 33 | XMLPUBFUN void XMLCALL |
| 34 | xmlSchemaInitTypes (void); |
| 35 | XMLPUBFUN void XMLCALL |
| 36 | xmlSchemaCleanupTypes (void); |
| 37 | XMLPUBFUN xmlSchemaTypePtr XMLCALL |
| 38 | xmlSchemaGetPredefinedType (const xmlChar *name, |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 39 | const xmlChar *ns); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 40 | XMLPUBFUN int XMLCALL |
| 41 | xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type, |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 42 | const xmlChar *value, |
| 43 | xmlSchemaValPtr *val); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 44 | XMLPUBFUN int XMLCALL |
| 45 | xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type, |
Daniel Veillard | c3da18a | 2003-03-18 00:31:04 +0000 | [diff] [blame] | 46 | const xmlChar *value, |
| 47 | xmlSchemaValPtr *val, |
| 48 | xmlNodePtr node); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 49 | XMLPUBFUN int XMLCALL |
| 50 | xmlSchemaValidateFacet (xmlSchemaTypePtr base, |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 51 | xmlSchemaFacetPtr facet, |
| 52 | const xmlChar *value, |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 53 | xmlSchemaValPtr val); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 54 | XMLPUBFUN void XMLCALL |
| 55 | xmlSchemaFreeValue (xmlSchemaValPtr val); |
| 56 | XMLPUBFUN xmlSchemaFacetPtr XMLCALL |
| 57 | xmlSchemaNewFacet (void); |
| 58 | XMLPUBFUN int XMLCALL |
| 59 | xmlSchemaCheckFacet (xmlSchemaFacetPtr facet, |
Daniel Veillard | 8bc6cf9 | 2003-02-27 17:42:22 +0000 | [diff] [blame] | 60 | xmlSchemaTypePtr typeDecl, |
| 61 | xmlSchemaParserCtxtPtr ctxt, |
| 62 | const xmlChar *name); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 63 | XMLPUBFUN void XMLCALL |
| 64 | xmlSchemaFreeFacet (xmlSchemaFacetPtr facet); |
| 65 | XMLPUBFUN int XMLCALL |
| 66 | xmlSchemaCompareValues (xmlSchemaValPtr x, |
Daniel Veillard | 80b1909 | 2003-03-28 13:29:53 +0000 | [diff] [blame] | 67 | xmlSchemaValPtr y); |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 68 | XMLPUBFUN xmlSchemaTypePtr XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 69 | xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type); |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 70 | XMLPUBFUN int XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 71 | xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet, |
| 72 | const xmlChar *value, |
| 73 | unsigned long actualLen, |
| 74 | unsigned long *expectedLen); |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 75 | XMLPUBFUN xmlSchemaTypePtr XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 76 | xmlSchemaGetBuiltInType (xmlSchemaValType type); |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 77 | XMLPUBFUN int XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 78 | xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type, |
| 79 | int facetType); |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 80 | XMLPUBFUN xmlChar * XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 81 | xmlSchemaCollapseString (const xmlChar *value); |
| 82 | XMLPUBFUN xmlChar * XMLCALL |
| 83 | xmlSchemaWhiteSpaceReplace (const xmlChar *value); |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 84 | XMLPUBFUN unsigned long XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 85 | xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet); |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 86 | XMLPUBFUN int XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 87 | xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type, |
| 88 | xmlSchemaFacetPtr facet, |
| 89 | const xmlChar *value, |
| 90 | xmlSchemaValPtr val, |
| 91 | unsigned long *length) ; |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 92 | XMLPUBFUN int XMLCALL |
Kasimier T. Buchcik | 91feaf8 | 2004-11-12 14:04:58 +0000 | [diff] [blame] | 93 | xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, |
| 94 | const xmlChar *value, |
| 95 | xmlSchemaValPtr *val, |
| 96 | xmlNodePtr node); |
Kasimier T. Buchcik | 6e224f1 | 2005-02-17 11:10:44 +0000 | [diff] [blame] | 97 | XMLPUBFUN int XMLCALL |
| 98 | xmlSchemaGetCanonValue (xmlSchemaValPtr val, |
| 99 | const xmlChar **retValue); |
| 100 | XMLPUBFUN xmlSchemaValPtr XMLCALL |
| 101 | xmlSchemaNewStringValue (xmlSchemaValType type, |
| 102 | const xmlChar *value); |
Kasimier T. Buchcik | b06b4de | 2005-02-17 19:00:23 +0000 | [diff] [blame] | 103 | XMLPUBFUN xmlSchemaValPtr XMLCALL |
| 104 | xmlSchemaNewNOTATIONValue (const xmlChar *name, |
| 105 | const xmlChar *ns); |
| 106 | |
Kasimier T. Buchcik | 6e224f1 | 2005-02-17 11:10:44 +0000 | [diff] [blame] | 107 | XMLPUBFUN int XMLCALL |
| 108 | xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x, |
| 109 | xmlSchemaWhitespaceValueType xws, |
| 110 | xmlSchemaValPtr y, |
Kasimier T. Buchcik | 285ebab | 2005-03-04 18:04:59 +0000 | [diff] [blame^] | 111 | xmlSchemaWhitespaceValueType yws); |
| 112 | XMLPUBFUN xmlSchemaValPtr XMLCALL |
| 113 | xmlSchemaCopyValue (xmlSchemaValPtr val); |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 114 | |
| 115 | #ifdef __cplusplus |
| 116 | } |
| 117 | #endif |
| 118 | |
| 119 | #endif /* LIBXML_SCHEMAS_ENABLED */ |
| 120 | #endif /* __XML_SCHEMA_TYPES_H__ */ |