more updates for libxml2 2.5.10
Marc Liyanage [Sun, 7 Sep 2003 10:04:08 +0000 (10:04 +0000)]
git-svn-id: svn+ssh://www.entropy.ch/Users/liyanage/Documents/svnroot/trunk/TestXSLT@59 153f8dbc-cef0-0310-8e0e-ba1d6c9f8c6b

144 files changed:
libxml2/depcomp [new file with mode: 0755]
libxml2/doc/benchmark.gif [new file with mode: 0644]
libxml2/doc/html/home.png [new file with mode: 0644]
libxml2/doc/html/index.html [new file with mode: 0644]
libxml2/doc/html/left.png [new file with mode: 0644]
libxml2/doc/html/libxml-relaxng.html [new file with mode: 0644]
libxml2/doc/html/libxml-xmlreader.html [new file with mode: 0644]
libxml2/doc/html/right.png [new file with mode: 0644]
libxml2/doc/html/up.png [new file with mode: 0644]
libxml2/doc/libxml2.xsa [new file with mode: 0644]
libxml2/doc/tutorial/aph.html [new file with mode: 0644]
libxml2/doc/tutorial/ix01.html [new file with mode: 0644]
libxml2/doc/xmllint.html [new file with mode: 0644]
libxml2/doc/xmllint.xml [new file with mode: 0644]
libxml2/doc/xsa.xsl [new file with mode: 0644]
libxml2/libxml.spec [new file with mode: 0644]
libxml2/python/tests/reader4.py [new file with mode: 0755]
libxml2/python/tests/reader5.py [new file with mode: 0755]
libxml2/python/tests/reader6.py [new file with mode: 0755]
libxml2/python/tests/thread2.py [new file with mode: 0755]
libxml2/result/noent/slashdot16.xml [new file with mode: 0644]
libxml2/result/noent/utf16bom.xml [new file with mode: 0644]
libxml2/result/relaxng/comps_0 [new file with mode: 0644]
libxml2/result/relaxng/comps_0.err [new file with mode: 0644]
libxml2/result/relaxng/comps_err [new file with mode: 0644]
libxml2/result/relaxng/comps_valid [new file with mode: 0644]
libxml2/result/relaxng/demo2_err [new file with mode: 0644]
libxml2/result/relaxng/demo2_valid [new file with mode: 0644]
libxml2/result/relaxng/demo3_err [new file with mode: 0644]
libxml2/result/relaxng/demo3_valid [new file with mode: 0644]
libxml2/result/relaxng/demo_err [new file with mode: 0644]
libxml2/result/relaxng/demo_valid [new file with mode: 0644]
libxml2/result/relaxng/docbook_0 [new file with mode: 0644]
libxml2/result/relaxng/docbook_0.err [new file with mode: 0644]
libxml2/result/relaxng/docbook_err [new file with mode: 0644]
libxml2/result/relaxng/docbook_valid [new file with mode: 0644]
libxml2/result/relaxng/empty0_0 [new file with mode: 0644]
libxml2/result/relaxng/empty0_0.err [new file with mode: 0644]
libxml2/result/relaxng/empty0_err [new file with mode: 0644]
libxml2/result/relaxng/empty0_valid [new file with mode: 0644]
libxml2/result/relaxng/empty1_0 [new file with mode: 0644]
libxml2/result/relaxng/empty1_0.err [new file with mode: 0644]
libxml2/result/relaxng/empty1_1 [new file with mode: 0644]
libxml2/result/relaxng/empty1_1.err [new file with mode: 0644]
libxml2/result/relaxng/empty1_err [new file with mode: 0644]
libxml2/result/relaxng/empty1_valid [new file with mode: 0644]
libxml2/result/relaxng/proofsystem_err [new file with mode: 0644]
libxml2/result/relaxng/proofsystem_valid [new file with mode: 0644]
libxml2/result/relaxng/spec_0 [new file with mode: 0644]
libxml2/result/relaxng/spec_0.err [new file with mode: 0644]
libxml2/result/relaxng/spec_err [new file with mode: 0644]
libxml2/result/relaxng/spec_valid [new file with mode: 0644]
libxml2/result/relaxng/tutor9_6.rng [new file with mode: 0644]
libxml2/result/schemas/all_0_6 [new file with mode: 0644]
libxml2/result/schemas/all_0_6.err [new file with mode: 0644]
libxml2/result/schemas/all_0_7 [new file with mode: 0644]
libxml2/result/schemas/all_0_7.err [new file with mode: 0644]
libxml2/result/schemas/all_1_6 [new file with mode: 0644]
libxml2/result/schemas/all_1_6.err [new file with mode: 0644]
libxml2/result/schemas/all_1_7 [new file with mode: 0644]
libxml2/result/schemas/all_1_7.err [new file with mode: 0644]
libxml2/result/schemas/all_2_0 [new file with mode: 0644]
libxml2/result/schemas/all_2_0.err [new file with mode: 0644]
libxml2/result/schemas/all_2_1 [new file with mode: 0644]
libxml2/result/schemas/all_2_1.err [new file with mode: 0644]
libxml2/result/schemas/all_2_2 [new file with mode: 0644]
libxml2/result/schemas/all_2_2.err [new file with mode: 0644]
libxml2/result/schemas/all_2_3 [new file with mode: 0644]
libxml2/result/schemas/all_2_3.err [new file with mode: 0644]
libxml2/result/schemas/all_2_4 [new file with mode: 0644]
libxml2/result/schemas/all_2_4.err [new file with mode: 0644]
libxml2/result/schemas/all_2_5 [new file with mode: 0644]
libxml2/result/schemas/all_2_5.err [new file with mode: 0644]
libxml2/result/schemas/all_2_6 [new file with mode: 0644]
libxml2/result/schemas/all_2_6.err [new file with mode: 0644]
libxml2/result/schemas/all_2_7 [new file with mode: 0644]
libxml2/result/schemas/all_2_7.err [new file with mode: 0644]
libxml2/result/schemas/attr0_0_0 [new file with mode: 0644]
libxml2/result/schemas/attr0_0_0.err [new file with mode: 0644]
libxml2/result/schemas/deter0_0_0 [new file with mode: 0644]
libxml2/result/schemas/deter0_0_0.err [new file with mode: 0644]
libxml2/result/schemas/group0_0_0 [new file with mode: 0644]
libxml2/result/schemas/group0_0_0.err [new file with mode: 0644]
libxml2/result/schemas/hexbinary_0_0 [new file with mode: 0644]
libxml2/result/schemas/hexbinary_0_0.err [new file with mode: 0644]
libxml2/result/schemas/hexbinary_0_1 [new file with mode: 0644]
libxml2/result/schemas/hexbinary_0_1.err [new file with mode: 0644]
libxml2/result/slashdot16.xml [new file with mode: 0644]
libxml2/result/utf16bom.xml [new file with mode: 0644]
libxml2/result/valid/id1.xml [new file with mode: 0644]
libxml2/result/valid/id1.xml.err [new file with mode: 0644]
libxml2/result/valid/id2.xml [new file with mode: 0644]
libxml2/result/valid/id2.xml.err [new file with mode: 0644]
libxml2/result/valid/id3.xml [new file with mode: 0644]
libxml2/result/valid/id3.xml.err [new file with mode: 0644]
libxml2/result/valid/mixed_ns.xml [new file with mode: 0644]
libxml2/result/valid/mixed_ns.xml.err [new file with mode: 0644]
libxml2/result/valid/ns.xml [new file with mode: 0644]
libxml2/result/valid/ns.xml.err [new file with mode: 0644]
libxml2/result/valid/ns2.xml [new file with mode: 0644]
libxml2/result/valid/ns2.xml.err [new file with mode: 0644]
libxml2/stamp-h [new file with mode: 0644]
libxml2/test/relaxng/comps.rng [new file with mode: 0644]
libxml2/test/relaxng/comps_0.xml [new file with mode: 0644]
libxml2/test/relaxng/demo.rng [new file with mode: 0644]
libxml2/test/relaxng/demo.xml [new file with mode: 0644]
libxml2/test/relaxng/demo2.rng [new file with mode: 0644]
libxml2/test/relaxng/demo3.rng [new file with mode: 0644]
libxml2/test/relaxng/docbook.rng [new file with mode: 0644]
libxml2/test/relaxng/docbook_0.xml [new file with mode: 0644]
libxml2/test/relaxng/empty0.rng [new file with mode: 0644]
libxml2/test/relaxng/empty0_0.xml [new file with mode: 0644]
libxml2/test/relaxng/empty1.rng [new file with mode: 0644]
libxml2/test/relaxng/empty1_0.xml [new file with mode: 0644]
libxml2/test/relaxng/empty1_1.xml [new file with mode: 0644]
libxml2/test/relaxng/proofsystem.rng [new file with mode: 0644]
libxml2/test/relaxng/res [new file with mode: 0644]
libxml2/test/relaxng/spec.rng [new file with mode: 0644]
libxml2/test/relaxng/spec_0.xml [new file with mode: 0644]
libxml2/test/relaxng/testsuite.xml [new file with mode: 0644]
libxml2/test/schemas/all_2.xsd [new file with mode: 0644]
libxml2/test/schemas/all_6.xml [new file with mode: 0644]
libxml2/test/schemas/all_7.xml [new file with mode: 0644]
libxml2/test/schemas/attr0_0.xml [new file with mode: 0644]
libxml2/test/schemas/attr0_0.xsd [new file with mode: 0644]
libxml2/test/schemas/deter0_0.xml [new file with mode: 0644]
libxml2/test/schemas/deter0_0.xsd [new file with mode: 0644]
libxml2/test/schemas/group0_0.xml [new file with mode: 0644]
libxml2/test/schemas/group0_0.xsd [new file with mode: 0644]
libxml2/test/schemas/hexbinary_0.xml [new file with mode: 0644]
libxml2/test/schemas/hexbinary_0.xsd [new file with mode: 0644]
libxml2/test/schemas/hexbinary_1.xml [new file with mode: 0644]
libxml2/test/slashdot16.xml [new file with mode: 0644]
libxml2/test/utf16bom.xml [new file with mode: 0644]
libxml2/test/valid/.memdump [new file with mode: 0644]
libxml2/test/valid/dtds/destfoo.ent [new file with mode: 0644]
libxml2/test/valid/id1.xml [new file with mode: 0644]
libxml2/test/valid/id2.xml [new file with mode: 0644]
libxml2/test/valid/id3.xml [new file with mode: 0644]
libxml2/test/valid/mixed_ns.xml [new file with mode: 0644]
libxml2/test/valid/ns.xml [new file with mode: 0644]
libxml2/test/valid/ns2.xml [new file with mode: 0644]
libxml2/win32/.cvsignore [new file with mode: 0644]
libxml2/win32/defgen.xsl [new file with mode: 0644]

