remove test cases. sorry I ment to do this before the first commit

svn path=/trunk/; revision=20003
This commit is contained in:
Steven Edwards
2005-12-09 09:19:18 +00:00
parent 870c58de2c
commit db50f7ffa0
1065 changed files with 0 additions and 126644 deletions
-75
View File
@@ -1,75 +0,0 @@
# Makefile for libxml2 python library
AUTOMAKE_OPTIONS = 1.4 foreign
SUBDIRS= . tests
INCLUDES = \
-I$(PYTHON_INCLUDES) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_builddir)/$(subdir)
DOCS_DIR = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
# libxml2class.txt is generated
DOCS = ${srcdir}/TODO
EXTRA_DIST = \
libxml.c \
types.c \
setup.py \
setup.py.in \
generator.py \
libxml_wrap.h \
libxml.py \
drv_libxml2.py \
libxml2-python-api.xml \
$(DOCS)
libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version -L$(top_builddir)/.libs
if WITH_PYTHON
mylibs = \
$(top_builddir)/libxml2.la
all-local: libxml2.py
python_LTLIBRARIES = libxml2mod.la
libxml2mod_la_SOURCES = libxml.c types.c libxml2-py.c
libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@
libxml2.py: $(srcdir)/libxml.py libxml2class.py
cat $(srcdir)/libxml.py libxml2class.py > libxml2.py
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pythondir)
@INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(pythondir)
@INSTALL@ -m 0644 $(srcdir)/drv_libxml2.py $(DESTDIR)$(pythondir)
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
@(for doc in $(DOCS) ; \
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
GENERATE = generator.py
API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
GENERATED= libxml2class.py \
libxml2-export.c \
libxml2class.txt \
libxml2-py.c \
libxml2-py.h
CLEANFILES= $(GENERATED) gen_prog libxml2.py
$(GENERATED): gen_prog
gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
touch gen_prog
$(libxml2mod_la_OBJECTS): $(GENERATED)
else
all:
endif
tests test: all
cd tests && $(MAKE) MAKEFLAGS+=--silent tests
-740
View File
@@ -1,740 +0,0 @@
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SOURCES = $(libxml2mod_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = python
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/setup.py.in TODO
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = setup.py
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(pythondir)"
pythonLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(python_LTLIBRARIES)
@WITH_PYTHON_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/libxml2.la
@WITH_PYTHON_TRUE@libxml2mod_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am__libxml2mod_la_SOURCES_DIST = libxml.c types.c libxml2-py.c
@WITH_PYTHON_TRUE@am_libxml2mod_la_OBJECTS = libxml.lo types.lo \
@WITH_PYTHON_TRUE@ libxml2-py.lo
libxml2mod_la_OBJECTS = $(am_libxml2mod_la_OBJECTS)
@WITH_PYTHON_TRUE@am_libxml2mod_la_rpath = -rpath $(pythondir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libxml2mod_la_SOURCES)
DIST_SOURCES = $(am__libxml2mod_la_SOURCES_DIST)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
C14N_OBJ = @C14N_OBJ@
CATALOG_OBJ = @CATALOG_OBJ@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
DEBUG_OBJ = @DEBUG_OBJ@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DOCB_OBJ = @DOCB_OBJ@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FTP_OBJ = @FTP_OBJ@
HAVE_ISINF = @HAVE_ISINF@
HAVE_ISNAN = @HAVE_ISNAN@
HTML_DIR = @HTML_DIR@
HTML_OBJ = @HTML_OBJ@
HTTP_OBJ = @HTTP_OBJ@
ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
LIBXML_VERSION = @LIBXML_VERSION@
LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MODULE_EXTENSION = @MODULE_EXTENSION@
MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
MV = @MV@
M_LIBS = @M_LIBS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PYTHON = @PYTHON@
PYTHON_INCLUDES = @PYTHON_INCLUDES@
PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
PYTHON_SUBDIR = @PYTHON_SUBDIR@
PYTHON_TESTS = @PYTHON_TESTS@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RDL_LIBS = @RDL_LIBS@
READER_TEST = @READER_TEST@
RELDATE = @RELDATE@
RM = @RM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_BINARIES = @STATIC_BINARIES@
STRIP = @STRIP@
TAR = @TAR@
TEST_C14N = @TEST_C14N@
TEST_CATALOG = @TEST_CATALOG@
TEST_DEBUG = @TEST_DEBUG@
TEST_HTML = @TEST_HTML@
TEST_MODULES = @TEST_MODULES@
TEST_PATTERN = @TEST_PATTERN@
TEST_PHTML = @TEST_PHTML@
TEST_PUSH = @TEST_PUSH@
TEST_REGEXPS = @TEST_REGEXPS@
TEST_SAX = @TEST_SAX@
TEST_SCHEMAS = @TEST_SCHEMAS@
TEST_THREADS = @TEST_THREADS@
TEST_VALID = @TEST_VALID@
TEST_VTIME = @TEST_VTIME@
TEST_XINCLUDE = @TEST_XINCLUDE@
TEST_XPATH = @TEST_XPATH@
TEST_XPTR = @TEST_XPTR@
THREADS_W32 = @THREADS_W32@
THREAD_CFLAGS = @THREAD_CFLAGS@
THREAD_LIBS = @THREAD_LIBS@
U = @U@
VERSION = @VERSION@
WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
WITH_C14N = @WITH_C14N@
WITH_CATALOG = @WITH_CATALOG@
WITH_DEBUG = @WITH_DEBUG@
WITH_DOCB = @WITH_DOCB@
WITH_FTP = @WITH_FTP@
WITH_HTML = @WITH_HTML@
WITH_HTTP = @WITH_HTTP@
WITH_ICONV = @WITH_ICONV@
WITH_ISO8859X = @WITH_ISO8859X@
WITH_LEGACY = @WITH_LEGACY@
WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
WITH_MODULES = @WITH_MODULES@
WITH_OUTPUT = @WITH_OUTPUT@
WITH_PATTERN = @WITH_PATTERN@
WITH_PUSH = @WITH_PUSH@
WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
WITH_READER = @WITH_READER@
WITH_REGEXPS = @WITH_REGEXPS@
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
WITH_SAX1 = @WITH_SAX1@
WITH_SCHEMAS = @WITH_SCHEMAS@
WITH_THREADS = @WITH_THREADS@
WITH_TREE = @WITH_TREE@
WITH_TRIO = @WITH_TRIO@
WITH_TRIO_SOURCES_FALSE = @WITH_TRIO_SOURCES_FALSE@
WITH_TRIO_SOURCES_TRUE = @WITH_TRIO_SOURCES_TRUE@
WITH_VALID = @WITH_VALID@
WITH_WRITER = @WITH_WRITER@
WITH_XINCLUDE = @WITH_XINCLUDE@
WITH_XPATH = @WITH_XPATH@
WITH_XPTR = @WITH_XPTR@
XINCLUDE_OBJ = @XINCLUDE_OBJ@
XMLLINT = @XMLLINT@
XML_CFLAGS = @XML_CFLAGS@
XML_INCLUDEDIR = @XML_INCLUDEDIR@
XML_LIBDIR = @XML_LIBDIR@
XML_LIBS = @XML_LIBS@
XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
XPATH_OBJ = @XPATH_OBJ@
XPTR_OBJ = @XPTR_OBJ@
XSLTPROC = @XSLTPROC@
Z_CFLAGS = @Z_CFLAGS@
Z_LIBS = @Z_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
# Makefile for libxml2 python library
AUTOMAKE_OPTIONS = 1.4 foreign
SUBDIRS = . tests
INCLUDES = \
-I$(PYTHON_INCLUDES) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_builddir)/$(subdir)
DOCS_DIR = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
# libxml2class.txt is generated
DOCS = ${srcdir}/TODO
EXTRA_DIST = \
libxml.c \
types.c \
setup.py \
setup.py.in \
generator.py \
libxml_wrap.h \
libxml.py \
drv_libxml2.py \
libxml2-python-api.xml \
$(DOCS)
libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version -L$(top_builddir)/.libs
@WITH_PYTHON_TRUE@mylibs = \
@WITH_PYTHON_TRUE@ $(top_builddir)/libxml2.la
@WITH_PYTHON_TRUE@python_LTLIBRARIES = libxml2mod.la
@WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = libxml.c types.c libxml2-py.c
@WITH_PYTHON_TRUE@libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@
@WITH_PYTHON_TRUE@GENERATE = generator.py
@WITH_PYTHON_TRUE@API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
@WITH_PYTHON_TRUE@GENERATED = libxml2class.py \
@WITH_PYTHON_TRUE@ libxml2-export.c \
@WITH_PYTHON_TRUE@ libxml2class.txt \
@WITH_PYTHON_TRUE@ libxml2-py.c \
@WITH_PYTHON_TRUE@ libxml2-py.h
@WITH_PYTHON_TRUE@CLEANFILES = $(GENERATED) gen_prog libxml2.py
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign python/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-pythonLTLIBRARIES: $(python_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(pythondir)" || $(mkdir_p) "$(DESTDIR)$(pythondir)"
@list='$(python_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(pythonLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pythondir)/$$f'"; \
$(LIBTOOL) --mode=install $(pythonLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pythondir)/$$f"; \
else :; fi; \
done
uninstall-pythonLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@set -x; list='$(python_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pythondir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pythondir)/$$p"; \
done
clean-pythonLTLIBRARIES:
-test -z "$(python_LTLIBRARIES)" || rm -f $(python_LTLIBRARIES)
@list='$(python_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libxml2mod.la: $(libxml2mod_la_OBJECTS) $(libxml2mod_la_DEPENDENCIES)
$(LINK) $(am_libxml2mod_la_rpath) $(libxml2mod_la_LDFLAGS) $(libxml2mod_la_OBJECTS) $(libxml2mod_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxml2-py.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/${srcdir}
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
@WITH_PYTHON_FALSE@all-local:
all-am: Makefile $(LTLIBRARIES) all-local
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pythondir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@WITH_PYTHON_FALSE@install-data-local:
clean: clean-recursive
clean-am: clean-generic clean-libtool clean-pythonLTLIBRARIES \
mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-data-local install-pythonLTLIBRARIES
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am uninstall-pythonLTLIBRARIES
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local check \
check-am clean clean-generic clean-libtool \
clean-pythonLTLIBRARIES clean-recursive ctags ctags-recursive \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-recursive distclean-tags distdir \
dvi dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
install-pythonLTLIBRARIES install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am \
uninstall-pythonLTLIBRARIES
@WITH_PYTHON_TRUE@all-local: libxml2.py
@[email protected]: $(srcdir)/libxml.py libxml2class.py
@WITH_PYTHON_TRUE@ cat $(srcdir)/libxml.py libxml2class.py > libxml2.py
@WITH_PYTHON_TRUE@install-data-local:
@WITH_PYTHON_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pythondir)
@WITH_PYTHON_TRUE@ @INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(pythondir)
@WITH_PYTHON_TRUE@ @INSTALL@ -m 0644 $(srcdir)/drv_libxml2.py $(DESTDIR)$(pythondir)
@WITH_PYTHON_TRUE@ $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
@WITH_PYTHON_TRUE@ @(for doc in $(DOCS) ; \
@WITH_PYTHON_TRUE@ do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
@WITH_PYTHON_TRUE@$(GENERATED): gen_prog
@WITH_PYTHON_TRUE@gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
@WITH_PYTHON_TRUE@ $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
@WITH_PYTHON_TRUE@ touch gen_prog
@WITH_PYTHON_TRUE@$(libxml2mod_la_OBJECTS): $(GENERATED)
@WITH_PYTHON_FALSE@all:
tests test: all
cd tests && $(MAKE) MAKEFLAGS+=--silent tests
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-34
View File
@@ -1,34 +0,0 @@
Module libxml2-python
=====================
This is the libxml2 python module, providing access to the
libxml2 and libxslt (if available) libraries. For general
informationss on those XML and XSLT libraries check their
web pages at :
http://xmlsoft.org/
and
http://xmlsoft.org/XSLT/
The latest version of the sources for this module and the
associated libraries can be found at:
ftp://xmlsoft.org/
Binaries packages of the libxml2 and libxslt libraries can
be found either on the FTP site for Linux, from external
sources linked from the web pages, or as part of your set of
packages provided with your operating system.
NOTE:
this module distribution is not the primary distribution
of the libxml2 and libxslt Python binding code, but as
the Python way of packaging those for non-Linux systems.
The main sources are the libxml2 and libxslt tar.gz found on
the site. One side effect is that the official RPM packages for
those modules are not generated from the libxml2-python
distributions but as part of the normal RPM packaging of
those two libraries.
The RPM packages can be found at:
http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python
http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python
Daniel Veillard
-57
View File
@@ -1,57 +0,0 @@
TODO for the libxml2 Python wrappers
$Id: TODO,v 1.8 2002/02/06 16:06:57 veillard Exp $
Things to do:
-------------
- SAX interfaces
- push is done but no generic interface
- elementDecl need some work
- need more testing and check full callbacks for xmllib/sgmlop replacement
- enums -> libxml.py
- access to XPath variables
- xmlBuffer exposure
- xpathContext, being able to set/get info and clean it up
- more work needed on context handling for function lookup
and use of an hash table.
- add regression tests
- SAX flow
- DTD element and attributes content accesses
- attribute handled in SAX
- element needed in both
Done:
-----
- class hierarchy:
+ make specific node type inherit from xmlNode
done, had to sort the classes in the output
+ get the generator to output a classes.txt description
done libxml2class.txt
- add regression tests
- tests/Makefile.am: export the Python class path
- xpath queries
- xpath extension
- check memory
- build tree
- saving
- extensions based on a python.xml description of the new specific
interfaces
file libxml2-python-api.xml , first entry is xmlRegisterXPathFunction
- spec file: automatically generate for pythonX.Y if found
Done, a bit ugly by running new makes in %install for each level
found.
- error redirections and preformat
- handling of node.content
- access to xmlParserCtxt and push mode
- needed for SAX too
- entry points
- wrappers
- decent interface for setting/getting behaviour
- memory debug interfaces
- SAX interfaces
- basic stuff with push is available
- basic xmllib replacement
Daniel Veillard
-371
View File
@@ -1,371 +0,0 @@
# -*- coding: iso-8859-1 -*-
""" A SAX2 driver for libxml2, on top of it's XmlReader API
USAGE
# put this file (drv_libxml2.py) in PYTHONPATH
import xml.sax
reader = xml.sax.make_parser(["drv_libxml2"])
# ...and the rest is standard python sax.
CAVEATS
- Lexical handlers are supported, except for start/endEntity
(waiting for XmlReader.ResolveEntity) and start/endDTD
- Error callbacks are not exactly synchronous, they tend
to be invoked before the corresponding content callback,
because the underlying reader interface parses
data by chunks of 512 bytes
TODO
- search for TODO
- some ErrorHandler events (warning)
- some ContentHandler events (setDocumentLocator, skippedEntity)
- EntityResolver (using libxml2.?)
- DTDHandler (if/when libxml2 exposes such node types)
- DeclHandler (if/when libxml2 exposes such node types)
- property_xml_string?
- feature_string_interning?
- Incremental parser
- additional performance tuning:
- one might cache callbacks to avoid some name lookups
- one might implement a smarter way to pass attributes to startElement
(some kind of lazy evaluation?)
- there might be room for improvement in start/endPrefixMapping
- other?
"""
__author__ = u"Stéphane Bidoul <[email protected]>"
__version__ = "0.3"
import codecs
from types import StringType, UnicodeType
StringTypes = (StringType,UnicodeType)
from xml.sax._exceptions import *
from xml.sax import xmlreader, saxutils
from xml.sax.handler import \
feature_namespaces, \
feature_namespace_prefixes, \
feature_string_interning, \
feature_validation, \
feature_external_ges, \
feature_external_pes, \
property_lexical_handler, \
property_declaration_handler, \
property_dom_node, \
property_xml_string
# libxml2 returns strings as UTF8
_decoder = codecs.lookup("utf8")[1]
def _d(s):
if s is None:
return s
else:
return _decoder(s)[0]
try:
import libxml2
except ImportError, e:
raise SAXReaderNotAvailable("libxml2 not available: " \
"import error was: %s" % e)
class Locator(xmlreader.Locator):
"""SAX Locator adapter for libxml2.xmlTextReaderLocator"""
def __init__(self,locator):
self.__locator = locator
def getColumnNumber(self):
"Return the column number where the current event ends."
return -1
def getLineNumber(self):
"Return the line number where the current event ends."
return self.__locator.LineNumber()
def getPublicId(self):
"Return the public identifier for the current event."
return None
def getSystemId(self):
"Return the system identifier for the current event."
return self.__locator.BaseURI()
class LibXml2Reader(xmlreader.XMLReader):
def __init__(self):
xmlreader.XMLReader.__init__(self)
# features
self.__ns = 0
self.__nspfx = 0
self.__validate = 0
self.__extparams = 1
# parsing flag
self.__parsing = 0
# additional handlers
self.__lex_handler = None
self.__decl_handler = None
# error messages accumulator
self.__errors = None
def _errorHandler(self,arg,msg,severity,locator):
if self.__errors is None:
self.__errors = []
self.__errors.append((severity,
SAXParseException(msg,None,
Locator(locator))))
def _reportErrors(self,fatal):
for severity,exception in self.__errors:
if severity in (libxml2.PARSER_SEVERITY_VALIDITY_WARNING,
libxml2.PARSER_SEVERITY_WARNING):
self._err_handler.warning(exception)
else:
# when fatal is set, the parse will stop;
# we consider that the last error reported
# is the fatal one.
if fatal and exception is self.__errors[-1][1]:
self._err_handler.fatalError(exception)
else:
self._err_handler.error(exception)
self.__errors = None
def parse(self, source):
self.__parsing = 1
try:
# prepare source and create reader
if type(source) in StringTypes:
reader = libxml2.newTextReaderFilename(source)
else:
source = saxutils.prepare_input_source(source)
input = libxml2.inputBuffer(source.getByteStream())
reader = input.newTextReader(source.getSystemId())
reader.SetErrorHandler(self._errorHandler,None)
# configure reader
if self.__extparams:
reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
reader.SetParserProp(libxml2.PARSER_VALIDATE,self.__validate)
else:
reader.SetParserProp(libxml2.PARSER_LOADDTD, 0)
# we reuse attribute maps (for a slight performance gain)
if self.__ns:
attributesNSImpl = xmlreader.AttributesNSImpl({},{})
else:
attributesImpl = xmlreader.AttributesImpl({})
# prefixes to pop (for endPrefixMapping)
prefixes = []
# start loop
self._cont_handler.startDocument()
while 1:
r = reader.Read()
# check for errors
if r == 1:
if not self.__errors is None:
self._reportErrors(0)
elif r == 0:
if not self.__errors is None:
self._reportErrors(0)
break # end of parse
else:
if not self.__errors is None:
self._reportErrors(1)
else:
self._err_handler.fatalError(\
SAXException("Read failed (no details available)"))
break # fatal parse error
# get node type
nodeType = reader.NodeType()
# Element
if nodeType == 1:
if self.__ns:
eltName = (_d(reader.NamespaceUri()),\
_d(reader.LocalName()))
eltQName = _d(reader.Name())
attributesNSImpl._attrs = attrs = {}
attributesNSImpl._qnames = qnames = {}
newPrefixes = []
while reader.MoveToNextAttribute():
qname = _d(reader.Name())
value = _d(reader.Value())
if qname.startswith("xmlns"):
if len(qname) > 5:
newPrefix = qname[6:]
else:
newPrefix = None
newPrefixes.append(newPrefix)
self._cont_handler.startPrefixMapping(\
newPrefix,value)
if not self.__nspfx:
continue # don't report xmlns attribute
attName = (_d(reader.NamespaceUri()),
_d(reader.LocalName()))
qnames[attName] = qname
attrs[attName] = value
reader.MoveToElement()
self._cont_handler.startElementNS( \
eltName,eltQName,attributesNSImpl)
if reader.IsEmptyElement():
self._cont_handler.endElementNS(eltName,eltQName)
for newPrefix in newPrefixes:
self._cont_handler.endPrefixMapping(newPrefix)
else:
prefixes.append(newPrefixes)
else:
eltName = _d(reader.Name())
attributesImpl._attrs = attrs = {}
while reader.MoveToNextAttribute():
attName = _d(reader.Name())
attrs[attName] = _d(reader.Value())
reader.MoveToElement()
self._cont_handler.startElement( \
eltName,attributesImpl)
if reader.IsEmptyElement():
self._cont_handler.endElement(eltName)
# EndElement
elif nodeType == 15:
if self.__ns:
self._cont_handler.endElementNS( \
(_d(reader.NamespaceUri()),_d(reader.LocalName())),
_d(reader.Name()))
for prefix in prefixes.pop():
self._cont_handler.endPrefixMapping(prefix)
else:
self._cont_handler.endElement(_d(reader.Name()))
# Text
elif nodeType == 3:
self._cont_handler.characters(_d(reader.Value()))
# Whitespace
elif nodeType == 13:
self._cont_handler.ignorableWhitespace(_d(reader.Value()))
# SignificantWhitespace
elif nodeType == 14:
self._cont_handler.characters(_d(reader.Value()))
# CDATA
elif nodeType == 4:
if not self.__lex_handler is None:
self.__lex_handler.startCDATA()
self._cont_handler.characters(_d(reader.Value()))
if not self.__lex_handler is None:
self.__lex_handler.endCDATA()
# EntityReference
elif nodeType == 5:
if not self.__lex_handler is None:
self.startEntity(_d(reader.Name()))
reader.ResolveEntity()
# EndEntity
elif nodeType == 16:
if not self.__lex_handler is None:
self.endEntity(_d(reader.Name()))
# ProcessingInstruction
elif nodeType == 7:
self._cont_handler.processingInstruction( \
_d(reader.Name()),_d(reader.Value()))
# Comment
elif nodeType == 8:
if not self.__lex_handler is None:
self.__lex_handler.comment(_d(reader.Value()))
# DocumentType
elif nodeType == 10:
#if not self.__lex_handler is None:
# self.__lex_handler.startDTD()
pass # TODO (how to detect endDTD? on first non-dtd event?)
# XmlDeclaration
elif nodeType == 17:
pass # TODO
# Entity
elif nodeType == 6:
pass # TODO (entity decl)
# Notation (decl)
elif nodeType == 12:
pass # TODO
# Attribute (never in this loop)
#elif nodeType == 2:
# pass
# Document (not exposed)
#elif nodeType == 9:
# pass
# DocumentFragment (never returned by XmlReader)
#elif nodeType == 11:
# pass
# None
#elif nodeType == 0:
# pass
# -
else:
raise SAXException("Unexpected node type %d" % nodeType)
if r == 0:
self._cont_handler.endDocument()
reader.Close()
finally:
self.__parsing = 0
def setDTDHandler(self, handler):
# TODO (when supported, the inherited method works just fine)
raise SAXNotSupportedException("DTDHandler not supported")
def setEntityResolver(self, resolver):
# TODO (when supported, the inherited method works just fine)
raise SAXNotSupportedException("EntityResolver not supported")
def getFeature(self, name):
if name == feature_namespaces:
return self.__ns
elif name == feature_namespace_prefixes:
return self.__nspfx
elif name == feature_validation:
return self.__validate
elif name == feature_external_ges:
return 1 # TODO (does that relate to PARSER_LOADDTD)?
elif name == feature_external_pes:
return self.__extparams
else:
raise SAXNotRecognizedException("Feature '%s' not recognized" % \
name)
def setFeature(self, name, state):
if self.__parsing:
raise SAXNotSupportedException("Cannot set feature %s " \
"while parsing" % name)
if name == feature_namespaces:
self.__ns = state
elif name == feature_namespace_prefixes:
self.__nspfx = state
elif name == feature_validation:
self.__validate = state
elif name == feature_external_ges:
if state == 0:
# TODO (does that relate to PARSER_LOADDTD)?
raise SAXNotSupportedException("Feature '%s' not supported" % \
name)
elif name == feature_external_pes:
self.__extparams = state
else:
raise SAXNotRecognizedException("Feature '%s' not recognized" % \
name)
def getProperty(self, name):
if name == property_lexical_handler:
return self.__lex_handler
elif name == property_declaration_handler:
return self.__decl_handler
else:
raise SAXNotRecognizedException("Property '%s' not recognized" % \
name)
def setProperty(self, name, value):
if name == property_lexical_handler:
self.__lex_handler = value
elif name == property_declaration_handler:
# TODO: remove if/when libxml2 supports dtd events
raise SAXNotSupportedException("Property '%s' not supported" % \
name)
self.__decl_handler = value
else:
raise SAXNotRecognizedException("Property '%s' not recognized" % \
name)
def create_parser():
return LibXml2Reader()
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-698
View File
@@ -1,698 +0,0 @@
import libxml2mod
import types
# The root of all libxml2 errors.
class libxmlError(Exception): pass
#
# Errors raised by the wrappers when some tree handling failed.
#
class treeError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class parserError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class uriError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class xpathError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class ioWrapper:
def __init__(self, _obj):
self.__io = _obj
self._o = None
def io_close(self):
if self.__io == None:
return(-1)
self.__io.close()
self.__io = None
return(0)
def io_flush(self):
if self.__io == None:
return(-1)
self.__io.flush()
return(0)
def io_read(self, len = -1):
if self.__io == None:
return(-1)
if len < 0:
return(self.__io.read())
return(self.__io.read(len))
def io_write(self, str, len = -1):
if self.__io == None:
return(-1)
if len < 0:
return(self.__io.write(str))
return(self.__io.write(str, len))
class ioReadWrapper(ioWrapper):
def __init__(self, _obj, enc = ""):
ioWrapper.__init__(self, _obj)
self._o = libxml2mod.xmlCreateInputBuffer(self, enc)
def __del__(self):
print "__del__"
self.io_close()
if self._o != None:
libxml2mod.xmlFreeParserInputBuffer(self._o)
self._o = None
def close(self):
self.io_close()
if self._o != None:
libxml2mod.xmlFreeParserInputBuffer(self._o)
self._o = None
class ioWriteWrapper(ioWrapper):
def __init__(self, _obj, enc = ""):
# print "ioWriteWrapper.__init__", _obj
if type(_obj) == type(''):
print "write io from a string"
self.o = None
elif type(_obj) == types.InstanceType:
print "write io from instance of %s" % (_obj.__class__)
ioWrapper.__init__(self, _obj)
self._o = libxml2mod.xmlCreateOutputBuffer(self, enc)
else:
file = libxml2mod.outputBufferGetPythonFile(_obj)
if file != None:
ioWrapper.__init__(self, file)
else:
ioWrapper.__init__(self, _obj)
self._o = _obj
def __del__(self):
# print "__del__"
self.io_close()
if self._o != None:
libxml2mod.xmlOutputBufferClose(self._o)
self._o = None
def flush(self):
self.io_flush()
if self._o != None:
libxml2mod.xmlOutputBufferClose(self._o)
self._o = None
def close(self):
self.io_flush()
if self._o != None:
libxml2mod.xmlOutputBufferClose(self._o)
self._o = None
#
# Example of a class to handle SAX events
#
class SAXCallback:
"""Base class for SAX handlers"""
def startDocument(self):
"""called at the start of the document"""
pass
def endDocument(self):
"""called at the end of the document"""
pass
def startElement(self, tag, attrs):
"""called at the start of every element, tag is the name of
the element, attrs is a dictionary of the element's attributes"""
pass
def endElement(self, tag):
"""called at the start of every element, tag is the name of
the element"""
pass
def characters(self, data):
"""called when character data have been read, data is the string
containing the data, multiple consecutive characters() callback
are possible."""
pass
def cdataBlock(self, data):
"""called when CDATA section have been read, data is the string
containing the data, multiple consecutive cdataBlock() callback
are possible."""
pass
def reference(self, name):
"""called when an entity reference has been found"""
pass
def ignorableWhitespace(self, data):
"""called when potentially ignorable white spaces have been found"""
pass
def processingInstruction(self, target, data):
"""called when a PI has been found, target contains the PI name and
data is the associated data in the PI"""
pass
def comment(self, content):
"""called when a comment has been found, content contains the comment"""
pass
def externalSubset(self, name, externalID, systemID):
"""called when a DOCTYPE declaration has been found, name is the
DTD name and externalID, systemID are the DTD public and system
identifier for that DTd if available"""
pass
def internalSubset(self, name, externalID, systemID):
"""called when a DOCTYPE declaration has been found, name is the
DTD name and externalID, systemID are the DTD public and system
identifier for that DTD if available"""
pass
def entityDecl(self, name, type, externalID, systemID, content):
"""called when an ENTITY declaration has been found, name is the
entity name and externalID, systemID are the entity public and
system identifier for that entity if available, type indicates
the entity type, and content reports it's string content"""
pass
def notationDecl(self, name, externalID, systemID):
"""called when an NOTATION declaration has been found, name is the
notation name and externalID, systemID are the notation public and
system identifier for that notation if available"""
pass
def attributeDecl(self, elem, name, type, defi, defaultValue, nameList):
"""called when an ATTRIBUTE definition has been found"""
pass
def elementDecl(self, name, type, content):
"""called when an ELEMENT definition has been found"""
pass
def entityDecl(self, name, publicId, systemID, notationName):
"""called when an unparsed ENTITY declaration has been found,
name is the entity name and publicId,, systemID are the entity
public and system identifier for that entity if available,
and notationName indicate the associated NOTATION"""
pass
def warning(self, msg):
print msg
def error(self, msg):
raise parserError(msg)
def fatalError(self, msg):
raise parserError(msg)
#
# This class is the ancestor of all the Node classes. It provides
# the basic functionalities shared by all nodes (and handle
# gracefylly the exception), like name, navigation in the tree,
# doc reference, content access and serializing to a string or URI
#
class xmlCore:
def __init__(self, _obj=None):
if _obj != None:
self._o = _obj;
return
self._o = None
def __str__(self):
return self.serialize()
def get_parent(self):
ret = libxml2mod.parent(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
def get_children(self):
ret = libxml2mod.children(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
def get_last(self):
ret = libxml2mod.last(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
def get_next(self):
ret = libxml2mod.next(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
def get_properties(self):
ret = libxml2mod.properties(self._o)
if ret == None:
return None
return xmlAttr(_obj=ret)
def get_prev(self):
ret = libxml2mod.prev(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
def get_content(self):
return libxml2mod.xmlNodeGetContent(self._o)
getContent = get_content # why is this duplicate naming needed ?
def get_name(self):
return libxml2mod.name(self._o)
def get_type(self):
return libxml2mod.type(self._o)
def get_doc(self):
ret = libxml2mod.doc(self._o)
if ret == None:
if self.type in ["document_xml", "document_html"]:
return xmlDoc(_obj=self._o)
else:
return None
return xmlDoc(_obj=ret)
#
# Those are common attributes to nearly all type of nodes
# defined as python2 properties
#
import sys
if float(sys.version[0:3]) < 2.2:
def __getattr__(self, attr):
if attr == "parent":
ret = libxml2mod.parent(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
elif attr == "properties":
ret = libxml2mod.properties(self._o)
if ret == None:
return None
return xmlAttr(_obj=ret)
elif attr == "children":
ret = libxml2mod.children(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
elif attr == "last":
ret = libxml2mod.last(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
elif attr == "next":
ret = libxml2mod.next(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
elif attr == "prev":
ret = libxml2mod.prev(self._o)
if ret == None:
return None
return xmlNode(_obj=ret)
elif attr == "content":
return libxml2mod.xmlNodeGetContent(self._o)
elif attr == "name":
return libxml2mod.name(self._o)
elif attr == "type":
return libxml2mod.type(self._o)
elif attr == "doc":
ret = libxml2mod.doc(self._o)
if ret == None:
if self.type == "document_xml" or self.type == "document_html":
return xmlDoc(_obj=self._o)
else:
return None
return xmlDoc(_obj=ret)
raise AttributeError,attr
else:
parent = property(get_parent, None, None, "Parent node")
children = property(get_children, None, None, "First child node")
last = property(get_last, None, None, "Last sibling node")
next = property(get_next, None, None, "Next sibling node")
prev = property(get_prev, None, None, "Previous sibling node")
properties = property(get_properties, None, None, "List of properies")
content = property(get_content, None, None, "Content of this node")
name = property(get_name, None, None, "Node name")
type = property(get_type, None, None, "Node type")
doc = property(get_doc, None, None, "The document this node belongs to")
#
# Serialization routines, the optional arguments have the following
# meaning:
# encoding: string to ask saving in a specific encoding
# indent: if 1 the serializer is asked to indent the output
#
def serialize(self, encoding = None, format = 0):
return libxml2mod.serializeNode(self._o, encoding, format)
def saveTo(self, file, encoding = None, format = 0):
return libxml2mod.saveNodeTo(self._o, file, encoding, format)
#
# Canonicalization routines:
#
# nodes: the node set (tuple or list) to be included in the
# canonized image or None if all document nodes should be
# included.
# exclusive: the exclusive flag (0 - non-exclusive
# canonicalization; otherwise - exclusive canonicalization)
# prefixes: the list of inclusive namespace prefixes (strings),
# or None if there is no inclusive namespaces (only for
# exclusive canonicalization, ignored otherwise)
# with_comments: include comments in the result (!=0) or not
# (==0)
def c14nMemory(self,
nodes=None,
exclusive=0,
prefixes=None,
with_comments=0):
if nodes:
nodes = map(lambda n: n._o, nodes)
return libxml2mod.xmlC14NDocDumpMemory(
self.get_doc()._o,
nodes,
exclusive != 0,
prefixes,
with_comments != 0)
def c14nSaveTo(self,
file,
nodes=None,
exclusive=0,
prefixes=None,
with_comments=0):
if nodes:
nodes = map(lambda n: n._o, nodes)
return libxml2mod.xmlC14NDocSaveTo(
self.get_doc()._o,
nodes,
exclusive != 0,
prefixes,
with_comments != 0,
file)
#
# Selecting nodes using XPath, a bit slow because the context
# is allocated/freed every time but convenient.
#
def xpathEval(self, expr):
doc = self.doc
if doc == None:
return None
ctxt = doc.xpathNewContext()
ctxt.setContextNode(self)
res = ctxt.xpathEval(expr)
ctxt.xpathFreeContext()
return res
# #
# # Selecting nodes using XPath, faster because the context
# # is allocated just once per xmlDoc.
# #
# # Removed: DV memleaks c.f. #126735
# #
# def xpathEval2(self, expr):
# doc = self.doc
# if doc == None:
# return None
# try:
# doc._ctxt.setContextNode(self)
# except:
# doc._ctxt = doc.xpathNewContext()
# doc._ctxt.setContextNode(self)
# res = doc._ctxt.xpathEval(expr)
# return res
def xpathEval2(self, expr):
return self.xpathEval(expr)
# Remove namespaces
def removeNsDef(self, href):
"""
Remove a namespace definition from a node. If href is None,
remove all of the ns definitions on that node. The removed
namespaces are returned as a linked list.
Note: If any child nodes referred to the removed namespaces,
they will be left with dangling links. You should call
renciliateNs() to fix those pointers.
Note: This method does not free memory taken by the ns
definitions. You will need to free it manually with the
freeNsList() method on the returns xmlNs object.
"""
ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href)
if ret is None:return None
__tmp = xmlNs(_obj=ret)
return __tmp
# support for python2 iterators
def walk_depth_first(self):
return xmlCoreDepthFirstItertor(self)
def walk_breadth_first(self):
return xmlCoreBreadthFirstItertor(self)
__iter__ = walk_depth_first
def free(self):
try:
self.doc._ctxt.xpathFreeContext()
except:
pass
libxml2mod.xmlFreeDoc(self._o)
#
# implements the depth-first iterator for libxml2 DOM tree
#
class xmlCoreDepthFirstItertor:
def __init__(self, node):
self.node = node
self.parents = []
def __iter__(self):
return self
def next(self):
while 1:
if self.node:
ret = self.node
self.parents.append(self.node)
self.node = self.node.children
return ret
try:
parent = self.parents.pop()
except IndexError:
raise StopIteration
self.node = parent.next
#
# implements the breadth-first iterator for libxml2 DOM tree
#
class xmlCoreBreadthFirstItertor:
def __init__(self, node):
self.node = node
self.parents = []
def __iter__(self):
return self
def next(self):
while 1:
if self.node:
ret = self.node
self.parents.append(self.node)
self.node = self.node.next
return ret
try:
parent = self.parents.pop()
except IndexError:
raise StopIteration
self.node = parent.children
#
# converters to present a nicer view of the XPath returns
#
def nodeWrap(o):
# TODO try to cast to the most appropriate node class
name = libxml2mod.type(o)
if name == "element" or name == "text":
return xmlNode(_obj=o)
if name == "attribute":
return xmlAttr(_obj=o)
if name[0:8] == "document":
return xmlDoc(_obj=o)
if name == "namespace":
return xmlNs(_obj=o)
if name == "elem_decl":
return xmlElement(_obj=o)
if name == "attribute_decl":
return xmlAttribute(_obj=o)
if name == "entity_decl":
return xmlEntity(_obj=o)
if name == "dtd":
return xmlDtd(_obj=o)
return xmlNode(_obj=o)
def xpathObjectRet(o):
if type(o) == type([]) or type(o) == type(()):
ret = map(lambda x: nodeWrap(x), o)
return ret
return o
#
# register an XPath function
#
def registerXPathFunction(ctxt, name, ns_uri, f):
ret = libxml2mod.xmlRegisterXPathFunction(ctxt, name, ns_uri, f)
#
# For the xmlTextReader parser configuration
#
PARSER_LOADDTD=1
PARSER_DEFAULTATTRS=2
PARSER_VALIDATE=3
PARSER_SUBST_ENTITIES=4
#
# For the error callback severities
#
PARSER_SEVERITY_VALIDITY_WARNING=1
PARSER_SEVERITY_VALIDITY_ERROR=2
PARSER_SEVERITY_WARNING=3
PARSER_SEVERITY_ERROR=4
#
# register the libxml2 error handler
#
def registerErrorHandler(f, ctx):
"""Register a Python written function to for error reporting.
The function is called back as f(ctx, error). """
import sys
if not sys.modules.has_key('libxslt'):
# normal behaviour when libxslt is not imported
ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)
else:
# when libxslt is already imported, one must
# use libxst's error handler instead
import libxslt
ret = libxslt.registerErrorHandler(f,ctx)
return ret
class parserCtxtCore:
def __init__(self, _obj=None):
if _obj != None:
self._o = _obj;
return
self._o = None
def __del__(self):
if self._o != None:
libxml2mod.xmlFreeParserCtxt(self._o)
self._o = None
def setErrorHandler(self,f,arg):
"""Register an error handler that will be called back as
f(arg,msg,severity,reserved).
@reserved is currently always None."""
libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg)
def getErrorHandler(self):
"""Return (f,arg) as previously registered with setErrorHandler
or (None,None)."""
return libxml2mod.xmlParserCtxtGetErrorHandler(self._o)
def addLocalCatalog(self, uri):
"""Register a local catalog with the parser"""
return libxml2mod.addLocalCatalog(self._o, uri)
class ValidCtxtCore:
def __init__(self, *args, **kw):
pass
def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for DTD validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg)
class SchemaValidCtxtCore:
def __init__(self, *args, **kw):
pass
def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for Schema validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg)
class relaxNgValidCtxtCore:
def __init__(self, *args, **kw):
pass
def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for RelaxNG validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg)
def _xmlTextReaderErrorFunc((f,arg),msg,severity,locator):
"""Intermediate callback to wrap the locator"""
return f(arg,msg,severity,xmlTextReaderLocator(locator))
class xmlTextReaderCore:
def __init__(self, _obj=None):
self.input = None
if _obj != None:self._o = _obj;return
self._o = None
def __del__(self):
if self._o != None:
libxml2mod.xmlFreeTextReader(self._o)
self._o = None
def SetErrorHandler(self,f,arg):
"""Register an error handler that will be called back as
f(arg,msg,severity,locator)."""
if f is None:
libxml2mod.xmlTextReaderSetErrorHandler(\
self._o,None,None)
else:
libxml2mod.xmlTextReaderSetErrorHandler(\
self._o,_xmlTextReaderErrorFunc,(f,arg))
def GetErrorHandler(self):
"""Return (f,arg) as previously registered with setErrorHandler
or (None,None)."""
f,arg = libxml2mod.xmlTextReaderGetErrorHandler(self._o)
if f is None:
return None,None
else:
# assert f is _xmlTextReaderErrorFunc
return arg
#
# The cleanup now goes though a wrappe in libxml.c
#
def cleanupParser():
libxml2mod.xmlPythonCleanupParser()
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
#
# Everything before this line comes from libxml.py
# Everything after this line is automatically generated
#
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
File diff suppressed because it is too large Load Diff
@@ -1,330 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<api name='libxml2-python'>
<symbols>
<function name='xmlRegisterXPathFunction' file='python'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Register a Python written function to the XPath interpreter</info>
<return type='int' info="1 in case of success, 0 or -1 in case of error"/>
<arg name='ctx' type='xmlXPathContextPtr' info='the xpathContext'/>
<arg name='name' type='xmlChar *' info='the function name'/>
<arg name='ns_uri' type='xmlChar *' info='the namespace or NULL'/>
<arg name='f' type='pythonObject' info='the python function'/>
</function>
<function name='xmlNewNode' file='python'>
<info>Create a new Node</info>
<return type='xmlNodePtr' info="A new element node"/>
<arg name='name' type='xmlChar *' info='the node name'/>
</function>
<function name='xmlCreatePushParser' file='python'>
<info>Create a progressive XML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
<return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
<arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
<arg name='chunk' type='xmlChar *' info='the initial data'/>
<arg name='size' type='int' info='the size of the initial data'/>
<arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
</function>
<function name='htmlCreatePushParser' file='python'>
<cond>defined(LIBXML_HTML_ENABLED)</cond>
<info>Create a progressive HTML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
<return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
<arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
<arg name='chunk' type='xmlChar *' info='the initial data'/>
<arg name='size' type='int' info='the size of the initial data'/>
<arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
</function>
<function name='xmlSAXParseFile' file='python'>
<info>Interface to parse an XML file or resource pointed by an URI to build an event flow to the SAX object</info>
<return type='void'/>
<arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
<arg name='URI' type='xmlChar *' info='The URI of the resource'/>
<arg name='recover' type='int' info='allow recovery in case of error'/>
</function>
<function name='htmlSAXParseFile' file='python'>
<cond>defined(LIBXML_HTML_ENABLED)</cond>
<info>Interface to parse an HTML file or resource pointed by an URI to build an event flow to the SAX object</info>
<return type='void'/>
<arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
<arg name='URI' type='xmlChar *' info='The URI of the resource'/>
<arg name='encoding' type='const char *' info='encoding or None'/>
</function>
<function name='xmlCreateOutputBuffer' file='python'>
<info>Create a libxml2 output buffer from a Python file</info>
<return type='xmlOutputBufferPtr' info="the output buffer"/>
<arg name='file' type='pythonObject' info='the Python file'/>
<arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
</function>
<function name='xmlCreateInputBuffer' file='python'>
<info>Create a libxml2 input buffer from a Python file</info>
<return type='xmlParserInputBufferPtr' info="the input buffer"/>
<arg name='file' type='pythonObject' info='the Python file'/>
<arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
</function>
<function name='xmlSetEntityLoader' file='python'>
<info>Set the entity resolver as a python function</info>
<return type='int' info="0 in case of success, -1 for error"/>
<arg name='resolver' type='pythonObject' info='the Python function'/>
</function>
<!-- xmlParserCtxtPtr accessors -->
<function name='xmlParserGetDoc' file='python_accessor'>
<info>Get the document tree from a parser context.</info>
<return type='xmlDocPtr' info="the document tree" field="myDoc"/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
</function>
<function name='xmlParserGetWellFormed' file='python_accessor'>
<info>Get the well formed information from a parser context.</info>
<return type='int' info="the wellFormed field" field="wellFormed"/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
</function>
<function name='xmlParserGetIsValid' file='python_accessor'>
<info>Get the validity information from a parser context.</info>
<return type='int' info="the valid field" field="valid"/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
</function>
<function name='xmlParserSetValidate' file='python_accessor'>
<info>Switch the parser to validation mode.</info>
<return type='void'/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
<arg name='validate' type='int' info='1 to activate validation'/>
</function>
<function name='xmlParserSetReplaceEntities' file='python_accessor'>
<info>Switch the parser to replace entities.</info>
<return type='void'/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
<arg name='replaceEntities' type='int' info='1 to replace entities'/>
</function>
<function name='xmlParserSetPedantic' file='python_accessor'>
<info>Switch the parser to be pedantic.</info>
<return type='void'/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
<arg name='pedantic' type='int' info='1 to run in pedantic mode'/>
</function>
<function name='xmlParserSetLoadSubset' file='python_accessor'>
<info>Switch the parser to load the DTD without validating.</info>
<return type='void'/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
<arg name='loadsubset' type='int' info='1 to load the DTD'/>
</function>
<function name='xmlParserSetLineNumbers' file='python_accessor'>
<info>Switch on the generation of line number for elements nodes.</info>
<return type='void'/>
<arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
<arg name='linenumbers' type='int' info='1 to save line numbers'/>
</function>
<function name='xmlDebugMemory' file='python'>
<info>Switch on the generation of line number for elements nodes. Also returns the number of bytes allocated and not freed by libxml2 since memory debugging was switched on.</info>
<return type='int' info="returns the number of bytes allocated and not freed"/>
<arg name='activate' type='int' info='1 switch on memory debugging 0 switch it off'/>
</function>
<function name='xmlDumpMemory' file='python'>
<info>dump the memory allocated in the file .memdump</info>
<return type='void'/>
</function>
<!-- xmlNsPtr accessors -->
<function name='xmlNodeGetNs' file='python_accessor'>
<info>Get the namespace of a node</info>
<return type='xmlNsPtr' info="The namespace or None"/>
<arg name='node' type='xmlNodePtr' info='the node'/>
</function>
<function name='xmlNodeGetNsDefs' file='python_accessor'>
<info>Get the namespace of a node</info>
<return type='xmlNsPtr' info="The namespace or None"/>
<arg name='node' type='xmlNodePtr' info='the node'/>
</function>
<!-- xmlXPathContextPtr accessors -->
<function name='xmlXPathParserGetContext' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Get the xpathContext from an xpathParserContext</info>
<return type='xmlXPathContextPtr' info="The XPath context" field="context"/>
<arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath parser context'/>
</function>
<function name='xmlXPathGetContextDoc' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Get the doc from an xpathContext</info>
<return type='xmlDocPtr' info="The doc context" field="doc"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetContextNode' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Get the current node from an xpathContext</info>
<return type='xmlNodePtr' info="The node context" field="node"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathSetContextDoc' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Set the doc of an xpathContext</info>
<return type='void'/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
<arg name="doc" type='xmlDocPtr' info="The doc context"/>
</function>
<function name='xmlXPathSetContextNode' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Set the current node of an xpathContext</info>
<return type='void'/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
<arg name="node" type='xmlNodePtr' info="The node context"/>
</function>
<function name='xmlXPathGetContextPosition' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Get the current node from an xpathContext</info>
<return type='int' info="The node context" field="proximityPosition"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetContextSize' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Get the current node from an xpathContext</info>
<return type='int' info="The node context" field="contextSize"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetFunction' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Get the current function name xpathContext</info>
<return type='const xmlChar *' info="The function name" field="function"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetFunctionURI' file='python_accessor'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Get the current function name URI xpathContext</info>
<return type='const xmlChar *' info="The function name URI" field="functionURI"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<!-- xmlURIPtr accessors -->
<function name='xmlURIGetScheme' file='python_accessor'>
<info>Get the scheme part from an URI</info>
<return type='const char *' info="The URI scheme" field="scheme"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetScheme' file='python_accessor'>
<info>Set the scheme part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='scheme' type='char *' info='The URI scheme part'/>
</function>
<function name='xmlURIGetOpaque' file='python_accessor'>
<info>Get the opaque part from an URI</info>
<return type='const char *' info="The URI opaque" field="opaque"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetOpaque' file='python_accessor'>
<info>Set the opaque part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='opaque' type='char *' info='The URI opaque part'/>
</function>
<function name='xmlURIGetAuthority' file='python_accessor'>
<info>Get the authority part from an URI</info>
<return type='const char *' info="The URI authority" field="authority"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetAuthority' file='python_accessor'>
<info>Set the authority part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='authority' type='char *' info='The URI authority part'/>
</function>
<function name='xmlURIGetServer' file='python_accessor'>
<info>Get the server part from an URI</info>
<return type='const char *' info="The URI server" field="server"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetServer' file='python_accessor'>
<info>Set the server part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='server' type='char *' info='The URI server part'/>
</function>
<function name='xmlURIGetUser' file='python_accessor'>
<info>Get the user part from an URI</info>
<return type='const char *' info="The URI user" field="user"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetUser' file='python_accessor'>
<info>Set the user part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='user' type='char *' info='The URI user part'/>
</function>
<function name='xmlURIGetPath' file='python_accessor'>
<info>Get the path part from an URI</info>
<return type='const char *' info="The URI path" field="path"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetPath' file='python_accessor'>
<info>Set the path part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='path' type='char *' info='The URI path part'/>
</function>
<function name='xmlURIGetQuery' file='python_accessor'>
<info>Get the query part from an URI</info>
<return type='const char *' info="The URI query" field="query"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetQuery' file='python_accessor'>
<info>Set the query part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='query' type='char *' info='The URI query part'/>
</function>
<function name='xmlURIGetFragment' file='python_accessor'>
<info>Get the fragment part from an URI</info>
<return type='const char *' info="The URI fragment" field="fragment"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetFragment' file='python_accessor'>
<info>Set the fragment part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='fragment' type='char *' info='The URI fragment part'/>
</function>
<function name='xmlURIGetPort' file='python_accessor'>
<info>Get the port part from an URI</info>
<return type='int' info="The URI port" field="port"/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
</function>
<function name='xmlURISetPort' file='python_accessor'>
<info>Set the port part of an URI.</info>
<return type='void'/>
<arg name='URI' type='xmlURIPtr' info='the URI'/>
<arg name='port' type='int' info='The URI port part'/>
</function>
<!-- xmlErrorPtr accessors -->
<function name='xmlErrorGetDomain' file='python_accessor'>
<info>What part of the library raised this error</info>
<return type='int' info="The error domain" field="domain"/>
<arg name='Error' type='xmlErrorPtr' info='the Error'/>
</function>
<function name='xmlErrorGetCode' file='python_accessor'>
<info>The error code, e.g. an xmlParserError</info>
<return type='int' info="The error code" field="code"/>
<arg name='Error' type='xmlErrorPtr' info='the Error'/>
</function>
<function name='xmlErrorGetMessage' file='python_accessor'>
<info>human-readable informative error message</info>
<return type='const char *' info="The error message" field="message"/>
<arg name='Error' type='xmlErrorPtr' info='the Error'/>
</function>
<function name='xmlErrorGetLevel' file='python_accessor'>
<info>how consequent is the error</info>
<return type='int' info="The error level" field="level"/>
<arg name='Error' type='xmlErrorPtr' info='the Error'/>
</function>
<function name='xmlErrorGetFile' file='python_accessor'>
<info>the filename</info>
<return type='const char *' info="The error file" field="file"/>
<arg name='Error' type='xmlErrorPtr' info='the Error'/>
</function>
<function name='xmlErrorGetLine' file='python_accessor'>
<info>the line number if available</info>
<return type='int' info="The error line" field="line"/>
<arg name='Error' type='xmlErrorPtr' info='the Error'/>
</function>
<function name='xmlPythonCleanupParser' file='python'>
<info>Cleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it.</info>
<return type='void'/>
</function>
<function name='xmlMemoryUsed' file='python'>
<info>Returns the total amount of memory allocated by libxml2</info>
<return type='int' info='number of bytes allocated'/>
</function>
</symbols>
</api>
-245
View File
@@ -1,245 +0,0 @@
#include <Python.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/catalog.h>
#include <libxml/threads.h>
#include <libxml/nanoftp.h>
#include <libxml/nanohttp.h>
#include <libxml/uri.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/debugXML.h>
#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
#include <libxml/xinclude.h>
#include <libxml/xpointer.h>
#include <libxml/xmlunicode.h>
#include <libxml/xmlregexp.h>
#include <libxml/xmlautomata.h>
#include <libxml/xmlreader.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/relaxng.h>
#include <libxml/xmlschemas.h>
#endif
/**
* ATTRIBUTE_UNUSED:
*
* Macro used to signal to GCC unused function parameters
* Repeated here since the definition is not available when
* compiled outside the libxml2 build tree.
*/
#ifdef __GNUC__
#ifdef ATTRIBUTE_UNUSED
#undef ATTRIBUTE_UNUSED
#endif
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif /* ATTRIBUTE_UNUSED */
#else
#define ATTRIBUTE_UNUSED
#endif
#define PyxmlNode_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlNode_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlNodePtr obj;
} PyxmlNode_Object;
#define PyxmlXPathContext_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlXPathContext_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlXPathContextPtr obj;
} PyxmlXPathContext_Object;
#define PyxmlXPathParserContext_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlXPathParserContext_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlXPathParserContextPtr obj;
} PyxmlXPathParserContext_Object;
#define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \
(((PyparserCtxt_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlParserCtxtPtr obj;
} PyparserCtxt_Object;
#define PyValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
(((PyValidCtxt_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlValidCtxtPtr obj;
} PyValidCtxt_Object;
#define Pycatalog_Get(v) (((v) == Py_None) ? NULL : \
(((Pycatalog_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlCatalogPtr obj;
} Pycatalog_Object;
#ifdef LIBXML_REGEXP_ENABLED
#define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlReg_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlRegexpPtr obj;
} PyxmlReg_Object;
#endif /* LIBXML_REGEXP_ENABLED */
#define PyxmlTextReader_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlTextReader_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlTextReaderPtr obj;
} PyxmlTextReader_Object;
#define PyxmlTextReaderLocator_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlTextReaderLocator_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlTextReaderLocatorPtr obj;
} PyxmlTextReaderLocator_Object;
#define PyURI_Get(v) (((v) == Py_None) ? NULL : \
(((PyURI_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlErrorPtr obj;
} PyError_Object;
#define PyError_Get(v) (((v) == Py_None) ? NULL : \
(((PyError_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlOutputBufferPtr obj;
} PyoutputBuffer_Object;
#define PyoutputBuffer_Get(v) (((v) == Py_None) ? NULL : \
(((PyoutputBuffer_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlParserInputBufferPtr obj;
} PyinputBuffer_Object;
#define PyinputBuffer_Get(v) (((v) == Py_None) ? NULL : \
(((PyinputBuffer_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlURIPtr obj;
} PyURI_Object;
/* FILE * have their own internal representation */
#define PyFile_Get(v) (((v) == Py_None) ? NULL : \
(PyFile_Check(v) ? (PyFile_AsFile(v)) : stdout))
#ifdef LIBXML_SCHEMAS_ENABLED
typedef struct {
PyObject_HEAD
xmlRelaxNGPtr obj;
} PyrelaxNgSchema_Object;
#define PyrelaxNgSchema_Get(v) (((v) == Py_None) ? NULL : \
(((PyrelaxNgSchema_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlRelaxNGParserCtxtPtr obj;
} PyrelaxNgParserCtxt_Object;
#define PyrelaxNgParserCtxt_Get(v) (((v) == Py_None) ? NULL : \
(((PyrelaxNgParserCtxt_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlRelaxNGValidCtxtPtr obj;
} PyrelaxNgValidCtxt_Object;
#define PyrelaxNgValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
(((PyrelaxNgValidCtxt_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlSchemaPtr obj;
} PySchema_Object;
#define PySchema_Get(v) (((v) == Py_None) ? NULL : \
(((PySchema_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlSchemaParserCtxtPtr obj;
} PySchemaParserCtxt_Object;
#define PySchemaParserCtxt_Get(v) (((v) == Py_None) ? NULL : \
(((PySchemaParserCtxt_Object *)(v))->obj))
typedef struct {
PyObject_HEAD
xmlSchemaValidCtxtPtr obj;
} PySchemaValidCtxt_Object;
#define PySchemaValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
(((PySchemaValidCtxt_Object *)(v))->obj))
#endif /* LIBXML_SCHEMAS_ENABLED */
PyObject * libxml_intWrap(int val);
PyObject * libxml_longWrap(long val);
PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
PyObject * libxml_constxmlCharPtrWrap(const xmlChar *str);
PyObject * libxml_charPtrWrap(char *str);
PyObject * libxml_constcharPtrWrap(const char *str);
PyObject * libxml_charPtrConstWrap(const char *str);
PyObject * libxml_xmlCharPtrConstWrap(const xmlChar *str);
PyObject * libxml_xmlDocPtrWrap(xmlDocPtr doc);
PyObject * libxml_xmlNodePtrWrap(xmlNodePtr node);
PyObject * libxml_xmlAttrPtrWrap(xmlAttrPtr attr);
PyObject * libxml_xmlNsPtrWrap(xmlNsPtr ns);
PyObject * libxml_xmlAttributePtrWrap(xmlAttributePtr ns);
PyObject * libxml_xmlElementPtrWrap(xmlElementPtr ns);
PyObject * libxml_doubleWrap(double val);
PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt);
PyObject * libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt);
PyObject * libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt);
PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj);
PyObject * libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid);
PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj);
PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri);
PyObject * libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer);
PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer);
#ifdef LIBXML_REGEXP_ENABLED
PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp);
#endif /* LIBXML_REGEXP_ENABLED */
PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader);
PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator);
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
#ifdef LIBXML_SCHEMAS_ENABLED
PyObject * libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt);
PyObject * libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt);
PyObject * libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid);
PyObject * libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt);
PyObject * libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt);
PyObject * libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid);
#endif /* LIBXML_SCHEMAS_ENABLED */
PyObject * libxml_xmlErrorPtrWrap(xmlErrorPtr error);
PyObject * libxml_xmlSchemaSetValidErrors(PyObject * self, PyObject * args);
-242
View File
@@ -1,242 +0,0 @@
#!/usr/bin/python -u
#
# Setup script for libxml2 and libxslt if found
#
import sys, os
from distutils.core import setup, Extension
# Below ROOT, we expect to find include, include/libxml2, lib and bin.
# On *nix, it is not needed (but should not harm),
# on Windows, it is set by configure.js.
ROOT = r'/usr'
# Thread-enabled libxml2
with_threads = 1
# If this flag is set (windows only),
# a private copy of the dlls are included in the package.
# If this flag is not set, the libxml2 and libxslt
# dlls must be found somewhere in the PATH at runtime.
WITHDLLS = 1 and sys.platform.startswith('win')
def missing(file):
if os.access(file, os.R_OK) == 0:
return 1
return 0
try:
HOME = os.environ['HOME']
except:
HOME="C:"
if WITHDLLS:
# libxml dlls (expected in ROOT/bin)
dlls = [ 'iconv.dll','libxml2.dll','libxslt.dll','libexslt.dll' ]
dlls = map(lambda dll: os.path.join(ROOT,'bin',dll),dlls)
# create __init__.py for the libxmlmods package
if not os.path.exists("libxmlmods"):
os.mkdir("libxmlmods")
open("libxmlmods/__init__.py","w").close()
def altImport(s):
s = s.replace("import libxml2mod","from libxmlmods import libxml2mod")
s = s.replace("import libxsltmod","from libxmlmods import libxsltmod")
return s
if sys.platform.startswith('win'):
libraryPrefix = 'lib'
platformLibs = []
else:
libraryPrefix = ''
platformLibs = ["m","z"]
# those are examined to find
# - libxml2/libxml/tree.h
# - iconv.h
# - libxslt/xsltconfig.h
includes_dir = [
"/usr/include",
"/usr/local/include",
"/opt/include",
os.path.join(ROOT,'include'),
HOME
];
xml_includes=""
for dir in includes_dir:
if not missing(dir + "/libxml2/libxml/tree.h"):
xml_includes=dir + "/libxml2"
break;
if xml_includes == "":
print "failed to find headers for libxml2: update includes_dir"
sys.exit(1)
iconv_includes=""
for dir in includes_dir:
if not missing(dir + "/iconv.h"):
iconv_includes=dir
break;
if iconv_includes == "":
print "failed to find headers for libiconv: update includes_dir"
sys.exit(1)
# those are added in the linker search path for libraries
libdirs = [
os.path.join(ROOT,'lib'),
]
xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
"libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
"xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
xslt_files = ["libxslt-api.xml", "libxslt-python-api.xml",
"libxslt.c", "libxsl.py", "libxslt_wrap.h",
"xsltgenerator.py"]
if missing("libxml2-py.c") or missing("libxml2.py"):
try:
try:
import xmlgenerator
except:
import generator
except:
print "failed to find and generate stubs for libxml2, aborting ..."
print sys.exc_type, sys.exc_value
sys.exit(1)
head = open("libxml.py", "r")
generated = open("libxml2class.py", "r")
result = open("libxml2.py", "w")
for line in head.readlines():
if WITHDLLS:
result.write(altImport(line))
else:
result.write(line)
for line in generated.readlines():
result.write(line)
head.close()
generated.close()
result.close()
with_xslt=0
if missing("libxslt-py.c") or missing("libxslt.py"):
if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
print "libxslt stub generator not found, libxslt not built"
else:
try:
import xsltgenerator
except:
print "failed to generate stubs for libxslt, aborting ..."
print sys.exc_type, sys.exc_value
else:
head = open("libxsl.py", "r")
generated = open("libxsltclass.py", "r")
result = open("libxslt.py", "w")
for line in head.readlines():
if WITHDLLS:
result.write(altImport(line))
else:
result.write(line)
for line in generated.readlines():
result.write(line)
head.close()
generated.close()
result.close()
with_xslt=1
else:
with_xslt=1
if with_xslt == 1:
xslt_includes=""
for dir in includes_dir:
if not missing(dir + "/libxslt/xsltconfig.h"):
xslt_includes=dir + "/libxslt"
break;
if xslt_includes == "":
print "failed to find headers for libxslt: update includes_dir"
with_xslt = 0
descr = "libxml2 package"
modules = [ 'libxml2', 'drv_libxml2' ]
if WITHDLLS:
modules.append('libxmlmods.__init__')
c_files = ['libxml2-py.c', 'libxml.c', 'types.c' ]
includes= [xml_includes, iconv_includes]
libs = [libraryPrefix + "xml2"] + platformLibs
macros = []
if with_threads:
macros.append(('_REENTRANT','1'))
if with_xslt == 1:
descr = "libxml2 and libxslt package"
if not sys.platform.startswith('win'):
#
# We are gonna build 2 identical shared libs with merge initializing
# both libxml2mod and libxsltmod
#
c_files = c_files + ['libxslt-py.c', 'libxslt.c']
xslt_c_files = c_files
macros.append(('MERGED_MODULES', '1'))
else:
#
# On windows the MERGED_MODULE option is not needed
# (and does not work)
#
xslt_c_files = ['libxslt-py.c', 'libxslt.c', 'types.c']
libs.insert(0, libraryPrefix + 'exslt')
libs.insert(0, libraryPrefix + 'xslt')
includes.append(xslt_includes)
modules.append('libxslt')
extens=[Extension('libxml2mod', c_files, include_dirs=includes,
library_dirs=libdirs,
libraries=libs, define_macros=macros)]
if with_xslt == 1:
extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes,
library_dirs=libdirs,
libraries=libs, define_macros=macros))
if missing("MANIFEST"):
manifest = open("MANIFEST", "w")
manifest.write("setup.py\n")
for file in xml_files:
manifest.write(file + "\n")
if with_xslt == 1:
for file in xslt_files:
manifest.write(file + "\n")
manifest.close()
if WITHDLLS:
ext_package = "libxmlmods"
if sys.version >= "2.2":
base = "lib/site-packages/"
else:
base = ""
data_files = [(base+"libxmlmods",dlls)]
else:
ext_package = None
data_files = []
setup (name = "libxml2-python",
# On *nix, the version number is created from setup.py.in
# On windows, it is set by configure.js
version = "2.6.20",
description = descr,
author = "Daniel Veillard",
author_email = "[email protected]",
url = "http://xmlsoft.org/python.html",
licence="MIT Licence",
py_modules=modules,
ext_modules=extens,
ext_package=ext_package,
data_files=data_files,
)
sys.exit(0)
-242
View File
@@ -1,242 +0,0 @@
#!/usr/bin/python -u
#
# Setup script for libxml2 and libxslt if found
#
import sys, os
from distutils.core import setup, Extension
# Below ROOT, we expect to find include, include/libxml2, lib and bin.
# On *nix, it is not needed (but should not harm),
# on Windows, it is set by configure.js.
ROOT = r'@prefix@'
# Thread-enabled libxml2
with_threads = @WITH_THREADS@
# If this flag is set (windows only),
# a private copy of the dlls are included in the package.
# If this flag is not set, the libxml2 and libxslt
# dlls must be found somewhere in the PATH at runtime.
WITHDLLS = 1 and sys.platform.startswith('win')
def missing(file):
if os.access(file, os.R_OK) == 0:
return 1
return 0
try:
HOME = os.environ['HOME']
except:
HOME="C:"
if WITHDLLS:
# libxml dlls (expected in ROOT/bin)
dlls = [ 'iconv.dll','libxml2.dll','libxslt.dll','libexslt.dll' ]
dlls = map(lambda dll: os.path.join(ROOT,'bin',dll),dlls)
# create __init__.py for the libxmlmods package
if not os.path.exists("libxmlmods"):
os.mkdir("libxmlmods")
open("libxmlmods/__init__.py","w").close()
def altImport(s):
s = s.replace("import libxml2mod","from libxmlmods import libxml2mod")
s = s.replace("import libxsltmod","from libxmlmods import libxsltmod")
return s
if sys.platform.startswith('win'):
libraryPrefix = 'lib'
platformLibs = []
else:
libraryPrefix = ''
platformLibs = ["m","z"]
# those are examined to find
# - libxml2/libxml/tree.h
# - iconv.h
# - libxslt/xsltconfig.h
includes_dir = [
"/usr/include",
"/usr/local/include",
"/opt/include",
os.path.join(ROOT,'include'),
HOME
];
xml_includes=""
for dir in includes_dir:
if not missing(dir + "/libxml2/libxml/tree.h"):
xml_includes=dir + "/libxml2"
break;
if xml_includes == "":
print "failed to find headers for libxml2: update includes_dir"
sys.exit(1)
iconv_includes=""
for dir in includes_dir:
if not missing(dir + "/iconv.h"):
iconv_includes=dir
break;
if iconv_includes == "":
print "failed to find headers for libiconv: update includes_dir"
sys.exit(1)
# those are added in the linker search path for libraries
libdirs = [
os.path.join(ROOT,'lib'),
]
xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
"libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
"xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
xslt_files = ["libxslt-api.xml", "libxslt-python-api.xml",
"libxslt.c", "libxsl.py", "libxslt_wrap.h",
"xsltgenerator.py"]
if missing("libxml2-py.c") or missing("libxml2.py"):
try:
try:
import xmlgenerator
except:
import generator
except:
print "failed to find and generate stubs for libxml2, aborting ..."
print sys.exc_type, sys.exc_value
sys.exit(1)
head = open("libxml.py", "r")
generated = open("libxml2class.py", "r")
result = open("libxml2.py", "w")
for line in head.readlines():
if WITHDLLS:
result.write(altImport(line))
else:
result.write(line)
for line in generated.readlines():
result.write(line)
head.close()
generated.close()
result.close()
with_xslt=0
if missing("libxslt-py.c") or missing("libxslt.py"):
if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
print "libxslt stub generator not found, libxslt not built"
else:
try:
import xsltgenerator
except:
print "failed to generate stubs for libxslt, aborting ..."
print sys.exc_type, sys.exc_value
else:
head = open("libxsl.py", "r")
generated = open("libxsltclass.py", "r")
result = open("libxslt.py", "w")
for line in head.readlines():
if WITHDLLS:
result.write(altImport(line))
else:
result.write(line)
for line in generated.readlines():
result.write(line)
head.close()
generated.close()
result.close()
with_xslt=1
else:
with_xslt=1
if with_xslt == 1:
xslt_includes=""
for dir in includes_dir:
if not missing(dir + "/libxslt/xsltconfig.h"):
xslt_includes=dir + "/libxslt"
break;
if xslt_includes == "":
print "failed to find headers for libxslt: update includes_dir"
with_xslt = 0
descr = "libxml2 package"
modules = [ 'libxml2', 'drv_libxml2' ]
if WITHDLLS:
modules.append('libxmlmods.__init__')
c_files = ['libxml2-py.c', 'libxml.c', 'types.c' ]
includes= [xml_includes, iconv_includes]
libs = [libraryPrefix + "xml2"] + platformLibs
macros = []
if with_threads:
macros.append(('_REENTRANT','1'))
if with_xslt == 1:
descr = "libxml2 and libxslt package"
if not sys.platform.startswith('win'):
#
# We are gonna build 2 identical shared libs with merge initializing
# both libxml2mod and libxsltmod
#
c_files = c_files + ['libxslt-py.c', 'libxslt.c']
xslt_c_files = c_files
macros.append(('MERGED_MODULES', '1'))
else:
#
# On windows the MERGED_MODULE option is not needed
# (and does not work)
#
xslt_c_files = ['libxslt-py.c', 'libxslt.c', 'types.c']
libs.insert(0, libraryPrefix + 'exslt')
libs.insert(0, libraryPrefix + 'xslt')
includes.append(xslt_includes)
modules.append('libxslt')
extens=[Extension('libxml2mod', c_files, include_dirs=includes,
library_dirs=libdirs,
libraries=libs, define_macros=macros)]
if with_xslt == 1:
extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes,
library_dirs=libdirs,
libraries=libs, define_macros=macros))
if missing("MANIFEST"):
manifest = open("MANIFEST", "w")
manifest.write("setup.py\n")
for file in xml_files:
manifest.write(file + "\n")
if with_xslt == 1:
for file in xslt_files:
manifest.write(file + "\n")
manifest.close()
if WITHDLLS:
ext_package = "libxmlmods"
if sys.version >= "2.2":
base = "lib/site-packages/"
else:
base = ""
data_files = [(base+"libxmlmods",dlls)]
else:
ext_package = None
data_files = []
setup (name = "libxml2-python",
# On *nix, the version number is created from setup.py.in
# On windows, it is set by configure.js
version = "@LIBXML_VERSION@",
description = descr,
author = "Daniel Veillard",
author_email = "[email protected]",
url = "http://xmlsoft.org/python.html",
licence="MIT Licence",
py_modules=modules,
ext_modules=extens,
ext_package=ext_package,
data_files=data_files,
)
sys.exit(0)
@@ -1,78 +0,0 @@
EXAMPLE_DIR = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
PYTESTS= \
build.py \
attribs.py \
tst.py \
tstxpath.py \
xpathext.py \
push.py \
pushSAX.py \
pushSAXhtml.py \
error.py \
serialize.py\
validate.py \
tstURI.py \
cutnpaste.py\
xpathret.py \
xpath.py \
outbuf.py \
inbuf.py \
resolver.py \
regexp.py \
reader.py \
reader2.py \
reader3.py \
reader4.py \
reader5.py \
reader6.py \
reader7.py \
reader8.py \
readernext.py \
walker.py \
nsdel.py \
ctxterror.py\
readererr.py\
relaxng.py \
schema.py \
thread2.py \
sync.py \
tstLastError.py \
indexes.py \
dtdvalid.py \
tstmem.py \
validDTD.py \
validSchemas.py \
validRNG.py
XMLS= \
tst.xml \
valid.xml \
invalid.xml \
test.dtd
EXTRA_DIST = $(PYTESTS) $(XMLS)
if WITH_PYTHON
tests: $(PYTESTS)
@echo "## running Python regression tests"
-@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
export PYTHONPATH; \
LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
export LD_LIBRARY_PATH; \
for test in $(PYTESTS) ; \
do log=`$(PYTHON) $(srcdir)/$$test` ; \
if [ "`echo $$log | grep OK`" = "" ] ; then \
echo "-- $$test" ; echo "$$log" ; fi ; done)
else
tests:
endif
clean:
rm -f *.pyc core
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
-(for test in $(PYTESTS) $(XMLS); \
do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
@@ -1,492 +0,0 @@
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = python/tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
C14N_OBJ = @C14N_OBJ@
CATALOG_OBJ = @CATALOG_OBJ@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
DEBUG_OBJ = @DEBUG_OBJ@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DOCB_OBJ = @DOCB_OBJ@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FTP_OBJ = @FTP_OBJ@
HAVE_ISINF = @HAVE_ISINF@
HAVE_ISNAN = @HAVE_ISNAN@
HTML_DIR = @HTML_DIR@
HTML_OBJ = @HTML_OBJ@
HTTP_OBJ = @HTTP_OBJ@
ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
LIBXML_VERSION = @LIBXML_VERSION@
LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MODULE_EXTENSION = @MODULE_EXTENSION@
MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
MV = @MV@
M_LIBS = @M_LIBS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PYTHON = @PYTHON@
PYTHON_INCLUDES = @PYTHON_INCLUDES@
PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
PYTHON_SUBDIR = @PYTHON_SUBDIR@
PYTHON_TESTS = @PYTHON_TESTS@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RDL_LIBS = @RDL_LIBS@
READER_TEST = @READER_TEST@
RELDATE = @RELDATE@
RM = @RM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_BINARIES = @STATIC_BINARIES@
STRIP = @STRIP@
TAR = @TAR@
TEST_C14N = @TEST_C14N@
TEST_CATALOG = @TEST_CATALOG@
TEST_DEBUG = @TEST_DEBUG@
TEST_HTML = @TEST_HTML@
TEST_MODULES = @TEST_MODULES@
TEST_PATTERN = @TEST_PATTERN@
TEST_PHTML = @TEST_PHTML@
TEST_PUSH = @TEST_PUSH@
TEST_REGEXPS = @TEST_REGEXPS@
TEST_SAX = @TEST_SAX@
TEST_SCHEMAS = @TEST_SCHEMAS@
TEST_THREADS = @TEST_THREADS@
TEST_VALID = @TEST_VALID@
TEST_VTIME = @TEST_VTIME@
TEST_XINCLUDE = @TEST_XINCLUDE@
TEST_XPATH = @TEST_XPATH@
TEST_XPTR = @TEST_XPTR@
THREADS_W32 = @THREADS_W32@
THREAD_CFLAGS = @THREAD_CFLAGS@
THREAD_LIBS = @THREAD_LIBS@
U = @U@
VERSION = @VERSION@
WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
WITH_C14N = @WITH_C14N@
WITH_CATALOG = @WITH_CATALOG@
WITH_DEBUG = @WITH_DEBUG@
WITH_DOCB = @WITH_DOCB@
WITH_FTP = @WITH_FTP@
WITH_HTML = @WITH_HTML@
WITH_HTTP = @WITH_HTTP@
WITH_ICONV = @WITH_ICONV@
WITH_ISO8859X = @WITH_ISO8859X@
WITH_LEGACY = @WITH_LEGACY@
WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
WITH_MODULES = @WITH_MODULES@
WITH_OUTPUT = @WITH_OUTPUT@
WITH_PATTERN = @WITH_PATTERN@
WITH_PUSH = @WITH_PUSH@
WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
WITH_READER = @WITH_READER@
WITH_REGEXPS = @WITH_REGEXPS@
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
WITH_SAX1 = @WITH_SAX1@
WITH_SCHEMAS = @WITH_SCHEMAS@
WITH_THREADS = @WITH_THREADS@
WITH_TREE = @WITH_TREE@
WITH_TRIO = @WITH_TRIO@
WITH_TRIO_SOURCES_FALSE = @WITH_TRIO_SOURCES_FALSE@
WITH_TRIO_SOURCES_TRUE = @WITH_TRIO_SOURCES_TRUE@
WITH_VALID = @WITH_VALID@
WITH_WRITER = @WITH_WRITER@
WITH_XINCLUDE = @WITH_XINCLUDE@
WITH_XPATH = @WITH_XPATH@
WITH_XPTR = @WITH_XPTR@
XINCLUDE_OBJ = @XINCLUDE_OBJ@
XMLLINT = @XMLLINT@
XML_CFLAGS = @XML_CFLAGS@
XML_INCLUDEDIR = @XML_INCLUDEDIR@
XML_LIBDIR = @XML_LIBDIR@
XML_LIBS = @XML_LIBS@
XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
XPATH_OBJ = @XPATH_OBJ@
XPTR_OBJ = @XPTR_OBJ@
XSLTPROC = @XSLTPROC@
Z_CFLAGS = @Z_CFLAGS@
Z_LIBS = @Z_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXAMPLE_DIR = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
PYTESTS = \
build.py \
attribs.py \
tst.py \
tstxpath.py \
xpathext.py \
push.py \
pushSAX.py \
pushSAXhtml.py \
error.py \
serialize.py\
validate.py \
tstURI.py \
cutnpaste.py\
xpathret.py \
xpath.py \
outbuf.py \
inbuf.py \
resolver.py \
regexp.py \
reader.py \
reader2.py \
reader3.py \
reader4.py \
reader5.py \
reader6.py \
reader7.py \
reader8.py \
readernext.py \
walker.py \
nsdel.py \
ctxterror.py\
readererr.py\
relaxng.py \
schema.py \
thread2.py \
sync.py \
tstLastError.py \
indexes.py \
dtdvalid.py \
tstmem.py \
validDTD.py \
validSchemas.py \
validRNG.py
XMLS = \
tst.xml \
valid.xml \
invalid.xml \
test.dtd
EXTRA_DIST = $(PYTESTS) $(XMLS)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/tests/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu python/tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am
@WITH_PYTHON_TRUE@tests: $(PYTESTS)
@WITH_PYTHON_TRUE@ @echo "## running Python regression tests"
@WITH_PYTHON_TRUE@ -@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
@WITH_PYTHON_TRUE@ export PYTHONPATH; \
@WITH_PYTHON_TRUE@ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
@WITH_PYTHON_TRUE@ export LD_LIBRARY_PATH; \
@WITH_PYTHON_TRUE@ for test in $(PYTESTS) ; \
@WITH_PYTHON_TRUE@ do log=`$(PYTHON) $(srcdir)/$$test` ; \
@WITH_PYTHON_TRUE@ if [ "`echo $$log | grep OK`" = "" ] ; then \
@WITH_PYTHON_TRUE@ echo "-- $$test" ; echo "$$log" ; fi ; done)
@WITH_PYTHON_FALSE@tests:
clean:
rm -f *.pyc core
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
-(for test in $(PYTESTS) $(XMLS); \
do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
@@ -1,34 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
#
# Testing XML document serialization
#
doc = libxml2.parseDoc(
"""<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE test [
<!ELEMENT test (#PCDATA) >
<!ATTLIST test xmlns:abc CDATA #FIXED "http://abc.org" >
<!ATTLIST test abc:attr CDATA #FIXED "def" >
]>
<test />
""")
elem = doc.getRootElement()
attr = elem.hasNsProp('attr', 'http://abc.org')
if attr == None or attr.serialize()[:-1] != """<!ATTLIST test abc:attr CDATA #FIXED "def">""":
print "Failed to find defaulted attribute abc:attr"
sys.exit(1)
doc.freeDoc()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-59
View File
@@ -1,59 +0,0 @@
#!/usr/bin/python -u
import libxml2
import sys
# Memory debug specific
libxml2.debugMemory(1)
doc = libxml2.newDoc("1.0")
comment = doc.newDocComment("This is a generated document")
doc.addChild(comment)
pi = libxml2.newPI("test", "PI content")
doc.addChild(pi)
root = doc.newChild(None, "doc", None)
ns = root.newNs("http://example.com/doc", "my")
root.setNs(ns)
elem = root.newChild(None, "foo", "bar")
elem.setBase("http://example.com/imgs")
elem.setProp("img", "image.gif")
doc.saveFile("tmp.xml")
doc.freeDoc()
doc = libxml2.parseFile("tmp.xml")
comment = doc.children
if comment.type != "comment" or \
comment.content != "This is a generated document":
print "error rereading comment"
sys.exit(1)
pi = comment.next
if pi.type != "pi" or pi.name != "test" or pi.content != "PI content":
print "error rereading PI"
sys.exit(1)
root = pi.next
if root.name != "doc":
print "error rereading root"
sys.exit(1)
ns = root.ns()
if ns.name != "my" or ns.content != "http://example.com/doc":
print "error rereading namespace"
sys.exit(1)
elem = root.children
if elem.name != "foo":
print "error rereading elem"
sys.exit(1)
if elem.getBase(None) != "http://example.com/imgs":
print "error rereading base"
sys.exit(1)
if elem.prop("img") != "image.gif":
print "error rereading property"
sys.exit(1)
doc.freeDoc()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,56 +0,0 @@
#!/usr/bin/python -u
#
# This test exercise the redirection of error messages with a
# functions defined in Python.
#
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
expect="""--> (3) xmlns: URI foo is not absolute
--> (4) Opening and ending tag mismatch: x line 0 and y
"""
err=""
def callback(arg,msg,severity,reserved):
global err
err = err + "%s (%d) %s" % (arg,severity,msg)
s = """<x xmlns="foo"></y>"""
parserCtxt = libxml2.createPushParser(None,"",0,"test.xml")
parserCtxt.setErrorHandler(callback, "-->")
if parserCtxt.getErrorHandler() != (callback,"-->"):
print "getErrorHandler failed"
sys.exit(1)
parserCtxt.parseChunk(s,len(s),1)
doc = parserCtxt.doc()
doc.freeDoc()
parserCtxt = None
if err != expect:
print "error"
print "received %s" %(err)
print "expected %s" %(expect)
sys.exit(1)
i = 10000
while i > 0:
parserCtxt = libxml2.createPushParser(None,"",0,"test.xml")
parserCtxt.setErrorHandler(callback, "-->")
parserCtxt.parseChunk(s,len(s),1)
doc = parserCtxt.doc()
doc.freeDoc()
parserCtxt = None
err = ""
i = i - 1
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,48 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
#
# Testing XML document serialization
#
source = libxml2.parseDoc("""<?xml version="1.0"?>
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<include xmlns="http://example.org/include">
<fragment><foo:elem bar="tricky"/></fragment>
</include>
</root>
""")
target = libxml2.parseDoc("""<?xml version="1.0"?>
<root xmlns:foobar="http://example.org/bar"/>""")
fragment = source.xpathEval("//*[name()='fragment']")[0]
dest = target.getRootElement()
# do a cut and paste operation
fragment.unlinkNode()
dest.addChild(fragment)
# do the namespace fixup
dest.reconciliateNs(target)
# The source tree can be freed at that point
source.freeDoc()
# check the resulting tree
str = dest.serialize()
if str != """<root xmlns:foobar="http://example.org/bar" xmlns:default="http://example.org/include" xmlns:foo="http://example.org/foo"><default:fragment><foo:elem bar="tricky"/></default:fragment></root>""":
print "reconciliateNs() failed"
sys.exit(1)
target.freeDoc()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,32 +0,0 @@
#!/usr/bin/python -u
import libxml2
import sys
# Memory debug specific
libxml2.debugMemory(1)
dtd="""<!ELEMENT foo EMPTY>"""
instance="""<?xml version="1.0"?>
<foo></foo>"""
dtd = libxml2.parseDTD(None, 'test.dtd')
ctxt = libxml2.newValidCtxt()
doc = libxml2.parseDoc(instance)
ret = doc.validateDtd(ctxt, dtd)
if ret != 1:
print "error doing DTD validation"
sys.exit(1)
doc.freeDoc()
dtd.freeDtd()
del dtd
del ctxt
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-51
View File
@@ -1,51 +0,0 @@
#!/usr/bin/python -u
#
# This test exercise the redirection of error messages with a
# functions defined in Python.
#
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
expect='--> I/O --> warning : --> failed to load external entity "missing.xml"\n'
err=""
def callback(ctx, str):
global err
err = err + "%s %s" % (ctx, str)
got_exc = 0
libxml2.registerErrorHandler(callback, "-->")
try:
doc = libxml2.parseFile("missing.xml")
except libxml2.parserError:
got_exc = 1
if got_exc == 0:
print "Failed to get a parser exception"
sys.exit(1)
if err != expect:
print "error"
print "received %s" %(err)
print "expected %s" %(expect)
sys.exit(1)
i = 10000
while i > 0:
try:
doc = libxml2.parseFile("missing.xml")
except libxml2.parserError:
got_exc = 1
err = ""
i = i - 1
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-25
View File
@@ -1,25 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
import StringIO
# Memory debug specific
libxml2.debugMemory(1)
i = 0
while i < 5000:
f = StringIO.StringIO("foobar")
buf = libxml2.inputBuffer(f)
i = i + 1
del f
del buf
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-113
View File
@@ -1,113 +0,0 @@
#!/usr/bin/python -u
# -*- coding: ISO-8859-1 -*-
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
ctxt = None
class callback:
def __init__(self, startd, starte, ende, delta, endd):
self.startd = startd
self.starte = starte
self.ende = ende
self.endd = endd
self.delta = delta
self.count = 0
def startDocument(self):
global ctxt
if ctxt.byteConsumed() != self.startd:
print "document start at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), self.startd)
sys.exit(1)
def endDocument(self):
global ctxt
expect = self.ende + self.delta * (self.count - 1) + self.endd
if ctxt.byteConsumed() != expect:
print "document end at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
def startElement(self, tag, attrs):
global ctxt
if tag == "bar1":
expect = self.starte + self.delta * self.count
if ctxt.byteConsumed() != expect:
print "element start at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
def endElement(self, tag):
global ctxt
if tag == "bar1":
expect = self.ende + self.delta * self.count
if ctxt.byteConsumed() != expect:
print "element end at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
self.count = self.count + 1
def characters(self, data):
pass
#
# First run a pure UTF-8 test
#
handler = callback(0, 13, 27, 198, 183)
ctxt = libxml2.createPushParser(handler, "<foo>\n", 6, "test.xml")
chunk = """ <bar1>chars1</bar1>
<bar2>chars2</bar2>
<bar3>chars3</bar3>
<bar4>chars4</bar4>
<bar5>chars5</bar5>
<bar6>&lt;s6</bar6>
<bar7>chars7</bar7>
<bar8>&#38;8</bar8>
<bar9>chars9</bar9>
"""
i = 0
while i < 10000:
ctxt.parseChunk(chunk, len(chunk), 0)
i = i + 1
chunk = "</foo>"
ctxt.parseChunk(chunk, len(chunk), 1)
ctxt=None
#
# Then run a test relying on ISO-Latin-1
#
handler = callback(43, 57, 71, 198, 183)
chunk="""<?xml version="1.0" encoding="ISO-8859-1"?>
<foo>
"""
ctxt = libxml2.createPushParser(handler, chunk, len(chunk), "test.xml")
chunk = """ <bar1>chars1</bar1>
<bar2>chars2</bar2>
<bar3>chars3</bar3>
<bar4>chàrs4</bar4>
<bar5>chars5</bar5>
<bar6>&lt;s6</bar6>
<bar7>chars7</bar7>
<bar8>&#38;8</bar8>
<bar9>très 9</bar9>
"""
i = 0
while i < 10000:
ctxt.parseChunk(chunk, len(chunk), 0)
i = i + 1
chunk = "</foo>"
ctxt.parseChunk(chunk, len(chunk), 1)
ctxt=None
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,6 +0,0 @@
<!DOCTYPE doc [
<!ELEMENT doc (a, b, a)>
<!ELEMENT a EMPTY>
<!ELEMENT b EMPTY>
]>
<doc><b/><a/><b/></doc>
-62
View File
@@ -1,62 +0,0 @@
#!/usr/bin/python -u
#
# this test exercise the XPath basic engine, parser, etc, and
# allows to detect memory leaks
#
import sys
import libxml2
instance="""<?xml version="1.0"?>
<tag xmlns:foo='urn:foo' xmlns:bar='urn:bar' xmlns:baz='urn:baz' />"""
def namespaceDefs(node):
n = node.nsDefs()
while n:
yield n
n = n.next
def checkNamespaceDefs(node, count):
nsList = list(namespaceDefs(node))
#print nsList
if len(nsList) != count :
raise Exception, "Error: saw %d namespace declarations. Expected %d" % (len(nsList), count)
# Memory debug specific
libxml2.debugMemory(1)
# Remove single namespace
doc = libxml2.parseDoc(instance)
node = doc.getRootElement()
checkNamespaceDefs(node, 3)
ns = node.removeNsDef('urn:bar')
checkNamespaceDefs(node, 2)
ns.freeNsList()
doc.freeDoc()
# Remove all namespaces
doc = libxml2.parseDoc(instance)
node = doc.getRootElement()
checkNamespaceDefs(node, 3)
ns = node.removeNsDef(None)
checkNamespaceDefs(node, 0)
ns.freeNsList()
doc.freeDoc()
# Remove a namespace refered to by a child
doc = libxml2.newDoc("1.0")
root = doc.newChild(None, "root", None)
namespace = root.newNs("http://example.com/sample", "s")
child = root.newChild(namespace, "child", None)
root.removeNsDef("http://example.com/sample")
doc.reconciliateNs(root)
namespace.freeNsList()
doc.serialize() # This should not segfault
doc.freeDoc()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-105
View File
@@ -1,105 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
import StringIO
def testSimpleBufferWrites():
f = StringIO.StringIO()
buf = libxml2.createOutputBuffer(f, "ISO-8859-1")
buf.write(3, "foo")
buf.writeString("bar")
buf.close()
if f.getvalue() != "foobar":
print "Failed to save to StringIO"
sys.exit(1)
def testSaveDocToBuffer():
"""
Regression test for bug #154294.
"""
input = '<foo>Hello</foo>'
expected = '''\
<?xml version="1.0" encoding="UTF-8"?>
<foo>Hello</foo>
'''
f = StringIO.StringIO()
buf = libxml2.createOutputBuffer(f, 'UTF-8')
doc = libxml2.parseDoc(input)
doc.saveFileTo(buf, 'UTF-8')
doc.freeDoc()
if f.getvalue() != expected:
print 'xmlDoc.saveFileTo() call failed.'
print ' got: %s' % repr(f.getvalue())
print 'expected: %s' % repr(expected)
sys.exit(1)
def testSaveFormattedDocToBuffer():
input = '<outer><inner>Some text</inner><inner/></outer>'
# The formatted and non-formatted versions of the output.
expected = ('''\
<?xml version="1.0" encoding="UTF-8"?>
<outer><inner>Some text</inner><inner/></outer>
''', '''\
<?xml version="1.0" encoding="UTF-8"?>
<outer>
<inner>Some text</inner>
<inner/>
</outer>
''')
doc = libxml2.parseDoc(input)
for i in (0, 1):
f = StringIO.StringIO()
buf = libxml2.createOutputBuffer(f, 'UTF-8')
doc.saveFormatFileTo(buf, 'UTF-8', i)
if f.getvalue() != expected[i]:
print 'xmlDoc.saveFormatFileTo() call failed.'
print ' got: %s' % repr(f.getvalue())
print 'expected: %s' % repr(expected[i])
sys.exit(1)
doc.freeDoc()
def testSaveIntoOutputBuffer():
"""
Similar to the previous two tests, except this time we invoke the save
methods on the output buffer object and pass in an XML node object.
"""
input = '<foo>Hello</foo>'
expected = '''\
<?xml version="1.0" encoding="UTF-8"?>
<foo>Hello</foo>
'''
f = StringIO.StringIO()
doc = libxml2.parseDoc(input)
buf = libxml2.createOutputBuffer(f, 'UTF-8')
buf.saveFileTo(doc, 'UTF-8')
if f.getvalue() != expected:
print 'outputBuffer.saveFileTo() call failed.'
print ' got: %s' % repr(f.getvalue())
print 'expected: %s' % repr(expected)
sys.exit(1)
f = StringIO.StringIO()
buf = libxml2.createOutputBuffer(f, 'UTF-8')
buf.saveFormatFileTo(doc, 'UTF-8', 1)
if f.getvalue() != expected:
print 'outputBuffer.saveFormatFileTo() call failed.'
print ' got: %s' % repr(f.getvalue())
print 'expected: %s' % repr(expected)
sys.exit(1)
doc.freeDoc()
if __name__ == '__main__':
# Memory debug specific
libxml2.debugMemory(1)
testSimpleBufferWrites()
testSaveDocToBuffer()
testSaveFormattedDocToBuffer()
testSaveIntoOutputBuffer()
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-35
View File
@@ -1,35 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml")
ctxt.parseChunk("/>", 2, 1)
doc = ctxt.doc()
ctxt=None
if doc.name != "test.xml":
print "document name error"
sys.exit(1)
root = doc.children
if root.name != "foo":
print "root element name error"
sys.exit(1)
doc.freeDoc()
i = 10000
while i > 0:
ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml")
ctxt.parseChunk("/>", 2, 1)
doc = ctxt.doc()
doc.freeDoc()
i = i -1
ctxt=None
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,64 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
log = ""
class callback:
def startDocument(self):
global log
log = log + "startDocument:"
def endDocument(self):
global log
log = log + "endDocument:"
def startElement(self, tag, attrs):
global log
log = log + "startElement %s %s:" % (tag, attrs)
def endElement(self, tag):
global log
log = log + "endElement %s:" % (tag)
def characters(self, data):
global log
log = log + "characters: %s:" % (data)
def warning(self, msg):
global log
log = log + "warning: %s:" % (msg)
def error(self, msg):
global log
log = log + "error: %s:" % (msg)
def fatalError(self, msg):
global log
log = log + "fatalError: %s:" % (msg)
handler = callback()
ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml")
chunk = " url='tst'>b"
ctxt.parseChunk(chunk, len(chunk), 0)
chunk = "ar</foo>"
ctxt.parseChunk(chunk, len(chunk), 1)
ctxt=None
reference = "startDocument:startElement foo {'url': 'tst'}:characters: bar:endElement foo:endDocument:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,65 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
log = ""
class callback:
def startDocument(self):
global log
log = log + "startDocument:"
def endDocument(self):
global log
log = log + "endDocument:"
def startElement(self, tag, attrs):
global log
log = log + "startElement %s %s:" % (tag, attrs)
def endElement(self, tag):
global log
log = log + "endElement %s:" % (tag)
def characters(self, data):
global log
log = log + "characters: %s:" % (data)
def warning(self, msg):
global log
log = log + "warning: %s:" % (msg)
def error(self, msg):
global log
log = log + "error: %s:" % (msg)
def fatalError(self, msg):
global log
log = log + "fatalError: %s:" % (msg)
handler = callback()
ctxt = libxml2.htmlCreatePushParser(handler, "<foo", 4, "test.xml")
chunk = " url='tst'>b"
ctxt.htmlParseChunk(chunk, len(chunk), 0)
chunk = "ar</foo>"
ctxt.htmlParseChunk(chunk, len(chunk), 1)
ctxt=None
reference = """startDocument:startElement html None:startElement body None:startElement foo {'url': 'tst'}:error: Tag foo invalid
:characters: bar:endElement foo:endElement body:endElement html:endDocument:"""
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-441
View File
@@ -1,441 +0,0 @@
#!/usr/bin/python -u
# -*- coding: ISO-8859-1 -*-
#
# this tests the basic APIs of the XmlTextReader interface
#
import libxml2
import StringIO
import sys
# Memory debug specific
libxml2.debugMemory(1)
f = StringIO.StringIO("""<a><b b1="b1"/><c>content of c</c></a>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test1")
ret = reader.Read()
if ret != 1:
print "test1: Error reading to first element"
sys.exit(1)
if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 1 or reader.HasAttributes() != 0:
print "test1: Error reading the first element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test1: Error reading to second element"
sys.exit(1)
if reader.Name() != "b" or reader.IsEmptyElement() != 1 or \
reader.NodeType() != 1 or reader.HasAttributes() != 1:
print "test1: Error reading the second element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test1: Error reading to third element"
sys.exit(1)
if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 1 or reader.HasAttributes() != 0:
print "test1: Error reading the third element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test1: Error reading to text node"
sys.exit(1)
if reader.Name() != "#text" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 3 or reader.HasAttributes() != 0 or \
reader.Value() != "content of c":
print "test1: Error reading the text node"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test1: Error reading to end of third element"
sys.exit(1)
if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 15 or reader.HasAttributes() != 0:
print "test1: Error reading the end of third element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test1: Error reading to end of first element"
sys.exit(1)
if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 15 or reader.HasAttributes() != 0:
print "test1: Error reading the end of first element"
sys.exit(1)
ret = reader.Read()
if ret != 0:
print "test1: Error reading to end of document"
sys.exit(1)
#
# example from the XmlTextReader docs
#
f = StringIO.StringIO("""<test xmlns:dt="urn:datatypes" dt:type="int"/>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test2")
ret = reader.Read()
if ret != 1:
print "Error reading test element"
sys.exit(1)
if reader.GetAttributeNo(0) != "urn:datatypes" or \
reader.GetAttributeNo(1) != "int" or \
reader.GetAttributeNs("type", "urn:datatypes") != "int" or \
reader.GetAttribute("dt:type") != "int":
print "error reading test attributes"
sys.exit(1)
#
# example from the XmlTextReader docs
#
f = StringIO.StringIO("""<root xmlns:a="urn:456">
<item>
<ref href="a:b"/>
</item>
</root>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test3")
ret = reader.Read()
while ret == 1:
if reader.Name() == "ref":
if reader.LookupNamespace("a") != "urn:456":
print "error resolving namespace prefix"
sys.exit(1)
break
ret = reader.Read()
if ret != 1:
print "Error finding the ref element"
sys.exit(1)
#
# Home made example for the various attribute access functions
#
f = StringIO.StringIO("""<testattr xmlns="urn:1" xmlns:a="urn:2" b="b" a:b="a:b"/>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test4")
ret = reader.Read()
if ret != 1:
print "Error reading the testattr element"
sys.exit(1)
#
# Attribute exploration by index
#
if reader.MoveToAttributeNo(0) != 1:
print "Failed moveToAttribute(0)"
sys.exit(1)
if reader.Value() != "urn:1":
print "Failed to read attribute(0)"
sys.exit(1)
if reader.Name() != "xmlns":
print "Failed to read attribute(0) name"
sys.exit(1)
if reader.MoveToAttributeNo(1) != 1:
print "Failed moveToAttribute(1)"
sys.exit(1)
if reader.Value() != "urn:2":
print "Failed to read attribute(1)"
sys.exit(1)
if reader.Name() != "xmlns:a":
print "Failed to read attribute(1) name"
sys.exit(1)
if reader.MoveToAttributeNo(2) != 1:
print "Failed moveToAttribute(2)"
sys.exit(1)
if reader.Value() != "b":
print "Failed to read attribute(2)"
sys.exit(1)
if reader.Name() != "b":
print "Failed to read attribute(2) name"
sys.exit(1)
if reader.MoveToAttributeNo(3) != 1:
print "Failed moveToAttribute(3)"
sys.exit(1)
if reader.Value() != "a:b":
print "Failed to read attribute(3)"
sys.exit(1)
if reader.Name() != "a:b":
print "Failed to read attribute(3) name"
sys.exit(1)
#
# Attribute exploration by name
#
if reader.MoveToAttribute("xmlns") != 1:
print "Failed moveToAttribute('xmlns')"
sys.exit(1)
if reader.Value() != "urn:1":
print "Failed to read attribute('xmlns')"
sys.exit(1)
if reader.MoveToAttribute("xmlns:a") != 1:
print "Failed moveToAttribute('xmlns')"
sys.exit(1)
if reader.Value() != "urn:2":
print "Failed to read attribute('xmlns:a')"
sys.exit(1)
if reader.MoveToAttribute("b") != 1:
print "Failed moveToAttribute('b')"
sys.exit(1)
if reader.Value() != "b":
print "Failed to read attribute('b')"
sys.exit(1)
if reader.MoveToAttribute("a:b") != 1:
print "Failed moveToAttribute('a:b')"
sys.exit(1)
if reader.Value() != "a:b":
print "Failed to read attribute('a:b')"
sys.exit(1)
if reader.MoveToAttributeNs("b", "urn:2") != 1:
print "Failed moveToAttribute('b', 'urn:2')"
sys.exit(1)
if reader.Value() != "a:b":
print "Failed to read attribute('b', 'urn:2')"
sys.exit(1)
#
# Go back and read in sequence
#
if reader.MoveToElement() != 1:
print "Failed to move back to element"
sys.exit(1)
if reader.MoveToFirstAttribute() != 1:
print "Failed to move to first attribute"
sys.exit(1)
if reader.Value() != "urn:1":
print "Failed to read attribute(0)"
sys.exit(1)
if reader.Name() != "xmlns":
print "Failed to read attribute(0) name"
sys.exit(1)
if reader.MoveToNextAttribute() != 1:
print "Failed to move to next attribute"
sys.exit(1)
if reader.Value() != "urn:2":
print "Failed to read attribute(1)"
sys.exit(1)
if reader.Name() != "xmlns:a":
print "Failed to read attribute(1) name"
sys.exit(1)
if reader.MoveToNextAttribute() != 1:
print "Failed to move to next attribute"
sys.exit(1)
if reader.Value() != "b":
print "Failed to read attribute(2)"
sys.exit(1)
if reader.Name() != "b":
print "Failed to read attribute(2) name"
sys.exit(1)
if reader.MoveToNextAttribute() != 1:
print "Failed to move to next attribute"
sys.exit(1)
if reader.Value() != "a:b":
print "Failed to read attribute(3)"
sys.exit(1)
if reader.Name() != "a:b":
print "Failed to read attribute(3) name"
sys.exit(1)
if reader.MoveToNextAttribute() != 0:
print "Failed to detect last attribute"
sys.exit(1)
#
# a couple of tests for namespace nodes
#
f = StringIO.StringIO("""<a xmlns="http://example.com/foo"/>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test6")
ret = reader.Read()
if ret != 1:
print "test6: failed to Read()"
sys.exit(1)
ret = reader.MoveToFirstAttribute()
if ret != 1:
print "test6: failed to MoveToFirstAttribute()"
sys.exit(1)
if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
reader.LocalName() != "xmlns" or reader.Name() != "xmlns" or \
reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
print "test6: failed to read the namespace node"
sys.exit(1)
f = StringIO.StringIO("""<a xmlns:prefix="http://example.com/foo"/>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test7")
ret = reader.Read()
if ret != 1:
print "test7: failed to Read()"
sys.exit(1)
ret = reader.MoveToFirstAttribute()
if ret != 1:
print "test7: failed to MoveToFirstAttribute()"
sys.exit(1)
if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
reader.LocalName() != "prefix" or reader.Name() != "xmlns:prefix" or \
reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
print "test7: failed to read the namespace node"
sys.exit(1)
#
# Test for a limit case:
#
f = StringIO.StringIO("""<a/>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test8")
ret = reader.Read()
if ret != 1:
print "test8: failed to read the node"
sys.exit(1)
if reader.Name() != "a" or reader.IsEmptyElement() != 1:
print "test8: failed to analyze the node"
sys.exit(1)
ret = reader.Read()
if ret != 0:
print "test8: failed to detect the EOF"
sys.exit(1)
#
# Another test provided by Stéphane Bidoul and checked with C#
#
def tst_reader(s):
f = StringIO.StringIO(s)
input = libxml2.inputBuffer(f)
reader = input.newTextReader("tst")
res = ""
while reader.Read():
res=res + "%s (%s) [%s] %d %d\n" % (reader.NodeType(),reader.Name(),
reader.Value(), reader.IsEmptyElement(),
reader.Depth())
if reader.NodeType() == 1: # Element
while reader.MoveToNextAttribute():
res = res + "-- %s (%s) [%s] %d %d\n" % (reader.NodeType(),
reader.Name(),reader.Value(),
reader.IsEmptyElement(), reader.Depth())
return res
doc="""<a><b b1="b1"/><c>content of c</c></a>"""
expect="""1 (a) [None] 0 0
1 (b) [None] 1 1
-- 2 (b1) [b1] 0 2
1 (c) [None] 0 1
3 (#text) [content of c] 0 2
15 (c) [None] 0 1
15 (a) [None] 0 0
"""
res = tst_reader(doc)
if res != expect:
print "test5 failed"
print res
sys.exit(1)
doc="""<test><b/><c/></test>"""
expect="""1 (test) [None] 0 0
1 (b) [None] 1 1
1 (c) [None] 1 1
15 (test) [None] 0 0
"""
res = tst_reader(doc)
if res != expect:
print "test9 failed"
print res
sys.exit(1)
doc="""<a><b>bbb</b><c>ccc</c></a>"""
expect="""1 (a) [None] 0 0
1 (b) [None] 0 1
3 (#text) [bbb] 0 2
15 (b) [None] 0 1
1 (c) [None] 0 1
3 (#text) [ccc] 0 2
15 (c) [None] 0 1
15 (a) [None] 0 0
"""
res = tst_reader(doc)
if res != expect:
print "test10 failed"
print res
sys.exit(1)
doc="""<test a="a"/>"""
expect="""1 (test) [None] 1 0
-- 2 (a) [a] 0 1
"""
res = tst_reader(doc)
if res != expect:
print "test11 failed"
print res
sys.exit(1)
doc="""<test><a>aaa</a><b/></test>"""
expect="""1 (test) [None] 0 0
1 (a) [None] 0 1
3 (#text) [aaa] 0 2
15 (a) [None] 0 1
1 (b) [None] 1 1
15 (test) [None] 0 0
"""
res = tst_reader(doc)
if res != expect:
print "test12 failed"
print res
sys.exit(1)
doc="""<test><p></p></test>"""
expect="""1 (test) [None] 0 0
1 (p) [None] 0 1
15 (p) [None] 0 1
15 (test) [None] 0 0
"""
res = tst_reader(doc)
if res != expect:
print "test13 failed"
print res
sys.exit(1)
doc="""<p></p>"""
expect="""1 (p) [None] 0 0
15 (p) [None] 0 0
"""
res = tst_reader(doc)
if res != expect:
print "test14 failed"
print res
sys.exit(1)
#
# test from bug #108801
#
doc="""<?xml version="1.0" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
<article>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</article>
"""
expect="""10 (article) [None] 0 0
1 (article) [None] 0 0
3 (#text) [
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
] 0 1
15 (article) [None] 0 0
"""
res = tst_reader(doc)
if res != expect:
print "test15 failed"
print res
sys.exit(1)
#
# cleanup for memory allocation counting
#
del f
del input
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-256
View File
@@ -1,256 +0,0 @@
#!/usr/bin/python -u
#
# this tests the DTD validation with the XmlTextReader interface
#
import sys
import glob
import string
import StringIO
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
err=""
expect="""../../test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute version
</rss>
^
../../test/valid/xlink.xml:450: element termdef: validity error : ID dt-arc already defined
<p><termdef id="dt-arc" term="Arc">An <ter
^
../../test/valid/xlink.xml:530: validity error : attribute def line 199 references an unknown ID "dt-xlg"
^
"""
def callback(ctx, str):
global err
err = err + "%s" % (str)
libxml2.registerErrorHandler(callback, "")
valid_files = glob.glob("../../test/valid/*.x*")
valid_files.sort()
for file in valid_files:
if string.find(file, "t8") != -1:
continue
reader = libxml2.newTextReaderFilename(file)
#print "%s:" % (file)
reader.SetParserProp(libxml2.PARSER_VALIDATE, 1)
ret = reader.Read()
while ret == 1:
ret = reader.Read()
if ret != 0:
print "Error parsing and validating %s" % (file)
#sys.exit(1)
if err != expect:
print err
#
# another separate test based on Stephane Bidoul one
#
s = """
<!DOCTYPE test [
<!ELEMENT test (x,b)>
<!ELEMENT x (c)>
<!ELEMENT b (#PCDATA)>
<!ELEMENT c (#PCDATA)>
<!ENTITY x "<x><c>xxx</c></x>">
]>
<test>
&x;
<b>bbb</b>
</test>
"""
expect="""10,test
1,test
14,#text
1,x
1,c
3,#text
15,c
15,x
14,#text
1,b
3,#text
15,b
14,#text
15,test
"""
res=""
err=""
input = libxml2.inputBuffer(StringIO.StringIO(s))
reader = input.newTextReader("test2")
reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
while reader.Read() == 1:
res = res + "%s,%s\n" % (reader.NodeType(),reader.Name())
if res != expect:
print "test2 failed: unexpected output"
print res
sys.exit(1)
if err != "":
print "test2 failed: validation error found"
print err
sys.exit(1)
#
# Another test for external entity parsing and validation
#
s = """<!DOCTYPE test [
<!ELEMENT test (x)>
<!ELEMENT x (#PCDATA)>
<!ENTITY e SYSTEM "tst.ent">
]>
<test>
&e;
</test>
"""
tst_ent = """<x>hello</x>"""
expect="""10 test
1 test
14 #text
1 x
3 #text
15 x
14 #text
15 test
"""
res=""
def myResolver(URL, ID, ctxt):
if URL == "tst.ent":
return(StringIO.StringIO(tst_ent))
return None
libxml2.setEntityLoader(myResolver)
input = libxml2.inputBuffer(StringIO.StringIO(s))
reader = input.newTextReader("test3")
reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
while reader.Read() == 1:
res = res + "%s %s\n" % (reader.NodeType(),reader.Name())
if res != expect:
print "test3 failed: unexpected output"
print res
sys.exit(1)
if err != "":
print "test3 failed: validation error found"
print err
sys.exit(1)
#
# Another test for recursive entity parsing, validation, and replacement of
# entities, making sure the entity ref node doesn't show up in that case
#
s = """<!DOCTYPE test [
<!ELEMENT test (x, x)>
<!ELEMENT x (y)>
<!ELEMENT y (#PCDATA)>
<!ENTITY x "<x>&y;</x>">
<!ENTITY y "<y>yyy</y>">
]>
<test>
&x;
&x;
</test>"""
expect="""10 test 0
1 test 0
14 #text 1
1 x 1
1 y 2
3 #text 3
15 y 2
15 x 1
14 #text 1
1 x 1
1 y 2
3 #text 3
15 y 2
15 x 1
14 #text 1
15 test 0
"""
res=""
err=""
input = libxml2.inputBuffer(StringIO.StringIO(s))
reader = input.newTextReader("test4")
reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
while reader.Read() == 1:
res = res + "%s %s %d\n" % (reader.NodeType(),reader.Name(),reader.Depth())
if res != expect:
print "test4 failed: unexpected output"
print res
sys.exit(1)
if err != "":
print "test4 failed: validation error found"
print err
sys.exit(1)
#
# The same test but without entity substitution this time
#
s = """<!DOCTYPE test [
<!ELEMENT test (x, x)>
<!ELEMENT x (y)>
<!ELEMENT y (#PCDATA)>
<!ENTITY x "<x>&y;</x>">
<!ENTITY y "<y>yyy</y>">
]>
<test>
&x;
&x;
</test>"""
expect="""10 test 0
1 test 0
14 #text 1
5 x 1
14 #text 1
5 x 1
14 #text 1
15 test 0
"""
res=""
err=""
input = libxml2.inputBuffer(StringIO.StringIO(s))
reader = input.newTextReader("test5")
reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
while reader.Read() == 1:
res = res + "%s %s %d\n" % (reader.NodeType(),reader.Name(),reader.Depth())
if res != expect:
print "test5 failed: unexpected output"
print res
if err != "":
print "test5 failed: validation error found"
print err
#
# cleanup
#
del input
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-155
View File
@@ -1,155 +0,0 @@
#!/usr/bin/python -u
#
# this tests the entities substitutions with the XmlTextReader interface
#
import sys
import StringIO
import libxml2
docstr="""<?xml version='1.0'?>
<!DOCTYPE doc [
<!ENTITY tst "<p>test</p>">
]>
<doc>&tst;</doc>"""
# Memory debug specific
libxml2.debugMemory(1)
#
# First test, normal don't substitute entities.
#
f = StringIO.StringIO(docstr)
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test_noent")
ret = reader.Read()
if ret != 1:
print "Error reading to root"
sys.exit(1)
if reader.Name() == "doc" or reader.NodeType() == 10:
ret = reader.Read()
if ret != 1:
print "Error reading to root"
sys.exit(1)
if reader.Name() != "doc" or reader.NodeType() != 1:
print "test_normal: Error reading the root element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_normal: Error reading to the entity"
sys.exit(1)
if reader.Name() != "tst" or reader.NodeType() != 5:
print "test_normal: Error reading the entity"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_normal: Error reading to the end of root"
sys.exit(1)
if reader.Name() != "doc" or reader.NodeType() != 15:
print "test_normal: Error reading the end of the root element"
sys.exit(1)
ret = reader.Read()
if ret != 0:
print "test_normal: Error detecting the end"
sys.exit(1)
#
# Second test, completely substitute the entities.
#
f = StringIO.StringIO(docstr)
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test_noent")
reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES, 1)
ret = reader.Read()
if ret != 1:
print "Error reading to root"
sys.exit(1)
if reader.Name() == "doc" or reader.NodeType() == 10:
ret = reader.Read()
if ret != 1:
print "Error reading to root"
sys.exit(1)
if reader.Name() != "doc" or reader.NodeType() != 1:
print "test_noent: Error reading the root element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_noent: Error reading to the entity content"
sys.exit(1)
if reader.Name() != "p" or reader.NodeType() != 1:
print "test_noent: Error reading the p element from entity"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_noent: Error reading to the text node"
sys.exit(1)
if reader.NodeType() != 3 or reader.Value() != "test":
print "test_noent: Error reading the text node"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_noent: Error reading to the end of p element"
sys.exit(1)
if reader.Name() != "p" or reader.NodeType() != 15:
print "test_noent: Error reading the end of the p element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_noent: Error reading to the end of root"
sys.exit(1)
if reader.Name() != "doc" or reader.NodeType() != 15:
print "test_noent: Error reading the end of the root element"
sys.exit(1)
ret = reader.Read()
if ret != 0:
print "test_noent: Error detecting the end"
sys.exit(1)
#
# third test, crazy stuff about empty element in external parsed entities
#
s = """<!DOCTYPE struct [
<!ENTITY simplestruct2.ent SYSTEM "simplestruct2.ent">
]>
<struct>&simplestruct2.ent;</struct>
"""
expect="""10 struct 0 0
1 struct 0 0
1 descr 1 1
15 struct 0 0
"""
res=""
simplestruct2_ent="""<descr/>"""
def myResolver(URL, ID, ctxt):
if URL == "simplestruct2.ent":
return(StringIO.StringIO(simplestruct2_ent))
return None
libxml2.setEntityLoader(myResolver)
input = libxml2.inputBuffer(StringIO.StringIO(s))
reader = input.newTextReader("test3")
reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
while reader.Read() == 1:
res = res + "%s %s %d %d\n" % (reader.NodeType(),reader.Name(),
reader.Depth(),reader.IsEmptyElement())
if res != expect:
print "test3 failed: unexpected output"
print res
sys.exit(1)
#
# cleanup
#
del f
del input
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,45 +0,0 @@
#!/usr/bin/python -u
#
# this tests the basic APIs of the XmlTextReader interface
#
import libxml2
import StringIO
import sys
# Memory debug specific
libxml2.debugMemory(1)
def tst_reader(s):
f = StringIO.StringIO(s)
input = libxml2.inputBuffer(f)
reader = input.newTextReader("tst")
res = ""
while reader.Read():
res=res + "%s (%s) [%s] %d\n" % (reader.NodeType(),reader.Name(),
reader.Value(), reader.IsEmptyElement())
if reader.NodeType() == 1: # Element
while reader.MoveToNextAttribute():
res = res + "-- %s (%s) [%s]\n" % (reader.NodeType(),
reader.Name(),reader.Value())
return res
expect="""1 (test) [None] 0
1 (b) [None] 1
1 (c) [None] 1
15 (test) [None] 0
"""
res = tst_reader("""<test><b/><c/></test>""")
if res != expect:
print "Did not get the expected error message:"
print res
sys.exit(1)
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,48 +0,0 @@
#!/usr/bin/python -u
#
# this tests the Expand() API of the xmlTextReader interface
# this extract the Dragon bibliography entries from the XML specification
#
import libxml2
import StringIO
import sys
# Memory debug specific
libxml2.debugMemory(1)
expect="""<bibl id="Aho" key="Aho/Ullman">Aho, Alfred V.,
Ravi Sethi, and Jeffrey D. Ullman.
<emph>Compilers: Principles, Techniques, and Tools</emph>.
Reading: Addison-Wesley, 1986, rpt. corr. 1988.</bibl>"""
f = open('../../test/valid/REC-xml-19980210.xml')
input = libxml2.inputBuffer(f)
reader = input.newTextReader("REC")
res=""
while reader.Read():
while reader.Name() == 'bibl':
node = reader.Expand() # expand the subtree
if node.xpathEval("@id = 'Aho'"): # use XPath on it
res = res + node.serialize()
if reader.Next() != 1: # skip the subtree
break;
if res != expect:
print "Error: didn't get the expected output"
print "got '%s'" % (res)
print "expected '%s'" % (expect)
#
# cleanup
#
del input
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-123
View File
@@ -1,123 +0,0 @@
#!/usr/bin/python -u
#
# this tests the entities substitutions with the XmlTextReader interface
#
import sys
import StringIO
import libxml2
schema="""<element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<oneOrMore>
<element name="label">
<text/>
</element>
<optional>
<element name="opt">
<empty/>
</element>
</optional>
<element name="item">
<data type="byte"/>
</element>
</oneOrMore>
</element>
"""
# Memory debug specific
libxml2.debugMemory(1)
#
# Parse the Relax NG Schemas
#
rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
rngs = rngp.relaxNGParse()
del rngp
#
# Parse and validate the correct document
#
docstr="""<foo>
<label>some text</label>
<item>100</item>
</foo>"""
f = StringIO.StringIO(docstr)
input = libxml2.inputBuffer(f)
reader = input.newTextReader("correct")
reader.RelaxNGSetSchema(rngs)
ret = reader.Read()
while ret == 1:
ret = reader.Read()
if ret != 0:
print "Error parsing the document"
sys.exit(1)
if reader.IsValid() != 1:
print "Document failed to validate"
sys.exit(1)
#
# Parse and validate the incorrect document
#
docstr="""<foo>
<label>some text</label>
<item>1000</item>
</foo>"""
err=""
# RNG errors are not as good as before , TODO
#expect="""RNG validity error: file error line 3 element text
#Type byte doesn't allow value '1000'
#RNG validity error: file error line 3 element text
#Error validating datatype byte
#RNG validity error: file error line 3 element text
#Element item failed to validate content
#"""
expect="""Type byte doesn't allow value '1000'
Error validating datatype byte
Element item failed to validate content
"""
def callback(ctx, str):
global err
err = err + "%s" % (str)
libxml2.registerErrorHandler(callback, "")
f = StringIO.StringIO(docstr)
input = libxml2.inputBuffer(f)
reader = input.newTextReader("error")
reader.RelaxNGSetSchema(rngs)
ret = reader.Read()
while ret == 1:
ret = reader.Read()
if ret != 0:
print "Error parsing the document"
sys.exit(1)
if reader.IsValid() != 0:
print "Document failed to detect the validation error"
sys.exit(1)
if err != expect:
print "Did not get the expected error message:"
print err
sys.exit(1)
#
# cleanup
#
del f
del input
del reader
del rngs
libxml2.relaxNGCleanupTypes()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-102
View File
@@ -1,102 +0,0 @@
#!/usr/bin/python -u
#
# this tests the entities substitutions with the XmlTextReader interface
#
import sys
import StringIO
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
result = ""
def processNode(reader):
global result
result = result + "%d %d %s %d\n" % (reader.Depth(), reader.NodeType(),
reader.Name(), reader.IsEmptyElement())
#
# Parse a document testing the readerForxxx API
#
docstr="""<foo>
<label>some text</label>
<item>100</item>
</foo>"""
expect="""0 1 foo 0
1 14 #text 0
1 1 label 0
2 3 #text 0
1 15 label 0
1 14 #text 0
1 1 item 0
2 3 #text 0
1 15 item 0
1 14 #text 0
0 15 foo 0
"""
result = ""
reader = libxml2.readerForDoc(docstr, "test1", None, 0)
ret = reader.Read()
while ret == 1:
processNode(reader)
ret = reader.Read()
if ret != 0:
print "Error parsing the document test1"
sys.exit(1)
if result != expect:
print "Unexpected result for test1"
print result
sys.exit(1)
#
# Reuse the reader for another document testing the ReaderNewxxx API
#
docstr="""<foo>
<label>some text</label>
<item>1000</item>
</foo>"""
expect="""0 1 foo 0
1 14 #text 0
1 1 label 0
2 3 #text 0
1 15 label 0
1 14 #text 0
1 1 item 0
2 3 #text 0
1 15 item 0
1 14 #text 0
0 15 foo 0
"""
result = ""
reader.NewDoc(docstr, "test2", None, 0)
ret = reader.Read()
while ret == 1:
processNode(reader)
ret = reader.Read()
if ret != 0:
print "Error parsing the document test2"
sys.exit(1)
if result != expect:
print "Unexpected result for test2"
print result
sys.exit(1)
#
# cleanup
#
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,37 +0,0 @@
#!/usr/bin/python -u
#
# this tests the entities substitutions with the XmlTextReader interface
#
import sys
import StringIO
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
#
# Parse a document testing the Close() API
#
docstr="""<foo>
<label>some text</label>
<item>100</item>
</foo>"""
reader = libxml2.readerForDoc(docstr, "test1", None, 0)
ret = reader.Read()
ret = reader.Read()
ret = reader.Close()
if ret != 0:
print "Error closing the document test1"
sys.exit(1)
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,51 +0,0 @@
#!/usr/bin/python -u
#
# this tests the basic APIs of the XmlTextReader interface
#
import libxml2
import StringIO
import sys
# Memory debug specific
libxml2.debugMemory(1)
expect="""--> (3) test1:1:xmlns: URI foo is not absolute
--> (4) test1:1:Opening and ending tag mismatch: c line 0 and a
"""
err=""
def myErrorHandler(arg,msg,severity,locator):
global err
err = err + "%s (%d) %s:%d:%s" % (arg,severity,locator.BaseURI(),locator.LineNumber(),msg)
f = StringIO.StringIO("""<a xmlns="foo"><b b1="b1"/><c>content of c</a>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test1")
reader.SetErrorHandler(myErrorHandler,"-->")
while reader.Read() == 1:
pass
if err != expect:
print "error"
print "received %s" %(err)
print "expected %s" %(expect)
sys.exit(1)
reader.SetErrorHandler(None,None)
if reader.GetErrorHandler() != (None,None):
print "GetErrorHandler failed"
sys.exit(1)
#
# cleanup for memory allocation counting
#
del f
del input
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,81 +0,0 @@
#!/usr/bin/python -u
# -*- coding: ISO-8859-1 -*-
#
# this tests the next API of the XmlTextReader interface
#
import libxml2
import StringIO
import sys
# Memory debug specific
libxml2.debugMemory(1)
f = StringIO.StringIO("""<a><b><c /></b><d>content of d</d></a>""")
input = libxml2.inputBuffer(f)
reader = input.newTextReader("test_next")
ret = reader.Read()
if ret != 1:
print "test_next: Error reading to first element"
sys.exit(1)
if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 1 or reader.HasAttributes() != 0:
print "test_next: Error reading the first element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_next: Error reading to second element"
sys.exit(1)
if reader.Name() != "b" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 1 or reader.HasAttributes() != 0:
print "test_next: Error reading the second element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_next: Error reading to third element"
sys.exit(1)
if reader.Name() != "c" or reader.NodeType() != 1 or \
reader.HasAttributes() != 0:
print "test_next: Error reading the third element"
sys.exit(1)
ret = reader.Read()
if ret != 1:
print "test_next: Error reading to end of third element"
sys.exit(1)
if reader.Name() != "b" or reader.NodeType() != 15:
print "test_next: Error reading to end of second element"
sys.exit(1)
ret = reader.Next()
if ret != 1:
print "test_next: Error moving to third element"
sys.exit(1)
if reader.Name() != "d" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 1 or reader.HasAttributes() != 0:
print "test_next: Error reading third element"
sys.exit(1)
ret = reader.Next()
if ret != 1:
print "test_next: Error reading to end of first element"
sys.exit(1)
if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
reader.NodeType() != 15 or reader.HasAttributes() != 0:
print "test_next: Error reading the end of first element"
sys.exit(1)
ret = reader.Read()
if ret != 0:
print "test_next: Error reading to end of document"
sys.exit(1)
#
# cleanup for memory allocation counting
#
del f
del input
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,32 +0,0 @@
#!/usr/bin/python -u
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
re = libxml2.regexpCompile("a|b")
if re.regexpExec("a") != 1:
print "error checking 'a'"
sys.exit(1)
if re.regexpExec("b") != 1:
print "error checking 'b'"
sys.exit(1)
if re.regexpExec("ab") != 0:
print "error checking 'ab'"
sys.exit(1)
if re.regexpExec("") != 0:
print "error checking 'ab'"
sys.exit(1)
if re.regexpIsDeterminist() != 1:
print "error checking determinism"
sys.exit(1)
del re
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,48 +0,0 @@
#!/usr/bin/python -u
import libxml2
import sys
# Memory debug specific
libxml2.debugMemory(1)
schema="""<?xml version="1.0"?>
<element name="foo"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/annotation/1.0"
xmlns:ex1="http://www.example.com/n1"
xmlns:ex2="http://www.example.com/n2">
<a:documentation>A foo element.</a:documentation>
<element name="ex1:bar1">
<empty/>
</element>
<element name="ex2:bar2">
<empty/>
</element>
</element>
"""
instance="""<?xml version="1.0"?>
<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1"/><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
rngs = rngp.relaxNGParse()
ctxt = rngs.relaxNGNewValidCtxt()
doc = libxml2.parseDoc(instance)
ret = doc.relaxNGValidateDoc(ctxt)
if ret != 0:
print "error doing RelaxNG validation"
sys.exit(1)
doc.freeDoc()
del rngp
del rngs
del ctxt
libxml2.relaxNGCleanupTypes()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,39 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
import StringIO
# Memory debug specific
libxml2.debugMemory(1)
def myResolver(URL, ID, ctxt):
return(StringIO.StringIO("<foo/>"))
libxml2.setEntityLoader(myResolver)
doc = libxml2.parseFile("doesnotexist.xml")
root = doc.children
if root.name != "foo":
print "root element name error"
sys.exit(1)
doc.freeDoc()
i = 0
while i < 5000:
doc = libxml2.parseFile("doesnotexist.xml")
root = doc.children
if root.name != "foo":
print "root element name error"
sys.exit(1)
doc.freeDoc()
i = i + 1
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,52 +0,0 @@
#!/usr/bin/python -u
import libxml2
import sys
# Memory debug specific
libxml2.debugMemory(1)
schema="""<?xml version="1.0" encoding="iso-8859-1"?>
<schema xmlns = "http://www.w3.org/2001/XMLSchema">
<element name = "Customer">
<complexType>
<sequence>
<element name = "FirstName" type = "string" />
<element name = "MiddleInitial" type = "string" />
<element name = "LastName" type = "string" />
</sequence>
<attribute name = "customerID" type = "integer" />
</complexType>
</element>
</schema>"""
instance="""<?xml version="1.0" encoding="iso-8859-1"?>
<Customer customerID = "24332">
<FirstName>Raymond</FirstName>
<MiddleInitial>G</MiddleInitial>
<LastName>Bayliss</LastName>
</Customer>
"""
ctxt_parser = libxml2.schemaNewMemParserCtxt(schema, len(schema))
ctxt_schema = ctxt_parser.schemaParse()
ctxt_valid = ctxt_schema.schemaNewValidCtxt()
doc = libxml2.parseDoc(instance)
ret = doc.schemaValidateDoc(ctxt_valid)
if ret != 0:
print "error doing schema validation"
sys.exit(1)
doc.freeDoc()
del ctxt_parser
del ctxt_schema
del ctxt_valid
libxml2.schemaCleanupTypes()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,150 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
#
# Testing XML document serialization
#
doc = libxml2.parseDoc("""<root><foo>hello</foo></root>""")
str = doc.serialize()
if str != """<?xml version="1.0"?>
<root><foo>hello</foo></root>
""":
print "error serializing XML document 1"
sys.exit(1)
str = doc.serialize("iso-8859-1")
if str != """<?xml version="1.0" encoding="iso-8859-1"?>
<root><foo>hello</foo></root>
""":
print "error serializing XML document 2"
sys.exit(1)
str = doc.serialize(format=1)
if str != """<?xml version="1.0"?>
<root>
<foo>hello</foo>
</root>
""":
print "error serializing XML document 3"
sys.exit(1)
str = doc.serialize("iso-8859-1", 1)
if str != """<?xml version="1.0" encoding="iso-8859-1"?>
<root>
<foo>hello</foo>
</root>
""":
print "error serializing XML document 4"
sys.exit(1)
#
# Test serializing a subnode
#
root = doc.getRootElement()
str = root.serialize()
if str != """<root><foo>hello</foo></root>""":
print "error serializing XML root 1"
sys.exit(1)
str = root.serialize("iso-8859-1")
if str != """<root><foo>hello</foo></root>""":
print "error serializing XML root 2"
sys.exit(1)
str = root.serialize(format=1)
if str != """<root>
<foo>hello</foo>
</root>""":
print "error serializing XML root 3"
sys.exit(1)
str = root.serialize("iso-8859-1", 1)
if str != """<root>
<foo>hello</foo>
</root>""":
print "error serializing XML root 4"
sys.exit(1)
doc.freeDoc()
#
# Testing HTML document serialization
#
doc = libxml2.htmlParseDoc("""<html><head><title>Hello</title><body><p>hello</body></html>""", None)
str = doc.serialize()
if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title>Hello</title></head><body><p>hello</p></body></html>
""":
print "error serializing HTML document 1"
sys.exit(1)
str = doc.serialize("ISO-8859-1")
if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Hello</title></head><body><p>hello</p></body></html>
""":
print "error serializing HTML document 2"
sys.exit(1)
str = doc.serialize(format=1)
if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Hello</title>
</head>
<body><p>hello</p></body>
</html>
""":
print "error serializing HTML document 3"
sys.exit(1)
str = doc.serialize("iso-8859-1", 1)
if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Hello</title>
</head>
<body><p>hello</p></body>
</html>
""":
print "error serializing HTML document 4"
sys.exit(1)
#
# Test serializing a subnode
#
doc.htmlSetMetaEncoding(None)
root = doc.getRootElement()
str = root.serialize()
if str != """<html><head><title>Hello</title></head><body><p>hello</p></body></html>""":
print "error serializing HTML root 1"
sys.exit(1)
str = root.serialize("ISO-8859-1")
if str != """<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Hello</title></head><body><p>hello</p></body></html>""":
print "error serializing HTML root 2"
sys.exit(1)
str = root.serialize(format=1)
if str != """<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Hello</title>
</head>
<body><p>hello</p></body>
</html>""":
print "error serializing HTML root 3"
sys.exit(1)
str = root.serialize("iso-8859-1", 1)
if str != """<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Hello</title>
</head>
<body><p>hello</p></body>
</html>""":
print "error serializing HTML root 4"
sys.exit(1)
doc.freeDoc()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-135
View File
@@ -1,135 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
log = ""
class callback:
def startDocument(self):
global log
log = log + "startDocument:"
def endDocument(self):
global log
log = log + "endDocument:"
def startElement(self, tag, attrs):
global log
log = log + "startElement %s %s:" % (tag, attrs)
def endElement(self, tag):
global log
log = log + "endElement %s:" % (tag)
def characters(self, data):
global log
log = log + "characters: %s:" % (data)
def warning(self, msg):
global log
log = log + "warning: %s:" % (msg)
def error(self, msg):
global log
log = log + "error: %s:" % (msg)
def fatalError(self, msg):
global log
log = log + "fatalError: %s:" % (msg)
handler = callback()
log=""
chunk="""<foo><bar2/>"""
ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
ctxt.parseChunk(chunk, len(chunk), 0)
ctxt=None
reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
log=""
chunk="""<foo><bar2></bar2>"""
ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
ctxt.parseChunk(chunk, len(chunk), 0)
ctxt=None
reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
log=""
chunk="""<foo><bar2>"""
ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
ctxt.parseChunk(chunk, len(chunk), 0)
ctxt=None
reference = "startDocument:startElement foo None:startElement bar2 None:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
log=""
chunk="""<foo><bar2 a="1" b='2' />"""
ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
ctxt.parseChunk(chunk, len(chunk), 0)
ctxt=None
reference = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
log=""
chunk="""<foo><bar2 a="1" b='2' >"""
ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
ctxt.parseChunk(chunk, len(chunk), 0)
ctxt=None
reference = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
log=""
chunk="""<foo><bar2 a="1" b='2' ></bar2>"""
ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
ctxt.parseChunk(chunk, len(chunk), 0)
ctxt=None
reference = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
log=""
chunk="""<foo><bar2 a="b='1' />"""
ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
ctxt.parseChunk(chunk, len(chunk), 0)
ctxt=None
reference = "startDocument:startElement foo None:"
if log != reference:
print "Error got: %s" % log
print "Exprected: %s" % reference
sys.exit(1)
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1 +0,0 @@
<!ELEMENT foo EMPTY>
@@ -1,96 +0,0 @@
#!/usr/bin/python -u
import string, sys, time
import thread
from threading import Thread, Lock
import libxml2
THREADS_COUNT = 15
failed = 0
class ErrorHandler:
def __init__(self):
self.errors = []
self.lock = Lock()
def handler(self,ctx,str):
self.lock.acquire()
self.errors.append(str)
self.lock.release()
def getLineNumbersDefault():
old = libxml2.lineNumbersDefault(0)
libxml2.lineNumbersDefault(old)
return old
def test(expectedLineNumbersDefault):
time.sleep(1)
global failed
# check a per thread-global
if expectedLineNumbersDefault != getLineNumbersDefault():
failed = 1
print "FAILED to obtain correct value for " \
"lineNumbersDefault in thread %d" % thread.get_ident()
# check ther global error handler
# (which is NOT per-thread in the python bindings)
try:
doc = libxml2.parseFile("bad.xml")
except:
pass
else:
assert "failed"
# global error handler
eh = ErrorHandler()
libxml2.registerErrorHandler(eh.handler,"")
# set on the main thread only
libxml2.lineNumbersDefault(1)
test(1)
ec = len(eh.errors)
if ec == 0:
print "FAILED: should have obtained errors"
sys.exit(1)
ts = []
for i in range(THREADS_COUNT):
# expect 0 for lineNumbersDefault because
# the new value has been set on the main thread only
ts.append(Thread(target=test,args=(0,)))
for t in ts:
t.start()
for t in ts:
t.join()
if len(eh.errors) != ec+THREADS_COUNT*ec:
print "FAILED: did not obtain the correct number of errors"
sys.exit(1)
# set lineNumbersDefault for future new threads
libxml2.thrDefLineNumbersDefaultValue(1)
ts = []
for i in range(THREADS_COUNT):
# expect 1 for lineNumbersDefault
ts.append(Thread(target=test,args=(1,)))
for t in ts:
t.start()
for t in ts:
t.join()
if len(eh.errors) != ec+THREADS_COUNT*ec*2:
print "FAILED: did not obtain the correct number of errors"
sys.exit(1)
if failed:
print "FAILED"
sys.exit(1)
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-28
View File
@@ -1,28 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
doc = libxml2.parseFile("tst.xml")
if doc.name != "tst.xml":
print "doc.name failed"
sys.exit(1)
root = doc.children
if root.name != "doc":
print "root.name failed"
sys.exit(1)
child = root.children
if child.name != "foo":
print "child.name failed"
sys.exit(1)
doc.freeDoc()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-1
View File
@@ -1 +0,0 @@
<doc><foo>bar</foo></doc>
@@ -1,72 +0,0 @@
#!/usr/bin/python -u
import sys, unittest
import libxml2
class TestCase(unittest.TestCase):
def setUp(self):
libxml2.debugMemory(1)
def tearDown(self):
libxml2.cleanupParser()
if libxml2.debugMemory(1) != 0:
libxml2.dumpMemory()
self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
def failUnlessXmlError(self,f,args,exc,domain,code,message,level,file,line):
"""Run function f, with arguments args and expect an exception exc;
when the exception is raised, check the libxml2.lastError for
expected values."""
# disable the default error handler
libxml2.registerErrorHandler(None,None)
try:
apply(f,args)
except exc:
e = libxml2.lastError()
if e is None:
self.fail("lastError not set")
if 0:
print "domain = ",e.domain()
print "code = ",e.code()
print "message =",repr(e.message())
print "level =",e.level()
print "file =",e.file()
print "line =",e.line()
print
self.failUnlessEqual(domain,e.domain())
self.failUnlessEqual(code,e.code())
self.failUnlessEqual(message,e.message())
self.failUnlessEqual(level,e.level())
self.failUnlessEqual(file,e.file())
self.failUnlessEqual(line,e.line())
else:
self.fail("exception %s should have been raised" % exc)
def test1(self):
"""Test readFile with a file that does not exist"""
self.failUnlessXmlError(libxml2.readFile,
("dummy.xml",None,0),
libxml2.treeError,
domain=libxml2.XML_FROM_IO,
code=libxml2.XML_IO_LOAD_ERROR,
message='failed to load external entity "dummy.xml"\n',
level=libxml2.XML_ERR_WARNING,
file=None,
line=0)
def test2(self):
"""Test a well-formedness error: we get the last error only"""
s = "<x>\n<a>\n</x>"
self.failUnlessXmlError(libxml2.readMemory,
(s,len(s),"dummy.xml",None,0),
libxml2.treeError,
domain=libxml2.XML_FROM_PARSER,
code=libxml2.XML_ERR_TAG_NOT_FINISHED,
message='Premature end of data in tag x line 1\n',
level=libxml2.XML_ERR_FATAL,
file='dummy.xml',
line=3)
if __name__ == "__main__":
unittest.main()
@@ -1,41 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
uri = libxml2.parseURI("http://example.org:8088/foo/bar?query=simple#fragid")
if uri.scheme() != 'http':
print "Error parsing URI: wrong scheme"
sys.exit(1)
if uri.server() != 'example.org':
print "Error parsing URI: wrong server"
sys.exit(1)
if uri.port() != 8088:
print "Error parsing URI: wrong port"
sys.exit(1)
if uri.path() != '/foo/bar':
print "Error parsing URI: wrong path"
sys.exit(1)
if uri.query() != 'query=simple':
print "Error parsing URI: wrong query"
sys.exit(1)
if uri.fragment() != 'fragid':
print "Error parsing URI: wrong query"
sys.exit(1)
uri.setScheme("https")
uri.setPort(223)
uri.setFragment(None)
result=uri.saveUri()
if result != "https://example.org:223/foo/bar?query=simple":
print "Error modifying or saving the URI"
uri = None
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,36 +0,0 @@
#!/usr/bin/python -u
import libxml2
import libxml2mod
import sys
def error(msg, data):
pass
# Memory debug specific
libxml2.debugMemory(1)
dtd="""<!ELEMENT foo EMPTY>"""
instance="""<?xml version="1.0"?>
<foo></foo>"""
dtd = libxml2.parseDTD(None, 'test.dtd')
ctxt = libxml2.newValidCtxt()
libxml2mod.xmlSetValidErrors(ctxt._o, error, error)
doc = libxml2.parseDoc(instance)
ret = doc.validateDtd(ctxt, dtd)
if ret != 1:
print "error doing DTD validation"
sys.exit(1)
doc.freeDoc()
dtd.freeDtd()
del dtd
del ctxt
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,63 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
#memory debug specific
libxml2.debugMemory(1)
called = ""
def foo(ctx, x):
global called
#
# test that access to the XPath evaluation contexts
#
pctxt = libxml2.xpathParserContext(_obj=ctx)
ctxt = pctxt.context()
called = ctxt.function()
return x + 1
def bar(ctxt, x):
return "%d" % (x + 2)
doc = libxml2.parseFile("tst.xml")
ctxt = doc.xpathNewContext()
res = ctxt.xpathEval("//*")
if len(res) != 2:
print "xpath query: wrong node set size"
sys.exit(1)
if res[0].name != "doc" or res[1].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
i = 10000
while i > 0:
res = ctxt.xpathEval("foo(1)")
if res != 2:
print "xpath extension failure"
sys.exit(1)
i = i - 1
i = 10000
while i > 0:
res = ctxt.xpathEval("bar(1)")
if res != "3":
print "xpath extension failure got %s expecting '3'"
sys.exit(1)
i = i - 1
doc.freeDoc()
ctxt.xpathFreeContext()
if called != "foo":
print "xpath function: failed to access the context"
print "xpath function: %s" % (called)
sys.exit(1)
#memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,4 +0,0 @@
<!DOCTYPE doc [
<!ELEMENT doc EMPTY>
]>
<doc/>
@@ -1,59 +0,0 @@
#!/usr/bin/python -u
import libxml2
import sys
ARG = 'test string'
class ErrorHandler:
def __init__(self):
self.errors = []
def handler(self, msg, data):
if data != ARG:
raise Exception, "Error handler did not receive correct argument"
self.errors.append(msg)
# Memory debug specific
libxml2.debugMemory(1)
dtd="""<!ELEMENT foo EMPTY>"""
valid="""<?xml version="1.0"?>
<foo></foo>"""
invalid="""<?xml version="1.0"?>
<foo><bar/></foo>"""
dtd = libxml2.parseDTD(None, 'test.dtd')
ctxt = libxml2.newValidCtxt()
e = ErrorHandler()
ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
# Test valid document
doc = libxml2.parseDoc(valid)
ret = doc.validateDtd(ctxt, dtd)
if ret != 1 or e.errors:
print "error doing DTD validation"
sys.exit(1)
doc.freeDoc()
# Test invalid document
doc = libxml2.parseDoc(invalid)
ret = doc.validateDtd(ctxt, dtd)
if ret != 0 or not e.errors:
print "Error: document supposed to be invalid"
doc.freeDoc()
dtd.freeDtd()
del dtd
del ctxt
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,76 +0,0 @@
#!/usr/bin/python -u
import libxml2
import sys
ARG = 'test string'
class ErrorHandler:
def __init__(self):
self.errors = []
def handler(self, msg, data):
if data != ARG:
raise Exception, "Error handler did not receive correct argument"
self.errors.append(msg)
# Memory debug specific
libxml2.debugMemory(1)
schema="""<?xml version="1.0"?>
<element name="foo"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/annotation/1.0"
xmlns:ex1="http://www.example.com/n1"
xmlns:ex2="http://www.example.com/n2">
<a:documentation>A foo element.</a:documentation>
<element name="ex1:bar1">
<empty/>
</element>
<element name="ex2:bar2">
<empty/>
</element>
</element>
"""
valid="""<?xml version="1.0"?>
<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1"/><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
invalid="""<?xml version="1.0"?>
<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1">bad</pre1:bar1><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
rngs = rngp.relaxNGParse()
ctxt = rngs.relaxNGNewValidCtxt()
e = ErrorHandler()
ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
# Test valid document
doc = libxml2.parseDoc(valid)
ret = doc.relaxNGValidateDoc(ctxt)
if ret != 0 or e.errors:
print "error doing RelaxNG validation"
sys.exit(1)
doc.freeDoc()
# Test invalid document
doc = libxml2.parseDoc(invalid)
ret = doc.relaxNGValidateDoc(ctxt)
if ret == 0 or not e.errors:
print "Error: document supposed to be RelaxNG invalid"
sys.exit(1)
doc.freeDoc()
del rngp
del rngs
del ctxt
libxml2.relaxNGCleanupTypes()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,83 +0,0 @@
#!/usr/bin/python -u
import libxml2
import sys
ARG = 'test string'
class ErrorHandler:
def __init__(self):
self.errors = []
def handler(self, msg, data):
if data != ARG:
raise Exception, "Error handler did not receive correct argument"
self.errors.append(msg)
# Memory debug specific
libxml2.debugMemory(1)
schema="""<?xml version="1.0" encoding="iso-8859-1"?>
<schema xmlns = "http://www.w3.org/2001/XMLSchema">
<element name = "Customer">
<complexType>
<sequence>
<element name = "FirstName" type = "string" />
<element name = "MiddleInitial" type = "string" />
<element name = "LastName" type = "string" />
</sequence>
<attribute name = "customerID" type = "integer" />
</complexType>
</element>
</schema>"""
valid="""<?xml version="1.0" encoding="iso-8859-1"?>
<Customer customerID = "24332">
<FirstName>Raymond</FirstName>
<MiddleInitial>G</MiddleInitial>
<LastName>Bayliss</LastName>
</Customer>
"""
invalid="""<?xml version="1.0" encoding="iso-8859-1"?>
<Customer customerID = "24332">
<MiddleInitial>G</MiddleInitial>
<LastName>Bayliss</LastName>
</Customer>
"""
e = ErrorHandler()
ctxt_parser = libxml2.schemaNewMemParserCtxt(schema, len(schema))
ctxt_schema = ctxt_parser.schemaParse()
ctxt_valid = ctxt_schema.schemaNewValidCtxt()
ctxt_valid.setValidityErrorHandler(e.handler, e.handler, ARG)
# Test valid document
doc = libxml2.parseDoc(valid)
ret = doc.schemaValidateDoc(ctxt_valid)
if ret != 0 or e.errors:
print "error doing schema validation"
sys.exit(1)
doc.freeDoc()
# Test invalid document
doc = libxml2.parseDoc(invalid)
ret = doc.schemaValidateDoc(ctxt_valid)
if ret == 0 or not e.errors:
print "Error: document supposer to be schema invalid"
sys.exit(1)
doc.freeDoc()
del ctxt_parser
del ctxt_schema
del ctxt_valid
libxml2.schemaCleanupTypes()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,82 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
ctxt = libxml2.createFileParserCtxt("valid.xml")
ctxt.validate(1)
ctxt.parseDocument()
doc = ctxt.doc()
valid = ctxt.isValid()
if doc.name != "valid.xml":
print "doc.name failed"
sys.exit(1)
root = doc.children
if root.name != "doc":
print "root.name failed"
sys.exit(1)
if valid != 1:
print "validity chec failed"
sys.exit(1)
doc.freeDoc()
i = 1000
while i > 0:
ctxt = libxml2.createFileParserCtxt("valid.xml")
ctxt.validate(1)
ctxt.parseDocument()
doc = ctxt.doc()
valid = ctxt.isValid()
doc.freeDoc()
if valid != 1:
print "validity check failed"
sys.exit(1)
i = i - 1
#desactivate error messages from the validation
def noerr(ctx, str):
pass
libxml2.registerErrorHandler(noerr, None)
ctxt = libxml2.createFileParserCtxt("invalid.xml")
ctxt.validate(1)
ctxt.parseDocument()
doc = ctxt.doc()
valid = ctxt.isValid()
if doc.name != "invalid.xml":
print "doc.name failed"
sys.exit(1)
root = doc.children
if root.name != "doc":
print "root.name failed"
sys.exit(1)
if valid != 0:
print "validity chec failed"
sys.exit(1)
doc.freeDoc()
i = 1000
while i > 0:
ctxt = libxml2.createFileParserCtxt("invalid.xml")
ctxt.validate(1)
ctxt.parseDocument()
doc = ctxt.doc()
valid = ctxt.isValid()
doc.freeDoc()
if valid != 0:
print "validity check failed"
sys.exit(1)
i = i - 1
del ctxt
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-145
View File
@@ -1,145 +0,0 @@
#!/usr/bin/python -u
#
# this tests the entities substitutions with the XmlTextReader interface
#
import sys
import StringIO
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
result = ""
def processNode(reader):
global result
result = result + "%d %d %s %d\n" % (reader.Depth(), reader.NodeType(),
reader.Name(), reader.IsEmptyElement())
#
# Parse a document testing the readerForxxx API
#
docstr="""<foo>
<label>some text</label>
<item>100</item>
</foo>"""
expect="""0 1 foo 0
1 14 #text 0
1 1 label 0
2 3 #text 0
1 15 label 0
1 14 #text 0
1 1 item 0
2 3 #text 0
1 15 item 0
1 14 #text 0
0 15 foo 0
"""
result = ""
doc = libxml2.parseDoc(docstr)
reader = doc.readerWalker();
ret = reader.Read()
while ret == 1:
processNode(reader)
ret = reader.Read()
if ret != 0:
print "Error parsing the document test1"
sys.exit(1)
if result != expect:
print "Unexpected result for test1"
print result
sys.exit(1)
doc.freeDoc()
#
# Reuse the reader for another document testing the ReaderNewWalker API
#
docstr="""<foo>
<label>some text</label>
<item>1000</item>
</foo>"""
expect="""0 1 foo 0
1 14 #text 0
1 1 label 0
2 3 #text 0
1 15 label 0
1 14 #text 0
1 1 item 0
2 3 #text 0
1 15 item 0
1 14 #text 0
0 15 foo 0
"""
result = ""
doc = libxml2.parseDoc(docstr)
reader.NewWalker(doc)
ret = reader.Read()
while ret == 1:
processNode(reader)
ret = reader.Read()
if ret != 0:
print "Error parsing the document test2"
sys.exit(1)
if result != expect:
print "Unexpected result for test2"
print result
sys.exit(1)
doc.freeDoc()
#
# Reuse the reader for another document testing the ReaderNewxxx API
#
docstr="""<foo>
<label>some text</label>
<item>1000</item>
</foo>"""
expect="""0 1 foo 0
1 14 #text 0
1 1 label 0
2 3 #text 0
1 15 label 0
1 14 #text 0
1 1 item 0
2 3 #text 0
1 15 item 0
1 14 #text 0
0 15 foo 0
"""
result = ""
reader.NewDoc(docstr, "test3", None, 0)
ret = reader.Read()
while ret == 1:
processNode(reader)
ret = reader.Read()
if ret != 0:
print "Error parsing the document test3"
sys.exit(1)
if result != expect:
print "Unexpected result for test3"
print result
sys.exit(1)
#
# cleanup
#
del reader
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-51
View File
@@ -1,51 +0,0 @@
#!/usr/bin/python -u
#
# this test exercise the XPath basic engine, parser, etc, and
# allows to detect memory leaks
#
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
doc = libxml2.parseFile("tst.xml")
if doc.name != "tst.xml":
print "doc.name error"
sys.exit(1);
ctxt = doc.xpathNewContext()
res = ctxt.xpathEval("//*")
if len(res) != 2:
print "xpath query: wrong node set size"
sys.exit(1)
if res[0].name != "doc" or res[1].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
ctxt.setContextNode(res[0])
res = ctxt.xpathEval("foo")
if len(res) != 1:
print "xpath query: wrong node set size"
sys.exit(1)
if res[0].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
doc.freeDoc()
ctxt.xpathFreeContext()
i = 1000
while i > 0:
doc = libxml2.parseFile("tst.xml")
ctxt = doc.xpathNewContext()
res = ctxt.xpathEval("//*")
doc.freeDoc()
ctxt.xpathFreeContext()
i = i -1
del ctxt
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,49 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
def foo(ctx, x):
return x + 1
def bar(ctx, x):
return "%d" % (x + 2)
doc = libxml2.parseFile("tst.xml")
ctxt = doc.xpathNewContext()
res = ctxt.xpathEval("//*")
if len(res) != 2:
print "xpath query: wrong node set size"
sys.exit(1)
if res[0].name != "doc" or res[1].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
i = 10000
while i > 0:
res = ctxt.xpathEval("foo(1)")
if res != 2:
print "xpath extension failure"
sys.exit(1)
i = i - 1
i = 10000
while i > 0:
res = ctxt.xpathEval("bar(1)")
if res != "3":
print "xpath extension failure got %s expecting '3'"
sys.exit(1)
i = i - 1
doc.freeDoc()
ctxt.xpathFreeContext()
# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
@@ -1,57 +0,0 @@
#!/usr/bin/python -u
import sys
import libxml2
#memory debug specific
libxml2.debugMemory(1)
#
# A document hosting the nodes returned from the extension function
#
mydoc = libxml2.newDoc("1.0")
def foo(ctx, str):
global mydoc
#
# test returning a node set works as expected
#
parent = mydoc.newDocNode(None, 'p', None)
mydoc.addChild(parent)
node = mydoc.newDocText(str)
parent.addChild(node)
return [parent]
doc = libxml2.parseFile("tst.xml")
ctxt = doc.xpathNewContext()
libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
res = ctxt.xpathEval("foo('hello')")
if type(res) != type([]):
print "Failed to return a nodeset"
sys.exit(1)
if len(res) != 1:
print "Unexpected nodeset size"
sys.exit(1)
node = res[0]
if node.name != 'p':
print "Unexpected nodeset element result"
sys.exit(1)
node = node.children
if node.type != 'text':
print "Unexpected nodeset element children type"
sys.exit(1)
if node.content != 'hello':
print "Unexpected nodeset element children content"
sys.exit(1)
doc.freeDoc()
mydoc.freeDoc()
ctxt.xpathFreeContext()
#memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
-738
View File
@@ -1,738 +0,0 @@
/*
* types.c: converter functions between the internal representation
* and the Python objects
*
* See Copyright for the status of this software.
*
* [email protected]
*/
#include "libxml_wrap.h"
PyObject *
libxml_intWrap(int val)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_intWrap: val = %d\n", val);
#endif
ret = PyInt_FromLong((long) val);
return (ret);
}
PyObject *
libxml_longWrap(long val)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_longWrap: val = %ld\n", val);
#endif
ret = PyInt_FromLong(val);
return (ret);
}
PyObject *
libxml_doubleWrap(double val)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_doubleWrap: val = %f\n", val);
#endif
ret = PyFloat_FromDouble((double) val);
return (ret);
}
PyObject *
libxml_charPtrWrap(char *str)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
#endif
if (str == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
/* TODO: look at deallocation */
ret = PyString_FromString(str);
xmlFree(str);
return (ret);
}
PyObject *
libxml_charPtrConstWrap(const char *str)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
#endif
if (str == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
/* TODO: look at deallocation */
ret = PyString_FromString(str);
return (ret);
}
PyObject *
libxml_xmlCharPtrWrap(xmlChar * str)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
#endif
if (str == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
/* TODO: look at deallocation */
ret = PyString_FromString((char *) str);
xmlFree(str);
return (ret);
}
PyObject *
libxml_xmlCharPtrConstWrap(const xmlChar * str)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
#endif
if (str == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
/* TODO: look at deallocation */
ret = PyString_FromString((char *) str);
return (ret);
}
PyObject *
libxml_constcharPtrWrap(const char *str)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
#endif
if (str == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
/* TODO: look at deallocation */
ret = PyString_FromString(str);
return (ret);
}
PyObject *
libxml_constxmlCharPtrWrap(const xmlChar * str)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
#endif
if (str == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
/* TODO: look at deallocation */
ret = PyString_FromString((char *) str);
return (ret);
}
PyObject *
libxml_xmlDocPtrWrap(xmlDocPtr doc)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlDocPtrWrap: doc = %p\n", doc);
#endif
if (doc == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
/* TODO: look at deallocation */
ret =
PyCObject_FromVoidPtrAndDesc((void *) doc, (char *) "xmlDocPtr",
NULL);
return (ret);
}
PyObject *
libxml_xmlNodePtrWrap(xmlNodePtr node)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlNodePtrWrap: node = %p\n", node);
#endif
if (node == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "xmlNodePtr",
NULL);
return (ret);
}
PyObject *
libxml_xmlURIPtrWrap(xmlURIPtr uri)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlURIPtrWrap: uri = %p\n", uri);
#endif
if (uri == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) uri, (char *) "xmlURIPtr",
NULL);
return (ret);
}
PyObject *
libxml_xmlNsPtrWrap(xmlNsPtr ns)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlNsPtrWrap: node = %p\n", ns);
#endif
if (ns == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ns, (char *) "xmlNsPtr",
NULL);
return (ret);
}
PyObject *
libxml_xmlAttrPtrWrap(xmlAttrPtr attr)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlAttrNodePtrWrap: attr = %p\n", attr);
#endif
if (attr == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) attr, (char *) "xmlAttrPtr",
NULL);
return (ret);
}
PyObject *
libxml_xmlAttributePtrWrap(xmlAttributePtr attr)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlAttributePtrWrap: attr = %p\n", attr);
#endif
if (attr == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) attr,
(char *) "xmlAttributePtr", NULL);
return (ret);
}
PyObject *
libxml_xmlElementPtrWrap(xmlElementPtr elem)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlElementNodePtrWrap: elem = %p\n", elem);
#endif
if (elem == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) elem,
(char *) "xmlElementPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlXPathContextPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlXPathContextPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlXPathParserContextPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlXPathParserContextPtr",
NULL);
return (ret);
}
PyObject *
libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlParserCtxtPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlParserCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlXPathObjectPtrWrap: ctxt = %p\n", obj);
#endif
if (obj == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
switch (obj->type) {
case XPATH_XSLT_TREE: {
if ((obj->nodesetval == NULL) ||
(obj->nodesetval->nodeNr == 0) ||
(obj->nodesetval->nodeTab == NULL)) {
ret = PyList_New(0);
} else {
int i, len = 0;
xmlNodePtr node;
node = obj->nodesetval->nodeTab[0]->children;
while (node != NULL) {
len++;
node = node->next;
}
ret = PyList_New(len);
node = obj->nodesetval->nodeTab[0]->children;
for (i = 0;i < len;i++) {
PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
node = node->next;
}
}
/*
* Return now, do not free the object passed down
*/
return (ret);
}
case XPATH_NODESET:
if ((obj->nodesetval == NULL)
|| (obj->nodesetval->nodeNr == 0)) {
ret = PyList_New(0);
} else {
int i;
xmlNodePtr node;
ret = PyList_New(obj->nodesetval->nodeNr);
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
node = obj->nodesetval->nodeTab[i];
/* TODO: try to cast directly to the proper node type */
PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
}
}
break;
case XPATH_BOOLEAN:
ret = PyInt_FromLong((long) obj->boolval);
break;
case XPATH_NUMBER:
ret = PyFloat_FromDouble(obj->floatval);
break;
case XPATH_STRING:
ret = PyString_FromString((char *) obj->stringval);
break;
case XPATH_POINT:
case XPATH_RANGE:
case XPATH_LOCATIONSET:
default:
printf("Unable to convert XPath object type %d\n", obj->type);
Py_INCREF(Py_None);
ret = Py_None;
}
xmlXPathFreeObject(obj);
return (ret);
}
xmlXPathObjectPtr
libxml_xmlXPathObjectPtrConvert(PyObject * obj)
{
xmlXPathObjectPtr ret = NULL;
#ifdef DEBUG
printf("libxml_xmlXPathObjectPtrConvert: obj = %p\n", obj);
#endif
if (obj == NULL) {
return (NULL);
}
if PyFloat_Check
(obj) {
ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
} else if PyString_Check
(obj) {
xmlChar *str;
str = xmlStrndup((const xmlChar *) PyString_AS_STRING(obj),
PyString_GET_SIZE(obj));
ret = xmlXPathWrapString(str);
} else if PyList_Check
(obj) {
int i;
PyObject *node;
xmlNodePtr cur;
xmlNodeSetPtr set;
set = xmlXPathNodeSetCreate(NULL);
for (i = 0; i < PyList_Size(obj); i++) {
node = PyList_GetItem(obj, i);
if ((node == NULL) || (node->ob_type == NULL))
continue;
cur = NULL;
if (PyCObject_Check(node)) {
printf("Got a CObject\n");
cur = PyxmlNode_Get(node);
} else if (PyInstance_Check(node)) {
PyInstanceObject *inst = (PyInstanceObject *) node;
PyObject *name = inst->in_class->cl_name;
if PyString_Check
(name) {
char *type = PyString_AS_STRING(name);
PyObject *wrapper;
if (!strcmp(type, "xmlNode")) {
wrapper =
PyObject_GetAttrString(node, (char *) "_o");
if (wrapper != NULL) {
cur = PyxmlNode_Get(wrapper);
}
}
}
} else {
printf("Unknown object in Python return list\n");
}
if (cur != NULL) {
xmlXPathNodeSetAdd(set, cur);
}
}
ret = xmlXPathWrapNodeSet(set);
} else {
printf("Unable to convert Python Object to XPath");
}
Py_DECREF(obj);
return (ret);
}
PyObject *
libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlValidCtxtPtrWrap: valid = %p\n", valid);
#endif
if (valid == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) valid,
(char *) "xmlValidCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlCatalogPtrWrap(xmlCatalogPtr catal)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlNodePtrWrap: catal = %p\n", catal);
#endif
if (catal == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) catal,
(char *) "xmlCatalogPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlOutputBufferPtrWrap: buffer = %p\n", buffer);
#endif
if (buffer == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) buffer,
(char *) "xmlOutputBufferPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlParserInputBufferPtrWrap: buffer = %p\n", buffer);
#endif
if (buffer == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) buffer,
(char *) "xmlParserInputBufferPtr", NULL);
return (ret);
}
#ifdef LIBXML_REGEXP_ENABLED
PyObject *
libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlRegexpPtrWrap: regexp = %p\n", regexp);
#endif
if (regexp == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) regexp,
(char *) "xmlRegexpPtr", NULL);
return (ret);
}
#endif /* LIBXML_REGEXP_ENABLED */
PyObject *
libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlTextReaderPtrWrap: reader = %p\n", reader);
#endif
if (reader == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) reader,
(char *) "xmlTextReaderPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlTextReaderLocatorPtrWrap: locator = %p\n", locator);
#endif
if (locator == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) locator,
(char *) "xmlTextReaderLocatorPtr", NULL);
return (ret);
}
#ifdef LIBXML_SCHEMAS_ENABLED
PyObject *
libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlRelaxNGPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlRelaxNGPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlRelaxNGParserCtxtPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlRelaxNGParserCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlRelaxNGValidCtxtPtrWrap: valid = %p\n", valid);
#endif
if (valid == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) valid,
(char *) "xmlRelaxNGValidCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlSchemaPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlSchemaPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlSchemaParserCtxtPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlSchemaParserCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlSchemaValidCtxtPtrWrap: valid = %p\n", valid);
#endif
if (valid == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) valid,
(char *) "xmlSchemaValidCtxtPtr", NULL);
return (ret);
}
#endif /* LIBXML_SCHEMAS_ENABLED */
PyObject *
libxml_xmlErrorPtrWrap(xmlErrorPtr error)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlErrorPtrWrap: error = %p\n", error);
#endif
if (error == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) error,
(char *) "xmlErrorPtr", NULL);
return (ret);
}
-2
View File
@@ -1,2 +0,0 @@
Makefile
Makefile.in
-4
View File
@@ -1,4 +0,0 @@
05:54:02 PM
MEMORY ALLOCATED : 0, MAX was 12937
BLOCK NUMBER SIZE TYPE
-12
View File
@@ -1,12 +0,0 @@
<html>
<head>
<title>This service is temporary down</title>
</head>
<body bgcolor="#FFFFFF">
<h1 align="center">Sorry, this service is temporary down</h1>
We are doing our best to get it back on-line,
<p>The W3C system administrators</p>
</body>
</html>
@@ -1,5 +0,0 @@
<html>
<body bgcolor="#FFFFFF">
<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#107;&#97;&#116;&#104;&#101;&#114;&#105;&#110;&#101;&#64;&#99;&#98;&#102;&#97;&#110;&#99;&#46;&#111;&#114;&#103;&#44;&#119;&#101;&#98;&#115;&#105;&#116;&#101;&#64;&#98;&#105;&#115;&#46;&#100;&#111;&#99;&#46;&#103;&#111;&#118;&#63;&#115;&#117;&#98;&#106;&#101;&#99;&#116;&#61;&#83;&#111;&#117;&#116;&#104;&#32;&#83;&#97;&#110;&#32;&#70;&#114;&#97;&#110;&#99;&#105;&#115;&#99;&#111;&#32;&#66;&#73;&#83;&#32;&#83;&#101;&#109;&#105;&#110;&#97;&#114;&#32;&#45;&#32;&#79;&#99;&#116;&#111;&#98;&#101;&#114;&#32;&#49;&#54;&#116;&#104;"></a><br>
</body>
</html>
@@ -1 +0,0 @@
<hr>
@@ -1 +0,0 @@
<p>toto
@@ -1,3 +0,0 @@
<ul>
<li>item 1
<li>item 2
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>gnome-xml push mode bug</title>
</head>
<body>
<table border="4">
<tr>
<td bgcolor="white">
Foo1
<table border="4">
<tr>
<td>Foo2<p><p></td></tr></table>
</td>
<td bgcolor="blue">Foo3</td>
</tr>
</table>
</body>
</html>
-30
View File
@@ -1,30 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0016)http://intranet/ -->
<!-- BEGIN Naviscope Javascript --><HTML><HEAD><TITLE>Welcome to Copernic.com</TITLE>
<SCRIPT language=javascript>
NS_ActualOpen=window.open;
function NS_NullWindow(){this.window;}
function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());}
window.open=NS_NewOpen;
</SCRIPT>
<!-- END Naviscope Javascript --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- saved from url=(0027)http://www.agents-tech.com/ -->
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META
content="Copernic.com Inc. develops innovative agent technology solutions to efficiently access and manage the overwhelming quantity of information available on the Internet and intranets."
name=DESCRIPTION>
<META
content=agent,technology,intranet,extranet,management,filtering,ranking,solution,service,intelligent,intelligence,client,server,architecture,developer,development,information,telecommunication,announcement,press,product,profile,contact,multi-agent,meta-search,metasearch,multi-thread,mobile,wireless,shopping,robot,PCS,Copernic,engine,toolkit,CDK,EDK
name=KEYWORDS>
<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD><FRAMESET
border=false cols=172,* frameBorder=0 frameSpacing=0><FRAME marginHeight=0
marginWidth=0 name=left noResize scrolling=no src="doc2_files/side.htm"
target="rtop"><FRAMESET rows=43,*><FRAME marginHeight=0 marginWidth=0 name=rtop
noResize scrolling=no src="doc2_files/top.htm" target="rbottom"><FRAME
name=rbottom noResize src="doc2_files/contents.htm"
target="_top"></FRAMESET><NOFRAMES>
<body bgcolor="#FFFFFF" text="#000000" link="#000080" vlink="#000080" alink="#000080"
topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</NOFRAMES></FRAMESET></HTML>
-851
View File
@@ -1,851 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0025)http://bp6.gamesquad.net/ -->
<!-- BEGIN Naviscope Javascript --><HTML><HEAD><TITLE>BP6.com #1 online resource for the BP6 Mobo....</TITLE>
<SCRIPT language=javascript>
NS_ActualOpen=window.open;
function NS_NullWindow(){this.window;}
function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());}
window.open=NS_NewOpen;
</SCRIPT>
<!-- END Naviscope Javascript --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><!--last modified on Tuesday, February 22, 2000 11:47 PM -->
<META content=text/html;CHARSET=iso-8859-1 http-equiv=Content-Type>
<META content=Tim name=Author>
<STYLE type=text/css>A.nav {
COLOR: #003399; TEXT-DECORATION: none
}
A.nav:hover {
COLOR: #3366cc; TEXT-DECORATION: underline
}
</STYLE>
<SCRIPT language=JavaScript>
<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL: http://fineline.xs.mw -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=145, height=250');");
}
// End -->
</SCRIPT>
<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY aLink=red bgColor=black link=red text=white vLink=red>
<P>
<DIV align=center>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="80%">
<TBODY>
<TR>
<TD vAlign=top width=31><A href="http://bp6.gamesquad.net/"><IMG
align=bottom border=0 height=74 src="doc3_files/logo.gif"
width=252></A></TD>
<TD align=left bgColor=#000000><IMG height=15 src="doc3_files/spacer.gif"
width=15><!-- START GAMESQUAD.NET IFRAME RICH MEDIA CODE --> <!-- © 2000 GameSquad.net All Rights Reserved. --><IFRAME border=0
frameBorder=no height=60 marginHeight=0 marginWidth=0 scrolling=no
src="doc3_files/adcycle.htm"
width=468>
<a href="http://ads.gamesquad.net/addclick.exe/adclick.cgi?REGION=game|tech|ent&id=1" target="_top"><img src="http://ads.gamesquad.net/addclick.exe/adcycle.cgi?group=52&media=1&id=1" width=468 height=60 border=0 ALT="GSN ROS Ad"></a>
</IFRAME><!-- END GAMESQUAD.NET IFRAME RICH MEDIA CODE --><BR><IMG
height=15 src="doc3_files/spacer.gif" width=400> </TD></TR>
<TR>
<TD bgColor=#003399 colSpan=2>
<P align=right><IMG align=right border=0 height=18 hspace=0
src="doc3_files/trcorner.gif" width=20><IMG align=left border=0 height=18
hspace=0 src="doc3_files/tlcorner.gif" width=20><FONT face=Verdana
size=2>Monday, July 31st, 2000</FONT> </P></TD></TR>
<TR>
<TD colSpan=2>
<TABLE bgColor=#003399 border=0 cellPadding=0 cellSpacing=4
width="100%"><TBODY>
<TR>
<TD bgColor=#666666 width="100%">
<CENTER>
<P>
<TABLE bgColor=black border=0 cellPadding=0 cellSpacing=1
width="100%">
<TBODY>
<TR>
<TD background=doc3_files/hscan.gif bgColor=#666666
width="100%"><IMG height=1 src="doc3_files/spacer.gif"
width=738><BR>
<CENTER>
<TABLE border=0 cellPadding=2 cellSpacing=0 width="91%">
<TBODY>
<TR>
<TD vAlign=top width="15%">
<P align=center><A
href="http://bp6.gamesquad.net/specs.phtml"><IMG
align=bottom
alt="Abit BP6 Motherboard specification and information."
border=0 height=45 src="doc3_files/bp6icon.gif"
width=70></A><FONT face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/specs.phtml"><FONT
color=white face=Verdana size=1>BP6 Specs</FONT></A>
</P></TD>
<TD vAlign=top width="15%">
<P align=center><A
href="http://bp6.gamesquad.net/bxcool.phtml"><IMG
align=bottom
alt="How to cool the BX Chipset on your BP6." border=0
height=45 src="doc3_files/bxcool.gif" width=70></A><FONT
face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/uc.phtml"><FONT
color=white face=Verdana size=1>BX Cooling</FONT></A>
</P></TD>
<TD vAlign=top width="15%">
<P align=center><A
href="http://bp6.gamesquad.net/contest.phtml"><IMG
align=bottom
alt="The U;timate Gaming Contest - Coming Soon!"
border=0 height=45 src="doc3_files/ugmcontest.gif"
width=70></A><FONT face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/contest.phtml"><FONT
color=white face=Verdana size=1>UGM Contest</FONT></A>
</P></TD>
<TD vAlign=top width="15%">
<P align=center><A
href="http://bp6.gamesquad.net/uc.phtml"><IMG
align=bottom
alt="Cooling &amp; Heatsink review for the BP6."
border=0 height=45 src="doc3_files/alpha.gif"
width=70></A><FONT face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/uc.phtml"><FONT
color=white face=Verdana size=1>Heatsinks</FONT></A>
</P></TD>
<TD vAlign=top width="15%">
<P align=center><A
href="http://bp6.gamesquad.net/101.phtml"><IMG
align=bottom
alt="BP6 101 - Class is now in session. Welcome newbies!"
border=0 height=45 src="doc3_files/bp6101.gif"
width=70></A><FONT face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/101.phtml"><FONT
color=white face=Verdana size=1>BP6 101</FONT></A>
</P></TD>
<TD vAlign=top width="15%">
<P align=center><A
href="http://bp6.gamesquad.net/win2k_install.phtml"><IMG
align=bottom
alt="Install guide for installing Windows 2000 on the BP6 "
border=0 height=45 src="doc3_files/win2kht.gif"
width=70></A><FONT face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/win2k_install.phtml"><FONT
color=white face=Verdana size=1>Win2k Install</FONT></A>
</P></TD>
<TD vAlign=top width="15%">
<P align=center><A href="http://www.gentus.com/"><IMG
align=bottom
alt="Taking a first look at the Abit Linux release called "
border=0 height=45 src="doc3_files/gentusbox.gif"
width=70 Gentus?.?></A><BR><A
href="http://www.gentus.com/"><FONT color=white
face=Verdana size=1>Gentus</FONT></A>
</P></TD></TR></TBODY></TABLE></CENTER></TD></TR></TBODY></TABLE></CENTER></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE bgColor=#003399 border=0 cellSpacing=6 width="80%">
<TBODY>
<TR>
<TD bgColor=black vAlign=top width="10%">
<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD width="100%"><IMG height=1 src="doc3_files/spacer.gif"
width=111><BR><B><FONT color=yellow face=Verdana
size=2>REVIEWS</FONT></B><FONT face=Verdana size=2><BR>
<HR align=center>
</FONT><A href="http://bp6.gamesquad.net/bp6reviews.phtml"><FONT
color=white face=Verdana size=1>BP6 Reviews</FONT></A><FONT
face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/h2o.phtml"><FONT color=white
face=Verdana size=1>BP6 Watercooling</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/bxcool.phtml"><FONT color=white
face=Verdana size=1>BX Chipset Cooling</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/benchmark.phtml"><FONT color=white
face=Verdana size=1>Benchmarks</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/bp6fsb.phtml"><FONT color=white
face=Verdana size=1>BP6FSB Utility</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/powerleap.phtml"><FONT color=white
face=Verdana size=1>PowerLeap NEO S370</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/seti.phtml"><FONT color=white
face=Verdana size=1>SETI on the BP6</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/orbs.phtml"><FONT color=white
face=Verdana size=1>Golden Orbs I</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/orbs/orbs2.phtml"><FONT color=white
face=Verdana size=1>Golden Orbs II</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/Q6fix.phtml"><FONT color=white
face=Verdana size=1>VTT Solution</FONT></A><FONT face=Verdana
size=1><BR><BR></FONT><B><FONT color=yellow face=Verdana
size=2>NAVIGATE</FONT></B><FONT color=yellow face=Verdana size=2>
<HR align=center>
</FONT><A href="http://www.bp6.com/"><FONT color=white face=Verdana
size=1>News</FONT></A><FONT face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/chat.phtml"><FONT color=white
face=Verdana size=1>Online Text Chat</FONT></A><FONT face=Verdana
size=1><BR></FONT><A href="javascript:popUp('chat_popup.htm')"><FONT
color=white face=Verdana size=1>Voice Chat</FONT></A><BR><A
href="http://216.247.220.192/Forum"><FONT color=white face=Verdana
size=1>Messageboard</FONT></A><FONT face=Verdana
size=1><BR></FONT><A href="http://bp6.gamesquad.net/cooling"><FONT
color=white face=Verdana size=1>Temp. Converter</FONT></A><FONT
face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/uc.phtml"><FONT color=white
face=Verdana size=1>Picture Gallery</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/bios.phtml"><FONT color=white
face=Verdana size=1>Latest BIOS</FONT></A><FONT face=Verdana
size=1><BR></FONT><A href="http://bp6.gamesquad.net/files/"><FONT
color=white face=Verdana size=1>Drivers &amp; Files</FONT></A><FONT
face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/uc.phtml"><FONT color=white
face=Verdana size=1>UGM of the week</FONT></A><FONT face=Verdana
size=1><BR></FONT><A
href="http://bp6.gamesquad.net/contest.phtml"><FONT color=white
face=Verdana size=1>BP6 Contest</FONT></A><FONT face=Verdana
size=1><BR><BR></FONT><B><FONT color=yellow face=Verdana
size=2>OTHER STUFF</FONT></B><FONT color=yellow face=Verdana size=2>
<HR align=center>
</FONT><A href="http://bp6.gamesquad.net/whois.phtml"><FONT
color=white face=Verdana size=1>Who is Tim?</FONT></A><FONT
face=Verdana size=1><BR></FONT><A href="mailto:[email protected]"><FONT
color=white face=Verdana size=1>Contact BP6.com</FONT></A><FONT
face=Verdana size=1><BR></FONT><A
href="http://bp6.gamesquad.net/uc.phtml"><FONT color=white
face=Verdana size=1>Affiliates Section</FONT></A><FONT face=Verdana
size=1><BR></FONT><A href="http://bp6.gamesquad.net/uc.phtml"><FONT
color=white face=Verdana size=1>Sponsors Section <BR></FONT><A
href="http://bp6.gamesquad.net/links.phtml"><FONT color=white
face=Verdana size=1>Links<BR><BR></FONT></A><B><FONT color=yellow
face=Verdana size=2>PC SPECIALS</FONT></B><FONT color=yellow
face=Verdana size=2>
<HR align=center>
</FONT><A href="http://bp6.gamesquad.net/specials.phtml"><FONT
color=white face=Verdana size=1>Vendor
Specials<BR><BR></FONT></A><BR></FONT></A><B><FONT color=yellow
face=Verdana size=2>Pic of the day</FONT></B>
<HR>
<CENTER>
<P align=center><FONT face="Verdana, Arial, Helvetica" size=1><A
href="http://bp6.gamesquad.net/cgi-bin/schlabo/potd.pl"><IMG
alt="No picture is available for today." border=0
src="doc3_files/potd_na_110x83.gif"></A> </FONT></P></CENTER><BR>
<CENTER></CENTER><BR><!--<A HREF="code:javascript:ID_FTPWebView.InvokeHelp()"><FONT SIZE="1" COLOR="white" FACE="Verdana">FTP Help</FONT></A>--></TD></TR></TBODY></TABLE></TD>
<TD bgColor=white vAlign=top width="80%"><IMG height=1
src="doc3_files/spacer.gif" width=490><BR>
<CENTER>
<P>
<TABLE bgColor=white border=0 cellPadding=10 cellSpacing=0 height="100%"
width="100%">
<TBODY>
<TR>
<TD bgColor=white vAlign=top width="100%">
<CENTER><A href="http://www.encounter2001.com/" target=_blank><IMG
border=0 height=60 src="doc3_files/banner2.gif" width=468></A>
</CENTER><BR><A name=news_top></A><FONT color=#003366
face=verdana,arial size=2><B>Headlines</B></FONT><BR><FONT
face=arial size=1><A class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem965012956,78924,">Chat
with ABIT - 8:09PM PDT</A></FONT><BR><FONT face=arial size=1><A
class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964766837,26344,">Fixed
wallpaper - 11:47PM PDT</A></FONT><BR><FONT face=arial size=1><A
class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964762841,25865,">Seti
update - 10:40PM PDT</A></FONT><BR><FONT face=arial size=1><A
class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964732235,45502,">Judge
gives Napster the Boot!! - 2:10PM PDT</A></FONT><BR><FONT face=arial
size=1><A class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964713289,83675,">Ram
Sinks.. more cooling for small places. - 8:54AM
PDT</A></FONT><BR><FONT face=arial size=1><A class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964671589,7831,">is
it [H]ard? - 9:19PM PDT</A></FONT><BR><FONT face=arial size=1><A
class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964644047,60218,">WiLd
CaSe!! - 1:40PM PDT</A></FONT><BR><FONT face=arial size=1><A
class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964631110,84122,">What
the heck is a Peltier?!?! - 10:05AM PDT</A></FONT><BR><FONT
face=arial size=1><A class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964587833,74573,">HELLO
EVERYONE!!! - 10:03PM PDT</A></FONT><BR><FONT face=arial size=1><A
class=nav
href="http://bp6.gamesquad.net/index.phtml#newsitem964429577,13375,">BP6
Q3 server up and running.. - 2:06AM PDT</A></FONT><BR><BR><!-- NP v3.7.5 --><A
name=newsitem965012956,78924,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Sunday,
July 30, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>Chat with
ABIT</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 8:09PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/965012956,78924,.html"><IMG
border=0 src="doc3_files/comments.gif">0 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>I&#8217;m slacking a little. All game no
work makes Holodeck2 a happy boy :-)<BR><BR>Wallpaper update: I got
off my lazy ass and redid the 1280x1024 wall paper, now it has the 2
celerons.<BR><BR><B><A href="http://fullon3d.com/chat/abit/"
target=3d>Fullon3d had a live chat with that Eric guy from Abit.
</A></B>Submitted by: MJS<BR><BR>Here&#8217;s a little clip:<BR>[Falcon]
BP6-2??<BR>[EricBoeing] We already have a micro ATX dual flip-chip
board<BR>[EricBoeing] but it's OEM only<BR>[EricBoeing] the full ATX
version should be out Septemberish<BR></FONT><BR><BR><A
name=newsitem964766837,26344,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Thursday,
July 27, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>Fixed
wallpaper</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 11:47PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964766837,26344,.html"><IMG
border=0 src="doc3_files/comments.gif">5 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2><B>Get them now!!</B><BR>This is a
fixed bp6 wallpaper. In all the popular flavors, err...
resolutions.<BR><IMG height=180 src="doc3_files/3-800.jpg"
width=240><BR>It's still the Intels Inside one with a spelling
change; from "Mothboard" to "Motherboard"<BR><BR>Thanks to Matt for
pointing that out to me.<BR>I would also like to thank Kevin for
hosting my last batch and Radu for the previous "DUEL"/"DUAL"
error.<BR>And 1 more person, THANK YOU TIM for letting me borrow
your server space ;-)<BR><BR>If you need a weird resolution, feel
free to <A href="mailto:[email protected]">e-mail</A> me requesting
for one.<BR>If you have ideas or more errors to point out, <A
href="mailto:[email protected]">mailto:[email protected]</A><BR><BR><A
href="doc3_files/3-800.jpg" target=800>800x600 </A><BR><A
href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1024.jpg"
target=800>1024x768 </A><BR><A
href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1152.jpg"
target=800>1152x864 </A><BR><A
href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1280x1024.jpg"
target=800>1280x1024 </A><BR><A
href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1600.jpg"
target=800>1600x1200 </A><BR>
<P>Enjoy :-)<BR>
<P><A href="mailto:[email protected]">Holodeck2,</A><BR>[H]ard at
work on the Brand Spanking New Wallpaper.<BR></FONT><BR><BR><A
name=newsitem964762841,25865,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>Seti update</FONT></U></B><BR><FONT
color=#0066cc face=Arial size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 10:40PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964762841,25865,.html"><IMG
border=0 src="doc3_files/comments.gif">5 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2><IMG height=54
src="doc3_files/setiupdate.jpg" width=400><BR>You like the
pic?<BR><BR>Bp6 User Group Update:<BR>Completed 61531
units!!<BR><B>#168 on Top 200 All Groups</B> (Going to pass CLRC in
a few days)<BR><B>#74 on Top 200 Teams</B> (Gaining fast on
Starfleet)<BR><BR>We are flying though at the speed of light (may be
a little slower).<BR>Good job everyone!!<BR><BR>Check this page at
least once a day for new stuff :-)<BR></FONT><BR><BR><A
name=newsitem964732235,45502,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>Judge gives Napster the
Boot!!</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 2:10PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964732235,45502,.html"><IMG
border=0 src="doc3_files/comments.gif">0 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Good afternoon for everyone living in
EST. I was going to post today morning but I didn't. Here's my
story:<BR>I woke up and thought about posting something but I
decided to wax my car before the sun came up (draw your own
conclusions), wax on, wax off, wax on,..., did that for about an
hour. Then I saw the sun rise (Aaahh I'm melting... not). I sat in
front of my comp and started to search for good news to post. Saw
that a stoopid judge temporally shuts down napster. Goes to room and
cry. and now I'm here :-)<BR><BR><A
href="http://www.msnbc.com/news/437532.asp"
target="Judge vs Napster">Judge shuts Napster down
<P><IMG height=143 src="doc3_files/669915.jpg"
width=200></A><BR>Check out the Goofy guy in the suit<BR>He's Sean
Fanning, founder of Napster.<BR><BR>Got news?? <A
href="mailto:[email protected]">mailto:[email protected]</A><BR></FONT><BR><BR><A
name=newsitem964713289,83675,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>Ram Sinks.. more cooling for small
places.</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">tim</A> @ 8:54AM PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964713289,83675,.html"><IMG
border=0 src="doc3_files/comments.gif">0 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Need some cooling for your Videocard
memory to get a little extra overclockability and FPS? <A
href="http://www.overclockershideout.com/RamSinks.html"
target=_BLANK>Overclockers Hiedout Ram Sinks</A> They just notified
me of their new design.<BR><IMG border=1
src="doc3_files/ramsink.jpg"></FONT><BR><BR><A
name=newsitem964671589,7831,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial
size=2><B>Wednesday, July 26,
2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>is it
[H]ard?</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 9:19PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964671589,7831,.html"><IMG
border=0 src="doc3_files/comments.gif">0 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Big heatsinks are good, very good. The
bigger the better.<BR>You can never can have a too big of heatsink
on a small chip (CPU, GPU, CHIPSET, etc)<BR><BR><IMG height=173
src="doc3_files/voodooside2.jpg" width=230><BR>My overclocked
Voodoo3 2000 with a BIG mofo heatsink on top.<BR>Peltier and
watercooling next up :-)<BR>(if you pry off the heatsink you void
the warranty )<BR><BR>it was originally posted on <A
href="http://www.hardocp.com/">[H]ardOCP </A><BR>I&#8217;m not only a
BP6er but also a [H]ardOCPer<BR></FONT><BR><BR><A
name=newsitem964644047,60218,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>WiLd CaSe!!</FONT></U></B><BR><FONT
color=#0066cc face=Arial size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 1:40PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964644047,60218,.html"><IMG
border=0 src="doc3_files/comments.gif">8 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Now this person really knows how to
keep his case cool!!<BR>Addin an 18" Fan!! WOW!!<BR><BR><A
href="http://www.envador.com/Photos/PVCII/" target=_blank><IMG
src="doc3_files/TN_OpenedUp1.jpg"></A><BR>Click to go to his
site.<BR></FONT><BR><BR><A
name=newsitem964631110,84122,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>What the heck is a
Peltier?!?!</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 10:05AM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964631110,84122,.html"><IMG
border=0 src="doc3_files/comments.gif">6 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>This is for all you people who wanted
to know what a peltier is.<BR><BR>The quest fo the Perfect
Peltier<BR><A
href="http://www.tweakmax.com/html/peltier/peltier-1.cfm"
target=_blank><IMG src="doc3_files/peltier.jpg"></A> <BR>Thanks to
<A href="http://www.tweakmax.com/" target=_blank>TweakMax.com</A>
<BR><BR>Note: Today morning when I woke up I saw my whole screen
cluttered with a bunch of IMs!! I live in the USA on EST. If you
live somewhere else please check the time in my area. for example:
If you live in Europe and IM me in the morning your time I would be
sleeping it would be like 4 in the morning here. Just to let you
know <IMG src="doc3_files/smile.gif"><BR>I'm not angry at anyone...
good thing I have a long fuse <IMG
src="doc3_files/tongue.gif"><BR></FONT><BR><BR><A
name=newsitem964587833,74573,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Tuesday,
July 25, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>HELLO
EVERYONE!!!</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">Holodeck2</A> @ 10:03PM
PDT</SMALL>&nbsp; <BR><FONT color=black face=Arial size=2>Hello
everyone, Woohoo!! I'm on!!<BR>Who is this Holodeck2 person
anyways?!?! Read on :-)<BR>I&#8217;m a regular on the bp6 messageboard,
trying to help people out with their problems.<BR>I&#8217;m the
self-proclaimed bp6 cooling expert, If you have a cooling idea, I&#8217;ve
probably already done it and can offer some incite.<BR>My computer
is always on so you can contact me whenever... problem is, I'm not
always in front of it. I'll try to update this page and keep
everyone happy :-)<BR>Any Questions or comments, you can either
contact me or post it on the messageboard.<BR><BR>Ways to contact
me.<BR>E-mail: <A
href="mailto:[email protected]">[email protected]</A> (All E-mails
will be answered in 24 hours or less, I guarantee it.)<BR>When you
write me an e-mail please put in the subject line "BP6" then the
rest of your subject so my e-mail program can sort it, thanks<BR><A
href="http://www.aol.com/aim">AIM: </A>Holodeck2 (instant response
if I&#8217;m in front of my comp and not trying to frag someone)<BR><A
href="http://www.icq.com/download">ICQ: </A>82640218 (rarely
on)<BR><BR>P.S. If someone named &#8220;Digital Vortex&#8221; on either Quake 3
or 2 frags you, it&#8217;s probably me. ;-)<BR></FONT><BR><BR><A
name=newsitem964429577,13375,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Monday,
July 24, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>BP6 Q3 server up and
running..</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">tim</A> @ 2:06AM PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964429577,13375,.html"><IMG
border=0 src="doc3_files/comments.gif">3 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Setup a Q3 server for anyone wanting
to practice in preparation for Quakecon.. Connect to bp6.dyndns.org
default port. (SERVER: BP6 system, 256 MB ram, celeron 600 on a T3
connection)... Will be moved to another BP6 server eventually. This
is only a temporary test of the system and net connection. <BR>(BTW-
there are a few bot's running around in there..)</FONT><BR><BR><A
name=newsitem964425184,95812,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>BIOS Savior to the
rescue....</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">tim</A> @ 12:53AM PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/964425184,95812,.html"><IMG
border=0 src="doc3_files/comments.gif">2 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Do you sweat during the BIOS flashing
procedure on your BP6 mobo? If so then this little gadget maybe
worth a first look. It's called the "<B>RD1 BIOS Savior</B>" and it
plugs in between your BIOS ROM and the BIOS ROM socket on your mobo.
This device will backup your BIOS and and allow you to recover your
BIOS in the event that your flashing session goes wrong. In the
event of a bad flash, just flip a switch on the RDI and boot up your
system, and flash again. This is also good as a failsafe in case you
don't believe in Virus Protecting your computer. (Thanks to Fred for
link)<BR><A href="http://www.ioss.com.tw/eg/rd1/RD1info0004.PDF"
target=_NEW>Manufacturers Brochure</A> (PDF Format)<BR><A
href="http://192.216.185.10/mwave/doc/A06950.html"
target='_BLANK"'>Another info page</A><BR><A
href="http://192.216.185.10/mwave/ProdMB-AC-MW.hmx?UID=&amp;CID=&amp;updepts=MB&amp;DNAME=%3Cb%3EMotherboards%3C%2Fb%3E&amp;Back=ProdMB-AC-MW.hmx?"
target=_BLANK>Available for about $20</A><BR><BR><IMG
src="doc3_files/rd1.jpg"></FONT><BR><BR><A
name=newsitem963875853,12731,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Monday,
July 17, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>How To
Overclock</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 4:17PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963875853,12731,.html"><IMG
border=0 src="doc3_files/comments.gif">3 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>For those of you who are new to
overclocking, this guide will explain to you how to overclock, and
what some of the terms are. Like 'FSB' (what the heck is that!?
:0))<BR><BR><A href="http://netkills.qgl.org/a_oc_comp.shtml"
target=_blank>How To Overclock</A> </FONT><BR><BR><A
name=newsitem963875485,23353,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>The Cardcooler
XT</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 4:11PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963875485,23353,.html"><IMG
border=0 src="doc3_files/comments.gif">1 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Wow! I am impressed! Nevermind keeping
the CPU's cool... Keep your whole board cool!<BR><BR><I>Even if your
not overclocking your system (or planning on it), this unit will
provide system stability and longevity. What would happen one day of
your GeForce or CPU fan went dead? You can also think of this
cooling unit as a backup to essential cooling fans in your
system.</I><BR><BR>Check this out!<BR><BR><A
href="http://www.brokenpixel.com/articles/coolerXT/cardcoolerXT_1.shtml"
target=_blank>http://www.brokenpixel.com/articles/coolerXT/cardcoolerXT_1.shtml</A>
</FONT><BR><BR><A name=newsitem963859982,88982,></A><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>'Nerd
Inside'</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 11:53AM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963859982,88982,.html"><IMG
border=0 src="doc3_files/comments.gif">1 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>We all need to have some fun
sometimes! Check out this little web site that sells 'nerd' clothing
;) (I like the bibs in the Junior Hackerz section) :-Þ<BR><BR>
<DIV align=center><A href="http://www.nerdgear.com/"
target=_blank><IMG border=0
src="doc3_files/nerdinside.gif"></A></DIV></FONT><BR><BR><A
name=newsitem963819796,9688,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>Dual PSU Wiring diagram... (preview to
Part 1 Watercooling Project)</FONT></U></B><BR><FONT color=#0066cc
face=Arial size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">tim</A> @ 12:43AM PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963819796,9688,.html"><IMG
border=0 src="doc3_files/comments.gif">11 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>When is comes to overclocking your
system, cooling plays a big role. Powering all of those fans in your
system can cause quite a strain on your PSU (Power Supply Unit).
Depending on the number of peripherals in your system, adding a more
powerfull PSU or adding a second PSU may be neccesary. For
watercooling and using peltiers, dedicating a second PSU to power
the Peltiers (TEC's) is a good idea. Here I have come up with 2
diagrams on how I wired dual 300 watt ATX power supply units for the
Blizzard BP6 watercooling project. Consider this part of Step 1.
More will follow this week. BTW.. hacking up your PSU's is very
dangerous and is not recommended unless you know what you are doing.
<BR><BR>View Diagram 1 <A
href="http://bp6.gamesquad.net/images/wiring.jpg"
target=_BLANK>here</A>.<BR>View Diagram 2 <A
href="http://bp6.gamesquad.net/images/psu2.gif"
target=_BLANK>here</A>.<BR><BR>I used Tap-In Squeeze Connectors and
22 guage wire to connect the wires. You can get them at Radio Shack
Part# 64-3053 or <A
href="http://www.radioshack.com/ProductCatalog/ProductDetail/Index/1,2098,,00.html?SKUString1=64&amp;SKUString2=3053"
target=_blank>click here</A>.</FONT><BR><BR><A
name=newsitem963766655,78511,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Sunday,
July 16, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>RAM Overclocking?
Hmmmmm.</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 9:57AM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963766655,78511,.html"><IMG
border=0 src="doc3_files/comments.gif">3 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>I know we're pretty big overclockers
here at BP6.Com so, this is a post of choice ;-) I've seen the
question in the message boards, 'why can't I overclock any higher?'
Well, it's not always the CPU that's holding you back... Many other
things need to be taken care of to overclock such as your PCI
devices (can they handle the higher bus speed), the actual CPU, and
your RAM. I'm not saying that that a high quality stick of silicon
will enable you to overclock your 366MHz to 1 GHZ (I wish!), but, it
will certainly help =)<BR><BR>Extreme Overclocking has tested
(overclocked) PC133 RAM to there full potential. Here's a quote I
found and the link:<BR><BR><I>Well, the guys at Extreme Overclocking
have been hard at work again with their latest review. This time
they have put seven 128MB PC133 memory modules through the torture
tests to determine their maximum overclocking potential. Which one's
came out on top? Read the review to find out....</I><BR><BR><A
href="http://www.extremeoverclocking.com/reviews/memory/ram_roundup_1.html"
target=_blank>Cooked RAM... Yummie</A><BR><BR>The
ÐÐ.</FONT><BR><BR><A name=newsitem963764236,76720,></A><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>CPU
Guide</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 9:17AM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963764236,76720,.html"><IMG
border=0 src="doc3_files/comments.gif">0 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>A follow up on the 'Weekly CPU
Prices', this guide will help you determine which cpu is best for
you (and your board ;-)). Sent to me by Spanky, here's the
link:<BR><BR>
<LI><A
href="http://www6.tomshardware.com/howto/00q2/000412/index.html"
target=_blank>http://www6.tomshardware.com/howto/00q2/000412/index.html</A></FONT><BR><BR><A
name=newsitem963685749,28290,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Saturday,
July 15, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>Weekly CPU
Prices</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 11:29AM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963685749,28290,.html"><IMG
border=0 src="doc3_files/comments.gif">2 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Wow, found this very useful! Wanting
to buy a new CPU? Check out this detailed price list!<BR><BR><A
href="http://www.sharkyextreme.com/hardware/weekly_cpu/"
target=_blank>Click Here.</A> <BR><BR>Thanks Sharky
Extreme!</FONT><BR><BR><A
name=newsitem963679881,35277,></A><B><U><FONT color=#003366
face="Verdana, Arial" size=2>Fast Wallpapers</FONT></U></B><BR><FONT
color=#0066cc face=Arial size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 9:51AM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963679881,35277,.html"><IMG
border=0 src="doc3_files/comments.gif">0 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>FAST-MHz has released some wallpapers!
<A href="http://64.29.18.111/wallpaper/index.html"
target=_blank>Click here</A> to view them. They come in sizes
800x600 1024x768 and 1152x864. If you have your desktop set at a
larger size, just use the 'stretch' function in desktop properties
instead of 'center'. Works great.<BR><BR>In other news, we want to
finnish off all the sections at BP6.Com so, to start, we're going to
work on the <A href="http://bp6.gamesquad.net/uc.phtml"
target=_blank>Picture Gallery</A>. To help us out, you can send in
all your cool, wierd, crazy pics that you may have to: <A
href="mailto:[email protected]">[email protected]</A>. (The
topic being computers, duh! :0) And no... I don't want to recieve
any porno piccies in my mailbox! I have enough of those!) Kidding
guys.<BR><BR>Okay, that's all for now.<BR><BR>The
ÐÐ.</FONT><BR><BR><A name=newsitem963619505,3764,></A>
<TABLE bgColor=#003399 width="100%">
<TBODY>
<TR>
<TD><FONT color=#ffffff face=Verdana,arial size=2><B>Friday,
July 14, 2000</B></FONT></TD></TR></TBODY></TABLE><BR><!--<hr noshade width=100%>--><B><U><FONT
color=#003366 face="Verdana, Arial" size=2>Hey
There!</FONT></U></B><BR><FONT color=#0066cc face=Arial
size=1><SMALL>Posted by <A class=nav
href="mailto:[email protected]">DareDevil</A> @ 5:05PM
PDT</SMALL>&nbsp; <A
href="http://bp6.gamesquad.net/news/963619505,3764,.html"><IMG
border=0 src="doc3_files/comments.gif">7 comments</A>
&nbsp;|&nbsp;<A
href="http://bp6.gamesquad.net/#news_top">top</A></FONT> <BR><FONT
color=black face=Arial size=2>Hey guys, just wanted to introduce
myself, some of you may have already met me on the BP6.com board.
I'll be posting up news from time to time now so, if you'd like, you
may send me some news to be posted if you find any ( we don't want
to flood Tim ;-) ).<BR><BR>My e-mail address is <A
href="mailto:[email protected]">[email protected]</A><BR><BR>Ciao for
now.<BR><BR>The ÐÐ.</FONT><BR><BR>
<CENTER><IFRAME frameBorder=0 height=60 marginHeight=0 marginWidth=0
noResize scrolling=no src="doc3_files/ad_iframe.htm"
width=468><a href="http://ads.adflight.com/go_static.asp?asid=7708" target="_top"><img width=468 height=60 border=0 alt="Advertisement" src="http://ads.adflight.com/ad_static.asp?pid=2097&sid=1881&asid=7708"></a></IFRAME></CENTER></LI></FONT></TD></TR></TBODY></TABLE></CENTER></P></TD>
<TD bgColor=silver vAlign=top width="10%">
<CENTER>
<P>
<TABLE bgColor=silver border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD COLSTART="1">
<CENTER><!-- <FORM ACTION="/cgi-bin/subscribe.pl" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
<IMG SRC="/images/spacer.gif" WIDTH="111" HEIGHT="1"><BR>
<P><B><FONT SIZE="2" COLOR="#000066" FACE="Verdana">Newsletter</FONT></B><FONT SIZE="1" FACE="Verdana"><BR>
<INPUT TYPE="TEXT" NAME="email" SIZE="10" VALUE="[email protected]"><BR>
<INPUT TYPE="HIDDEN" NAME="subscribe" SIZE="-1" VALUE="subscribe"><INPUT TYPE="IMAGE" SRC="/images/subscribe.gif" WIDTH="80"
HEIGHT="27" ALIGN="BOTTOM" BORDER="0"></FONT>
</FORM> -->
<FORM
action=http://bp6.gamesquad.net/cgi-bin/news/viewnews.cgi?emaillist
method=post><IMG height=1 src="doc3_files/spacer.gif"
width=111><BR><FONT size=1>Newsletter<BR><INPUT name=npemail size=13
value="e-mail addr."><BR><INPUT name=npsubscribe style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type=submit value=Subscribe><BR><!-- <input type="submit" name="npunsubscribe" value="Unsubscribe" style="font-size: xx-small; font-family: Verdana; font-weight: bold; color: #ffffff; background-color: #000000;"> --></FONT></FORM><FONT
size=1>
<FORM
action=http://bp6.gamesquad.net/cgi-bin/news/viewnews.cgi?search
method=post>Search news<BR><INPUT name=searchstring size=13><BR><INPUT name=submit style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type=submit value=Submit><BR><A
href="http://bp6.gamesquad.net/cgi-bin/news/viewnews.cgi?newsall">News
archive</A></FONT> </FORM></CENTER></TD></TR></TBODY></TABLE><!-- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" BGCOLOR="silver">
<TR>
<TD WIDTH="100%">
<P ALIGN="CENTER"><A HREF="http://www.free56k.com" target="_blank"><IMG SRC="/images/free56k.gif" WIDTH="100" HEIGHT="49"
ALIGN="BOTTOM" BORDER="0"></A>
</TD>
</TR>
</TABLE>
-->
<TABLE bgColor=silver border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD align=middle width="100%"><!-- BEGIN GoTo.com Search Box -->
<SCRIPT language=javascript type=text/javascript>
<!--
if ((parseInt(navigator.appVersion) >= 3)
&& (navigator.appName != "Netscape")) {
document.write("<IFRAME marginheight=0 frameborder=0 ");
document.write("marginwidth=0 scrolling=no width=100 height");
document.write("=90 ");
document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
document.write("ype=html&size=100x90&url=http://www.goto.co");
document.write("m/d/search/ssn/&target=_blank&Partner=SSN80");
document.write("42DF8478957377></IFRAME>");
} else if ((parseInt(navigator.appVersion) > 3)
&& (navigator.appName == "Netscape")) {
document.write("<SCRIPT language=javascript type=text/javas");
document.write("cript ");
document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
document.write("ype=js&size=100x90&url=http://www.goto.com/");
document.write("d/search/ssn/&target=_blank&Partner=SSN8042");
document.write("DF8478957377></SC");
document.write("RIPT>");
} else {
document.write("<A TARGET=_blank ");
document.write("HREF=http://www.goto.com/d/search/ssn/?from");
document.write("GIF=true>");
document.write("<IMG ismap ");
document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
document.write("ype=gif&size=100x90></A>");
}
// -->
</SCRIPT>
<B><NOSCRIPT></B><A
href="http://www.goto.com/d/search/ssn/?fromGIF=true"
target=_blank><IMG align=bottom border=0 height=90 isMap
src="doc3_files/100x90.gif" width=100></A><B><A
href="http://www.goto.com/d/search/ssn/?fromGIF=true" target=_blank>
</A></A></B><B></NOSCRIPT></B><B><!-- END GoTo.com Search Box --></B><!-- Pricewatch Search Box -->
<FORM action=http://www.pricewatch.com/search/search.asp method=get
target=_Blank>
<CENTER>
<P><B><FONT color=white face="ARIAL, HELVETICA" size=1>PC Price
Search<BR></FONT></B><INPUT maxLength=30 name=criteria size=10><BR><INPUT name=submit style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type=submit value=Search>
</FORM><!-- Pricewatch Search Box --><A
href="http://www.puicorp.com/bp6specials.htm" target=_BLANK><IMG
src="doc3_files/puibp6.gif"></A><BR><BR><BR><BR><A
href="http://store.yahoo.com/dunamis-site/maxtor.html"
target=_BLANK><IMG
alt="BP6.com Special - Enter CODE: BP6-hd in the order (notes) to receive a discount"
src="doc3_files/hd5.gif"><FONT size=1><BR>BP6.COM
Special<BR>Code:BP6-hd</FONT></A> </P></CENTER></TD></TR></TBODY></TABLE>
<TABLE bgColor=silver border=0 cellPadding=0 cellSpacing=0 height="100%"
width="100%">
<TBODY>
<TR>
<TD
width="100%">&nbsp;</TD></TR></TBODY></TABLE></P></CENTER></TR></TBODY></TABLE><!-- </TABLE>-->
<CENTER></CENTER></TD></TR><TR><TD COLSPAN="3" VALIGN="TOP"
HEIGHT="70">&nbsp;</TD> </TR></TABLE>
<TABLE border=0 width=780>
<TBODY>
<TR>
<TD width=780>
<P align=center><FONT color=#999999 face=verdana,arial size=1>Copyright
©1999-2000 BP6.com, All rights reserved.<BR>Got news? Send it to </FONT><A
href="mailto:[email protected]"><FONT color=white face=Verdana
size=1>Tim</FONT></A> </P></TD></TR><!-- <TR> <TD WIDTH="780"> <P ALIGN="CENTER"><FONT SIZE="1" COLOR="#999999" FACE="Verdana,arial">Site design by Tim Brinkley</FONT> </TD> </TR> --></TBODY></TABLE></DIV>
<SCRIPT> window.open=NS_ActualOpen; </SCRIPT>
</BODY></HTML>
@@ -1,5 +0,0 @@
<p tst="a&amp;b" tst2="a&b" tst3="a & b">
a&amp;b
a&b
a & b
</p>
-166
View File
@@ -1,166 +0,0 @@
<!doctype html public "-//IETF//DTD HTML//EN">
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>README - Microsoft FrontPage 2000 Server Extensions</title>
<meta name="Microsoft Theme" content="none">
</head>
<body>
<font face="Verdana">
<h1><a name="top">Microsoft FrontPage 2000 Server Extensions, UNIX</a></h1>
<font size="2"><i>© Copyright Microsoft Corporation, 1999&nbsp;</i></font>
<p>The FrontPage Server Extensions are a set of programs on the Web server that support:
<ul>
<li>Authoring FrontPage webs</li>
<li>Administering FrontPage webs</li>
<li>Browse-time FrontPage web functionality</li>
</ul>
<h2>Contents&nbsp;</h2>
<a href="#relnotes">Release Notes</a><br>
<a href="#moreinfo">Resources for More Information</a>
<p>&nbsp;</p>
<hr>
<h2><a name="relnotes">Release Notes</a></h2>
<p>This section provides complementary or late-breaking
information to supplement the Microsoft FrontPage Server Extensions documentation.</p>
<p><a href="#apache">Apache 1.3.4 Support</a><br>
<a href="#upgrading">Upgrading from previous version of FrontPage Server Extensions</a><br>
<a href="#executables">Uploading files into executable folders</a></p>
<p align="right"><font size="1"><a href="#top">Top of Page</a></font></p>
<h3><a name="apache">Apache 1.3.4 Support</a></h3>
<p>You need to take some special steps to run the FrontPage Server Extensions with Apache 1.3.4.
FrontPage Server Extensions expect to find all resource directives in the main server
configuration file, usually http.conf. To prevent the server extensions from using any secondary
configuration files (access.conf, srm.conf), add the following lines to http.conf:</p>
</font>
<blockquote>
<font face="Courier New">
ResourceConfig /dev/null&nbsp;<br>
AccessConfig /dev/null</font>
</blockquote>
<font face="Verdana">
<p>If you have some settings stored in secondary configuration files, move them to http.conf.</p>
<p>You must stop and restart the web server for your changes to http.conf to take effect.</p>
<p align="right"><font size="1"><a href="#relnotes">Top of Section</a></font></p>
<h3><a name="upgrading">Upgrading from previous version of FrontPage Server Extensions</a></h3>
<p>Custom entries in frontpage.cnf are not migrated to FrontPage 2000.</p>
<p>When you install FrontPage 2000 Server Extensions, a new frontpage.cnf file is created in the /usr/local/frontpage/version4.0 directory.
Any custom settings stored in a previous-version frontpage.cnf are not used. However, you can copy
your custom settings from the previous-version frontpage.cnf file after you install the FrontPage 2000 Server Extensions.</p>
<p>Do not overwrite the FrontPage 2000 frontpage.cnf file with a frontpage.cnf file from an
earlier version of the FrontPage Server Extensions.</p>
<p align="right"><font size="1"><a href="#relnotes">Top of Section</a></font></p>
<h3><a name="executables">Uploading files into executable folders</a></h3>
<p>After upgrading to FrontPage 2000, FrontPage authors will not be able to upload files into
executable folders. For security reasons, the default setting on FrontPage 2000 webs does not
allow authors to upload executable files into executable folders in a FrontPage web. This
setting protects servers so that authors do not inadvertently upload a program containing a bug
or a virus.</p>
<p>To allow FrontPage authors to upload executables, set the NoExecutableCgiUpload configuration
variable to zero (0). For information about FrontPage Server Extension configuration variables,
see the FrontPage 2000 Server Extensions Resource Kit at <a href="http://officeupdate.microsoft.com/frontpage/wpp/serk/">http://officeupdate.microsoft.com/frontpage/wpp/serk/</a>.</p>
<p align="right"><font size="1"><a href="#relnotes">Top of Section</a></font></p>
<hr>
<h2><a name="moreinfo">Resources for More Information</a></h2>
<p>This section lists sources of more information about the
FrontPage Server Extensions.</p>
<p><a href="#serk">Server Extensions Resource Kit</a><br>
<a href="#serkupdate">Server Extensions Resource Kit Update</a><br>
<a href="#kb">Knowledge Base</a></p>
<p align="right"><font size="1"><a href="#top">Top of Page</a></font></p>
<h3><a name="serk">Server Extensions Resource Kit</a></h3>
<p>The FrontPage 2000 Server Extensions include a full set of documentation: the Server
Extensions Resource Kit. This is an HTML document installed on the server machine (by
default) in /usr/local/frontpage/version4.0/serk. To view the Server Extensions Resource
Kit, open /usr/local/frontpage/version4.0/serk/default.htm in your Web browser.</p>
<p>The Server Extensions Resource Kit contains detailed information about installing and
administering the FrontPage Server Extensions along with an overview of the Server
Extensions, a detailed discussion of Server Extensions security on UNIX and Windows,
troubleshooting information, and a full set of appendixes.</p>
<p align="right"><font size="1"><a href="#moreinfo">Top of Section</a></font></p>
<h3><a name="serkupdate">Server Extensions Resource Kit Update</a></h3>
<p>For updated information about installing, setting up, and administrating the FrontPage Server
Extensions, see the Server Extensions Resource Kit Update at: <a href="http://officeupdate.microsoft.com/frontpage/wpp/serk/">http://officeupdate.microsoft.com/frontpage/wpp/serk/</a>.</p>
<p align="right"><font size="1"><a href="#moreinfo">Top of Section</a></font></p>
<h3><a name="kb">Microsoft Knowledge Base</a></h3>
<p>For further technical information on FrontPage, please consult Support Online. Use Support
Online to easily search Microsoft Product Support Services' collection of resources including
technical articles from Microsoft's extensive Knowledge Base, FAQs, & troubleshooters to find
fast, accurate answers. You can also customize the site to control your search using either
keywords or the site's natural language search engine, which uses normal everyday language for
answering inquiries, so you can write your question in your own words. To begin, go to
<a href="http://support.microsoft.com/support/">http://support.microsoft.com/support/</a>.</p>
<p align="right"><font size="1"><a href="#moreinfo">Top of Section</a></font></p>
<p>&nbsp;</p>
</font>
</body>
</html>
@@ -1,13 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<ul>
<li>First item
<li>Second item, closes the first one
</ul>
</html>
-5
View File
@@ -1,5 +0,0 @@
<html>
<head>
<meta name="Author" content="Root <[email protected]>">
</head>
</html>
-5
View File
@@ -1,5 +0,0 @@
<html>
<body>
<pre><a href="toto"></a><img src="titi"></pre>
</body>
</html>
-10
View File
@@ -1,10 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd" >
<?xml-stylesheet href="./css/ht2html.css" type="text/css"?>
<html>
<!-- THIS PAGE IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->
<head>
<title>Python Programming Language</title>
</head>
<body>
</body></html>
-10
View File
@@ -1,10 +0,0 @@
<html>
<head>
<title>Regression test 1</title>
</head>
<body>
<h1>Regression test 1</h1>
<p>
Ok file no problem
</body>
</html>
-12
View File
@@ -1,12 +0,0 @@
<html>
<head>
<title>Regression test 2</title>
</head>
<body>
<h1>Regression test 2</h1>
<p>
Autoclose of tag P
<p>
Ok file no problem
</body>
</html>
-13
View File
@@ -1,13 +0,0 @@
<html>
<head>
<title>Regression test 3</title>
</head>
<body>
<h1>Regression test 3</h1>
<p>
Autoclose of tag P
<hr>
<p>
Ok file no problem
</body>
</html>
-12
View File
@@ -1,12 +0,0 @@
<html>
<head>
<title>Regression test 4</title>
</head>
<body>
<h1>Regression test 4</h1>
<p>
Wrong close of tag P
<hr>
</p>
</body>
</html>
@@ -1 +0,0 @@
<td><td><!-- <a><b> -->
@@ -1,9 +0,0 @@
<HTML>
<HEAD><TITLE>Script tests</TITLE></HEAD>
<BODY>
<SCRIPT language=javascript>
if (window.open<max) ;
</SCRIPT>
<INPUT ONCLICK="if(window.open<max);">
</BODY>
</HTML>
-33
View File
@@ -1,33 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML><HEAD> <TITLE>Linux Today</TITLE></HEAD>
<body bgcolor="White" link="Blue" text="Black" VLINK="Black" ALINK="Red">
<center>
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
<TR BGCOLOR="#FFFFFF">
<TD HEIGHT="90">
<a href="http://linuxtoday.com/cgi-bin/click.pl?adnum=49"><img src="/pics/door_linux.gif" border="0" width="468" height="60" alt="Atipa Linux solutions. Your reliable cluster, server, and workstation solution. Win a Free Celeron Linux Workstation!"></A>
</TD>
<TD><IMG SRC="/pics/lt.gif" VSPACE=5 alt="Linux Today Logo"><br><font size="-1"><a href="http://linux.com">linux.com</a> partner</font><p></TD>
</TR>
</TABLE>
<font size="2" face="Helvetica">
[ <a href="http://linuxtoday.com/">headlines</A> |
<a href="http://features.linuxtoday.com/">features</A> |
<a href="http://commercial.linuxtoday.com/">commercial</a> |
<a href="http://security.linuxtoday.com/">security</a> |
<a href="http://jobs.linuxtoday.com/">jobs</a> |
<a href="http://linuxtoday.com/volt/">volt</a> |
<a href="http://linuxtoday.com/contrib.pl">contribute/submit</a> |
<a href="http://linuxtoday.com/advertise/">advertise</A> |
<a href="http://linuxtoday.com/search.html">search</A> |
<a href="http://linuxtoday.com/digests/">site digests</A> |
<a href="http://linuxtoday.com/mail-lists">mailing lists</A> |
<a href="http://linuxtoday.com/about/">about us</a> |
<a href="http://linuxtoday.com/linkus.html">link us</A> ]</font>
</center>
<P>
</body>
</html>
-34
View File
@@ -1,34 +0,0 @@
<html>
<head>
<base target=contents>
</head>
<a name=ProblemDomain.Package><h2>Component Package diagram ProblemDomain</h2>
</a><p><hr></p>
<dl>
<dt><b>Stereotype </b>problem domain</dt>
<dt><b>Alias </b>Problem Domain</dt>
<dt><b>Note </b><dd>The Problem Domain package is the model behind the Human
<dd>Interface, thats stores and manipulates the Family Tree.
</dl>
<p><hr></p>
<dl>
<dt><h4>Class <a href=HumanInterface.FamilyFrame.html#HumanInterface.FamilyFrame>HumanInterface.FamilyFrame</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.Birth.html#ProblemDomain.Birth>ProblemDomain.Birth</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.Death.html#ProblemDomain.Death>ProblemDomain.Death</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.Divorce.html#ProblemDomain.Divorce>ProblemDomain.Divorce</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.Family.html#ProblemDomain.Family>ProblemDomain.Family</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.Individual.html#ProblemDomain.Individual>ProblemDomain.Individual</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.LifeEvent.html#ProblemDomain.LifeEvent>ProblemDomain.LifeEvent</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.Marriage.html#ProblemDomain.Marriage>ProblemDomain.Marriage</a></h4></dt>
<dt><h4>Class <a href=ProblemDomain.Note.html#ProblemDomain.Note>ProblemDomain.Note</a></h4></dt>
</dl>
<h4><b>Links</h4></b>
<ul><li><b>Link to </b><a href=HumanInterface.Package.html#HumanInterface.Package>HumanInterface</a></li></ul>
<dir></dir>
<ul><li><b>Link to </b><a href=DataManagement.FlatFile.Package.html#DataManagement.FlatFile.Package>DataManagement.FlatFile</a></li></ul>
<dir></dir>
<ul><li><b>Link to </b><a href=DataManagement.Package.html#DataManagement.Package>DataManagement</a></li></ul>
<dir></dir>
</html>
File diff suppressed because one or more lines are too long
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<desc>Four separate rectangles
</desc>
<rect width="20" height="60"/>
<rect width="30" height="70"/>
<rect width="40" height="80"/>
<rect width="50" height="90"/>
</svg>

