30#undef CLSID_DOMDocument
39L"<?xml version='1.0'?>"
40"<Schema xmlns='urn:schemas-microsoft-com:xml-data'"
41" xmlns:dt='urn:schemas-microsoft-com:datatypes'"
43" <ElementType name='x' dt:type='boolean'/>"
44" <ElementType name='y'>"
45" <datatype dt:type='int'/>"
47" <ElementType name='z'/>"
48" <ElementType name='root' content='eltOnly' model='open' order='seq'>"
57L"<?xml version='1.0'?>"
58"<Schema xmlns='urn:schemas-microsoft-com:xml-data'"
59" xmlns:dt='urn:schemas-microsoft-com:datatypes'"
61" <ElementType name='x' dt:type='bin.base64'/>"
62" <ElementType name='y' dt:type='uuid'/>"
63" <ElementType name='z'/>"
64" <ElementType name='root' content='eltOnly' model='closed' order='one'>"
73L"<?xml version='1.0'?>"
74"<Schema xmlns='urn:schemas-microsoft-com:xml-data'"
75" xmlns:dt='urn:schemas-microsoft-com:datatypes'"
77" <ElementType name='root' content='textOnly' model='open'>"
78" <AttributeType name='x' dt:type='int'/>"
79" <AttributeType name='y' dt:type='enumeration' dt:values='a b c'/>"
80" <AttributeType name='z' dt:type='uuid'/>"
81" <attribute type='x'/>"
82" <attribute type='y'/>"
83" <attribute type='z'/>"
90L"<Schema xmlns='urn:schemas-microsoft-com:xml-data'\n"
91" xmlns:dt='urn:schemas-microsoft-com:datatypes'>\n"
92" <ElementType name='base64Data' content='textOnly' dt:type='bin.base64'/>\n"
93" <ElementType name='hexData' content='textOnly' dt:type='bin.hex'/>\n"
94" <ElementType name='boolData' content='textOnly' dt:type='boolean'/>\n"
95" <ElementType name='charData' content='textOnly' dt:type='char'/>\n"
96" <ElementType name='dateData' content='textOnly' dt:type='date'/>\n"
97" <ElementType name='dateTimeData' content='textOnly' dt:type='dateTime'/>\n"
98" <ElementType name='dateTimeTzData' content='textOnly' dt:type='dateTime.tz'/>\n"
99" <ElementType name='entityData' content='textOnly' dt:type='entity'/>\n"
100" <ElementType name='entitiesData' content='textOnly' dt:type='entities'/>\n"
101" <ElementType name='fixedData' content='textOnly' dt:type='fixed.14.4'/>\n"
102" <ElementType name='floatData' content='textOnly' dt:type='float'/>\n"
103" <ElementType name='i1Data' content='textOnly' dt:type='i1'/>\n"
104" <ElementType name='i2Data' content='textOnly' dt:type='i2'/>\n"
105" <ElementType name='i4Data' content='textOnly' dt:type='i4'/>\n"
106" <ElementType name='i8Data' content='textOnly' dt:type='i8'/>\n"
107" <ElementType name='intData' content='textOnly' dt:type='int'/>\n"
108" <ElementType name='nmtokData' content='textOnly' dt:type='nmtoken'/>\n"
109" <ElementType name='nmtoksData' content='textOnly' dt:type='nmtokens'/>\n"
110" <ElementType name='numData' content='textOnly' dt:type='number'/>\n"
111" <ElementType name='r4Data' content='textOnly' dt:type='r4'/>\n"
112" <ElementType name='r8Data' content='textOnly' dt:type='r8'/>\n"
113" <ElementType name='stringData' content='textOnly' dt:type='string'/>\n"
114" <ElementType name='timeData' content='textOnly' dt:type='time'/>\n"
115" <ElementType name='timeTzData' content='textOnly' dt:type='time.tz'/>\n"
116" <ElementType name='u1Data' content='textOnly' dt:type='ui1'/>\n"
117" <ElementType name='u2Data' content='textOnly' dt:type='ui2'/>\n"
118" <ElementType name='u4Data' content='textOnly' dt:type='ui4'/>\n"
119" <ElementType name='u8Data' content='textOnly' dt:type='ui8'/>\n"
120" <ElementType name='uriData' content='textOnly' dt:type='uri'/>\n"
121" <ElementType name='uuidData' content='textOnly' dt:type='uuid'/>\n"
123" <ElementType name='Name' content='textOnly' dt:type='nmtoken'/>\n"
124" <ElementType name='Value' content='eltOnly' order='many'>\n"
125" <element type='base64Data'/>\n"
126" <element type='hexData'/>\n"
127" <element type='boolData'/>\n"
128" <element type='charData'/>\n"
129" <element type='dateData'/>\n"
130" <element type='dateTimeData'/>\n"
131" <element type='dateTimeTzData'/>\n"
132" <element type='entityData'/>\n"
133" <element type='entitiesData'/>\n"
134" <element type='fixedData'/>\n"
135" <element type='floatData'/>\n"
136" <element type='i1Data'/>\n"
137" <element type='i2Data'/>\n"
138" <element type='i4Data'/>\n"
139" <element type='i8Data'/>\n"
140" <element type='intData'/>\n"
141" <element type='nmtokData'/>\n"
142" <element type='nmtoksData'/>\n"
143" <element type='numData'/>\n"
144" <element type='r4Data'/>\n"
145" <element type='r8Data'/>\n"
146" <element type='stringData'/>\n"
147" <element type='timeData'/>\n"
148" <element type='timeTzData'/>\n"
149" <element type='u1Data'/>\n"
150" <element type='u2Data'/>\n"
151" <element type='u4Data'/>\n"
152" <element type='u8Data'/>\n"
153" <element type='uriData'/>\n"
154" <element type='uuidData'/>\n"
156" <ElementType name='Property' content='eltOnly' order='seq'>\n"
157" <element type='Name'/>\n"
158" <element type='Value'/>\n"
160" <ElementType name='Properties' content='eltOnly'>\n"
161" <element type='Property' minOccurs='0' maxOccurs='*'/>\n"
166L"<?xml version='1.0'?>\n"
167"<Properties xmlns='urn:x-schema:datatype-test-xdr'>\n"
169" <Name>testBase64</Name>\n"
171" <base64Data>+HugeNumber+</base64Data>\n"
175" <Name>testHex</Name>\n"
177" <hexData>deadbeef</hexData>\n"
181" <Name>testBool</Name>\n"
183" <boolData>1</boolData>\n"
187" <Name>testChar</Name>\n"
189" <charData>u</charData>\n"
193" <Name>testDate</Name>\n"
195" <dateData>1998-02-01</dateData>\n"
199" <Name>testDateTime</Name>\n"
201" <dateTimeData>1998-02-01T12:34:56</dateTimeData>\n"
205" <Name>testDateTimeTz</Name>\n"
207" <dateTimeTzData>1998-02-01T12:34:56-06:00</dateTimeTzData>\n"
211" <Name>testFixed</Name>\n"
213" <fixedData>3.1416</fixedData>\n"
217" <Name>testFloat</Name>\n"
219" <floatData>3.14159</floatData>\n"
223" <Name>testI1</Name>\n"
225" <i1Data>42</i1Data>\n"
229" <Name>testI2</Name>\n"
231" <i2Data>420</i2Data>\n"
235" <Name>testI4</Name>\n"
237" <i4Data>-420000000</i4Data>\n"
241" <Name>testI8</Name>\n"
243" <i8Data>-4200000000</i8Data>\n"
247" <Name>testInt</Name>\n"
249" <intData>42</intData>\n"
253" <Name>testNmtoken</Name>\n"
255" <nmtokData>tok1</nmtokData>\n"
259" <Name>testNmtokens</Name>\n"
261" <nmtoksData>tok1 tok2 tok3</nmtoksData>\n"
265" <Name>testNumber</Name>\n"
267" <numData>3.14159</numData>\n"
271" <Name>testR4</Name>\n"
273" <r4Data>3.14159265</r4Data>\n"
277" <Name>testR8</Name>\n"
279" <r8Data>3.14159265358979323846</r8Data>\n"
283" <Name>testString</Name>\n"
285" <stringData>foo bar</stringData>\n"
289" <Name>testTime</Name>\n"
291" <timeData>12:34:56</timeData>\n"
295" <Name>testTimeTz</Name>\n"
297" <timeTzData>12:34:56-06:00</timeTzData>\n"
301" <Name>testU1</Name>\n"
303" <u1Data>255</u1Data>\n"
307" <Name>testU2</Name>\n"
309" <u2Data>65535</u2Data>\n"
313" <Name>testU4</Name>\n"
315" <u4Data>4294967295</u4Data>\n"
319" <Name>testU8</Name>\n"
321" <u8Data>18446744073709551615</u8Data>\n"
325" <Name>testURI</Name>\n"
327" <uriData>urn:schemas-microsoft-com:datatypes</uriData>\n"
331" <Name>testUUID</Name>\n"
333" <uuidData>2933BF81-7B36-11D2-B20E-00C04F983E60</uuidData>\n"
339L"<Schema xmlns='urn:schemas-microsoft-com:xml-data'>\n"
340" <ElementType name='w' content='empty' model='closed'/>\n"
341" <ElementType name='x' content='empty' model='closed'/>\n"
342" <ElementType name='y' content='empty' model='closed'/>\n"
343" <ElementType name='z' content='empty' model='closed'/>\n"
344" <ElementType name='test' content='eltOnly' model='open' order='seq'>\n"
345" <element type='x'/>\n"
346" <group order='seq'>\n"
347" <element type='x'/>\n"
348" <element type='y'/>\n"
349" <element type='z'/>\n"
351" <element type='z'/>\n"
363 return IUnknown_Release((
IUnknown *)iface);
366#define _expect64(expr, str, base, TYPE, CONV) { \
368 TYPE v2 = CONV(str, NULL, base); \
369 ok(v1 == v2, #expr "returned %s, expected %s\n", \
370 wine_dbgstr_longlong(v1), wine_dbgstr_longlong(v2)); \
373#define expect_int64(expr, x, base) _expect64(expr, #x, base, LONG64, strtoll)
374#define expect_uint64(expr, x, base) _expect64(expr, #x, base, ULONG64, strtoull)
414#define _create(cls) cls, #cls
416#define create_document(iid) _create_object(&_create(CLSID_DOMDocument), iid, __LINE__)
418#define create_document_version(v, iid) _create_object(&_create(CLSID_DOMDocument ## v), iid, __LINE__)
420#define create_cache(iid) _create_object(&_create(CLSID_XMLSchemaCache), iid, __LINE__)
422#define create_cache_version(v, iid) _create_object(&_create(CLSID_XMLSchemaCache ## v), iid, __LINE__)
426 static const WCHAR xdr_schema_xml[] =
427 L"<Schema xmlns=\"urn:schemas-microsoft-com:xml-data\"\nxmlns:dt=\"urn:schemas-microsoft-com:datatypes\">\n</Schema>\n";
444 IXMLDOMDocument2_Release(doc);
450 hr = IXMLDOMDocument2_loadXML(doc,
str, &
b);
452 ok(
b == VARIANT_TRUE,
"b %04x\n",
b);
455 node = (
void*)0xdeadbeef;
464 hr = IXMLDOMSchemaCollection_get_length(
cache, &
len);
466 ok(
len == 1,
"Unexpected length %ld.\n",
len);
469 hr = IXMLDOMSchemaCollection_get_namespaceURI(
cache, 0, &
str);
478 IXMLDOMNode_Release(
node);
485 IXMLDOMNode_Release(
node);
492 hr = IXMLDOMSchemaCollection_get_length(
cache, &
len);
494 ok(
len == 0,
"Unexpected length %ld.\n",
len);
503 hr = IXMLDOMSchemaCollection_get_length(
cache, &
len);
505 ok(
len == 1,
"Unexpected length %ld.\n",
len);
510 hr = IXMLDOMSchemaCollection_get_length(
cache, &
len);
512 ok(
len == 0,
"Unexpected length %ld.\n",
len);
520 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
525 hr = IXMLDOMDocument2_get_schemas(doc, &
v);
529 refcount = IXMLDOMSchemaCollection_AddRef(
cache);
530 ok(refcount == 2,
"Unexpected refcount %ld.\n", refcount);
535 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
538 ok(refcount == 3,
"Unexpected refcount %ld.\n", refcount);
544 hr = IXMLDOMDocument2_get_schemas(doc, &
v);
548 ok(refcount == 3,
"Unexpected refcount %ld.\n", refcount);
551 hr = IXMLDOMDocument2_get_schemas(doc, &
v);
555 ok(refcount == 4,
"Unexpected refcount %ld.\n", refcount);
558 refcount = IXMLDOMSchemaCollection_Release(
cache);
559 ok(refcount == 3,
"Unexpected refcount %ld.\n", refcount);
560 refcount = IXMLDOMSchemaCollection_Release(
cache);
561 ok(refcount == 2,
"Unexpected refcount %ld.\n", refcount);
564 refcount = IXMLDOMDocument2_AddRef(doc);
565 ok(refcount == 2,
"Unexpected refcount %ld.\n", refcount);
567 ok(refcount == 2,
"Unexpected refcount %ld.\n", refcount);
568 refcount = IXMLDOMDocument2_Release(doc);
569 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
573 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
576 ok(refcount == 2,
"Unexpected refcount %ld.\n", refcount);
580 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
583 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
586 refcount = IXMLDOMSchemaCollection_AddRef(
cache);
587 ok(refcount == 2,
"Unexpected refcount %ld.\n", refcount);
590 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
593 ok(refcount == 3,
"Unexpected refcount %ld.\n", refcount);
599 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
602 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
606 refcount = IXMLDOMSchemaCollection_AddRef(
cache);
607 ok(refcount == 2,
"Unexpected refcount %ld.\n", refcount);
610 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
613 ok(refcount == 3,
"Unexpected refcount %ld.\n", refcount);
618 refcount = IXMLDOMDocument2_Release(doc);
619 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
622 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
623 refcount = IXMLDOMSchemaCollection_Release(
cache);
624 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
636 ok(schema1 !=
NULL,
"Failed to create a document.\n");
639 ok(cache1 !=
NULL,
"Failed to create schema collection.\n");
641 if (!schema1 || !cache1)
644 IXMLDOMDocument2_Release(schema1);
646 IXMLDOMSchemaCollection_Release(cache1);
658 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
662 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
666 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
675 refcount = IXMLDOMDocument2_Release(schema1);
676 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
677 refcount = IXMLDOMDocument2_Release(schema2);
678 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
679 refcount = IXMLDOMDocument2_Release(schema3);
680 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
697 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
703 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
709 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
712 hr = IXMLDOMSchemaCollection_addCollection(cache1,
NULL);
714 hr = IXMLDOMSchemaCollection_addCollection(cache2, cache1);
716 hr = IXMLDOMSchemaCollection_addCollection(cache3, cache2);
720 hr = IXMLDOMSchemaCollection_get_length(cache1, &
length);
725 hr = IXMLDOMSchemaCollection_get_length(cache2, &
length);
730 hr = IXMLDOMSchemaCollection_get_length(cache3, &
length);
736 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
738 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
740 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
745 refcount = IXMLDOMDocument2_Release(schema1);
746 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
751 refcount = IXMLDOMDocument2_Release(schema2);
752 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
757 refcount = IXMLDOMDocument2_Release(schema3);
758 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
777 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
783 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
789 ok(refcount == 1,
"Unexpected refcount %ld.\n", refcount);
793 refcount = IXMLDOMSchemaCollection_Release(cache1);
794 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
795 refcount = IXMLDOMSchemaCollection_Release(cache2);
796 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
797 refcount = IXMLDOMSchemaCollection_Release(cache3);
798 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
803 refcount = IXMLDOMDocument2_Release(schema1);
804 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
808 refcount = IXMLDOMDocument2_Release(schema2);
809 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
813 refcount = IXMLDOMDocument2_Release(schema3);
814 ok(!refcount,
"Unexpected refcount %ld.\n", refcount);
835 if (!schema1 || !schema2 || !schema3 || !
cache)
837 if (schema1) IXMLDOMDocument2_Release(schema1);
838 if (schema2) IXMLDOMDocument2_Release(schema2);
839 if (schema3) IXMLDOMDocument2_Release(schema3);
841 if (
cache) IXMLDOMSchemaCollection_Release(
cache);
850 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
854 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
858 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
860 hr = IXMLDOMSchemaCollection_get_length(
cache,
NULL);
924 IXMLDOMDocument2_Release(schema1);
925 IXMLDOMDocument2_Release(schema2);
926 IXMLDOMDocument2_Release(schema3);
927 IXMLDOMSchemaCollection_Release(
cache);
949 if (!schema1 || !schema2 || !schema3 || !cache1)
951 if (schema1) IXMLDOMDocument2_Release(schema1);
952 if (schema2) IXMLDOMDocument2_Release(schema2);
953 if (schema3) IXMLDOMDocument2_Release(schema3);
955 if (cache1) IXMLDOMSchemaCollection_Release(cache1);
962 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
966 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
970 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
980 hr = IXMLDOMSchemaCollection_get_length(cache1, &
length);
984 IXMLDOMDocument2_Release(schema1);
985 IXMLDOMDocument2_Release(schema2);
986 IXMLDOMDocument2_Release(schema3);
988 bstr = (
void*)0xdeadbeef;
990 hr = IXMLDOMSchemaCollection_get_namespaceURI(cache1, 3, &bstr);
992 ok(bstr == (
void*)0xdeadbeef,
"got %p\n", bstr);
994 hr = IXMLDOMSchemaCollection_get_namespaceURI(cache1, 0,
NULL);
997 hr = IXMLDOMSchemaCollection_get_namespaceURI(cache1, 3,
NULL);
1004 ok(!schema1,
"expected NULL\n");
1008 ok(!schema1,
"expected NULL\n");
1013 for (
i = 0;
i < 3; ++
i)
1016 hr = IXMLDOMSchemaCollection_get_namespaceURI(cache1,
i, &bstr);
1018 ok(bstr !=
NULL && *bstr,
"expected non-empty string\n");
1021 for (
j = 0;
j <
i; ++
j)
1025 for (
i = 0;
i < 3; ++
i)
1031 IXMLDOMSchemaCollection_Release(cache1);
1051 if (doc) IXMLDOMDocument2_Release(doc);
1053 if (
cache) IXMLDOMSchemaCollection_Release(
cache);
1062 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1066 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1084 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
1093 hr = IXMLDOMDocument2_validate(doc, &
err);
1095 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
1096 hr = IXMLDOMParseError_get_reason(
err, &bstr);
1100 IXMLDOMParseError_Release(
err);
1103 IXMLDOMDocument2_Release(doc);
1107 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1115 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
1124 hr = IXMLDOMDocument2_validate(doc, &
err);
1126 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
1127 hr = IXMLDOMParseError_get_reason(
err, &bstr);
1131 IXMLDOMParseError_Release(
err);
1134 IXMLDOMDocument2_Release(doc);
1138 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1146 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
1154 hr = IXMLDOMDocument2_validate(doc, &
err);
1156 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
1159 IXMLDOMParseError_Release(
err);
1162 IXMLDOMDocument2_Release(doc);
1166 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1174 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
1182 hr = IXMLDOMDocument2_validate(doc, &
err);
1184 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
1187 IXMLDOMParseError_Release(
err);
1189 IXMLDOMDocument2_Release(doc);
1190 IXMLDOMDocument2_Release(
schema);
1191 IXMLDOMSchemaCollection_Release(
cache);
1204 {
L"//Property[Name!text()='testBase64']/Value/base64Data",
VT_ARRAY|
VT_UI1,
L"bin.base64" },
1205 {
L"//Property[Name!text()='testHex']/Value/hexData",
VT_ARRAY|
VT_UI1,
L"bin.hex" },
1206 {
L"//Property[Name!text()='testBool']/Value/boolData",
VT_BOOL,
L"boolean" },
1207 {
L"//Property[Name!text()='testChar']/Value/charData",
VT_I4,
L"char",
TRUE },
1208 {
L"//Property[Name!text()='testDate']/Value/dateData",
VT_DATE,
L"date" },
1209 {
L"//Property[Name!text()='testDateTime']/Value/dateTimeData",
VT_DATE,
L"dateTime" },
1210 {
L"//Property[Name!text()='testDateTimeTz']/Value/dateTimeTzData",
VT_DATE,
L"dateTime.tz" },
1211 {
L"//Property[Name!text()='testFixed']/Value/fixedData",
VT_CY,
L"fixed.14.4" },
1212 {
L"//Property[Name!text()='testFloat']/Value/floatData",
VT_R8,
L"float" },
1213 {
L"//Property[Name!text()='testI1']/Value/i1Data",
VT_I1,
L"i1" },
1214 {
L"//Property[Name!text()='testI2']/Value/i2Data",
VT_I2,
L"i2" },
1215 {
L"//Property[Name!text()='testI4']/Value/i4Data",
VT_I4,
L"i4" },
1216 {
L"//Property[Name!text()='testI8']/Value/i8Data",
VT_NULL,
L"i8",
TRUE },
1217 {
L"//Property[Name!text()='testInt']/Value/intData",
VT_I4,
L"int" },
1218 {
L"//Property[Name!text()='testNmtoken']/Value/nmtokData",
VT_BSTR,
NULL },
1219 {
L"//Property[Name!text()='testNmtokens']/Value/nmtoksData",
VT_BSTR,
NULL },
1220 {
L"//Property[Name!text()='testNumber']/Value/numData",
VT_BSTR,
L"number" },
1221 {
L"//Property[Name!text()='testR4']/Value/r4Data",
VT_R4,
L"r4" },
1222 {
L"//Property[Name!text()='testR8']/Value/r8Data",
VT_R8,
L"r8" },
1223 {
L"//Property[Name!text()='testString']/Value/stringData",
VT_BSTR,
NULL },
1224 {
L"//Property[Name!text()='testTime']/Value/timeData",
VT_DATE,
L"time" },
1225 {
L"//Property[Name!text()='testTimeTz']/Value/timeTzData",
VT_DATE,
L"time.tz" },
1226 {
L"//Property[Name!text()='testU1']/Value/u1Data",
VT_UI1,
L"ui1" },
1227 {
L"//Property[Name!text()='testU2']/Value/u2Data",
VT_UI2,
L"ui2" },
1228 {
L"//Property[Name!text()='testU4']/Value/u4Data",
VT_UI4,
L"ui4" },
1229 {
L"//Property[Name!text()='testU8']/Value/u8Data",
VT_NULL,
L"ui8",
TRUE },
1230 {
L"//Property[Name!text()='testURI']/Value/uriData",
VT_BSTR,
L"uri" },
1231 {
L"//Property[Name!text()='testUUID']/Value/uuidData",
VT_BSTR,
L"uuid" },
1256 if (doc) IXMLDOMDocument2_Release(doc);
1257 if (doc2) IXMLDOMDocument2_Release(doc2);
1259 if (
cache) IXMLDOMSchemaCollection_Release(
cache);
1265 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1269 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1273 ok(
b == VARIANT_TRUE,
"failed to load XML string\n");
1276 hr = IXMLDOMDocument2_validate(doc, &
err);
1278 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
1279 hr = IXMLDOMParseError_get_errorCode(
err, &
l);
1281 ok(
l == E_XML_NODTD,
"Unexpected error code %#lx.\n",
l);
1282 IXMLDOMParseError_Release(
err);
1285 hr = IXMLDOMDocument2_validate(doc2, &
err);
1287 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
1288 hr = IXMLDOMParseError_get_errorCode(
err, &
l);
1290 ok(
l == E_XML_NODTD,
"Unexpected error code %#lx.\n",
l);
1291 IXMLDOMParseError_Release(
err);
1299 hr = IXMLDOMSchemaCollection_add(
cache,
_bstr_(
L"urn:x-schema:datatype-test-xdr"),
v);
1309 hr = IXMLDOMDocument2_putref_schemas(doc2,
v);
1317 hr = IXMLDOMDocument2_validate(doc2, &
err);
1319 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
1320 hr = IXMLDOMParseError_get_errorCode(
err, &
l);
1322 hr = IXMLDOMParseError_get_reason(
err, &bstr);
1326 IXMLDOMParseError_Release(
err);
1335 hr = IXMLDOMDocument2_selectSingleNode(doc,
_bstr_(
ptr->query), &
node);
1348 hr = IXMLDOMNode_get_nodeTypedValue(
node, &
type);
1352 IXMLDOMNode_Release(
node);
1356 hr = IXMLDOMDocument2_selectSingleNode(doc2,
_bstr_(
ptr->query), &
node);
1376 hr = IXMLDOMNode_get_nodeTypedValue(
node, &
v);
1382 switch (
ptr->type_schema)
1406 ok(
V_R4(&
v) == (
float)3.14159265,
"got %f\n",
V_R4(&
v));
1413 ok(
V_R8(&
v) == 3.14159265358979323846,
"got %.20f\n",
V_R8(&
v));
1433 IXMLDOMNode_Release(
node);
1438 IXMLDOMDocument2_Release(
schema);
1439 IXMLDOMDocument2_Release(doc);
1440 IXMLDOMDocument2_Release(doc2);
1441 IXMLDOMSchemaCollection_Release(
cache);
1456 hr = IUnknown_QueryInterface(
obj, &IID_IDispatchEx, (
void**)&dispex);
1461 hr = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
1463 ok(ticnt == 1,
"ticnt=%u\n", ticnt);
1466 hr = IDispatchEx_DeleteMemberByName(dispex,
name, fdexNameCaseSensitive);
1470 hr = IDispatchEx_DeleteMemberByDispID(dispex, dispid);
1474 hr = IDispatchEx_GetMemberProperties(dispex, dispid, grfdexPropCanAll, &
props);
1478 hr = IDispatchEx_GetMemberName(dispex, dispid, &
name);
1486 hr = IDispatchEx_GetNameSpaceParent(dispex, &unk);
1488 ok(unk == (
IUnknown*)0xdeadbeef,
"got %p\n", unk);
1491 hr = IDispatchEx_GetDispID(dispex,
name, fdexNameEnsure, &dispid);
1495 IDispatchEx_Release(dispex);
1504 DISPPARAMS dispparams;
1513 IUnknown_Release(unk);
1515 hr = IXMLDOMSchemaCollection_QueryInterface(
cache, &IID_IDispatchEx, (
void**)&dispex);
1520 dispparams.cArgs = 1;
1521 dispparams.cNamedArgs = 0;
1522 dispparams.rgdispidNamedArgs =
NULL;
1523 dispparams.rgvarg = &
arg;
1532 IDispatchEx_Release(dispex);
1533 IXMLDOMSchemaCollection_Release(
cache);
1541 ok(
r ==
S_OK,
"failed to init com\n");
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLuint GLsizei GLsizei * length
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
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 GLint GLint j
#define todo_wine_if(is_todo)
#define win_skip_(file, line)
#define create_cache(iid)
static const WCHAR xdr_schema1_xml[]
static const WCHAR szOpenSeqXDR[]
static const WCHAR szOpenSeqXML1[]
static const WCHAR xdr_schema2_uri[]
static BSTR alloced_bstrs[256]
static const WCHAR szDatatypeXML[]
static void test_XDR_schemas(void)
#define create_document_version(v, iid)
static const WCHAR szDatatypeXDR[]
static const xdr_datatypes xdr_datatypes_data[]
static void test_collection_refs(void)
static void test_XDR_datatypes(void)
static ULONG get_refcount(void *iface)
static const WCHAR xdr_schema2_xml[]
static const WCHAR xdr_schema3_xml[]
static void test_length(void)
static int alloced_bstrs_count
static void free_bstrs(void)
static const WCHAR xdr_schema3_uri[]
#define expect_int64(expr, x, base)
static const WCHAR szOpenSeqXML4[]
#define expect_uint64(expr, x, base)
static void * _create_object(const GUID *clsid, const char *name, const IID *iid, int line)
static BSTR _bstr_(const WCHAR *str)
static void test_schema_refs(void)
static const WCHAR szOpenSeqXML2[]
#define create_cache_version(v, iid)
#define create_document(iid)
static const WCHAR xdr_schema1_uri[]
static const WCHAR szOpenSeqXML3[]
static VARIANT _variantdoc_(void *doc)
static void test_obj_dispex(IUnknown *obj)
static void test_collection_content(void)
static void test_dispex(void)
static const WCHAR xsd_schema1_uri[]
static VARIANTARG static DISPID
#define DISPID_XMLDOM_SCHEMACOLLECTION_ADD
#define DISPID_SAX_XMLREADER_GETFEATURE
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
static const WCHAR props[]
#define DISP_E_MEMBERNOTFOUND
#define DISP_E_UNKNOWNNAME