ReactOS 0.4.16-dev-2206-gc56950d
stylesheet.c
Go to the documentation of this file.
1/*
2 * XSLTemplate/XSLProcessor support
3 *
4 * Copyright 2011 Nikolay Sivov for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include <stdarg.h>
24#include <libxml/parser.h>
25#include <libxml/xmlerror.h>
26
27#include "windef.h"
28#include "winbase.h"
29#include "winuser.h"
30#include "ole2.h"
31#include "msxml6.h"
32
33#include "msxml_private.h"
34
35#include "initguid.h"
36#include "asptlb.h"
37
38#include "wine/debug.h"
39
41
42typedef struct
43{
47
50
52{
54 PROCESSOR_OUTPUT_STREAM, /* IStream or ISequentialStream */
55 PROCESSOR_OUTPUT_PERSISTSTREAM, /* IPersistStream or IPersistStreamInit */
57};
58
59typedef struct
60{
64
67
68 union
69 {
74 } output;
77
80
82
84{
85 return CONTAINING_RECORD(iface, xsltemplate, IXSLTemplate_iface);
86}
87
89{
90 return CONTAINING_RECORD(iface, xslprocessor, IXSLProcessor_iface);
91}
92
94{
95 params->count--;
96 list_remove(&par->entry);
97 SysFreeString(par->name);
98 SysFreeString(par->value);
99 free(par);
100}
101
103{
104 if (This->node) IXMLDOMNode_Release(This->node);
105 This->node = node;
106 if (node) IXMLDOMNode_AddRef(node);
107}
108
110 IXSLTemplate *iface,
111 REFIID riid,
112 void** ppvObject )
113{
115 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
116
117 if ( IsEqualGUID( riid, &IID_IXSLTemplate ) ||
120 {
121 *ppvObject = iface;
122 }
123 else if (dispex_query_interface(&This->dispex, riid, ppvObject))
124 {
125 return *ppvObject ? S_OK : E_NOINTERFACE;
126 }
127 else
128 {
129 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
130 *ppvObject = NULL;
131 return E_NOINTERFACE;
132 }
133
134 IUnknown_AddRef((IUnknown*)*ppvObject);
135 return S_OK;
136}
137
139{
142 TRACE("%p, refcount %lu.\n", iface, ref);
143 return ref;
144}
145
147{
150
151 TRACE("%p, refcount %lu.\n", iface, ref);
152 if ( ref == 0 )
153 {
154 if (This->node) IXMLDOMNode_Release( This->node );
155 free( This );
156 }
157
158 return ref;
159}
160
162{
164 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
165}
166
168 IXSLTemplate *iface,
169 UINT iTInfo, LCID lcid,
170 ITypeInfo** ppTInfo )
171{
173 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
174 iTInfo, lcid, ppTInfo);
175}
176
178 IXSLTemplate *iface,
179 REFIID riid, LPOLESTR* rgszNames,
180 UINT cNames, LCID lcid, DISPID* rgDispId )
181{
183 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
184 riid, rgszNames, cNames, lcid, rgDispId);
185}
186
188 IXSLTemplate *iface,
189 DISPID dispIdMember, REFIID riid, LCID lcid,
190 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
191 EXCEPINFO* pExcepInfo, UINT* puArgErr )
192{
194 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
195 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
196}
197
200{
202
203 TRACE("(%p)->(%p)\n", This, node);
204
205 if (!node)
206 {
208 return S_OK;
209 }
210
211 /* FIXME: test for document type */
213
214 return S_OK;
215}
216
219{
221
222 FIXME("(%p)->(%p): stub\n", This, node);
223 return E_NOTIMPL;
224}
225
227 IXSLProcessor **processor)
228{
230
231 TRACE("(%p)->(%p)\n", This, processor);
232
233 if (!processor) return E_INVALIDARG;
234
235 return XSLProcessor_create(This, processor);
236}
237
238static const struct IXSLTemplateVtbl XSLTemplateVtbl =
239{
250};
251
254 0
255};
256
258 NULL,
260 NULL,
262};
263
265{
267
268 TRACE("(%p)\n", ppObj);
269
270 This = malloc(sizeof(*This));
271 if(!This)
272 return E_OUTOFMEMORY;
273
274 This->IXSLTemplate_iface.lpVtbl = &XSLTemplateVtbl;
275 This->ref = 1;
276 This->node = NULL;
277 init_dispex(&This->dispex, (IUnknown*)&This->IXSLTemplate_iface, &xsltemplate_dispex);
278
279 *ppObj = &This->IXSLTemplate_iface;
280
281 TRACE("returning iface %p\n", *ppObj);
282
283 return S_OK;
284}
285
286/*** IXSLProcessor ***/
288 IXSLProcessor *iface,
289 REFIID riid,
290 void** ppvObject )
291{
293 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
294
295 if ( IsEqualGUID( riid, &IID_IXSLProcessor ) ||
298 {
299 *ppvObject = iface;
300 }
301 else if (dispex_query_interface(&This->dispex, riid, ppvObject))
302 {
303 return *ppvObject ? S_OK : E_NOINTERFACE;
304 }
305 else
306 {
307 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
308 *ppvObject = NULL;
309 return E_NOINTERFACE;
310 }
311
312 IUnknown_AddRef((IUnknown*)*ppvObject);
313 return S_OK;
314}
315
317{
320 TRACE("%p, refcount %lu.\n", iface, ref);
321 return ref;
322}
323
325{
328
329 TRACE("%p, refcount %lu.\n", iface, ref);
330 if ( ref == 0 )
331 {
332 struct xslprocessor_par *par, *par2;
333
334 if (This->input) IXMLDOMNode_Release(This->input);
335 if (This->output.unk)
336 IUnknown_Release(This->output.unk);
337 SysFreeString(This->outstr);
338
339 LIST_FOR_EACH_ENTRY_SAFE(par, par2, &This->params.list, struct xslprocessor_par, entry)
340 xslprocessor_par_free(&This->params, par);
341
342 IXSLTemplate_Release(&This->stylesheet->IXSLTemplate_iface);
343 free(This);
344 }
345
346 return ref;
347}
348
350{
352 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
353}
354
356 IXSLProcessor *iface,
357 UINT iTInfo, LCID lcid,
358 ITypeInfo** ppTInfo )
359{
361 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
362 iTInfo, lcid, ppTInfo);
363}
364
366 IXSLProcessor *iface,
367 REFIID riid, LPOLESTR* rgszNames,
368 UINT cNames, LCID lcid, DISPID* rgDispId )
369{
371 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
372 riid, rgszNames, cNames, lcid, rgDispId);
373}
374
376 IXSLProcessor *iface,
377 DISPID dispIdMember, REFIID riid, LCID lcid,
378 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
379 EXCEPINFO* pExcepInfo, UINT* puArgErr )
380{
382 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
383 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
384}
385
387{
389 IXMLDOMNode *input_node;
390 HRESULT hr;
391
392 TRACE("(%p)->(%s)\n", This, debugstr_variant(&input));
393
394 /* try IXMLDOMNode directly first */
395 if (V_VT(&input) == VT_UNKNOWN)
396 hr = IUnknown_QueryInterface(V_UNKNOWN(&input), &IID_IXMLDOMNode, (void**)&input_node);
397 else if (V_VT(&input) == VT_DISPATCH)
398 hr = IDispatch_QueryInterface(V_DISPATCH(&input), &IID_IXMLDOMNode, (void**)&input_node);
399 else
400 {
401 IXMLDOMDocument *doc;
402
403 hr = dom_document_create(MSXML_DEFAULT, (void **)&doc);
404 if (hr == S_OK)
405 {
407
408 hr = IXMLDOMDocument_load(doc, input, &b);
409 if (hr == S_OK)
410 hr = IXMLDOMDocument_QueryInterface(doc, &IID_IXMLDOMNode, (void**)&input_node);
411 IXMLDOMDocument_Release(doc);
412 }
413 }
414
415 if (hr == S_OK)
416 {
417 if (This->input) IXMLDOMNode_Release(This->input);
418 This->input = input_node;
419 }
420
421 return hr;
422}
423
425{
427
428 FIXME("(%p)->(%p): stub\n", This, input);
429 return E_NOTIMPL;
430}
431
433 IXSLProcessor *iface,
434 IXSLTemplate **template)
435{
437
438 FIXME("(%p)->(%p): stub\n", This, template);
439 return E_NOTIMPL;
440}
441
443 IXSLProcessor *iface,
444 BSTR p,
445 BSTR uri)
446{
448
449 FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(p), debugstr_w(uri));
450 return E_NOTIMPL;
451}
452
454 IXSLProcessor *iface,
455 BSTR *p)
456{
458
459 FIXME("(%p)->(%p): stub\n", This, p);
460 return E_NOTIMPL;
461}
462
464 IXSLProcessor *iface,
465 BSTR *uri)
466{
468
469 FIXME("(%p)->(%p): stub\n", This, uri);
470 return E_NOTIMPL;
471}
472
474 IXSLProcessor *iface,
475 VARIANT var)
476{
479 IUnknown *output = NULL;
480 HRESULT hr = S_OK;
481
482 TRACE("(%p)->(%s)\n", This, debugstr_variant(&var));
483
484 switch (V_VT(&var))
485 {
486 case VT_EMPTY:
487 break;
488 case VT_UNKNOWN:
489 case VT_DISPATCH:
490 if (!V_UNKNOWN(&var))
491 break;
492
494 hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IStream, (void **)&output);
495 if (FAILED(hr))
496 hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_ISequentialStream, (void **)&output);
497 if (FAILED(hr))
498 {
500 hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IResponse, (void **)&output);
501 }
502 if (FAILED(hr))
503 {
505 hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IPersistStream, (void **)&output);
506 }
507 if (FAILED(hr))
508 hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IPersistStreamInit, (void **)&output);
509 if (FAILED(hr))
510 {
512 WARN("failed to get output interface, hr %#lx.\n", hr);
513 }
514 break;
515 default:
516 FIXME("output type %d not handled\n", V_VT(&var));
517 hr = E_FAIL;
518 }
519
520 if (hr == S_OK)
521 {
522 if (This->output.unk)
523 IUnknown_Release(This->output.unk);
524 This->output.unk = output;
525 This->output_type = output_type;
526 }
527
528 return hr;
529}
530
532 IXSLProcessor *iface,
533 VARIANT *output)
534{
536
537 TRACE("(%p)->(%p)\n", This, output);
538
539 if (!output) return E_INVALIDARG;
540
541 if (This->output.unk)
542 {
543 V_VT(output) = VT_UNKNOWN;
544 V_UNKNOWN(output) = This->output.unk;
545 IUnknown_AddRef(This->output.unk);
546 }
547 else if (This->outstr)
548 {
549 V_VT(output) = VT_BSTR;
550 V_BSTR(output) = SysAllocString(This->outstr);
551 }
552 else
553 V_VT(output) = VT_EMPTY;
554
555 return S_OK;
556}
557
559 IXSLProcessor *iface,
561{
564 HRESULT hr;
565
566 TRACE("(%p)->(%p)\n", This, ret);
567
568 if (!ret)
569 return E_INVALIDARG;
570
571 if (This->output_type == PROCESSOR_OUTPUT_STREAM)
572 {
573 stream = This->output.stream;
574 ISequentialStream_AddRef(stream);
575 }
576 else if (This->output_type == PROCESSOR_OUTPUT_PERSISTSTREAM ||
577 This->output_type == PROCESSOR_OUTPUT_RESPONSE)
578 {
580 return hr;
581 }
582
583 SysFreeString(This->outstr);
584
585 hr = node_transform_node_params(get_node_obj(This->input), This->stylesheet->node,
586 &This->outstr, stream, &This->params);
587 if (SUCCEEDED(hr))
588 {
590
591 switch (This->output_type)
592 {
594 {
596
597 /* for IPersistStream* output seekable stream is used */
598 zero.QuadPart = 0;
599 IStream_Seek(src, zero, STREAM_SEEK_SET, NULL);
600 hr = IPersistStream_Load(This->output.persiststream, src);
601 break;
602 }
604 {
605 SAFEARRAYBOUND bound;
607 HGLOBAL hglobal;
608 VARIANT bin;
609 DWORD size;
610 void *dest;
611
612 if (FAILED(hr = GetHGlobalFromStream(src, &hglobal)))
613 break;
614 size = GlobalSize(hglobal);
615
616 bound.lLbound = 0;
617 bound.cElements = size;
618 if (!(array = SafeArrayCreate(VT_UI1, 1, &bound)))
619 break;
620
621 V_VT(&bin) = VT_ARRAY | VT_UI1;
622 V_ARRAY(&bin) = array;
623
625 if (hr == S_OK)
626 {
627 void *data = GlobalLock(hglobal);
628 memcpy(dest, data, size);
629 GlobalUnlock(hglobal);
631
632 IResponse_BinaryWrite(This->output.response, bin);
633 }
634
636 break;
637 }
638 default:
639 ;
640 }
641 }
642
643 if (stream)
644 ISequentialStream_Release(stream);
645
646 *ret = hr == S_OK ? VARIANT_TRUE : VARIANT_FALSE;
647 return hr;
648}
649
651{
653
654 FIXME("(%p): stub\n", This);
655 return E_NOTIMPL;
656}
657
659 IXSLProcessor *iface,
660 LONG *state)
661{
663
664 FIXME("(%p)->(%p): stub\n", This, state);
665 return E_NOTIMPL;
666}
667
669{
670 HRESULT hr = S_OK;
671
672 switch (V_VT(var))
673 {
674 case VT_BSTR:
675 {
677 if (!par->value) hr = E_OUTOFMEMORY;
678 break;
679 }
680 default:
681 FIXME("value type %d not handled\n", V_VT(var));
682 hr = E_NOTIMPL;
683 }
684
685 return hr;
686}
687
689 IXSLProcessor *iface,
690 BSTR p,
691 VARIANT var,
692 BSTR uri)
693{
695 struct xslprocessor_par *cur, *par = NULL;
696 HRESULT hr;
697
698 TRACE("(%p)->(%s %s %s)\n", This, debugstr_w(p), debugstr_variant(&var),
699 debugstr_w(uri));
700
701 if (uri && *uri)
702 FIXME("namespace uri is not supported\n");
703
704 /* search for existing parameter first */
705 LIST_FOR_EACH_ENTRY(cur, &This->params.list, struct xslprocessor_par, entry)
706 {
707 if (!wcscmp(cur->name, p))
708 {
709 par = cur;
710 break;
711 }
712 }
713
714 /* override with new value or add new parameter */
715 if (par)
716 {
717 if (V_VT(&var) == VT_NULL || V_VT(&var) == VT_EMPTY)
718 {
719 /* remove parameter */
720 xslprocessor_par_free(&This->params, par);
721 return S_OK;
722 }
723 SysFreeString(par->value);
724 par->value = NULL;
725 }
726 else
727 {
728 /* new parameter */
729 par = malloc(sizeof(struct xslprocessor_par));
730 if (!par) return E_OUTOFMEMORY;
731
732 par->name = SysAllocString(p);
733 if (!par->name)
734 {
735 free(par);
736 return E_OUTOFMEMORY;
737 }
738 list_add_tail(&This->params.list, &par->entry);
739 This->params.count++;
740 }
741
743 if (FAILED(hr))
744 xslprocessor_par_free(&This->params, par);
745
746 return hr;
747}
748
750 IXSLProcessor *iface,
751 IDispatch *obj,
752 BSTR uri)
753{
755
756 FIXME("(%p)->(%p %s): stub\n", This, obj, debugstr_w(uri));
757 return E_NOTIMPL;
758}
759
761 IXSLProcessor *iface,
763{
765
766 FIXME("(%p)->(%p): stub\n", This, node);
767 return E_NOTIMPL;
768}
769
770static const struct IXSLProcessorVtbl XSLProcessorVtbl =
771{
793};
794
797 0
798};
799
801 NULL,
803 NULL,
805};
806
808{
810
811 TRACE("(%p)\n", ppObj);
812
813 This = malloc(sizeof(*This));
814 if(!This)
815 return E_OUTOFMEMORY;
816
817 This->IXSLProcessor_iface.lpVtbl = &XSLProcessorVtbl;
818 This->ref = 1;
819 This->input = NULL;
820 This->output.unk = NULL;
821 This->output_type = PROCESSOR_OUTPUT_NOT_SET;
822 This->outstr = NULL;
823 list_init(&This->params.list);
824 This->params.count = 0;
825 This->stylesheet = template;
826 IXSLTemplate_AddRef(&template->IXSLTemplate_iface);
827 init_dispex(&This->dispex, (IUnknown*)&This->IXSLProcessor_iface, &xslprocessor_dispex);
828
829 *ppObj = &This->IXSLProcessor_iface;
830
831 TRACE("returning iface %p\n", *ppObj);
832
833 return S_OK;
834}
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
@ VT_BSTR
Definition: compat.h:2303
@ VT_NULL
Definition: compat.h:2296
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_ARRAY
Definition: compat.h:2341
@ VT_EMPTY
Definition: compat.h:2295
@ VT_DISPATCH
Definition: compat.h:2304
@ VT_UI1
Definition: compat.h:2311
LCID lcid
Definition: locale.c:5656
const UINT template
Definition: action.c:7511
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
HRESULT dom_document_create(MSXML_VERSION version, void **ppObj)
Definition: domdoc.c:3788
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
Definition: safearray.c:600
return ret
Definition: mutex.c:146
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
FxCollectionEntry * cur
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum src
Definition: glext.h:6340
GLsizeiptr size
Definition: glext.h:5919
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLenum const GLfloat * params
Definition: glext.h:5645
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLenum GLenum input
Definition: glext.h:9031
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045
tid_t
Definition: ieframe.h:311
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
static ERESOURCE GlobalLock
Definition: sys_arch.c:8
uint32_t entry
Definition: isohybrid.c:63
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
#define b
Definition: ke_i.h:79
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
const char * var
Definition: shader.c:5666
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static struct _PeImage bin
static char * dest
Definition: rtl.c:135
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:49
const char * uri
Definition: sec_mgr.c:1588
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
@ MSXML_DEFAULT
Definition: msxml_dispex.h:28
@ IXSLProcessor_tid
Definition: msxml_dispex.h:62
@ IXSLTemplate_tid
Definition: msxml_dispex.h:63
HRESULT node_transform_node_params(const xmlnode *, IXMLDOMNode *, BSTR *, ISequentialStream *, const struct xslprocessor_params *)
Definition: node.c:1480
unsigned int UINT
Definition: ndis.h:50
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_DISPATCH(A)
Definition: oleauto.h:239
const GUID IID_IDispatch
const GUID IID_IPersistStreamInit
long LONG
Definition: pedump.c:60
const GUID IID_IPersistStream
Definition: proxy.cpp:13
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
int zero
Definition: sehframes.cpp:29
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: undname.c:54
Definition: send.c:48
Definition: parse.h:23
struct list entry
Definition: msxml_private.h:86
ISequentialStream * stream
Definition: stylesheet.c:71
IResponse * response
Definition: stylesheet.c:73
IPersistStream * persiststream
Definition: stylesheet.c:72
xsltemplate * stylesheet
Definition: stylesheet.c:65
enum output_type output_type
Definition: stylesheet.c:75
IUnknown * unk
Definition: stylesheet.c:70
IXSLProcessor IXSLProcessor_iface
Definition: stylesheet.c:62
IXMLDOMNode * input
Definition: stylesheet.c:66
DispatchEx dispex
Definition: stylesheet.c:61
IXMLDOMNode * node
Definition: stylesheet.c:48
DispatchEx dispex
Definition: stylesheet.c:44
IXSLTemplate IXSLTemplate_iface
Definition: stylesheet.c:45
static const tid_t xslprocessor_iface_tids[]
Definition: stylesheet.c:795
static HRESULT xslprocessor_set_parvalue(const VARIANT *var, struct xslprocessor_par *par)
Definition: stylesheet.c:668
static ULONG WINAPI xslprocessor_Release(IXSLProcessor *iface)
Definition: stylesheet.c:324
static HRESULT WINAPI xslprocessor_setStartMode(IXSLProcessor *iface, BSTR p, BSTR uri)
Definition: stylesheet.c:442
static HRESULT XSLProcessor_create(xsltemplate *, IXSLProcessor **)
Definition: stylesheet.c:807
static dispex_static_data_t xslprocessor_dispex
Definition: stylesheet.c:800
static HRESULT WINAPI xslprocessor_QueryInterface(IXSLProcessor *iface, REFIID riid, void **ppvObject)
Definition: stylesheet.c:287
static HRESULT WINAPI xslprocessor_get_readyState(IXSLProcessor *iface, LONG *state)
Definition: stylesheet.c:658
static HRESULT WINAPI xslprocessor_put_input(IXSLProcessor *iface, VARIANT input)
Definition: stylesheet.c:386
static ULONG WINAPI xslprocessor_AddRef(IXSLProcessor *iface)
Definition: stylesheet.c:316
static HRESULT WINAPI xslprocessor_transform(IXSLProcessor *iface, VARIANT_BOOL *ret)
Definition: stylesheet.c:558
static void xsltemplate_set_node(xsltemplate *This, IXMLDOMNode *node)
Definition: stylesheet.c:102
static HRESULT WINAPI xslprocessor_reset(IXSLProcessor *iface)
Definition: stylesheet.c:650
static HRESULT WINAPI xsltemplate_Invoke(IXSLTemplate *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: stylesheet.c:187
static HRESULT WINAPI xslprocessor_put_output(IXSLProcessor *iface, VARIANT var)
Definition: stylesheet.c:473
static HRESULT WINAPI xsltemplate_QueryInterface(IXSLTemplate *iface, REFIID riid, void **ppvObject)
Definition: stylesheet.c:109
output_type
Definition: stylesheet.c:52
@ PROCESSOR_OUTPUT_NOT_SET
Definition: stylesheet.c:53
@ PROCESSOR_OUTPUT_RESPONSE
Definition: stylesheet.c:56
@ PROCESSOR_OUTPUT_PERSISTSTREAM
Definition: stylesheet.c:55
@ PROCESSOR_OUTPUT_STREAM
Definition: stylesheet.c:54
static HRESULT WINAPI xslprocessor_addObject(IXSLProcessor *iface, IDispatch *obj, BSTR uri)
Definition: stylesheet.c:749
static void xslprocessor_par_free(struct xslprocessor_params *params, struct xslprocessor_par *par)
Definition: stylesheet.c:93
static HRESULT WINAPI xslprocessor_get_stylesheet(IXSLProcessor *iface, IXMLDOMNode **node)
Definition: stylesheet.c:760
static HRESULT WINAPI xsltemplate_GetIDsOfNames(IXSLTemplate *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: stylesheet.c:177
static HRESULT WINAPI xslprocessor_get_startModeURI(IXSLProcessor *iface, BSTR *uri)
Definition: stylesheet.c:463
static HRESULT WINAPI xslprocessor_GetIDsOfNames(IXSLProcessor *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: stylesheet.c:365
static HRESULT WINAPI xsltemplate_createProcessor(IXSLTemplate *iface, IXSLProcessor **processor)
Definition: stylesheet.c:226
static HRESULT WINAPI xslprocessor_get_input(IXSLProcessor *iface, VARIANT *input)
Definition: stylesheet.c:424
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:83
static const struct IXSLProcessorVtbl XSLProcessorVtbl
Definition: stylesheet.c:770
static HRESULT WINAPI xsltemplate_GetTypeInfoCount(IXSLTemplate *iface, UINT *pctinfo)
Definition: stylesheet.c:161
HRESULT XSLTemplate_create(void **ppObj)
Definition: stylesheet.c:264
static dispex_static_data_t xsltemplate_dispex
Definition: stylesheet.c:257
static HRESULT WINAPI xslprocessor_GetTypeInfoCount(IXSLProcessor *iface, UINT *pctinfo)
Definition: stylesheet.c:349
static HRESULT WINAPI xslprocessor_GetTypeInfo(IXSLProcessor *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: stylesheet.c:355
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:88
static HRESULT WINAPI xsltemplate_GetTypeInfo(IXSLTemplate *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: stylesheet.c:167
static HRESULT WINAPI xslprocessor_get_ownerTemplate(IXSLProcessor *iface, IXSLTemplate **template)
Definition: stylesheet.c:432
static HRESULT WINAPI xslprocessor_addParameter(IXSLProcessor *iface, BSTR p, VARIANT var, BSTR uri)
Definition: stylesheet.c:688
static HRESULT WINAPI xsltemplate_putref_stylesheet(IXSLTemplate *iface, IXMLDOMNode *node)
Definition: stylesheet.c:198
static const struct IXSLTemplateVtbl XSLTemplateVtbl
Definition: stylesheet.c:238
static ULONG WINAPI xsltemplate_AddRef(IXSLTemplate *iface)
Definition: stylesheet.c:138
static HRESULT WINAPI xslprocessor_Invoke(IXSLProcessor *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: stylesheet.c:375
static HRESULT WINAPI xsltemplate_get_stylesheet(IXSLTemplate *iface, IXMLDOMNode **node)
Definition: stylesheet.c:217
static const tid_t xsltemplate_iface_tids[]
Definition: stylesheet.c:252
static HRESULT WINAPI xslprocessor_get_output(IXSLProcessor *iface, VARIANT *output)
Definition: stylesheet.c:531
static HRESULT WINAPI xslprocessor_get_startMode(IXSLProcessor *iface, BSTR *p)
Definition: stylesheet.c:453
static ULONG WINAPI xsltemplate_Release(IXSLTemplate *iface)
Definition: stylesheet.c:146
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479