diff --git a/libxml2/depcomp b/libxml2/depcomp
new file mode 100755 (executable)
index 0000000..807b991
--- /dev/null
@@ -0,0 +1,423 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  This file always lives in the current directory.
+  # Also, the AIX compiler puts `$object:' at the start of each line;
+  # $object doesn't have directory information.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[  ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.  We will use -o /dev/null later,
+  # however we can't do the remplacement now because
+  # `-o $object' might simply not be used
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[      ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    -*)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
diff --git a/libxml2/doc/benchmark.gif b/libxml2/doc/benchmark.gif
new file mode 100644 (file)
index 0000000..dc5eb5c
Binary files /dev/null and b/libxml2/doc/benchmark.gif differ
diff --git a/libxml2/doc/html/home.png b/libxml2/doc/html/home.png
new file mode 100644 (file)
index 0000000..1700361
Binary files /dev/null and b/libxml2/doc/html/home.png differ
diff --git a/libxml2/doc/html/index.html b/libxml2/doc/html/index.html
new file mode 100644 (file)
index 0000000..3aaed2f
--- /dev/null
@@ -0,0 +1,45 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Gnome XML Library Reference Manual</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><meta name="description" content="This manual documents the interfaces of the libxml
+      library and has some short notes to help get you up to speed
+      with using the library."><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
+        .synopsis, .classsynopsis {
+            background: #eeeeee;
+            border: solid 1px #aaaaaa;
+            padding: 0.5em;
+        }
+        .programlisting {
+            background: #eeeeff;
+            border: solid 1px #aaaaff;
+            padding: 0.5em;
+        }
+        .variablelist {
+            padding: 4px;
+            margin-left: 3em;
+        }
+        .navigation {
+            background: #ffeeee;
+            border: solid 1px #ffaaaa;
+            margin-top: 0.5em;
+            margin-bottom: 0.5em;
+        }
+        .navigation a {
+            color: #770000;
+        }
+        .navigation a:visited {
+            color: #550000;
+        }
+        .navigation .title {
+            font-size: 200%;
+        }
+      </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="next" href="libxml-notes.html" title="Libxml Programming Notes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Gnome XML Library Reference Manual</p></th></tr></table></div><div><div class="authorgroup"><div class="author"><h3 class="author">Daniel Veillard</h3><div class="affiliation"><div class="address"><p><br>
+           <tt>&lt;<a href="mailto:daniel@veillard.com">daniel@veillard.com</a>&gt;</tt><br>
+         </p></div></div></div></div></div><div><p class="copyright">Copyright © 1999 Daniel Veillard</p></div><div><div class="legalnotice"><p>Permission is granted to make and distribute verbatim
+      copies of this manual provided the copyright notice and this
+      permission notice are preserved on all copies.</p><p>Permission is granted to copy and distribute modified
+      versions of this manual under the conditions for verbatim
+      copying, provided also that the entire resulting derived work is
+      distributed under the terms of a permission notice identical to
+      this one.</p><p>Permission is granted to copy and distribute translations
+      of this manual into another language, under the above conditions
+      for modified versions.</p></div></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>This manual documents the interfaces of the libxml
+      library and has some short notes to help get you up to speed
+      with using the library.</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="libxml-notes.html">Libxml Programming Notes</a></dt><dt><a href="libxml-lib.html">Libxml Library Reference</a></dt></dl></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"></td><td align="right"><a accesskey="n" href="libxml-notes.html"><b>Libxml Programming Notes &gt;&gt;</b></a></td></tr></table></body></html>
diff --git a/libxml2/doc/html/left.png b/libxml2/doc/html/left.png
new file mode 100644 (file)
index 0000000..2d05b3d
Binary files /dev/null and b/libxml2/doc/html/left.png differ
diff --git a/libxml2/doc/html/libxml-relaxng.html b/libxml2/doc/html/libxml-relaxng.html
new file mode 100644 (file)
index 0000000..a8b744b
--- /dev/null
@@ -0,0 +1,331 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>relaxng</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
+        .synopsis, .classsynopsis {
+            background: #eeeeee;
+            border: solid 1px #aaaaaa;
+            padding: 0.5em;
+        }
+        .programlisting {
+            background: #eeeeff;
+            border: solid 1px #aaaaff;
+            padding: 0.5em;
+        }
+        .variablelist {
+            padding: 4px;
+            margin-left: 3em;
+        }
+        .navigation {
+            background: #ffeeee;
+            border: solid 1px #ffaaaa;
+            margin-top: 0.5em;
+            margin-bottom: 0.5em;
+        }
+        .navigation a {
+            color: #770000;
+        }
+        .navigation a:visited {
+            color: #550000;
+        }
+        .navigation .title {
+            font-size: 200%;
+        }
+      </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-valid.html" title="valid"><link rel="next" href="libxml-uri.html" title="uri"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-valid.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-uri.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-relaxng"></a><div class="titlepage"></div><div class="refnamediv"><h2>relaxng</h2><p>relaxng &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
+
+
+
+struct      <a href="libxml-relaxng.html#xmlRelaxNG">xmlRelaxNG</a>;
+typedef     <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a>;
+void        (<a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">*xmlRelaxNGValidityErrorFunc</a>)  (void *ctx,
+                                             const char *msg,
+                                             ...);
+void        (<a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">*xmlRelaxNGValidityWarningFunc</a>)
+                                            (void *ctx,
+                                             const char *msg,
+                                             ...);
+struct      <a href="libxml-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a>;
+typedef     <a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a>;
+struct      <a href="libxml-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a>;
+typedef     <a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a>;
+enum        <a href="libxml-relaxng.html#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a>;
+<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a>
+                                            (const char *URL);
+<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a>
+                                            (const char *buffer,
+                                             int size);
+<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a>
+                                            (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void        <a href="libxml-relaxng.html#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a>        (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);
+void        <a href="libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a>       (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn,
+                                             void *ctx);
+int         <a href="libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a>       (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> *err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> *warn,
+                                             void **ctx);
+<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> <a href="libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a>               (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);
+void        <a href="libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a>                  (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+void        <a href="libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a>                  (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *output,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+void        <a href="libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a>              (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *output,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+void        <a href="libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a>        (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn,
+                                             void *ctx);
+int         <a href="libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a>        (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> *err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> *warn,
+                                             void **ctx);
+<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> <a href="libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a>
+                                            (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+void        <a href="libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a>         (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt);
+int         <a href="libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a>           (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void        <a href="libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a>          (void);
+int         <a href="libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a>   (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
+                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+int         <a href="libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a>     (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *data,
+                                             int len);
+int         <a href="libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a>    (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
+                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+int         <a href="libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a>   (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
+                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
+
+</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlRelaxNG"></a>struct xmlRelaxNG</h3><pre class="programlisting">struct xmlRelaxNG;</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGPtr"></a>xmlRelaxNGPtr</h3><pre class="programlisting">typedef xmlRelaxNG *xmlRelaxNGPtr;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidityErrorFunc"></a>xmlRelaxNGValidityErrorFunc ()</h3><pre class="programlisting">void        (*xmlRelaxNGValidityErrorFunc)  (void *ctx,
+                                             const char *msg,
+                                             ...);</pre><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td>
+</td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td>
+</td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td>
+
+
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidityWarningFunc"></a>xmlRelaxNGValidityWarningFunc ()</h3><pre class="programlisting">void        (*xmlRelaxNGValidityWarningFunc)
+                                            (void *ctx,
+                                             const char *msg,
+                                             ...);</pre><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td>
+</td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td>
+</td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td>
+
+
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserCtxt"></a>struct xmlRelaxNGParserCtxt</h3><pre class="programlisting">struct xmlRelaxNGParserCtxt;</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserCtxtPtr"></a>xmlRelaxNGParserCtxtPtr</h3><pre class="programlisting">typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidCtxt"></a>struct xmlRelaxNGValidCtxt</h3><pre class="programlisting">struct xmlRelaxNGValidCtxt;</pre><p>
+A RelaxNGs validation context</p><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidCtxtPtr"></a>xmlRelaxNGValidCtxtPtr</h3><pre class="programlisting">typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidErr"></a>enum xmlRelaxNGValidErr</h3><pre class="programlisting">typedef enum {
+    XML_RELAXNG_OK = 0,
+    XML_RELAXNG_ERR_MEMORY,
+    XML_RELAXNG_ERR_TYPE,
+    XML_RELAXNG_ERR_TYPEVAL,
+    XML_RELAXNG_ERR_DUPID,
+    XML_RELAXNG_ERR_TYPECMP,
+    XML_RELAXNG_ERR_NOSTATE,
+    XML_RELAXNG_ERR_NODEFINE,
+    XML_RELAXNG_ERR_LISTEXTRA,
+    XML_RELAXNG_ERR_LISTEMPTY,
+    XML_RELAXNG_ERR_INTERNODATA,
+    XML_RELAXNG_ERR_INTERSEQ,
+    XML_RELAXNG_ERR_INTEREXTRA,
+    XML_RELAXNG_ERR_ELEMNAME,
+    XML_RELAXNG_ERR_ATTRNAME,
+    XML_RELAXNG_ERR_ELEMNONS,
+    XML_RELAXNG_ERR_ATTRNONS,
+    XML_RELAXNG_ERR_ELEMWRONGNS,
+    XML_RELAXNG_ERR_ATTRWRONGNS,
+    XML_RELAXNG_ERR_ELEMEXTRANS,
+    XML_RELAXNG_ERR_ATTREXTRANS,
+    XML_RELAXNG_ERR_ELEMNOTEMPTY,
+    XML_RELAXNG_ERR_NOELEM,
+    XML_RELAXNG_ERR_NOTELEM,
+    XML_RELAXNG_ERR_ATTRVALID,
+    XML_RELAXNG_ERR_CONTENTVALID,
+    XML_RELAXNG_ERR_EXTRACONTENT,
+    XML_RELAXNG_ERR_INVALIDATTR,
+    XML_RELAXNG_ERR_DATAELEM,
+    XML_RELAXNG_ERR_VALELEM,
+    XML_RELAXNG_ERR_LISTELEM,
+    XML_RELAXNG_ERR_DATATYPE,
+    XML_RELAXNG_ERR_VALUE,
+    XML_RELAXNG_ERR_LIST,
+    XML_RELAXNG_ERR_NOGRAMMAR,
+    XML_RELAXNG_ERR_EXTRADATA,
+    XML_RELAXNG_ERR_LACKDATA,
+    XML_RELAXNG_ERR_INTERNAL,
+    XML_RELAXNG_ERR_ELEMWRONG,
+    XML_RELAXNG_ERR_TEXTWRONG
+} xmlRelaxNGValidErr;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewParserCtxt"></a>xmlRelaxNGNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewParserCtxt
+                                            (const char *URL);</pre><p>
+Create an XML RelaxNGs parse context for that file/resource expected
+to contain an XML RelaxNGs file.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i> :</span></td><td>  the location of the schema
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the parser context or NULL in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewMemParserCtxt"></a>xmlRelaxNGNewMemParserCtxt ()</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewMemParserCtxt
+                                            (const char *buffer,
+                                             int size);</pre><p>
+Create an XML RelaxNGs parse context for that memory buffer expected
+to contain an XML RelaxNGs file.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>buffer</tt></i> :</span></td><td>  a pointer to a char array containing the schemas
+</td></tr><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>  the size of the array
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the parser context or NULL in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewDocParserCtxt"></a>xmlRelaxNGNewDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewDocParserCtxt
+                                            (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p>
+Create an XML RelaxNGs parser context for that document.
+Note: since the process of compiling a RelaxNG schemas modifies the
+      document, the <i><tt>doc</tt></i> parameter is duplicated internally.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>  a preparsed document tree
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the parser context or NULL in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFreeParserCtxt"></a>xmlRelaxNGFreeParserCtxt ()</h3><pre class="programlisting">void        xmlRelaxNGFreeParserCtxt        (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);</pre><p>
+Free the resources associated to the schema parser context</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  the schema parser context
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetParserErrors"></a>xmlRelaxNGSetParserErrors ()</h3><pre class="programlisting">void        xmlRelaxNGSetParserErrors       (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn,
+                                             void *ctx);</pre><p>
+Set the callback functions used to handle errors for a validation context</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  a Relax-NG validation context
+</td></tr><tr><td><span class="term"><i><tt>err</tt></i> :</span></td><td>  the error callback
+</td></tr><tr><td><span class="term"><i><tt>warn</tt></i> :</span></td><td>  the warning callback
+</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td>  contextual data for the callbacks
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGGetParserErrors"></a>xmlRelaxNGGetParserErrors ()</h3><pre class="programlisting">int         xmlRelaxNGGetParserErrors       (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> *err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> *warn,
+                                             void **ctx);</pre><p>
+Get the callback information used to handle errors for a validation context</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  a Relax-NG validation context
+</td></tr><tr><td><span class="term"><i><tt>err</tt></i> :</span></td><td>  the error callback result
+</td></tr><tr><td><span class="term"><i><tt>warn</tt></i> :</span></td><td>  the warning callback result
+</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td>  contextual data for the callbacks result
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case of failure, 0 otherwise.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParse"></a>xmlRelaxNGParse ()</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> xmlRelaxNGParse               (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);</pre><p>
+parse a schema definition resource and build an internal
+XML Shema struture which can be used to validate instances.
+*WARNING* this interface is highly subject to change</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  a Relax-NG parser context
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the internal XML RelaxNG structure built from the resource or
+        NULL in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFree"></a>xmlRelaxNGFree ()</h3><pre class="programlisting">void        xmlRelaxNGFree                  (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);</pre><p>
+Deallocate a RelaxNG structure.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td>  a schema structure
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGDump"></a>xmlRelaxNGDump ()</h3><pre class="programlisting">void        xmlRelaxNGDump                  (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *output,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);</pre><p>
+Dump a RelaxNG structure back</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>output</tt></i> :</span></td><td>  the file output
+</td></tr><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td>  a schema structure
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGDumpTree"></a>xmlRelaxNGDumpTree ()</h3><pre class="programlisting">void        xmlRelaxNGDumpTree              (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *output,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);</pre><p>
+Dump the transformed RelaxNG tree.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>output</tt></i> :</span></td><td>  the file output
+</td></tr><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td>  a schema structure
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetValidErrors"></a>xmlRelaxNGSetValidErrors ()</h3><pre class="programlisting">void        xmlRelaxNGSetValidErrors        (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn,
+                                             void *ctx);</pre><p>
+Set the error and warning callback informations</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  a Relax-NG validation context
+</td></tr><tr><td><span class="term"><i><tt>err</tt></i> :</span></td><td>  the error function
+</td></tr><tr><td><span class="term"><i><tt>warn</tt></i> :</span></td><td> the warning function
+</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> the functions context
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGGetValidErrors"></a>xmlRelaxNGGetValidErrors ()</h3><pre class="programlisting">int         xmlRelaxNGGetValidErrors        (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> *err,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> *warn,
+                                             void **ctx);</pre><p>
+Get the error and warning callback informations</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  a Relax-NG validation context
+</td></tr><tr><td><span class="term"><i><tt>err</tt></i> :</span></td><td>  the error function result
+</td></tr><tr><td><span class="term"><i><tt>warn</tt></i> :</span></td><td> the warning function result
+</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> the functions context result
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case of error and 0 otherwise
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewValidCtxt"></a>xmlRelaxNGNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> xmlRelaxNGNewValidCtxt
+                                            (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);</pre><p>
+Create an XML RelaxNGs validation context based on the given schema</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td>  a precompiled XML RelaxNGs
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the validation context or NULL in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFreeValidCtxt"></a>xmlRelaxNGFreeValidCtxt ()</h3><pre class="programlisting">void        xmlRelaxNGFreeValidCtxt         (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt);</pre><p>
+Free the resources associated to the schema validation context</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  the schema validation context
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidateDoc"></a>xmlRelaxNGValidateDoc ()</h3><pre class="programlisting">int         xmlRelaxNGValidateDoc           (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p>
+Validate a document tree in memory.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  a Relax-NG validation context
+</td></tr><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>  a parsed document tree
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the document is valid, a positive error code
+    number otherwise and -1 in case of internal or API error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGCleanupTypes"></a>xmlRelaxNGCleanupTypes ()</h3><pre class="programlisting">void        xmlRelaxNGCleanupTypes          (void);</pre><p>
+Cleanup the default Schemas type library associated to RelaxNG</p><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushElement"></a>xmlRelaxNGValidatePushElement ()</h3><pre class="programlisting">int         xmlRelaxNGValidatePushElement   (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
+                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);</pre><p>
+Push a new element start on the RelaxNG validation stack.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  the validation context
+</td></tr><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>  a document instance
+</td></tr><tr><td><span class="term"><i><tt>elem</tt></i> :</span></td><td>  an element instance
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if no validation problem was found or 0 if validating the
+        element requires a full node, and -1 in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushCData"></a>xmlRelaxNGValidatePushCData ()</h3><pre class="programlisting">int         xmlRelaxNGValidatePushCData     (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *data,
+                                             int len);</pre><p>
+check the CData parsed for validation in the current stack</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  the RelaxNG validation context
+</td></tr><tr><td><span class="term"><i><tt>data</tt></i> :</span></td><td>  some character data read
+</td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td>  the lenght of the data
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if no validation problem was found or -1 otherwise
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePopElement"></a>xmlRelaxNGValidatePopElement ()</h3><pre class="programlisting">int         xmlRelaxNGValidatePopElement    (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
+                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);</pre><p>
+Pop the element end from the RelaxNG validation stack.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  the RelaxNG validation context
+</td></tr><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>  a document instance
+</td></tr><tr><td><span class="term"><i><tt>elem</tt></i> :</span></td><td>  an element instance
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if no validation problem was found or 0 otherwise
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidateFullElement"></a>xmlRelaxNGValidateFullElement ()</h3><pre class="programlisting">int         xmlRelaxNGValidateFullElement   (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt,
+                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
+                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);</pre><p>
+Validate a full subtree when <a href="libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a>() returned
+0 and the content of the node has been expanded.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td>  the validation context
+</td></tr><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>  a document instance
+</td></tr><tr><td><span class="term"><i><tt>elem</tt></i> :</span></td><td>  an element instance
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if no validation problem was found or -1 in case of error.
+</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-valid.html"><b>&lt;&lt; valid</b></a></td><td align="right"><a accesskey="n" href="libxml-uri.html"><b>uri &gt;&gt;</b></a></td></tr></table></body></html>
diff --git a/libxml2/doc/html/libxml-xmlreader.html b/libxml2/doc/html/libxml-xmlreader.html
new file mode 100644 (file)
index 0000000..a177b34
--- /dev/null
@@ -0,0 +1,519 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlreader</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
+        .synopsis, .classsynopsis {
+            background: #eeeeee;
+            border: solid 1px #aaaaaa;
+            padding: 0.5em;
+        }
+        .programlisting {
+            background: #eeeeff;
+            border: solid 1px #aaaaff;
+            padding: 0.5em;
+        }
+        .variablelist {
+            padding: 4px;
+            margin-left: 3em;
+        }
+        .navigation {
+            background: #ffeeee;
+            border: solid 1px #ffaaaa;
+            margin-top: 0.5em;
+            margin-bottom: 0.5em;
+        }
+        .navigation a {
+            color: #770000;
+        }
+        .navigation a:visited {
+            color: #550000;
+        }
+        .navigation .title {
+            font-size: 200%;
+        }
+      </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-parser.html" title="parser"><link rel="next" href="libxml-SAX.html" title="SAX"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-parser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-SAX.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-xmlreader"></a><div class="titlepage"></div><div class="refnamediv"><h2>xmlreader</h2><p>xmlreader &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
+
+
+
+enum        <a href="libxml-xmlreader.html#xmlParserProperties">xmlParserProperties</a>;
+enum        <a href="libxml-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a>;
+enum        <a href="libxml-xmlreader.html#xmlReaderTypes">xmlReaderTypes</a>;
+struct      <a href="libxml-xmlreader.html#xmlTextReader">xmlTextReader</a>;
+typedef     <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a>;
+<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a>           (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input,
+                                             const char *URI);
+<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a>   (const char *URI);
+void        <a href="libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a>               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a>               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a>       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a>       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a>         (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a>     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a>            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a>              (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderHasAttributes">xmlTextReaderHasAttributes</a>      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a>           (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a>          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a>     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderLocalName">xmlTextReaderLocalName</a>          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a>               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a>       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a>           (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderPrefix">xmlTextReaderPrefix</a>             (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a>          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a>              (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a>            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderReadState">xmlTextReaderReadState</a>          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a>              (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a>     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int no);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a>       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a>     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *localName,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *namespaceURI);
+<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a>
+                                            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a>    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix);
+int         <a href="libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a>  (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int no);
+int         <a href="libxml-xmlreader.html#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a>    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);
+int         <a href="libxml-xmlreader.html#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a>  (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *localName,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *namespaceURI);
+int         <a href="libxml-xmlreader.html#xmlTextReaderMoveToFirstAttribute">xmlTextReaderMoveToFirstAttribute</a>
+                                            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderMoveToNextAttribute">xmlTextReaderMoveToNextAttribute</a>
+                                            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a>      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a>      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a>      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int prop,
+                                             int value);
+int         <a href="libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a>      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int prop);
+<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>  <a href="libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a>        (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a>         (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>  <a href="libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a>             (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a>               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a>            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int         <a href="libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a>    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const char *rng);
+int         <a href="libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a>   (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+typedef     <a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a>;
+void        (<a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">*xmlTextReaderErrorFunc</a>)       (void *arg,
+                                             const char *msg,
+                                             <a href="libxml-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a> severity,
+                                             <a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);
+int         <a href="libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a>  (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);
+<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a>     (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);
+void        <a href="libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a>    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f,
+                                             void *arg);
+void        <a href="libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a>    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> *f,
+                                             void **arg);
+</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
+
+</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlParserProperties"></a>enum xmlParserProperties</h3><pre class="programlisting">typedef enum {
+    XML_PARSER_LOADDTD = 1,
+    XML_PARSER_DEFAULTATTRS = 2,
+    XML_PARSER_VALIDATE = 3,
+    XML_PARSER_SUBST_ENTITIES = 4
+} xmlParserProperties;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserSeverities"></a>enum xmlParserSeverities</h3><pre class="programlisting">typedef enum {
+    XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
+    XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
+    XML_PARSER_SEVERITY_WARNING = 3,
+    XML_PARSER_SEVERITY_ERROR = 4
+} xmlParserSeverities;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlReaderTypes"></a>enum xmlReaderTypes</h3><pre class="programlisting">typedef enum {
+    XML_READER_TYPE_NONE = 0,
+    XML_READER_TYPE_ELEMENT = 1,
+    XML_READER_TYPE_ATTRIBUTE = 2,
+    XML_READER_TYPE_TEXT = 3,
+    XML_READER_TYPE_CDATA = 4,
+    XML_READER_TYPE_ENTITY_REFERENCE = 5,
+    XML_READER_TYPE_ENTITY = 6,
+    XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
+    XML_READER_TYPE_COMMENT = 8,
+    XML_READER_TYPE_DOCUMENT = 9,
+    XML_READER_TYPE_DOCUMENT_TYPE = 10,
+    XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
+    XML_READER_TYPE_NOTATION = 12,
+    XML_READER_TYPE_WHITESPACE = 13,
+    XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
+    XML_READER_TYPE_END_ELEMENT = 15,
+    XML_READER_TYPE_END_ENTITY = 16,
+    XML_READER_TYPE_XML_DECLARATION = 17
+} xmlReaderTypes;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReader"></a>struct xmlTextReader</h3><pre class="programlisting">struct xmlTextReader;</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderPtr"></a>xmlTextReaderPtr</h3><pre class="programlisting">typedef xmlTextReader *xmlTextReaderPtr;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNewTextReader"></a>xmlNewTextReader ()</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlNewTextReader           (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input,
+                                             const char *URI);</pre><p>
+Create an xmlTextReader structure fed with <i><tt>input</tt></i></p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> the xmlParserInputBufferPtr used to read data
+</td></tr><tr><td><span class="term"><i><tt>URI</tt></i> :</span></td><td> the URI information for the source if available
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new xmlTextReaderPtr or NULL in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNewTextReaderFilename"></a>xmlNewTextReaderFilename ()</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlNewTextReaderFilename   (const char *URI);</pre><p>
+Create an xmlTextReader structure fed with the resource at <i><tt>URI</tt></i></p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URI</tt></i> :</span></td><td> the URI of the resource to process
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new xmlTextReaderPtr or NULL in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeTextReader"></a>xmlFreeTextReader ()</h3><pre class="programlisting">void        xmlFreeTextReader               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Deallocate all the resources associated to the reader</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderRead"></a>xmlTextReaderRead ()</h3><pre class="programlisting">int         xmlTextReaderRead               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Moves the position of the current instance to the next node in
+ the stream, exposing its properties.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if the node was read successfully, 0 if there is no more
+         nodes to read, or -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadInnerXml"></a>xmlTextReaderReadInnerXml ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderReadInnerXml       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Reads the contents of the current node, including child nodes and markup.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a string containing the XML content, or NULL if the current node
+        is neither an element nor attribute, or has no child nodes. The 
+        string must be deallocated by the caller.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadOuterXml"></a>xmlTextReaderReadOuterXml ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderReadOuterXml       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Reads the contents of the current node, including child nodes and markup.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a string containing the XML content, or NULL if the current node
+        is neither an element nor attribute, or has no child nodes. The 
+        string must be deallocated by the caller.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadString"></a>xmlTextReaderReadString ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderReadString         (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Reads the contents of an element or a text node as a string.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a string containing the contents of the Element or Text node,
+        or NULL if the reader is positioned on any other type of node.
+        The string must be deallocated by the caller.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadAttributeValue"></a>xmlTextReaderReadAttributeValue ()</h3><pre class="programlisting">int         xmlTextReaderReadAttributeValue (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Parses an attribute value into one or more Text and EntityReference nodes.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, 0 if the reader was not positionned on an
+        ttribute node or all the attribute values have been read, or -1
+        in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderAttributeCount"></a>xmlTextReaderAttributeCount ()</h3><pre class="programlisting">int         xmlTextReaderAttributeCount     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Provides the number of attributes of the current node</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 i no attributes, -1 in case of error or the attribute count
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderBaseUri"></a>xmlTextReaderBaseUri ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderBaseUri            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The base URI of the node.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the base URI or NULL if not available
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderDepth"></a>xmlTextReaderDepth ()</h3><pre class="programlisting">int         xmlTextReaderDepth              (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The depth of the node in the tree.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the depth or -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderHasAttributes"></a>xmlTextReaderHasAttributes ()</h3><pre class="programlisting">int         xmlTextReaderHasAttributes      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Whether the node has attributes.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if true, 0 if false, and -1 in case or error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderHasValue"></a>xmlTextReaderHasValue ()</h3><pre class="programlisting">int         xmlTextReaderHasValue           (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Whether the node can have a text value.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if true, 0 if false, and -1 in case or error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderIsDefault"></a>xmlTextReaderIsDefault ()</h3><pre class="programlisting">int         xmlTextReaderIsDefault          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Whether an Attribute  node was generated from the default value
+defined in the DTD or schema.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if not defaulted, 1 if defaulted, and -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderIsEmptyElement"></a>xmlTextReaderIsEmptyElement ()</h3><pre class="programlisting">int         xmlTextReaderIsEmptyElement     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Check if the current node is empty</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if empty, 0 if not and -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocalName"></a>xmlTextReaderLocalName ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderLocalName          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The local name of the node.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the local name or NULL if not available
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderName"></a>xmlTextReaderName ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderName               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The qualified name of the node, equal to Prefix :LocalName.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the local name or NULL if not available
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderNamespaceUri"></a>xmlTextReaderNamespaceUri ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderNamespaceUri       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The URI defining the namespace associated with the node.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the namespace URI or NULL if not available
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderNodeType"></a>xmlTextReaderNodeType ()</h3><pre class="programlisting">int         xmlTextReaderNodeType           (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Get the node type of the current node
+Reference:
+http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlNodeType of the current node or -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderPrefix"></a>xmlTextReaderPrefix ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderPrefix             (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+A shorthand reference to the namespace associated with the node.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the prefix or NULL if not available
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderQuoteChar"></a>xmlTextReaderQuoteChar ()</h3><pre class="programlisting">int         xmlTextReaderQuoteChar          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The quotation mark character used to enclose the value of an attribute.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>" or ' and -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderValue"></a>xmlTextReaderValue ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderValue              (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Provides the text value of the node if present</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the string or NULL if not available. The retsult must be deallocated
+    with <a href="libxml-globals.html#xmlFree">xmlFree</a>()
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderXmlLang"></a>xmlTextReaderXmlLang ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderXmlLang            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The xml:lang scope within which the node resides.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xml:lang value or NULL if none exists.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadState"></a>xmlTextReaderReadState ()</h3><pre class="programlisting">int         xmlTextReaderReadState          (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Gets the read state of the reader.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the state value, or -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderClose"></a>xmlTextReaderClose ()</h3><pre class="programlisting">int         xmlTextReaderClose              (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+This method releases any resources allocated by the current instance
+changes the state to Closed and close any underlying input.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 or -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetAttributeNo"></a>xmlTextReaderGetAttributeNo ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderGetAttributeNo     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int no);</pre><p>
+Provides the value of the attribute with the specified index relative
+to the containing element.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>no</tt></i> :</span></td><td> the zero-based index of the attribute relative to the containing element
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a string containing the value of the specified attribute, or NULL
+   in case of error. The string must be deallocated by the caller.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetAttribute"></a>xmlTextReaderGetAttribute ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderGetAttribute       (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p>
+Provides the value of the attribute with the specified qualified name.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the qualified name of the attribute.
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a string containing the value of the specified attribute, or NULL
+   in case of error. The string must be deallocated by the caller.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetAttributeNs"></a>xmlTextReaderGetAttributeNs ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderGetAttributeNs     (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *localName,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *namespaceURI);</pre><p>
+Provides the value of the specified attribute</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>localName</tt></i> :</span></td><td> the local name of the attribute.
+</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i> :</span></td><td> the namespace URI of the attribute.
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a string containing the value of the specified attribute, or NULL
+   in case of error. The string must be deallocated by the caller.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetRemainder"></a>xmlTextReaderGetRemainder ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlTextReaderGetRemainder
+                                            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Method to get the remainder of the buffered XML. this method stops the
+parser, set its state to End Of File and return the input stream with
+what is left that the parser did not use.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlParserInputBufferPtr attached to the XML or NULL
+   in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderLookupNamespace"></a>xmlTextReaderLookupNamespace ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderLookupNamespace    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix);</pre><p>
+Resolves a namespace prefix in the scope of the current element.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i> :</span></td><td> the prefix whose namespace URI is to be resolved. To return
+         the default namespace, specify NULL
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a string containing the namespace URI to which the prefix maps
+   or NULL in case of error. The string must be deallocated by the caller.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToAttributeNo"></a>xmlTextReaderMoveToAttributeNo ()</h3><pre class="programlisting">int         xmlTextReaderMoveToAttributeNo  (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int no);</pre><p>
+Moves the position of the current instance to the attribute with
+the specified index relative to the containing element.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>no</tt></i> :</span></td><td> the zero-based index of the attribute relative to the containing
+     element.
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, -1 in case of error, 0 if not found
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToAttribute"></a>xmlTextReaderMoveToAttribute ()</h3><pre class="programlisting">int         xmlTextReaderMoveToAttribute    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p>
+Moves the position of the current instance to the attribute with
+the specified qualified name.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the qualified name of the attribute.
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, -1 in case of error, 0 if not found
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToAttributeNs"></a>xmlTextReaderMoveToAttributeNs ()</h3><pre class="programlisting">int         xmlTextReaderMoveToAttributeNs  (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *localName,
+                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *namespaceURI);</pre><p>
+Moves the position of the current instance to the attribute with the
+specified local name and namespace URI.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>localName</tt></i> :</span></td><td>  the local name of the attribute.
+</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i> :</span></td><td>  the namespace URI of the attribute.
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, -1 in case of error, 0 if not found
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToFirstAttribute"></a>xmlTextReaderMoveToFirstAttribute ()</h3><pre class="programlisting">int         xmlTextReaderMoveToFirstAttribute
+                                            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Moves the position of the current instance to the first attribute
+associated with the current node.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, -1 in case of error, 0 if not found
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToNextAttribute"></a>xmlTextReaderMoveToNextAttribute ()</h3><pre class="programlisting">int         xmlTextReaderMoveToNextAttribute
+                                            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Moves the position of the current instance to the next attribute
+associated with the current node.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, -1 in case of error, 0 if not found
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToElement"></a>xmlTextReaderMoveToElement ()</h3><pre class="programlisting">int         xmlTextReaderMoveToElement      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Moves the position of the current instance to the node that
+contains the current Attribute  node.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, -1 in case of error, 0 if not moved
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderNormalization"></a>xmlTextReaderNormalization ()</h3><pre class="programlisting">int         xmlTextReaderNormalization      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+The value indicating whether to normalize white space and attribute values.
+Since attribute value and end of line normalizations are a MUST in the XML
+specification only the value true is accepted. The broken bahaviour of
+accepting out of range character entities like &amp;<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="0-CAPS">0</GTKDOCLINK>; is of course not
+supported either.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 or -1 in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetParserProp"></a>xmlTextReaderSetParserProp ()</h3><pre class="programlisting">int         xmlTextReaderSetParserProp      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int prop,
+                                             int value);</pre><p>
+Change the parser processing behaviour by changing some of its internal
+properties. Note that some properties can only be changed before any
+read has been done.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>prop</tt></i> :</span></td><td>  the xmlParserProperties to set
+</td></tr><tr><td><span class="term"><i><tt>value</tt></i> :</span></td><td>  usually 0 or 1 to (de)activate it
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the call was successful, or -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetParserProp"></a>xmlTextReaderGetParserProp ()</h3><pre class="programlisting">int         xmlTextReaderGetParserProp      (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             int prop);</pre><p>
+Read the parser internal property.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>prop</tt></i> :</span></td><td>  the xmlParserProperties to get
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the value, usually 0 or 1, or -1 in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderCurrentNode"></a>xmlTextReaderCurrentNode ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>  xmlTextReaderCurrentNode        (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Hacking interface allowing to get the xmlNodePtr correponding to the
+current node being accessed by the xmlTextReader. This is dangerous
+because the underlying node may be destroyed on the next Reads.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlNodePtr or NULL in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderCurrentDoc"></a>xmlTextReaderCurrentDoc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlTextReaderCurrentDoc         (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Hacking interface allowing to get the xmlDocPtr correponding to the
+current document being accessed by the xmlTextReader. This is dangerous
+because the associated node may be destroyed on the next Reads.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlDocPtr or NULL in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderExpand"></a>xmlTextReaderExpand ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>  xmlTextReaderExpand             (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Reads the contents of the current node and the full subtree. It then makes
+the subtree available until the next <a href="libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a>() call</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a node pointer valid until the next <a href="libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a>() call
+        or NULL in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderNext"></a>xmlTextReaderNext ()</h3><pre class="programlisting">int         xmlTextReaderNext               (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Skip to the node following the current one in document order while
+avoiding the subtree if any.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if the node was read successfully, 0 if there is no more
+         nodes to read, or -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderIsValid"></a>xmlTextReaderIsValid ()</h3><pre class="programlisting">int         xmlTextReaderIsValid            (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);</pre><p>
+Retrieve the validity status from the parser context</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the flag value 1 if valid, 0 if no, and -1 in case of error
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderRelaxNGValidate"></a>xmlTextReaderRelaxNGValidate ()</h3><pre class="programlisting">int         xmlTextReaderRelaxNGValidate    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             const char *rng);</pre><p>
+Use RelaxNG to validate the document as it is processed.
+Activation is only possible before the first <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="Read">Read</GTKDOCLINK>().
+if <i><tt>rng</tt></i> is NULL, then RelaxNG validation is desactivated.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>rng</tt></i> :</span></td><td>  the path to a RelaxNG schema or NULL
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 in case the RelaxNG validation could be (des)activated and
+        -1 in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderRelaxNGSetSchema"></a>xmlTextReaderRelaxNGSetSchema ()</h3><pre class="programlisting">int         xmlTextReaderRelaxNGSetSchema   (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);</pre><p>
+Use RelaxNG to validate the document as it is processed.
+Activation is only possible before the first <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="Read">Read</GTKDOCLINK>().
+if <i><tt>schema</tt></i> is NULL, then RelaxNG validation is desactivated.
+ @ The <i><tt>schema</tt></i> should not be freed until the reader is deallocated
+or its use has been deactivated.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td>  a precompiled RelaxNG schema
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 in case the RelaxNG validation could be (des)activated and
+        -1 in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocatorPtr"></a>xmlTextReaderLocatorPtr</h3><pre class="programlisting">typedef void *  xmlTextReaderLocatorPtr;
+</pre><p>
+
+</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderErrorFunc"></a>xmlTextReaderErrorFunc ()</h3><pre class="programlisting">void        (*xmlTextReaderErrorFunc)       (void *arg,
+                                             const char *msg,
+                                             <a href="libxml-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a> severity,
+                                             <a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);</pre><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>arg</tt></i> :</span></td><td>
+</td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td>
+</td></tr><tr><td><span class="term"><i><tt>severity</tt></i> :</span></td><td>
+</td></tr><tr><td><span class="term"><i><tt>locator</tt></i> :</span></td><td>
+
+
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocatorLineNumber"></a>xmlTextReaderLocatorLineNumber ()</h3><pre class="programlisting">int         xmlTextReaderLocatorLineNumber  (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);</pre><p>
+Obtain the line number for the given locator.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>locator</tt></i> :</span></td><td> the xmlTextReaderLocatorPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the line number or -1 in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocatorBaseURI"></a>xmlTextReaderLocatorBaseURI ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlTextReaderLocatorBaseURI     (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);</pre><p>
+Obtain the base URI for the given locator.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>locator</tt></i> :</span></td><td> the xmlTextReaderLocatorPtr used
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the base URI or NULL in case of error.
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetErrorHandler"></a>xmlTextReaderSetErrorHandler ()</h3><pre class="programlisting">void        xmlTextReaderSetErrorHandler    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f,
+                                             void *arg);</pre><p>
+Register a callback function that will be called on error and warnings.
+</p><p>
+If <i><tt>f</tt></i> is NULL, the default error and warning handlers are restored.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>f</tt></i> :</span></td><td>       the callback function to call on error and warnings
+</td></tr><tr><td><span class="term"><i><tt>arg</tt></i> :</span></td><td>    a user argument to pass to the callback function
+</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetErrorHandler"></a>xmlTextReaderGetErrorHandler ()</h3><pre class="programlisting">void        xmlTextReaderGetErrorHandler    (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader,
+                                             <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> *f,
+                                             void **arg);</pre><p>
+Retrieve the error callback function and user argument.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>reader</tt></i> :</span></td><td>  the xmlTextReaderPtr used
+</td></tr><tr><td><span class="term"><i><tt>f</tt></i> :</span></td><td>       the callback function or NULL is no callback has been registered
+</td></tr><tr><td><span class="term"><i><tt>arg</tt></i> :</span></td><td>    a user argument
+</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-parser.html"><b>&lt;&lt; parser</b></a></td><td align="right"><a accesskey="n" href="libxml-SAX.html"><b>SAX &gt;&gt;</b></a></td></tr></table></body></html>
diff --git a/libxml2/doc/html/right.png b/libxml2/doc/html/right.png
new file mode 100644 (file)
index 0000000..92832e3
Binary files /dev/null and b/libxml2/doc/html/right.png differ
diff --git a/libxml2/doc/html/up.png b/libxml2/doc/html/up.png
new file mode 100644 (file)
index 0000000..85b3e2a
Binary files /dev/null and b/libxml2/doc/html/up.png differ
diff --git a/libxml2/doc/libxml2.xsa b/libxml2/doc/libxml2.xsa
new file mode 100644 (file)
index 0000000..ca4befa
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsa PUBLIC "-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML" "http://www.garshol.priv.no/download/xsa/xsa.dtd">
+<xsa>
+  <vendor>
+    <name>Daniel Veillard</name>
+    <email>daniel@veillard.com</email>
+    <url>http://veillard.com/</url>
+  </vendor>
+  <product id="libxml2">
+    <name>libxml2</name>
+    <version>2.5.10</version>
+    <last-release> Aug 15 2003</last-release>
+    <info-url>http://xmlsoft.org/</info-url>
+    <changes>A bugfixes only release</changes>
+  </product>
+</xsa>
diff --git a/libxml2/doc/tutorial/aph.html b/libxml2/doc/tutorial/aph.html
new file mode 100644 (file)
index 0000000..d1c6292
--- /dev/null
@@ -0,0 +1,76 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>H. Code for Encoding Conversion Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apg.html" title="G. Code for Retrieving Attribute Value Example"><link rel="next" href="api.html" title="I. Acknowledgements"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">H. Code for Encoding Conversion Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apg.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="convertappendix"></a>H. Code for Encoding Conversion Example</h2></div></div><div></div></div><p>
+      </p><pre class="programlisting">
+#include &lt;string.h&gt;
+#include &lt;libxml/parser.h&gt;
+
+
+unsigned char*
+convert (unsigned char *in, char *encoding)
+{
+       unsigned char *out;
+        int ret,size,out_size,temp;
+        xmlCharEncodingHandlerPtr handler;
+
+        size = (int)strlen(in)+1; 
+        out_size = size*2-1; 
+        out = malloc((size_t)out_size); 
+
+        if (out) {
+                handler = xmlFindCharEncodingHandler(encoding);
+                
+                if (!handler) {
+                        free(out);
+                        out = NULL;
+                }
+        }
+        if (out) {
+                temp=size-1;
+                ret = handler-&gt;input(out, &amp;out_size, in, &amp;temp);
+                if (ret || temp-size+1) {
+                        if (ret) {
+                                printf("conversion wasn't successful.\n");
+                        } else {
+                                printf("conversion wasn't successful. converted: %i octets.\n",temp);
+                        }
+                        free(out);
+                        out = NULL;
+                } else {
+                        out = realloc(out,out_size+1); 
+                        out[out_size]=0; /*null terminating out*/
+                        
+                }
+        } else {
+                printf("no mem\n");
+        }
+        return (out);
+}      
+
+
+int
+main(int argc, char **argv) {
+
+       unsigned char *content, *out;
+       xmlDocPtr doc;
+       xmlNodePtr rootnode;
+       char *encoding = "ISO-8859-1";
+       
+               
+       if (argc &lt;= 1) {
+               printf("Usage: %s content\n", argv[0]);
+               return(0);
+       }
+
+       content = argv[1];
+
+       out = convert(content, encoding);
+
+       doc = xmlNewDoc ("1.0");
+       rootnode = xmlNewDocNode(doc, NULL, (const xmlChar*)"root", out);
+       xmlDocSetRootElement(doc, rootnode);
+
+       xmlSaveFormatFileEnc("-", doc, encoding, 1);
+       return (1);
+}
+
+</pre><p>
+    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apg.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">G. Code for Retrieving Attribute Value Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> I. Acknowledgements</td></tr></table></div></body></html>
diff --git a/libxml2/doc/tutorial/ix01.html b/libxml2/doc/tutorial/ix01.html
new file mode 100644 (file)
index 0000000..e0a56ec
--- /dev/null
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Index</title><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="api.html" title="I. Acknowledgements"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a name="id2883028"></a>Index</h2></div></div><div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>attribute</dt><dd><dl><dt>retrieving value, <a href="ar01s08.html">Retrieving Attributes</a></dt><dt>writing, <a href="ar01s07.html">Writing Attribute</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>C</h3><dl><dt>compiler flags, <a href="apa.html">Compilation</a></dt></dl></div><div class="indexdiv"><h3>E</h3><dl><dt>element</dt><dd><dl><dt>retrieving content, <a href="ar01s04.html">Retrieving Element Content</a></dt><dt>writing content, <a href="ar01s06.html">Writing element content</a></dt></dl></dd><dt>encoding, <a href="ar01s03.html">Parsing the file</a>, <a href="ar01s09.html">Encoding Conversion</a></dt></dl></div><div class="indexdiv"><h3>F</h3><dl><dt>file</dt><dd><dl><dt>parsing, <a href="ar01s03.html">Parsing the file</a>-<a href="ar01s03.html">Parsing the file</a></dt><dt>saving, <a href="ar01s06.html">Writing element content</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>X</h3><dl><dt>xmlChar, <a href="ar01s02.html">Data Types</a></dt><dt>xmlDoc, <a href="ar01s02.html">Data Types</a></dt><dt>xmlNodePtr, <a href="ar01s02.html">Data Types</a></dt></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">I. Acknowledgements </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/libxml2/doc/xmllint.html b/libxml2/doc/xmllint.html
new file mode 100644 (file)
index 0000000..4d26c6c
--- /dev/null
@@ -0,0 +1,143 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmllint</title><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2589902"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xmllint &#8212; command line <span class="acronym">XML</span> tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xmllint</tt>  [[--version] |  [--debug] |  [--shell] |  [--debugent] |  [--copy] |  [--recover] |  [--noent] |  [--noout] |  [--htmlout] |  [--nowrap] |  [--valid] |  [--postvalid] |  [--dtdvalid <i class="replaceable"><tt>URL</tt></i>] |  [--timing] |  [--repeat] |  [--insert] |  [--compress] |  [--sgml] |  [--html] |  [--push] |  [--memory] |  [--nowarning] |  [--noblanks] |  [--format] |  [--testIO] |  [--encode <i class="replaceable"><tt>encoding</tt></i>] |  [--catalogs] |  [--nocatalogs] |  [--auto] |  [--xinclude] |  [--loaddtd] |  [--dtdattr] |  [--dropdtd] |  [--stream] |  [--chkregister] |  [--relaxng] |  [--schema] |  [--nonet]] [<tt class="option"><i class="replaceable"><tt>xmlfile</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
+      The xmllint program parses one or more XML files, specified on the
+      command line as <i class="replaceable"><tt>xmlfile</tt></i>. It prints various
+      types of output, depending upon the options selected. It is useful for
+      detecting errors both in <span class="acronym">XML</span> code and in the
+      <span class="acronym">XML</span> parser itself.
+    </p><p>
+      It is included in <span class="application">libxml2</span>.
+    </p></div><div class="refsect1" lang="en"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">--version</tt></span></dt><dd>
+           Display the version of
+           <span class="application">libxml2</span> used.
+         </dd><dt><span class="term"><tt class="option">--debug</tt></span></dt><dd>
+           Parse a file and output an annotated tree of the
+           in-memory version of the document.
+         </dd><dt><span class="term"><tt class="option">--shell</tt></span></dt><dd>
+           Run a navigating shell. Details on available commands in shell mode
+           are below.
+         </dd><dt><span class="term"><tt class="option">--debugent</tt></span></dt><dd>
+           Debug the entities defined in the document.
+         </dd><dt><span class="term"><tt class="option">--copy</tt> </span></dt><dd>
+           Test the internal copy implementation.
+         </dd><dt><span class="term"><tt class="option">--recover</tt></span></dt><dd>
+           Output any parsable portions of an invalid
+           document.
+         </dd><dt><span class="term"><tt class="option">--noent</tt></span></dt><dd>
+           Substitute entity values for entity
+           references. By default, <span class="application">xmllint</span> leaves entity
+           references in place.
+         </dd><dt><span class="term"><tt class="option">--noout</tt></span></dt><dd>
+           Suppress output. By default,
+           <span class="application">xmllint</span> outputs the result tree.
+         </dd><dt><span class="term"><tt class="option">--htmlout</tt></span></dt><dd>
+           Output results as an <span class="acronym">HTML</span>
+           file. This causes <span class="application">xmllint</span> to output
+           the necessary <span class="acronym">HTML</span> tags surrounding the result tree
+           output so the results can be displayed in a browser. 
+         </dd><dt><span class="term"><tt class="option">--nowrap </tt></span></dt><dd>
+           Do not output HTML doc wrapper.
+         </dd><dt><span class="term"><tt class="option">--valid </tt></span></dt><dd>
+           Determine if the document is a valid instance
+           of the included Document Type Definition (<span class="acronym">DTD</span>). A
+           <span class="acronym">DTD</span> to be validated against also can be specified at
+           the command line using the <tt class="option">--dtdvalid</tt> option. By default,
+           <span class="application">xmllint</span> also checks to determine if the
+           document is well-formed.
+         </dd><dt><span class="term"><tt class="option">--postvalid</tt></span></dt><dd>
+           Validate after parsing is completed.
+         </dd><dt><span class="term"> <tt class="option">--dtdvalid</tt> <i class="replaceable"><tt>URL</tt></i></span></dt><dd>
+           Use the
+      <span class="acronym">DTD</span> specified by <i class="replaceable"><tt>URL</tt></i> for
+      validation.
+         </dd><dt><span class="term"><tt class="option">--timing</tt></span></dt><dd>
+           Output information about the time it takes
+           <span class="application">xmllint</span> to perform the various steps.
+         </dd><dt><span class="term"><tt class="option">--repeat</tt></span></dt><dd>
+           Repeat 100 times, for timing or profiling.
+         </dd><dt><span class="term"><tt class="option">--insert</tt></span></dt><dd>
+           Test for valid insertions.
+         </dd><dt><span class="term"><tt class="option">--compress</tt></span></dt><dd>
+           Turn on gzip compression of output.
+         </dd><dt><span class="term"><tt class="option">--sgml</tt></span></dt><dd>Use the DocBook <span class="acronym">SGML</span> parser. This allows
+           documents written in <span class="acronym">SGML</span> DocBook to be converted
+           into an in-memory tree and treated as if they were written in
+           <span class="acronym">XML</span>.</dd><dt><span class="term"><tt class="option">--html</tt></span></dt><dd>
+           Use the <span class="acronym">HTML</span> parser.
+         </dd><dt><span class="term"><tt class="option">--push</tt></span></dt><dd>
+           Use the push mode of the parser.
+         </dd><dt><span class="term"><tt class="option">--memory</tt></span></dt><dd>
+          Parse from memory.
+         </dd><dt><span class="term"><tt class="option">--nowarning</tt></span></dt><dd>
+          Do not emit warnings from the parser and/or validator.
+         </dd><dt><span class="term"><tt class="option">--noblanks</tt></span></dt><dd>
+          Drop ignorable blank spaces.
+         </dd><dt><span class="term"><tt class="option">--format</tt></span></dt><dd>
+          Reformat and reindent the output. The $XMLLINT_INDENT
+          environment variable controls the indentation (default 
+          value is two spaces "  ").
+         </dd><dt><span class="term"><tt class="option">--testIO</tt></span></dt><dd>
+          Test user input/output support.
+         </dd><dt><span class="term"><tt class="option">--encode</tt> <i class="replaceable"><tt>encoding</tt></i></span></dt><dd>
+          Output in the given encoding.
+         </dd><dt><span class="term"><tt class="option">--catalogs</tt></span></dt><dd>
+          Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog
+          is used by default.
+         </dd><dt><span class="term"><tt class="option">--nocatalogs</tt></span></dt><dd>
+          Do not use any catalogs.
+         </dd><dt><span class="term"><tt class="option">--auto</tt></span></dt><dd>
+          Generate a small document for testing purposes.
+         </dd><dt><span class="term"><tt class="option">--xinclude</tt></span></dt><dd>
+          Do XInclude processing.
+         </dd><dt><span class="term"><tt class="option">--loaddtd</tt></span></dt><dd>
+          Fetch external DTD.
+         </dd><dt><span class="term"><tt class="option">--dtdattr</tt></span></dt><dd>
+          Fetch external DTD and populate the tree with inherited attributes.
+         </dd><dt><span class="term"><tt class="option">--dropdtd</tt></span></dt><dd>
+           Remove <span class="acronym">DTD</span> from output.
+         </dd><dt><span class="term"><tt class="option">--stream</tt></span></dt><dd>Use streaming API - useful when  used  in combination with
+              --relaxng or --valid options for validation of files that are
+           too large to be held in memory.</dd><dt><span class="term"><tt class="option">--chkregister</tt></span></dt><dd>Turn on node registration. Useful for developeres testing
+         libxml2 node tracking code.</dd><dt><span class="term"><tt class="option">--relaxng</tt> <i class="replaceable"><tt>schema</tt></i></span></dt><dd>Use RelaxNG file named <i class="replaceable"><tt>schema</tt></i> for
+         validation.</dd><dt><span class="term"><tt class="option">--schema</tt> <i class="replaceable"><tt>schema</tt></i></span></dt><dd>Use a W3C XML Schema file named <i class="replaceable"><tt>schema</tt></i> for validation.</dd><dt><span class="term">
+      <tt class="option">--nonet</tt></span></dt><dd>Do not use the Internet to fetch DTD's or entities.</dd></dl></div></div><div class="refsect1" lang="en"><a name="shell"></a><h2>Shell</h2><p>
+      <span class="application">xmllint</span> offers an interactive shell mode
+      invoked with the <tt class="option">--shell</tt> command. Available commands in
+      shell mode include:
+    </p><div class="variablelist"><dl><dt><span class="term"><tt class="option">base</tt></span></dt><dd>
+           display XML base of the node
+         </dd><dt><span class="term"><tt class="option">bye</tt></span></dt><dd>
+           leave shell
+         </dd><dt><span class="term"><tt class="option">cat <i class="replaceable"><tt>node</tt></i></tt></span></dt><dd>
+           Display node if given or current node.
+         </dd><dt><span class="term"><tt class="option">cd <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+           Change the current node to <i class="replaceable"><tt>path</tt></i> (if given
+           and unique) or root if no argument given.
+         </dd><dt><span class="term"><tt class="option">dir <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+           Dumps information about the node (namespace, attributes, content).
+         </dd><dt><span class="term"><tt class="option">du <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+           Show the structure of the subtree under path or the current node.
+         </dd><dt><span class="term"><tt class="option">exit</tt></span></dt><dd>
+           Leave the shell.
+         </dd><dt><span class="term"><tt class="option">help</tt></span></dt><dd>
+           Show this help.
+         </dd><dt><span class="term"><tt class="option">free</tt></span></dt><dd>
+           Display memory usage.
+         </dd><dt><span class="term"><tt class="option">load <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
+           Load a new document with the given name.
+         </dd><dt><span class="term"><tt class="option">ls <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+           List contents of <i class="replaceable"><tt>path</tt></i> (if given) or the
+           current directory.
+         </dd><dt><span class="term"><tt class="option">pwd</tt></span></dt><dd>
+           Display the path to the current node.
+         </dd><dt><span class="term"><tt class="option">quit</tt></span></dt><dd>
+           Leave the shell.
+         </dd><dt><span class="term"><tt class="option">save <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
+           Saves the current document to <i class="replaceable"><tt>name</tt></i> if
+           given or to the original name.
+         </dd><dt><span class="term"><tt class="option">validate</tt></span></dt><dd>
+           Check the document for error.
+         </dd><dt><span class="term"><tt class="option">write <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
+           Write the current node to the given filename.
+         </dd></dl></div></div><div class="refsect1" lang="en"><h2>Debugging Catalogs</h2><p>Setting the environment variable <tt class="varname">XML_DEBUG_CATALOG</tt>
+    using the command <b class="command">"export XML_DEBUG_CATALOG="</b>
+    outputs debugging information related to catalog operations.</p></div></div></body></html>
diff --git a/libxml2/doc/xmllint.xml b/libxml2/doc/xmllint.xml
new file mode 100644 (file)
index 0000000..9bb9f87
--- /dev/null
@@ -0,0 +1,610 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"
+   href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+]>
+<refentry>
+  <refentryinfo>
+    <title>xmllint Manual</title>
+    <copyright>
+      <year>2001</year>
+    </copyright>
+    <author>
+      <firstname>John</firstname>
+      <surname>Fleck</surname>
+    </author>
+    <address><email>jfleck@inkstain.net</email></address>
+    <author>
+      <firstname>Ziying</firstname>
+      <surname>Sherwin</surname>
+    </author>
+    <address><email>sherwin@nlm.nih.gov</email></address>
+    <author>
+      <firstname>Heiko</firstname>
+      <surname>Rupp</surname>
+    </author>
+    <address><email>hwr@pilhuhn.de</email></address>
+    
+    <releaseinfo>This is release 0.2 of the xmllint Manual.</releaseinfo>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>xmllint</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>xmllint</refname>
+    <refpurpose>command line <acronym>XML</acronym> tool</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>xmllint</command>
+      <group>
+       <arg>--version</arg>
+       <arg>--debug</arg>
+       <arg>--shell</arg>
+       <arg>--debugent</arg>
+       <arg>--copy</arg>
+       <arg>--recover</arg>
+       <arg>--noent</arg>
+       <arg>--noout</arg>
+       <arg>--htmlout</arg>
+       <arg>--nowrap</arg>
+       <arg>--valid</arg>
+       <arg>--postvalid</arg>
+       <arg>--dtdvalid <replaceable>URL</replaceable></arg>
+       <arg>--timing</arg>
+       <arg>--repeat</arg>
+       <arg>--insert</arg>
+       <arg>--compress</arg>
+       <arg>--sgml</arg>
+       <arg>--html</arg>
+       <arg>--push</arg>
+       <arg>--memory</arg>
+       <arg>--nowarning</arg>
+       <arg>--noblanks</arg>
+       <arg>--format</arg>
+       <arg>--testIO</arg>
+       <arg>--encode <replaceable>encoding</replaceable></arg>
+       <arg>--catalogs</arg>
+       <arg>--nocatalogs</arg>
+       <arg>--auto</arg>
+       <arg>--xinclude</arg>
+       <arg>--loaddtd</arg>
+       <arg>--dtdattr</arg>
+       <arg>--dropdtd</arg>
+       <arg>--stream</arg>
+       <arg>--chkregister</arg>
+       <arg>--relaxng</arg>
+       <arg>--schema</arg>
+       <arg>--nonet</arg>
+      </group>
+      <arg><option><replaceable>xmlfile</replaceable></option></arg>
+  </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1 id="introduction">
+    <title>Introduction</title>
+    <para>
+      The xmllint program parses one or more XML files, specified on the
+      command line as <replaceable>xmlfile</replaceable>. It prints various
+      types of output, depending upon the options selected. It is useful for
+      detecting errors both in <acronym>XML</acronym> code and in the
+      <acronym>XML</acronym> parser itself.
+    </para>
+
+    <para>
+      It is included in <application>libxml2</application>.
+    </para>
+  </refsect1>
+  <refsect1 id="options">
+    <title>Options</title>
+    <variablelist>
+      <varlistentry>
+       <term><option>--version</option></term>
+       <listitem>
+         <simpara>
+           Display the version of
+           <application>libxml2</application> used.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><option>--debug</option></term>
+       <listitem>
+         <simpara>
+           Parse a file and output an annotated tree of the
+           in-memory version of the document.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><option>--shell</option></term>
+       <listitem>
+         <simpara>
+           Run a navigating shell. Details on available commands in shell mode
+           are below.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><option>--debugent</option></term>
+       <listitem>
+         <simpara>
+           Debug the entities defined in the document.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><option>--copy</option> </term>
+       <listitem>
+         <simpara>
+           Test the internal copy implementation.
+         </simpara>
+       </listitem>
+      </varlistentry>
+    
+      
+      <varlistentry>
+       <term><option>--recover</option></term>
+       <listitem>
+         <simpara>
+           Output any parsable portions of an invalid
+           document.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><option>--noent</option></term>
+       <listitem>
+         <simpara>
+           Substitute entity values for entity
+           references. By default, <application>xmllint</application> leaves entity
+           references in place.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+      <varlistentry>
+       <term><option>--noout</option></term>
+       <listitem>
+         <simpara>
+           Suppress output. By default,
+           <application>xmllint</application> outputs the result tree.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--htmlout</option></term>
+       <listitem>
+         <simpara>
+           Output results as an <acronym>HTML</acronym>
+           file. This causes <application>xmllint</application> to output
+           the necessary <acronym>HTML</acronym> tags surrounding the result tree
+           output so the results can be displayed in a browser. 
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--nowrap </option></term>
+       <listitem>
+         <simpara>
+           Do not output HTML doc wrapper.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+<varlistentry>
+       <term><option>--valid </option></term>
+       <listitem>
+         <simpara>
+           Determine if the document is a valid instance
+           of the included Document Type Definition (<acronym>DTD</acronym>). A
+           <acronym>DTD</acronym> to be validated against also can be specified at
+           the command line using the <option>--dtdvalid</option> option. By default,
+           <application>xmllint</application> also checks to determine if the
+           document is well-formed.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+ <varlistentry>
+       <term><option>--postvalid</option></term>
+       <listitem>
+         <simpara>
+           Validate after parsing is completed.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+    <varlistentry>
+       <term> <option>--dtdvalid</option> <replaceable>URL</replaceable></term>
+       <listitem>
+         <simpara>
+           Use the
+      <acronym>DTD</acronym> specified by <replaceable>URL</replaceable> for
+      validation.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+     <varlistentry>
+       <term><option>--timing</option></term>
+       <listitem>
+         <simpara>
+           Output information about the time it takes
+           <application>xmllint</application> to perform the various steps.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+   <varlistentry>
+       <term><option>--repeat</option></term>
+       <listitem>
+         <simpara>
+           Repeat 100 times, for timing or profiling.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+    <varlistentry>
+       <term><option>--insert</option></term>
+       <listitem>
+         <simpara>
+           Test for valid insertions.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><option>--compress</option></term>
+       <listitem>
+         <simpara>
+           Turn on gzip compression of output.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+      <varlistentry>
+       <term><option>--sgml</option></term>
+       <listitem>
+         <simpara>Use the DocBook <acronym>SGML</acronym> parser. This allows
+           documents written in <acronym>SGML</acronym> DocBook to be converted
+           into an in-memory tree and treated as if they were written in
+           <acronym>XML</acronym>.</simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--html</option></term>
+       <listitem>
+         <simpara>
+           Use the <acronym>HTML</acronym> parser.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+    <varlistentry>
+       <term><option>--push</option></term>
+       <listitem>
+         <simpara>
+           Use the push mode of the parser.
+         </simpara>
+       </listitem>
+      </varlistentry>
+   
+
+    <varlistentry>
+       <term><option>--memory</option></term>
+       <listitem>
+         <simpara>
+          Parse from memory.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--nowarning</option></term>
+       <listitem>
+         <simpara>
+          Do not emit warnings from the parser and/or validator.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--noblanks</option></term>
+       <listitem>
+         <simpara>
+          Drop ignorable blank spaces.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--format</option></term>
+       <listitem>
+         <simpara>
+          Reformat and reindent the output. The $XMLLINT_INDENT
+          environment variable controls the indentation (default 
+          value is two spaces &quot;  &quot;).
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--testIO</option></term>
+       <listitem>
+         <simpara>
+          Test user input/output support.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+      <term><option>--encode</option> <replaceable>encoding</replaceable></term>
+       <listitem>
+         <simpara>
+          Output in the given encoding.
+         </simpara>
+       </listitem>
+      </varlistentry>
+    
+    <varlistentry>
+       <term><option>--catalogs</option></term>
+       <listitem>
+         <simpara>
+          Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog
+          is used by default.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--nocatalogs</option></term>
+       <listitem>
+         <simpara>
+          Do not use any catalogs.
+         </simpara>
+       </listitem>
+      </varlistentry>
+    
+    <varlistentry>
+       <term><option>--auto</option></term>
+       <listitem>
+         <simpara>
+          Generate a small document for testing purposes.
+         </simpara>
+       </listitem>
+      </varlistentry>
+
+    <varlistentry>
+       <term><option>--xinclude</option></term>
+       <listitem>
+         <simpara>
+          Do XInclude processing.
+         </simpara>
+       </listitem>
+      </varlistentry>
+    <varlistentry>
+       <term><option>--loaddtd</option></term>
+       <listitem>
+         <simpara>
+          Fetch external DTD.
+         </simpara>
+       </listitem>
+      </varlistentry>
+    
+    <varlistentry>
+       <term><option>--dtdattr</option></term>
+       <listitem>
+         <simpara>
+          Fetch external DTD and populate the tree with inherited attributes.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>--dropdtd</option></term>
+       <listitem>
+         <simpara>
+           Remove <acronym>DTD</acronym> from output.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>--stream</option></term>
+       <listitem>
+         <simpara>Use streaming API - useful when  used  in combination with
+              --relaxng or --valid options for validation of files that are
+           too large to be held in memory.</simpara> 
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>--chkregister</option></term>
+       <listitem>
+         <simpara>Turn on node registration. Useful for developeres testing
+         libxml2 node tracking code.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>--relaxng</option> <replaceable>schema</replaceable></term>
+       <listitem>
+         <simpara>Use RelaxNG file named <replaceable>schema</replaceable> for
+         validation.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>--schema</option> <replaceable>schema</replaceable></term>
+       <listitem>
+         <simpara>Use a W3C XML Schema file named <replaceable>schema</replaceable> for validation.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>
+      <option>--nonet</option></term>
+       <listitem>
+         <simpara>Do not use the Internet to fetch DTD's or entities.</simpara>
+       </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1 id="shell">
+    <title>Shell</title>
+    <para>
+      <application>xmllint</application> offers an interactive shell mode
+      invoked with the <option>--shell</option> command. Available commands in
+      shell mode include:
+    </para>
+    <variablelist>
+      <varlistentry>
+       <term><option>base</option></term>
+       <listitem>
+         <simpara>
+           display XML base of the node
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>bye</option></term>
+       <listitem>
+         <simpara>
+           leave shell
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>cat <replaceable>node</replaceable></option></term>
+       <listitem>
+         <simpara>
+           Display node if given or current node.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>cd <replaceable>path</replaceable></option></term>
+       <listitem>
+         <simpara>
+           Change the current node to <replaceable>path</replaceable> (if given
+           and unique) or root if no argument given.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>dir <replaceable>path</replaceable></option></term>
+       <listitem>
+         <simpara>
+           Dumps information about the node (namespace, attributes, content).
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>du <replaceable>path</replaceable></option></term>
+       <listitem>
+         <simpara>
+           Show the structure of the subtree under path or the current node.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>exit</option></term>
+       <listitem>
+         <simpara>
+           Leave the shell.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>help</option></term>
+       <listitem>
+         <simpara>
+           Show this help.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>free</option></term>
+       <listitem>
+         <simpara>
+           Display memory usage.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>load <replaceable>name</replaceable></option></term>
+       <listitem>
+         <simpara>
+           Load a new document with the given name.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>ls <replaceable>path</replaceable></option></term>
+       <listitem>
+         <simpara>
+           List contents of <replaceable>path</replaceable> (if given) or the
+           current directory.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>pwd</option></term>
+       <listitem>
+         <simpara>
+           Display the path to the current node.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>quit</option></term>
+       <listitem>
+         <simpara>
+           Leave the shell.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>save <replaceable>name</replaceable></option></term>
+       <listitem>
+         <simpara>
+           Saves the current document to <replaceable>name</replaceable> if
+           given or to the original name.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>validate</option></term>
+       <listitem>
+         <simpara>
+           Check the document for error.
+         </simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>write <replaceable>name</replaceable></option></term>
+       <listitem>
+         <simpara>
+           Write the current node to the given filename.
+         </simpara>
+       </listitem>
+      </varlistentry>
+     
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>Debugging Catalogs</title>
+    <para>Setting the environment variable <varname>XML_DEBUG_CATALOG</varname>
+    using the command <command>&quot;export XML_DEBUG_CATALOG=&quot;</command>
+    outputs debugging information related to catalog operations.</para>
+  </refsect1>
+</refentry>
diff --git a/libxml2/doc/xsa.xsl b/libxml2/doc/xsa.xsl
new file mode 100644 (file)
index 0000000..30151d4
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+  Stylesheet generating the XSA entry for libxml2 based on the 
+  latest News entry.
+  See http://www.garshol.priv.no/download/xsa/ for a description of XSA
+ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+     xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml">
+  <xsl:output method="xml"
+      doctype-public="-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML"
+      doctype-system="http://www.garshol.priv.no/download/xsa/xsa.dtd"
+      indent="yes"/>
+
+  <xsl:template match="/">
+<xsa>
+  <vendor>
+    <name>Daniel Veillard</name>
+    <email>daniel@veillard.com</email>
+    <url>http://veillard.com/</url>
+  </vendor>
+  <product id="libxml2">
+    <name>libxml2</name>
+    <version><xsl:value-of select="substring-before(//xhtml:h3[2], ':')"/></version>
+    <last-release><xsl:value-of select="substring-after(//xhtml:h3[2], ':')"/></last-release>
+    <info-url>http://xmlsoft.org/</info-url>
+    <changes>
+    <xsl:apply-templates select="//xhtml:h3[2]/following-sibling::*[1]"/>
+    </changes>
+  </product>
+</xsa>
+  </xsl:template>
+  <xsl:template match="xhtml:h3">
+  </xsl:template>
+  <xsl:template match="xhtml:ul">
+    <xsl:apply-templates select=".//xhtml:li"/>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+  <xsl:template match="xhtml:li">
+    <xsl:text>   - </xsl:text>
+    <xsl:value-of select="."/>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+  <xsl:template match="xhtml:a">
+    <xsl:value-of select="."/>
+    <xsl:text> at 
+</xsl:text>
+    <xsl:value-of select="@href"/>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+</xsl:stylesheet>
+
diff --git a/libxml2/libxml.spec b/libxml2/libxml.spec
new file mode 100644 (file)
index 0000000..57c71c7
--- /dev/null
@@ -0,0 +1,193 @@
+Summary: Library providing XML and HTML support
+Name: libxml2
+Version: 2.5.4
+Release: 1
+License: MIT
+Group: Development/Libraries
+Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: python python-devel
+URL: http://xmlsoft.org/
+Prefix: %{_prefix}
+Docdir: %{_docdir}
+
+%description
+This library allows to manipulate XML files. It includes support 
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified. The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select subnodes or ranges. A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+%package devel
+Summary: Libraries, includes, etc. to develop XML and HTML applications
+Group: Development/Libraries
+Requires: libxml2 = %{version}
+Requires: zlib-devel
+
+%description devel
+Libraries, include files, etc you can use to develop XML applications.
+This library allows to manipulate XML files. It includes support 
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified. The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select subnodes or ranges. A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+%package python
+Summary: Python bindings for the libxml2 library
+Group: Development/Libraries
+Requires: libxml2 = %{version}
+Requires: python
+
+%description python
+The libxml2-python package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by the libxml2 library to manipulate XML files.
+
+This library allows to manipulate XML files. It includes support 
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+
+%prep
+%setup -q
+
+%build
+%configure
+make LIBTOOL=/usr/bin/libtool
+
+%install
+rm -fr %{buildroot}
+
+%makeinstall
+
+#
+# this is a bit ugly but tries to generate the bindings for all versions
+# of python installed
+#
+for i in %{prefix}/include/python*
+do
+    py_version=`echo $i | sed "s+%{prefix}/include/python++"`
+    if test -x %{prefix}/bin/python$py_version
+    then
+        echo generating bindings for Python $py_version
+      (cd python ; make clean ; \
+         make PYTHON="%{prefix}/bin/python$py_version" \
+            PYTHON_INCLUDES="%{prefix}/include/python$py_version" \
+            PYTHON_VERSION="$py_version"; \
+%makeinstall PYTHON="%{prefix}/bin/python$py_version" \
+            PYTHON_INCLUDES="%{prefix}/include/python$py_version" \
+            PYTHON_VERSION="$py_version" )
+    fi
+done
+
+%clean
+rm -fr %{buildroot}
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%files
+%defattr(-, root, root)
+
+%doc AUTHORS ChangeLog NEWS README Copyright TODO
+%doc %{_mandir}/man1/xmllint.1*
+%doc %{_mandir}/man1/xmlcatalog.1*
+%doc %{_mandir}/man3/libxml.3*
+
+%{_libdir}/lib*.so.*
+%{prefix}/bin/xmllint
+%{prefix}/bin/xmlcatalog
+
+%files devel
+%defattr(-, root, root)
+
+%doc %{_mandir}/man1/xml2-config.1*
+%doc AUTHORS ChangeLog NEWS README Copyright TODO
+%doc doc/*.html doc/html doc/*.gif doc/*.png
+%doc doc/tutorial doc/libxml2-api.xml
+
+%{_libdir}/lib*.so
+%{_libdir}/*a
+%{_libdir}/*.sh
+%{prefix}/include/*
+%{prefix}/bin/xml2-config
+%{prefix}/share/aclocal/libxml.m4
+%{_libdir}/pkgconfig/libxml-2.0.pc
+%files python
+%defattr(-, root, root)
+
+%doc AUTHORS ChangeLog NEWS README Copyright
+%{_libdir}/python*/site-packages/libxml2.py
+%{_libdir}/python*/site-packages/drv_libxml2.py
+%{_libdir}/python*/site-packages/libxml2mod*
+%doc python/TODO
+%doc python/libxml2class.txt
+%doc python/tests/*.py
+%doc doc/*.py
+%doc doc/python.html
+
+%changelog
+* Thu Aug  7 2003 Daniel Veillard <veillard@redhat.com>
+- upstream release 2.5.4 see http://xmlsoft.org/news.html
+
+* Thu Jan  2 2003 Daniel Veillard <veillard@redhat.com>
+- integrated drv_libxml2 xml.sax driver from Stéphane Bidoul
+- provides the new XmlTextReader interfaces based on C# XML APIs
+
+* Wed Oct 23 2002 Daniel Veillard <veillard@redhat.com>
+- revamped the spec file, cleaned up some rpm building problems
+
+* Fri Oct  4 2002 Jeremy Katz <katzj@redhat.com>
+- build with 'make LIBTOOL=/usr/bin/libtool' to use system libtool
+
+* Wed Sep  4 2002 Daniel Veillard <veillard@redhat.com>
+
+- library paths fixed for x86-64
+
+* Fri Feb  1 2002 Daniel Veillard <veillard@redhat.com>
+
+- Added the python package
+
+* Sun Nov  4 2001 Daniel Veillard <veillard@redhat.com>
+
+- cleaned up the specfile
+- 2.4.7 broke SGML catalogs badly. this fixes it.
+
+* Thu Apr 26 2001 Toshio Kuratomi <badger@prtr-13.ucsc.edu>
+
+[2.3.7]
+- Added libxml.m4 to the distribution file list
+- Moved the man pages from /usr/man to /usr/share/man to conform to FHS2.0
+- Moved programmer documentation into the devel package
+
+* Thu Sep 23 1999 Daniel Veillard <daniel@veillard.com>
+
+- corrected the spec file alpha stuff
+- switched to version 1.7.1
+- Added validation, XPath, nanohttp, removed memory leaks
+- Renamed CHAR to xmlChar
+
+* Wed Jun  2 1999 Daniel Veillard <daniel@veillard.com>
+
+- Switched to version 1.1: SAX extensions, better entities support, lots of
+  bug fixes.
+
+* Sun Oct  4 1998 Daniel Veillard <daniel@veillard.com>
+
+- Added xml-config to the package
+
+* Thu Sep 24 1998 Michael Fulbright <msf@redhat.com>
+
+- Built release 0.30
+
diff --git a/libxml2/python/tests/reader4.py b/libxml2/python/tests/reader4.py
new file mode 100755 (executable)
index 0000000..0269cb0
--- /dev/null
@@ -0,0 +1,45 @@
+#!/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()
diff --git a/libxml2/python/tests/reader5.py b/libxml2/python/tests/reader5.py
new file mode 100755 (executable)
index 0000000..fbfe4a6
--- /dev/null
@@ -0,0 +1,48 @@
+#!/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()
diff --git a/libxml2/python/tests/reader6.py b/libxml2/python/tests/reader6.py
new file mode 100755 (executable)
index 0000000..fe22079
--- /dev/null
@@ -0,0 +1,118 @@
+#!/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=""
+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
+"""
+
+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()
diff --git a/libxml2/python/tests/thread2.py b/libxml2/python/tests/thread2.py
new file mode 100755 (executable)
index 0000000..c8ac5ed
--- /dev/null
@@ -0,0 +1,96 @@
+#!/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()
diff --git a/libxml2/result/noent/slashdot16.xml b/libxml2/result/noent/slashdot16.xml
new file mode 100644 (file)
index 0000000..f4b168d
Binary files /dev/null and b/libxml2/result/noent/slashdot16.xml differ
diff --git a/libxml2/result/noent/utf16bom.xml b/libxml2/result/noent/utf16bom.xml
new file mode 100644 (file)
index 0000000..6ea296e
Binary files /dev/null and b/libxml2/result/noent/utf16bom.xml differ
diff --git a/libxml2/result/relaxng/comps_0 b/libxml2/result/relaxng/comps_0
new file mode 100644 (file)
index 0000000..cdefe63
--- /dev/null
@@ -0,0 +1 @@
+./test/relaxng/comps_0.xml validates
diff --git a/libxml2/result/relaxng/comps_0.err b/libxml2/result/relaxng/comps_0.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/libxml2/result/relaxng/comps_err b/libxml2/result/relaxng/comps_err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/libxml2/result/relaxng/comps_valid b/libxml2/result/relaxng/comps_valid
new file mode 100644 (file)
index 0000000..67dd402
--- /dev/null
@@ -0,0