Before

Width:  |  Height:  |  Size: 367 B

-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<desc>This valid svg document draws a triangle which is a hyperlink
</desc>
<a href="http://www.w3.org">
<p d="M 0 0 L 200 0 L 100 200 Z"/>
</a>
</svg>

Before

Width:  |  Height:  |  Size: 341 B

-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" standalone="yes"?>
<svg width="4in" height="3in"
xmlns = 'http://www.w3.org/Graphics/SVG/svg-19990412.dtd'>
<desc>This well formed svg document draws a triangle which is a hyperlink
</desc>
<a xml:link="simple" show="replace" actuate="user" href="http://www.w3.org">
<p d="M 0 0 L 200 0 L 100 200 Z"/>
</a>
</svg>

Before

Width:  |  Height:  |  Size: 347 B

-41
View File
@@ -1,41 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<!--DOCTYPE svg SYSTEM "svg-19990412.dtd"-->
<svg width="4in" height="3in">
<title>Kona Lavadome mountain bike
</title>
<desc>This picture shows a mountain bike, a human-propelled,
multi-terrain vehicle. While it can be succesfully used on moorland,
forest, roads, and large hills it is not actually suitable for going
up mountains.
</desc>
<g id="bike">
<defs>
<symbol id="spoke"><desc>14/12 gauge double butted spoke</desc>
<!-- the path data goes here --></symbol>
<symbol id="hub"><desc>black anodised low torsion hub</desc>
<!--the path data goes here --></symbol>
<symbol id="rim"><desc>twin wall, eyeletted rim</desc>
<!-- the path data goes here--></symbol>
<symbol id="cogs"><desc>8 speed, wide ratio gearing</desc>
<!--the path data goes here --></symbol>
<symbol id="lacing"><desc>double cross lacing of 32 spokes</desc>
</symbol>
</defs>
<!-- the overall bike drawing goes here -->
<g id="frontwheel">
<title>Front wheel</title>
<desc>The front wheel provides grip, steering and some shock absorption</desc>
<use href="id(lacing)" style="rotation: 20deg; fillcolor: black"/>
</g>
<g id="backwheel">
</g>
<g id="frame"><!-- and so on -->
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<desc>This is a blue circle with a red outline
</desc>
<g>
<circle style="fill: blue; stroke: red"
cx="200" cy="200" r="100"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 319 B

