File: xmlschemastypes.h

package info (click to toggle)
libxml2 2.15.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,964 kB
  • sloc: ansic: 138,103; python: 6,692; sh: 4,736; xml: 1,476; makefile: 715
file content (158 lines) | stat: -rw-r--r-- 4,542 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/**
 * @file
 * 
 * @brief implementation of XML Schema Datatypes
 * 
 * module providing the XML Schema Datatypes implementation
 *              both definition and validity checking
 *
 * @copyright See Copyright for the status of this software.
 *
 * @author Daniel Veillard
 */


#ifndef __XML_SCHEMA_TYPES_H__
#define __XML_SCHEMA_TYPES_H__

#include <libxml/xmlversion.h>

#ifdef LIBXML_SCHEMAS_ENABLED

#include <libxml/schemasInternals.h>
#include <libxml/xmlschemas.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Schema whitespace value type
 */
typedef enum {
    XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
    XML_SCHEMA_WHITESPACE_PRESERVE = 1,
    XML_SCHEMA_WHITESPACE_REPLACE = 2,
    XML_SCHEMA_WHITESPACE_COLLAPSE = 3
} xmlSchemaWhitespaceValueType;

XMLPUBFUN int
		xmlSchemaInitTypes		(void);
XML_DEPRECATED
XMLPUBFUN void
		xmlSchemaCleanupTypes		(void);
XMLPUBFUN xmlSchemaType *
		xmlSchemaGetPredefinedType	(const xmlChar *name,
						 const xmlChar *ns);
XMLPUBFUN int
		xmlSchemaValidatePredefinedType	(xmlSchemaType *type,
						 const xmlChar *value,
						 xmlSchemaVal **val);
XMLPUBFUN int
		xmlSchemaValPredefTypeNode	(xmlSchemaType *type,
						 const xmlChar *value,
						 xmlSchemaVal **val,
						 xmlNode *node);
XMLPUBFUN int
		xmlSchemaValidateFacet		(xmlSchemaType *base,
						 xmlSchemaFacet *facet,
						 const xmlChar *value,
						 xmlSchemaVal *val);
XMLPUBFUN int
		xmlSchemaValidateFacetWhtsp	(xmlSchemaFacet *facet,
						 xmlSchemaWhitespaceValueType fws,
						 xmlSchemaValType valType,
						 const xmlChar *value,
						 xmlSchemaVal *val,
						 xmlSchemaWhitespaceValueType ws);
XMLPUBFUN void
		xmlSchemaFreeValue		(xmlSchemaVal *val);
XMLPUBFUN xmlSchemaFacet *
		xmlSchemaNewFacet		(void);
XMLPUBFUN int
		xmlSchemaCheckFacet		(xmlSchemaFacet *facet,
						 xmlSchemaType *typeDecl,
						 xmlSchemaParserCtxt *ctxt,
						 const xmlChar *name);
XMLPUBFUN void
		xmlSchemaFreeFacet		(xmlSchemaFacet *facet);
XMLPUBFUN int
		xmlSchemaCompareValues		(xmlSchemaVal *x,
						 xmlSchemaVal *y);
XMLPUBFUN xmlSchemaType *
    xmlSchemaGetBuiltInListSimpleTypeItemType	(xmlSchemaType *type);
XMLPUBFUN int
    xmlSchemaValidateListSimpleTypeFacet	(xmlSchemaFacet *facet,
						 const xmlChar *value,
						 unsigned long actualLen,
						 unsigned long *expectedLen);
XMLPUBFUN xmlSchemaType *
		xmlSchemaGetBuiltInType		(xmlSchemaValType type);
XMLPUBFUN int
		xmlSchemaIsBuiltInTypeFacet	(xmlSchemaType *type,
						 int facetType);
XMLPUBFUN xmlChar *
		xmlSchemaCollapseString		(const xmlChar *value);
XMLPUBFUN xmlChar *
		xmlSchemaWhiteSpaceReplace	(const xmlChar *value);
XMLPUBFUN unsigned long 
		xmlSchemaGetFacetValueAsULong	(xmlSchemaFacet *facet);
XMLPUBFUN int
		xmlSchemaValidateLengthFacet	(xmlSchemaType *type,
						 xmlSchemaFacet *facet,
						 const xmlChar *value,
						 xmlSchemaVal *val,
						 unsigned long *length);
XMLPUBFUN int
		xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacet *facet,
						  xmlSchemaValType valType,
						  const xmlChar *value,
						  xmlSchemaVal *val,
						  unsigned long *length,
						  xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int
		xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaType *type,
						 const xmlChar *value,
						 xmlSchemaVal **val,
						 xmlNode *node);
XMLPUBFUN int
		xmlSchemaGetCanonValue		(xmlSchemaVal *val,
						 const xmlChar **retValue);
XMLPUBFUN int
		xmlSchemaGetCanonValueWhtsp	(xmlSchemaVal *val,
						 const xmlChar **retValue,
						 xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int
		xmlSchemaValueAppend		(xmlSchemaVal *prev,
						 xmlSchemaVal *cur);
XMLPUBFUN xmlSchemaVal *
		xmlSchemaValueGetNext		(xmlSchemaVal *cur);
XMLPUBFUN const xmlChar *
		xmlSchemaValueGetAsString	(xmlSchemaVal *val);
XMLPUBFUN int
		xmlSchemaValueGetAsBoolean	(xmlSchemaVal *val);
XMLPUBFUN xmlSchemaVal *
		xmlSchemaNewStringValue		(xmlSchemaValType type,
						 const xmlChar *value);
XMLPUBFUN xmlSchemaVal *
		xmlSchemaNewNOTATIONValue	(const xmlChar *name,
						 const xmlChar *ns);
XMLPUBFUN xmlSchemaVal *
		xmlSchemaNewQNameValue		(const xmlChar *namespaceName,
						 const xmlChar *localName);
XMLPUBFUN int
		xmlSchemaCompareValuesWhtsp	(xmlSchemaVal *x,
						 xmlSchemaWhitespaceValueType xws,
						 xmlSchemaVal *y,
						 xmlSchemaWhitespaceValueType yws);
XMLPUBFUN xmlSchemaVal *
		xmlSchemaCopyValue		(xmlSchemaVal *val);
XMLPUBFUN xmlSchemaValType
		xmlSchemaGetValType		(xmlSchemaVal *val);

#ifdef __cplusplus
}
#endif

#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_TYPES_H__ */