From 7042e17490515a990a45aa7237d11bc49ab0eaf0 Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Wed, 9 Jul 2014 04:01:07 +0800 Subject: Imported Upstream version 2.8.0+dfsg1 --- doc/examples/Makefile.am | 241 ++++++++++++------------- doc/examples/Makefile.in | 451 +++++++++++++++++++++------------------------- doc/examples/examples.xml | 450 ++++++++++++++++++++++----------------------- doc/examples/index.html | 14 -- doc/examples/index.py | 92 ++++------ doc/examples/io1.c | 2 +- doc/examples/io1.res | 2 +- doc/examples/io2.c | 2 +- doc/examples/reader1.c | 2 +- doc/examples/reader2.c | 2 +- doc/examples/reader3.c | 2 +- doc/examples/reader4.c | 2 +- doc/examples/testWriter.c | 10 +- doc/examples/tree1.c | 2 +- doc/examples/tree2.c | 2 +- doc/examples/xpath1.c | 2 +- doc/examples/xpath2.c | 2 +- 17 files changed, 608 insertions(+), 672 deletions(-) delete mode 100644 doc/examples/index.html (limited to 'doc/examples') diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 57af9c2..bdac7bb 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -1,135 +1,134 @@ -## -## This file is auto-generated by index.py -## DO NOT EDIT !!! -## +# Beware this is autogenerated by index.py +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ +DEPS = $(top_builddir)/libxml2.la +LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include -AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) -LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) - -CLEANFILES = *.tmp - -if REBUILD_DOCS rebuild: examples.xml index.html -.PHONY: rebuild -examples.xml: index.py $(noinst_PROGRAMS:=.c) - cd $(srcdir) && $(PYTHON) index.py - $(MAKE) Makefile +examples.xml: index.py *.c + -@($(srcdir)/index.py) index.html: examples.xml examples.xsl - cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page" - -cd $(srcdir) && xmllint --valid --noout index.html -endif + -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) install-data-local: - $(MKDIR_P) $(DESTDIR)$(HTML_DIR) - -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) - -clean-local: - test -f Makefile.am || rm -f test?.xml - -EXTRA_DIST = \ - examples.xml \ - examples.xsl \ - index.html \ - index.py \ - io1.res \ - io2.res \ - reader1.res \ - reader3.res \ - reader4.res \ - test1.xml \ - test2.xml \ - test3.xml \ - tree1.res \ - tree2.res \ - tst.xml \ - writer.xml \ - xpath1.res \ - xpath2.res - -noinst_PROGRAMS = \ - io1 \ - io2 \ - parse1 \ - parse2 \ - parse3 \ - parse4 \ - reader1 \ - reader2 \ - reader3 \ - reader4 \ - testWriter \ - tree1 \ - tree2 \ - xpath1 \ - xpath2 - -io1_SOURCES = io1.c - -io2_SOURCES = io2.c - -parse1_SOURCES = parse1.c - -parse2_SOURCES = parse2.c - -parse3_SOURCES = parse3.c - -parse4_SOURCES = parse4.c - -reader1_SOURCES = reader1.c - -reader2_SOURCES = reader2.c - -reader3_SOURCES = reader3.c - -reader4_SOURCES = reader4.c - -testWriter_SOURCES = testWriter.c - -tree1_SOURCES = tree1.c - -tree2_SOURCES = tree2.c - -xpath1_SOURCES = xpath1.c - -xpath2_SOURCES = xpath2.c + @MKDIR_P@ $(DESTDIR)$(HTML_DIR) + -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) + +EXTRA_DIST=examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res + +noinst_PROGRAMS=xpath2 reader1 reader4 parse2 reader2 parse3 reader3 tree2 parse4 io2 testWriter io1 xpath1 parse1 tree1 + +xpath2_SOURCES=xpath2.c +xpath2_LDFLAGS= +xpath2_DEPENDENCIES= $(DEPS) +xpath2_LDADD= @RDL_LIBS@ $(LDADDS) + +reader1_SOURCES=reader1.c +reader1_LDFLAGS= +reader1_DEPENDENCIES= $(DEPS) +reader1_LDADD= @RDL_LIBS@ $(LDADDS) + +reader4_SOURCES=reader4.c +reader4_LDFLAGS= +reader4_DEPENDENCIES= $(DEPS) +reader4_LDADD= @RDL_LIBS@ $(LDADDS) + +parse2_SOURCES=parse2.c +parse2_LDFLAGS= +parse2_DEPENDENCIES= $(DEPS) +parse2_LDADD= @RDL_LIBS@ $(LDADDS) + +reader2_SOURCES=reader2.c +reader2_LDFLAGS= +reader2_DEPENDENCIES= $(DEPS) +reader2_LDADD= @RDL_LIBS@ $(LDADDS) + +parse3_SOURCES=parse3.c +parse3_LDFLAGS= +parse3_DEPENDENCIES= $(DEPS) +parse3_LDADD= @RDL_LIBS@ $(LDADDS) + +reader3_SOURCES=reader3.c +reader3_LDFLAGS= +reader3_DEPENDENCIES= $(DEPS) +reader3_LDADD= @RDL_LIBS@ $(LDADDS) + +tree2_SOURCES=tree2.c +tree2_LDFLAGS= +tree2_DEPENDENCIES= $(DEPS) +tree2_LDADD= @RDL_LIBS@ $(LDADDS) + +parse4_SOURCES=parse4.c +parse4_LDFLAGS= +parse4_DEPENDENCIES= $(DEPS) +parse4_LDADD= @RDL_LIBS@ $(LDADDS) + +io2_SOURCES=io2.c +io2_LDFLAGS= +io2_DEPENDENCIES= $(DEPS) +io2_LDADD= @RDL_LIBS@ $(LDADDS) + +testWriter_SOURCES=testWriter.c +testWriter_LDFLAGS= +testWriter_DEPENDENCIES= $(DEPS) +testWriter_LDADD= @RDL_LIBS@ $(LDADDS) + +io1_SOURCES=io1.c +io1_LDFLAGS= +io1_DEPENDENCIES= $(DEPS) +io1_LDADD= @RDL_LIBS@ $(LDADDS) + +xpath1_SOURCES=xpath1.c +xpath1_LDFLAGS= +xpath1_DEPENDENCIES= $(DEPS) +xpath1_LDADD= @RDL_LIBS@ $(LDADDS) + +parse1_SOURCES=parse1.c +parse1_LDFLAGS= +parse1_DEPENDENCIES= $(DEPS) +parse1_LDADD= @RDL_LIBS@ $(LDADDS) + +tree1_SOURCES=tree1.c +tree1_LDFLAGS= +tree1_DEPENDENCIES= $(DEPS) +tree1_LDADD= @RDL_LIBS@ $(LDADDS) valgrind: $(MAKE) CHECKER='valgrind' tests tests: $(noinst_PROGRAMS) - test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml . @(echo '## examples regression tests') @(echo > .memdump) - $(CHECKER) ./io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse1 test1.xml - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse2 test2.xml - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse3 - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse4 test3.xml - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse2 test2.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse3) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse4 test3.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse1 test1.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + + diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in index cbb7e34..9d08434 100644 --- a/doc/examples/Makefile.in +++ b/doc/examples/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -51,11 +34,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \ - parse2$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) \ - reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \ - reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \ - tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT) +noinst_PROGRAMS = xpath2$(EXEEXT) reader1$(EXEEXT) reader4$(EXEEXT) \ + parse2$(EXEEXT) reader2$(EXEEXT) parse3$(EXEEXT) \ + reader3$(EXEEXT) tree2$(EXEEXT) parse4$(EXEEXT) io2$(EXEEXT) \ + testWriter$(EXEEXT) io1$(EXEEXT) xpath1$(EXEEXT) \ + parse1$(EXEEXT) tree1$(EXEEXT) subdir = doc/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -72,113 +55,84 @@ CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_io1_OBJECTS = io1.$(OBJEXT) io1_OBJECTS = $(am_io1_OBJECTS) -io1_LDADD = $(LDADD) am__DEPENDENCIES_1 = -io1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent +io1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(io1_LDFLAGS) $(LDFLAGS) -o $@ am_io2_OBJECTS = io2.$(OBJEXT) io2_OBJECTS = $(am_io2_OBJECTS) -io2_LDADD = $(LDADD) -io2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +io2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(io2_LDFLAGS) $(LDFLAGS) -o $@ am_parse1_OBJECTS = parse1.$(OBJEXT) parse1_OBJECTS = $(am_parse1_OBJECTS) -parse1_LDADD = $(LDADD) -parse1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +parse1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(parse1_LDFLAGS) $(LDFLAGS) -o $@ am_parse2_OBJECTS = parse2.$(OBJEXT) parse2_OBJECTS = $(am_parse2_OBJECTS) -parse2_LDADD = $(LDADD) -parse2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +parse2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(parse2_LDFLAGS) $(LDFLAGS) -o $@ am_parse3_OBJECTS = parse3.$(OBJEXT) parse3_OBJECTS = $(am_parse3_OBJECTS) -parse3_LDADD = $(LDADD) -parse3_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +parse3_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(parse3_LDFLAGS) $(LDFLAGS) -o $@ am_parse4_OBJECTS = parse4.$(OBJEXT) parse4_OBJECTS = $(am_parse4_OBJECTS) -parse4_LDADD = $(LDADD) -parse4_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +parse4_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(parse4_LDFLAGS) $(LDFLAGS) -o $@ am_reader1_OBJECTS = reader1.$(OBJEXT) reader1_OBJECTS = $(am_reader1_OBJECTS) -reader1_LDADD = $(LDADD) -reader1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +reader1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(reader1_LDFLAGS) $(LDFLAGS) -o $@ am_reader2_OBJECTS = reader2.$(OBJEXT) reader2_OBJECTS = $(am_reader2_OBJECTS) -reader2_LDADD = $(LDADD) -reader2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +reader2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(reader2_LDFLAGS) $(LDFLAGS) -o $@ am_reader3_OBJECTS = reader3.$(OBJEXT) reader3_OBJECTS = $(am_reader3_OBJECTS) -reader3_LDADD = $(LDADD) -reader3_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +reader3_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(reader3_LDFLAGS) $(LDFLAGS) -o $@ am_reader4_OBJECTS = reader4.$(OBJEXT) reader4_OBJECTS = $(am_reader4_OBJECTS) -reader4_LDADD = $(LDADD) -reader4_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +reader4_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(reader4_LDFLAGS) $(LDFLAGS) -o $@ am_testWriter_OBJECTS = testWriter.$(OBJEXT) testWriter_OBJECTS = $(am_testWriter_OBJECTS) -testWriter_LDADD = $(LDADD) -testWriter_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +testWriter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(testWriter_LDFLAGS) $(LDFLAGS) -o $@ am_tree1_OBJECTS = tree1.$(OBJEXT) tree1_OBJECTS = $(am_tree1_OBJECTS) -tree1_LDADD = $(LDADD) -tree1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +tree1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(tree1_LDFLAGS) $(LDFLAGS) -o $@ am_tree2_OBJECTS = tree2.$(OBJEXT) tree2_OBJECTS = $(am_tree2_OBJECTS) -tree2_LDADD = $(LDADD) -tree2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +tree2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(tree2_LDFLAGS) $(LDFLAGS) -o $@ am_xpath1_OBJECTS = xpath1.$(OBJEXT) xpath1_OBJECTS = $(am_xpath1_OBJECTS) -xpath1_LDADD = $(LDADD) -xpath1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +xpath1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(xpath1_LDFLAGS) $(LDFLAGS) -o $@ am_xpath2_OBJECTS = xpath2.$(OBJEXT) xpath2_OBJECTS = $(am_xpath2_OBJECTS) -xpath2_LDADD = $(LDADD) -xpath2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +xpath2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(xpath2_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -189,21 +143,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \ $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) \ @@ -215,11 +169,6 @@ DIST_SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \ $(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) \ $(reader4_SOURCES) $(testWriter_SOURCES) $(tree1_SOURCES) \ $(tree2_SOURCES) $(xpath1_SOURCES) $(xpath2_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -227,6 +176,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -263,7 +213,6 @@ HTML_DIR = @HTML_DIR@ HTML_OBJ = @HTML_OBJ@ HTTP_OBJ = @HTTP_OBJ@ ICONV_LIBS = @ICONV_LIBS@ -ICU_LIBS = @ICU_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -319,6 +268,7 @@ RANLIB = @RANLIB@ RDL_LIBS = @RDL_LIBS@ READER_TEST = @READER_TEST@ RELDATE = @RELDATE@ +RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -343,6 +293,7 @@ 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@ VERSION = @VERSION@ @@ -375,7 +326,6 @@ WITH_SAX1 = @WITH_SAX1@ WITH_SCHEMAS = @WITH_SCHEMAS@ WITH_SCHEMATRON = @WITH_SCHEMATRON@ WITH_THREADS = @WITH_THREADS@ -WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@ WITH_TREE = @WITH_TREE@ WITH_TRIO = @WITH_TRIO@ WITH_VALID = @WITH_VALID@ @@ -449,45 +399,72 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include -AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) -LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) -CLEANFILES = *.tmp -EXTRA_DIST = \ - examples.xml \ - examples.xsl \ - index.html \ - index.py \ - io1.res \ - io2.res \ - reader1.res \ - reader3.res \ - reader4.res \ - test1.xml \ - test2.xml \ - test3.xml \ - tree1.res \ - tree2.res \ - tst.xml \ - writer.xml \ - xpath1.res \ - xpath2.res -io1_SOURCES = io1.c -io2_SOURCES = io2.c -parse1_SOURCES = parse1.c -parse2_SOURCES = parse2.c -parse3_SOURCES = parse3.c -parse4_SOURCES = parse4.c +# Beware this is autogenerated by index.py +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ +DEPS = $(top_builddir)/libxml2.la +LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ +EXTRA_DIST = examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res +xpath2_SOURCES = xpath2.c +xpath2_LDFLAGS = +xpath2_DEPENDENCIES = $(DEPS) +xpath2_LDADD = @RDL_LIBS@ $(LDADDS) reader1_SOURCES = reader1.c +reader1_LDFLAGS = +reader1_DEPENDENCIES = $(DEPS) +reader1_LDADD = @RDL_LIBS@ $(LDADDS) +reader4_SOURCES = reader4.c +reader4_LDFLAGS = +reader4_DEPENDENCIES = $(DEPS) +reader4_LDADD = @RDL_LIBS@ $(LDADDS) +parse2_SOURCES = parse2.c +parse2_LDFLAGS = +parse2_DEPENDENCIES = $(DEPS) +parse2_LDADD = @RDL_LIBS@ $(LDADDS) reader2_SOURCES = reader2.c +reader2_LDFLAGS = +reader2_DEPENDENCIES = $(DEPS) +reader2_LDADD = @RDL_LIBS@ $(LDADDS) +parse3_SOURCES = parse3.c +parse3_LDFLAGS = +parse3_DEPENDENCIES = $(DEPS) +parse3_LDADD = @RDL_LIBS@ $(LDADDS) reader3_SOURCES = reader3.c -reader4_SOURCES = reader4.c -testWriter_SOURCES = testWriter.c -tree1_SOURCES = tree1.c +reader3_LDFLAGS = +reader3_DEPENDENCIES = $(DEPS) +reader3_LDADD = @RDL_LIBS@ $(LDADDS) tree2_SOURCES = tree2.c +tree2_LDFLAGS = +tree2_DEPENDENCIES = $(DEPS) +tree2_LDADD = @RDL_LIBS@ $(LDADDS) +parse4_SOURCES = parse4.c +parse4_LDFLAGS = +parse4_DEPENDENCIES = $(DEPS) +parse4_LDADD = @RDL_LIBS@ $(LDADDS) +io2_SOURCES = io2.c +io2_LDFLAGS = +io2_DEPENDENCIES = $(DEPS) +io2_LDADD = @RDL_LIBS@ $(LDADDS) +testWriter_SOURCES = testWriter.c +testWriter_LDFLAGS = +testWriter_DEPENDENCIES = $(DEPS) +testWriter_LDADD = @RDL_LIBS@ $(LDADDS) +io1_SOURCES = io1.c +io1_LDFLAGS = +io1_DEPENDENCIES = $(DEPS) +io1_LDADD = @RDL_LIBS@ $(LDADDS) xpath1_SOURCES = xpath1.c -xpath2_SOURCES = xpath2.c +xpath1_LDFLAGS = +xpath1_DEPENDENCIES = $(DEPS) +xpath1_LDADD = @RDL_LIBS@ $(LDADDS) +parse1_SOURCES = parse1.c +parse1_LDFLAGS = +parse1_DEPENDENCIES = $(DEPS) +parse1_LDADD = @RDL_LIBS@ $(LDADDS) +tree1_SOURCES = tree1.c +tree1_LDFLAGS = +tree1_DEPENDENCIES = $(DEPS) +tree1_LDADD = @RDL_LIBS@ $(LDADDS) all: all-am .SUFFIXES: @@ -531,51 +508,51 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES) $(EXTRA_io1_DEPENDENCIES) +io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES) @rm -f io1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(io1_OBJECTS) $(io1_LDADD) $(LIBS) -io2$(EXEEXT): $(io2_OBJECTS) $(io2_DEPENDENCIES) $(EXTRA_io2_DEPENDENCIES) + $(AM_V_CCLD)$(io1_LINK) $(io1_OBJECTS) $(io1_LDADD) $(LIBS) +io2$(EXEEXT): $(io2_OBJECTS) $(io2_DEPENDENCIES) @rm -f io2$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(io2_OBJECTS) $(io2_LDADD) $(LIBS) -parse1$(EXEEXT): $(parse1_OBJECTS) $(parse1_DEPENDENCIES) $(EXTRA_parse1_DEPENDENCIES) + $(AM_V_CCLD)$(io2_LINK) $(io2_OBJECTS) $(io2_LDADD) $(LIBS) +parse1$(EXEEXT): $(parse1_OBJECTS) $(parse1_DEPENDENCIES) @rm -f parse1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(parse1_OBJECTS) $(parse1_LDADD) $(LIBS) -parse2$(EXEEXT): $(parse2_OBJECTS) $(parse2_DEPENDENCIES) $(EXTRA_parse2_DEPENDENCIES) + $(AM_V_CCLD)$(parse1_LINK) $(parse1_OBJECTS) $(parse1_LDADD) $(LIBS) +parse2$(EXEEXT): $(parse2_OBJECTS) $(parse2_DEPENDENCIES) @rm -f parse2$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(parse2_OBJECTS) $(parse2_LDADD) $(LIBS) -parse3$(EXEEXT): $(parse3_OBJECTS) $(parse3_DEPENDENCIES) $(EXTRA_parse3_DEPENDENCIES) + $(AM_V_CCLD)$(parse2_LINK) $(parse2_OBJECTS) $(parse2_LDADD) $(LIBS) +parse3$(EXEEXT): $(parse3_OBJECTS) $(parse3_DEPENDENCIES) @rm -f parse3$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(parse3_OBJECTS) $(parse3_LDADD) $(LIBS) -parse4$(EXEEXT): $(parse4_OBJECTS) $(parse4_DEPENDENCIES) $(EXTRA_parse4_DEPENDENCIES) + $(AM_V_CCLD)$(parse3_LINK) $(parse3_OBJECTS) $(parse3_LDADD) $(LIBS) +parse4$(EXEEXT): $(parse4_OBJECTS) $(parse4_DEPENDENCIES) @rm -f parse4$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(parse4_OBJECTS) $(parse4_LDADD) $(LIBS) -reader1$(EXEEXT): $(reader1_OBJECTS) $(reader1_DEPENDENCIES) $(EXTRA_reader1_DEPENDENCIES) + $(AM_V_CCLD)$(parse4_LINK) $(parse4_OBJECTS) $(parse4_LDADD) $(LIBS) +reader1$(EXEEXT): $(reader1_OBJECTS) $(reader1_DEPENDENCIES) @rm -f reader1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reader1_OBJECTS) $(reader1_LDADD) $(LIBS) -reader2$(EXEEXT): $(reader2_OBJECTS) $(reader2_DEPENDENCIES) $(EXTRA_reader2_DEPENDENCIES) + $(AM_V_CCLD)$(reader1_LINK) $(reader1_OBJECTS) $(reader1_LDADD) $(LIBS) +reader2$(EXEEXT): $(reader2_OBJECTS) $(reader2_DEPENDENCIES) @rm -f reader2$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reader2_OBJECTS) $(reader2_LDADD) $(LIBS) -reader3$(EXEEXT): $(reader3_OBJECTS) $(reader3_DEPENDENCIES) $(EXTRA_reader3_DEPENDENCIES) + $(AM_V_CCLD)$(reader2_LINK) $(reader2_OBJECTS) $(reader2_LDADD) $(LIBS) +reader3$(EXEEXT): $(reader3_OBJECTS) $(reader3_DEPENDENCIES) @rm -f reader3$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reader3_OBJECTS) $(reader3_LDADD) $(LIBS) -reader4$(EXEEXT): $(reader4_OBJECTS) $(reader4_DEPENDENCIES) $(EXTRA_reader4_DEPENDENCIES) + $(AM_V_CCLD)$(reader3_LINK) $(reader3_OBJECTS) $(reader3_LDADD) $(LIBS) +reader4$(EXEEXT): $(reader4_OBJECTS) $(reader4_DEPENDENCIES) @rm -f reader4$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reader4_OBJECTS) $(reader4_LDADD) $(LIBS) -testWriter$(EXEEXT): $(testWriter_OBJECTS) $(testWriter_DEPENDENCIES) $(EXTRA_testWriter_DEPENDENCIES) + $(AM_V_CCLD)$(reader4_LINK) $(reader4_OBJECTS) $(reader4_LDADD) $(LIBS) +testWriter$(EXEEXT): $(testWriter_OBJECTS) $(testWriter_DEPENDENCIES) @rm -f testWriter$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(testWriter_OBJECTS) $(testWriter_LDADD) $(LIBS) -tree1$(EXEEXT): $(tree1_OBJECTS) $(tree1_DEPENDENCIES) $(EXTRA_tree1_DEPENDENCIES) + $(AM_V_CCLD)$(testWriter_LINK) $(testWriter_OBJECTS) $(testWriter_LDADD) $(LIBS) +tree1$(EXEEXT): $(tree1_OBJECTS) $(tree1_DEPENDENCIES) @rm -f tree1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tree1_OBJECTS) $(tree1_LDADD) $(LIBS) -tree2$(EXEEXT): $(tree2_OBJECTS) $(tree2_DEPENDENCIES) $(EXTRA_tree2_DEPENDENCIES) + $(AM_V_CCLD)$(tree1_LINK) $(tree1_OBJECTS) $(tree1_LDADD) $(LIBS) +tree2$(EXEEXT): $(tree2_OBJECTS) $(tree2_DEPENDENCIES) @rm -f tree2$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tree2_OBJECTS) $(tree2_LDADD) $(LIBS) -xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES) $(EXTRA_xpath1_DEPENDENCIES) + $(AM_V_CCLD)$(tree2_LINK) $(tree2_OBJECTS) $(tree2_LDADD) $(LIBS) +xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES) @rm -f xpath1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS) -xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES) $(EXTRA_xpath2_DEPENDENCIES) + $(AM_V_CCLD)$(xpath1_LINK) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS) +xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES) @rm -f xpath2$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS) + $(AM_V_CCLD)$(xpath2_LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -602,23 +579,26 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -722,19 +702,13 @@ install-am: all-am installcheck: installcheck-am install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi + $(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) @@ -745,7 +719,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am @@ -817,7 +791,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-local clean-noinstPROGRAMS ctags distclean \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ @@ -831,61 +805,54 @@ uninstall-am: tags uninstall uninstall-am -@REBUILD_DOCS_TRUE@rebuild: examples.xml index.html -@REBUILD_DOCS_TRUE@.PHONY: rebuild +rebuild: examples.xml index.html -@REBUILD_DOCS_TRUE@examples.xml: index.py $(noinst_PROGRAMS:=.c) -@REBUILD_DOCS_TRUE@ cd $(srcdir) && $(PYTHON) index.py -@REBUILD_DOCS_TRUE@ $(MAKE) Makefile +examples.xml: index.py *.c + -@($(srcdir)/index.py) -@REBUILD_DOCS_TRUE@index.html: examples.xml examples.xsl -@REBUILD_DOCS_TRUE@ cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page" -@REBUILD_DOCS_TRUE@ -cd $(srcdir) && xmllint --valid --noout index.html +index.html: examples.xml examples.xsl + -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) install-data-local: - $(MKDIR_P) $(DESTDIR)$(HTML_DIR) - -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) - -clean-local: - test -f Makefile.am || rm -f test?.xml + @MKDIR_P@ $(DESTDIR)$(HTML_DIR) + -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) valgrind: $(MAKE) CHECKER='valgrind' tests tests: $(noinst_PROGRAMS) - test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml . @(echo '## examples regression tests') @(echo > .memdump) - $(CHECKER) ./io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse1 test1.xml - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse2 test2.xml - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse3 - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./parse4 test3.xml - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 - $(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res - @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse2 test2.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse3) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse4 test3.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse1 test1.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) # 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. diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml index 28929cc..a237a0e 100644 --- a/doc/examples/examples.xml +++ b/doc/examples/examples.xml @@ -1,9 +1,74 @@ + + Parse and validate an XML file with an xmlReader + Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.) + reader2 <valid_xml_filename> + reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp + Daniel Veillard + see Copyright for the status of this software. +
xmlReader
+ + <libxml/xmlreader.h> + + + + + + + + + + + + + + + + + + + + + +
+ + Load a document, locate subelements with XPath, modify said elements and save the resulting document. + Shows how to make a full round-trip from a load/edit/save + xpath2 <xml-file> <xpath-expr> <new-value> + xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp + Aleksey Sanin and Daniel Veillard + see Copyright for the status of this software. +
XPath
+ + <libxml/parser.h> + <libxml/xpath.h> + <libxml/xpathInternals.h> + <libxml/tree.h> + + + + + + + + + + + + + + + + + + + +
Evaluate XPath expression and prints result node set. Shows how to evaluate XPath expression and register known namespaces in XPath context. xpath1 <xml-file> <xpath-expr> [<known-ns-list>] - xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res + ./xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp Aleksey Sanin see Copyright for the status of this software.
XPath
@@ -58,43 +123,34 @@
- - Parse and validate an XML file with an xmlReader - Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.) - reader2 <valid_xml_filename> - reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res - Daniel Veillard + + Output to char buffer + Demonstrate the use of xmlDocDumpMemory to output document to a character buffer + io2 + io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp + John Fleck see Copyright for the status of this software. -
xmlReader
+
InputOutput
- <libxml/xmlreader.h> + <libxml/parser.h> - - - - - - - - - - - - - - - - - - + + + + + + + + +
Creates a tree Shows how to create document, nodes and dump it to stdout or file. tree2 <filename> -Default output: stdout - tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res + tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp Lucas Brasilino <brasilino@recife.pe.gov.br> see Copyright for the status of this software
Tree
@@ -118,113 +174,11 @@
- - Example of custom Input/Output - Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way. - io1 - io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res - Daniel Veillard - see Copyright for the status of this software. -
InputOutput
- - <libxml/parser.h> - <libxml/xmlIO.h> - <libxml/xinclude.h> - <libxml/tree.h> - - - - - - - - - - - - -
- - Parse an XML document chunk by chunk to a tree and free it - Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree - parse4 test3.xml - parse4 test3.xml - Daniel Veillard - see Copyright for the status of this software. -
Parsing
- - <libxml/tree.h> - <libxml/parser.h> - - - - - - - - - - - - -
- - Load a document, locate subelements with XPath, modify said elements and save the resulting document. - Shows how to make a full round-trip from a load/edit/save - xpath2 <xml-file> <xpath-expr> <new-value> - xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res - Aleksey Sanin and Daniel Veillard - see Copyright for the status of this software. -
XPath
- - <libxml/parser.h> - <libxml/xpath.h> - <libxml/xpathInternals.h> - <libxml/tree.h> - - - - - - - - - - - - - - - - -
- - Output to char buffer - Demonstrate the use of xmlDocDumpMemory to output document to a character buffer - io2 - io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res - John Fleck - see Copyright for the status of this software. -
InputOutput
- - <libxml/parser.h> - - - - - - - - - - - -
Parse an XML file with an xmlReader Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader1 <filename> - reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp Daniel Veillard see Copyright for the status of this software.
xmlReader
@@ -233,11 +187,14 @@ + + + @@ -245,29 +202,77 @@
- - Navigates a tree to print element names - Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order. - tree1 filename_or_URL - tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res - Dodji Seketeli + + use various APIs for the xmlWriter + tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized. + testWriter + testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res + Alfred Mickautsch see Copyright for the status of this software. -
Tree
+
xmlWriter
+ + <libxml/encoding.h> + <libxml/xmlwriter.h> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Parse an XML document chunk by chunk to a tree and free it + Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree + parse4 test3.xml + parse4 test3.xml + Daniel Veillard + see Copyright for the status of this software. +
Parsing
<libxml/tree.h> <libxml/parser.h> - - - + + + + +
Show how to extract subdocuments with xmlReader Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader3 - reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res + reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp Daniel Veillard see Copyright for the status of this software.
xmlReader
@@ -284,24 +289,25 @@
- - Parse and validate an XML file to a tree and free the result - Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree. - parse2 test2.xml - parse2 test2.xml + + Example of custom Input/Output + Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way. + io1 + io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp Daniel Veillard see Copyright for the status of this software. -
Parsing
+
InputOutput
- <libxml/tree.h> <libxml/parser.h> + <libxml/xmlIO.h> + <libxml/xinclude.h> + <libxml/tree.h> - - - - - + + + +
@@ -320,11 +326,29 @@ + + Navigates a tree to print element names + Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order. + tree1 filename_or_URL + tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp + Dodji Seketeli + see Copyright for the status of this software. +
Tree
+ + <libxml/tree.h> + <libxml/parser.h> + + + + + + +
Parse multiple XML files reusing an xmlReader Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader4 <filename> [ filename ... ] - reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res + reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp Graham Bennett see Copyright for the status of this software.
xmlReader
@@ -340,58 +364,34 @@
- - use various APIs for the xmlWriter - tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized. - testWriter - testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done - Alfred Mickautsch + + Parse and validate an XML file to a tree and free the result + Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree. + parse2 test2.xml + parse2 test2.xml + Daniel Veillard see Copyright for the status of this software. -
xmlWriter
+
Parsing
- <libxml/encoding.h> - <libxml/xmlwriter.h> + <libxml/tree.h> + <libxml/parser.h> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+ + - - - + @@ -401,8 +401,8 @@ - + @@ -430,12 +430,12 @@ + + - - - + @@ -447,9 +447,9 @@ - + @@ -458,16 +458,16 @@ + - - - + + - + @@ -479,12 +479,12 @@ + + - - - + @@ -500,34 +500,34 @@ - + + + - - - + - + - + @@ -566,16 +566,16 @@ - + - + @@ -692,28 +692,28 @@ - + - + - + - + - + - + @@ -721,22 +721,22 @@
- +
- +
- +
diff --git a/doc/examples/index.html b/doc/examples/index.html deleted file mode 100644 index c9314a3..0000000 --- a/doc/examples/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - -Libxml2 set of examples
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Libxml2 set of examples

