125 *ppvObject = &
This->IXMLDOMSelection_iface;
129 if (!
This->enumvariant)
135 return IEnumVARIANT_QueryInterface(
This->enumvariant, &IID_IEnumVARIANT, ppvObject);
148 IXMLDOMSelection_AddRef( iface );
158 TRACE(
"%p, refcount %lu.\n", iface,
ref);
168 TRACE(
"%p, refcount %lu.\n", iface,
ref);
171 xmlXPathFreeObject(
This->result);
173 if (
This->enumvariant) IEnumVARIANT_Release(
This->enumvariant);
185 return IDispatchEx_GetTypeInfoCount(&
This->dispex.IDispatchEx_iface, pctinfo);
195 return IDispatchEx_GetTypeInfo(&
This->dispex.IDispatchEx_iface,
196 iTInfo,
lcid, ppTInfo);
208 return IDispatchEx_GetIDsOfNames(&
This->dispex.IDispatchEx_iface,
209 riid, rgszNames, cNames,
lcid, rgDispId);
218 DISPPARAMS* pDispParams,
220 EXCEPINFO* pExcepInfo,
224 return IDispatchEx_Invoke(&
This->dispex.IDispatchEx_iface,
225 dispIdMember,
riid,
lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
235 TRACE(
"%p, %ld, %p.\n", iface,
index, listItem);
242 if (index < 0 || index >= xmlXPathNodeSetGetLength(
This->result->nodesetval))
262 *listLength = xmlXPathNodeSetGetLength(
This->result->nodesetval);
279 if (
This->resultPos >= xmlXPathNodeSetGetLength(
This->result->nodesetval))
451 *ppvObject = &
This->IEnumVARIANT_iface;
453 return IUnknown_QueryInterface(
This->outer,
riid, ppvObject);
457 *ppvObject = &
This->IEnumVARIANT_iface;
460 return IUnknown_QueryInterface(
This->outer,
riid, ppvObject);
462 IEnumVARIANT_AddRef( iface );
471 TRACE(
"%p, refcount %lu.\n", iface,
ref);
480 TRACE(
"%p, refcount %lu.\n", iface,
ref);
483 if (
This->own) IUnknown_Release(
This->outer);
499 TRACE(
"%p, %lu, %p, %p.\n", iface, celt,
var, fetched);
501 if (fetched) *fetched = 0;
505 for (; celt > 0; celt--,
var++,
This->pos++)
516 if (fetched) *fetched = ret_count;
521 if (
This->funcs->next)
532 FIXME(
"%p, %lu: stub\n", iface, celt);
550 FIXME(
"(%p)->(%p): stub\n",
This, ppenum);
580 IUnknown_AddRef(
This->outer);
582 *penum = &
This->IEnumVARIANT_iface;
583 IEnumVARIANT_AddRef(*penum);
598 TRACE(
"ret %lx\n", *dispid);
607 TRACE(
"%p, %ld, %lx, %x, %p, %p, %p.\n", iface,
id,
lcid,
flags,
params,
res, ei);
617 case INVOKE_PROPERTYGET:
653#define XSLPATTERN_CHECK_ARGS(n) \
655 FIXME("XSLPattern syntax error: Expected %i arguments, got %i\n", n, nargs); \
656 xmlXPathSetArityError(pctx); \
665 xmlXPathPositionFunction(pctx, 0);
666 xmlXPathReturnNumber(pctx, xmlXPathPopNumber(pctx) - 1.0);
674 xmlXPathPositionFunction(pctx, 0);
675 pos = xmlXPathPopNumber(pctx);
676 xmlXPathLastFunction(pctx, 0);
677 last = xmlXPathPopNumber(pctx);
678 xmlXPathReturnBoolean(pctx,
pos ==
last);
684 xmlXPathReturnNumber(pctx, pctx->context->node->type);
692 arg2 = xmlXPathPopString(pctx);
693 arg1 = xmlXPathPopString(pctx);
704 arg2 = xmlXPathPopString(pctx);
705 arg1 = xmlXPathPopString(pctx);
716 arg2 = xmlXPathPopString(pctx);
717 arg1 = xmlXPathPopString(pctx);
728 arg2 = xmlXPathPopString(pctx);
729 arg1 = xmlXPathPopString(pctx);
740 arg2 = xmlXPathPopString(pctx);
741 arg1 = xmlXPathPopString(pctx);
752 arg2 = xmlXPathPopString(pctx);
753 arg1 = xmlXPathPopString(pctx);
767 xmlXPathContextPtr ctxt = xmlXPathNewContext(
node->doc);
775 xmlXPathFreeContext(ctxt);
791 xmlXPathContextSetCache(ctxt, 1, -1, 0);
795 xmlXPathRegisterAllFunctions(ctxt);
796 This->result = xmlXPathEvalExpression(
query, ctxt);
802 xmlXPathRegisterFunc(ctxt, (
xmlChar const*)
"not", xmlXPathNotFunction);
803 xmlXPathRegisterFunc(ctxt, (
xmlChar const*)
"boolean", xmlXPathBooleanFunction);
816 This->result = xmlXPathEvalExpression(pattern_query, ctxt);
820 if (!
This->result ||
This->result->type != XPATH_NODESET)
828 TRACE(
"found %d matches\n", xmlXPathNodeSetGetLength(
This->result->nodesetval));
832 IXMLDOMSelection_Release( &
This->IXMLDOMSelection_iface );
833 xmlXPathFreeContext(ctxt);
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void cleanup(void)
LONG xmldoc_release(xmlDocPtr doc)
LONG xmldoc_add_ref(xmlDocPtr doc)
BOOL is_xpathmode(const xmlDocPtr doc)
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLenum const GLfloat * params
static HRESULT create_node(HTMLDocumentNode *, nsIDOMNode *, HTMLDOMNode **)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
static const char * debugstr_variant(const VARIANT *var)
static VARIANTARG static DISPID
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
#define DISPID_DOM_COLLECTION_MAX
#define DISPID_DOM_COLLECTION_BASE
static HRESULT WINAPI domselection_GetTypeInfo(IXMLDOMSelection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static HRESULT WINAPI domselection_removeNext(IXMLDOMSelection *iface, IXMLDOMNode **node)
static void XSLPattern_nodeType(xmlXPathParserContextPtr pctx, int nargs)
static HRESULT WINAPI enumvariant_Clone(IEnumVARIANT *iface, IEnumVARIANT **ppenum)
static HRESULT WINAPI domselection_get_item(IXMLDOMSelection *iface, LONG index, IXMLDOMNode **listItem)
static HRESULT selection_get_item(IUnknown *iface, LONG index, VARIANT *item)
static const struct IEnumVARIANTVtbl EnumVARIANTVtbl
static ULONG WINAPI enumvariant_Release(IEnumVARIANT *iface)
static void XSLPattern_OP_INEq(xmlXPathParserContextPtr pctx, int nargs)
static HRESULT WINAPI domselection_putref_context(IXMLDOMSelection *iface, IXMLDOMNode *node)
HRESULT create_enumvariant(IUnknown *outer, BOOL own, const struct enumvariant_funcs *funcs, IEnumVARIANT **penum)
static void XSLPattern_end(xmlXPathParserContextPtr pctx, int nargs)
#define XSLPATTERN_CHECK_ARGS(n)
static HRESULT WINAPI domselection_put_expr(IXMLDOMSelection *iface, BSTR p)
static void query_serror(void *ctx, const xmlError *err)
static HRESULT WINAPI domselection_clone(IXMLDOMSelection *iface, IXMLDOMSelection **node)
static HRESULT WINAPI enumvariant_Reset(IEnumVARIANT *iface)
static HRESULT WINAPI enumvariant_Skip(IEnumVARIANT *iface, ULONG celt)
static HRESULT WINAPI domselection_peekNode(IXMLDOMSelection *iface, IXMLDOMNode **node)
static HRESULT WINAPI domselection_QueryInterface(IXMLDOMSelection *iface, REFIID riid, void **ppvObject)
int registerNamespaces(xmlXPathContextPtr ctxt)
static void XSLPattern_index(xmlXPathParserContextPtr pctx, int nargs)
static void XSLPattern_OP_IGEq(xmlXPathParserContextPtr pctx, int nargs)
static HRESULT domselection_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
static HRESULT WINAPI domselection_get__newEnum(IXMLDOMSelection *iface, IUnknown **enumv)
static dispex_static_data_t domselection_dispex
static HRESULT WINAPI domselection_setProperty(IXMLDOMSelection *iface, BSTR p, VARIANT var)
static HRESULT selection_next(IUnknown *iface)
static void XSLPattern_OP_IGt(xmlXPathParserContextPtr pctx, int nargs)
static HRESULT domselection_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei)
static HRESULT WINAPI domselection_GetIDsOfNames(IXMLDOMSelection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI domselection_matches(IXMLDOMSelection *iface, IXMLDOMNode *node, IXMLDOMNode **out_node)
static ULONG WINAPI domselection_AddRef(IXMLDOMSelection *iface)
static void XSLPattern_OP_ILEq(xmlXPathParserContextPtr pctx, int nargs)
static const struct enumvariant_funcs selection_enumvariant
static void XSLPattern_OP_ILt(xmlXPathParserContextPtr pctx, int nargs)
static HRESULT WINAPI enumvariant_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **ppvObject)
static const dispex_static_data_vtbl_t domselection_dispex_vtbl
static void XSLPattern_OP_IEq(xmlXPathParserContextPtr pctx, int nargs)
HRESULT create_selection(xmlNodePtr node, xmlChar *query, IXMLDOMNodeList **out)
static HRESULT WINAPI domselection_removeAll(IXMLDOMSelection *iface)
xmlChar * XSLPattern_to_XPath(xmlXPathContextPtr ctxt, xmlChar const *xslpat_str)
static HRESULT WINAPI domselection_get_expr(IXMLDOMSelection *iface, BSTR *p)
static const struct IXMLDOMSelectionVtbl domselection_vtbl
static HRESULT WINAPI domselection_Invoke(IXMLDOMSelection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static domselection * impl_from_IXMLDOMSelection(IXMLDOMSelection *iface)
static enumvariant * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
static HRESULT WINAPI domselection_GetTypeInfoCount(IXMLDOMSelection *iface, UINT *pctinfo)
static ULONG WINAPI enumvariant_AddRef(IEnumVARIANT *iface)
static HRESULT WINAPI domselection_reset(IXMLDOMSelection *iface)
static HRESULT WINAPI domselection_get_length(IXMLDOMSelection *iface, LONG *listLength)
static HRESULT WINAPI enumvariant_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *var, ULONG *fetched)
static HRESULT WINAPI domselection_getProperty(IXMLDOMSelection *iface, BSTR p, VARIANT *var)
static const tid_t domselection_iface_tids[]
static HRESULT WINAPI domselection_nextNode(IXMLDOMSelection *iface, IXMLDOMNode **nextItem)
static HRESULT WINAPI domselection_get_context(IXMLDOMSelection *iface, IXMLDOMNode **node)
static ULONG WINAPI domselection_Release(IXMLDOMSelection *iface)
#define LIBXML2_CALLBACK_SERROR(caller, err)
#define IsEqualGUID(rguid1, rguid2)
static struct __wine_debug_functions funcs
IEnumVARIANT * enumvariant
IXMLDOMSelection IXMLDOMSelection_iface
IEnumVARIANT IEnumVARIANT_iface
const struct enumvariant_funcs * funcs
#define CONTAINING_RECORD(address, type, field)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
#define DISP_E_UNKNOWNNAME
XMLPUBFUN int xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2)