55#if LIBXML_VERSION >= 20908
56#define XMLHASH_CONST const
67#define DEFAULT_HASHTABLE_SIZE 17
71static const xmlChar XSD_schema[] =
"schema";
72static const xmlChar XSD_nsURI[] =
"http://www.w3.org/2001/XMLSchema";
73static const xmlChar XDR_schema[] =
"Schema";
74static const xmlChar XDR_nsURI[] =
"urn:schemas-microsoft-com:xml-data";
75static const xmlChar DT_nsURI[] =
"urn:schemas-microsoft-com:datatypes";
78static int datatypes_len;
80static HRSRC datatypes_rsrc;
81static xmlSchemaPtr datatypes_schema;
95 CacheEntryType_Invalid,
104 IXMLDOMSchemaCollection2 IXMLDOMSchemaCollection2_iface;
125static const tid_t schema_cache_se_tids[] = {
133#define DT_MIN_STR_LEN 2
134#define DT_MAX_STR_LEN 11
135#define DT_MIN_HASH_VALUE 2
136#define DT_MAX_HASH_VALUE 115
138static const xmlChar DT_bin_base64[] =
"bin.base64";
139static const xmlChar DT_bin_hex[] =
"bin.hex";
140static const xmlChar DT_boolean[] =
"boolean";
141static const xmlChar DT_char[] =
"char";
142static const xmlChar DT_date[] =
"date";
143static const xmlChar DT_date_tz[] =
"date.tz";
144static const xmlChar DT_dateTime[] =
"dateTime";
145static const xmlChar DT_dateTime_tz[] =
"dateTime.tz";
146static const xmlChar DT_entity[] =
"entity";
147static const xmlChar DT_entities[] =
"entities";
148static const xmlChar DT_enumeration[] =
"enumeration";
149static const xmlChar DT_fixed_14_4[] =
"fixed.14.4";
150static const xmlChar DT_float[] =
"float";
151static const xmlChar DT_i1[] =
"i1";
152static const xmlChar DT_i2[] =
"i2";
153static const xmlChar DT_i4[] =
"i4";
154static const xmlChar DT_i8[] =
"i8";
155static const xmlChar DT_id[] =
"id";
156static const xmlChar DT_idref[] =
"idref";
157static const xmlChar DT_idrefs[] =
"idrefs";
158static const xmlChar DT_int[] =
"int";
159static const xmlChar DT_nmtoken[] =
"nmtoken";
160static const xmlChar DT_nmtokens[] =
"nmtokens";
161static const xmlChar DT_notation[] =
"notation";
162static const xmlChar DT_number[] =
"number";
163static const xmlChar DT_r4[] =
"r4";
164static const xmlChar DT_r8[] =
"r8";
165static const xmlChar DT_string[] =
"string";
166static const xmlChar DT_time[] =
"time";
167static const xmlChar DT_time_tz[] =
"time.tz";
168static const xmlChar DT_ui1[] =
"ui1";
169static const xmlChar DT_ui2[] =
"ui2";
170static const xmlChar DT_ui4[] =
"ui4";
171static const xmlChar DT_ui8[] =
"ui8";
172static const xmlChar DT_uri[] =
"uri";
173static const xmlChar DT_uuid[] =
"uuid";
175static const OLECHAR wDT_bin_base64[] = {
'b',
'i',
'n',
'.',
'b',
'a',
's',
'e',
'6',
'4',0};
176static const OLECHAR wDT_bin_hex[] = {
'b',
'i',
'n',
'.',
'h',
'e',
'x',0};
177static const OLECHAR wDT_boolean[] = {
'b',
'o',
'o',
'l',
'e',
'a',
'n',0};
178static const OLECHAR wDT_char[] = {
'c',
'h',
'a',
'r',0};
179static const OLECHAR wDT_date[] = {
'd',
'a',
't',
'e',0};
180static const OLECHAR wDT_date_tz[] = {
'd',
'a',
't',
'e',
'.',
't',
'z',0};
181static const OLECHAR wDT_dateTime[] = {
'd',
'a',
't',
'e',
'T',
'i',
'm',
'e',0};
182static const OLECHAR wDT_dateTime_tz[] = {
'd',
'a',
't',
'e',
'T',
'i',
'm',
'e',
'.',
't',
'z',0};
183static const OLECHAR wDT_entity[] = {
'e',
'n',
't',
'i',
't',
'y',0};
184static const OLECHAR wDT_entities[] = {
'e',
'n',
't',
'i',
't',
'i',
'e',
's',0};
185static const OLECHAR wDT_enumeration[] = {
'e',
'n',
'u',
'm',
'e',
'r',
'a',
't',
'i',
'o',
'n',0};
186static const OLECHAR wDT_fixed_14_4[] = {
'f',
'i',
'x',
'e',
'd',
'.',
'1',
'4',
'.',
'4',0};
187static const OLECHAR wDT_float[] = {
'f',
'l',
'o',
'a',
't',0};
188static const OLECHAR wDT_i1[] = {
'i',
'1',0};
189static const OLECHAR wDT_i2[] = {
'i',
'2',0};
190static const OLECHAR wDT_i4[] = {
'i',
'4',0};
191static const OLECHAR wDT_i8[] = {
'i',
'8',0};
192static const OLECHAR wDT_id[] = {
'i',
'd',0};
193static const OLECHAR wDT_idref[] = {
'i',
'd',
'r',
'e',
'f',0};
194static const OLECHAR wDT_idrefs[] = {
'i',
'd',
'r',
'e',
'f',
's',0};
195static const OLECHAR wDT_int[] = {
'i',
'n',
't',0};
196static const OLECHAR wDT_nmtoken[] = {
'n',
'm',
't',
'o',
'k',
'e',
'n',0};
197static const OLECHAR wDT_nmtokens[] = {
'n',
'm',
't',
'o',
'k',
'e',
'n',
's',0};
198static const OLECHAR wDT_notation[] = {
'n',
'o',
't',
'a',
't',
'i',
'o',
'n',0};
199static const OLECHAR wDT_number[] = {
'n',
'u',
'm',
'b',
'e',
'r',0};
200static const OLECHAR wDT_r4[] = {
'r',
'4',0};
201static const OLECHAR wDT_r8[] = {
'r',
'8',0};
202static const OLECHAR wDT_string[] = {
's',
't',
'r',
'i',
'n',
'g',0};
203static const OLECHAR wDT_time[] = {
't',
'i',
'm',
'e',0};
204static const OLECHAR wDT_time_tz[] = {
't',
'i',
'm',
'e',
'.',
't',
'z',0};
205static const OLECHAR wDT_ui1[] = {
'u',
'i',
'1',0};
206static const OLECHAR wDT_ui2[] = {
'u',
'i',
'2',0};
207static const OLECHAR wDT_ui4[] = {
'u',
'i',
'4',0};
208static const OLECHAR wDT_ui8[] = {
'u',
'i',
'8',0};
209static const OLECHAR wDT_uri[] = {
'u',
'r',
'i',0};
210static const OLECHAR wDT_uuid[] = {
'u',
'u',
'i',
'd',0};
212static const BYTE hash_assoc_values[] =
214 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
215 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
216 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
217 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
218 116, 116, 116, 116, 116, 116, 10, 116, 116, 55,
219 45, 116, 5, 116, 0, 116, 0, 116, 116, 116,
220 116, 116, 116, 116, 116, 5, 0, 0, 20, 0,
221 0, 10, 0, 0, 116, 0, 0, 0, 15, 5,
222 116, 116, 10, 0, 0, 0, 116, 116, 0, 0,
223 10, 116, 116, 116, 116, 116, 116, 5, 0, 0,
224 20, 0, 0, 10, 0, 0, 116, 0, 0, 0,
225 15, 5, 116, 116, 10, 0, 0, 0, 116, 116,
226 0, 0, 10, 116, 116, 116, 116, 116, 116, 116,
227 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
228 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
229 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
230 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
231 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
232 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
233 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
234 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
235 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
236 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
237 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
238 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
239 116, 116, 116, 116, 116, 116
246 LIBXML2_CALLBACK_ERR(Schema_parse,
msg,
ap);
254 LIBXML2_CALLBACK_WARN(Schema_parse,
msg,
ap);
258#ifdef HAVE_XMLSCHEMASSETPARSERSTRUCTUREDERRORS
261 LIBXML2_CALLBACK_SERROR(Schema_parse,
err);
265static inline xmlSchemaPtr Schema_parse(xmlSchemaParserCtxtPtr spctx)
267 TRACE(
"(%p)\n", spctx);
270#ifdef HAVE_XMLSCHEMASSETPARSERSTRUCTUREDERRORS
271 xmlSchemaSetParserStructuredErrors(spctx, parser_serror,
NULL);
274 return xmlSchemaParse(spctx);
277static void LIBXML2_LOG_CALLBACK validate_error(
void*
ctx,
char const*
msg, ...)
281 LIBXML2_CALLBACK_ERR(Schema_validate_tree,
msg,
ap);
285static void LIBXML2_LOG_CALLBACK validate_warning(
void*
ctx,
char const*
msg, ...)
289 LIBXML2_CALLBACK_WARN(Schema_validate_tree,
msg,
ap);
293#ifdef HAVE_XMLSCHEMASSETVALIDSTRUCTUREDERRORS
296 LIBXML2_CALLBACK_SERROR(Schema_validate_tree,
err);
303 return IXMLDOMSchemaCollection2_get_namespaceURI((IXMLDOMSchemaCollection2*)iface,
index, &
V_BSTR(
item));
306static const struct enumvariant_funcs schemacache_enumvariant = {
307 schema_cache_get_item,
313 xmlSchemaValidCtxtPtr svctx;
319 svctx = xmlSchemaNewValidCtxt(
schema);
320 xmlSchemaSetValidErrors(svctx, validate_error, validate_warning,
NULL);
321#ifdef HAVE_XMLSCHEMASSETVALIDSTRUCTUREDERRORS
322 xmlSchemaSetValidStructuredErrors(svctx, validate_serror,
NULL);
328 err = xmlSchemaValidateOneElement(svctx,
tree);
330 xmlSchemaFreeValidCtxt(svctx);
341 hval += hash_assoc_values[
str[10]];
344 hval += hash_assoc_values[
str[9]];
347 hval += hash_assoc_values[
str[8]];
350 hval += hash_assoc_values[
str[7]];
353 hval += hash_assoc_values[
str[6]];
356 hval += hash_assoc_values[
str[5]];
359 hval += hash_assoc_values[
str[4]];
362 hval += hash_assoc_values[
str[3]];
365 hval += hash_assoc_values[
str[2]];
368 hval += hash_assoc_values[
str[1]];
371 hval += hash_assoc_values[
str[0]];
384 hval += (bstr[10] & 0xFF00)? 116 : hash_assoc_values[bstr[10]];
387 hval += (bstr[9] & 0xFF00)? 116 : hash_assoc_values[bstr[9]];
390 hval += (bstr[8] & 0xFF00)? 116 : hash_assoc_values[bstr[8]];
393 hval += (bstr[7] & 0xFF00)? 116 : hash_assoc_values[bstr[7]];
396 hval += (bstr[6] & 0xFF00)? 116 : hash_assoc_values[bstr[6]];
399 hval += (bstr[5] & 0xFF00)? 116 : hash_assoc_values[bstr[5]];
402 hval += (bstr[4] & 0xFF00)? 116 : hash_assoc_values[bstr[4]];
405 hval += (bstr[3] & 0xFF00)? 116 : hash_assoc_values[bstr[3]];
408 hval += (bstr[2] & 0xFF00)? 116 : hash_assoc_values[bstr[2]];
411 hval += (bstr[1] & 0xFF00)? 116 : hash_assoc_values[bstr[1]];
414 hval += (bstr[0] & 0xFF00)? 116 : hash_assoc_values[bstr[0]];
500static const XDR_DT DT_lookup_table[] =
553 -1, -1, -1, -1, -1, -1, -1, -1, -1,
554 -1, -1, -1, -1, -1, -1, -1, -1, -1,
555 -1, -1, -1, -1, -1, -1, -1, -1, -1,
556 -1, -1, -1, -1, -1, -1, -1, -1, -1,
557 -1, -1, -1, -1, -1, -1, -1, -1, -1,
558 -1, -1, -1, -1, -1, -1, -1, -1,
567 if (
hash <= DT_MAX_HASH_VALUE)
568 dt = DT_lookup_table[
hash];
581 if (
hash <= DT_MAX_HASH_VALUE)
582 dt = DT_lookup_table[
hash];
595 return DT_string_table[dt];
603 return DT_wstring_table[dt];
606const char* debugstr_dt(
XDR_DT dt)
620 if (!datatypes_schema)
622 xmlSchemaParserCtxtPtr spctx;
624 spctx = xmlSchemaNewMemParserCtxt((
char const*)datatypes_src, datatypes_len);
625 datatypes_schema = Schema_parse(spctx);
626 xmlSchemaFreeParserCtxt(spctx);
662 if (!datatypes_schema)
664 ERR(
"failed to load schema for urn:schemas-microsoft-com:datatypes, "
677 xmlDocSetRootElement(tmp_doc,
node);
679 hr = Schema_validate_tree(datatypes_schema, (
xmlNodePtr)tmp_doc);
688 FIXME(
"need to handle dt:%s\n", debugstr_dt(dt));
725 if (
lstrcmpA(URL,
"urn:schemas-microsoft-com:datatypes") == 0)
727 TRACE(
"loading built-in schema for %s\n", URL);
732 input = _external_entity_loader(URL,
ID, ctxt);
738void schemasInit(
void)
743 FIXME(
"failed to find resource for %s\n", DT_nsURI);
749 FIXME(
"failed to load resource for %s\n", DT_nsURI);
757 while (
buf[datatypes_len - 1] !=
'>') datatypes_len--;
758 datatypes_src =
heap_alloc(datatypes_len + 1);
759 memcpy(datatypes_src,
buf, datatypes_len);
760 datatypes_src[datatypes_len] = 0;
769void schemasCleanup(
void)
771 xmlSchemaFree(datatypes_schema);
790 if (
entry->type == CacheEntryType_XSD)
792 xmldoc_release(
entry->doc);
794 xmlSchemaFree(
entry->schema);
796 else if (
entry->type == CacheEntryType_XDR)
798 xmldoc_release(
entry->doc);
799 xmldoc_release(
entry->schema->doc);
801 xmlSchemaFree(
entry->schema);
809static const struct IXMLDOMSchemaCollection2Vtbl XMLDOMSchemaCollection2Vtbl;
811static inline schema_cache* impl_from_IXMLDOMSchemaCollection2(IXMLDOMSchemaCollection2* iface)
816static inline schema_cache* impl_from_IXMLDOMSchemaCollection(IXMLDOMSchemaCollection* iface)
818 return CONTAINING_RECORD((IXMLDOMSchemaCollection2 *)iface, schema_cache, IXMLDOMSchemaCollection2_iface);
821static inline schema_cache* unsafe_impl_from_IXMLDOMSchemaCollection(IXMLDOMSchemaCollection *iface)
823 return iface->lpVtbl == (
void*)&XMLDOMSchemaCollection2Vtbl ? impl_from_IXMLDOMSchemaCollection(iface) :
NULL;
826static inline CacheEntryType cache_type_from_xmlDocPtr(
xmlDocPtr schema)
837 return CacheEntryType_XDR;
842 return CacheEntryType_XSD;
845 return CacheEntryType_Invalid;
879 xmlSchemaParserCtxtPtr spctx;
882 link_datatypes(new_doc);
886 entry->type = CacheEntryType_XSD;
888 spctx = xmlSchemaNewDocParserCtxt(new_doc);
890 if ((
entry->schema = Schema_parse(spctx)))
892 xmldoc_init(
entry->schema->doc,
v);
894 xmldoc_add_ref(
entry->doc);
898 FIXME(
"failed to parse doc\n");
903 xmlSchemaFreeParserCtxt(spctx);
910 xmlSchemaParserCtxtPtr spctx;
911 xmlDocPtr new_doc = xmlCopyDoc(doc, 1), xsd_doc = XDR_to_XSD_doc(doc, nsURI);
913 link_datatypes(xsd_doc);
915 entry->type = CacheEntryType_XDR;
917 spctx = xmlSchemaNewDocParserCtxt(xsd_doc);
919 if ((
entry->schema = Schema_parse(spctx)))
921 entry->doc = new_doc;
924 xmldoc_add_ref(
entry->doc);
925 xmldoc_add_ref(
entry->schema->doc);
929 FIXME(
"failed to parse doc\n");
935 xmlSchemaFreeParserCtxt(spctx);
943 IXMLDOMDocument3* domdoc =
NULL;
947 CacheEntryType
type = CacheEntryType_Invalid;
951 FIXME(
"failed to create domdoc\n");
957 hr = IXMLDOMDocument3_load(domdoc,
url, &
b);
960 ERR(
"IXMLDOMDocument3_load() returned 0x%08x\n",
hr);
961 if (
b != VARIANT_TRUE)
964 IXMLDOMDocument3_Release(domdoc);
969 type = cache_type_from_xmlDocPtr(doc);
973 case CacheEntryType_XSD:
976 case CacheEntryType_XDR:
981 FIXME(
"invalid schema\n");
984 IXMLDOMDocument3_Release(domdoc);
1018 cache->allocated *= 2;
1026 cache->uris[
i] = heap_strdupxmlChar(
uri);
1030static void cache_remove_entry(schema_cache *
cache,
const xmlChar *
uri)
1036 if (
i == -1)
return;
1049HRESULT cache_from_doc_ns(IXMLDOMSchemaCollection2 *iface, xmlnode *
node)
1051 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1053 xmlXPathObjectPtr nodeset;
1054 xmlXPathContextPtr ctxt;
1056 This->read_only = 1;
1058 ctxt = xmlXPathNewContext(
node->node->doc);
1060 nodeset = xmlXPathEvalExpression(
query, ctxt);
1061 xmlXPathFreeContext(ctxt);
1065 int pos = 0,
len = xmlXPathNodeSetGetLength(nodeset->nodesetval);
1072 static const xmlChar defns[] =
"http://www.w3.org/XML/1998/namespace";
1084 entry->type = CacheEntryType_NS;
1094 xmlXPathFreeObject(nodeset);
1100static HRESULT WINAPI schema_cache_QueryInterface(IXMLDOMSchemaCollection2* iface,
1103 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1123 WARN(
"riid CLSID_XMLSchemaCache60, returning IXMLDOMSchemaCollection2 interface.\n");
1132 return node_create_supporterrorinfo(schema_cache_se_tids,
ppvObject);
1141 IXMLDOMSchemaCollection2_AddRef(iface);
1146static ULONG WINAPI schema_cache_AddRef(IXMLDOMSchemaCollection2* iface)
1148 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1154static ULONG WINAPI schema_cache_Release(IXMLDOMSchemaCollection2* iface)
1156 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1164 for (
i = 0;
i <
This->count;
i++)
1174static HRESULT WINAPI schema_cache_GetTypeInfoCount(IXMLDOMSchemaCollection2* iface,
1177 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1178 return IDispatchEx_GetTypeInfoCount(&
This->dispex.IDispatchEx_iface, pctinfo);
1181static HRESULT WINAPI schema_cache_GetTypeInfo(IXMLDOMSchemaCollection2* iface,
1184 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1185 return IDispatchEx_GetTypeInfo(&
This->dispex.IDispatchEx_iface,
1186 iTInfo, lcid, ppTInfo);
1189static HRESULT WINAPI schema_cache_GetIDsOfNames(IXMLDOMSchemaCollection2* iface,
1193 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1194 return IDispatchEx_GetIDsOfNames(&
This->dispex.IDispatchEx_iface,
1195 riid, rgszNames, cNames, lcid, rgDispId);
1198static HRESULT WINAPI schema_cache_Invoke(IXMLDOMSchemaCollection2* iface,
1201 VARIANT* pVarResult, EXCEPINFO* pExcepInfo,
1204 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1205 return IDispatchEx_Invoke(&
This->dispex.IDispatchEx_iface,
1206 dispIdMember,
riid, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1211 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1234 cache_entry_add_ref(
entry);
1251 CacheEntryType
type;
1253 IUnknown_QueryInterface(
V_UNKNOWN(&
var), &IID_IXMLDOMNode, (
void**)&domnode);
1259 IXMLDOMNode_get_nodeType(domnode, &
type);
1268 IXMLDOMNode_get_xml(domnode, &xml);
1270 IXMLDOMDocument_loadXML(domdoc, xml, &
b);
1283 IXMLDOMNode_Release(domnode);
1287 type = cache_type_from_xmlDocPtr(doc);
1289 if (
type == CacheEntryType_XSD)
1293 else if (
type == CacheEntryType_XDR)
1299 WARN(
"invalid schema!\n");
1303 IXMLDOMNode_Release(domnode);
1307 cache_entry_add_ref(
entry);
1331 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1354 return get_domdoc_from_xmldoc(
entry->doc, (IXMLDOMDocument3**)
node);
1361 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1376 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1386static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection2* iface,
1389 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1408 schema_cache*
This = (schema_cache*)
dest;
1413 cache_entry_add_ref(
entry);
1418static HRESULT WINAPI schema_cache_addCollection(IXMLDOMSchemaCollection2* iface,
1421 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1429 That = unsafe_impl_from_IXMLDOMSchemaCollection(
collection);
1432 ERR(
"external collection implementation\n");
1444 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1449static HRESULT WINAPI schema_cache_validate(IXMLDOMSchemaCollection2* iface)
1451 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1456static HRESULT WINAPI schema_cache_put_validateOnLoad(IXMLDOMSchemaCollection2* iface,
1459 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1464 if (
value == VARIANT_FALSE)
return S_OK;
1469static HRESULT WINAPI schema_cache_get_validateOnLoad(IXMLDOMSchemaCollection2* iface,
1472 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1481static HRESULT WINAPI schema_cache_getSchema(IXMLDOMSchemaCollection2* iface,
1484 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1491static HRESULT WINAPI schema_cache_getDeclaration(IXMLDOMSchemaCollection2* iface,
1494 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1501static const struct IXMLDOMSchemaCollection2Vtbl XMLDOMSchemaCollection2Vtbl =
1503 schema_cache_QueryInterface,
1504 schema_cache_AddRef,
1505 schema_cache_Release,
1506 schema_cache_GetTypeInfoCount,
1507 schema_cache_GetTypeInfo,
1508 schema_cache_GetIDsOfNames,
1509 schema_cache_Invoke,
1512 schema_cache_remove,
1513 schema_cache_get_length,
1514 schema_cache_get_namespaceURI,
1515 schema_cache_addCollection,
1516 schema_cache_get__newEnum,
1517 schema_cache_validate,
1518 schema_cache_put_validateOnLoad,
1519 schema_cache_get_validateOnLoad,
1520 schema_cache_getSchema,
1521 schema_cache_getDeclaration
1526 xmlSchemaElementPtr decl =
NULL;
1536 FIXME(
"declaration not found in main schema - need to check schema imports!\n");
1552 xmlSchemaElementPtr decl = lookup_schema_elemDecl(
schema,
node);
1553 while (decl !=
NULL && decl->refDecl !=
NULL)
1554 decl = decl->refDecl;
1555 return (decl !=
NULL)? decl->node :
NULL;
1560 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1577 WARN(
"no schema found for xmlns=%s\n", get_node_nsURI(
tree));
1584 schema_cache*
This = impl_from_IXMLDOMSchemaCollection2(iface);
1592 dt = str_to_dt(
node->name, -1);
1602 dt = str_to_dt(
str, -1);
1610static const tid_t schemacache_iface_tids[] = {
1619 schemacache_iface_tids
1630 This->IXMLDOMSchemaCollection2_iface.lpVtbl = &XMLDOMSchemaCollection2Vtbl;
1632 This->allocated = 10;
1637 This->validateOnLoad = VARIANT_TRUE;
1638 This->read_only = 0;
1641 *
obj = &
This->IXMLDOMSchemaCollection2_iface;
1649 MESSAGE(
"This program tried to use a SchemaCache object, but\n"
1650 "libxml2 support was not present at compile time.\n");
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR version[]
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
HRESULT DOMDocument_create(MSXML_VERSION version, void **ppObj)
HINSTANCE MSXML_hInstance
HRESULT SchemaCache_create(MSXML_VERSION version, void **obj)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR emptyW[]
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static const char * debugstr_variant(const VARIANT *var)
static ICollection collection
static VARIANTARG static DISPID
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
@ IXMLDOMSchemaCollection2_tid
@ IXMLDOMSchemaCollection_tid
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static unsigned __int64 next
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBFUN void XMLCALL xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f)
XMLPUBFUN void *XMLCALL xmlHashLookup(xmlHashTablePtr table, const xmlChar *name)
XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreate(int size)
XMLPUBFUN int XMLCALL xmlHashSize(xmlHashTablePtr table)
XMLPUBFUN int XMLCALL xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata)
XMLPUBFUN int XMLCALL xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, xmlHashDeallocator f)
XMLPUBFUN void XMLCALL xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data)
XMLPUBFUN xmlExternalEntityLoader XMLCALL xmlGetExternalEntityLoader(void)
XMLPUBFUN void XMLCALL xmlSetExternalEntityLoader(xmlExternalEntityLoader f)
xmlParserInputPtr(* xmlExternalEntityLoader)(const char *URL, const char *ID, xmlParserCtxtPtr context)
XMLPUBFUN xmlNodePtr XMLCALL xmlDocGetRootElement(const xmlDoc *doc)
XMLPUBFUN void XMLCALL xmlFreeDoc(xmlDocPtr cur)
XMLPUBFUN xmlDocPtr XMLCALL xmlNewDoc(const xmlChar *version)
XMLPUBFUN xmlChar *XMLCALL xmlGetNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace)
XMLPUBFUN void XMLCALL xmlSetNs(xmlNodePtr node, xmlNsPtr ns)
XMLPUBFUN xmlNsPtr XMLCALL xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix)
#define CONTAINING_RECORD(address, type, field)
_In_ DWORD _Out_ _In_ WORD wFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
void int int ULONGLONG int va_list * ap
enum tagDOMNodeType DOMNodeType
XMLPUBFUN int XMLCALL xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
#define LIBXML_DOTTED_VERSION