Examples Menu
Related links

The examples are stored per section depending on the main focus - of the example:

  • xmlWriter :

  • InputOutput :

    • io1.c: Example of custom Input/Output
    • io2.c: Output to char buffer
  • Tree :

    • tree2.c: Creates a tree
    • tree1.c: Navigates a tree to print element names
  • XPath :

    • xpath1.c: Evaluate XPath expression and prints result node set.
    • xpath2.c: Load a document, locate subelements with XPath, modify said elements and save the resulting document.
  • Parsing :

    • parse3.c: Parse an XML document in memory to a tree and free it
    • parse4.c: Parse an XML document chunk by chunk to a tree and free it
    • parse2.c: Parse and validate an XML file to a tree and free the result
    • parse1.c: Parse an XML file to a tree and free it
  • xmlReader :

    • reader2.c: Parse and validate an XML file with an xmlReader
    • reader1.c: Parse an XML file with an xmlReader
    • reader3.c: Show how to extract subdocuments with xmlReader
    • reader4.c: Parse multiple XML files reusing an xmlReader

Getting the compilation options and libraries dependancies needed -to generate binaries from the examples is best done on Linux/Unix by using -the xml2-config script which should have been installed as part of make -install step or when installing the libxml2 development package:

gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`

InputOutput Examples

io1.c: Example of custom Input/Output

Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.

Includes:

Uses:

Usage:

io1

Author: Daniel Veillard

io2.c: Output to char buffer

Demonstrate the use of xmlDocDumpMemory to output document to a character buffer

Includes:

Uses:

Usage:

io2

Author: John Fleck

Parsing Examples

parse3.c: Parse an XML document in memory to a tree and free it

Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree

Includes:

Uses:

Usage:

parse3

Author: Daniel Veillard

parse4.c: Parse an XML document chunk by chunk to a tree and free it

Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree

Includes:

Uses:

Usage:

parse4 test3.xml

Author: Daniel Veillard

parse2.c: Parse and validate an XML file to a tree and free the result

Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.

Includes:

Uses:

Usage:

parse2 test2.xml

Author: Daniel Veillard

parse1.c: Parse an XML file to a tree and free it

Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree

Includes:

Uses:

Usage:

parse1 test1.xml

Author: Daniel Veillard

Tree Examples

tree2.c: Creates a tree

Shows how to create document, nodes and dump it to stdout or file.

Includes:

Uses:

Usage:

tree2 <filename> -Default output: stdout

Author: Lucas Brasilino <brasilino@recife.pe.gov.br>

tree1.c: Navigates a tree to print element names

Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.

Includes:

Uses:

Usage:

tree1 filename_or_URL

Author: Dodji Seketeli

XPath Examples

xpath1.c: Evaluate XPath expression and prints result node set.

Shows how to evaluate XPath expression and register known namespaces in XPath context.

Includes:

Uses:

Usage:

xpath1 <xml-file> <xpath-expr> [<known-ns-list>]

Author: Aleksey Sanin

xpath2.c: Load a document, locate subelements with XPath, modify said elements and save the resulting document.

Shows how to make a full round-trip from a load/edit/save

Includes:

Uses:

Usage:

xpath2 <xml-file> <xpath-expr> <new-value>

Author: Aleksey Sanin and Daniel Veillard

xmlReader Examples

reader2.c: Parse and validate an XML file with an xmlReader

Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader2 <valid_xml_filename>

Author: Daniel Veillard

reader1.c: Parse an XML file with an xmlReader

Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader1 <filename>

Author: Daniel Veillard

reader3.c: Show how to extract subdocuments with xmlReader

Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader3

Author: Daniel Veillard

reader4.c: Parse multiple XML files reusing an xmlReader

Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader4 <filename> [ filename ... ]

Author: Graham Bennett

xmlWriter Examples

testWriter.c: use various APIs for the xmlWriter

tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized.

Includes:

Uses:

Usage:

testWriter

Author: Alfred Mickautsch

Daniel Veillard

diff --git a/doc/examples/index.py b/doc/examples/index.py index 7e0efaa..11df6f0 100755 --- a/doc/examples/index.py +++ b/doc/examples/index.py @@ -13,7 +13,7 @@ sys.path.insert(0, "..") from apibuild import CParser, escape examples = [] -extras = ['examples.xsl', 'index.html', 'index.py'] +extras = ['examples.xsl', 'index.py'] tests = [] sections = {} symbols = {} @@ -177,10 +177,10 @@ def parse(filename, output): type = id.get_type() output.write(" <%s line='%d' name='%s'/>\n" % (type, line, name)) - + output.write(" \n") output.write("
\n") - + return idx def dump_symbols(output): @@ -220,59 +220,43 @@ def dump_Makefile(): extras.append(file) for file in glob.glob('*.res'): extras.append(file) - Makefile="""## -## This file is auto-generated by index.py -## DO NOT EDIT !!! -## - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include -AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) -LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) + Makefile="""# Beware this is autogenerated by index.py +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ +DEPS = $(top_builddir)/libxml2.la +LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ -CLEANFILES = *.tmp - -if REBUILD_DOCS rebuild: examples.xml index.html -.PHONY: rebuild -examples.xml: index.py $(noinst_PROGRAMS:=.c) - cd $(srcdir) && $(PYTHON) index.py - $(MAKE) Makefile +examples.xml: index.py *.c + -@($(srcdir)/index.py) index.html: examples.xml examples.xsl - cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page" - -cd $(srcdir) && xmllint --valid --noout index.html -endif + -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) install-data-local: - $(MKDIR_P) $(DESTDIR)$(HTML_DIR) - -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) - -clean-local: - test -f Makefile.am || rm -f test?.xml + $(mkinstalldirs) $(DESTDIR)$(HTML_DIR) + -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) """ - examples.sort() - extras.sort() - tests.sort() EXTRA_DIST="" for extra in extras: - EXTRA_DIST = EXTRA_DIST + " \\\n\t" + extra - Makefile = Makefile + "EXTRA_DIST =%s\n\n" % (EXTRA_DIST) + EXTRA_DIST = EXTRA_DIST + extra + " " + Makefile = Makefile + "EXTRA_DIST=%s\n\n" % (EXTRA_DIST) noinst_PROGRAMS="" for example in examples: - noinst_PROGRAMS = noinst_PROGRAMS + " \\\n\t" + example - Makefile = Makefile + "noinst_PROGRAMS =%s\n\n" % (noinst_PROGRAMS) + noinst_PROGRAMS = noinst_PROGRAMS + example + " " + Makefile = Makefile + "noinst_PROGRAMS=%s\n\n" % (noinst_PROGRAMS) for example in examples: - Makefile = Makefile + "%s_SOURCES = %s.c\n\n" % (example, example) + Makefile = Makefile + "%s_SOURCES=%s.c\n%s_LDFLAGS=\n%s_DEPENDENCIES= $(DEPS)\n%s_LDADD= @RDL_LIBS@ $(LDADDS)\n\n" % (example, example, example, + example, example) Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind' tests\n\n" Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n" - Makefile = Makefile + "\ttest -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .\n" Makefile = Makefile + "\t@(echo '## examples regression tests')\n" Makefile = Makefile + "\t@(echo > .memdump)\n" for test in tests: - Makefile = Makefile + "\t$(CHECKER) %s\n" % (test) - Makefile = Makefile + '\t@grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0\n' + Makefile = Makefile + "\t@($(CHECKER) %s)\n" % (test) + Makefile = Makefile + '\t@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)\n' + Makefile = Makefile + "\n\n" try: old = open("Makefile.am", "r").read() if old != Makefile: @@ -280,23 +264,23 @@ clean-local: print "Updated Makefile.am" except: print "Failed to read or save Makefile.am" -# # -# # Autogenerate the .cvsignore too ... DEPRECATED -# # -# ignore = """.memdump -#Makefile.in -#Makefile -#""" -# for example in examples: -# ignore = ignore + "%s\n" % (example) -# try: -# old = open(".cvsignore", "r").read() -# if old != ignore: -# n = open(".cvsignore", "w").write(ignore) -# print "Updated .cvsignore" -# except: -# print "Failed to read or save .cvsignore" - + # + # Autogenerate the .cvsignore too ... + # + ignore = """.memdump +Makefile.in +Makefile +""" + for example in examples: + ignore = ignore + "%s\n" % (example) + try: + old = open(".cvsignore", "r").read() + if old != ignore: + n = open(".cvsignore", "w").write(ignore) + print "Updated .cvsignore" + except: + print "Failed to read or save .cvsignore" + if __name__ == "__main__": load_api() output = open("examples.xml", "w") diff --git a/doc/examples/io1.c b/doc/examples/io1.c index d077cd8..c8a47e3 100644 --- a/doc/examples/io1.c +++ b/doc/examples/io1.c @@ -6,7 +6,7 @@ * XInclude method context to show how dynamic document can * be built in a clean way. * usage: io1 - * test: io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res + * test: io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/io1.res b/doc/examples/io1.res index adf65c7..4a4c036 100644 --- a/doc/examples/io1.res +++ b/doc/examples/io1.res @@ -1,5 +1,5 @@

List of people:

- ab + ab
diff --git a/doc/examples/io2.c b/doc/examples/io2.c index 4676f4a..814a27e 100644 --- a/doc/examples/io2.c +++ b/doc/examples/io2.c @@ -4,7 +4,7 @@ * purpose: Demonstrate the use of xmlDocDumpMemory * to output document to a character buffer * usage: io2 - * test: io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res + * test: io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp * author: John Fleck * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader1.c b/doc/examples/reader1.c index e8a005a..90db2a1 100644 --- a/doc/examples/reader1.c +++ b/doc/examples/reader1.c @@ -6,7 +6,7 @@ * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader1 - * test: reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + * test: reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader2.c b/doc/examples/reader2.c index 043b137..c32ada5 100644 --- a/doc/examples/reader2.c +++ b/doc/examples/reader2.c @@ -7,7 +7,7 @@ * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader2 - * test: reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + * test: reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader3.c b/doc/examples/reader3.c index 3eeb61f..51f9d3b 100644 --- a/doc/examples/reader3.c +++ b/doc/examples/reader3.c @@ -7,7 +7,7 @@ * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader3 - * test: reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res + * test: reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader4.c b/doc/examples/reader4.c index 1289d0d..ed2726a 100644 --- a/doc/examples/reader4.c +++ b/doc/examples/reader4.c @@ -6,7 +6,7 @@ * and parser context. (Note that the XMLReader functions require * libxml2 version later than 2.6.) * usage: reader4 [ filename ... ] - * test: reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res + * test: reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp * author: Graham Bennett * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c index f662f76..9bf590f 100644 --- a/doc/examples/testWriter.c +++ b/doc/examples/testWriter.c @@ -7,7 +7,7 @@ * do encoding string conversions too. The resulting * documents are then serialized. * usage: testWriter - * test: testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done + * test: testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res * author: Alfred Mickautsch * copy: see Copyright for the status of this software. */ @@ -37,16 +37,16 @@ main(void) LIBXML_TEST_VERSION /* first, the file version */ - testXmlwriterFilename("writer1.tmp"); + testXmlwriterFilename("writer1.res"); /* next, the memory version */ - testXmlwriterMemory("writer2.tmp"); + testXmlwriterMemory("writer2.res"); /* next, the DOM version */ - testXmlwriterDoc("writer3.tmp"); + testXmlwriterDoc("writer3.res"); /* next, the tree version */ - testXmlwriterTree("writer4.tmp"); + testXmlwriterTree("writer4.res"); /* * Cleanup function for the XML library. diff --git a/doc/examples/tree1.c b/doc/examples/tree1.c index e6faefc..8644cf1 100644 --- a/doc/examples/tree1.c +++ b/doc/examples/tree1.c @@ -5,7 +5,7 @@ * get the root element, then walk the document and print * all the element name in document order. * usage: tree1 filename_or_URL - * test: tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res + * test: tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp * author: Dodji Seketeli * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/tree2.c b/doc/examples/tree2.c index 1cd1abe..c40fc55 100644 --- a/doc/examples/tree2.c +++ b/doc/examples/tree2.c @@ -3,7 +3,7 @@ * synopsis: Creates a tree * purpose: Shows how to create document, nodes and dump it to stdout or file. * usage: tree2 -Default output: stdout - * test: tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res + * test: tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp * author: Lucas Brasilino * copy: see Copyright for the status of this software */ diff --git a/doc/examples/xpath1.c b/doc/examples/xpath1.c index 0a31650..f2f7406 100644 --- a/doc/examples/xpath1.c +++ b/doc/examples/xpath1.c @@ -4,7 +4,7 @@ * purpose: Shows how to evaluate XPath expression and register * known namespaces in XPath context. * usage: xpath1 [] - * test: xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res + * test: ./xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp * author: Aleksey Sanin * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/xpath2.c b/doc/examples/xpath2.c index f604114..6ff4008 100644 --- a/doc/examples/xpath2.c +++ b/doc/examples/xpath2.c @@ -4,7 +4,7 @@ * said elements and save the resulting document. * purpose: Shows how to make a full round-trip from a load/edit/save * usage: xpath2 - * test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res + * test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp * author: Aleksey Sanin and Daniel Veillard * copy: see Copyright for the status of this software. */ -- cgit v1.2.3