33L"<?xml version='1.0'?>"
34"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
35" targetNamespace='x-schema:test1.xsd'>"
36" <element name='root'>"
38" <sequence maxOccurs='unbounded'>"
47L"<?xml version='1.0'?>"
48"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
49" targetNamespace='x-schema:test2.xsd'>"
50" <element name='root'>"
52" <sequence maxOccurs='unbounded'>"
61L"<?xml version='1.0'?>"
62"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
63" targetNamespace='x-schema:test3.xsd'>"
64" <element name='root'>"
66" <sequence maxOccurs='unbounded'>"
75L"<?xml version='1.0'?>"
76"<Schema xmlns='urn:schemas-microsoft-com:xml-data'"
77" xmlns:dt='urn:schemas-microsoft-com:datatypes'"
79" <ElementType name='x' dt:type='boolean'/>"
80" <ElementType name='y'>"
81" <datatype dt:type='int'/>"
83" <ElementType name='z'/>"
84" <ElementType name='root' content='eltOnly' model='open' order='seq'>"
93L"<?xml version='1.0'?>"
94"<Schema xmlns='urn:schemas-microsoft-com:xml-data'"
95" xmlns:dt='urn:schemas-microsoft-com:datatypes'"
97" <ElementType name='x' dt:type='bin.base64'/>"
98" <ElementType name='y' dt:type='uuid'/>"
99" <ElementType name='z'/>"
100" <ElementType name='root' content='eltOnly' model='closed' order='one'>"
101" <element type='x'/>"
102" <element type='y'/>"
103" <element type='z'/>"
139 ok(
hr ==
S_OK,
"Failed to create a document object, hr %#lx.\n",
hr);
150 ok(
hr ==
S_OK,
"Failed to create a document object, hr %#lx.\n",
hr);
158 static const WCHAR regex_doc[] =
160"<?xml version='1.0'?>"
161"<root xmlns='urn:test'>%s</root>";
163 static const WCHAR regex_schema[] =
164L"<?xml version='1.0'?>"
165"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
166" targetNamespace='urn:test'>"
167" <element name='root'>"
169" <restriction base='string'>"
170" <pattern value='%s'/>"
178 BSTR namespace, bstr;
187 hr = IXMLDOMDocument2_loadXML(doc, bstr, &
b);
189 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
194 hr = IXMLDOMDocument2_loadXML(
schema, bstr, &
b);
196 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
206 hr = IXMLDOMSchemaCollection_add(
cache,
namespace,
v);
220 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
229 hr = IXMLDOMDocument2_validate(doc, &
err);
230 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
231 if (IXMLDOMParseError_get_reason(
err, &bstr) !=
S_FALSE)
234 IXMLDOMParseError_Release(
err);
241 static const struct regex_test
262 {
L"\\uCAFE",
L"\xCAFE" },
264 {
L"\\uD83D\\uDE00",
L"\xD83D\xDE00" },
287 IXMLDOMDocument2_Release(doc);
289 IXMLDOMDocument2_Release(
schema);
291 IXMLDOMSchemaCollection_Release(
cache);
311 IXMLDOMSchemaCollection2_Release(
cache);
328 ok(doc !=
NULL,
"got %p\n", doc);
339 hr = IXMLDOMSchemaCollection2_get_length(
cache, &
len);
341 ok(
len == 1,
"Unexpected length %ld.\n",
len);
346 hr = IXMLDOMSchemaCollection2_remove(
cache,
_bstr_(
L"invaliduri"));
350 hr = IXMLDOMSchemaCollection2_get_length(
cache, &
len);
352 ok(
len == 1,
"Unexpected length %ld.\n",
len);
358 hr = IXMLDOMSchemaCollection2_get_length(
cache, &
len);
360 ok(
len == 0,
"Unexpected length %ld.\n",
len);
362 IXMLDOMDocument2_Release(doc);
363 IXMLDOMSchemaCollection2_Release(
cache);
376 hr = IXMLDOMSchemaCollection2_get_validateOnLoad(
cache,
NULL);
380 hr = IXMLDOMSchemaCollection2_get_validateOnLoad(
cache, &
b);
382 ok(
b == VARIANT_TRUE,
"got %d\n",
b);
384 IXMLDOMSchemaCollection2_Release(
cache);
407 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
410 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
413 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
416 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
419 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
438 for (
i = 0;
i < 5; ++
i)
441 hr = IXMLDOMSchemaCollection_get_namespaceURI(
cache,
i, &bstr);
443 ok(bstr !=
NULL && *bstr,
"expected non-empty string\n");
445 for (
j = 0;
j <
i; ++
j)
450 for (
i = 0;
i < 5; ++
i)
456 IXMLDOMDocument2_Release(schema1);
457 IXMLDOMDocument2_Release(schema2);
458 IXMLDOMDocument2_Release(schema3);
459 IXMLDOMDocument2_Release(schema4);
460 IXMLDOMDocument2_Release(schema5);
462 IXMLDOMSchemaCollection_Release(
cache);
477 win_skip(
"DOMDocument40 is not supported.\n");
481 IUnknown_Release(
obj);
_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)
GLboolean GLboolean GLboolean b
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
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
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
static struct test_info tests[]
#define create_cache(iid)
static const WCHAR xdr_schema1_xml[]
static const WCHAR xdr_schema2_uri[]
static BSTR alloced_bstrs[256]
static const WCHAR xdr_schema2_xml[]
static int alloced_bstrs_count
static void free_bstrs(void)
static BSTR _bstr_(const WCHAR *str)
#define create_document(iid)
static const WCHAR xdr_schema1_uri[]
static VARIANT _variantdoc_(void *doc)
static void test_collection_content(void)
static const WCHAR xsd_schema1_uri[]
static HRESULT validate_regex_document(IXMLDOMDocument2 *doc, IXMLDOMDocument2 *schema, IXMLDOMSchemaCollection *cache, const WCHAR *regex, const WCHAR *input)
static const WCHAR xsd_schema3_xml[]
static const WCHAR xsd_schema2_xml[]
static const WCHAR xsd_schema1_xml[]
static const WCHAR xsd_schema2_uri[]
static const WCHAR xsd_schema3_uri[]
static void test_regex(void)
static void test_remove(void)
static void test_get(void)
static void test_validate_on_load(void)
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)