From dcc2d6c254a77b75468d62ec38602375b3c0e1c9 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 2 Aug 2005 11:29:04 +0000 Subject: [PATCH] Initial implementation of msxml3 based on libxml2. --- configure | 237 ++++++++- configure.ac | 14 + dlls/Makefile.in | 6 + dlls/msxml3/.cvsignore | 2 + dlls/msxml3/Makefile.in | 18 + dlls/msxml3/domdoc.c | 960 ++++++++++++++++++++++++++++++++++++ dlls/msxml3/factory.c | 143 ++++++ dlls/msxml3/main.c | 55 +++ dlls/msxml3/msxml3.spec | 12 + dlls/msxml3/msxml_private.h | 26 + include/config.h.in | 6 + 11 files changed, 1477 insertions(+), 2 deletions(-) create mode 100644 dlls/msxml3/.cvsignore create mode 100644 dlls/msxml3/Makefile.in create mode 100644 dlls/msxml3/domdoc.c create mode 100644 dlls/msxml3/factory.c create mode 100644 dlls/msxml3/main.c create mode 100644 dlls/msxml3/msxml3.spec create mode 100644 dlls/msxml3/msxml_private.h diff --git a/configure b/configure index f16079cd8d0..52906d59a99 100755 --- a/configure +++ b/configure @@ -311,7 +311,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS ft_devel ft_devel2 FREETYPELIBS FREETYPEINCL FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS ft_devel ft_devel2 FREETYPELIBS FREETYPEINCL FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS' ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES' # Initialize some variables set by options. @@ -8949,6 +8949,236 @@ else X_LIBS="" fi + +XML2LIBS="" + +XML2INCL="" + +ac_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2" + +for ac_header in libxml/parser.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to wine-devel@winehq.org ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + echo "$as_me:$LINENO: checking for xmlReadIO in -lxml2" >&5 +echo $ECHO_N "checking for xmlReadIO in -lxml2... $ECHO_C" >&6 +if test "${ac_cv_lib_xml2_xmlReadIO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxml2 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char xmlReadIO (); +int +main () +{ +xmlReadIO (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_xml2_xmlReadIO=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_xml2_xmlReadIO=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlReadIO" >&5 +echo "${ECHO_T}$ac_cv_lib_xml2_xmlReadIO" >&6 +if test $ac_cv_lib_xml2_xmlReadIO = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBXML2 1 +_ACEOF + + XML2LIBS="-lxml2" + XML2INCL="-I/usr/include/libxml2" +fi + +fi + +done + +CPPFLAGS="$ac_save_CPPFLAGS" + CURSESLIBS="" if test "x$with_curses" != "xno" then @@ -20319,7 +20549,7 @@ MAKE_LIB_RULES=libs/Makelib.rules MAKE_PROG_RULES=programs/Makeprog.rules - ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/activeds/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/midimap/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/mshtml/tests/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/objsel/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole2.tlb/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/usp10/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wldap32/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/hh/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile" + ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/activeds/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/midimap/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/mshtml/tests/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/msxml3/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/objsel/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole2.tlb/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/usp10/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wldap32/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/hh/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile" cat >confcache <<\_ACEOF @@ -20964,6 +21194,7 @@ do "dlls/msvidc32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/msvidc32/Makefile" ;; "dlls/msvideo/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/msvideo/Makefile" ;; "dlls/mswsock/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/mswsock/Makefile" ;; + "dlls/msxml3/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/msxml3/Makefile" ;; "dlls/netapi32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/netapi32/Makefile" ;; "dlls/netapi32/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/netapi32/tests/Makefile" ;; "dlls/newdev/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/newdev/Makefile" ;; @@ -21276,6 +21507,8 @@ s,@OPENGL_LIBS@,$OPENGL_LIBS,;t t s,@GLUT_LIBS@,$GLUT_LIBS,;t t s,@GLUT32FILES@,$GLUT32FILES,;t t s,@NASLIBS@,$NASLIBS,;t t +s,@XML2LIBS@,$XML2LIBS,;t t +s,@XML2INCL@,$XML2INCL,;t t s,@CURSESLIBS@,$CURSESLIBS,;t t s,@sane_devel@,$sane_devel,;t t s,@SANELIBS@,$SANELIBS,;t t diff --git a/configure.ac b/configure.ac index a5dffa38467..5cc6309d46b 100644 --- a/configure.ac +++ b/configure.ac @@ -424,6 +424,19 @@ else X_LIBS="" fi +dnl **** Check for libxml2 **** + +AC_SUBST(XML2LIBS,"") +AC_SUBST(XML2INCL,"") +ac_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2" +AC_CHECK_HEADERS(libxml/parser.h, + [AC_CHECK_LIB(xml2, xmlReadIO, + [AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library]) + XML2LIBS="-lxml2" + XML2INCL="-I/usr/include/libxml2"])]) +CPPFLAGS="$ac_save_CPPFLAGS" + dnl **** Check which curses lib to use *** CURSESLIBS="" if test "x$with_curses" != "xno" @@ -1650,6 +1663,7 @@ dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile +dlls/msxml3/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile diff --git a/dlls/Makefile.in b/dlls/Makefile.in index f0095cfa967..f96e3b6fb1e 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -96,6 +96,7 @@ BASEDIRS = \ msvidc32 \ msvideo \ mswsock \ + msxml3 \ netapi32 \ newdev \ ntdll \ @@ -345,6 +346,7 @@ SYMLINKS_SO = \ msvfw32.dll.so \ msvidc32.dll.so \ mswsock.dll.so \ + msxml3.dll.so \ netapi32.dll.so \ newdev.dll.so \ ntdll.dll.so \ @@ -738,6 +740,9 @@ msvidc32.dll.so: msvidc32/msvidc32.dll.so mswsock.dll.so: mswsock/mswsock.dll.so $(RM) $@ && $(LN_S) mswsock/mswsock.dll.so $@ +msxml3.dll.so: msxml3/msxml3.dll.so + $(RM) $@ && $(LN_S) msxml3/msxml3.dll.so $@ + netapi32.dll.so: netapi32/netapi32.dll.so $(RM) $@ && $(LN_S) netapi32/netapi32.dll.so $@ @@ -1694,6 +1699,7 @@ msvcrtd/msvcrtd.dll.so: msvcrtd msvideo/msvfw32.dll.so: msvideo msvidc32/msvidc32.dll.so: msvidc32 mswsock/mswsock.dll.so: mswsock +msxml3/msxml3.dll.so: msxml3 netapi32/netapi32.dll.so: netapi32 newdev/newdev.dll.so: newdev ntdll/ntdll.dll.so: ntdll diff --git a/dlls/msxml3/.cvsignore b/dlls/msxml3/.cvsignore new file mode 100644 index 00000000000..ccf79250037 --- /dev/null +++ b/dlls/msxml3/.cvsignore @@ -0,0 +1,2 @@ +Makefile +msxml3.dll.dbg.c diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in new file mode 100644 index 00000000000..995eca811c3 --- /dev/null +++ b/dlls/msxml3/Makefile.in @@ -0,0 +1,18 @@ +EXTRADEFS = -DCOM_NO_WINDOWS_H +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = msxml3.dll +IMPORTS = oleaut32 advapi32 kernel32 ntdll +EXTRALIBS = -luuid $(LIBUNICODE) @XML2LIBS@ +EXTRAINCL = @XML2INCL@ + +C_SRCS = \ + domdoc.c \ + factory.c \ + main.c + +@MAKE_DLL_RULES@ + +### Dependencies: diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c new file mode 100644 index 00000000000..69d9dea2fea --- /dev/null +++ b/dlls/msxml3/domdoc.c @@ -0,0 +1,960 @@ +/* + * DOM Document implementation + * + * Copyright 2005 Mike McCormack + * + * iface library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * iface library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define COBJMACROS + +#include "config.h" + +#include +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "ocidl.h" +#include "msxml.h" +#include "xmldom.h" + +#include "wine/debug.h" + +#include "msxml_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msxml); + +#ifdef HAVE_LIBXML2 + +#include + +typedef struct _domdoc +{ + const struct IXMLDOMDocumentVtbl *lpVtbl; + LONG ref; + VARIANT_BOOL async; + xmlDocPtr xmldoc; +} domdoc; + +static inline domdoc *impl_from_IXMLDOMDocument( IXMLDOMDocument *iface ) +{ + return (domdoc *)((char*)iface - FIELD_OFFSET(domdoc, lpVtbl)); +} + +static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument *iface, REFIID riid, void** ppvObject ) +{ + domdoc *This = impl_from_IXMLDOMDocument( iface ); + + TRACE("%p %p %p\n", This, debugstr_guid( riid ), ppvObject ); + + if ( IsEqualGUID( riid, &IID_IXMLDOMDocument ) || + IsEqualGUID( riid, &IID_IXMLDOMNode ) || + IsEqualGUID( riid, &IID_IDispatch ) || + IsEqualGUID( riid, &IID_IUnknown ) ) + { + *ppvObject = iface; + } + else + return E_NOINTERFACE; + + IXMLDOMDocument_AddRef( iface ); + + return S_OK; +} + + +static ULONG WINAPI domdoc_AddRef( + IXMLDOMDocument *iface ) +{ + domdoc *This = impl_from_IXMLDOMDocument( iface ); + TRACE("%p\n", This ); + return InterlockedIncrement( &This->ref ); +} + + +static ULONG WINAPI domdoc_Release( + IXMLDOMDocument *iface ) +{ + domdoc *This = impl_from_IXMLDOMDocument( iface ); + LONG ref; + + TRACE("%p\n", This ); + + ref = InterlockedDecrement( &This->ref ); + if ( ref == 0 ) + { + xmlFreeDoc( This->xmldoc ); + HeapFree( GetProcessHeap(), 0, This ); + } + + return ref; +} + +static HRESULT WINAPI domdoc_GetTypeInfoCount( IXMLDOMDocument *iface, UINT* pctinfo ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI domdoc_GetTypeInfo( + IXMLDOMDocument *iface, + UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI domdoc_GetIDsOfNames( + IXMLDOMDocument *iface, + REFIID riid, + LPOLESTR* rgszNames, + UINT cNames, + LCID lcid, + DISPID* rgDispId) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_Invoke( + IXMLDOMDocument *iface, + DISPID dispIdMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS* pDispParams, + VARIANT* pVarResult, + EXCEPINFO* pExcepInfo, + UINT* puArgErr) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_nodeName( + IXMLDOMDocument *iface, + BSTR* name ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_nodeValue( + IXMLDOMDocument *iface, + VARIANT* value ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_nodeValue( + IXMLDOMDocument *iface, + VARIANT value) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_nodeType( + IXMLDOMDocument *iface, + DOMNodeType* type ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_parentNode( + IXMLDOMDocument *iface, + IXMLDOMNode** parent ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_childNodes( + IXMLDOMDocument *iface, + IXMLDOMNodeList** childList ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_firstChild( + IXMLDOMDocument *iface, + IXMLDOMNode** firstChild ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_lastChild( + IXMLDOMDocument *iface, + IXMLDOMNode** lastChild ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_previousSibling( + IXMLDOMDocument *iface, + IXMLDOMNode** previousSibling ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_nextSibling( + IXMLDOMDocument *iface, + IXMLDOMNode** nextSibling ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_attributes( + IXMLDOMDocument *iface, + IXMLDOMNamedNodeMap** attributeMap ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_insertBefore( + IXMLDOMDocument *iface, + IXMLDOMNode* newChild, + VARIANT refChild, + IXMLDOMNode** outNewChild ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_replaceChild( + IXMLDOMDocument *iface, + IXMLDOMNode* newChild, + IXMLDOMNode* oldChild, + IXMLDOMNode** outOldChild) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_removeChild( + IXMLDOMDocument *iface, + IXMLDOMNode* childNode, + IXMLDOMNode** oldChild) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_appendChild( + IXMLDOMDocument *iface, + IXMLDOMNode* newChild, + IXMLDOMNode** outNewChild) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_hasChildNodes( + IXMLDOMDocument *iface, + VARIANT_BOOL* hasChild) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_ownerDocument( + IXMLDOMDocument *iface, + IXMLDOMDocument** DOMDocument) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_cloneNode( + IXMLDOMDocument *iface, + VARIANT_BOOL deep, + IXMLDOMNode** cloneRoot) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_nodeTypeString( + IXMLDOMDocument *iface, + BSTR* nodeType ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_text( + IXMLDOMDocument *iface, + BSTR* text ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_text( + IXMLDOMDocument *iface, + BSTR text ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_specified( + IXMLDOMDocument *iface, + VARIANT_BOOL* isSpecified ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_definition( + IXMLDOMDocument *iface, + IXMLDOMNode** definitionNode ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_nodeTypedValue( + IXMLDOMDocument *iface, + VARIANT* typedValue ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI domdoc_put_nodeTypedValue( + IXMLDOMDocument *iface, + VARIANT typedValue ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_dataType( + IXMLDOMDocument *iface, + VARIANT* dataTypeName ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_dataType( + IXMLDOMDocument *iface, + BSTR dataTypeName ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_xml( + IXMLDOMDocument *iface, + BSTR* xmlString ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_transformNode( + IXMLDOMDocument *iface, + IXMLDOMNode* styleSheet, + BSTR* xmlString ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_selectNodes( + IXMLDOMDocument *iface, + BSTR queryString, + IXMLDOMNodeList** resultList ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_selectSingleNode( + IXMLDOMDocument *iface, + BSTR queryString, + IXMLDOMNode** resultNode ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_parsed( + IXMLDOMDocument *iface, + VARIANT_BOOL* isParsed ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_namespaceURI( + IXMLDOMDocument *iface, + BSTR* namespaceURI ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_prefix( + IXMLDOMDocument *iface, + BSTR* prefixString ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_baseName( + IXMLDOMDocument *iface, + BSTR* nameString ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_transformNodeToObject( + IXMLDOMDocument *iface, + IXMLDOMNode* stylesheet, + VARIANT outputObject) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_doctype( + IXMLDOMDocument *iface, + IXMLDOMDocument** documentType ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_implementation( + IXMLDOMDocument *iface, + IXMLDOMImplementation** impl ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI domdoc_get_documentElement( + IXMLDOMDocument *iface, + IXMLDOMElement** DOMElement ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_documentElement( + IXMLDOMDocument *iface, + IXMLDOMElement* DOMElement ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createElement( + IXMLDOMDocument *iface, + BSTR tagname, + IXMLDOMElement** element ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createDocumentFragment( + IXMLDOMDocument *iface, + IXMLDOMDocumentFragment** docFrag ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createTextNode( + IXMLDOMDocument *iface, + BSTR data, + IXMLDOMText** text ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createComment( + IXMLDOMDocument *iface, + BSTR data, + IXMLDOMComment** comment ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createCDATASection( + IXMLDOMDocument *iface, + BSTR data, + IXMLDOMCDATASection** cdata ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createProcessingInstruction( + IXMLDOMDocument *iface, + BSTR target, + BSTR data, + IXMLDOMProcessingInstruction** pi ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createAttribute( + IXMLDOMDocument *iface, + BSTR name, + IXMLDOMAttribute** attribute ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createEntityReference( + IXMLDOMDocument *iface, + BSTR name, + IXMLDOMEntityReference** entityRef ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_getElementsByTagName( + IXMLDOMDocument *iface, + BSTR tagName, + IXMLDOMNodeList** resultList ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_createNode( + IXMLDOMDocument *iface, + VARIANT Type, + BSTR name, + BSTR namespaceURI, + IXMLDOMNode** node ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_nodeFromID( + IXMLDOMDocument *iface, + BSTR idString, + IXMLDOMNode** node ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static int read_input_callback( void *context, char *buffer, int len ) +{ + HANDLE handle = context; + DWORD count = 0; + BOOL r; + + r = ReadFile( handle, buffer, len, &count, NULL ); + if ( !r ) + return -1; + + return count; +} + +static int input_close_callback( void *context ) +{ + HANDLE handle = context; + return CloseHandle( handle ) ? 0 : -1; +} + +static xmlDocPtr doread( LPWSTR filename ) +{ + HANDLE handle; + + TRACE("%s\n", debugstr_w( filename )); + + handle = CreateFileW( filename, GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, 0, NULL ); + if( handle == INVALID_HANDLE_VALUE ) + return NULL; + + return xmlReadIO( read_input_callback, input_close_callback, + handle, NULL, NULL, 0 ); +} + + +static HRESULT WINAPI domdoc_load( + IXMLDOMDocument *iface, + VARIANT xmlSource, + VARIANT_BOOL* isSuccessful ) +{ + domdoc *This = impl_from_IXMLDOMDocument( iface ); + LPWSTR filename = NULL; + xmlDocPtr xd; + + TRACE("%p\n", This); + + switch( V_VT(&xmlSource) ) + { + case VT_BSTR: + filename = V_BSTR(&xmlSource); + } + + if ( !filename ) + return E_FAIL; + + xd = doread( filename ); + if ( !xd ) + return E_FAIL; + + /* free the old document before overwriting it */ + if ( This->xmldoc ) + xmlFreeDoc( This->xmldoc ); + This->xmldoc = xd; + + return S_OK; +} + + +static HRESULT WINAPI domdoc_get_readyState( + IXMLDOMDocument *iface, + long* value ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_parseError( + IXMLDOMDocument *iface, + IXMLDOMParseError** errorObj ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_url( + IXMLDOMDocument *iface, + BSTR* urlString ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_async( + IXMLDOMDocument *iface, + VARIANT_BOOL* isAsync ) +{ + domdoc *This = impl_from_IXMLDOMDocument( iface ); + + TRACE("%p <- %d\n", isAsync, This->async); + *isAsync = This->async; + return S_OK; +} + + +static HRESULT WINAPI domdoc_put_async( + IXMLDOMDocument *iface, + VARIANT_BOOL isAsync ) +{ + domdoc *This = impl_from_IXMLDOMDocument( iface ); + + TRACE("%d\n", isAsync); + This->async = isAsync; + return S_OK; +} + + +static HRESULT WINAPI domdoc_abort( + IXMLDOMDocument *iface ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_loadXML( + IXMLDOMDocument *iface, + BSTR bstrXML, + VARIANT_BOOL* isSuccessful ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_save( + IXMLDOMDocument *iface, + VARIANT destination ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI domdoc_get_validateOnParse( + IXMLDOMDocument *iface, + VARIANT_BOOL* isValidating ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_validateOnParse( + IXMLDOMDocument *iface, + VARIANT_BOOL isValidating ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_resolveExternals( + IXMLDOMDocument *iface, + VARIANT_BOOL* isResolving ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_resolveExternals( + IXMLDOMDocument *iface, + VARIANT_BOOL isValidating ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_get_preserveWhiteSpace( + IXMLDOMDocument *iface, + VARIANT_BOOL* isPreserving ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_preserveWhiteSpace( + IXMLDOMDocument *iface, + VARIANT_BOOL isPreserving ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_onReadyStateChange( + IXMLDOMDocument *iface, + VARIANT readyStateChangeSink ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + + +static HRESULT WINAPI domdoc_put_onDataAvailable( + IXMLDOMDocument *iface, + VARIANT onDataAvailableSink ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI domdoc_put_onTransformNode( + IXMLDOMDocument *iface, + VARIANT onTransformNodeSink ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +const struct IXMLDOMDocumentVtbl domdoc_vtbl = +{ + domdoc_QueryInterface, + domdoc_AddRef, + domdoc_Release, + domdoc_GetTypeInfoCount, + domdoc_GetTypeInfo, + domdoc_GetIDsOfNames, + domdoc_Invoke, + domdoc_get_nodeName, + domdoc_get_nodeValue, + domdoc_put_nodeValue, + domdoc_get_nodeType, + domdoc_get_parentNode, + domdoc_get_childNodes, + domdoc_get_firstChild, + domdoc_get_lastChild, + domdoc_get_previousSibling, + domdoc_get_nextSibling, + domdoc_get_attributes, + domdoc_insertBefore, + domdoc_replaceChild, + domdoc_removeChild, + domdoc_appendChild, + domdoc_hasChildNodes, + domdoc_get_ownerDocument, + domdoc_cloneNode, + domdoc_get_nodeTypeString, + domdoc_get_text, + domdoc_put_text, + domdoc_get_specified, + domdoc_get_definition, + domdoc_get_nodeTypedValue, + domdoc_put_nodeTypedValue, + domdoc_get_dataType, + domdoc_put_dataType, + domdoc_get_xml, + domdoc_transformNode, + domdoc_selectNodes, + domdoc_selectSingleNode, + domdoc_get_parsed, + domdoc_get_namespaceURI, + domdoc_get_prefix, + domdoc_get_baseName, + domdoc_transformNodeToObject, + domdoc_get_doctype, + domdoc_get_implementation, + domdoc_get_documentElement, + domdoc_documentElement, + domdoc_createElement, + domdoc_createDocumentFragment, + domdoc_createTextNode, + domdoc_createComment, + domdoc_createCDATASection, + domdoc_createProcessingInstruction, + domdoc_createAttribute, + domdoc_createEntityReference, + domdoc_getElementsByTagName, + domdoc_createNode, + domdoc_nodeFromID, + domdoc_load, + domdoc_get_readyState, + domdoc_get_parseError, + domdoc_get_url, + domdoc_get_async, + domdoc_put_async, + domdoc_abort, + domdoc_loadXML, + domdoc_save, + domdoc_get_validateOnParse, + domdoc_put_validateOnParse, + domdoc_get_resolveExternals, + domdoc_put_resolveExternals, + domdoc_get_preserveWhiteSpace, + domdoc_put_preserveWhiteSpace, + domdoc_put_onReadyStateChange, + domdoc_put_onDataAvailable, + domdoc_put_onTransformNode, +}; + +HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj) +{ + domdoc *doc; + + doc = HeapAlloc( GetProcessHeap(), 0, sizeof (*doc) ); + if( !doc ) + return E_OUTOFMEMORY; + + doc->lpVtbl = &domdoc_vtbl; + doc->ref = 1; + doc->async = 0; + doc->xmldoc = NULL; + + *ppObj = &doc->lpVtbl; + + return S_OK; +} + +#else + +HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj) +{ + MESSAGE("This program tried to use a DOMDocument object, but\n" + "libxml2 support was not present at compile time.\n"); + return E_NOTIMPL; +} + +#endif diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c new file mode 100644 index 00000000000..64e7f8ef41c --- /dev/null +++ b/dlls/msxml3/factory.c @@ -0,0 +1,143 @@ +/* + * MSXML Class Factory + * + * Copyright 2002 Lionel Ulmer + * Copyright 2005 Mike McCormack + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define COBJMACROS + +#include +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "uuids.h" +#include "msxml.h" +#include "xmldom.h" + +#include "wine/debug.h" + +#include "msxml_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msxml); + +typedef HRESULT (*fnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); + +/****************************************************************************** + * MSXML ClassFactory + */ +typedef struct _xmlcf +{ + const struct IClassFactoryVtbl *lpVtbl; + fnCreateInstance pfnCreateInstance; +} xmlcf; + +static inline xmlcf *impl_from_IClassFactory( IClassFactory *iface ) +{ + return (xmlcf *)((char*)iface - FIELD_OFFSET(xmlcf, lpVtbl)); +} + +static HRESULT WINAPI xmlcf_QueryInterface( + IClassFactory *iface, + REFIID riid, + LPVOID *ppobj ) +{ + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IClassFactory)) + { + IClassFactory_AddRef( iface ); + *ppobj = iface; + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI xmlcf_AddRef( + IClassFactory *iface ) +{ + return 2; +} + +static ULONG WINAPI xmlcf_Release( + IClassFactory *iface ) +{ + return 1; +} + +static HRESULT WINAPI xmlcf_CreateInstance( + IClassFactory *iface, + LPUNKNOWN pOuter, + REFIID riid, + LPVOID *ppobj ) +{ + xmlcf *This = impl_from_IClassFactory( iface ); + HRESULT r; + IUnknown *punk; + + TRACE("%p %s %p\n", pOuter, debugstr_guid(riid), ppobj ); + + *ppobj = NULL; + + if (pOuter) + return CLASS_E_NOAGGREGATION; + + r = This->pfnCreateInstance( pOuter, (LPVOID*) &punk ); + if (FAILED(r)) + return r; + + r = IUnknown_QueryInterface( punk, riid, ppobj ); + if (FAILED(r)) + return r; + IUnknown_Release( punk ); + return r; +} + +static HRESULT WINAPI xmlcf_LockServer( + IClassFactory *iface, + BOOL dolock) +{ + FIXME("(%p)->(%d),stub!\n",iface,dolock); + return S_OK; +} + +const struct IClassFactoryVtbl xmlcf_vtbl = +{ + xmlcf_QueryInterface, + xmlcf_AddRef, + xmlcf_Release, + xmlcf_CreateInstance, + xmlcf_LockServer +}; + +static xmlcf domdoccf = { &xmlcf_vtbl, DOMDocument_create }; + +HRESULT MSXML_DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) +{ + IClassFactory *cf = NULL; + + TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv ); + + if( IsEqualGUID( rclsid, &CLSID_DOMDocument ) ) + cf = (IClassFactory*) &domdoccf.lpVtbl; + + if ( !cf ) + return CLASS_E_CLASSNOTAVAILABLE; + + return IClassFactory_QueryInterface( cf, iid, ppv ); +} diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c new file mode 100644 index 00000000000..a44cab61c3c --- /dev/null +++ b/dlls/msxml3/main.c @@ -0,0 +1,55 @@ +/* + * MSXML Class Factory + * + * Copyright 2002 Lionel Ulmer + * Copyright 2005 Mike McCormack + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msxml); + +HRESULT WINAPI MSXML_DllCanUnloadNow(void) +{ + FIXME("\n"); + return S_FALSE; +} + +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +{ + switch(fdwReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hInstDLL); + break; + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + +HRESULT WINAPI MSXML_DllRegisterServer(void) +{ + FIXME("\n"); + return S_OK; +} diff --git a/dlls/msxml3/msxml3.spec b/dlls/msxml3/msxml3.spec new file mode 100644 index 00000000000..8acb8895278 --- /dev/null +++ b/dlls/msxml3/msxml3.spec @@ -0,0 +1,12 @@ + 6 stub @ + 7 stub @ + 8 stub @ + 9 stub @ +10 stub @ +11 stub @ +12 stub @ + +@ stdcall -private DllCanUnloadNow() MSXML_DllCanUnloadNow +@ stdcall -private DllGetClassObject(ptr ptr ptr) MSXML_DllGetClassObject +@ stdcall -private DllRegisterServer() MSXML_DllRegisterServer +@ stub DllUnregisterServer diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h new file mode 100644 index 00000000000..9da8670e87e --- /dev/null +++ b/dlls/msxml3/msxml_private.h @@ -0,0 +1,26 @@ +/* + * MSXML Class Factory + * + * Copyright 2005 Mike McCormack + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __MSXML_PRIVATE__ +#define __MSXML_PRIVATE__ + +extern HRESULT DOMDocument_create( IUnknown *pUnkOuter, LPVOID *ppObj ); + +#endif /* __MSXML_PRIVATE__ */ diff --git a/include/config.h.in b/include/config.h.in index 03e61d8180a..f569d2726c5 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -296,6 +296,12 @@ /* Define to 1 if you have the `w' library (-lw). */ #undef HAVE_LIBW +/* Define if you have the libxml2 library */ +#undef HAVE_LIBXML2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBXML_PARSER_H + /* Define to 1 if you have the `xpg4' library (-lxpg4). */ #undef HAVE_LIBXPG4