-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<defs>
<rect id="TemplateObject01" width="100" height="37.34"/>
<lineargradient id="Gradient01">
<gradientstop offset="30%" color="#39F"/>
</lineargradient>
</defs>
<desc>Defining things for later use
</desc>
<!-- SVG elements in here would reference/use
the elements defined in the <defs> -->
</svg>

Before

Width:  |  Height:  |  Size: 511 B

-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg SYSTEM "http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<g>
<title>
Company sales by region
</title>
<desc>
This is a bar chart which shows
company sales by region.
</desc>
<!-- Bar chart defined as vector data -->
</g>
</svg>

Before

Width:  |  Height:  |  Size: 335 B

-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<desc>This is an ellipse, axis aligned and centered on the origin
</desc>
<g>
<ellipse major="85" minor="45"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 312 B

-44
View File
@@ -1,44 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="800px" height="800px">
<desc>This sample SVG file draws a flower</desc>
<g style="transform: matrix(1 0 0 -1 -25.88 798.60);
stroke: #000; stroke-width: 1" >
<path style="fill: #1A5466" d = "m 242.33 684.19
C 346.44 757.48 271.45 647.38 213.17 641.37
C 271.45 647.38 383.43 575.21 256.71 613.30
C 383.43 575.21 251.04 565.90 205.23 609.68
C 251.04 565.90 265.13 432.88 210.71 557.95
C 265.13 432.88 175.04 531.37 175.67 596.26
C 175.04 531.37 80.63 437.67 138.96 559.82
C 80.63 437.67 100.67 569.80 146.75 611.20
C 100.67 569.80 -31.14 585.98 95.49 617.49
C -31.14 585.98 83.94 652.25 140.24 643.26
C 83.94 652.25 13.98 766.12 113.04 687.55
C 13.98 766.12 137.45 716.63 161.05 668.30
C 137.45 716.63 182.02 842.45 178.39 717.23
C 182.02 842.45 220.90 714.46 193.51 667.46
C 220.90 714.46 346.44 757.48 242.33 684.19 z" />
<path style="fill: #34AACD" d = "M 235.33 691.19
C 339.44 764.48 264.45 654.38 206.17 648.37
C 264.45 654.38 376.43 582.21 249.71 620.30
C 376.43 582.21 244.04 572.90 198.23 616.68
C 244.04 572.90 258.13 439.88 203.71 564.95
C 258.13 439.88 168.04 538.37 168.67 603.26
C 168.04 538.37 73.63 444.67 131.96 566.82
C 73.63 444.67 93.67 576.80 139.75 618.20
C 93.67 576.80 -38.14 592.98 88.49 624.49
C -38.14 592.98 76.94 659.25 133.24 650.26
C 76.94 659.25 6.98 773.12 106.04 694.55
C 6.98 773.12 130.45 723.63 154.05 675.30
C 130.45 723.63 175.02 849.45 171.39 724.23
C 175.02 849.45 213.90 721.46 186.51 674.46
C 213.90 721.46 339.44 764.48 235.33 691.19 z" />
<path style="fill: #F881BF" d = "M 199.44 634.43
C 199.44 622.16 189.19 612.21 176.54 612.21
C 163.89 612.21 153.63 622.16 153.63 634.43
C 153.63 646.71 163.89 656.66 176.54 656.66
C 189.19 656.66 199.44 646.71 199.44 634.43 z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<desc>Gradient example
</desc>
<g>
<defs>
<lineargradient id="MyGradient">
<!-- Define linear gradient here -->
<gradientstop offset="0%" color="#F60"/>
<gradientstop offset="70%" color="#FF6"/>
</lineargradient>
</defs>
<rect style="fill: url(#MyGradient)" width="20" height="15.8"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 527 B

-15
View File
@@ -1,15 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<desc>Two groups, each of two rectangles
</desc>
<g style="fillcolor:red">
<rect x="100" y="100" width="100" height="100" />
<rect x="300" y="100" width="100" height="100" />
</g>
<g style="fillcolor:blue">
<rect x="100" y="300" width="100" height="100" />
<rect x="300" y="300" width="100" height="100" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 524 B

-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN"
"http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<desc>Two named groups
</desc>
<g id="OBJECT1">
<rect x="100" y="100" width="100" height="100" />
</g>
<g id="OBJECT2">
<circle cx="150" cy="300" r="25" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 365 B

Some files were not shown because too many files have changed in this diff Show More