ReactOS 0.4.16-dev-2207-geb15453
schema.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <libxml/xmlerror.h>
#include <libxml/tree.h>
#include <libxml/xmlschemas.h>
#include <libxml/schemasInternals.h>
#include <libxml/hash.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/xmlIO.h>
#include <libxml/xmlversion.h>
#include <libxml/xpath.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "msxml6.h"
#include "wine/debug.h"
#include "msxml_private.h"
Include dependency graph for schema.c:

Go to the source code of this file.

Classes

struct  schema_cache
 
struct  cache_entry
 

Macros

#define COBJMACROS
 
#define DEFAULT_HASHTABLE_SIZE   17
 
#define DT_MIN_STR_LEN   2
 
#define DT_MAX_STR_LEN   11
 
#define DT_MIN_HASH_VALUE   2
 
#define DT_MAX_HASH_VALUE   115
 

Enumerations

enum  CacheEntryType { CacheEntryType_Invalid , CacheEntryType_XDR , CacheEntryType_XSD , CacheEntryType_NS }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
xmlDocPtr XDR_to_XSD_doc (xmlDocPtr xdr_doc, xmlChar const *nsURI)
 
static void LIBXML2_LOG_CALLBACK parser_error (void *ctx, char const *msg,...)
 
static void LIBXML2_LOG_CALLBACK parser_warning (void *ctx, char const *msg,...)
 
static void parser_serror (void *ctx, const xmlError *err)
 
static xmlSchemaPtr Schema_parse (xmlSchemaParserCtxtPtr spctx)
 
static void LIBXML2_LOG_CALLBACK validate_error (void *ctx, char const *msg,...)
 
static void LIBXML2_LOG_CALLBACK validate_warning (void *ctx, char const *msg,...)
 
static void validate_serror (void *ctx, const xmlError *err)
 
static HRESULT schema_cache_get_item (IUnknown *iface, LONG index, VARIANT *item)
 
static HRESULT Schema_validate_tree (xmlSchemaPtr schema, xmlNodePtr tree)
 
static DWORD dt_hash (xmlChar const *str, int len)
 
static DWORD dt_hash_bstr (OLECHAR const *bstr, int len)
 
XDR_DT str_to_dt (xmlChar const *str, int len)
 
XDR_DT bstr_to_dt (OLECHAR const *bstr, int len)
 
xmlChar constdt_to_str (XDR_DT dt)
 
OLECHAR constdt_to_bstr (XDR_DT dt)
 
const chardebugstr_dt (XDR_DT dt)
 
HRESULT dt_validate (XDR_DT dt, xmlChar const *content)
 
static xmlChar constget_node_nsURI (xmlNodePtr node)
 
static cache_entryget_entry (schema_cache *This, xmlChar const *nsURI)
 
static xmlSchemaPtr get_node_schema (schema_cache *This, xmlNodePtr node)
 
static xmlParserInputPtr external_entity_loader (const char *URL, const char *ID, xmlParserCtxtPtr ctxt)
 
void schemasInit (void)
 
void schemasCleanup (void)
 
static LONG cache_entry_add_ref (cache_entry *entry)
 
static LONG cache_entry_release (cache_entry *entry)
 
static schema_cacheimpl_from_IXMLDOMSchemaCollection2 (IXMLDOMSchemaCollection2 *iface)
 
static schema_cacheimpl_from_IXMLDOMSchemaCollection (IXMLDOMSchemaCollection *iface)
 
static schema_cacheunsafe_impl_from_IXMLDOMSchemaCollection (IXMLDOMSchemaCollection *iface)
 
static CacheEntryType cache_type_from_xmlDocPtr (xmlDocPtr schema)
 
static BOOL link_datatypes (xmlDocPtr schema)
 
static cache_entrycache_entry_from_xsd_doc (xmlDocPtr doc, xmlChar const *nsURI, MSXML_VERSION v)
 
static cache_entrycache_entry_from_xdr_doc (xmlDocPtr doc, xmlChar const *nsURI, MSXML_VERSION version)
 
static cache_entrycache_entry_from_url (VARIANT url, xmlChar const *nsURI, MSXML_VERSION version)
 
static void cache_free (void *data, const xmlChar *name)
 
static int cache_free_uri (schema_cache *cache, const xmlChar *uri)
 
static void cache_add_entry (schema_cache *cache, const xmlChar *uri, cache_entry *entry)
 
static void cache_remove_entry (schema_cache *cache, const xmlChar *uri)
 
HRESULT cache_from_doc_ns (IXMLDOMSchemaCollection2 *iface, xmlnode *node)
 
static HRESULT WINAPI schema_cache_QueryInterface (IXMLDOMSchemaCollection2 *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI schema_cache_AddRef (IXMLDOMSchemaCollection2 *iface)
 
static ULONG WINAPI schema_cache_Release (IXMLDOMSchemaCollection2 *iface)
 
static HRESULT WINAPI schema_cache_GetTypeInfoCount (IXMLDOMSchemaCollection2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI schema_cache_GetTypeInfo (IXMLDOMSchemaCollection2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI schema_cache_GetIDsOfNames (IXMLDOMSchemaCollection2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI schema_cache_Invoke (IXMLDOMSchemaCollection2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI schema_cache_add (IXMLDOMSchemaCollection2 *iface, BSTR uri, VARIANT var)
 
static HRESULT WINAPI schema_cache_get (IXMLDOMSchemaCollection2 *iface, BSTR uri, IXMLDOMNode **node)
 
static HRESULT WINAPI schema_cache_remove (IXMLDOMSchemaCollection2 *iface, BSTR uri)
 
static HRESULT WINAPI schema_cache_get_length (IXMLDOMSchemaCollection2 *iface, LONG *length)
 
static HRESULT WINAPI schema_cache_get_namespaceURI (IXMLDOMSchemaCollection2 *iface, LONG index, BSTR *uri)
 
static void cache_copy (void *data, void *dest, const xmlChar *name)
 
static HRESULT WINAPI schema_cache_addCollection (IXMLDOMSchemaCollection2 *iface, IXMLDOMSchemaCollection *collection)
 
static HRESULT WINAPI schema_cache_get__newEnum (IXMLDOMSchemaCollection2 *iface, IUnknown **enumv)
 
static HRESULT WINAPI schema_cache_validate (IXMLDOMSchemaCollection2 *iface)
 
static HRESULT WINAPI schema_cache_put_validateOnLoad (IXMLDOMSchemaCollection2 *iface, VARIANT_BOOL value)
 
static HRESULT WINAPI schema_cache_get_validateOnLoad (IXMLDOMSchemaCollection2 *iface, VARIANT_BOOL *value)
 
static HRESULT WINAPI schema_cache_getSchema (IXMLDOMSchemaCollection2 *iface, BSTR namespaceURI, ISchema **schema)
 
static HRESULT WINAPI schema_cache_getDeclaration (IXMLDOMSchemaCollection2 *iface, IXMLDOMNode *node, ISchemaItem **item)
 
static xmlSchemaElementPtr lookup_schema_elemDecl (xmlSchemaPtr schema, xmlNodePtr node)
 
static xmlNodePtr lookup_schema_element (xmlSchemaPtr schema, xmlNodePtr node)
 
HRESULT SchemaCache_validate_tree (IXMLDOMSchemaCollection2 *iface, xmlNodePtr tree)
 
XDR_DT SchemaCache_get_node_dt (IXMLDOMSchemaCollection2 *iface, xmlNodePtr node)
 
HRESULT SchemaCache_create (MSXML_VERSION version, void **obj)
 

Variables

static const xmlChar XSD_schema [] = "schema"
 
static const xmlChar XSD_nsURI [] = "http://www.w3.org/2001/XMLSchema"
 
static const xmlChar XDR_schema [] = "Schema"
 
static const xmlChar XDR_nsURI [] = "urn:schemas-microsoft-com:xml-data"
 
static const xmlChar DT_nsURI [] = "urn:schemas-microsoft-com:datatypes"
 
static xmlChardatatypes_src
 
static int datatypes_len
 
static HGLOBAL datatypes_handle
 
static HRSRC datatypes_rsrc
 
static xmlSchemaPtr datatypes_schema
 
static const WCHAR emptyW [] = {0}
 
static const tid_t schema_cache_se_tids []
 
static const xmlChar DT_bin_base64 [] = "bin.base64"
 
static const xmlChar DT_bin_hex [] = "bin.hex"
 
static const xmlChar DT_boolean [] = "boolean"
 
static const xmlChar DT_char [] = "char"
 
static const xmlChar DT_date [] = "date"
 
static const xmlChar DT_date_tz [] = "date.tz"
 
static const xmlChar DT_dateTime [] = "dateTime"
 
static const xmlChar DT_dateTime_tz [] = "dateTime.tz"
 
static const xmlChar DT_entity [] = "entity"
 
static const xmlChar DT_entities [] = "entities"
 
static const xmlChar DT_enumeration [] = "enumeration"
 
static const xmlChar DT_fixed_14_4 [] = "fixed.14.4"
 
static const xmlChar DT_float [] = "float"
 
static const xmlChar DT_i1 [] = "i1"
 
static const xmlChar DT_i2 [] = "i2"
 
static const xmlChar DT_i4 [] = "i4"
 
static const xmlChar DT_i8 [] = "i8"
 
static const xmlChar DT_id [] = "id"
 
static const xmlChar DT_idref [] = "idref"
 
static const xmlChar DT_idrefs [] = "idrefs"
 
static const xmlChar DT_int [] = "int"
 
static const xmlChar DT_nmtoken [] = "nmtoken"
 
static const xmlChar DT_nmtokens [] = "nmtokens"
 
static const xmlChar DT_notation [] = "notation"
 
static const xmlChar DT_number [] = "number"
 
static const xmlChar DT_r4 [] = "r4"
 
static const xmlChar DT_r8 [] = "r8"
 
static const xmlChar DT_string [] = "string"
 
static const xmlChar DT_time [] = "time"
 
static const xmlChar DT_time_tz [] = "time.tz"
 
static const xmlChar DT_ui1 [] = "ui1"
 
static const xmlChar DT_ui2 [] = "ui2"
 
static const xmlChar DT_ui4 [] = "ui4"
 
static const xmlChar DT_ui8 [] = "ui8"
 
static const xmlChar DT_uri [] = "uri"
 
static const xmlChar DT_uuid [] = "uuid"
 
static const OLECHAR wDT_bin_base64 [] = {'b','i','n','.','b','a','s','e','6','4',0}
 
static const OLECHAR wDT_bin_hex [] = {'b','i','n','.','h','e','x',0}
 
static const OLECHAR wDT_boolean [] = {'b','o','o','l','e','a','n',0}
 
static const OLECHAR wDT_char [] = {'c','h','a','r',0}
 
static const OLECHAR wDT_date [] = {'d','a','t','e',0}
 
static const OLECHAR wDT_date_tz [] = {'d','a','t','e','.','t','z',0}
 
static const OLECHAR wDT_dateTime [] = {'d','a','t','e','T','i','m','e',0}
 
static const OLECHAR wDT_dateTime_tz [] = {'d','a','t','e','T','i','m','e','.','t','z',0}
 
static const OLECHAR wDT_entity [] = {'e','n','t','i','t','y',0}
 
static const OLECHAR wDT_entities [] = {'e','n','t','i','t','i','e','s',0}
 
static const OLECHAR wDT_enumeration [] = {'e','n','u','m','e','r','a','t','i','o','n',0}
 
static const OLECHAR wDT_fixed_14_4 [] = {'f','i','x','e','d','.','1','4','.','4',0}
 
static const OLECHAR wDT_float [] = {'f','l','o','a','t',0}
 
static const OLECHAR wDT_i1 [] = {'i','1',0}
 
static const OLECHAR wDT_i2 [] = {'i','2',0}
 
static const OLECHAR wDT_i4 [] = {'i','4',0}
 
static const OLECHAR wDT_i8 [] = {'i','8',0}
 
static const OLECHAR wDT_id [] = {'i','d',0}
 
static const OLECHAR wDT_idref [] = {'i','d','r','e','f',0}
 
static const OLECHAR wDT_idrefs [] = {'i','d','r','e','f','s',0}
 
static const OLECHAR wDT_int [] = {'i','n','t',0}
 
static const OLECHAR wDT_nmtoken [] = {'n','m','t','o','k','e','n',0}
 
static const OLECHAR wDT_nmtokens [] = {'n','m','t','o','k','e','n','s',0}
 
static const OLECHAR wDT_notation [] = {'n','o','t','a','t','i','o','n',0}
 
static const OLECHAR wDT_number [] = {'n','u','m','b','e','r',0}
 
static const OLECHAR wDT_r4 [] = {'r','4',0}
 
static const OLECHAR wDT_r8 [] = {'r','8',0}
 
static const OLECHAR wDT_string [] = {'s','t','r','i','n','g',0}
 
static const OLECHAR wDT_time [] = {'t','i','m','e',0}
 
static const OLECHAR wDT_time_tz [] = {'t','i','m','e','.','t','z',0}
 
static const OLECHAR wDT_ui1 [] = {'u','i','1',0}
 
static const OLECHAR wDT_ui2 [] = {'u','i','2',0}
 
static const OLECHAR wDT_ui4 [] = {'u','i','4',0}
 
static const OLECHAR wDT_ui8 [] = {'u','i','8',0}
 
static const OLECHAR wDT_uri [] = {'u','r','i',0}
 
static const OLECHAR wDT_uuid [] = {'u','u','i','d',0}
 
static const BYTE hash_assoc_values []
 
static const struct enumvariant_funcs schemacache_enumvariant
 
static const xmlChar *const DT_string_table [LAST_DT]
 
static const WCHAR *const DT_wstring_table [LAST_DT]
 
static const XDR_DT DT_lookup_table []
 
static xmlExternalEntityLoader _external_entity_loader
 
static const struct IXMLDOMSchemaCollection2Vtbl XMLDOMSchemaCollection2Vtbl
 
static const tid_t schemacache_iface_tids []
 
static dispex_static_data_t schemacache_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file schema.c.

◆ DEFAULT_HASHTABLE_SIZE

#define DEFAULT_HASHTABLE_SIZE   17

Definition at line 55 of file schema.c.

◆ DT_MAX_HASH_VALUE

#define DT_MAX_HASH_VALUE   115

Definition at line 124 of file schema.c.

◆ DT_MAX_STR_LEN

#define DT_MAX_STR_LEN   11

Definition at line 122 of file schema.c.

◆ DT_MIN_HASH_VALUE

#define DT_MIN_HASH_VALUE   2

Definition at line 123 of file schema.c.

◆ DT_MIN_STR_LEN

#define DT_MIN_STR_LEN   2

Definition at line 121 of file schema.c.

Enumeration Type Documentation

◆ CacheEntryType

Enumerator
CacheEntryType_Invalid 
CacheEntryType_XDR 
CacheEntryType_XSD 
CacheEntryType_NS 

Definition at line 82 of file schema.c.

82 {
CacheEntryType
Definition: schema.c:82
@ CacheEntryType_Invalid
Definition: schema.c:83
@ CacheEntryType_XDR
Definition: schema.c:84
@ CacheEntryType_XSD
Definition: schema.c:85
@ CacheEntryType_NS
Definition: schema.c:86

Function Documentation

◆ bstr_to_dt()

XDR_DT bstr_to_dt ( OLECHAR const bstr,
int  len 
)

Definition at line 555 of file schema.c.

556{
557 DWORD hash = dt_hash_bstr(bstr, len);
558 XDR_DT dt = DT_INVALID;
559
560 if (hash <= DT_MAX_HASH_VALUE)
561 dt = DT_lookup_table[hash];
562
563 if (dt != DT_INVALID && lstrcmpiW(bstr, DT_wstring_table[dt]) == 0)
564 return dt;
565
566 return DT_INVALID;
567}
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4265
static const WCHAR *const DT_wstring_table[LAST_DT]
Definition: schema.c:439
#define DT_MAX_HASH_VALUE
Definition: schema.c:124
static const XDR_DT DT_lookup_table[]
Definition: schema.c:479
static DWORD dt_hash_bstr(OLECHAR const *bstr, int len)
Definition: schema.c:356
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
enum _XDR_DT XDR_DT
@ DT_INVALID
Definition: msxml_private.h:41
Definition: _hash_fun.h:40

Referenced by domelem_put_dataType().

◆ cache_add_entry()

static void cache_add_entry ( schema_cache cache,
const xmlChar uri,
cache_entry entry 
)
static

Definition at line 988 of file schema.c.

989{
990 int i;
991
992 /* meaning no entry found with this name */
994 {
995 if (cache->count == cache->allocated)
996 {
997 cache->allocated *= 2;
998 cache->uris = realloc(cache->uris, cache->allocated * sizeof(xmlChar*));
999 }
1000 i = cache->count++;
1001 }
1002 else
1004
1005 cache->uris[i] = strdupxmlChar(uri);
1006 xmlHashAddEntry(cache->cache, uri, entry);
1007}
#define realloc
Definition: debug_ros.c:6
static int cache_free_uri(schema_cache *cache, const xmlChar *uri)
Definition: schema.c:974
static void cache_free(void *data, const xmlChar *name)
Definition: schema.c:968
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
Definition: glfuncs.h:248
uint32_t entry
Definition: isohybrid.c:63
const char * uri
Definition: sec_mgr.c:1588
static xmlChar * strdupxmlChar(const xmlChar *str)
int xmlHashRemoveEntry(xmlHashTablePtr hash, const xmlChar *key, xmlHashDeallocator dealloc)
Definition: hash.c:1102
int xmlHashAddEntry(xmlHashTablePtr hash, const xmlChar *key, void *payload)
Definition: hash.c:621
Definition: cache.c:49
unsigned char xmlChar
Definition: xmlstring.h:28

Referenced by cache_copy(), cache_from_doc_ns(), and schema_cache_add().

◆ cache_copy()

static void cache_copy ( void data,
void dest,
const xmlChar name 
)
static

Definition at line 1385 of file schema.c.

1386{
1389
1390 if (xmlHashLookup(This->cache, name) == NULL)
1391 {
1394 }
1395}
#define NULL
Definition: types.h:112
static LONG cache_entry_add_ref(cache_entry *entry)
Definition: schema.c:755
static void cache_add_entry(schema_cache *cache, const xmlChar *uri, cache_entry *entry)
Definition: schema.c:988
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static char * dest
Definition: rtl.c:135
void * xmlHashLookup(xmlHashTablePtr hash, const xmlChar *key)
Definition: hash.c:739
Definition: svc_auth_des.c:77
Definition: name.c:39

Referenced by schema_cache_addCollection().

◆ cache_entry_add_ref()

static LONG cache_entry_add_ref ( cache_entry entry)
static

Definition at line 755 of file schema.c.

756{
758 TRACE("%p, refcount %ld.\n", entry, ref);
759 return ref;
760}
#define InterlockedIncrement
Definition: armddk.h:53
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48

Referenced by cache_copy(), and schema_cache_add().

◆ cache_entry_from_url()

static cache_entry * cache_entry_from_url ( VARIANT  url,
xmlChar const nsURI,
MSXML_VERSION  version 
)
static

Definition at line 919 of file schema.c.

920{
923 xmlDocPtr doc = NULL;
925 VARIANT_BOOL b = VARIANT_FALSE;
927
928 if (hr != S_OK)
929 {
930 FIXME("failed to create domdoc\n");
931 return NULL;
932 }
933 assert(domdoc != NULL);
934 assert(V_VT(&url) == VT_BSTR);
935
936 hr = IXMLDOMDocument3_load(domdoc, url, &b);
937 if (hr != S_OK)
938 {
939 ERR("load() returned %#lx.\n", hr);
940 if (b != VARIANT_TRUE)
941 {
942 FIXME("Failed to load doc at %s\n", debugstr_w(V_BSTR(&url)));
943 IXMLDOMDocument3_Release(domdoc);
944 return NULL;
945 }
946 }
947 doc = xmlNodePtr_from_domnode((IXMLDOMNode*)domdoc, XML_DOCUMENT_NODE)->doc;
949
950 switch (type)
951 {
954 break;
957 break;
958 default:
959 entry = NULL;
960 FIXME("invalid schema\n");
961 break;
962 }
963 IXMLDOMDocument3_Release(domdoc);
964
965 return entry;
966}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
short VARIANT_BOOL
Definition: compat.h:2290
@ VT_BSTR
Definition: compat.h:2303
static const WCHAR version[]
Definition: asmname.c:66
#define assert(_expr)
Definition: assert.h:32
HRESULT dom_document_create(MSXML_VERSION version, void **ppObj)
Definition: domdoc.c:3788
static cache_entry * cache_entry_from_xsd_doc(xmlDocPtr doc, xmlChar const *nsURI, MSXML_VERSION v)
Definition: schema.c:855
static CacheEntryType cache_type_from_xmlDocPtr(xmlDocPtr schema)
Definition: schema.c:805
static cache_entry * cache_entry_from_xdr_doc(xmlDocPtr doc, xmlChar const *nsURI, MSXML_VERSION version)
Definition: schema.c:886
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
static const WCHAR url[]
Definition: encode.c:1384
xmlNodePtr xmlNodePtr_from_domnode(IXMLDOMNode *iface, xmlElementType type)
Definition: node.c:52
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
HRESULT hr
Definition: shlfolder.c:183
Definition: domdoc.c:111

Referenced by schema_cache_add().

◆ cache_entry_from_xdr_doc()

static cache_entry * cache_entry_from_xdr_doc ( xmlDocPtr  doc,
xmlChar const nsURI,
MSXML_VERSION  version 
)
static

Definition at line 886 of file schema.c.

887{
889 xmlSchemaParserCtxtPtr spctx;
890 xmlDocPtr new_doc = xmlCopyDoc(doc, 1), xsd_doc = XDR_to_XSD_doc(doc, nsURI);
891
892 link_datatypes(xsd_doc);
893
895 entry->ref = 0;
896 spctx = xmlSchemaNewDocParserCtxt(xsd_doc);
897
898 if ((entry->schema = Schema_parse(spctx)))
899 {
900 entry->doc = new_doc;
901 xmldoc_init(entry->schema->doc, version);
903 xmldoc_add_ref(entry->doc);
904 xmldoc_add_ref(entry->schema->doc);
905 }
906 else
907 {
908 FIXME("failed to parse doc\n");
909 xmlFreeDoc(new_doc);
910 xmlFreeDoc(xsd_doc);
911 free(entry);
912 entry = NULL;
913 }
914 xmlSchemaFreeParserCtxt(spctx);
915
916 return entry;
917}
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
void xmldoc_init(xmlDocPtr doc, MSXML_VERSION version)
Definition: domdoc.c:606
LONG xmldoc_add_ref(xmlDocPtr doc)
Definition: domdoc.c:619
static xmlSchemaPtr Schema_parse(xmlSchemaParserCtxtPtr spctx)
Definition: schema.c:251
static BOOL link_datatypes(xmlDocPtr schema)
Definition: schema.c:827
xmlDocPtr XDR_to_XSD_doc(xmlDocPtr xdr_doc, xmlChar const *nsURI)
Definition: xdr.c:810

Referenced by cache_entry_from_url(), and schema_cache_add().

◆ cache_entry_from_xsd_doc()

static cache_entry * cache_entry_from_xsd_doc ( xmlDocPtr  doc,
xmlChar const nsURI,
MSXML_VERSION  v 
)
static

Definition at line 855 of file schema.c.

856{
858 xmlSchemaParserCtxtPtr spctx;
859 xmlDocPtr new_doc = xmlCopyDoc(doc, 1);
860
861 link_datatypes(new_doc);
862
863 /* TODO: if the nsURI is different from the default xmlns or targetNamespace,
864 * do we need to do something special here? */
866 entry->ref = 0;
867 spctx = xmlSchemaNewDocParserCtxt(new_doc);
868
869 if ((entry->schema = Schema_parse(spctx)))
870 {
871 xmldoc_init(entry->schema->doc, v);
872 entry->doc = entry->schema->doc;
873 xmldoc_add_ref(entry->doc);
874 }
875 else
876 {
877 FIXME("failed to parse doc\n");
878 xmlFreeDoc(new_doc);
879 free(entry);
880 entry = NULL;
881 }
882 xmlSchemaFreeParserCtxt(spctx);
883 return entry;
884}
const GLdouble * v
Definition: gl.h:2040

Referenced by cache_entry_from_url(), and schema_cache_add().

◆ cache_entry_release()

static LONG cache_entry_release ( cache_entry entry)
static

Definition at line 762 of file schema.c.

763{
765 TRACE("%p, refcount %ld.\n", entry, ref);
766
767 if (ref == 0)
768 {
769 if (entry->type == CacheEntryType_XSD)
770 {
771 xmldoc_release(entry->doc);
772 entry->schema->doc = NULL;
773 xmlSchemaFree(entry->schema);
774 }
775 else if (entry->type == CacheEntryType_XDR)
776 {
777 xmldoc_release(entry->doc);
778 xmldoc_release(entry->schema->doc);
779 entry->schema->doc = NULL;
780 xmlSchemaFree(entry->schema);
781 }
782
783 free(entry);
784 }
785 return ref;
786}
#define InterlockedDecrement
Definition: armddk.h:52
LONG xmldoc_release(xmlDocPtr doc)
Definition: domdoc.c:653

Referenced by cache_free().

◆ cache_free()

static void cache_free ( void data,
const xmlChar name 
)
static

Definition at line 968 of file schema.c.

969{
971}
static LONG cache_entry_release(cache_entry *entry)
Definition: schema.c:762

Referenced by cache_add_entry(), cache_remove_entry(), and schema_cache_Release().

◆ cache_free_uri()

static int cache_free_uri ( schema_cache cache,
const xmlChar uri 
)
static

Definition at line 974 of file schema.c.

975{
976 int i;
977
978 for (i = 0; i < cache->count; i++)
979 if (xmlStrEqual(cache->uris[i], uri))
980 {
981 free(cache->uris[i]);
982 return i;
983 }
984
985 return -1;
986}
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:162

Referenced by cache_add_entry(), and cache_remove_entry().

◆ cache_from_doc_ns()

HRESULT cache_from_doc_ns ( IXMLDOMSchemaCollection2 iface,
xmlnode node 
)

Definition at line 1028 of file schema.c.

1029{
1031 static const xmlChar query[] = "//*/namespace::*";
1032 xmlXPathObjectPtr nodeset;
1033 xmlXPathContextPtr ctxt;
1034
1035 This->read_only = 1;
1036
1037 ctxt = xmlXPathNewContext(node->node->doc);
1038
1039 nodeset = xmlXPathEvalExpression(query, ctxt);
1040 xmlXPathFreeContext(ctxt);
1041
1042 if (nodeset)
1043 {
1044 int pos = 0, len = xmlXPathNodeSetGetLength(nodeset->nodesetval);
1045
1046 while (pos < len)
1047 {
1048 xmlNodePtr node = xmlXPathNodeSetItem(nodeset->nodesetval, pos);
1049 if (node->type == XML_NAMESPACE_DECL)
1050 {
1051 static const xmlChar defns[] = "http://www.w3.org/XML/1998/namespace";
1052 xmlNsPtr ns = (xmlNsPtr)node;
1054
1055 /* filter out default uri */
1056 if (xmlStrEqual(ns->href, defns))
1057 {
1058 pos++;
1059 continue;
1060 }
1061
1062 entry = malloc(sizeof(cache_entry));
1063 entry->type = CacheEntryType_NS;
1064 entry->ref = 1;
1065 entry->schema = NULL;
1066 entry->doc = NULL;
1067
1068 cache_add_entry(This, ns->href, entry);
1069 }
1070 pos++;
1071 }
1072
1073 xmlXPathFreeObject(nodeset);
1074 }
1075
1076 return S_OK;
1077}
static schema_cache * impl_from_IXMLDOMSchemaCollection2(IXMLDOMSchemaCollection2 *iface)
Definition: schema.c:790
Definition: mxnamespace.c:38
Definition: dlist.c:348

Referenced by domdoc_get_namespaces().

◆ cache_remove_entry()

static void cache_remove_entry ( schema_cache cache,
const xmlChar uri 
)
static

Definition at line 1009 of file schema.c.

1010{
1011 /* adjust index if entry was really removed */
1012 if (xmlHashRemoveEntry(cache->cache, uri, cache_free) == 0)
1013 {
1014 int i = cache_free_uri(cache, uri);
1015 if (i == -1) return;
1016 /* shift array */
1017 if (i != --cache->count)
1018 memmove(&cache->uris[i], &cache->uris[i+1], (cache->count-i)*sizeof(xmlChar*));
1019 }
1020}
#define memmove(s1, s2, n)
Definition: mkisofs.h:881

Referenced by schema_cache_add(), and schema_cache_remove().

◆ cache_type_from_xmlDocPtr()

static CacheEntryType cache_type_from_xmlDocPtr ( xmlDocPtr  schema)
inlinestatic

Definition at line 805 of file schema.c.

806{
807 xmlNodePtr root = NULL;
808 if (schema)
809 root = xmlDocGetRootElement(schema);
810 if (root && root->ns)
811 {
812
813 if (xmlStrEqual(root->name, XDR_schema) &&
814 xmlStrEqual(root->ns->href, XDR_nsURI))
815 {
816 return CacheEntryType_XDR;
817 }
818 else if (xmlStrEqual(root->name, XSD_schema) &&
819 xmlStrEqual(root->ns->href, XSD_nsURI))
820 {
821 return CacheEntryType_XSD;
822 }
823 }
825}
static const xmlChar XSD_schema[]
Definition: schema.c:59
static const xmlChar XSD_nsURI[]
Definition: schema.c:60
static const xmlChar XDR_nsURI[]
Definition: schema.c:62
static const xmlChar XDR_schema[]
Definition: schema.c:61
const WCHAR * schema

Referenced by cache_entry_from_url(), and schema_cache_add().

◆ debugstr_dt()

const char * debugstr_dt ( XDR_DT  dt)

Definition at line 585 of file schema.c.

586{
587 return debugstr_a(dt != DT_INVALID ? (const char*)DT_string_table[dt] : NULL);
588}
static const xmlChar *const DT_string_table[LAST_DT]
Definition: schema.c:399
#define debugstr_a
Definition: kernel32.h:31

Referenced by domelem_put_dataType(), domelem_put_nodeTypedValue(), dt_validate(), element_get_dt(), and variant_from_dt().

◆ dt_hash()

static DWORD dt_hash ( xmlChar const str,
int  len 
)
static

Definition at line 313 of file schema.c.

314{
315 DWORD hval = (len == -1)? xmlStrlen(str) : len;
316
317 switch (hval)
318 {
319 default:
320 hval += hash_assoc_values[str[10]];
321 /*FALLTHROUGH*/
322 case 10:
323 hval += hash_assoc_values[str[9]];
324 /*FALLTHROUGH*/
325 case 9:
326 hval += hash_assoc_values[str[8]];
327 /*FALLTHROUGH*/
328 case 8:
329 hval += hash_assoc_values[str[7]];
330 /*FALLTHROUGH*/
331 case 7:
332 hval += hash_assoc_values[str[6]];
333 /*FALLTHROUGH*/
334 case 6:
335 hval += hash_assoc_values[str[5]];
336 /*FALLTHROUGH*/
337 case 5:
338 hval += hash_assoc_values[str[4]];
339 /*FALLTHROUGH*/
340 case 4:
341 hval += hash_assoc_values[str[3]];
342 /*FALLTHROUGH*/
343 case 3:
344 hval += hash_assoc_values[str[2]];
345 /*FALLTHROUGH*/
346 case 2:
347 hval += hash_assoc_values[str[1]];
348 /*FALLTHROUGH*/
349 case 1:
350 hval += hash_assoc_values[str[0]];
351 break;
352 }
353 return hval;
354}
static const BYTE hash_assoc_values[]
Definition: schema.c:200
const WCHAR * str
XMLPUBFUN int xmlStrlen(const xmlChar *str)
Definition: xmlstring.c:428

Referenced by str_to_dt().

◆ dt_hash_bstr()

static DWORD dt_hash_bstr ( OLECHAR const bstr,
int  len 
)
static

Definition at line 356 of file schema.c.

357{
358 DWORD hval = (len == -1)? lstrlenW(bstr) : len;
359
360 switch (hval)
361 {
362 default:
363 hval += (bstr[10] & 0xFF00)? 116 : hash_assoc_values[bstr[10]];
364 /*FALLTHROUGH*/
365 case 10:
366 hval += (bstr[9] & 0xFF00)? 116 : hash_assoc_values[bstr[9]];
367 /*FALLTHROUGH*/
368 case 9:
369 hval += (bstr[8] & 0xFF00)? 116 : hash_assoc_values[bstr[8]];
370 /*FALLTHROUGH*/
371 case 8:
372 hval += (bstr[7] & 0xFF00)? 116 : hash_assoc_values[bstr[7]];
373 /*FALLTHROUGH*/
374 case 7:
375 hval += (bstr[6] & 0xFF00)? 116 : hash_assoc_values[bstr[6]];
376 /*FALLTHROUGH*/
377 case 6:
378 hval += (bstr[5] & 0xFF00)? 116 : hash_assoc_values[bstr[5]];
379 /*FALLTHROUGH*/
380 case 5:
381 hval += (bstr[4] & 0xFF00)? 116 : hash_assoc_values[bstr[4]];
382 /*FALLTHROUGH*/
383 case 4:
384 hval += (bstr[3] & 0xFF00)? 116 : hash_assoc_values[bstr[3]];
385 /*FALLTHROUGH*/
386 case 3:
387 hval += (bstr[2] & 0xFF00)? 116 : hash_assoc_values[bstr[2]];
388 /*FALLTHROUGH*/
389 case 2:
390 hval += (bstr[1] & 0xFF00)? 116 : hash_assoc_values[bstr[1]];
391 /*FALLTHROUGH*/
392 case 1:
393 hval += (bstr[0] & 0xFF00)? 116 : hash_assoc_values[bstr[0]];
394 break;
395 }
396 return hval;
397}
#define lstrlenW
Definition: compat.h:750

Referenced by bstr_to_dt().

◆ dt_to_bstr()

OLECHAR const * dt_to_bstr ( XDR_DT  dt)

Definition at line 577 of file schema.c.

578{
579 if (dt == DT_INVALID)
580 return NULL;
581
582 return DT_wstring_table[dt];
583}

Referenced by domelem_get_dataType().

◆ dt_to_str()

xmlChar const * dt_to_str ( XDR_DT  dt)

Definition at line 569 of file schema.c.

570{
571 if (dt == DT_INVALID)
572 return NULL;
573
574 return DT_string_table[dt];
575}

Referenced by domelem_put_dataType(), and dt_validate().

◆ dt_validate()

HRESULT dt_validate ( XDR_DT  dt,
xmlChar const content 
)

Definition at line 590 of file schema.c.

591{
592 xmlDocPtr tmp_doc;
593 xmlNodePtr node;
594 xmlNsPtr ns;
595 HRESULT hr;
596
597 TRACE("(dt:%s, %s)\n", debugstr_dt(dt), debugstr_a((char const*)content));
598
599 if (!datatypes_schema)
600 {
601 xmlSchemaParserCtxtPtr spctx;
603 spctx = xmlSchemaNewMemParserCtxt((char const*)datatypes_src, datatypes_len);
605 xmlSchemaFreeParserCtxt(spctx);
606 }
607
608 switch (dt)
609 {
610 case DT_INVALID:
611 return E_FAIL;
612 case DT_BIN_BASE64:
613 case DT_BIN_HEX:
614 case DT_BOOLEAN:
615 case DT_CHAR:
616 case DT_DATE:
617 case DT_DATE_TZ:
618 case DT_DATETIME:
619 case DT_DATETIME_TZ:
620 case DT_FIXED_14_4:
621 case DT_FLOAT:
622 case DT_I1:
623 case DT_I2:
624 case DT_I4:
625 case DT_I8:
626 case DT_INT:
627 case DT_NMTOKEN:
628 case DT_NMTOKENS:
629 case DT_NUMBER:
630 case DT_R4:
631 case DT_R8:
632 case DT_STRING:
633 case DT_TIME:
634 case DT_TIME_TZ:
635 case DT_UI1:
636 case DT_UI2:
637 case DT_UI4:
638 case DT_UI8:
639 case DT_URI:
640 case DT_UUID:
641 if (!datatypes_schema)
642 {
643 ERR("failed to load schema for urn:schemas-microsoft-com:datatypes, "
644 "you're probably using an old version of libxml2: " LIBXML_DOTTED_VERSION "\n");
645
646 /* Hopefully they don't need much in the way of XDR datatypes support... */
647 return S_OK;
648 }
649
650 if (content && xmlStrlen(content))
651 {
652 tmp_doc = xmlNewDoc(NULL);
653 node = xmlNewChild((xmlNodePtr)tmp_doc, NULL, dt_to_str(dt), content);
654 ns = xmlNewNs(node, DT_nsURI, BAD_CAST "dt");
655 xmlSetNs(node, ns);
656 xmlDocSetRootElement(tmp_doc, node);
657
658 hr = Schema_validate_tree(datatypes_schema, (xmlNodePtr)tmp_doc);
659 xmlFreeDoc(tmp_doc);
660 }
661 else
662 { /* probably the node is being created manually and has no content yet */
663 hr = S_OK;
664 }
665 return hr;
666 default:
667 FIXME("need to handle dt:%s\n", debugstr_dt(dt));
668 return S_OK;
669 }
670}
#define E_FAIL
Definition: ddrawi.h:102
content
Definition: atl_ax.c:994
#define DT_STRING
Definition: datetime.c:117
xmlChar const * dt_to_str(XDR_DT dt)
Definition: schema.c:569
static xmlSchemaPtr datatypes_schema
Definition: schema.c:69
static int datatypes_len
Definition: schema.c:66
static const xmlChar DT_nsURI[]
Definition: schema.c:63
static HRESULT Schema_validate_tree(xmlSchemaPtr schema, xmlNodePtr tree)
Definition: schema.c:292
const char * debugstr_dt(XDR_DT dt)
Definition: schema.c:585
static xmlChar * datatypes_src
Definition: schema.c:65
@ DT_I4
Definition: msxml_private.h:57
@ DT_NMTOKEN
Definition: msxml_private.h:63
@ DT_TIME_TZ
Definition: msxml_private.h:71
@ DT_NUMBER
Definition: msxml_private.h:66
@ DT_FIXED_14_4
Definition: msxml_private.h:53
@ DT_NMTOKENS
Definition: msxml_private.h:64
@ DT_URI
Definition: msxml_private.h:76
@ DT_DATE_TZ
Definition: msxml_private.h:47
@ DT_UI4
Definition: msxml_private.h:74
@ DT_R8
Definition: msxml_private.h:68
@ DT_DATETIME_TZ
Definition: msxml_private.h:49
@ DT_FLOAT
Definition: msxml_private.h:54
@ DT_DATETIME
Definition: msxml_private.h:48
@ DT_BIN_HEX
Definition: msxml_private.h:43
@ DT_I1
Definition: msxml_private.h:55
@ DT_UI8
Definition: msxml_private.h:75
@ DT_DATE
Definition: msxml_private.h:46
@ DT_UI2
Definition: msxml_private.h:73
@ DT_BIN_BASE64
Definition: msxml_private.h:42
@ DT_I2
Definition: msxml_private.h:56
@ DT_R4
Definition: msxml_private.h:67
@ DT_UI1
Definition: msxml_private.h:72
@ DT_BOOLEAN
Definition: msxml_private.h:44
@ DT_CHAR
Definition: msxml_private.h:45
@ DT_TIME
Definition: msxml_private.h:70
@ DT_I8
Definition: msxml_private.h:58
@ DT_INT
Definition: msxml_private.h:62
@ DT_UUID
Definition: msxml_private.h:77
#define BAD_CAST
Definition: xmlstring.h:35
#define LIBXML_DOTTED_VERSION
Definition: xmlversion.h:32

Referenced by domelem_put_dataType().

◆ external_entity_loader()

static xmlParserInputPtr external_entity_loader ( const char URL,
const char ID,
xmlParserCtxtPtr  ctxt 
)
static

Definition at line 691 of file schema.c.

693{
694 xmlParserInputPtr input;
695
696 TRACE("(%s %s %p)\n", debugstr_a(URL), debugstr_a(ID), ctxt);
697
702
703 /* TODO: if the desired schema is in the cache, load it from there */
704 if (lstrcmpA(URL, "urn:schemas-microsoft-com:datatypes") == 0)
705 {
706 TRACE("loading built-in schema for %s\n", URL);
708 }
709 else
710 {
711 input = _external_entity_loader(URL, ID, ctxt);
712 }
713
714 return input;
715}
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4198
HINSTANCE MSXML_hInstance
Definition: main.c:51
static xmlExternalEntityLoader _external_entity_loader
Definition: schema.c:689
static HGLOBAL datatypes_handle
Definition: schema.c:67
static HRSRC datatypes_rsrc
Definition: schema.c:68
GLenum GLenum GLenum input
Definition: glext.h:9031
XMLPUBFUN xmlParserInputPtr xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer)
#define ID
Definition: ruserpass.c:36

Referenced by link_datatypes(), and schemasInit().

◆ get_entry()

static cache_entry * get_entry ( schema_cache This,
xmlChar const nsURI 
)
inlinestatic

Definition at line 677 of file schema.c.

678{
679 return (!nsURI)? xmlHashLookup(This->cache, BAD_CAST "") :
680 xmlHashLookup(This->cache, nsURI);
681}

Referenced by get_node_schema().

◆ get_node_nsURI()

static xmlChar const * get_node_nsURI ( xmlNodePtr  node)
inlinestatic

Definition at line 672 of file schema.c.

673{
674 return (node->ns != NULL)? node->ns->href : NULL;
675}

Referenced by get_node_schema(), lookup_schema_elemDecl(), and SchemaCache_validate_tree().

◆ get_node_schema()

static xmlSchemaPtr get_node_schema ( schema_cache This,
xmlNodePtr  node 
)
inlinestatic

Definition at line 683 of file schema.c.

684{
686 return (!entry)? NULL : entry->schema;
687}
static cache_entry * get_entry(schema_cache *This, xmlChar const *nsURI)
Definition: schema.c:677
static xmlChar const * get_node_nsURI(xmlNodePtr node)
Definition: schema.c:672

Referenced by SchemaCache_get_node_dt(), and SchemaCache_validate_tree().

◆ impl_from_IXMLDOMSchemaCollection()

static schema_cache * impl_from_IXMLDOMSchemaCollection ( IXMLDOMSchemaCollection iface)
inlinestatic

Definition at line 795 of file schema.c.

796{
797 return CONTAINING_RECORD(iface, schema_cache, IXMLDOMSchemaCollection2_iface);
798}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by unsafe_impl_from_IXMLDOMSchemaCollection().

◆ impl_from_IXMLDOMSchemaCollection2()

◆ link_datatypes()

static BOOL link_datatypes ( xmlDocPtr  schema)
static

Definition at line 827 of file schema.c.

828{
829 xmlNodePtr root, next, child;
830 xmlNsPtr ns;
831
833 root = xmlDocGetRootElement(schema);
834 if (!root)
835 return FALSE;
836
837 for (ns = root->nsDef; ns != NULL; ns = ns->next)
838 {
839 if (xmlStrEqual(ns->href, DT_nsURI))
840 break;
841 }
842
843 if (!ns)
844 return FALSE;
845
846 next = xmlFirstElementChild(root);
847 child = xmlNewChild(root, NULL, BAD_CAST "import", NULL);
848 if (next) child = xmlAddPrevSibling(next, child);
849 xmlSetProp(child, BAD_CAST "namespace", DT_nsURI);
850 xmlSetProp(child, BAD_CAST "schemaLocation", DT_nsURI);
851
852 return TRUE;
853}
struct _root root
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static xmlParserInputPtr external_entity_loader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt)
Definition: schema.c:691
static HWND child
Definition: cursoricon.c:298
static unsigned __int64 next
Definition: rand_nt.c:6
XMLPUBFUN xmlExternalEntityLoader xmlGetExternalEntityLoader(void)

Referenced by cache_entry_from_xdr_doc(), and cache_entry_from_xsd_doc().

◆ lookup_schema_elemDecl()

static xmlSchemaElementPtr lookup_schema_elemDecl ( xmlSchemaPtr  schema,
xmlNodePtr  node 
)
static

Definition at line 1503 of file schema.c.

1504{
1505 xmlSchemaElementPtr decl = NULL;
1506 xmlChar const* nsURI = get_node_nsURI(node);
1507
1508 TRACE("(%p, %p)\n", schema, node);
1509
1510 if (xmlStrEqual(nsURI, schema->targetNamespace))
1511 decl = xmlHashLookup(schema->elemDecl, node->name);
1512
1513 if (!decl && xmlHashSize(schema->schemasImports) > 1)
1514 {
1515 FIXME("declaration not found in main schema - need to check schema imports!\n");
1516 /*xmlSchemaImportPtr import;
1517 if (nsURI == NULL)
1518 import = xmlHashLookup(schema->schemasImports, XML_SCHEMAS_NO_NAMESPACE);
1519 else
1520 import = xmlHashLookup(schema->schemasImports, node->ns->href);
1521
1522 if (import != NULL)
1523 decl = xmlHashLookup(import->schema->elemDecl, node->name);*/
1524 }
1525
1526 return decl;
1527}
int xmlHashSize(xmlHashTablePtr hash)
Definition: hash.c:1085

Referenced by lookup_schema_element().

◆ lookup_schema_element()

static xmlNodePtr lookup_schema_element ( xmlSchemaPtr  schema,
xmlNodePtr  node 
)
inlinestatic

Definition at line 1529 of file schema.c.

1530{
1531 xmlSchemaElementPtr decl = lookup_schema_elemDecl(schema, node);
1532 while (decl != NULL && decl->refDecl != NULL)
1533 decl = decl->refDecl;
1534 return (decl != NULL)? decl->node : NULL;
1535}
static xmlSchemaElementPtr lookup_schema_elemDecl(xmlSchemaPtr schema, xmlNodePtr node)
Definition: schema.c:1503

Referenced by SchemaCache_get_node_dt().

◆ parser_error()

static void LIBXML2_LOG_CALLBACK parser_error ( void ctx,
char const msg,
  ... 
)
static

Definition at line 230 of file schema.c.

231{
232 va_list ap;
233 va_start(ap, msg);
235 va_end(ap);
236}
#define msg(x)
Definition: auth_time.c:54
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
char * va_list
Definition: vadefs.h:50
#define LIBXML2_CALLBACK_ERR(caller, msg, ap)
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36

Referenced by error_at(), and Schema_parse().

◆ parser_serror()

static void parser_serror ( void ctx,
const xmlError err 
)
static

Definition at line 246 of file schema.c.

247{
249}
#define LIBXML2_CALLBACK_SERROR(caller, err)
#define err(...)

Referenced by Schema_parse().

◆ parser_warning()

static void LIBXML2_LOG_CALLBACK parser_warning ( void ctx,
char const msg,
  ... 
)
static

Definition at line 238 of file schema.c.

239{
240 va_list ap;
241 va_start(ap, msg);
243 va_end(ap);
244}
#define LIBXML2_CALLBACK_WARN(caller, msg, ap)

Referenced by Schema_parse(), and warning_at().

◆ schema_cache_add()

static HRESULT WINAPI schema_cache_add ( IXMLDOMSchemaCollection2 iface,
BSTR  uri,
VARIANT  var 
)
static

Definition at line 1188 of file schema.c.

1189{
1191 xmlChar* name;
1192
1193 TRACE("(%p)->(%s %s)\n", This, debugstr_w(uri), debugstr_variant(&var));
1194
1195 if (This->read_only) return E_FAIL;
1196
1198
1199 switch (V_VT(&var))
1200 {
1201 case VT_NULL:
1202 {
1204 }
1205 break;
1206
1207 case VT_BSTR:
1208 {
1210
1211 if (entry)
1212 {
1214 }
1215 else
1216 {
1217 free(name);
1218 return E_FAIL;
1219 }
1220
1222 }
1223 break;
1224
1225 case VT_DISPATCH:
1226 case VT_UNKNOWN:
1227 {
1228 xmlDocPtr doc = NULL;
1231 IXMLDOMNode* domnode = NULL;
1232 IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IXMLDOMNode, (void**)&domnode);
1233
1234 if (domnode)
1235 {
1237
1238 IXMLDOMNode_get_nodeType(domnode, &type);
1239 switch (type)
1240 {
1241 case NODE_ELEMENT:
1242 {
1245 BSTR xml;
1246
1247 IXMLDOMNode_get_xml(domnode, &xml);
1248 dom_document_create(This->version, (void **)&domdoc);
1249 IXMLDOMDocument_loadXML(domdoc, xml, &b);
1250 SysFreeString(xml);
1251 doc = xmlNodePtr_from_domnode((IXMLDOMNode*)domdoc, XML_DOCUMENT_NODE)->doc;
1252 break;
1253 }
1254 default:
1255 doc = xmlNodePtr_from_domnode(domnode, XML_DOCUMENT_NODE)->doc;
1256 break;
1257 }
1258 }
1259
1260 if (!doc)
1261 {
1262 IXMLDOMNode_Release(domnode);
1263 free(name);
1264 return E_INVALIDARG;
1265 }
1267
1268 if (type == CacheEntryType_XSD)
1269 {
1270 entry = cache_entry_from_xsd_doc(doc, name, This->version);
1271 }
1272 else if (type == CacheEntryType_XDR)
1273 {
1274 entry = cache_entry_from_xdr_doc(doc, name, This->version);
1275 }
1276 else
1277 {
1278 WARN("invalid schema!\n");
1279 entry = NULL;
1280 }
1281
1282 IXMLDOMNode_Release(domnode);
1283
1284 if (entry)
1285 {
1287 }
1288 else
1289 {
1290 free(name);
1291 return E_FAIL;
1292 }
1293
1295 }
1296 break;
1297
1298 default:
1299 FIXME("arg type is not supported, %s\n", debugstr_variant(&var));
1300 free(name);
1301 return E_INVALIDARG;
1302 }
1303 free(name);
1304 return S_OK;
1305}
#define WARN(fmt,...)
Definition: precomp.h:61
#define E_INVALIDARG
Definition: ddrawi.h:101
OLECHAR * BSTR
Definition: compat.h:2293
@ VT_NULL
Definition: compat.h:2296
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_DISPATCH
Definition: compat.h:2304
static const WCHAR emptyW[]
Definition: schema.c:71
static cache_entry * cache_entry_from_url(VARIANT url, xmlChar const *nsURI, MSXML_VERSION version)
Definition: schema.c:919
static void cache_remove_entry(schema_cache *cache, const xmlChar *uri)
Definition: schema.c:1009
#define b
Definition: ke_i.h:79
const char * var
Definition: shader.c:5666
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
enum tagDOMNodeType DOMNodeType
@ NODE_ELEMENT
Definition: msxml6.idl:113
static xmlChar * xmlchar_from_wchar(const WCHAR *str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_UNKNOWN(A)
Definition: oleauto.h:281

◆ schema_cache_addCollection()

static HRESULT WINAPI schema_cache_addCollection ( IXMLDOMSchemaCollection2 iface,
IXMLDOMSchemaCollection collection 
)
static

Definition at line 1397 of file schema.c.

1399{
1401 schema_cache* That;
1402
1403 TRACE("(%p)->(%p)\n", This, collection);
1404
1405 if (!collection)
1406 return E_POINTER;
1407
1409 if (!That)
1410 {
1411 ERR("external collection implementation\n");
1412 return E_FAIL;
1413 }
1414
1415 /* TODO: detect errors while copying & return E_FAIL */
1417
1418 return S_OK;
1419}
static void cache_copy(void *data, void *dest, const xmlChar *name)
Definition: schema.c:1385
static schema_cache * unsafe_impl_from_IXMLDOMSchemaCollection(IXMLDOMSchemaCollection *iface)
Definition: schema.c:800
static ICollection collection
Definition: typelib.c:184
void xmlHashScan(xmlHashTablePtr hash, xmlHashScanner scan, void *data)
Definition: hash.c:898
xmlHashTablePtr cache
Definition: schema.c:96
#define E_POINTER
Definition: winerror.h:3480

◆ schema_cache_AddRef()

static ULONG WINAPI schema_cache_AddRef ( IXMLDOMSchemaCollection2 iface)
static

Definition at line 1125 of file schema.c.

1126{
1129 TRACE("%p, refcount %ld.\n", iface, ref);
1130 return ref;
1131}

◆ schema_cache_get()

static HRESULT WINAPI schema_cache_get ( IXMLDOMSchemaCollection2 iface,
BSTR  uri,
IXMLDOMNode **  node 
)
static

Definition at line 1307 of file schema.c.

1309{
1312 xmlChar* name;
1313
1314 TRACE("(%p)->(%s %p)\n", This, debugstr_w(uri), node);
1315
1316 if (This->version == MSXML6)
1317 {
1318 if (node) *node = NULL;
1319 return E_NOTIMPL;
1320 }
1321
1322 if (!node)
1323 return E_POINTER;
1324
1325 *node = NULL;
1326
1328 entry = (cache_entry*) xmlHashLookup(This->cache, name);
1329 free(name);
1330
1331 /* TODO: this should be read-only */
1332 if (entry && entry->doc)
1334
1335 return S_OK;
1336}
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT get_domdoc_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document)
Definition: domdoc.c:3749
@ MSXML6
Definition: msxml_dispex.h:33

◆ schema_cache_get__newEnum()

static HRESULT WINAPI schema_cache_get__newEnum ( IXMLDOMSchemaCollection2 iface,
IUnknown **  enumv 
)
static

Definition at line 1421 of file schema.c.

1422{
1424 TRACE("(%p)->(%p)\n", This, enumv);
1426}
static const struct enumvariant_funcs schemacache_enumvariant
Definition: schema.c:287
HRESULT create_enumvariant(IUnknown *, BOOL, const struct enumvariant_funcs *, IEnumVARIANT **)
Definition: selection.c:565

◆ schema_cache_get_item()

static HRESULT schema_cache_get_item ( IUnknown iface,
LONG  index,
VARIANT item 
)
static

Definition at line 281 of file schema.c.

282{
283 V_VT(item) = VT_BSTR;
284 return IXMLDOMSchemaCollection2_get_namespaceURI((IXMLDOMSchemaCollection2*)iface, index, &V_BSTR(item));
285}
GLuint index
Definition: glext.h:6031

◆ schema_cache_get_length()

static HRESULT WINAPI schema_cache_get_length ( IXMLDOMSchemaCollection2 iface,
LONG length 
)
static

Definition at line 1353 of file schema.c.

1354{
1356 TRACE("(%p)->(%p)\n", This, length);
1357
1358 if (!length)
1359 return E_POINTER;
1360
1361 *length = This->count;
1362 return S_OK;
1363}
GLuint GLsizei GLsizei * length
Definition: glext.h:6040

◆ schema_cache_get_namespaceURI()

static HRESULT WINAPI schema_cache_get_namespaceURI ( IXMLDOMSchemaCollection2 iface,
LONG  index,
BSTR uri 
)
static

Definition at line 1365 of file schema.c.

1367{
1369
1370 TRACE("%p, %ld, %p.\n", iface, index, uri);
1371
1372 if (!uri)
1373 return E_POINTER;
1374
1375 if (This->version == MSXML6)
1376 *uri = NULL;
1377
1378 if (index >= This->count)
1379 return E_FAIL;
1380
1381 *uri = bstr_from_xmlChar(This->uris[index]);
1382 return S_OK;
1383}
static BSTR bstr_from_xmlChar(const xmlChar *str)

◆ schema_cache_get_validateOnLoad()

static HRESULT WINAPI schema_cache_get_validateOnLoad ( IXMLDOMSchemaCollection2 iface,
VARIANT_BOOL value 
)
static

Definition at line 1448 of file schema.c.

1450{
1452 TRACE("(%p)->(%p)\n", This, value);
1453
1454 if (!value) return E_POINTER;
1455 *value = This->validateOnLoad;
1456
1457 return S_OK;
1458}
Definition: pdh_main.c:96

◆ schema_cache_getDeclaration()

static HRESULT WINAPI schema_cache_getDeclaration ( IXMLDOMSchemaCollection2 iface,
IXMLDOMNode node,
ISchemaItem **  item 
)
static

Definition at line 1470 of file schema.c.

1472{
1474 FIXME("(%p)->(%p %p): stub\n", This, node, item);
1475 if (item)
1476 *item = NULL;
1477 return E_NOTIMPL;
1478}

◆ schema_cache_GetIDsOfNames()

static HRESULT WINAPI schema_cache_GetIDsOfNames ( IXMLDOMSchemaCollection2 iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1168 of file schema.c.

1171{
1173 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
1174 riid, rgszNames, cNames, lcid, rgDispId);
1175}
LCID lcid
Definition: locale.c:5656
REFIID riid
Definition: atlbase.h:39

◆ schema_cache_getSchema()

static HRESULT WINAPI schema_cache_getSchema ( IXMLDOMSchemaCollection2 iface,
BSTR  namespaceURI,
ISchema **  schema 
)
static

Definition at line 1460 of file schema.c.

1462{
1464 FIXME("(%p)->(%s %p): stub\n", This, debugstr_w(namespaceURI), schema);
1465 if (schema)
1466 *schema = NULL;
1467 return E_NOTIMPL;
1468}

◆ schema_cache_GetTypeInfo()

static HRESULT WINAPI schema_cache_GetTypeInfo ( IXMLDOMSchemaCollection2 iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1160 of file schema.c.

1162{
1164 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
1165 iTInfo, lcid, ppTInfo);
1166}

◆ schema_cache_GetTypeInfoCount()

static HRESULT WINAPI schema_cache_GetTypeInfoCount ( IXMLDOMSchemaCollection2 iface,
UINT pctinfo 
)
static

Definition at line 1153 of file schema.c.

1155{
1157 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1158}

◆ schema_cache_Invoke()

static HRESULT WINAPI schema_cache_Invoke ( IXMLDOMSchemaCollection2 iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 1177 of file schema.c.

1182{
1184 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
1185 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1186}
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337

◆ schema_cache_put_validateOnLoad()

static HRESULT WINAPI schema_cache_put_validateOnLoad ( IXMLDOMSchemaCollection2 iface,
VARIANT_BOOL  value 
)
static

Definition at line 1435 of file schema.c.

1437{
1439 FIXME("(%p)->(%d): stub\n", This, value);
1440
1441 This->validateOnLoad = value;
1442 /* it's ok to disable it, cause we don't validate on load anyway */
1443 if (value == VARIANT_FALSE) return S_OK;
1444
1445 return E_NOTIMPL;
1446}

◆ schema_cache_QueryInterface()

static HRESULT WINAPI schema_cache_QueryInterface ( IXMLDOMSchemaCollection2 iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1079 of file schema.c.

1081{
1083
1084 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
1085
1086 if ( IsEqualIID(riid, &IID_IUnknown) ||
1088 IsEqualIID(riid, &IID_IXMLDOMSchemaCollection) ||
1089 IsEqualIID(riid, &IID_IXMLDOMSchemaCollection2) )
1090 {
1091 *ppvObject = iface;
1092 }
1093 else if(This->version == MSXML6 && IsEqualIID(riid, &CLSID_XMLSchemaCache60))
1094 {
1095 /*
1096 * Version 6 can be queried for an interface with IID equal to CLSID.
1097 * There is no public interface with that IID and returned pointer
1098 * is equal to returned IXMLDOMSchemaCollection2 iface. We assume
1099 * that it's just another way for querying IXMLDOMSchemaCollection2
1100 * interface. Office 2013 ClickToRun installer uses this.
1101 */
1102 WARN("riid CLSID_XMLSchemaCache60, returning IXMLDOMSchemaCollection2 interface.\n");
1103 *ppvObject = iface;
1104 }
1105 else if (dispex_query_interface(&This->dispex, riid, ppvObject))
1106 {
1107 return *ppvObject ? S_OK : E_NOINTERFACE;
1108 }
1109 else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
1110 {
1112 }
1113 else
1114 {
1115 FIXME("interface %s not implemented\n", debugstr_guid(riid));
1116 *ppvObject = NULL;
1117 return E_NOINTERFACE;
1118 }
1119
1120 IXMLDOMSchemaCollection2_AddRef(iface);
1121
1122 return S_OK;
1123}
const GUID IID_IUnknown
static const tid_t schema_cache_se_tids[]
Definition: schema.c:113
#define debugstr_guid
Definition: kernel32.h:35
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
GUID CLSID_XMLSchemaCache60
HRESULT node_create_supporterrorinfo(const tid_t *, void **)
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ schema_cache_Release()

static ULONG WINAPI schema_cache_Release ( IXMLDOMSchemaCollection2 iface)
static

Definition at line 1133 of file schema.c.

1134{
1137 TRACE("%p, refcount %ld.\n", iface, ref);
1138
1139 if (!ref)
1140 {
1141 int i;
1142
1143 for (i = 0; i < This->count; i++)
1144 free(This->uris[i]);
1145 free(This->uris);
1146 xmlHashFree(This->cache, cache_free);
1147 free(This);
1148 }
1149
1150 return ref;
1151}
void xmlHashFree(xmlHashTablePtr hash, xmlHashDeallocator dealloc)
Definition: hash.c:229

◆ schema_cache_remove()

static HRESULT WINAPI schema_cache_remove ( IXMLDOMSchemaCollection2 iface,
BSTR  uri 
)
static

Definition at line 1338 of file schema.c.

1339{
1341 xmlChar* name;
1342
1343 TRACE("(%p)->(%s)\n", This, debugstr_w(uri));
1344
1345 if (This->version == MSXML6) return E_NOTIMPL;
1346
1349 free(name);
1350 return S_OK;
1351}

◆ schema_cache_validate()

static HRESULT WINAPI schema_cache_validate ( IXMLDOMSchemaCollection2 iface)
static

Definition at line 1428 of file schema.c.

1429{
1431 FIXME("(%p): stub\n", This);
1432 return E_NOTIMPL;
1433}

◆ Schema_parse()

static xmlSchemaPtr Schema_parse ( xmlSchemaParserCtxtPtr  spctx)
inlinestatic

Definition at line 251 of file schema.c.

252{
253 TRACE("(%p)\n", spctx);
254
255 xmlSchemaSetParserErrors(spctx, parser_error, parser_warning, NULL);
256 xmlSchemaSetParserStructuredErrors(spctx, parser_serror, NULL);
257 return xmlSchemaParse(spctx);
258}
static void LIBXML2_LOG_CALLBACK parser_error(void *ctx, char const *msg,...)
Definition: schema.c:230
static void parser_serror(void *ctx, const xmlError *err)
Definition: schema.c:246
static void LIBXML2_LOG_CALLBACK parser_warning(void *ctx, char const *msg,...)
Definition: schema.c:238

Referenced by cache_entry_from_xdr_doc(), cache_entry_from_xsd_doc(), dt_validate(), parser_error(), parser_serror(), and parser_warning().

◆ Schema_validate_tree()

static HRESULT Schema_validate_tree ( xmlSchemaPtr  schema,
xmlNodePtr  tree 
)
inlinestatic

Definition at line 292 of file schema.c.

293{
294 xmlSchemaValidCtxtPtr svctx;
295 int err;
296
297 TRACE("(%p, %p)\n", schema, tree);
298 /* TODO: if validateOnLoad property is false,
299 * we probably need to validate the schema here. */
300 svctx = xmlSchemaNewValidCtxt(schema);
301 xmlSchemaSetValidErrors(svctx, validate_error, validate_warning, NULL);
302 xmlSchemaSetValidStructuredErrors(svctx, validate_serror, NULL);
303
304 if (tree->type == XML_DOCUMENT_NODE)
305 err = xmlSchemaValidateDoc(svctx, (xmlDocPtr)tree);
306 else
307 err = xmlSchemaValidateOneElement(svctx, tree);
308
309 xmlSchemaFreeValidCtxt(svctx);
310 return err? S_FALSE : S_OK;
311}
static void LIBXML2_LOG_CALLBACK validate_warning(void *ctx, char const *msg,...)
Definition: schema.c:268
static void validate_serror(void *ctx, const xmlError *err)
Definition: schema.c:276
static void LIBXML2_LOG_CALLBACK validate_error(void *ctx, char const *msg,...)
Definition: schema.c:260
#define S_FALSE
Definition: winerror.h:3451

Referenced by dt_validate(), SchemaCache_validate_tree(), validate_error(), validate_serror(), and validate_warning().

◆ SchemaCache_create()

HRESULT SchemaCache_create ( MSXML_VERSION  version,
void **  obj 
)

Definition at line 1601 of file schema.c.

1602{
1604 if (!This)
1605 return E_OUTOFMEMORY;
1606
1607 TRACE("(%d %p)\n", version, obj);
1608
1609 This->IXMLDOMSchemaCollection2_iface.lpVtbl = &XMLDOMSchemaCollection2Vtbl;
1611 This->allocated = 10;
1612 This->count = 0;
1613 This->uris = malloc(This->allocated * sizeof(xmlChar*));
1614 This->ref = 1;
1615 This->version = version;
1616 This->validateOnLoad = VARIANT_TRUE;
1617 This->read_only = 0;
1618 init_dispex(&This->dispex, (IUnknown*)&This->IXMLDOMSchemaCollection2_iface, &schemacache_dispex);
1619
1620 *obj = &This->IXMLDOMSchemaCollection2_iface;
1621 return S_OK;
1622}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const struct IXMLDOMSchemaCollection2Vtbl XMLDOMSchemaCollection2Vtbl
Definition: schema.c:788
static dispex_static_data_t schemacache_dispex
Definition: schema.c:1594
#define DEFAULT_HASHTABLE_SIZE
Definition: schema.c:55
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
xmlHashTablePtr xmlHashCreate(int size)
Definition: hash.c:160

Referenced by DllGetClassObject(), and domdoc_get_namespaces().

◆ SchemaCache_get_node_dt()

XDR_DT SchemaCache_get_node_dt ( IXMLDOMSchemaCollection2 iface,
xmlNodePtr  node 
)

Definition at line 1561 of file schema.c.

1562{
1564 xmlSchemaPtr schema = get_node_schema(This, node);
1565 XDR_DT dt = DT_INVALID;
1566
1567 TRACE("(%p, %p)\n", This, node);
1568
1569 if (node->ns && xmlStrEqual(node->ns->href, DT_nsURI))
1570 {
1571 dt = str_to_dt(node->name, -1);
1572 }
1573 else if (schema)
1574 {
1575 xmlChar* str;
1576 xmlNodePtr schema_node = lookup_schema_element(schema, node);
1577
1578 str = xmlGetNsProp(schema_node, BAD_CAST "dt", DT_nsURI);
1579 if (str)
1580 {
1581 dt = str_to_dt(str, -1);
1582 xmlFree(str);
1583 }
1584 }
1585
1586 return dt;
1587}
static xmlNodePtr lookup_schema_element(xmlSchemaPtr schema, xmlNodePtr node)
Definition: schema.c:1529
static xmlSchemaPtr get_node_schema(schema_cache *This, xmlNodePtr node)
Definition: schema.c:683
XDR_DT str_to_dt(xmlChar const *str, int len)
Definition: schema.c:541
xmlFreeFunc xmlFree
Definition: globals.c:184

Referenced by element_get_dt().

◆ SchemaCache_validate_tree()

HRESULT SchemaCache_validate_tree ( IXMLDOMSchemaCollection2 iface,
xmlNodePtr  tree 
)

Definition at line 1537 of file schema.c.

1538{
1540 xmlSchemaPtr schema;
1541
1542 TRACE("(%p, %p)\n", This, tree);
1543
1544 if (!tree)
1545 return E_POINTER;
1546
1547 if (tree->type == XML_DOCUMENT_NODE)
1548 tree = xmlDocGetRootElement(tree->doc);
1549
1551 /* TODO: if the ns is not in the cache, and it's a URL,
1552 * do we try to load from that? */
1553 if (schema)
1555 else
1556 WARN("no schema found for xmlns=%s\n", get_node_nsURI(tree));
1557
1558 return E_FAIL;
1559}

Referenced by domdoc_validateNode().

◆ schemasCleanup()

void schemasCleanup ( void  )

Definition at line 748 of file schema.c.

749{
750 xmlSchemaFree(datatypes_schema);
753}
XMLPUBFUN void xmlSetExternalEntityLoader(xmlExternalEntityLoader f)

Referenced by DllMain().

◆ schemasInit()

void schemasInit ( void  )

Definition at line 717 of file schema.c.

718{
719 xmlChar* buf;
720 if (!(datatypes_rsrc = FindResourceA(MSXML_hInstance, "DATATYPES", "XML")))
721 {
722 FIXME("failed to find resource for %s\n", DT_nsURI);
723 return;
724 }
725
727 {
728 FIXME("failed to load resource for %s\n", DT_nsURI);
729 return;
730 }
733
734 /* Resource is loaded as raw data,
735 * need a null-terminated string */
736 while (buf[datatypes_len - 1] != '>') datatypes_len--;
740
742 {
745 }
746}
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by DllMain().

◆ str_to_dt()

XDR_DT str_to_dt ( xmlChar const str,
int  len 
)

Definition at line 541 of file schema.c.

542{
544 XDR_DT dt = DT_INVALID;
545
546 if (hash <= DT_MAX_HASH_VALUE)
547 dt = DT_lookup_table[hash];
548
549 if (dt != DT_INVALID && xmlStrcasecmp(str, DT_string_table[dt]) == 0)
550 return dt;
551
552 return DT_INVALID;
553}
static DWORD dt_hash(xmlChar const *str, int len)
Definition: schema.c:313
XMLPUBFUN int xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:277

Referenced by element_get_dt(), and SchemaCache_get_node_dt().

◆ unsafe_impl_from_IXMLDOMSchemaCollection()

static schema_cache * unsafe_impl_from_IXMLDOMSchemaCollection ( IXMLDOMSchemaCollection iface)
inlinestatic

Definition at line 800 of file schema.c.

801{
802 return iface->lpVtbl == (void*)&XMLDOMSchemaCollection2Vtbl ? impl_from_IXMLDOMSchemaCollection(iface) : NULL;
803}
static schema_cache * impl_from_IXMLDOMSchemaCollection(IXMLDOMSchemaCollection *iface)
Definition: schema.c:795

Referenced by schema_cache_addCollection().

◆ validate_error()

static void LIBXML2_LOG_CALLBACK validate_error ( void ctx,
char const msg,
  ... 
)
static

Definition at line 260 of file schema.c.

Referenced by Schema_validate_tree().

◆ validate_serror()

static void validate_serror ( void ctx,
const xmlError err 
)
static

Definition at line 276 of file schema.c.

Referenced by Schema_validate_tree().

◆ validate_warning()

static void LIBXML2_LOG_CALLBACK validate_warning ( void ctx,
char const msg,
  ... 
)
static

Definition at line 268 of file schema.c.

Referenced by Schema_validate_tree().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

◆ XDR_to_XSD_doc()

xmlDocPtr XDR_to_XSD_doc ( xmlDocPtr  xdr_doc,
xmlChar const nsURI 
)

Definition at line 810 of file xdr.c.

811{
812 xmlDocPtr xsd_doc = xmlNewDoc(NULL);
813
814 TRACE("(%p)\n", xdr_doc);
815
816 XDR_E_Schema(get_schema((xmlNodePtr)xdr_doc), (xmlNodePtr)xsd_doc, nsURI);
817
818 return xsd_doc;
819}
static xmlNodePtr get_schema(xmlNodePtr node)
Definition: xdr.c:116
static xmlNodePtr XDR_E_Schema(xmlNodePtr xdr, xmlNodePtr parent, xmlChar const *nsURI)
Definition: xdr.c:758

Referenced by cache_entry_from_xdr_doc().

Variable Documentation

◆ _external_entity_loader

xmlExternalEntityLoader _external_entity_loader
static

Definition at line 689 of file schema.c.

Referenced by external_entity_loader(), schemasCleanup(), and schemasInit().

◆ datatypes_handle

HGLOBAL datatypes_handle
static

Definition at line 67 of file schema.c.

Referenced by external_entity_loader(), and schemasInit().

◆ datatypes_len

int datatypes_len
static

Definition at line 66 of file schema.c.

Referenced by dt_validate(), and schemasInit().

◆ datatypes_rsrc

HRSRC datatypes_rsrc
static

Definition at line 68 of file schema.c.

Referenced by external_entity_loader(), and schemasInit().

◆ datatypes_schema

xmlSchemaPtr datatypes_schema
static

Definition at line 69 of file schema.c.

Referenced by dt_validate(), and schemasCleanup().

◆ datatypes_src

xmlChar* datatypes_src
static

Definition at line 65 of file schema.c.

Referenced by dt_validate(), external_entity_loader(), schemasCleanup(), and schemasInit().

◆ DT_bin_base64

const xmlChar DT_bin_base64[] = "bin.base64"
static

Definition at line 126 of file schema.c.

◆ DT_bin_hex

const xmlChar DT_bin_hex[] = "bin.hex"
static

Definition at line 127 of file schema.c.

◆ DT_boolean

const xmlChar DT_boolean[] = "boolean"
static

Definition at line 128 of file schema.c.

◆ DT_char

const xmlChar DT_char[] = "char"
static

Definition at line 129 of file schema.c.

◆ DT_date

const xmlChar DT_date[] = "date"
static

Definition at line 130 of file schema.c.

◆ DT_date_tz

const xmlChar DT_date_tz[] = "date.tz"
static

Definition at line 131 of file schema.c.

◆ DT_dateTime

const xmlChar DT_dateTime[] = "dateTime"
static

Definition at line 132 of file schema.c.

◆ DT_dateTime_tz

const xmlChar DT_dateTime_tz[] = "dateTime.tz"
static

Definition at line 133 of file schema.c.

◆ DT_entities

const xmlChar DT_entities[] = "entities"
static

Definition at line 135 of file schema.c.

◆ DT_entity

const xmlChar DT_entity[] = "entity"
static

Definition at line 134 of file schema.c.

◆ DT_enumeration

const xmlChar DT_enumeration[] = "enumeration"
static

Definition at line 136 of file schema.c.

◆ DT_fixed_14_4

const xmlChar DT_fixed_14_4[] = "fixed.14.4"
static

Definition at line 137 of file schema.c.

◆ DT_float

const xmlChar DT_float[] = "float"
static

Definition at line 138 of file schema.c.

◆ DT_i1

const xmlChar DT_i1[] = "i1"
static

Definition at line 139 of file schema.c.

◆ DT_i2

const xmlChar DT_i2[] = "i2"
static

Definition at line 140 of file schema.c.

◆ DT_i4

const xmlChar DT_i4[] = "i4"
static

Definition at line 141 of file schema.c.

◆ DT_i8

const xmlChar DT_i8[] = "i8"
static

Definition at line 142 of file schema.c.

◆ DT_id

const xmlChar DT_id[] = "id"
static

Definition at line 143 of file schema.c.

◆ DT_idref

const xmlChar DT_idref[] = "idref"
static

Definition at line 144 of file schema.c.

◆ DT_idrefs

const xmlChar DT_idrefs[] = "idrefs"
static

Definition at line 145 of file schema.c.

◆ DT_int

const xmlChar DT_int[] = "int"
static

Definition at line 146 of file schema.c.

◆ DT_lookup_table

const XDR_DT DT_lookup_table[]
static

Definition at line 479 of file schema.c.

Referenced by bstr_to_dt(), and str_to_dt().

◆ DT_nmtoken

const xmlChar DT_nmtoken[] = "nmtoken"
static

Definition at line 147 of file schema.c.

◆ DT_nmtokens

const xmlChar DT_nmtokens[] = "nmtokens"
static

Definition at line 148 of file schema.c.

◆ DT_notation

const xmlChar DT_notation[] = "notation"
static

Definition at line 149 of file schema.c.

◆ DT_nsURI

const xmlChar DT_nsURI[] = "urn:schemas-microsoft-com:datatypes"
static

Definition at line 63 of file schema.c.

Referenced by dt_validate(), link_datatypes(), SchemaCache_get_node_dt(), and schemasInit().

◆ DT_number

const xmlChar DT_number[] = "number"
static

Definition at line 150 of file schema.c.

◆ DT_r4

const xmlChar DT_r4[] = "r4"
static

Definition at line 151 of file schema.c.

◆ DT_r8

const xmlChar DT_r8[] = "r8"
static

Definition at line 152 of file schema.c.

◆ DT_string

const xmlChar DT_string[] = "string"
static

Definition at line 153 of file schema.c.

◆ DT_string_table

const xmlChar* const DT_string_table[LAST_DT]
static

Definition at line 399 of file schema.c.

Referenced by debugstr_dt(), dt_to_str(), and str_to_dt().

◆ DT_time

const xmlChar DT_time[] = "time"
static

Definition at line 154 of file schema.c.

◆ DT_time_tz

const xmlChar DT_time_tz[] = "time.tz"
static

Definition at line 155 of file schema.c.

◆ DT_ui1

const xmlChar DT_ui1[] = "ui1"
static

Definition at line 156 of file schema.c.

◆ DT_ui2

const xmlChar DT_ui2[] = "ui2"
static

Definition at line 157 of file schema.c.

◆ DT_ui4

const xmlChar DT_ui4[] = "ui4"
static

Definition at line 158 of file schema.c.

◆ DT_ui8

const xmlChar DT_ui8[] = "ui8"
static

Definition at line 159 of file schema.c.

◆ DT_uri

const xmlChar DT_uri[] = "uri"
static

Definition at line 160 of file schema.c.

◆ DT_uuid

const xmlChar DT_uuid[] = "uuid"
static

Definition at line 161 of file schema.c.

◆ DT_wstring_table

const WCHAR* const DT_wstring_table[LAST_DT]
static

Definition at line 439 of file schema.c.

Referenced by bstr_to_dt(), and dt_to_bstr().

◆ emptyW

const WCHAR emptyW[] = {0}
static

Definition at line 71 of file schema.c.

Referenced by schema_cache_add(), schema_cache_get(), and schema_cache_remove().

◆ hash_assoc_values

const BYTE hash_assoc_values[]
static
Initial value:
=
{
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 10, 116, 116, 55,
45, 116, 5, 116, 0, 116, 0, 116, 116, 116,
116, 116, 116, 116, 116, 5, 0, 0, 20, 0,
0, 10, 0, 0, 116, 0, 0, 0, 15, 5,
116, 116, 10, 0, 0, 0, 116, 116, 0, 0,
10, 116, 116, 116, 116, 116, 116, 5, 0, 0,
20, 0, 0, 10, 0, 0, 116, 0, 0, 0,
15, 5, 116, 116, 10, 0, 0, 0, 116, 116,
0, 0, 10, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116
}

Definition at line 200 of file schema.c.

Referenced by dt_hash(), and dt_hash_bstr().

◆ schema_cache_se_tids

const tid_t schema_cache_se_tids[]
static
Initial value:
= {
}
@ IXMLDOMSchemaCollection2_tid
Definition: msxml_dispex.h:56
@ NULL_tid
Definition: msxml_dispex.h:38
@ IXMLDOMSchemaCollection_tid
Definition: msxml_dispex.h:55

Definition at line 113 of file schema.c.

Referenced by schema_cache_QueryInterface().

◆ schemacache_dispex

dispex_static_data_t schemacache_dispex
static
Initial value:
= {
}
static const tid_t schemacache_iface_tids[]
Definition: schema.c:1589

Definition at line 1594 of file schema.c.

Referenced by SchemaCache_create().

◆ schemacache_enumvariant

const struct enumvariant_funcs schemacache_enumvariant
static
Initial value:
= {
}
static HRESULT schema_cache_get_item(IUnknown *iface, LONG index, VARIANT *item)
Definition: schema.c:281

Definition at line 287 of file schema.c.

Referenced by schema_cache_get__newEnum().

◆ schemacache_iface_tids

const tid_t schemacache_iface_tids[]
static
Initial value:

Definition at line 1589 of file schema.c.

◆ wDT_bin_base64

const OLECHAR wDT_bin_base64[] = {'b','i','n','.','b','a','s','e','6','4',0}
static

Definition at line 163 of file schema.c.

◆ wDT_bin_hex

const OLECHAR wDT_bin_hex[] = {'b','i','n','.','h','e','x',0}
static

Definition at line 164 of file schema.c.

◆ wDT_boolean

const OLECHAR wDT_boolean[] = {'b','o','o','l','e','a','n',0}
static

Definition at line 165 of file schema.c.

◆ wDT_char

const OLECHAR wDT_char[] = {'c','h','a','r',0}
static

Definition at line 166 of file schema.c.

◆ wDT_date

const OLECHAR wDT_date[] = {'d','a','t','e',0}
static

Definition at line 167 of file schema.c.

◆ wDT_date_tz

const OLECHAR wDT_date_tz[] = {'d','a','t','e','.','t','z',0}
static

Definition at line 168 of file schema.c.

◆ wDT_dateTime

const OLECHAR wDT_dateTime[] = {'d','a','t','e','T','i','m','e',0}
static

Definition at line 169 of file schema.c.

◆ wDT_dateTime_tz

const OLECHAR wDT_dateTime_tz[] = {'d','a','t','e','T','i','m','e','.','t','z',0}
static

Definition at line 170 of file schema.c.

◆ wDT_entities

const OLECHAR wDT_entities[] = {'e','n','t','i','t','i','e','s',0}
static

Definition at line 172 of file schema.c.

◆ wDT_entity

const OLECHAR wDT_entity[] = {'e','n','t','i','t','y',0}
static

Definition at line 171 of file schema.c.

◆ wDT_enumeration

const OLECHAR wDT_enumeration[] = {'e','n','u','m','e','r','a','t','i','o','n',0}
static

Definition at line 173 of file schema.c.

◆ wDT_fixed_14_4

const OLECHAR wDT_fixed_14_4[] = {'f','i','x','e','d','.','1','4','.','4',0}
static

Definition at line 174 of file schema.c.

◆ wDT_float

const OLECHAR wDT_float[] = {'f','l','o','a','t',0}
static

Definition at line 175 of file schema.c.

◆ wDT_i1

const OLECHAR wDT_i1[] = {'i','1',0}
static

Definition at line 176 of file schema.c.

◆ wDT_i2

const OLECHAR wDT_i2[] = {'i','2',0}
static

Definition at line 177 of file schema.c.

◆ wDT_i4

const OLECHAR wDT_i4[] = {'i','4',0}
static

Definition at line 178 of file schema.c.

◆ wDT_i8

const OLECHAR wDT_i8[] = {'i','8',0}
static

Definition at line 179 of file schema.c.

◆ wDT_id

const OLECHAR wDT_id[] = {'i','d',0}
static

Definition at line 180 of file schema.c.

◆ wDT_idref

const OLECHAR wDT_idref[] = {'i','d','r','e','f',0}
static

Definition at line 181 of file schema.c.

◆ wDT_idrefs

const OLECHAR wDT_idrefs[] = {'i','d','r','e','f','s',0}
static

Definition at line 182 of file schema.c.

◆ wDT_int

const OLECHAR wDT_int[] = {'i','n','t',0}
static

Definition at line 183 of file schema.c.

◆ wDT_nmtoken

const OLECHAR wDT_nmtoken[] = {'n','m','t','o','k','e','n',0}
static

Definition at line 184 of file schema.c.

◆ wDT_nmtokens

const OLECHAR wDT_nmtokens[] = {'n','m','t','o','k','e','n','s',0}
static

Definition at line 185 of file schema.c.

◆ wDT_notation

const OLECHAR wDT_notation[] = {'n','o','t','a','t','i','o','n',0}
static

Definition at line 186 of file schema.c.

◆ wDT_number

const OLECHAR wDT_number[] = {'n','u','m','b','e','r',0}
static

Definition at line 187 of file schema.c.

◆ wDT_r4

const OLECHAR wDT_r4[] = {'r','4',0}
static

Definition at line 188 of file schema.c.

◆ wDT_r8

const OLECHAR wDT_r8[] = {'r','8',0}
static

Definition at line 189 of file schema.c.

◆ wDT_string

const OLECHAR wDT_string[] = {'s','t','r','i','n','g',0}
static

Definition at line 190 of file schema.c.

◆ wDT_time

const OLECHAR wDT_time[] = {'t','i','m','e',0}
static

Definition at line 191 of file schema.c.

◆ wDT_time_tz

const OLECHAR wDT_time_tz[] = {'t','i','m','e','.','t','z',0}
static

Definition at line 192 of file schema.c.

◆ wDT_ui1

const OLECHAR wDT_ui1[] = {'u','i','1',0}
static

Definition at line 193 of file schema.c.

◆ wDT_ui2

const OLECHAR wDT_ui2[] = {'u','i','2',0}
static

Definition at line 194 of file schema.c.

◆ wDT_ui4

const OLECHAR wDT_ui4[] = {'u','i','4',0}
static

Definition at line 195 of file schema.c.

◆ wDT_ui8

const OLECHAR wDT_ui8[] = {'u','i','8',0}
static

Definition at line 196 of file schema.c.

◆ wDT_uri

const OLECHAR wDT_uri[] = {'u','r','i',0}
static

Definition at line 197 of file schema.c.

◆ wDT_uuid

const OLECHAR wDT_uuid[] = {'u','u','i','d',0}
static

Definition at line 198 of file schema.c.

◆ XDR_nsURI

const xmlChar XDR_nsURI[] = "urn:schemas-microsoft-com:xml-data"
static

Definition at line 62 of file schema.c.

Referenced by cache_type_from_xmlDocPtr().

◆ XDR_schema

const xmlChar XDR_schema[] = "Schema"
static

Definition at line 61 of file schema.c.

Referenced by cache_type_from_xmlDocPtr().

◆ XMLDOMSchemaCollection2Vtbl

static const struct IXMLDOMSchemaCollection2Vtbl XMLDOMSchemaCollection2Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI schema_cache_QueryInterface(IXMLDOMSchemaCollection2 *iface, REFIID riid, void **ppvObject)
Definition: schema.c:1079
static HRESULT WINAPI schema_cache_GetTypeInfo(IXMLDOMSchemaCollection2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: schema.c:1160
static HRESULT WINAPI schema_cache_remove(IXMLDOMSchemaCollection2 *iface, BSTR uri)
Definition: schema.c:1338
static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection2 *iface, LONG index, BSTR *uri)
Definition: schema.c:1365
static HRESULT WINAPI schema_cache_GetTypeInfoCount(IXMLDOMSchemaCollection2 *iface, UINT *pctinfo)
Definition: schema.c:1153
static HRESULT WINAPI schema_cache_add(IXMLDOMSchemaCollection2 *iface, BSTR uri, VARIANT var)
Definition: schema.c:1188
static HRESULT WINAPI schema_cache_get(IXMLDOMSchemaCollection2 *iface, BSTR uri, IXMLDOMNode **node)
Definition: schema.c:1307
static HRESULT WINAPI schema_cache_GetIDsOfNames(IXMLDOMSchemaCollection2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: schema.c:1168
static HRESULT WINAPI schema_cache_get__newEnum(IXMLDOMSchemaCollection2 *iface, IUnknown **enumv)
Definition: schema.c:1421
static HRESULT WINAPI schema_cache_get_validateOnLoad(IXMLDOMSchemaCollection2 *iface, VARIANT_BOOL *value)
Definition: schema.c:1448
static ULONG WINAPI schema_cache_AddRef(IXMLDOMSchemaCollection2 *iface)
Definition: schema.c:1125
static HRESULT WINAPI schema_cache_getSchema(IXMLDOMSchemaCollection2 *iface, BSTR namespaceURI, ISchema **schema)
Definition: schema.c:1460
static ULONG WINAPI schema_cache_Release(IXMLDOMSchemaCollection2 *iface)
Definition: schema.c:1133
static HRESULT WINAPI schema_cache_getDeclaration(IXMLDOMSchemaCollection2 *iface, IXMLDOMNode *node, ISchemaItem **item)
Definition: schema.c:1470
static HRESULT WINAPI schema_cache_validate(IXMLDOMSchemaCollection2 *iface)
Definition: schema.c:1428
static HRESULT WINAPI schema_cache_put_validateOnLoad(IXMLDOMSchemaCollection2 *iface, VARIANT_BOOL value)
Definition: schema.c:1435
static HRESULT WINAPI schema_cache_get_length(IXMLDOMSchemaCollection2 *iface, LONG *length)
Definition: schema.c:1353
static HRESULT WINAPI schema_cache_Invoke(IXMLDOMSchemaCollection2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: schema.c:1177
static HRESULT WINAPI schema_cache_addCollection(IXMLDOMSchemaCollection2 *iface, IXMLDOMSchemaCollection *collection)
Definition: schema.c:1397

Definition at line 788 of file schema.c.

Referenced by SchemaCache_create(), and unsafe_impl_from_IXMLDOMSchemaCollection().

◆ XSD_nsURI

const xmlChar XSD_nsURI[] = "http://www.w3.org/2001/XMLSchema"
static

Definition at line 60 of file schema.c.

Referenced by cache_type_from_xmlDocPtr().

◆ XSD_schema

const xmlChar XSD_schema[] = "schema"
static

Definition at line 59 of file schema.c.

Referenced by cache_type_from_xmlDocPtr().