[xml/sgml-commit] r501 - in packages/libxml2: . branches/upstream/current branches/upstream/current/doc branches/upstream/current/doc/devhelp branches/upstream/current/doc/examples branches/upstream/current/doc/html branches/upstream/current/include branches/upstream/current/include/libxml branches/upstream/current/macos/src branches/upstream/current/python branches/upstream/current/result branches/upstream/current/result/HTML branches/upstream/current/result/XPath/tests branches/upstream/current/result/c14n/exc-without-comments branches/upstream/current/result/noent branches/upstream/current/result/regexp branches/upstream/current/result/schemas branches/upstream/current/test branches/upstream/current/test/HTML branches/upstream/current/test/XPath/docs branches/upstream/current/test/XPath/tests branches/upstream/current/test/c14n/exc-without-comments branches/upstream/current/test/regexp branches/upstream/current/test/schemas branches/upstream/current/vms branches/upstream/current/win32

Mike Hommey glandium at costa.debian.org
Fri Jan 6 18:14:15 UTC 2006


Author: glandium
Date: 2006-01-06 18:12:46 +0000 (Fri, 06 Jan 2006)
New Revision: 501

Added:
   packages/libxml2/branches/upstream/current/result/HTML/53867.html
   packages/libxml2/branches/upstream/current/result/HTML/53867.html.err
   packages/libxml2/branches/upstream/current/result/HTML/53867.html.sax
   packages/libxml2/branches/upstream/current/result/XPath/tests/nodespat
   packages/libxml2/branches/upstream/current/result/c14n/exc-without-comments/test-2
   packages/libxml2/branches/upstream/current/result/noent/ns7
   packages/libxml2/branches/upstream/current/result/ns7
   packages/libxml2/branches/upstream/current/result/ns7.rde
   packages/libxml2/branches/upstream/current/result/ns7.rdr
   packages/libxml2/branches/upstream/current/result/ns7.sax
   packages/libxml2/branches/upstream/current/result/ns7.sax2
   packages/libxml2/branches/upstream/current/result/schemas/bug321475_1_0
   packages/libxml2/branches/upstream/current/result/schemas/bug321475_1_0.err
   packages/libxml2/branches/upstream/current/result/schemas/bug322411_1_0
   packages/libxml2/branches/upstream/current/result/schemas/bug322411_1_0.err
   packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0
   packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0.err
   packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0
   packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0.err
   packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0
   packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0.err
   packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0
   packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0.err
   packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0
   packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0.err
   packages/libxml2/branches/upstream/current/test/HTML/53867.html
   packages/libxml2/branches/upstream/current/test/XPath/docs/nodes
   packages/libxml2/branches/upstream/current/test/XPath/tests/nodespat
   packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xml
   packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xpath
   packages/libxml2/branches/upstream/current/test/ns7
   packages/libxml2/branches/upstream/current/test/schemas/bug321475_0.xml
   packages/libxml2/branches/upstream/current/test/schemas/bug321475_1.xsd
   packages/libxml2/branches/upstream/current/test/schemas/bug322411_0.xml
   packages/libxml2/branches/upstream/current/test/schemas/bug322411_1.xsd
   packages/libxml2/branches/upstream/current/test/schemas/bug323510_0.xml
   packages/libxml2/branches/upstream/current/test/schemas/bug323510_1.xsd
   packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xml
   packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xsd
   packages/libxml2/branches/upstream/current/test/schemas/decimal-1_0.xml
   packages/libxml2/branches/upstream/current/test/schemas/decimal-1_1.xsd
   packages/libxml2/branches/upstream/current/test/schemas/decimal-2_0.xml
   packages/libxml2/branches/upstream/current/test/schemas/decimal-2_1.xsd
   packages/libxml2/branches/upstream/current/test/schemas/decimal-3_0.xml
   packages/libxml2/branches/upstream/current/test/schemas/decimal-3_1.xsd
   packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_0.xml
   packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_1.xsd
   packages/libxml2/branches/upstream/current/win32/Makefile.mingw.orig
   packages/libxml2/branches/upstream/current/win32/Makefile.mingw.rej
Removed:
   packages/libxml2/branches/upstream/current/result/regexp/*
Modified:
   packages/libxml2/
   packages/libxml2/branches/upstream/current/ChangeLog
   packages/libxml2/branches/upstream/current/HTMLparser.c
   packages/libxml2/branches/upstream/current/HTMLtree.c
   packages/libxml2/branches/upstream/current/Makefile.am
   packages/libxml2/branches/upstream/current/Makefile.in
   packages/libxml2/branches/upstream/current/NEWS
   packages/libxml2/branches/upstream/current/SAX2.c
   packages/libxml2/branches/upstream/current/c14n.c
   packages/libxml2/branches/upstream/current/config.h.in
   packages/libxml2/branches/upstream/current/configure
   packages/libxml2/branches/upstream/current/configure.in
   packages/libxml2/branches/upstream/current/doc/APIchunk0.html
   packages/libxml2/branches/upstream/current/doc/APIchunk1.html
   packages/libxml2/branches/upstream/current/doc/APIchunk10.html
   packages/libxml2/branches/upstream/current/doc/APIchunk11.html
   packages/libxml2/branches/upstream/current/doc/APIchunk12.html
   packages/libxml2/branches/upstream/current/doc/APIchunk13.html
   packages/libxml2/branches/upstream/current/doc/APIchunk14.html
   packages/libxml2/branches/upstream/current/doc/APIchunk15.html
   packages/libxml2/branches/upstream/current/doc/APIchunk16.html
   packages/libxml2/branches/upstream/current/doc/APIchunk17.html
   packages/libxml2/branches/upstream/current/doc/APIchunk18.html
   packages/libxml2/branches/upstream/current/doc/APIchunk19.html
   packages/libxml2/branches/upstream/current/doc/APIchunk2.html
   packages/libxml2/branches/upstream/current/doc/APIchunk20.html
   packages/libxml2/branches/upstream/current/doc/APIchunk21.html
   packages/libxml2/branches/upstream/current/doc/APIchunk22.html
   packages/libxml2/branches/upstream/current/doc/APIchunk23.html
   packages/libxml2/branches/upstream/current/doc/APIchunk24.html
   packages/libxml2/branches/upstream/current/doc/APIchunk25.html
   packages/libxml2/branches/upstream/current/doc/APIchunk26.html
   packages/libxml2/branches/upstream/current/doc/APIchunk27.html
   packages/libxml2/branches/upstream/current/doc/APIchunk28.html
   packages/libxml2/branches/upstream/current/doc/APIchunk29.html
   packages/libxml2/branches/upstream/current/doc/APIchunk3.html
   packages/libxml2/branches/upstream/current/doc/APIchunk4.html
   packages/libxml2/branches/upstream/current/doc/APIchunk5.html
   packages/libxml2/branches/upstream/current/doc/APIchunk6.html
   packages/libxml2/branches/upstream/current/doc/APIchunk7.html
   packages/libxml2/branches/upstream/current/doc/APIchunk8.html
   packages/libxml2/branches/upstream/current/doc/APIchunk9.html
   packages/libxml2/branches/upstream/current/doc/APIconstructors.html
   packages/libxml2/branches/upstream/current/doc/APIfiles.html
   packages/libxml2/branches/upstream/current/doc/APIfunctions.html
   packages/libxml2/branches/upstream/current/doc/APIsymbols.html
   packages/libxml2/branches/upstream/current/doc/FAQ.html
   packages/libxml2/branches/upstream/current/doc/Makefile.am
   packages/libxml2/branches/upstream/current/doc/Makefile.in
   packages/libxml2/branches/upstream/current/doc/XMLinfo.html
   packages/libxml2/branches/upstream/current/doc/XSLT.html
   packages/libxml2/branches/upstream/current/doc/bugs.html
   packages/libxml2/branches/upstream/current/doc/catalog.html
   packages/libxml2/branches/upstream/current/doc/contribs.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-HTMLtree.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-pattern.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-relaxng.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-schemasInternals.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-tree.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-valid.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlIO.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlerror.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlreader.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlregexp.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlsave.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlschemas.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlstring.html
   packages/libxml2/branches/upstream/current/doc/devhelp/libxml2.devhelp
   packages/libxml2/branches/upstream/current/doc/downloads.html
   packages/libxml2/branches/upstream/current/doc/encoding.html
   packages/libxml2/branches/upstream/current/doc/examples/Makefile.am
   packages/libxml2/branches/upstream/current/doc/examples/Makefile.in
   packages/libxml2/branches/upstream/current/doc/examples/examples.xml
   packages/libxml2/branches/upstream/current/doc/help.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-HTMLtree.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-pattern.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-relaxng.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-schemasInternals.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-tree.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-valid.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-xmlIO.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-xmlerror.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-xmlreader.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-xmlregexp.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-xmlsave.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-xmlschemas.html
   packages/libxml2/branches/upstream/current/doc/html/libxml-xmlstring.html
   packages/libxml2/branches/upstream/current/doc/index.html
   packages/libxml2/branches/upstream/current/doc/intro.html
   packages/libxml2/branches/upstream/current/doc/libxml2-api.xml
   packages/libxml2/branches/upstream/current/doc/libxml2.xsa
   packages/libxml2/branches/upstream/current/doc/namespaces.html
   packages/libxml2/branches/upstream/current/doc/news.html
   packages/libxml2/branches/upstream/current/doc/python.html
   packages/libxml2/branches/upstream/current/doc/site.xsl
   packages/libxml2/branches/upstream/current/doc/xml.html
   packages/libxml2/branches/upstream/current/doc/xmldtd.html
   packages/libxml2/branches/upstream/current/doc/xmlreader.html
   packages/libxml2/branches/upstream/current/elfgcchack.h
   packages/libxml2/branches/upstream/current/error.c
   packages/libxml2/branches/upstream/current/gentest.py
   packages/libxml2/branches/upstream/current/include/libxml/HTMLtree.h
   packages/libxml2/branches/upstream/current/include/libxml/pattern.h
   packages/libxml2/branches/upstream/current/include/libxml/schemasInternals.h
   packages/libxml2/branches/upstream/current/include/libxml/valid.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlIO.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlerror.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlreader.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlregexp.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlsave.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlschemas.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h
   packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h.in
   packages/libxml2/branches/upstream/current/include/win32config.h
   packages/libxml2/branches/upstream/current/include/wsockcompat.h
   packages/libxml2/branches/upstream/current/legacy.c
   packages/libxml2/branches/upstream/current/libxml.3
   packages/libxml2/branches/upstream/current/libxml.spec.in
   packages/libxml2/branches/upstream/current/libxml2.spec
   packages/libxml2/branches/upstream/current/macos/src/config-mac.h
   packages/libxml2/branches/upstream/current/nanohttp.c
   packages/libxml2/branches/upstream/current/parser.c
   packages/libxml2/branches/upstream/current/parserInternals.c
   packages/libxml2/branches/upstream/current/pattern.c
   packages/libxml2/branches/upstream/current/python/libxml.py
   packages/libxml2/branches/upstream/current/python/libxml2-py.c
   packages/libxml2/branches/upstream/current/python/setup.py
   packages/libxml2/branches/upstream/current/relaxng.c
   packages/libxml2/branches/upstream/current/result/regexp/hard
   packages/libxml2/branches/upstream/current/result/schemas/bug303566_1_1.err
   packages/libxml2/branches/upstream/current/result/schemas/bug312957_1_0.err
   packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension-err_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-2-1-1_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-4-1-err_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/element-err_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/include3_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/restriction-attr1_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/scc-no-xmlns_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/scc-no-xsi_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-attribute1_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-attribute2_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-1_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-form_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-st_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-type_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-attribute4_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-element1_0_0.err
   packages/libxml2/branches/upstream/current/result/schemas/src-element3_0_0.err
   packages/libxml2/branches/upstream/current/runsuite.c
   packages/libxml2/branches/upstream/current/runtest.c
   packages/libxml2/branches/upstream/current/schematron.c
   packages/libxml2/branches/upstream/current/test/regexp/hard
   packages/libxml2/branches/upstream/current/testapi.c
   packages/libxml2/branches/upstream/current/tree.c
   packages/libxml2/branches/upstream/current/uri.c
   packages/libxml2/branches/upstream/current/valid.c
   packages/libxml2/branches/upstream/current/vms/config.vms
   packages/libxml2/branches/upstream/current/win32/Makefile.mingw
   packages/libxml2/branches/upstream/current/win32/configure.js
   packages/libxml2/branches/upstream/current/win32/libxml2.def.src
   packages/libxml2/branches/upstream/current/xmlIO.c
   packages/libxml2/branches/upstream/current/xmlmodule.c
   packages/libxml2/branches/upstream/current/xmlreader.c
   packages/libxml2/branches/upstream/current/xmlregexp.c
   packages/libxml2/branches/upstream/current/xmlsave.c
   packages/libxml2/branches/upstream/current/xmlschemas.c
   packages/libxml2/branches/upstream/current/xmlschemastypes.c
   packages/libxml2/branches/upstream/current/xmlstring.c
   packages/libxml2/branches/upstream/current/xmlwriter.c
   packages/libxml2/branches/upstream/current/xpath.c
Log:
 r290 at namakemono:  mh | 2006-01-06 18:28:17 +0100
 Load /tmp/tmp.U9vXwU/libxml2-2.6.23 into
 local/libxml2/branches/upstream/current.
 



Property changes on: packages/libxml2
___________________________________________________________________
Name: svk:merge
   + 85a06573-1206-0410-a182-ce9117885d71:/local/libxml2:290

Modified: packages/libxml2/branches/upstream/current/ChangeLog
===================================================================
--- packages/libxml2/branches/upstream/current/ChangeLog	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/ChangeLog	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,3 +1,543 @@
+Thu Jan  5 16:25:06 CET 2006 Daniel Veillard <daniel at veillard.com>
+
+	* NEWS configure.in libxml.spec.in testapi.c doc/*: upated the news
+	  regenerated the docs, preparing for release of 2.6.23
+	* pattern.c xmlschemas.c: fixed some comments
+	
+Thu Jan  5 15:48:27 CET 2006 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* test/XPath/docs/nodes test/XPath/tests/nodespat
+	  result/XPath/tests/nodespat: Added regression tests for
+	  the latest XPath/pattern fixes.
+
+Thu Jan  5 15:43:38 CET 2006 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* pattern.c: Another fix to handle "foo//.": "foo" was not
+	  included in the resulting node-set.
+
+Thu Jan  5 13:22:29 CET 2006 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* pattern.c xpath.c include/libxml/pattern.h:
+	  Fixed bug #322928, reported by Erich Schubert: The bug was
+	  in pattern.c, which is used for a tiny subset of xpath
+	  expression which can be evaluated in an optimized way.
+	  The doc-node was never considered when evaluating "//"
+	  expressions. Additionally, we fixed resolution
+	  to nodes of any type in pattern.c; i.e. a "//." didn't work
+	  yet, as it did select only element-nodes. Due to this
+	  issue the pushing of nodes in xpath.c needed to be adjusted
+	  as well.
+
+Wed Jan  4 18:07:47 CET 2006 Daniel Veillard <daniel at veillard.com>
+
+	* parser.c: tiny refactoring patch from Bjorn Reese
+
+Wed Jan  4 15:00:51 CET 2006 Daniel Veillard <daniel at veillard.com>
+
+	* SAX2.c: fix bug #324432 with <xml:foo/>
+	* test/ns7 resul//ns7*: added to the regression tests
+
+Wed Jan  4 10:53:56 CET 2006 Daniel Veillard <daniel at veillard.com>
+
+	* include/wsockcompat.h: applied patch from Mark Junker, fixing a 
+	  MinGW compilation problem, should close bug #324943
+
+Tue Jan  3 11:49:54 CET 2006 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Removed last dependency on the obsolete enum
+	  xmlSchemaValidError.
+
+Mon Jan  2 11:20:00 CET 2006 Daniel Veillard <daniel at veillard.com>
+
+	* xmlreader.c include/libxml/xmlreader.h xmlschemas.c: compilation
+	  and doc build fixes from Michael Day
+
+Wed Dec 28 22:12:34 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlregexp.c: bug in xmlRegExecPushString2() pointed out by 
+	  Sreeni Nair.
+
+Tue Dec 20 16:55:31 CET 2005 Rob Richards <rrichards at ctindustries.net>
+
+	* tree.c: fix bug #322136 in xmlNodeBufGetContent when entity ref is 
+	  a child of an element (fix by Oleksandr Kononenko).
+	* HTMLtree.c include/libxml/HTMLtree.h: Add htmlDocDumpMemoryFormat.
+
+Tue Dec 20 11:43:06 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c xmlstring.c: Fixed a segfault during
+	  text concatenation when validating a node tree:
+	  xmlStrncat was called with a @len of -1; but unlike
+	  xmlStrncatNew, it does not calculate the length
+	  automatically in such a case (reported by Judy Hay
+	  on the mailing list).
+	  Updated the descriptions of the involved string
+	  functions to note this.
+
+Thu Dec 15 12:11:07 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* nanohttp.c: applied patch from Gary Coady to accept gzipped
+	  http resources.
+
+Wed Dec 14 18:41:26 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* win32/configure.js: Added enable/disable of runtime
+	  debugging (LIBXML_DEBUG_RUNTIME).
+
+Wed Dec 14 18:11:50 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* include/libxml/xmlversion.h.in: Fixed to define
+	  LIBXML_DEBUG_RUNTIME on the basis of @WITH_RUN_DEBUG at .
+
+Tue Dec 13 12:49:23 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* test/schemas/bug321475* result/schemas/bug321475*:
+	  Added regression test for bug #321475 (reported by
+	  Gabor Nagy). Fixing of bug #323510 seemed to have
+	  fixed this bug as well.
+
+Mon Dec 12 16:19:16 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* test/schemas/bug323510* result/schemas/bug323510*:
+	  Added regression test for bug #323510.
+
+Mon Dec 12 16:11:13 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Workaround for bug #323510 (reported by
+	  Jonathan Filiatrault): substituted the epsilon transition
+	  for a labelled transition, in order to avoid a bug in
+	  xmlregexp.c which eliminated the epsilon transition and
+	  marked the initial state as final.
+
+Mon Dec 12 14:25:46 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlreader.c: Gary Coady pointed a memory leak in
+	  xmlTextReaderReadInnerXml() applied patch fixing #323864
+
+Sat Dec 10 12:08:28 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c
+	  testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number
+	  of warnings shown by HP-UX compiler and reported by Rick Jones
+
+Fri Dec  9 18:57:31 CET 2005 Rob Richards <rrichards at ctindustries.net>
+
+	* xmlwriter.c: Insert space between pubid and sysid when both 
+	  passed to xmlTextWriterStartDTD and indenting not being used.
+	  Remove no longer used Mem callbacks.
+
+Fri Dec  9 11:01:16 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* runsuite.c: Changed to instantly mark instance-tests as
+	  failed if the corresponding schema was invalid. This
+	  reflects the side of the Python code for the XML Schema test
+	  suite. We now get the same number of failed tests on both
+	  sides.
+
+Wed Dec  7 14:59:01 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlreader.c include/libxml/xmlreader.h: Added
+	  xmlTextReaderSchemaValidateCtxt() to the API.
+
+Wed Dec  7 12:59:56 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Fixed a segfault: the instance document was
+	  still tried to be validated, if the schema, dynamically
+	  acquired using XSI was invalid, thus mangled. The
+	  validation will stop (or rather won't validate) now in
+	  such a case. The schema parser error code will be set
+	  on the validion context now; this is somehow not nice,
+	  but it assures that the validation context indicates an
+	  error in there was a parser error.
+
+Tue Dec  6 18:57:23 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlreader.c: small doc patch from Aron Stansvik
+	* legacy.c: another doc patch for a deprecated API
+
+Mon Dec  5 16:23:49 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* Makefile.am: Tiny change for 'make tests': raised
+	  the number of expected failures for James Clark's
+	  XML Schema datatype tests from 10 to 11. The additional
+	  reported error was agreed to be correct long time ago,
+	  but we missed to adjust the message reported by
+	  the testing script.
+
+Fri Dec  2 13:51:14 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* result/schemas/decimal* result/schemas/bug322411*:
+	  Added missing regression test results for the latest IDC
+	  and xs:decimal bugs.
+
+Wed Nov 30 12:22:23 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* test/schemas/decimal* test/schemas/bug322411*: Added
+	  regression tests for the latest IDC and xs:decimal bugs.
+
+Wed Nov 30 11:57:35 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Fixed bubbling of duplicate IDC nodes: the
+	  parent's list of duplicates was filled with NULLs instead
+	  of the nodes under certain conditions. This lead to a
+	  segfault when the list's entries were accessed.
+
+Mon Nov 28 17:28:53 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemastypes.c: Fixed parsing of xs:decimal to
+	  allow/deny special lexical forms. Fixed the totalDigits
+	  for values in the range (x < 1) &&  (x > -1) && (x != 0);
+	  E.g "0.123" has now a totalDigits of 3 (was 4 previously).
+	  Adjusted the comparison function for decimals due to this
+	  change. As a side effect comparison against zeroes was
+	  optimized.
+
+Mon Nov 28 13:25:11 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: An assignment to a local variable, which was
+	  used to access the IDC node list, was missing after the
+	  reallocation of the list (reported by Fabrice GUY
+	  bug #322411). Renamed the define ENABLE_IDC_NODE_TABLES
+	  to ENABLE_IDC_NODE_TABLES_TEST and *disabled* it, since
+	  it is used to force bubbling of IDC node tables even
+	  if not necessary; this was intended to be used for test
+	  purposes, but I obviously missed to disable it (although
+	  it apparently helped finding the bug).
+
+Wed Nov 23 17:34:52 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: In xmlSchemaAssembleByXSI() the return value
+	  of xmlSchemaGetMetaAttrInfo() was not assigned to anything;
+	  this caused XSI-driven-dynamic schema acquisition to fail
+	  with @noNamespaceSchemaLocation (reported by Julien Lamy
+	  on the mailing list).
+
+Tue Nov 22 18:31:34 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Fixed a bug in xmlSchemaFindRedefCompInGraph()
+	  which caused the search for components to stop at the
+	  first encountered attribute group component.
+	  Fixed error report in xmlSchemaCheckSRCRedefineFirst(): the
+	  designation of a not-found component was not reported.
+
+Mon Nov 21 12:23:28 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlschemastypes.c: Albert Chin found another signed/unsigned problem
+	  in the date and time code raised on IRIX 6.5
+
+Fri Nov 18 18:13:38 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c include/libxml/xmlschemas.h:
+	  Added xmlSchemaSetParserStructuredErrors() to the API.
+	  Fixed channeling of error relevant information to
+	  subsequent parser/validation contexts.
+
+Thu Nov 17 14:11:43 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* parserInternals.c: removed unreachable code pointed out by 
+	  Oleksandr Kononenko, fixes bug #321695
+
+Thu Nov 17 08:24:31 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* parser.c: use ctxt->standalone = -2 to indicate that the
+	  XMLDecl was parsed but no standalone attribute was found,
+	  suggested by Michael Day to detect if an XMLDecl was found.
+
+Tue Nov 15 09:49:24 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* runtest.c: Hisashi Fujinaka pointed that errors in Schemas tests
+	  were not properly reported.
+
+Sun Nov 13 13:42:41 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlIO.c: applied patch from Geert Jansen to remove xmlBufferClose()
+	  which is not needed.
+
+Fri Nov 11 13:48:52 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Changed xmlSchemaFormatIDCKeySequence()
+	  to use xmlSchemaGetCanonValueWhtspExt() in order to
+	  correctly report values for xs:anySimpleType.
+	* test/schemas/idc-keyref-err1*
+	  result/schemas/idc-keyref-err1*: Added a test for this change.
+
+Wed Nov  9 13:07:24 EST 2005 Rob Richards <rrichards at ctindustries.net>
+
+	* xmlIO.c xmlwriter.c: function consolidation when writing to xmlBuffer.
+	  Return error condition not len if xmlwriter fails writing to buffer.
+
+Wed Nov  9 09:54:54 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlsave.c xmlIO.c include/libxml/xmlIO.h include/libxml/xmlsave.h:
+	  applied patch from Geert Jansen to implement the save function to 
+	  a xmlBuffer, and a bit of cleanup.
+
+Mon Nov  7 14:58:39 CET 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c xmlschemastypes.c: Fixed the type of the
+	  totalDigits value to be positiveInteger.
+	  Fixed crash in an error report function when we gave it
+	  the document node; only element and attribute nodes are
+	  processed now (reported by Rob Richards).
+
+Tue Nov  1 16:22:29 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlregexp.c: fix bug #319897, problem with counted atoms
+	  when the transition itself is counted too
+	* result/regexp/hard test/regexp/hard: augmented the regression
+	  tests with the problem exposed.
+
+Tue Nov  1 11:54:39 CET 2005 Daniel Veillard <daniel at veillard.com>
+
+	* win32/Makefile.mingw include/win32config.h: applied patch from
+	  Mark Junker to fix compilation with MinGW
+
+Fri Oct 28 18:36:08 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* libxml.3: tiny fix from Albert Chin
+	* runsuite.c runtest.c testapi.c: portability cleanup for arch
+	  needing trio for *printf
+
+Fri Oct 28 12:21:39 EDT 2005 Rob Richards <rrichards at ctindustries.net>
+
+	* tree.c: add additional checks to prevent tree corruption. fix problem 
+	  copying attribute using xmlDocCopyNode from one document to another.
+
+Fri Oct 28 17:58:13 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* config.h.in configure.in vms/config.vms macos/src/config-mac.h:
+	  cleanup from Albert Chin
+	* doc/Makefile.am: html/index.sgml doesn't exist anymore
+
+Fri Oct 28 16:53:51 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlIO.c xmlmodule.c: more portability patches from Albert Chin for
+	  HP-UX and AIX
+
+Fri Oct 28 10:36:10 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlmodule.c configure.in: applied 2 patches from Albert Chin for
+	  module portability
+
+Fri Oct 28 10:24:39 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* error.c: fixing a portability problem on some old Unices with
+	  patch from Albert Chin
+
+2005-10-27  Aleksey Sanin <aleksey at aleksey.com>
+
+	* c14n.c  result/c14n/exc-without-comments/test-2
+	  test/c14n/exc-without-comments/test-2.xml
+	  test/c14n/exc-without-comments/test-2.xpath: fixing
+	  bug in exc-c14n namespace visibility + test case (bug #319367)
+
+Thu Oct 27 16:10:31 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* python/libxml.py: remove warnings to stdout patch from Nic Ferrier
+
+Thu Oct 27 13:54:52 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* valid.c xmlregexp.c include/libxml/valid.h
+	  include/libxml/xmlregexp.h: avoid function parameters names 'list'
+	  as this seems to give troubles with VC6 and stl as reported by
+	  Samuel Diaz Garcia.
+
+Wed Oct 26 10:59:21 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* parserInternals.c: fix a problem in some error case on Solaris
+	  when passed a NULL filename, pointed by Albert Chin.
+
+Tue Oct 25 14:34:58 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* HTMLparser.c: script HTML parser error fix, corrects bug #319715
+	* result/HTML/53867* test/HTML/53867.html: added test from Michael Day
+	  to the regression suite 
+
+Tue Oct 25 14:21:11 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* HTMLparser.c: typo fix from Michael Day
+
+Mon Oct 24 20:16:23 EDT 2005 Rob Richards <rrichards at ctindustries.net>
+
+	* tree.c: fix issue adding non-namespaced attributes in xmlAddChild(), 
+	  xmlAddNextSibling() and xmlAddPrevSibling() (bug #319108) - part 1.
+
+Sat Oct 22 10:00:41 HKT 2005 William Brack <wbrack at mmm.com.hk>
+
+	* parser.c: fixed second spot where CRLF split between chunks
+	  could cause trouble (bug #319279)
+	* gentest.py, testapi.c: fixed two problems involved with
+	  --with-minimum compilation (compilation errors with schematron
+	  and formal expressions tests)
+
+Fri Oct 21 10:50:14 EDT 2005 Rob Richards <rrichards at ctindustries.net>
+
+	* xmlsave.c: prevent output of fragment tags when serializing XHTML.
+
+Wed Oct 19 16:53:47 BST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlregexp.c: commiting a some fixes and debug done yesterday in
+	  the London airport.
+
+Thu Oct 20 12:54:23 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Removed creation of a temporary parser context
+	  during validation when processing xsi:type; this previously
+	  added a string to the dict of the schema - to assure thread
+	  safety, we don't want to modify a given schema during
+	  validation.
+
+Thu Oct 20 17:05:29 HKT 2005 William Brack <wbrack at mmm.com.hk>
+
+	* xmlwriter.c: fixed problem in xmlTextWriterVSprintf caused by
+	  misuse of vsnprintf
+	* configure.in, config.h.in: added a configuration check for
+	  va_copy and added a define for VA_COPY for xmlwriter.c fix
+	* parser.c: fixed problem with CRLF split between chunks (bug
+	  #319279) (fix provided by Brion Vibber)
+
+Wed Oct 19 18:49:52 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Fixed a potential memory leak in
+	  xmlSchemaCheckCSelectorXPath() when an internal error occurs.
+	  Fixed setting of ctxt->err to the given error code in
+	  the parsing error functions.
+	* pattern.c: Added internal xmlCompileIDCXPathPath() as a
+	  starting point for IDC XPath compilation; this and some other
+	  tiny changes fixes issues regarding whitespace in the
+	  expressions and IDC selector/field relevant restrictions of
+	  the subset of XPath. Fixed a missing blocking of attributes
+	  in xmlStreamPushInternal().
+
+Mon Oct 17 15:06:05 EDT 2005 Daniel Veillard <daniel at veillard.com>
+
+	* runtest.c: removed the error message
+	* relaxng.c xmlschemas.c: removed 2 instability warnings from function
+	  documentation
+	* include/libxml/schemasInternals.h: changed warning about API stability
+	* xmlregexp.c: trying to improve runtime execution of non-deterministic
+	  regexps and automata. Not fully finished but should be way better.
+
+Mon Oct 17 16:12:02 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c: Fixed a memory leak in
+	  xmlSchemaContentModelDump(). Added output of local types
+	  in xmlSchemaElementDump(). Tiny cosmetical changes to the
+	  dump output.
+
+Mon Oct 17 14:29:08 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* tree.c pattern.c: Silenced intel compiler warnings (reported
+	  by Kjartan Maraas, bug #318517).
+	* xmlschemas.c: The above changes in pattern.c revealed an
+	  inconsistency wrt IDCs: we now _only_ pop XPath states, if
+	  we really pushed them beforehand; this was previously not
+	  checked for the case when we discover an element node to be
+	  invalid wrt the content model.
+	  Fixed segfault in xmlSchemaGetEffectiveValueConstraint().
+
+Fri Oct 14 16:40:18 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* result/schemas/*.err: Adapted regression test results.
+
+Fri Oct 14 16:21:22 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+	
+	* xmlschemas.c: Fixed some identity-constraint issues:
+	  Restructured IDC node-tables
+	  Allowed IDCs to resolve also to nodes of complex type with
+	  simple content.
+	  Added check for keyrefs with references to keyrefs.
+	  IDC target-nodes were interferring with IDC node-tables,
+	  since they used one list of entries only. I separated this
+	  one big list into 3 lists: 1 for IDC node-table entries,
+	  1 for _duplicates_ of IDC node-table entries and 1 for
+	  IDC target-nodes. More code, but cleaner and it works at last.
+	  Keyrefs will fail to resolve to duplicate key/unique entries.
+	  I thought this was already working this way, but it didn't.
+	  The wording of the definition for [node table] in the spec
+	  can lead to a scenario, where keyrefs resolve perfectly, even
+	  if the relevant key-sequences of the referenced key/unique have
+	  duplicates in the subtree. Currently only Saxon 8.5.1 is
+	  dissallowing resolution to duplicate entries correctly - we
+	  will follow Saxon here.
+	  Removed some intel compiler warnings (reported by
+	  Kjartan Maraas, bug #318517).
+	* pattern.c: Fixed an IDC-XPath problem when resolving to
+	  attributes.	  
+
+Mon Oct 14 01:15:14 CEST 2005 Rob Richards <rrichards at ctindustries.net>
+	* nanohttp.c include/wsockcompat.h: applied patch from Kolja Nowak 
+	  to use getaddrinfo() if supported in Windows build (bug# 317431).
+
+Mon Oct 10 15:33:48 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* result/schemas/*: Adapted regression test results.
+
+Mon Oct 10 15:12:43 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* xmlschemas.c include/libxml/schemasInternals.h
+	  include/libxml/xmlerror.h: Initial implementation for
+	  redefinitions; this still misses checks for restrictions
+	  of the content model of complex types.
+	  Fixed default/fixed values for attributes (looks like they
+	  did not work in the last  releases).
+	  Completed constraints for attribute uses.
+	  Seperated attribute derivation from attribute constraints.
+	  Completed constraints for attribute group definitions.
+	  Disallowing <import>s of schemas in no target namespace if the
+	  importing schema is a chameleon schema. This contradicts
+	  the way Saxon, Xerces-J, XSV and IBM's SQC works, but the
+	  W3C XML Schema WG, thinks it is correct to dissalow such
+	  imports.
+	  Added cos-all-limited constraints.
+	  Restructured reference resolution to model groups and element
+	  declarations.
+	  Misc cleanup.
+
+Fri Oct  7 04:34:12 CEST 2005 Rob Richards <rrichards at ctindustries.net>
+
+	* schematron.c xmlregexp.c: remove warnings under Windows.
+
+Wed Sep 28 23:42:14 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* parser.c: applied patch from Massimo Morara fixing bug #317447
+	  about risk of invalid write in xmlStringLenDecodeEntities
+
+Tue Sep 27 11:20:57 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* error.c: Adrian Mouat pointed out redundancies in xmlReportError()
+
+Mon Sep 26 19:18:24 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlregexp.c: seems a test to avoid duplicate transition is 
+	  really needed at all times. Luka Por gave an example hitting
+	  this. Changed back the internal API.
+
+Thu Sep 22 13:14:07 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlreader.c: fixing leak in xmlTextReaderReadString() #316924
+
+Thu Sep 15 16:12:44 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* uri.c: more fixes to the behaviour of xmlBuildRelativeURI
+
+Thu Sep 15 15:08:21 CEST 2005 Daniel Veillard <daniel at veillard.com>
+
+	* xmlregexp.c: detect combinatory explosion and return with
+	  a runtime error in those case, c.f. #316338 though maybe we
+	  should not see such an explosion with that specific regexp,
+	  more checking needs to be done.
+
+Wed Sep 14 19:52:18 CEST 2005 Kasimier Buchcik <libxml2-cvs at cazic.net>
+
+	* include/libxml/schemasInternals.h: Added some comments for the
+	  struct fields.
+
+Wed Sep 14 13:24:27 HKT 2005 William Brack <wbrack at mmm.com.hk>
+
+	* uri.c: fixed problem when xmlBuildRelativeURI was given a
+	  blank path (bug 316224)
+
 Mon Sep 12 23:41:40 CEST 2005 Daniel Veillard <daniel at veillard.com>
 
 	* NEWS configure.in doc//*: release of 2.6.22 updated doc and

Modified: packages/libxml2/branches/upstream/current/HTMLparser.c
===================================================================
--- packages/libxml2/branches/upstream/current/HTMLparser.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/HTMLparser.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -2678,7 +2678,7 @@
                     break; /* while */
                 } else {
 		    htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
-				 "Element %s embbeds close tag\n",
+				 "Element %s embeds close tag\n",
 		                 ctxt->name, NULL);
 		}
             } else {
@@ -2701,6 +2701,7 @@
 	    }
 	    nbchar = 0;
 	}
+	GROW;
 	NEXTL(l);
 	cur = CUR_CHAR(l);
     }
@@ -4778,7 +4779,7 @@
 		}
 		break;
             case XML_PARSER_START_TAG: {
-	        const xmlChar *name, *oldname;
+	        const xmlChar *name;
 		int failed;
 		const htmlElemDesc * info;
 
@@ -4831,7 +4832,7 @@
 		    SKIP(2);
 		    if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
 			ctxt->sax->endElement(ctxt->userData, name);
-		    oldname = htmlnamePop(ctxt);
+		    htmlnamePop(ctxt);
 		    ctxt->instate = XML_PARSER_CONTENT;
 #ifdef DEBUG_PUSH
 		    xmlGenericError(xmlGenericErrorContext,
@@ -4852,7 +4853,7 @@
 		     */
 		    if (xmlStrEqual(name, ctxt->name)) { 
 			nodePop(ctxt);
-			oldname = htmlnamePop(ctxt);
+			htmlnamePop(ctxt);
 		    }    
 
 		    ctxt->instate = XML_PARSER_CONTENT;
@@ -4869,7 +4870,7 @@
 		if ((info != NULL) && (info->empty)) {
 		    if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
 			ctxt->sax->endElement(ctxt->userData, name);
-		    oldname = htmlnamePop(ctxt);
+		    htmlnamePop(ctxt);
 		}
 		ctxt->instate = XML_PARSER_CONTENT;
 #ifdef DEBUG_PUSH

Modified: packages/libxml2/branches/upstream/current/HTMLtree.c
===================================================================
--- packages/libxml2/branches/upstream/current/HTMLtree.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/HTMLtree.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -506,16 +506,17 @@
 }
 
 /**
- * htmlDocDumpMemory:
+ * htmlDocDumpMemoryFormat:
  * @cur:  the document
  * @mem:  OUT: the memory pointer
  * @size:  OUT: the memory length
+ * @format:  should formatting spaces been added
  *
  * Dump an HTML document in memory and return the xmlChar * and it's size.
  * It's up to the caller to free the memory.
  */
 void
-htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
+htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
     xmlOutputBufferPtr buf;
     xmlCharEncodingHandlerPtr handler = NULL;
     const char *encoding;
@@ -572,7 +573,8 @@
 	return;
     }
 
-    htmlDocContentDumpOutput(buf, cur, NULL);
+	htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
+
     xmlOutputBufferFlush(buf);
     if (buf->conv != NULL) {
 	*size = buf->conv->use;
@@ -584,7 +586,21 @@
     (void)xmlOutputBufferClose(buf);
 }
 
+/**
+ * htmlDocDumpMemory:
+ * @cur:  the document
+ * @mem:  OUT: the memory pointer
+ * @size:  OUT: the memory length
+ *
+ * Dump an HTML document in memory and return the xmlChar * and it's size.
+ * It's up to the caller to free the memory.
+ */
+void
+htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
+	htmlDocDumpMemoryFormat(cur, mem, size, 1);
+}
 
+
 /************************************************************************
  *									*
  *   		Dumping HTML tree content to an I/O output buffer	*

Modified: packages/libxml2/branches/upstream/current/Makefile.am
===================================================================
--- packages/libxml2/branches/upstream/current/Makefile.am	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/Makefile.am	2006-01-06 18:12:46 UTC (rev 501)
@@ -1070,7 +1070,7 @@
 	    LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
 	    export LD_LIBRARY_PATH; \
 	    echo "## XML Schemas datatypes Python based test suite" ; \
-	    echo "## It is normal to see 10 errors reported" ; \
+	    echo "## It is normal to see 11 errors reported" ; \
 	    $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
 	  fi)
 	@(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi)

Modified: packages/libxml2/branches/upstream/current/Makefile.in
===================================================================
--- packages/libxml2/branches/upstream/current/Makefile.in	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/Makefile.in	2006-01-06 18:12:46 UTC (rev 501)
@@ -2328,7 +2328,7 @@
 	    LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
 	    export LD_LIBRARY_PATH; \
 	    echo "## XML Schemas datatypes Python based test suite" ; \
-	    echo "## It is normal to see 10 errors reported" ; \
+	    echo "## It is normal to see 11 errors reported" ; \
 	    $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
 	  fi)
 	@(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi)

Modified: packages/libxml2/branches/upstream/current/NEWS
===================================================================
--- packages/libxml2/branches/upstream/current/NEWS	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/NEWS	2006-01-06 18:12:46 UTC (rev 501)
@@ -15,176 +15,216 @@
 to the CVS at 
 http://cvs.gnome.org/viewcvs/libxml2/
  code base.There is the list of public releases:
+2.6.23: Jan 5 2006:
+   - portability fixes: Windows (Rob Richards), getaddrinfo on Windows
+    (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas),
+    --with-minimum compilation fixes (William Brack), error case handling fix
+    on Solaris (Albert Chin), don't use 'list' as parameter name reported by
+    Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin),
+    MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones),
+  
+   - code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose
+    (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring
+    parsing code (Bjorn Reese)
+   - bug fixes: xmlBuildRelativeURI and empty path (William Brack),
+    combinatory explosion and performances in regexp code, leak in
+    xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo
+    Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik),
+    XPath pattern based evaluation bugs (DV & Kasimier),
+    xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in
+    xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of
+    vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF
+    split problem (William), issues with non-namespaced attributes in
+    xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
+    HTML parsing of script, Python must not output to stdout (Nic Ferrier),
+    exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+    totalDigits bug (Kasimier Buchcik), error handling when writing to an
+    xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
+    Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
+    XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier),
+    fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml
+    (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
+    runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
+    (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
+    compilation and build fixes (Michael Day), removed dependancies on
+    xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath
+    pattern based evaluation fixes (Kasimier)
+   - improvements: XSD Schemas redefinitions/restrictions (Kasimier
+    Buchcik), node copy checks and fix for attribute (Rob Richards), counted
+    transition bug in regexps, ctxt->standalone = -2 to indicate no
+    standalone attribute was found, add xmlSchemaSetParserStructuredErrors()
+    (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API
+    (Kasimier), handle gzipped HTTP resources (Gary Coady), add
+    htmlDocDumpMemoryFormat. (Rob Richards), 
+   - documentation: typo (Michael Day), libxml man page (Albert Chin), save
+    function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),
+  
+
+
 2.6.22: Sep 12 2005:
    - build fixes: compile without schematron (Stéphane Bidoul)
    - bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
-      CDATA push parser bug, xmlElemDump problem with XHTML1 doc, 
-      XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx,
-      fix some output formatting for meta element (Rob Richards),
-      script and style XHTML1 serialization (David Madore), Attribute
-      derivation fixups in XSD (Kasimier Buchcik), better IDC error
-      reports (Kasimier Buchcik)
-      
-   - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards),
-      add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements
-      preparing for derive (Kasimier Buchcik).
+    CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
+    XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
+    output formatting for meta element (Rob Richards), script and style
+    XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
+    (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)
+   - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
+    XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
+    derive (Kasimier Buchcik).
    - documentation: generation of gtk-doc like docs, integration with
-      devhelp.
+    devhelp.
 
 
 2.6.21: Sep 4 2005:
    - build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
-      convention problems on Windows (Marcus Boerger), cleanups based on
-      Linus' sparse tool, update of win32/configure.js (Rob Richards),
-      remove warnings on Windows(Marcus Boerger), compilation without SAX1,
-      detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew
-      W. Nosenko), compilation/link with threads and old gcc, compile
-      problem by C370 on Z/OS, 
+    convention problems on Windows (Marcus Boerger), cleanups based on Linus'
+    sparse tool, update of win32/configure.js (Rob Richards), remove warnings
+    on Windows(Marcus Boerger), compilation without SAX1, detection of the
+    Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko),
+    compilation/link with threads and old gcc, compile problem by C370 on
+    Z/OS,
    - bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
-      bug (Jiri Netolicky), XPath NaN compare bug (William Brack), 
-      htmlParseScript potential bug, Schemas regexp handling of spaces,
-      Base64 Schemas comparisons NIST passes, automata build error xsd:all,
-      xmlGetNodePath for namespaced attributes (Alexander Pohoyda),
-      xmlSchemas foreign namespaces handling, XML Schemas facet comparison
-      (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier
-      Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model
-      group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI 
-      composition (William), xs:anyType in Schemas (Kasimier), Python resolver
-      emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr
-      Clapa), trying to fix the file path/URI conversion, 
-      xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak
-      (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism
-      detection problem, XInclude bug, Schemas context type (Dean Hill),
-      validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces
-      (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug,
-      error in encoding handling, xmlGetLineNo fixes, bug on entities handling,
-      entity name extraction in error handling with XInclude, text nodes
-      in HTML body tags (Gary Coady), xml:id and IDness at the treee level
-      fixes, XPath streaming patterns bugs.
+    bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
+    htmlParseScript potential bug, Schemas regexp handling of spaces, Base64
+    Schemas comparisons NIST passes, automata build error xsd:all,
+    xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas
+    foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
+    Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
+    namespace ahndling in Schemas (Kasimier), empty model group in Schemas
+    (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+    xs:anyType in Schemas (Kasimier), Python resolver emmitting error
+    messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
+    fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
+    Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
+    serialization, streaming XPath, Schemas determinism detection problem,
+    XInclude bug, Schemas context type (Dean Hill), validation fix (Derek
+    Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas
+    type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
+    xmlGetLineNo fixes, bug on entities handling, entity name extraction in
+    error handling with XInclude, text nodes in HTML body tags (Gary Coady),
+    xml:id and IDness at the treee level fixes, XPath streaming patterns
+  bugs.
    - improvements: structured interfaces for schemas and RNG error reports
-      (Marcus Boerger), optimization of the char data inner loop parsing
-      (thanks to Behdad Esfahbod for the idea), schematron validation
-      though not finished yet, xmlSaveOption to omit XML declaration,
-      keyref match error reports (Kasimier), formal expression handling
-      code not plugged yet, more lax mode for the HTML parser, 
-      parser XML_PARSE_COMPACT option for text nodes allocation.
+    (Marcus Boerger), optimization of the char data inner loop parsing
+    (thanks to Behdad Esfahbod for the idea), schematron validation though
+    not finished yet, xmlSaveOption to omit XML declaration, keyref match
+    error reports (Kasimier), formal expression handling code not plugged
+    yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option
+    for text nodes allocation.
    - documentation: xmllint man page had --nonet duplicated
 
 
 2.6.20: Jul 10 2005:
-   -  build fixes: Windows build (Rob Richards), Mingw compilation (Igor
-       Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
-       andriy at google.com), use gcc weak references to pthread to avoid the
-       pthread dependancy on Linux, compilation problem (Steve Nairn),
-       compiling of subset (Morten Welinder), IPv6/ss_family compilation
-       (William Brack), compilation when disabling parts of the library,
-       standalone test distribution.
-       
-   -  bug fixes: bug in lang(), memory cleanup on errors (William Brack),
-       HTTP query strings (Aron Stansvik), memory leak in DTD (William),
-       integer overflow in XPath (William), nanoftp buffer size, pattern
-       "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe,
-       replaceNode patch (Brent Hendricks), CDATA with NULL content
-       (Mark Vakoc), xml:base fixup on XInclude (William), pattern
-       fixes (William), attribute bug in exclusive c14n (Aleksey Sanin),
-       xml:space and xml:lang with SAX2 (Rob Richards), namespace 
-       trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes
-       (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards),
-       Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards),
-       a small RelaxNG leak, HTML parsing in push mode bug (James Bursa),
-       failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks()
-       heuristic failure, duplicate attributes in DTD bug (William).
-       
-   -  improvements: lot of work on Schemas by Kasimier Buchcik both on 
-       conformance and streaming, Schemas validation messages (Kasimier
-       Buchcik, Matthew Burgess), namespace removal at the python level
-       (Brent Hendricks), Update to new Schemas regression tests from
-       W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation
-       of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
-       standalone test framework and programs, new DOM import APIs
-       xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
-       xmlDOMWrapRemoveNode(), extension of xmllint capabilities for
-       SAX and Schemas regression tests, xmlStopParser() available in
-       pull mode too, ienhancement to xmllint --shell namespaces support,
-       Windows port of the standalone testing tools (Kasimier and William),
-       xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug()
-       SAX Schemas APIs, Schemas xmlReader support.
-       
+   - build fixes: Windows build (Rob Richards), Mingw compilation (Igor
+    Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
+    andriy at google.com), use gcc weak references to pthread to avoid the
+    pthread dependancy on Linux, compilation problem (Steve Nairn), compiling
+    of subset (Morten Welinder), IPv6/ss_family compilation (William Brack),
+    compilation when disabling parts of the library, standalone test
+    distribution.
+   - bug fixes: bug in lang(), memory cleanup on errors (William Brack),
+    HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer
+    overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup
+    (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch
+    (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup
+    on XInclude (William), pattern fixes (William), attribute bug in
+    exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob
+    Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type
+    QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug
+    (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob
+    Richards), a small RelaxNG leak, HTML parsing in push mode bug (James
+    Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
+    areBlanks() heuristic failure, duplicate attributes in DTD bug
+  (William).
+   - improvements: lot of work on Schemas by Kasimier Buchcik both on
+    conformance and streaming, Schemas validation messages (Kasimier Buchcik,
+    Matthew Burgess), namespace removal at the python level (Brent
+    Hendricks), Update to new Schemas regression tests from W3C/Nist
+    (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of
+    xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
+    standalone test framework and programs, new DOM import APIs
+    xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
+    xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and
+    Schemas regression tests, xmlStopParser() available in pull mode too,
+    ienhancement to xmllint --shell namespaces support, Windows port of the
+    standalone testing tools (Kasimier and William),
+    xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX
+    Schemas APIs, Schemas xmlReader support.
 
 
 2.6.19: Apr 02 2005:
-   -  build fixes: drop .la from RPMs, --with-minimum build fix (William
-       Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with
-       AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction
-       code on Linux/ELF/gcc4
-   -  bug fixes: schemas type decimal fixups (William Brack), xmmlint return
-       code (Gerry Murphy), small schemas fixes (Matthew Burgess and
-       GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey
-       Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute
-       validation (Kasimier), Prop related functions and xmlNewNodeEatName
-       (Rob Richards), HTML serialization of name attribute on a elements,
-       Python error handlers leaks and improvement (Brent Hendricks), 
-       uninitialized variable in encoding code, Relax-NG validation bug,
-       potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and
-       xmlParseDoc signatures, switched back to assuming UTF-8 in case 
-       no encoding is given at serialization time
-   -  improvements: lot of work on Schemas by Kasimier Buchcik on facets
-       checking and also mixed handling.
+   - build fixes: drop .la from RPMs, --with-minimum build fix (William
+    Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX
+    5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on
+    Linux/ELF/gcc4
+   - bug fixes: schemas type decimal fixups (William Brack), xmmlint return
+    code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY
+    Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin),
+    segfault in Schemas (Kasimier Buchcik), Schemas attribute validation
+    (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards),
+    HTML serialization of name attribute on a elements, Python error handlers
+    leaks and improvement (Brent Hendricks), uninitialized variable in
+    encoding code, Relax-NG validation bug, potential crash if
+    gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures,
+    switched back to assuming UTF-8 in case no encoding is given at
+    serialization time
+   - improvements: lot of work on Schemas by Kasimier Buchcik on facets
+    checking and also mixed handling.
    - 
 
 
 2.6.18: Mar 13 2005:
-   -  build fixes: warnings (Peter Breitenlohner), testapi.c generation, 
-       Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
-       some gcc4 fixes, HP-UX portability fixes (Rick Jones).
-   -  bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
-       xmlreader stopping on non-fatal errors, thread support for dictionnaries
-       reference counting (Gary Coady), internal subset and push problem, 
-       URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python
-       paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, 
-       xmlSetNsProp fix (Mike Hommey), warning should not count as error
-       (William Brack), xmlCreatePushParser empty chunk, XInclude parser
-       flags (William), cleanup FTP and HTTP code to reuse the uri parsing
-       and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards),
-       XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards),
-       multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier),
-       Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4
-       on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type
-       fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).
-   -  improvement: speedup parsing comments and DTDs, dictionnary support for
-       hash tables, Schemas Identity constraints (Kasimier), streaming XPath
-       subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
-       values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
-       Stansvik), 
-   -  Documentation: Wiki support (Joel Reed)
+   - build fixes: warnings (Peter Breitenlohner), testapi.c generation,
+    Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
+    some gcc4 fixes, HP-UX portability fixes (Rick Jones).
+   - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
+    xmlreader stopping on non-fatal errors, thread support for dictionnaries
+    reference counting (Gary Coady), internal subset and push problem, URL
+    saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
+    fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
+    (Mike Hommey), warning should not count as error (William Brack),
+    xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup
+    FTP and HTTP code to reuse the uri parsing and IPv6 (William),
+    xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being
+    empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows
+    (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent
+    Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
+    (Rob Richards), Schemas decimal type fixes (William Brack),
+    xmlByteConsumed static buffer (Ben Maurer).
+   - improvement: speedup parsing comments and DTDs, dictionnary support for
+    hash tables, Schemas Identity constraints (Kasimier), streaming XPath
+    subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
+    values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
+  Stansvik),
+   - Documentation: Wiki support (Joel Reed)
 
 
-
 2.6.17: Jan 16 2005:
-   - build fixes: Windows, warnings removal (William Brack), 
-      maintainer-clean dependency(William), build in a different directory
-      (William), fixing --with-minimum configure build (William), BeOS
-      build (Marcin Konicki), Python-2.4 detection (William), compilation
-      on AIX (Dan McNichol)
+   - build fixes: Windows, warnings removal (William Brack),
+    maintainer-clean dependency(William), build in a different directory
+    (William), fixing --with-minimum configure build (William), BeOS build
+    (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
+    McNichol)
    - bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile()
-      to use the catalog(s), loop on output (William Brack), XPath memory leak,
-      ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
-      warning not using error callback (William), xmlStopParser bug (William),
-      UTF-16 with BOM on DTDs (William), namespace bug on empty elements
-      in push mode (Rob Richards), line and col computations fixups (Aleksey
-      Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
-      patterns with too many steps, bug in RNG choice optimization, line
-      number sometimes missing.
-      
-   - improvements: XSD Schemas (Kasimier Buchcik), python generator (William),
-      xmlUTF8Strpos speedup (William), unicode Python strings (William),
-      XSD error reports (Kasimier Buchcik), Python __str__ call serialize().
-      
-   - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber
-      for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs
-      (mostly Joel Reed), error extraction API from regexps, new XMLSave
-      option for format (Phil Shafer)
-   - documentation: site improvement (John Fleck), FAQ entries (William).
+    to use the catalog(s), loop on output (William Brack), XPath memory leak,
+    ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
+    warning not using error callback (William), xmlStopParser bug (William),
+    UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
+    push mode (Rob Richards), line and col computations fixups (Aleksey
+    Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
+    patterns with too many steps, bug in RNG choice optimization, line number
+    sometimes missing.
+   - improvements: XSD Schemas (Kasimier Buchcik), python generator
+    (William), xmlUTF8Strpos speedup (William), unicode Python strings
+    (William), XSD error reports (Kasimier Buchcik), Python __str__ call
+    serialize().
+   - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for
+    the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel
+    Reed), error extraction API from regexps, new XMLSave option for format
+    (Phil Shafer)
+   - documentation: site improvement (John Fleck), FAQ entries
+  (William).
 
 
 2.6.16: Nov 10 2004:
@@ -197,7 +237,7 @@
    - documentation: fix to xmllint man page, some API function descritpion
     were updated.
    - improvements: DTD validation APIs provided at the Python level (Brent
-    Hendricks) 
+    Hendricks)
 
 
 2.6.15: Oct 27 2004:

Modified: packages/libxml2/branches/upstream/current/SAX2.c
===================================================================
--- packages/libxml2/branches/upstream/current/SAX2.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/SAX2.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -2233,9 +2233,13 @@
      */
     if ((URI != NULL) && (ret->ns == NULL)) {
         ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
+	if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
+	    ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix);
+	}
 	if (ret->ns == NULL) {
 	    ns = xmlNewNs(ret, NULL, prefix);
 	    if (ns == NULL) {
+
 	        xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
 		return;
 	    }

Modified: packages/libxml2/branches/upstream/current/c14n.c
===================================================================
--- packages/libxml2/branches/upstream/current/c14n.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/c14n.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -802,7 +802,7 @@
 	    if(xmlStrlen(attr->ns->prefix) == 0) {
 		has_empty_ns = 1;
 	    }
-	} else if(attr->ns == NULL) {
+	} else if((attr->ns != NULL) && (xmlStrlen(attr->ns->prefix) == 0) && (xmlStrlen(attr->ns->href) == 0)) {
 	    has_visibly_utilized_empty_ns = 1;
 	}
     }

Modified: packages/libxml2/branches/upstream/current/config.h.in
===================================================================
--- packages/libxml2/branches/upstream/current/config.h.in	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/config.h.in	2006-01-06 18:12:46 UTC (rev 501)
@@ -97,24 +97,12 @@
 /* Define if history library is there (-lhistory) */
 #undef HAVE_LIBHISTORY
 
-/* Define to 1 if you have the `inet' library (-linet). */
-#undef HAVE_LIBINET
-
-/* Define to 1 if you have the `net' library (-lnet). */
-#undef HAVE_LIBNET
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
 /* Define if pthread library is there (-lpthread) */
 #undef HAVE_LIBPTHREAD
 
 /* Define if readline library is there (-lreadline) */
 #undef HAVE_LIBREADLINE
 
-/* Define to 1 if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
 /* Have compression library */
 #undef HAVE_LIBZ
 
@@ -237,6 +225,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Whether va_copy() is available */
+#undef HAVE_VA_COPY
+
 /* Define to 1 if you have the `vfprintf' function. */
 #undef HAVE_VFPRINTF
 
@@ -252,6 +243,9 @@
 /* Define to 1 if you have the `_stat' function. */
 #undef HAVE__STAT
 
+/* Whether __va_copy() is available */
+#undef HAVE___VA_COPY
+
 /* Name of package */
 #undef PACKAGE
 

Modified: packages/libxml2/branches/upstream/current/configure
===================================================================
--- packages/libxml2/branches/upstream/current/configure	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/configure	2006-01-06 18:12:46 UTC (rev 501)
@@ -1618,7 +1618,7 @@
 
 LIBXML_MAJOR_VERSION=2
 LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=22
+LIBXML_MICRO_VERSION=23
 LIBXML_MICRO_VERSION_SUFFIX=
 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
@@ -19935,9 +19935,7 @@
 
 
 
-# AM_MAINTAINER_MODE
 
-
 _cppflags="${CPPFLAGS}"
 _ldflags="${LDFLAGS}"
 
@@ -26028,58 +26026,20 @@
 done
 
 
-echo "$as_me:$LINENO: checking for gethostent" >&5
-echo $ECHO_N "checking for gethostent... $ECHO_C" >&6
-if test "${ac_cv_func_gethostent+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+echo "$as_me:$LINENO: checking for va_copy" >&5
+echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define gethostent to an innocuous variant, in case <limits.h> declares gethostent.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define gethostent innocuous_gethostent
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gethostent (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef gethostent
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char gethostent ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_gethostent) || defined (__stub___gethostent)
-choke me
-#else
-char (*f) () = gethostent;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+#include <stdarg.h>
+va_list ap1,ap2;
 int
 main ()
 {
-return f != gethostent;
+va_copy(ap1,ap2);
   ;
   return 0;
 }
@@ -26106,47 +26066,38 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_gethostent=yes
+  have_va_copy=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_gethostent=no
+have_va_copy=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_gethostent" >&5
-echo "${ECHO_T}$ac_cv_func_gethostent" >&6
-if test $ac_cv_func_gethostent = yes; then
-  :
-else
+echo "$as_me:$LINENO: result: $have_va_copy" >&5
+echo "${ECHO_T}$have_va_copy" >&6
+if test x"$have_va_copy" = x"yes"; then
 
-echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5
-echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6
-if test "${ac_cv_lib_nsl_gethostent+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VA_COPY 1
+_ACEOF
+
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+    echo "$as_me:$LINENO: checking for __va_copy" >&5
+echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char gethostent ();
+#include <stdarg.h>
+    va_list ap1,ap2;
 int
 main ()
 {
-gethostent ();
+__va_copy(ap1,ap2);
   ;
   return 0;
 }
@@ -26173,82 +26124,51 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_nsl_gethostent=yes
+  have___va_copy=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_nsl_gethostent=no
+have___va_copy=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostent" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_gethostent" >&6
-if test $ac_cv_lib_nsl_gethostent = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
+    echo "$as_me:$LINENO: result: $have___va_copy" >&5
+echo "${ECHO_T}$have___va_copy" >&6
+    if test x"$have___va_copy" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___VA_COPY 1
 _ACEOF
 
-  LIBS="-lnsl $LIBS"
-
+    fi
 fi
 
-fi
-
-echo "$as_me:$LINENO: checking for setsockopt" >&5
-echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
-if test "${ac_cv_func_setsockopt+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing gethostent" >&5
+echo $ECHO_N "checking for library containing gethostent... $ECHO_C" >&6
+if test "${ac_cv_search_gethostent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gethostent=no
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define setsockopt innocuous_setsockopt
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char setsockopt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef setsockopt
-
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char setsockopt ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
-choke me
-#else
-char (*f) () = setsockopt;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+char gethostent ();
 int
 main ()
 {
-return f != setsockopt;
+gethostent ();
   ;
   return 0;
 }
@@ -26275,30 +26195,18 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_setsockopt=yes
+  ac_cv_search_gethostent="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_setsockopt=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
-echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
-if test $ac_cv_func_setsockopt = yes; then
-  :
-else
-
-echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
-echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
-if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+if test "$ac_cv_search_gethostent" = no; then
+  for ac_lib in nsl; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -26311,11 +26219,11 @@
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char setsockopt ();
+char gethostent ();
 int
 main ()
 {
-setsockopt ();
+gethostent ();
   ;
   return 0;
 }
@@ -26342,82 +26250,51 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_socket_setsockopt=yes
+  ac_cv_search_gethostent="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_socket_setsockopt=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  done
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
-if test $ac_cv_lib_socket_setsockopt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
-
-  LIBS="-lsocket $LIBS"
-
+LIBS=$ac_func_search_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_search_gethostent" >&5
+echo "${ECHO_T}$ac_cv_search_gethostent" >&6
+if test "$ac_cv_search_gethostent" != no; then
+  test "$ac_cv_search_gethostent" = "none required" || LIBS="$ac_cv_search_gethostent $LIBS"
 
 fi
 
-echo "$as_me:$LINENO: checking for setsockopt" >&5
-echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
-if test "${ac_cv_func_setsockopt+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing setsockopt" >&5
+echo $ECHO_N "checking for library containing setsockopt... $ECHO_C" >&6
+if test "${ac_cv_search_setsockopt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_setsockopt=no
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define setsockopt innocuous_setsockopt
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char setsockopt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef setsockopt
-
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char setsockopt ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
-choke me
-#else
-char (*f) () = setsockopt;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
 int
 main ()
 {
-return f != setsockopt;
+setsockopt ();
   ;
   return 0;
 }
@@ -26444,30 +26321,18 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_setsockopt=yes
+  ac_cv_search_setsockopt="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_setsockopt=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
-echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
-if test $ac_cv_func_setsockopt = yes; then
-  :
-else
-
-echo "$as_me:$LINENO: checking for setsockopt in -lnet" >&5
-echo $ECHO_N "checking for setsockopt in -lnet... $ECHO_C" >&6
-if test "${ac_cv_lib_net_setsockopt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnet  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+if test "$ac_cv_search_setsockopt" = no; then
+  for ac_lib in socket net; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -26511,82 +26376,51 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_net_setsockopt=yes
+  ac_cv_search_setsockopt="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_net_setsockopt=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  done
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_net_setsockopt" >&5
-echo "${ECHO_T}$ac_cv_lib_net_setsockopt" >&6
-if test $ac_cv_lib_net_setsockopt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNET 1
-_ACEOF
-
-  LIBS="-lnet $LIBS"
-
+LIBS=$ac_func_search_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_search_setsockopt" >&6
+if test "$ac_cv_search_setsockopt" != no; then
+  test "$ac_cv_search_setsockopt" = "none required" || LIBS="$ac_cv_search_setsockopt $LIBS"
 
 fi
 
-echo "$as_me:$LINENO: checking for connect" >&5
-echo $ECHO_N "checking for connect... $ECHO_C" >&6
-if test "${ac_cv_func_connect+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing connect" >&5
+echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6
+if test "${ac_cv_search_connect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_connect=no
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define connect to an innocuous variant, in case <limits.h> declares connect.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define connect innocuous_connect
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char connect (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef connect
-
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char connect ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_connect) || defined (__stub___connect)
-choke me
-#else
-char (*f) () = connect;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
 int
 main ()
 {
-return f != connect;
+connect ();
   ;
   return 0;
 }
@@ -26613,30 +26447,18 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_connect=yes
+  ac_cv_search_connect="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_connect=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
-echo "${ECHO_T}$ac_cv_func_connect" >&6
-if test $ac_cv_func_connect = yes; then
-  :
-else
-
-echo "$as_me:$LINENO: checking for connect in -linet" >&5
-echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6
-if test "${ac_cv_lib_inet_connect+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-linet  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+if test "$ac_cv_search_connect" = no; then
+  for ac_lib in inet; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -26680,27 +26502,23 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_inet_connect=yes
+  ac_cv_search_connect="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_inet_connect=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  done
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_inet_connect" >&5
-echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6
-if test $ac_cv_lib_inet_connect = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINET 1
-_ACEOF
-
-  LIBS="-linet $LIBS"
-
+LIBS=$ac_func_search_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5
+echo "${ECHO_T}$ac_cv_search_connect" >&6
+if test "$ac_cv_search_connect" != no; then
+  test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS"
 
 fi
 
@@ -26708,7 +26526,7 @@
 echo "$as_me:$LINENO: checking for type of socket length (socklen_t)" >&5
 echo $ECHO_N "checking for type of socket length (socklen_t)... $ECHO_C" >&6
 cat > conftest.$ac_ext <<EOF
-#line 26711 "configure"
+#line 26529 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -26719,7 +26537,7 @@
 (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:26722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:26540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
   rm -rf conftest*
 
   echo "$as_me:$LINENO: result: socklen_t *" >&5
@@ -26731,7 +26549,7 @@
   rm -rf conftest*
 
   cat > conftest.$ac_ext <<EOF
-#line 26734 "configure"
+#line 26552 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -26742,7 +26560,7 @@
 (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:26745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:26563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
   rm -rf conftest*
 
     echo "$as_me:$LINENO: result: size_t *" >&5
@@ -26754,7 +26572,7 @@
   rm -rf conftest*
 
     cat > conftest.$ac_ext <<EOF
-#line 26757 "configure"
+#line 26575 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -26765,7 +26583,7 @@
 (void)getsockopt (1, 1, 1, NULL, (int *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:26768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:26586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
   rm -rf conftest*
 
       echo "$as_me:$LINENO: result: int *" >&5
@@ -27529,7 +27347,7 @@
 
 if test "${GCC}" != "yes" ; then
     case "${host}" in
-          *-*-hpux* )
+          hppa*-*-hpux* )
 	       CFLAGS="${CFLAGS} -Wp,-H30000"
 	       ;;
           *-dec-osf* )
@@ -27777,8 +27595,101 @@
 
   ;;
   *)
-  MODULE_EXTENSION=".so"
-  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+  echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  libxml_have_shl_load=yes
+else
+
+    echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -27844,18 +27755,105 @@
 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
 if test $ac_cv_lib_dld_shl_load = yes; then
 
-    WITH_MODULES=1
-    MODULE_PLATFORM_LIBS="-ldld"
+      MODULE_PLATFORM_LIBS="-ldld"
+      libxml_have_shl_load=yes
+else
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHLLOAD
+      echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
 fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  libxml_have_dlopen=yes
+else
 
-
-  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+        echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -27921,16 +27919,44 @@
 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
 if test $ac_cv_lib_dl_dlopen = yes; then
 
+          MODULE_PLATFORM_LIBS="-ldl"
+          libxml_have_dlopen=yes
+fi
+
+fi
+
+fi
+
+fi
+
+
+  if test "${libxml_have_shl_load}" = "yes"; then
+    MODULE_EXTENSION=".sl"
     WITH_MODULES=1
-    MODULE_PLATFORM_LIBS="-ldl"
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_DLOPEN
+#define HAVE_SHLLOAD
 _ACEOF
 
+  fi
 
-fi
+  if test "${libxml_have_dlopen}" = "yes"; then
+    case "${host}" in
+      *-*-hpux* )
+	MODULE_EXTENSION=".sl"
+	;;
+      * )
+	MODULE_EXTENSION=".so"
+	;;
+    esac
 
+    WITH_MODULES=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DLOPEN
+_ACEOF
+
+  fi
  ;;
  esac
 fi
@@ -31039,3 +31065,4 @@
 
 
 chmod +x xml2-config python/setup.py
+echo Done configuring

Modified: packages/libxml2/branches/upstream/current/configure.in
===================================================================
--- packages/libxml2/branches/upstream/current/configure.in	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/configure.in	2006-01-06 18:12:46 UTC (rev 501)
@@ -5,7 +5,7 @@
 
 LIBXML_MAJOR_VERSION=2
 LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=22
+LIBXML_MICRO_VERSION=23
 LIBXML_MICRO_VERSION_SUFFIX=
 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
@@ -50,8 +50,6 @@
 AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 
-# AM_MAINTAINER_MODE
-
 dnl
 dnl We process the AC_ARG_WITH first so that later we can modify
 dnl some of them to try to prevent impossible combinations.  This
@@ -432,11 +430,31 @@
 AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
                NEED_TRIO=1)
 
+dnl Checking for va_copy availability
+AC_MSG_CHECKING([for va_copy])
+AC_TRY_LINK([#include <stdarg.h>
+va_list ap1,ap2;], [va_copy(ap1,ap2);],
+have_va_copy=yes,
+have_va_copy=no)
+AC_MSG_RESULT($have_va_copy)
+if test x"$have_va_copy" = x"yes"; then
+    AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
+else
+    AC_MSG_CHECKING([for __va_copy])
+    AC_TRY_LINK([#include <stdarg.h>
+    va_list ap1,ap2;], [__va_copy(ap1,ap2);],
+    have___va_copy=yes,
+    have___va_copy=no)
+    AC_MSG_RESULT($have___va_copy)
+    if test x"$have___va_copy" = x"yes"; then
+        AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
+    fi
+fi
+
 dnl Checks for inet libraries:
-AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
-AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
-AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(net, setsockopt))
-AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))
+AC_SEARCH_LIBS(gethostent, [nsl])
+AC_SEARCH_LIBS(setsockopt, [socket net])
+AC_SEARCH_LIBS(connect, [inet])
 
 dnl Determine what socket length (socklen_t) data type is
 AC_MSG_CHECKING([for type of socket length (socklen_t)])
@@ -569,7 +587,7 @@
 dnl
 if test "${GCC}" != "yes" ; then
     case "${host}" in
-          *-*-hpux* )
+          hppa*-*-hpux* )
 	       CFLAGS="${CFLAGS} -Wp,-H30000"
 	       ;;
           *-dec-osf* )
@@ -703,18 +721,34 @@
   ])
   ;;
   *)
-  MODULE_EXTENSION=".so"
-  AC_CHECK_LIB(dld, shl_load, [
+  AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [
+    AC_CHECK_LIB(dld, shl_load, [
+      MODULE_PLATFORM_LIBS="-ldld"
+      libxml_have_shl_load=yes], [
+      AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [
+        AC_CHECK_LIB(dl, dlopen, [
+          MODULE_PLATFORM_LIBS="-ldl"
+          libxml_have_dlopen=yes])])])])
+
+  if test "${libxml_have_shl_load}" = "yes"; then
+    MODULE_EXTENSION=".sl"
     WITH_MODULES=1
-    MODULE_PLATFORM_LIBS="-ldld"
     AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
-  ])
+  fi
  
-  AC_CHECK_LIB(dl, dlopen, [
+  if test "${libxml_have_dlopen}" = "yes"; then
+    case "${host}" in
+      *-*-hpux* )
+	MODULE_EXTENSION=".sl"
+	;;
+      * )
+	MODULE_EXTENSION=".so"
+	;;
+    esac
+
     WITH_MODULES=1
-    MODULE_PLATFORM_LIBS="-ldl"
     AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
-  ])
+  fi
  ;;
  esac
 fi
@@ -1320,3 +1354,4 @@
 AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py)
 
 chmod +x xml2-config python/setup.py
+echo Done configuring

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk0.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk0.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk0.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -73,7 +73,9 @@
 </dd><dt>Activation</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>Actually</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
 </dd><dt>Add</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
 <a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
 <a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
@@ -96,7 +98,9 @@
 <a href="html/libxml-globals.html#xmlCleanupGlobals">xmlCleanupGlobals</a><br />
 <a href="html/libxml-globals.html#xmlInitGlobals">xmlInitGlobals</a><br />
 </dd><dt>AegeanNumbers</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsAegeanNumbers">xmlUCSIsAegeanNumbers</a><br />
-</dd><dt>All</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+</dd><dt>All</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
 <a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
 <a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
@@ -203,6 +207,7 @@
 <a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
 <a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
 </dd><dt>Base</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
 </dd><dt>BaseChar</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
 <a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
@@ -230,6 +235,7 @@
 </dd><dt>Both</dt><dd><a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>BoxDrawing</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a><br />
 </dd><dt>BraillePatterns</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a><br />
 </dd><dt>Brzozowski</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk1.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk1.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk1.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -301,6 +301,7 @@
 <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
 </dd><dt>Correct</dt><dd><a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
 <a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+</dd><dt>Could</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>Count</dt><dd><a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br />
 </dd><dt>Creates</dt><dd><a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk10.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk10.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk10.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -55,6 +55,7 @@
 <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
 <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
 </dd><dt>above</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
 </dd><dt>absent</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br />
@@ -106,6 +107,7 @@
 </dd><dt>account</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
 </dd><dt>act</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>activate</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
 </dd><dt>activated</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
 <a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
@@ -119,6 +121,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>activation</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
 </dd><dt>acts</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
@@ -162,6 +165,7 @@
 <a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
@@ -196,6 +200,7 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
 </dd><dt>additional</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>additionally</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>address</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
 <a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
 </dd><dt>adds</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
@@ -362,6 +367,7 @@
 <a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
@@ -415,7 +421,6 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
-<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
 <a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
 <a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
 <a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
@@ -525,11 +530,16 @@
 </dd><dt>atomic</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
 <a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
 </dd><dt>attached</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
-</dd><dt>attr</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+</dd><dt>attr</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
 <a href="html/libxml-tree.html#_xmlID">_xmlID</a><br />
 <a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br />
+</dd><dt>attribute-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>attribute-list</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+</dd><dt>attribute-node</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+</dd><dt>attribute-nodes</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>attributeFormDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br />
 </dd><dt>augmented</dt><dd><a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
 <a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
@@ -546,8 +556,11 @@
 </dd><dt>autoclose</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
 </dd><dt>autoclosed</dt><dd><a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
 </dd><dt>autogeneration</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
-</dd><dt>automatically</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>automatically</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
 <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+</dd><dt>automaton</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>autoreference</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
 </dd><dt>avoiding</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk11.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk11.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk11.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -58,10 +58,6 @@
 <a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
 <a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
 <a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
@@ -96,6 +92,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
@@ -194,7 +191,6 @@
 <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
 </dd><dt>bracket</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
 </dd><dt>branch</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
 </dd><dt>break</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
@@ -210,6 +206,7 @@
 <a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -264,7 +261,8 @@
 <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
-</dd><dt>built-in</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+</dd><dt>built-in</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk12.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk12.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk12.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -37,7 +37,8 @@
 <a href="APIchunk27.html">w-w</a>
 <a href="APIchunk28.html">x-x</a>
 <a href="APIchunk29.html">y-z</a>
-</h2><h2>Letter c:</h2><dl><dt>calculates</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
+</h2><h2>Letter c:</h2><dl><dt>calculated</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+</dd><dt>calculates</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
 </dd><dt>calling</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
 <a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
@@ -51,7 +52,6 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
 </dd><dt>calls</dt><dd><a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
 <a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
 </dd><dt>came</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
 </dd><dt>cannot</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
@@ -121,6 +121,8 @@
 <a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
 </dd><dt>category</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCat">xmlUCSIsCat</a><br />
 </dd><dt>cause</dt><dd><a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+</dd><dt>cdata-section-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>ceiling</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
 </dd><dt>certainly</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
 </dd><dt>chained</dt><dd><a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />
@@ -128,10 +130,8 @@
 <a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
 <a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
-<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
 <a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
 <a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
 <a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
@@ -318,6 +318,7 @@
 </dd><dt>combining</dt><dd><a href="html/libxml-parserInternals.html#IS_COMBINING_CH">IS_COMBINING_CH</a><br />
 </dd><dt>come</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>coment</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br />
 </dd><dt>comes</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
 <a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
@@ -341,6 +342,8 @@
 <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br />
 <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+</dd><dt>comment-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>comments</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
@@ -415,6 +418,9 @@
 <a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
 <a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
 <a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
 <a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
 <a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
 <a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
@@ -451,6 +457,7 @@
 <a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
 </dd><dt>complex</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>complexType</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a><br />
@@ -459,6 +466,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
 </dd><dt>complicated</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>component</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>components</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
 </dd><dt>compound</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
 <a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
@@ -580,7 +588,9 @@
 </dd><dt>consist</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
 </dd><dt>constant</dt><dd><a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
 <a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
-</dd><dt>constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+</dd><dt>constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaWildcardNs">_xmlSchemaWildcardNs</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
 <a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
@@ -644,7 +654,8 @@
 <a href="html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
-</dd><dt>contains</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>contains</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
 <a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
 <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
@@ -693,6 +704,7 @@
 <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
 </dd><dt>continuing</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>contraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>contrary</dt><dd><a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
 <a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
 </dd><dt>control</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
@@ -743,6 +755,7 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
 </dd><dt>converter</dt><dd><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -782,6 +795,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 <a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
 </dd><dt>count</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
@@ -807,7 +821,6 @@
 <a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
 <a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
 <a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
-<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
 <a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
 </dd><dt>creates</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
 <a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
@@ -850,7 +863,6 @@
 <a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
 <a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
 </dd><dt>custom</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk13.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk13.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk13.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -44,6 +44,8 @@
 </dd><dt>day:minute</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
 </dd><dt>de-coupled</dt><dd><a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
 </dd><dt>deactivated</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>deallocate</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
 <a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
@@ -112,7 +114,6 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
 </dd><dt>decimal</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
 </dd><dt>decl</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
-<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
 <a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
 <a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
 <a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
@@ -212,6 +213,8 @@
 <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
 <a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>defs</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>delayed</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
@@ -248,18 +251,17 @@
 <a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
 </dd><dt>des</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
-<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>desactivated</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
-<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>descendant</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
 </dd><dt>descendant-or-self</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
 </dd><dt>descendants</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
-</dd><dt>described</dt><dd><a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+</dd><dt>described</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
 <a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
 <a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
 <a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
@@ -350,7 +352,6 @@
 <a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
 </dd><dt>detection</dt><dd><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
 <a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
 <a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
@@ -378,6 +379,7 @@
 <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>dictionnary</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
 <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
@@ -586,9 +588,7 @@
 </dd><dt>duplicates</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
 </dd><dt>duration</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
 </dd><dt>during</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
 </dd><dt>dynamic</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
 </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk14.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk14.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk14.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -70,9 +70,12 @@
 <a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
 </dd><dt>elem</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
-</dd><dt>element-</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>element-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
 </dd><dt>element-node</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 </dd><dt>element-nodes</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>elementFormDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a><br />
 </dd><dt>elementdecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
@@ -256,6 +259,35 @@
 <a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
 <a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
 <a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+</dd><dt>errors</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandlerV1">_xmlSAXHandlerV1</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>errror</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
 </dd><dt>escape</dt><dd><a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
 <a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
@@ -277,7 +309,8 @@
 <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
 </dd><dt>especially</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
 </dd><dt>established</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
-</dd><dt>etc</dt><dd><a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+</dd><dt>etc</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
 <a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
 <a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
 </dd><dt>evaluate</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
@@ -309,11 +342,7 @@
 <a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
 <a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
-</dd><dt>event</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 </dd><dt>events</dt><dd><a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 </dd><dt>ever</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
 </dd><dt>everywhere</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
 <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
@@ -375,6 +404,7 @@
 <a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>experimental</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk15.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk15.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk15.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -55,6 +55,7 @@
 </dd><dt>facets</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
 </dd><dt>facility</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
 <a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br />
@@ -102,7 +103,6 @@
 <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
 </dd><dt>far</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 <a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
 </dd><dt>fashion</dt><dd><a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
 </dd><dt>fast</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
 </dd><dt>faster</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
@@ -118,6 +118,8 @@
 </dd><dt>fed</dt><dd><a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
 <a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>fetch</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
 <a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br />
 <a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
@@ -202,7 +204,8 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
 </dd><dt>flagged</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
 <a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
-</dd><dt>flags</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>flags</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
 <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
@@ -222,9 +225,6 @@
 <a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
 </dd><dt>floor</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
 </dd><dt>flow</dt><dd><a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 </dd><dt>flushes</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br />
 </dd><dt>follow</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
@@ -285,6 +285,7 @@
 <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
 <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
 </dd><dt>formatting</dt><dd><a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
@@ -307,7 +308,6 @@
 <a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
 <a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
 <a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
-</dd><dt>forward</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 </dd><dt>fptr</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
 </dd><dt>fragment</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
 <a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
@@ -381,10 +381,8 @@
 <a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
 <a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
 <a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
 <a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
@@ -396,7 +394,6 @@
 <a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
 <a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
 <a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
-</dd><dt>future</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
 </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
 <a href="APIchunk1.html">C-C</a>
 <a href="APIchunk2.html">D-E</a>

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk16.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk16.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk16.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -161,12 +161,13 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
 </dd><dt>greater-than</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
-</dd><dt>group</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+</dd><dt>group</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a><br />
-<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 <a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
@@ -275,8 +276,6 @@
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
 </dd><dt>highly</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
-<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
 </dd><dt>hold</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
 <a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
 <a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk17.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk17.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk17.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -40,6 +40,8 @@
 </h2><h2>Letter i:</h2><dl><dt>iconv</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a><br />
 <a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br />
 </dd><dt>identify</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>identity-constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>ignorable</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
 <a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
 <a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
@@ -130,6 +132,7 @@
 <a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
 <a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
 <a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+</dd><dt>incl</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>include</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NODE">XINCLUDE_NODE</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
@@ -217,6 +220,7 @@
 <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>indicates</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br />
@@ -288,7 +292,6 @@
 <a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
 <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
 </dd><dt>informations</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
@@ -313,13 +316,12 @@
 <a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
 <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
 <a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
 </dd><dt>informative</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
 </dd><dt>infos</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 </dd><dt>inherited</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
 <a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
@@ -327,6 +329,7 @@
 </dd><dt>inherits</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
 <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
 </dd><dt>initial</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
 <a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br />
 <a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br />
 <a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
@@ -442,8 +445,6 @@
 <a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
 <a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
-<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
 </dd><dt>interfaces</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a><br />
@@ -463,7 +464,6 @@
 <a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
 <a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
 <a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
 </dd><dt>interned</dt><dd><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
 </dd><dt>interning</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk18.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk18.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk18.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -73,8 +73,7 @@
 <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
 </dd><dt>keyword</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
 </dd><dt>kill</dt><dd><a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
-</dd><dt>kind</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
-<a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
+</dd><dt>kind</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaNotation">_xmlSchemaNotation</a><br />
@@ -134,8 +133,6 @@
 <a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
 <a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
 <a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
 </dd><dt>leading</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk19.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk19.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk19.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -51,7 +51,6 @@
 </dd><dt>main</dt><dd><a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
 </dd><dt>maintained</dt><dd><a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
 <a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
 </dd><dt>major</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
 </dd><dt>make</dt><dd><a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
 <a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
@@ -149,12 +148,14 @@
 <a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
 <a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
 <a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+</dd><dt>maybe</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>mean</dt><dd><a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
 </dd><dt>means</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
 <a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
 <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>mechanism</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
 <a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
@@ -177,6 +178,7 @@
 <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
 <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>member-types</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>memo</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
 </dd><dt>memorylist</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
@@ -259,7 +261,8 @@
 <a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
 <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
 <a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
-</dd><dt>model</dt><dd><a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
+</dd><dt>model</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
 </dd><dt>modified</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
 <a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
 <a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk2.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk2.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk2.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -133,15 +133,6 @@
 </dd><dt>DefaultDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
 </dd><dt>Deletes</dt><dd><a href="html/libxml-list.html#xmlListDelete">xmlListDelete</a><br />
-</dd><dt>Deprecated</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
-<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
-<a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br />
-<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
-<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
-<a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br />
-<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
-<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
-<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
 </dd><dt>Depth</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 <a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
 </dd><dt>Dereference</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpFree">xmlExpFree</a><br />
@@ -155,6 +146,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
 </dd><dt>Devanagari</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsDevanagari">xmlUCSIsDevanagari</a><br />
+</dd><dt>Different</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>Digit</dt><dd><a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br />
 <a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk20.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk20.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk20.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -80,7 +80,8 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
 </dd><dt>nearly</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
 <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
-</dd><dt>necessary</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>necessary</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
 <a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
 <a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
 </dd><dt>need</dt><dd><a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br />
@@ -101,6 +102,7 @@
 <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
 <a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
 </dd><dt>needed</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
@@ -116,7 +118,6 @@
 <a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
 <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
 <a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
 <a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
@@ -136,6 +137,7 @@
 <a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
 </dd><dt>needs</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
 </dd><dt>negated</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
 </dd><dt>negative</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
@@ -215,7 +217,8 @@
 <a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
-</dd><dt>none</dt><dd><a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+</dd><dt>none</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
 <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
 <a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -265,7 +268,6 @@
 <a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
-<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
 <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
 <a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
 </dd><dt>ns-decls</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk21.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk21.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk21.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -50,11 +50,11 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
 </dd><dt>obligated</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
-</dd><dt>obsolete</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
-<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+</dd><dt>obsolete</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
 </dd><dt>obsolete:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
 </dd><dt>occupied</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
-</dd><dt>occur</dt><dd><a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+</dd><dt>occur</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
 </dd><dt>occured</dt><dd><a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br />
 <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
@@ -152,6 +152,7 @@
 </dd><dt>onto</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>opaque</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
 <a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
 </dd><dt>open</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
@@ -222,7 +223,6 @@
 </dd><dt>option</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
 <a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
 </dd><dt>optional</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a><br />
 <a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
 <a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
@@ -244,7 +244,6 @@
 <a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br />
 <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 <a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
 <a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
 <a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
@@ -252,12 +251,11 @@
 <a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
 <a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 </dd><dt>ordered</dt><dd><a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br />
 <a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
@@ -278,14 +276,14 @@
 </dd><dt>oriented</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
 <a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
 </dd><dt>origin</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
-</dd><dt>original</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+</dd><dt>original</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
 <a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
 <a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
 <a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
 <a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
 <a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk22.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk22.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk22.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -81,8 +81,6 @@
 </dd><dt>partial</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
-</dd><dt>particle</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
-<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>particular</dt><dd><a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br />
 </dd><dt>pass</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
@@ -137,7 +135,9 @@
 <a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
 <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>patterns</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
 </dd><dt>pcdata</dt><dd><a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br />
 <a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a><br />
@@ -179,8 +179,6 @@
 <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
 <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
 </dd><dt>points</dt><dd><a href="html/libxml-chvalid.html#_xmlChRangeGroup">_xmlChRangeGroup</a><br />
 </dd><dt>pop</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
@@ -199,8 +197,36 @@
 </dd><dt>positioned</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
 </dd><dt>positionned</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
 </dd><dt>positions</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
-</dd><dt>possible</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
-<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+</dd><dt>positive</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>possible</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
 <a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
@@ -210,6 +236,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 <a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
 </dd><dt>possibly</dt><dd><a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
@@ -249,7 +276,6 @@
 <a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
@@ -403,8 +429,11 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>processing-instruction</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+</dd><dt>processing-instruction-node</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>processing-instruction-nodes</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>processor</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
@@ -425,6 +454,7 @@
 </dd><dt>progresses</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
 </dd><dt>progressive</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 <a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -484,7 +514,6 @@
 <a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
 <a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
 <a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 <a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
 <a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
 </dd><dt>provides</dt><dd><a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
@@ -519,6 +548,8 @@
 <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
 </dd><dt>pushed</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 <a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
 </dd><dt>pushing</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
 </dd><dt>put</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk23.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk23.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk23.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -116,8 +116,7 @@
 </dd><dt>read-only</dt><dd><a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
 </dd><dt>readable</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
 </dd><dt>reader-</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
-</dd><dt>reading</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
-<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</dd><dt>reading</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
 </dd><dt>ready</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
 <a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
 </dd><dt>realloc</dt><dd><a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
@@ -212,9 +211,9 @@
 </dd><dt>recursively</dt><dd><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
 </dd><dt>redeclared</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
-</dd><dt>redef</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
+</dd><dt>redefined</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br />
 </dd><dt>redefinition</dt><dd><a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br />
-</dd><dt>redefinitions</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>redir</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
 </dd><dt>redirected</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
 <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
@@ -235,10 +234,10 @@
 <a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
 <a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
 <a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
-</dd><dt>referenced</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
-<a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+</dd><dt>referenced</dt><dd><a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
-</dd><dt>references</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br />
+</dd><dt>references</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a><br />
 <a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
@@ -268,6 +267,7 @@
 </dd><dt>refs</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
 <a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 </dd><dt>refuse</dt><dd><a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+</dd><dt>regex</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
 </dd><dt>regexp</dt><dd><a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
 <a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
@@ -397,7 +397,6 @@
 <a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
 <a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
 <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
 </dd><dt>replacement</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
 <a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
@@ -474,6 +473,7 @@
 <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>resides</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
 </dd><dt>resize</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
@@ -504,7 +504,6 @@
 <a href="html/libxml-relaxng.html#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
@@ -516,8 +515,7 @@
 <a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
 </dd><dt>responsible</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
 <a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
-</dd><dt>restored</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
-<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+</dd><dt>restored</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
 </dd><dt>restrict</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
 </dd><dt>restriction</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a><br />
@@ -586,7 +584,6 @@
 <a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
 <a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
 <a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
-<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
 <a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
@@ -595,6 +592,7 @@
 <a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk24.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk24.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk24.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -80,6 +80,7 @@
 </dd><dt>saving</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br />
 <a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br />
 <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -89,6 +90,7 @@
 <a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
@@ -124,13 +126,11 @@
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 </dd><dt>schematron</dt><dd><a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
 </dd><dt>scheme</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
 <a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
@@ -186,8 +186,7 @@
 <a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
 <a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
 </dd><dt>seq</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
-</dd><dt>sequence</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
-<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+</dd><dt>sequence</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
 <a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
@@ -214,6 +213,7 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
 </dd><dt>sequqnce</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
 </dd><dt>serialization</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
@@ -221,7 +221,8 @@
 <a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
 <a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
 <a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
-</dd><dt>serializing</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+</dd><dt>serializing</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
 </dd><dt>server</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
@@ -327,6 +328,7 @@
 </dd><dt>simple</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
 <a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
 <a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
@@ -348,7 +350,8 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br />
 </dd><dt>simply</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
 <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
-</dd><dt>since</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>since</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
@@ -438,6 +441,7 @@
 </dd><dt>spaces</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
@@ -555,7 +559,6 @@
 <a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
 <a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
 <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
 <a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
@@ -646,8 +649,8 @@
 <a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
 <a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
 </dd><dt>streamable</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
 </dd><dt>streaming</dt><dd><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>streams</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
 <a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
 </dd><dt>strict</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
@@ -669,8 +672,10 @@
 <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
 </dd><dt>stripping</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
 </dd><dt>strncasecmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
@@ -690,7 +695,7 @@
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
 </dd><dt>structured</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
 <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
 </dd><dt>structures</dt><dd><a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br />
 <a href="html/libxml-tree.html#xmlFreeNs">xmlFreeNs</a><br />
@@ -715,8 +720,6 @@
 <a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
 </dd><dt>subexpressions</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
 </dd><dt>subject</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
-<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
 </dd><dt>sublanguage</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
 </dd><dt>submits</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
 </dd><dt>subsequent</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
@@ -763,7 +766,6 @@
 <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
 <a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
 <a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk25.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk25.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk25.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -101,6 +101,8 @@
 <a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
 </dd><dt>tested</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
 </dd><dt>testing</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</dd><dt>text-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>text-node</dt><dd><a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
 </dd><dt>textDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
 </dd><dt>than</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
@@ -166,6 +168,7 @@
 <a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>this?</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>those</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
 <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
@@ -400,15 +403,17 @@
 <a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
 <a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
 </dd><dt>two-character</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
-</dd><dt>typ</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaTypeLink">_xmlSchemaTypeLink</a><br />
+</dd><dt>type:</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>typefixed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br />
 </dd><dt>types</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
 <a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>typo</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
 </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
 <a href="APIchunk1.html">C-C</a>

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk26.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk26.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk26.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -68,6 +68,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
 </dd><dt>unique</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
 <a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
@@ -117,7 +118,6 @@
 <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
 <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br />
-</dd><dt>unplug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
 </dd><dt>unpredictable</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
 <a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
 <a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
@@ -150,7 +150,6 @@
 <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
 <a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
 <a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
 <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
@@ -182,6 +181,8 @@
 </dd><dt>usage</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
 <a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
 </dd><dt>used:</dt><dd><a href="html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a><br />
+</dd><dt>used?</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>useful</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
 <a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
 <a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk27.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk27.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk27.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -63,9 +63,7 @@
 <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
 <a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
@@ -115,7 +113,6 @@
 <a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
 <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
 <a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
 <a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
 <a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
 <a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk28.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk28.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk28.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -109,7 +109,9 @@
 </dd><dt>xmlBuffer</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
 <a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
 <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 </dd><dt>xmlBufferPtr</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 </dd><dt>xmlBuildURI</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
 </dd><dt>xmlBytesConsumed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
 </dd><dt>xmlCatalogAllow</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
@@ -339,6 +341,7 @@
 </dd><dt>xmlPatternGetStreamCtxt</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
 </dd><dt>xmlPatterncompile</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>xmlPopInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
 </dd><dt>xmlPushInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
 </dd><dt>xmlRFreeMutex</dt><dd><a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
@@ -385,22 +388,20 @@
 </dd><dt>xmlSAX2StartDocument</dt><dd><a href="html/libxml-SAX.html#startDocument">startDocument</a><br />
 </dd><dt>xmlSAX2StartElement</dt><dd><a href="html/libxml-SAX.html#startElement">startElement</a><br />
 </dd><dt>xmlSAX2UnparsedEntityDecl</dt><dd><a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
-</dd><dt>xmlSAXHandlerPtr</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
 </dd><dt>xmlSAXVersion</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
-</dd><dt>xmlSaveOptions</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+</dd><dt>xmlSaveOptions</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
-</dd><dt>xmlSchemaAttributeGroupPtr</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
-</dd><dt>xmlSchemaSAXPlug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
 </dd><dt>xmlSchemaValType</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
-</dd><dt>xmlSchemaValidOption</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
 </dd><dt>xmlSchematronValidOptions</dt><dd><a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
 </dd><dt>xmlSetExternalEntityLoader</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
 <a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
 </dd><dt>xmlSnprintfElementContent</dt><dd><a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
-</dd><dt>xmlStrEqual</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+</dd><dt>xmlStrcmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
 </dd><dt>xmlStrdup</dt><dd><a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+</dd><dt>xmlStreamPush</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 </dd><dt>xmlStringDecodeEntities</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
 </dd><dt>xmlStringGetNodeList</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
 </dd><dt>xmlStrncat</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk29.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk29.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk29.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -54,6 +54,7 @@
 <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 </dd><dt>you</dt><dd><a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
 <a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
 <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk3.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk3.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk3.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -176,6 +176,7 @@
 </dd><dt>HighSurrogates</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHighSurrogates">xmlUCSIsHighSurrogates</a><br />
 </dd><dt>Hiragana</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHiragana">xmlUCSIsHiragana</a><br />
 </dd><dt>Hmm</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br />
+</dd><dt>Holds</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>How</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
 </dd><dt>However</dt><dd><a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
 <a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk4.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk4.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk4.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -86,6 +86,7 @@
 <a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
 </dd><dt>Local</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
 <a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>LocalPart</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
 <a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
 <a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
@@ -212,6 +213,7 @@
 <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
 </dd><dt>NRK</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
 </dd><dt>NSDef</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
@@ -275,6 +277,7 @@
 </dd><dt>Non-static</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
 </dd><dt>Normalization</dt><dd><a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
 </dd><dt>Normalization:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>Not</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>NotaNumber</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
 </dd><dt>Notation</dt><dd><a href="html/libxml-tree.html#_xmlNotation">_xmlNotation</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
@@ -311,6 +314,7 @@
 <a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
 <a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
 <a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
 </dd><dt>Note:</dt><dd><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk5.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk5.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk5.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -45,12 +45,17 @@
 <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
 </dd><dt>OUT:</dt><dd><a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
 <a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
 </dd><dt>Obsolete</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 </dd><dt>Obtain</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br />
 </dd><dt>Ogham</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOgham">xmlUCSIsOgham</a><br />
@@ -65,6 +70,8 @@
 </dd><dt>Optional</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
 </dd><dt>Oriya</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOriya">xmlUCSIsOriya</a><br />
 </dd><dt>Osmanya</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOsmanya">xmlUCSIsOsmanya</a><br />
+</dd><dt>Otherwise</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
 </dd><dt>Output</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
@@ -145,7 +152,6 @@
 </dd><dt>People</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
 </dd><dt>PhoneticExtensions</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a><br />
 </dd><dt>Please</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
-</dd><dt>Plug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
 </dd><dt>Pointer</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
 </dd><dt>Points</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
 </dd><dt>Pop</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
@@ -235,6 +241,7 @@
 <a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 <a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
 </dd><dt>Pushes</dt><dd><a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
 <a href="html/libxml-parserInternals.html#namePush">namePush</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk6.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk6.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk6.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -58,6 +58,7 @@
 </dd><dt>Qualified</dt><dd><a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
 </dd><dt>Query</dt><dd><a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
 <a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </dd><dt>Question:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
 </dd></dl><h2>Letter R:</h2><dl><dt>REC</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
 <a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br />
@@ -88,6 +89,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>Reader</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
@@ -109,7 +111,6 @@
 </dd><dt>Recurse</dt><dd><a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
 </dd><dt>Recursion</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
 <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
-</dd><dt>Redefinitions</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
 </dd><dt>Ref</dt><dd><a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br />
 <a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
 <a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
@@ -170,7 +171,8 @@
 <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
-</dd><dt>RelaxNG</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
+</dd><dt>RelaxNG</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a><br />
@@ -182,7 +184,6 @@
 <a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
-<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
 </dd><dt>RelaxNGs</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk7.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk7.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk7.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -50,7 +50,6 @@
 <a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a><br />
 <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 </dd><dt>SAX::substituteEntities</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
 </dd><dt>SDDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
 </dd><dt>SDDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
@@ -107,6 +106,8 @@
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
 <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>Schemas</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br />
 <a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
@@ -118,7 +119,6 @@
 <a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
 </dd><dt>Schematron</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronFree">xmlSchematronFree</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
@@ -168,7 +168,6 @@
 <a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
 </dd><dt>Sets</dt><dd><a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
 <a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk8.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk8.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk8.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -51,7 +51,8 @@
 <a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
 </dd><dt>TODO</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
-</dd><dt>TODO:</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+</dd><dt>TODO:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
 <a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
 <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
@@ -161,7 +162,8 @@
 <a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
 <a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
 <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
-</dd><dt>Type</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+</dd><dt>Type</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
@@ -218,7 +220,6 @@
 <a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
 <a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
 </dd><dt>Unlinks</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
-</dd><dt>Unplug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
 </dd><dt>Unregisters</dt><dd><a href="html/libxml-encoding.html#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a><br />
 <a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br />
 </dd><dt>Update</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
@@ -245,11 +246,13 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>Used</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
 <a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
 <a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
 <a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
 <a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIchunk9.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIchunk9.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIchunk9.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -41,9 +41,6 @@
 </dd><dt>Validate</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
 <a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
 <a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
 <a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
 <a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
@@ -74,8 +71,7 @@
 </dd><dt>VersionNum</dt><dd><a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br />
 <a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
 </dd></dl><h2>Letter W:</h2><dl><dt>W3C</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
-</dd><dt>WARNING</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
-<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 </dd><dt>WARNING:</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
@@ -92,6 +88,7 @@
 <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
 <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
 </dd><dt>WWW-Authenticate</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+</dd><dt>WXS</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
 </dd><dt>Walk</dt><dd><a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
 <a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
 </dd><dt>Warning</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
@@ -156,7 +153,6 @@
 <a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
 <a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
 <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
-</dd><dt>XML-Schema</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
 </dd><dt>XMLDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
 </dd><dt>XMLDecl?</dt><dd><a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
 </dd><dt>XMLSchema</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
@@ -186,6 +182,7 @@
 </dd><dt>XML_ENTITY_DECL</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
 </dd><dt>XML_ERR_OK</dt><dd><a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
 </dd><dt>XML_SCHEMAS_ELEM_GLOBAL</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+</dd><dt>XML_SCHEMAS_FACET_PRESERVE</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
 </dd><dt>XML_SCHEMAS_STRING</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
 </dd><dt>XML_SUBSTITUTE_PEREF</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
 <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
@@ -209,6 +206,7 @@
 <a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br />
 </dd><dt>XSD</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
 </dd><dt>XSLT</dt><dd><a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
 <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIconstructors.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIconstructors.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIconstructors.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -430,6 +430,7 @@
 </p><h2>Type xmlOutputBufferCreateFilenameFunc:</h2><p><a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
 <a href="html/libxml-globals.html#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a><br />
 </p><h2>Type xmlOutputBufferPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -481,7 +482,8 @@
 <a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
 </p><h2>Type xmlRelaxNGPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
 </p><h2>Type xmlRelaxNGValidCtxtPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
-</p><h2>Type xmlSaveCtxtPtr:</h2><p><a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+</p><h2>Type xmlSaveCtxtPtr:</h2><p><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
 </p><h2>Type xmlSchemaFacetPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIfiles.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIfiles.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIfiles.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -102,6 +102,7 @@
 <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
 <a href="html/libxml-HTMLtree.html#htmlIsBooleanAttr">htmlIsBooleanAttr</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
@@ -914,6 +915,8 @@
 <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </p><h2><a name="relaxng" id="relaxng">Module relaxng</a>:</h2><p><a href="html/libxml-relaxng.html#XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a><br />
 <a href="html/libxml-relaxng.html#XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a><br />
 <a href="html/libxml-relaxng.html#XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a><br />
@@ -1000,7 +1003,9 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br />
@@ -1103,6 +1108,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br />
@@ -1124,6 +1130,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a><br />
@@ -1142,6 +1149,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a><br />
@@ -1707,6 +1715,7 @@
 <a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
 <a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -2187,13 +2196,18 @@
 <a href="html/libxml-xmlerror.html#XML_SAVE_NOT_UTF8">XML_SAVE_NOT_UTF8</a><br />
 <a href="html/libxml-xmlerror.html#XML_SAVE_NO_DOCTYPE">XML_SAVE_NO_DOCTYPE</a><br />
 <a href="html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a><br />
@@ -2692,6 +2706,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
@@ -2759,6 +2774,7 @@
 <a href="html/libxml-xmlsave.html#xmlSaveOption">xmlSaveOption</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
@@ -2811,6 +2827,7 @@
 <a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIfunctions.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIfunctions.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIfunctions.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -371,6 +371,7 @@
 <a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
 <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
 <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
 <a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
@@ -557,6 +558,7 @@
 <a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
 <a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
 <a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
 <a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
@@ -839,6 +841,7 @@
 <a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
@@ -960,6 +963,8 @@
 <a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
 <a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
 <a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
 </p><h2>Type xmlC14NIsVisibleCallback:</h2><p><a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
 </p><h2>Type xmlCatalogAllow:</h2><p><a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
 </p><h2>Type xmlCatalogPrefer:</h2><p><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
@@ -1003,6 +1008,7 @@
 <a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathWrapString">xmlXPathWrapString</a><br />
 </p><h2>Type xmlChar **:</h2><p><a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
 <a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
@@ -1042,6 +1048,7 @@
 <a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
 <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
 </p><h2>Type xmlCharEncodingHandlerPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -1076,6 +1083,7 @@
 <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
 <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
@@ -1865,6 +1873,7 @@
 <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
 </p><h2>Type xmlSchemaPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
@@ -1913,6 +1922,7 @@
 <a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 </p><h2>Type xmlSchemaValidityErrorFunc:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
 </p><h2>Type xmlSchemaValidityErrorFunc *:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
@@ -1952,7 +1962,10 @@
 <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 </p><h2>Type xmlStructuredErrorFunc:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
 <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
@@ -2028,6 +2041,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/APIsymbols.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/APIsymbols.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/APIsymbols.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -779,13 +779,18 @@
 <a href="html/libxml-xmlsave.html#XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a><br />
 <a href="html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a><br />
 <a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a><br />
 <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a><br />
@@ -977,7 +982,9 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br />
@@ -1106,6 +1113,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br />
@@ -1211,6 +1219,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a><br />
@@ -1229,6 +1238,7 @@
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a><br />
 <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a><br />
@@ -1534,6 +1544,7 @@
 <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
 <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
 <a href="html/libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a><br />
 <a href="html/libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a><br />
 <a href="html/libxml-HTMLparser.html#htmlElemDescPtr">htmlElemDescPtr</a><br />
@@ -2331,6 +2342,7 @@
 <a href="html/libxml-tree.html#xmlNsType">xmlNsType</a><br />
 <a href="html/libxml-tree.html#xmlOutputBuffer">xmlOutputBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
@@ -2637,6 +2649,7 @@
 <a href="html/libxml-xmlsave.html#xmlSaveOption">xmlSaveOption</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
 <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
@@ -2704,6 +2717,7 @@
 <a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
 <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
@@ -2819,6 +2833,8 @@
 <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
 <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
 <a href="html/libxml-parserInternals.html#xmlStringComment">xmlStringComment</a><br />
 <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
 <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
@@ -2910,6 +2926,7 @@
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />

Modified: packages/libxml2/branches/upstream/current/doc/FAQ.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/FAQ.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/FAQ.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li>
+</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li>
   <li><a href="FAQ.html#Installati">Installation</a></li>
   <li><a href="FAQ.html#Compilatio">Compilation</a></li>
   <li><a href="FAQ.html#Developer">Developer corner</a></li>
@@ -118,40 +118,47 @@
     <p><code>CFLAGS=`xml2-config --cflags`</code></p>
     <p><code>LIBS=`xml2-config --libs`</code></p>
   </li>
-  <li><em>I want to install my own copy of libxml2 in my home directory and link
-    my programs against it, but it doesn't work</em>
+  <li><em>I want to install my own copy of libxml2 in my home directory and
+    link my programs against it, but it doesn't work</em>
     <p>There are many different ways to accomplish this.  Here is one way to
-      do this under Linux.  Suppose your home directory is <code>/home/user.
-      </code>Then:</p>
+    do this under Linux.  Suppose your home directory is <code>/home/user.
+    </code>Then:</p>
     <ul><li>Create a subdirectory, let's call it <code>myxml</code></li>
       <li>unpack the libxml2 distribution into that subdirectory</li>
-      <li>chdir into the unpacked distribution (<code>/home/user/myxml/libxml2
-        </code>)</li>
+      <li>chdir into the unpacked distribution
+        (<code>/home/user/myxml/libxml2 </code>)</li>
       <li>configure the library using the "<code>--prefix</code>" switch,
-      specifying an installation subdirectory in <code>/home/user/myxml</code>,
-      e.g.
-      <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
-      configuration options}</p></li>
+        specifying an installation subdirectory in
+        <code>/home/user/myxml</code>, e.g.
+        <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
+        configuration options}</p>
+      </li>
       <li>now run <code>make</code> followed by <code>make install</code></li>
       <li>At this point, the installation subdirectory contains the complete
-      "private" include files, library files and binary program files (e.g.
-      xmllint), located in
-      <p> <code>/home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include
-      </code> and <code> /home/user/myxml/xmlinst/bin</code></p>
-      respectively.</li>
-      <li>In order to use this "private" library, you should first add it
-      to the beginning of your default PATH (so that your own private
-      program files such as xmllint will be used instead of the normal
-      system ones).  To do this, the Bash command would be
-      <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p></li>
+        "private" include files, library files and binary program files (e.g.
+        xmllint), located in
+        <p><code>/home/user/myxml/xmlinst/lib,
+        /home/user/myxml/xmlinst/include </code> and <code>
+        /home/user/myxml/xmlinst/bin</code></p>
+        respectively.</li>
+      <li>In order to use this "private" library, you should first add it to
+        the beginning of your default PATH (so that your own private program
+        files such as xmllint will be used instead of the normal system
+        ones).  To do this, the Bash command would be
+        <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p>
+      </li>
       <li>Now suppose you have a program <code>test1.c</code> that you would
-      like to compile with your "private" library.  Simply compile it
-      using the command <p><code>gcc `xml2-config --cflags --libs` -o test
-      test.c</code></p>  Note that, because your PATH has been set with <code>
-      /home/user/myxml/xmlinst/bin</code> at the beginning, the
-      xml2-config program which you just installed will be used instead of
-      the system default one, and this will <em>automatically</em> get the
-      correct libraries linked with your program.</li></ul></li><p></p>
+        like to compile with your "private" library.  Simply compile it using
+        the command
+        <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p>
+        Note that, because your PATH has been set with <code>
+        /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config
+        program which you just installed will be used instead of the system
+        default one, and this will <em>automatically</em> get the correct
+        libraries linked with your program.</li>
+    </ul></li>
+
+  <p></p>
   <li><em>xmlDocDump() generates output on one line.</em>
     <p>Libxml2 will not <strong>invent</strong> spaces in the content of a
     document since <strong>all spaces in the content of a document are

Modified: packages/libxml2/branches/upstream/current/doc/Makefile.am
===================================================================
--- packages/libxml2/branches/upstream/current/doc/Makefile.am	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/Makefile.am	2006-01-06 18:12:46 UTC (rev 501)
@@ -110,7 +110,6 @@
 	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
 	- at INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
 	- at INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
-	- at INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html
 	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial
 	- at INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \
 		$(DESTDIR)$(HTML_DIR)/tutorial

Modified: packages/libxml2/branches/upstream/current/doc/Makefile.in
===================================================================
--- packages/libxml2/branches/upstream/current/doc/Makefile.in	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/Makefile.in	2006-01-06 18:12:46 UTC (rev 501)
@@ -731,7 +731,6 @@
 	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
 	- at INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
 	- at INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
-	- at INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html
 	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial
 	- at INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \
 		$(DESTDIR)$(HTML_DIR)/tutorial

Modified: packages/libxml2/branches/upstream/current/doc/XMLinfo.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/XMLinfo.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/XMLinfo.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for
+</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for
 markup-based structured documents. Here is <a name="example" id="example">an example XML
 document</a>:</p><pre>&lt;?xml version="1.0"?&gt;
 &lt;EXAMPLE prop1="gnome is great" prop2="&amp;amp; linux too"&gt;

Modified: packages/libxml2/branches/upstream/current/doc/XSLT.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/XSLT.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/XSLT.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>,  is a
+</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>,  is a
 language for transforming XML documents into other XML documents (or
 HTML/textual output).</p><p>A separate library called libxslt is available implementing XSLT-1.0 for
 libxml2. This module "libxslt" too can be found in the Gnome CVS base.</p><p>You can check the progresses on the libxslt <a href="http://xmlsoft.org/XSLT/ChangeLog.html">Changelog</a>.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

Modified: packages/libxml2/branches/upstream/current/doc/bugs.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/bugs.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/bugs.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a
+</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a
 point of fixing them in a timely fashion. The best way to report a bug is to
 use the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome
 bug tracking database</a> (make sure to use the "libxml2" module name). I

Modified: packages/libxml2/branches/upstream/current/doc/catalog.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/catalog.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/catalog.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="General2">General overview</a></li>
+</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="General2">General overview</a></li>
   <li><a href="#definition">The definition</a></li>
   <li><a href="#Simple">Using catalogs</a></li>
   <li><a href="#Some">Some examples</a></li>

Modified: packages/libxml2/branches/upstream/current/doc/contribs.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/contribs.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/contribs.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul><li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of
+</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul><li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of
     patches, Gary Pennington worked on the validation API, threading support
     and Solaris port.</li>
   <li>John Fleck helps maintaining the documentation and man pages.</li>
@@ -32,9 +32,9 @@
   <li><a href="mailto:aleksey at aleksey.com">Aleksey Sanin</a> implemented the
     <a href="http://www.w3.org/Signature/">XML Canonicalization and XML
     Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li>
-  <li><a href="mailto:Steve.Ball at explain.com.au">Steve Ball</a>
-    and contributors maintain <a href="http://tclxml.sourceforge.net/">tcl bindings for libxml2 and
-    libxslt</a>, as well as <a href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for
+  <li><a href="mailto:Steve.Ball at explain.com.au">Steve Ball</a> and
+    contributors maintain <a href="http://tclxml.sourceforge.net/">tcl
+    bindings for libxml2 and libxslt</a>, as well as <a href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for
     xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a>
     a GUI for xsltproc.</li>
 </ul><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-HTMLtree.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-HTMLtree.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-HTMLtree.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -51,9 +51,10 @@
 int	<a href="#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a>		(FILE * out, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/>					 const char * encoding, <br/>					 int format);
 void	<a href="#htmlDocDumpMemory">htmlDocDumpMemory</a>		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/>					 int * size);
 int	<a href="#htmlSaveFile">htmlSaveFile</a>			(const char * filename, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
-<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a>	<a href="#htmlNewDocNoDtD">htmlNewDocNoDtD</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID);
 int	<a href="#htmlDocDump">htmlDocDump</a>			(FILE * f, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
+void	<a href="#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a>		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/>					 int * size, <br/>					 int format);
 int	<a href="#htmlIsBooleanAttr">htmlIsBooleanAttr</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int	<a href="#htmlSaveFileFormat">htmlSaveFileFormat</a>		(const char * filename, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 const char * encoding, <br/>					 int format);
 void	<a href="#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a>	(<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/>					 const char * encoding, <br/>					 int format);
 int	<a href="#htmlSetMetaEncoding">htmlSetMetaEncoding</a>		(<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding);
 int	<a href="#htmlSaveFileEnc">htmlSaveFileEnc</a>			(const char * filename, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 const char * encoding);
@@ -63,7 +64,7 @@
 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#htmlGetMetaEncoding">htmlGetMetaEncoding</a>	(<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc);
 void	<a href="#htmlNodeDumpFile">htmlNodeDumpFile</a>		(FILE * out, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
 void	<a href="#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a>	(<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 const char * encoding, <br/>					 int format);
-int	<a href="#htmlSaveFileFormat">htmlSaveFileFormat</a>		(const char * filename, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 const char * encoding, <br/>					 int format);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a>	<a href="#htmlNewDocNoDtD">htmlNewDocNoDtD</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID);
 void	<a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a>	(<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 const char * encoding);
 </pre>
     </div>
@@ -109,6 +110,10 @@
 </pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div></div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="htmlDocDumpMemoryFormat"/>htmlDocDumpMemoryFormat ()</h3><pre class="programlisting">void	htmlDocDumpMemoryFormat		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/>					 int * size, <br/>					 int format)<br/>
+</pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="htmlGetMetaEncoding"/>htmlGetMetaEncoding ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	htmlGetMetaEncoding	(<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br/>
 </pre><p>Encoding definition lookup in the Meta tags</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current encoding as flagged in the HTML source</td></tr></tbody></table></div></div>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-pattern.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-pattern.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-pattern.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -55,11 +55,13 @@
 int	<a href="#xmlPatternStreamable">xmlPatternStreamable</a>		(<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
 int	<a href="#xmlStreamPushAttr">xmlStreamPushAttr</a>		(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns);
 int	<a href="#xmlPatternMatch">xmlPatternMatch</a>			(<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br/>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int	<a href="#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a>		(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt);
 int	<a href="#xmlStreamPop">xmlStreamPop</a>			(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream);
 void	<a href="#xmlFreePattern">xmlFreePattern</a>			(<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
 int	<a href="#xmlStreamPush">xmlStreamPush</a>			(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns);
 int	<a href="#xmlPatternMaxDepth">xmlPatternMaxDepth</a>		(<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
 <a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a>	<a href="#xmlPatterncompile">xmlPatterncompile</a>	(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br/>					 <a href="libxml2-dict.html#xmlDict">xmlDict</a> * dict, <br/>					 int flags, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces);
+int	<a href="#xmlStreamPushNode">xmlStreamPushNode</a>		(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/>					 int nodeType);
 void	<a href="#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a>		(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream);
 </pre>
     </div>
@@ -143,13 +145,21 @@
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise.</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlStreamPush"/>xmlStreamPush ()</h3><pre class="programlisting">int	xmlStreamPush			(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/>
-</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p>
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlStreamPushAttr"/>xmlStreamPushAttr ()</h3><pre class="programlisting">int	xmlStreamPushAttr		(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/>
-</pre><p>Push new <a href="libxml2-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p>
+</pre><p>Push new <a href="libxml2-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="xmlStreamPushNode"/>xmlStreamPushNode ()</h3><pre class="programlisting">int	xmlStreamPushNode		(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/>					 int nodeType)<br/>
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>nodeType</tt></i>:</span></td><td>the type of the node being pushed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div>
+        <hr/>
+        <div class="refsect2" lang="en"><h3><a name="xmlStreamWantsAnyNode"/>xmlStreamWantsAnyNode ()</h3><pre class="programlisting">int	xmlStreamWantsAnyNode		(<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)<br/>
+</pre><p>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>streamCtxt</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.</td></tr></tbody></table></div></div>
+        <hr/>
       </div>
     </div>
   </body>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-relaxng.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-relaxng.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-relaxng.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -228,7 +228,7 @@
 <div class="variablelist"><table border="0"><col align="left"/><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"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParse"/>xmlRelaxNGParse ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a>	xmlRelaxNGParse		(<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br/>
-</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>
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
 <div class="variablelist"><table border="0"><col align="left"/><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"><i><tt>Returns</tt></i>:</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/>
         <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetParserErrors"/>xmlRelaxNGSetParserErrors ()</h3><pre class="programlisting">void	xmlRelaxNGSetParserErrors	(<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/>					 <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/>					 void * ctx)<br/>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-schemasInternals.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-schemasInternals.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-schemasInternals.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -39,7 +39,7 @@
       <span class="refentrytitle">schemasInternals</span>
     </h2>
     <p>schemasInternals - internal interfaces for XML Schemas</p>
-    <p>internal interfaces for the XML Schemas handling and schema validity checking </p>
+    <p>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </p>
     <p>Author(s): Daniel Veillard </p>
     <div class="refsynopsisdiv">
       <h2>Synopsis</h2>
@@ -66,11 +66,12 @@
 #define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a>;
 #define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a>;
 #define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a>;
-#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a>;
+#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a>;
 #define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a>;
 #define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a>;
 #define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a>;
 #define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a>;
 #define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a>;
 #define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a>;
 #define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a>;
@@ -90,7 +91,9 @@
 #define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a>;
 #define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a>;
 #define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a>;
+#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a>;
 #define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a>;
 #define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a>;
 #define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a>;
 #define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a>;
@@ -99,7 +102,7 @@
 #define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a>;
 #define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a>;
 #define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a>;
-#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a>;
 #define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a>;
 #define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a>;
 #define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a>;
@@ -108,7 +111,7 @@
 #define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a>;
 #define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a>;
 #define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a>;
-#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a>;
+#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a>;
 #define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a>;
 #define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a>;
 #define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a>;
@@ -189,10 +192,18 @@
 </pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
 </div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_HAS_REFS">Macro </a>XML_SCHEMAS_ATTRGROUP_HAS_REFS</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a>;
+</pre><p>Whether this attr. group contains attr. group references.</p>
+</div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_MARKED">Macro </a>XML_SCHEMAS_ATTRGROUP_MARKED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a>;
 </pre><p>Marks the attr group as marked; used for circular checks.</p>
 </div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_REDEFINED">Macro </a>XML_SCHEMAS_ATTRGROUP_REDEFINED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a>;
+</pre><p>The attr group was redefined.</p>
+</div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">Macro </a>XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a>;
 </pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
 </div>
@@ -445,8 +456,12 @@
 </pre><p>the complexType owns an <a href="libxml2-SAX.html#attribute">attribute</a> wildcard, i.e. it can be freed by the complexType</p>
 </div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_REDEFINED">Macro </a>XML_SCHEMAS_TYPE_REDEFINED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a>;
+</pre><p>The type was redefined.</p>
+</div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT">Macro </a>XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a>;
-</pre><p>the simpleType has a variety of "absent".</p>
+</pre><p>the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.</p>
 </div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC">Macro </a>XML_SCHEMAS_TYPE_VARIETY_ATOMIC</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a>;
@@ -489,25 +504,25 @@
 </div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttribute">Structure </a>xmlSchemaAttribute</h3><pre class="programlisting">struct _xmlSchemaAttribute {
-    <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
-    struct _xmlSchemaAttribute *	next	: the next <a href="libxml2-SAX.html#attribute">attribute</a> if in a group ...
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	name	: name of the declaration or empty if particle
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref	: the local name of the <a href="libxml2-SAX.html#attribute">attribute</a> decl. if a particle
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: the ns URI of the <a href="libxml2-SAX.html#attribute">attribute</a> decl. if a particle
+    <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type
+    struct _xmlSchemaAttribute *	next	: the next <a href="libxml2-SAX.html#attribute">attribute</a> (not used?)
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	name	: the name of the declaration
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	typeName	: the local name of the type definition
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	typeNs	: the ns URI of the type definition
     <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
-    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	base	: obsolete, not used
-    int	occurs
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	defValue
+    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	base	: Deprecated; not used
+    int	occurs	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	defValue	: The initial value of the value constraint
     <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	subtypes	: the type definition
     <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	node
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
     int	flags
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal
-    <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	refDecl
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal	: The compiled value constraint
+    <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	refDecl	: Deprecated; not used
 } xmlSchemaAttribute;
 </pre><p/>
 </div>
@@ -517,16 +532,17 @@
     struct _xmlSchemaAttribute *	next	: the next <a href="libxml2-SAX.html#attribute">attribute</a> if in a group ...
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	name
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
-    <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes
+    <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes	: Deprecated; not used
     <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	node
     int	flags
     <a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a>	attributeWildcard
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a>	refItem	: The referenced <a href="libxml2-SAX.html#attribute">attribute</a> group
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace	: <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> redef Redefinitions
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a>	refItem	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
+    void *	attrUses
 } xmlSchemaAttributeGroup;
 </pre><p/>
 </div>
@@ -556,7 +572,7 @@
     <a name="XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a> = 2
     <a name="XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a> = 3
     <a name="XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a> = 4
-    <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 /* obsolete, not used */
+    <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 /* Obsolete */
     <a name="XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a> = 6
     <a name="XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a> = 7
 };
@@ -565,17 +581,17 @@
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaElement">Structure </a>xmlSchemaElement</h3><pre class="programlisting">struct _xmlSchemaElement {
     <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
-    struct _xmlSchemaType *	next	: the next type if in a sequence ...
+    struct _xmlSchemaType *	next	: Not used?
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	name
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref	: the local name of the element declaration if a particle
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: the ns URI of the element declaration if a particle
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	subtypes	: the type definition
     <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes
     <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	minOccurs
-    int	maxOccurs
+    int	minOccurs	: Deprecated; not used
+    int	maxOccurs	: Deprecated; not used
     int	flags
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	namedType
@@ -583,13 +599,13 @@
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	substGroup
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	substGroupNs
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	scope
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	value
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	value	: The original value of the value constraint.
     struct _xmlSchemaElement *	refDecl	: This will now be used for the substitution group affiliation
-    <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel
+    <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel	: Obsolete for WXS, maybe used for RelaxNG
     <a href="libxml2-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a>	contentType
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal
-    void *	idcs
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal	: The compiled value contraint.
+    void *	idcs	: The identity-constraint defs
 } xmlSchemaElement;
 </pre><p/>
 </div>
@@ -601,14 +617,14 @@
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaFacet">Structure </a>xmlSchemaFacet</h3><pre class="programlisting">struct _xmlSchemaFacet {
     <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
     struct _xmlSchemaFacet *	next	: the next type if in a sequence ...
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	value
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	value	: The original value
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id	: Obsolete
     <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	fixed
+    int	fixed	: XML_SCHEMAS_FACET_PRESERVE, etc.
     int	whitespace
-    <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	val
-    <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	regexp
+    <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	val	: The compiled value
+    <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	regexp	: The regex for patterns
 } xmlSchemaFacet;
 </pre><p/>
 </div>
@@ -646,39 +662,40 @@
     <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
     struct _xmlSchemaType *	next	: the next type if in a sequence ...
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	name
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	subtypes
-    <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes
+    <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes	: Deprecated; not used
     <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	minOccurs
-    int	maxOccurs
+    int	minOccurs	: Deprecated; not used
+    int	maxOccurs	: Deprecated; not used
     int	flags
     <a href="libxml2-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a>	contentType
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	base
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	baseNs
-    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	baseType
-    <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a>	facets
-    struct _xmlSchemaType *	redef	: possible redefinitions for the type
-    int	recurse
-    <a href="libxml2-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a>	attributeUses
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	base	: Base type's local name
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	baseNs	: Base type's target namespace
+    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	baseType	: The base type component
+    <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a>	facets	: Local facets
+    struct _xmlSchemaType *	redef	: Deprecated; not used
+    int	recurse	: Obsolete
+    <a href="libxml2-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> *	attributeUses	: Deprecated; not used
     <a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a>	attributeWildcard
-    int	builtInType
-    <a href="libxml2-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a>	memberTypes
-    <a href="libxml2-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a>	facetSet
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	contentTypeDef
-    <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel
+    int	builtInType	: Type of built-in types.
+    <a href="libxml2-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a>	memberTypes	: member-types if a union type.
+    <a href="libxml2-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a>	facetSet	: All facets (incl. inherited)
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	contentTypeDef	: Used for the simple content of complex types. Could we use @subtypes
+    <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel	: Holds the automaton of the content model
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
+    void *	attrUses
 } xmlSchemaType;
 </pre><p/>
 </div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaTypeLink">Structure </a>xmlSchemaTypeLink</h3><pre class="programlisting">struct _xmlSchemaTypeLink {
     struct _xmlSchemaTypeLink *	next	: the next type link ...
-    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	type	: the linked typ
+    <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	type	: the linked type
 } xmlSchemaTypeLink;
 </pre><p/>
 </div>
@@ -717,6 +734,7 @@
     <a name="XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a> = 23
     <a name="XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a> = 24
     <a name="XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a> = 25
+    <a name="XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a> = 26
     <a name="XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a> = 1000
     <a name="XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a> = 1001
     <a name="XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a> = 1002
@@ -730,6 +748,7 @@
     <a name="XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a> = 1010
     <a name="XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a> = 1011
     <a name="XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a> = 2000
+    <a name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a> = 2001
 };
 </pre><p/>
 </div>
@@ -798,11 +817,11 @@
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaWildcard">Structure </a>xmlSchemaWildcard</h3><pre class="programlisting">struct _xmlSchemaWildcard {
     <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
     <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	minOccurs
-    int	maxOccurs
+    int	minOccurs	: Deprecated; not used
+    int	maxOccurs	: Deprecated; not used
     int	processContents
     int	any	: Indicates if the ns constraint is of ##any
     <a href="libxml2-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a>	nsSet	: The list of allowed namespaces

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-tree.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-tree.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-tree.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -1225,7 +1225,7 @@
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlNewGlobalNs"/>xmlNewGlobalNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a>	xmlNewGlobalNs		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
-</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.</p>
+</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL this functionality had been removed</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlNewNode"/>xmlNewNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	xmlNewNode		(<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-valid.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-valid.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-valid.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -81,7 +81,7 @@
 <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a>	<a href="#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a>	(<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
 <a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a>	<a href="#xmlCopyNotationTable">xmlCopyNotationTable</a>	(<a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table);
 int	<a href="#xmlValidateDocument">xmlValidateDocument</a>		(<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
-int	<a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a>	(<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/>					 int * len, <br/>					 int max);
+int	<a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a>	(<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/>					 int * len, <br/>					 int max);
 <a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a>	<a href="#xmlAddNotationDecl">xmlAddNotationDecl</a>	(<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * PublicID, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
 int	<a href="#xmlValidateElementDecl">xmlValidateElementDecl</a>		(<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>					 <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem);
 <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a>	<a href="#xmlAddAttributeDecl">xmlAddAttributeDecl</a>	(<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/>					 <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br/>					 <a href="libxml2-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/>					 <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
@@ -426,9 +426,9 @@
 </pre><p>Does the validation related extra step of the normalization of <a href="libxml2-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml2-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml2-SAX.html#characters">characters</a> by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt-&gt;valid accordingly</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div></div>
         <hr/>
-        <div class="refsect2" lang="en"><h3><a name="xmlValidGetPotentialChildren"/>xmlValidGetPotentialChildren ()</h3><pre class="programlisting">int	xmlValidGetPotentialChildren	(<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/>					 int * len, <br/>					 int max)<br/>
+        <div class="refsect2" lang="en"><h3><a name="xmlValidGetPotentialChildren"/>xmlValidGetPotentialChildren ()</h3><pre class="programlisting">int	xmlValidGetPotentialChildren	(<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/>					 int * len, <br/>					 int max)<br/>
 </pre><p>Build/extend a list of potential children allowed by the content tree</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlValidGetValidElements"/>xmlValidGetValidElements ()</h3><pre class="programlisting">int	xmlValidGetValidElements	(<a href="libxml2-tree.html#xmlNode">xmlNode</a> * prev, <br/>					 <a href="libxml2-tree.html#xmlNode">xmlNode</a> * next, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/>					 int max)<br/>
 </pre><p>This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node-&gt;prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node-&gt;next, ... to replace 'node': xmlValidGetValidElements(node-&gt;prev, node-&gt;next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node-&gt;childs, to append a child to 'node': xmlValidGetValidElements(node-&gt;last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.</p>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlIO.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlIO.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlIO.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -71,9 +71,10 @@
 void	<a href="#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a>	(<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in);
 void	<a href="#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a>	(void);
 int	<a href="#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a>	(<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/>					 int len);
+typedef int <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a>		(void * context);
 <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	<a href="#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a>	(<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
 <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a>	<a href="#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a>	(const char * URL, <br/>							 const char * ID, <br/>							 <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
-typedef int <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a>		(void * context);
+<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	<a href="#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a>	(<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/>							 <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
 int	<a href="#xmlIOHTTPMatch">xmlIOHTTPMatch</a>			(const char * filename);
 void *	<a href="#xmlIOHTTPOpen">xmlIOHTTPOpen</a>			(const char * filename);
 <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a>	<a href="#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a>	(<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/>							 <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/>							 void * ioctx, <br/>							 <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
@@ -230,6 +231,10 @@
 </pre><p>flushes and close the output I/O channel and free up all the associated resources</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateBuffer"/>xmlOutputBufferCreateBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	xmlOutputBufferCreateBuffer	(<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/>							 <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
+</pre><p>Create a buffered output for the progressive saving to a <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFd"/>xmlOutputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	xmlOutputBufferCreateFd	(int fd, <br/>						 <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
 </pre><p>Create a buffered output for the progressive saving to a file descriptor</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlerror.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlerror.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlerror.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -811,6 +811,11 @@
     <a name="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a> = 3084 /* 3084 */
     <a name="XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a> = 3085 /* 3085 */
     <a name="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a> = 3086 /* 3085 */
+    <a name="XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a> = 3087 /* 3086 */
+    <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a> = 3088 /* 3087 */
+    <a name="XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a> = 3089 /* 3088 */
+    <a name="XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a> = 3090 /* 3089 */
+    <a name="XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a> = 3091 /* 3090 */
     <a name="XML_MODULE_OPEN">XML_MODULE_OPEN</a> = 4900 /* 4900 */
     <a name="XML_MODULE_CLOSE">XML_MODULE_CLOSE</a> = 4901 /* 4901 */
     <a name="XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a> = 5000

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlreader.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlreader.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlreader.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -124,6 +124,7 @@
 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlTextReaderConstValue">xmlTextReaderConstValue</a>	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
 <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a>	<a href="#xmlNewTextReader">xmlNewTextReader</a>	(<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/>						 const char * URI);
 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a>	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/>						 int no);
+int	<a href="#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a>	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 int options);
 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlTextReaderLocalName">xmlTextReaderLocalName</a>	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>	<a href="#xmlTextReaderExpand">xmlTextReaderExpand</a>	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlTextReaderConstName">xmlTextReaderConstName</a>	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
@@ -513,9 +514,13 @@
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> 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"><i><tt>Returns</tt></i>:</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/>
         <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSchemaValidate"/>xmlTextReaderSchemaValidate ()</h3><pre class="programlisting">int	xmlTextReaderSchemaValidate	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/>					 const char * xsd)<br/>
-</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSchemaValidateCtxt"/>xmlTextReaderSchemaValidateCtxt ()</h3><pre class="programlisting">int	xmlTextReaderSchemaValidateCtxt	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 int options)<br/>
+</pre><p>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML Schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetErrorHandler"/>xmlTextReaderSetErrorHandler ()</h3><pre class="programlisting">void	xmlTextReaderSetErrorHandler	(<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/>					 <a href="libxml2-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br/>					 void * arg)<br/>
 </pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> 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>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlregexp.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlregexp.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlregexp.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -75,10 +75,10 @@
 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>	<a href="#xmlExpNewAtom">xmlExpNewAtom</a>		(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>					 int len);
 int	<a href="#xmlRegexpExec">xmlRegexpExec</a>			(<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
 int	<a href="#xmlRegExecPushString">xmlRegExecPushString</a>		(<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/>					 void * data);
-int	<a href="#xmlExpGetStart">xmlExpGetStart</a>			(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/>					 int len);
+int	<a href="#xmlExpGetStart">xmlExpGetStart</a>			(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br/>					 int len);
 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>	<a href="#xmlExpParse">xmlExpParse</a>		(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 const char * expr);
 <a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a>	<a href="#xmlExpNewCtxt">xmlExpNewCtxt</a>		(int maxNodes, <br/>					 <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict);
-int	<a href="#xmlExpGetLanguage">xmlExpGetLanguage</a>		(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/>					 int len);
+int	<a href="#xmlExpGetLanguage">xmlExpGetLanguage</a>		(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br/>					 int len);
 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>	<a href="#xmlExpStringDerive">xmlExpStringDerive</a>	(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/>					 int len);
 int	<a href="#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a>		(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt);
 int	<a href="#xmlExpMaxToken">xmlExpMaxToken</a>			(<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr);
@@ -178,13 +178,13 @@
 </pre><p>Free an expression context</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div></div>
         <hr/>
-        <div class="refsect2" lang="en"><h3><a name="xmlExpGetLanguage"/>xmlExpGetLanguage ()</h3><pre class="programlisting">int	xmlExpGetLanguage		(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/>					 int len)<br/>
+        <div class="refsect2" lang="en"><h3><a name="xmlExpGetLanguage"/>xmlExpGetLanguage ()</h3><pre class="programlisting">int	xmlExpGetLanguage		(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br/>					 int len)<br/>
 </pre><p>Find all the strings used in @exp and store them in @list</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
         <hr/>
-        <div class="refsect2" lang="en"><h3><a name="xmlExpGetStart"/>xmlExpGetStart ()</h3><pre class="programlisting">int	xmlExpGetStart			(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/>					 int len)<br/>
+        <div class="refsect2" lang="en"><h3><a name="xmlExpGetStart"/>xmlExpGetStart ()</h3><pre class="programlisting">int	xmlExpGetStart			(<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br/>					 int len)<br/>
 </pre><p>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlExpIsNillable"/>xmlExpIsNillable ()</h3><pre class="programlisting">int	xmlExpIsNillable		(<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br/>
 </pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlsave.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlsave.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlsave.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -50,6 +50,7 @@
 <a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	<a href="#xmlSaveToFd">xmlSaveToFd</a>		(int fd, <br/>					 const char * encoding, <br/>					 int options);
 int	<a href="#xmlSaveClose">xmlSaveClose</a>			(<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt);
 int	<a href="#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a>		(<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape);
+<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	<a href="#xmlSaveToBuffer">xmlSaveToBuffer</a>		(<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/>					 const char * encoding, <br/>					 int options);
 <a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	<a href="#xmlSaveToFilename">xmlSaveToFilename</a>	(const char * filename, <br/>					 const char * encoding, <br/>					 int options);
 int	<a href="#xmlSaveFlush">xmlSaveFlush</a>			(<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt);
 long	<a href="#xmlSaveDoc">xmlSaveDoc</a>			(<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
@@ -102,6 +103,10 @@
 </pre><p>Set a custom escaping function to be used for text in element content</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div></div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="xmlSaveToBuffer"/>xmlSaveToBuffer ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	xmlSaveToBuffer		(<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/>					 const char * encoding, <br/>					 int options)<br/>
+</pre><p>Create a document saving context serializing to a buffer with the encoding and the options given</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSaveToFd"/>xmlSaveToFd ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	xmlSaveToFd		(int fd, <br/>					 const char * encoding, <br/>					 int options)<br/>
 </pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlschemas.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlschemas.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlschemas.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -68,7 +68,7 @@
 void	<a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a>		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/>					 void * ctx);
 int	<a href="#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a>	(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);
 int	<a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a>		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 const char * filename, <br/>					 int options);
-int	<a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a>		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int	<a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a>		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> instance);
 void	<a href="#xmlSchemaFree">xmlSchemaFree</a>			(<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
 <a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	<a href="#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a>	(const char * buffer, <br/>							 int size);
 int	<a href="#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a>		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/>					 void ** ctx);
@@ -77,6 +77,7 @@
 typedef void <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a>	(void * ctx, <br/>					 const char * msg, <br/>					 ... ...);
 void	<a href="#xmlSchemaDump">xmlSchemaDump</a>			(FILE * output, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
 void	<a href="#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a>		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);
+void	<a href="#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a>	(<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/>						 <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/>						 void * ctx);
 <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>	<a href="#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a>	(<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
 </pre>
     </div>
@@ -90,7 +91,7 @@
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	name	: schema name
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace	: the target namespace
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	version
-    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id
+    const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	id	: Obsolete
     <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a>	doc
     <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     int	flags
@@ -106,8 +107,8 @@
     void *	includes	: the includes, this is opaque for now
     int	preserve	: whether to free the document
     int	counter	: used to give ononymous components unique names
-    <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	idcDef
-    void *	volatiles	: Deprecated; not used anymore.
+    <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	idcDef	: All identity-constraint defs.
+    void *	volatiles	: Obsolete
 } xmlSchema;
 </pre><p/>
 </div>
@@ -204,20 +205,20 @@
 <div class="variablelist"><table border="0"><col align="left"/><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/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeValidCtxt"/>xmlSchemaFreeValidCtxt ()</h3><pre class="programlisting">void	xmlSchemaFreeValidCtxt		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/>
-</pre><p>Free the resources associated to the schema validation context</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetParserErrors"/>xmlSchemaGetParserErrors ()</h3><pre class="programlisting">int	xmlSchemaGetParserErrors	(<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/>					 void ** ctx)<br/>
 </pre><p>Get the callback information used to handle errors for a parser context</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XMl-Schema parser 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"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetValidErrors"/>xmlSchemaGetValidErrors ()</h3><pre class="programlisting">int	xmlSchemaGetValidErrors		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/>					 void ** ctx)<br/>
-</pre><p>Get the error and warning callback informations</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XML-Schema 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"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaIsValid"/>xmlSchemaIsValid ()</h3><pre class="programlisting">int	xmlSchemaIsValid		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/>
-</pre><p>Check if any error was detected during validation.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid so far, 0 if errors were detected, and -1 in case of internal error.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewDocParserCtxt"/>xmlSchemaNewDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewDocParserCtxt	(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
 </pre><p>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</p>
@@ -232,56 +233,60 @@
 <div class="variablelist"><table border="0"><col align="left"/><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"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewValidCtxt"/>xmlSchemaNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>	xmlSchemaNewValidCtxt	(<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br/>
-</pre><p>Create an XML Schemas validation context based on the given schema.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schemas</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaParse"/>xmlSchemaParse ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a>	xmlSchemaParse		(<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br/>
-</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>
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXPlug"/>xmlSchemaSAXPlug ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a>	xmlSchemaSAXPlug	(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>						 <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br/>						 void ** user_data)<br/>
-</pre><p>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a pointer to the original <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>a pointer to the original SAX user data pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXUnplug"/>xmlSchemaSAXUnplug ()</h3><pre class="programlisting">int	xmlSchemaSAXUnplug		(<a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br/>
-</pre><p>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td>a data structure returned by <a href="libxml2-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetParserErrors"/>xmlSchemaSetParserErrors ()</h3><pre class="programlisting">void	xmlSchemaSetParserErrors	(<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/>					 void * ctx)<br/>
 </pre><p>Set the callback functions used to handle errors for a validation context</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema 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/>
+        <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetParserStructuredErrors"/>xmlSchemaSetParserStructuredErrors ()</h3><pre class="programlisting">void	xmlSchemaSetParserStructuredErrors	(<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/>						 <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/>						 void * ctx)<br/>
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error 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/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidErrors"/>xmlSchemaSetValidErrors ()</h3><pre class="programlisting">void	xmlSchemaSetValidErrors		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/>					 <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/>					 void * ctx)<br/>
-</pre><p>Set the error and warning callback informations</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema 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>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidOptions"/>xmlSchemaSetValidOptions ()</h3><pre class="programlisting">int	xmlSchemaSetValidOptions	(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 int options)<br/>
-</pre><p>Sets the options to be used during the validation.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidStructuredErrors"/>xmlSchemaSetValidStructuredErrors ()</h3><pre class="programlisting">void	xmlSchemaSetValidStructuredErrors	(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>						 <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/>						 void * ctx)<br/>
-</pre><p>Set the structured error callback</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error 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>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxtGetOptions"/>xmlSchemaValidCtxtGetOptions ()</h3><pre class="programlisting">int	xmlSchemaValidCtxtGetOptions	(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/>
-</pre><p>Get the validation context options.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the option combination or -1 on error.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
-        <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateDoc"/>xmlSchemaValidateDoc ()</h3><pre class="programlisting">int	xmlSchemaValidateDoc		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
-</pre><p>Validate a document tree in memory.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema 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"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+        <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateDoc"/>xmlSchemaValidateDoc ()</h3><pre class="programlisting">int	xmlSchemaValidateDoc		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> instance)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>instance</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateFile"/>xmlSchemaValidateFile ()</h3><pre class="programlisting">int	xmlSchemaValidateFile		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 const char * filename, <br/>					 int options)<br/>
-</pre><p>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI of the instance</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a future set of options, currently unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateOneElement"/>xmlSchemaValidateOneElement ()</h3><pre class="programlisting">int	xmlSchemaValidateOneElement	(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
-</pre><p>Validate a branch of a tree, starting with the given @elem.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateStream"/>xmlSchemaValidateStream ()</h3><pre class="programlisting">int	xmlSchemaValidateStream		(<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/>					 <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/>					 <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br/>					 <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/>					 void * user_data)<br/>
-</pre><p>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input to use for reading the data</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding information</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler for the resulting events</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the context to provide to the SAX handler.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
         <hr/>
       </div>
     </div>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlstring.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlstring.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2-xmlstring.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -108,7 +108,7 @@
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlStrEqual"/>xmlStrEqual ()</h3><pre class="programlisting">int	xmlStrEqual			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br/>
-</pre><p>Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()</p>
+</pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlStrPrintf"/>xmlStrPrintf ()</h3><pre class="programlisting">int	xmlStrPrintf			(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>					 int len, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/>					 ... ...)<br/>
@@ -156,12 +156,12 @@
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlStrncat"/>xmlStrncat ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrncat		(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add, <br/>					 int len)<br/>
-</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.</p>
+</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len &lt; 0 then this is an API error and NULL will be returned.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of @add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *, the original @cur is reallocated if needed and should not be freed</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlStrncatNew"/>xmlStrncatNew ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrncatNew		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/>					 int len)<br/>
-</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div>
+</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is &lt; 0 then the length will be calculated automatically.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2 or &lt; 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlStrncmp"/>xmlStrncmp ()</h3><pre class="programlisting">int	xmlStrncmp			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/>					 int len)<br/>
 </pre><p>a strncmp for xmlChar's</p>

Modified: packages/libxml2/branches/upstream/current/doc/devhelp/libxml2.devhelp
===================================================================
--- packages/libxml2/branches/upstream/current/doc/devhelp/libxml2.devhelp	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/devhelp/libxml2.devhelp	2006-01-06 18:12:46 UTC (rev 501)
@@ -166,7 +166,9 @@
     <function name="XML_SCHEMAS_ANY_SKIP" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANY_SKIP"/>
     <function name="XML_SCHEMAS_ANY_STRICT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANY_STRICT"/>
     <function name="XML_SCHEMAS_ATTRGROUP_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL"/>
+    <function name="XML_SCHEMAS_ATTRGROUP_HAS_REFS" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS"/>
     <function name="XML_SCHEMAS_ATTRGROUP_MARKED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED"/>
+    <function name="XML_SCHEMAS_ATTRGROUP_REDEFINED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED"/>
     <function name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED"/>
     <function name="XML_SCHEMAS_ATTR_FIXED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED"/>
     <function name="XML_SCHEMAS_ATTR_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL"/>
@@ -230,6 +232,7 @@
     <function name="XML_SCHEMAS_TYPE_MIXED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED"/>
     <function name="XML_SCHEMAS_TYPE_NORMVALUENEEDED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED"/>
     <function name="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD"/>
+    <function name="XML_SCHEMAS_TYPE_REDEFINED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED"/>
     <function name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT"/>
     <function name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC"/>
     <function name="XML_SCHEMAS_TYPE_VARIETY_LIST" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST"/>
@@ -956,13 +959,18 @@
     <function name="XML_SAVE_NO_EMPTY" link="libxml2-xmlsave.html#XML_SAVE_NO_EMPTY"/>
     <function name="XML_SAVE_NO_XHTML" link="libxml2-xmlsave.html#XML_SAVE_NO_XHTML"/>
     <function name="XML_SAVE_UNKNOWN_ENCODING" link="libxml2-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING"/>
+    <function name="XML_SCHEMAP_AG_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT"/>
     <function name="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE"/>
     <function name="XML_SCHEMAP_ATTRGRP_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF"/>
     <function name="XML_SCHEMAP_ATTR_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF"/>
+    <function name="XML_SCHEMAP_AU_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT"/>
     <function name="XML_SCHEMAP_AU_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2"/>
     <function name="XML_SCHEMAP_A_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2"/>
+    <function name="XML_SCHEMAP_A_PROPS_CORRECT_3" link="libxml2-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3"/>
     <function name="XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF"/>
+    <function name="XML_SCHEMAP_COS_ALL_LIMITED" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED"/>
     <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1"/>
+    <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2"/>
     <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_3" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3"/>
     <function name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1"/>
     <function name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2"/>
@@ -1309,6 +1317,7 @@
     <function name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS"/>
     <function name="XML_SCHEMA_CONTENT_SIMPLE" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE"/>
     <function name="XML_SCHEMA_CONTENT_UNKNOWN" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN"/>
+    <function name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB" link="libxml2-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB"/>
     <function name="XML_SCHEMA_EXTRA_QNAMEREF" link="libxml2-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF"/>
     <function name="XML_SCHEMA_FACET_ENUMERATION" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION"/>
     <function name="XML_SCHEMA_FACET_FRACTIONDIGITS" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS"/>
@@ -1327,6 +1336,7 @@
     <function name="XML_SCHEMA_TYPE_ANY_ATTRIBUTE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE"/>
     <function name="XML_SCHEMA_TYPE_ATTRIBUTE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE"/>
     <function name="XML_SCHEMA_TYPE_ATTRIBUTEGROUP" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP"/>
+    <function name="XML_SCHEMA_TYPE_ATTRIBUTE_USE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE"/>
     <function name="XML_SCHEMA_TYPE_BASIC" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_BASIC"/>
     <function name="XML_SCHEMA_TYPE_CHOICE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE"/>
     <function name="XML_SCHEMA_TYPE_COMPLEX" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX"/>
@@ -1922,6 +1932,7 @@
     <function name="htmlDocContentDumpOutput ()" link="libxml2-HTMLtree.html#htmlDocContentDumpOutput"/>
     <function name="htmlDocDump ()" link="libxml2-HTMLtree.html#htmlDocDump"/>
     <function name="htmlDocDumpMemory ()" link="libxml2-HTMLtree.html#htmlDocDumpMemory"/>
+    <function name="htmlDocDumpMemoryFormat ()" link="libxml2-HTMLtree.html#htmlDocDumpMemoryFormat"/>
     <function name="htmlElementAllowedHere ()" link="libxml2-HTMLparser.html#htmlElementAllowedHere"/>
     <function name="htmlElementStatusHere ()" link="libxml2-HTMLparser.html#htmlElementStatusHere"/>
     <function name="htmlEncodeEntities ()" link="libxml2-HTMLparser.html#htmlEncodeEntities"/>
@@ -2521,6 +2532,7 @@
     <function name="xmlNormalizeURIPath ()" link="libxml2-uri.html#xmlNormalizeURIPath"/>
     <function name="xmlNormalizeWindowsPath ()" link="libxml2-xmlIO.html#xmlNormalizeWindowsPath"/>
     <function name="xmlOutputBufferClose ()" link="libxml2-xmlIO.html#xmlOutputBufferClose"/>
+    <function name="xmlOutputBufferCreateBuffer ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateBuffer"/>
     <function name="xmlOutputBufferCreateFd ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFd"/>
     <function name="xmlOutputBufferCreateFile ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFile"/>
     <function name="xmlOutputBufferCreateFilename ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFilename"/>
@@ -2757,6 +2769,7 @@
     <function name="xmlSaveFormatFileTo ()" link="libxml2-tree.html#xmlSaveFormatFileTo"/>
     <function name="xmlSaveSetAttrEscape ()" link="libxml2-xmlsave.html#xmlSaveSetAttrEscape"/>
     <function name="xmlSaveSetEscape ()" link="libxml2-xmlsave.html#xmlSaveSetEscape"/>
+    <function name="xmlSaveToBuffer ()" link="libxml2-xmlsave.html#xmlSaveToBuffer"/>
     <function name="xmlSaveToFd ()" link="libxml2-xmlsave.html#xmlSaveToFd"/>
     <function name="xmlSaveToFilename ()" link="libxml2-xmlsave.html#xmlSaveToFilename"/>
     <function name="xmlSaveToIO ()" link="libxml2-xmlsave.html#xmlSaveToIO"/>
@@ -2801,6 +2814,7 @@
     <function name="xmlSchemaSAXPlug ()" link="libxml2-xmlschemas.html#xmlSchemaSAXPlug"/>
     <function name="xmlSchemaSAXUnplug ()" link="libxml2-xmlschemas.html#xmlSchemaSAXUnplug"/>
     <function name="xmlSchemaSetParserErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetParserErrors"/>
+    <function name="xmlSchemaSetParserStructuredErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetParserStructuredErrors"/>
     <function name="xmlSchemaSetValidErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidErrors"/>
     <function name="xmlSchemaSetValidOptions ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidOptions"/>
     <function name="xmlSchemaSetValidStructuredErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidStructuredErrors"/>
@@ -2881,6 +2895,8 @@
     <function name="xmlStreamPop ()" link="libxml2-pattern.html#xmlStreamPop"/>
     <function name="xmlStreamPush ()" link="libxml2-pattern.html#xmlStreamPush"/>
     <function name="xmlStreamPushAttr ()" link="libxml2-pattern.html#xmlStreamPushAttr"/>
+    <function name="xmlStreamPushNode ()" link="libxml2-pattern.html#xmlStreamPushNode"/>
+    <function name="xmlStreamWantsAnyNode ()" link="libxml2-pattern.html#xmlStreamWantsAnyNode"/>
     <function name="xmlStringCurrentChar ()" link="libxml2-parserInternals.html#xmlStringCurrentChar"/>
     <function name="xmlStringDecodeEntities ()" link="libxml2-parserInternals.html#xmlStringDecodeEntities"/>
     <function name="xmlStringGetNodeList ()" link="libxml2-tree.html#xmlStringGetNodeList"/>
@@ -2961,6 +2977,7 @@
     <function name="xmlTextReaderRelaxNGSetSchema ()" link="libxml2-xmlreader.html#xmlTextReaderRelaxNGSetSchema"/>
     <function name="xmlTextReaderRelaxNGValidate ()" link="libxml2-xmlreader.html#xmlTextReaderRelaxNGValidate"/>
     <function name="xmlTextReaderSchemaValidate ()" link="libxml2-xmlreader.html#xmlTextReaderSchemaValidate"/>
+    <function name="xmlTextReaderSchemaValidateCtxt ()" link="libxml2-xmlreader.html#xmlTextReaderSchemaValidateCtxt"/>
     <function name="xmlTextReaderSetErrorHandler ()" link="libxml2-xmlreader.html#xmlTextReaderSetErrorHandler"/>
     <function name="xmlTextReaderSetParserProp ()" link="libxml2-xmlreader.html#xmlTextReaderSetParserProp"/>
     <function name="xmlTextReaderSetSchema ()" link="libxml2-xmlreader.html#xmlTextReaderSetSchema"/>

Modified: packages/libxml2/branches/upstream/current/doc/downloads.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/downloads.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/downloads.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libxml2 can be found on the <a href="ftp://xmlsoft.org/">xmlsoft.org</a> server ( <a href="http://xmlsoft.org/sources/">HTTP</a>, <a href="ftp://xmlsoft.org/">FTP</a> and rsync are available), there is also
+</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libxml2 can be found on the <a href="ftp://xmlsoft.org/">xmlsoft.org</a> server ( <a href="http://xmlsoft.org/sources/">HTTP</a>, <a href="ftp://xmlsoft.org/">FTP</a> and rsync are available), there is also
 mirrors (<a href="ftp://ftp.planetmirror.com/pub/xmlsoft/">Australia</a>( <a href="http://xmlsoft.planetmirror.com/">Web</a>), <a href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a> as <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source archive</a>
 , Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a
 mirror in Austria</a>. (NOTE that you need both the <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>
@@ -17,12 +17,13 @@
   <li><a href="mailto:igor at zlatkovic.com">Igor Zlatkovic</a> is now the
     maintainer of the Windows port, <a href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
     binaries</a>.</li>
-  <li>Blastwave provides
-    <a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a>.</li>
+  <li>Blastwave provides <a href="http://www.blastwave.org/packages.php/libxml2">Solaris
+  binaries</a>.</li>
   <li><a href="mailto:Steve.Ball at explain.com.au">Steve Ball</a> provides <a href="http://www.explain.com.au/oss/libxml2xslt.html">Mac Os X
     binaries</a>.</li>
   <li>The HP-UX porting center provides <a href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li>
-  <li>Bull provides precompiled <a href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as patr of their GNOME packages</li>
+  <li>Bull provides precompiled <a href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as
+    patr of their GNOME packages</li>
 </ul><p>If you know other supported binary ports, please <a href="http://veillard.com/">contact me</a>.</p><p><a name="Snapshot" id="Snapshot">Snapshot:</a></p><ul><li>Code from the W3C cvs base libxml2 module, updated hourly <a href="ftp://xmlsoft.org/libxml2-cvs-snapshot.tar.gz">libxml2-cvs-snapshot.tar.gz</a>.</li>
   <li>Docs, content of the web site, the list archive included <a href="ftp://xmlsoft.org/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li>
 </ul><p><a name="Contribs" id="Contribs">Contributions:</a></p><p>I do accept external contributions, especially if compiling on another

Modified: packages/libxml2/branches/upstream/current/doc/encoding.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/encoding.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/encoding.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,14 +7,13 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Encodings support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Encodings support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>If you are not really familiar with Internationalization (usual shortcut
+</style><title>Encodings support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Encodings support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>If you are not really familiar with Internationalization (usual shortcut
 is I18N) , Unicode, characters and glyphs, I suggest you read a <a href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a>
 by Tim Bray on Unicode and why you should care about it.</p><p>If you don't understand why <b>it does not make sense to have a string
-without knowing what encoding it uses</b>, then as Joel Spolsky said
-<a href="http://www.joelonsoftware.com/articles/Unicode.html">please do
-not write another line of code until you finish reading that article.</a>.
-It is a prerequisite to understand this page, and avoid a lot of problems
-with libxml2, XML or text processing in general.</p><p>Table of Content:</p><ol><li><a href="encoding.html#What">What does internationalization support
+without knowing what encoding it uses</b>, then as Joel Spolsky said <a href="http://www.joelonsoftware.com/articles/Unicode.html">please do not
+write another line of code until you finish reading that article.</a>. It is
+a prerequisite to understand this page, and avoid a lot of problems with
+libxml2, XML or text processing in general.</p><p>Table of Content:</p><ol><li><a href="encoding.html#What">What does internationalization support
     mean ?</a></li>
   <li><a href="encoding.html#internal">The internal encoding, how and
   why</a></li>
@@ -185,7 +184,10 @@
 set of encodings supported by iconv can be instantly be used by libxml. On a
 linux machine with glibc-2.1 the list of supported encodings and aliases fill
 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the
-various Japanese ones.</p><h4>Encoding aliases</h4><p>From 2.2.3, libxml2 has support to register encoding names aliases. The
+various Japanese ones.</p><p>To convert from the UTF-8 values returned from the API to another encoding
+then it is possible to use the function provided from <a href="html/libxml-encoding.html">the encoding module</a> like <a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the
+POSIX <a href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a>
+API directly.</p><h4>Encoding aliases</h4><p>From 2.2.3, libxml2 has support to register encoding names aliases. The
 goal is to be able to parse document whose encoding is supported but where
 the name differs (for example from the default set of names accepted by
 iconv). The following functions allow to register and handle new aliases for

Modified: packages/libxml2/branches/upstream/current/doc/examples/Makefile.am
===================================================================
--- packages/libxml2/branches/upstream/current/doc/examples/Makefile.am	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/examples/Makefile.am	2006-01-06 18:12:46 UTC (rev 501)
@@ -15,20 +15,40 @@
 	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
 	- at INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
 
-EXTRA_DIST=examples.xsl index.py test3.xml tst.xml test2.xml writer.xml test1.xml examples.xml xpath1.res tree2.res reader3.res tree1.res reader1.res xpath2.res reader4.res io2.res io1.res 
+EXTRA_DIST=examples.xsl index.py examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res 
 
-noinst_PROGRAMS=reader3 io2 reader1 reader2 reader4 testWriter parse3 tree2 tree1 xpath2 parse1 xpath1 io1 parse4 parse2 
+noinst_PROGRAMS=io1 io2 parse1 parse2 parse3 parse4 reader1 reader2 reader3 reader4 testWriter tree1 tree2 xpath1 xpath2 
 
-reader3_SOURCES=reader3.c
-reader3_LDFLAGS=
-reader3_DEPENDENCIES= $(DEPS)
-reader3_LDADD= @RDL_LIBS@ $(LDADDS)
+io1_SOURCES=io1.c
+io1_LDFLAGS=
+io1_DEPENDENCIES= $(DEPS)
+io1_LDADD= @RDL_LIBS@ $(LDADDS)
 
 io2_SOURCES=io2.c
 io2_LDFLAGS=
 io2_DEPENDENCIES= $(DEPS)
 io2_LDADD= @RDL_LIBS@ $(LDADDS)
 
+parse1_SOURCES=parse1.c
+parse1_LDFLAGS=
+parse1_DEPENDENCIES= $(DEPS)
+parse1_LDADD= @RDL_LIBS@ $(LDADDS)
+
+parse2_SOURCES=parse2.c
+parse2_LDFLAGS=
+parse2_DEPENDENCIES= $(DEPS)
+parse2_LDADD= @RDL_LIBS@ $(LDADDS)
+
+parse3_SOURCES=parse3.c
+parse3_LDFLAGS=
+parse3_DEPENDENCIES= $(DEPS)
+parse3_LDADD= @RDL_LIBS@ $(LDADDS)
+
+parse4_SOURCES=parse4.c
+parse4_LDFLAGS=
+parse4_DEPENDENCIES= $(DEPS)
+parse4_LDADD= @RDL_LIBS@ $(LDADDS)
+
 reader1_SOURCES=reader1.c
 reader1_LDFLAGS=
 reader1_DEPENDENCIES= $(DEPS)
@@ -39,6 +59,11 @@
 reader2_DEPENDENCIES= $(DEPS)
 reader2_LDADD= @RDL_LIBS@ $(LDADDS)
 
+reader3_SOURCES=reader3.c
+reader3_LDFLAGS=
+reader3_DEPENDENCIES= $(DEPS)
+reader3_LDADD= @RDL_LIBS@ $(LDADDS)
+
 reader4_SOURCES=reader4.c
 reader4_LDFLAGS=
 reader4_DEPENDENCIES= $(DEPS)
@@ -49,86 +74,61 @@
 testWriter_DEPENDENCIES= $(DEPS)
 testWriter_LDADD= @RDL_LIBS@ $(LDADDS)
 
-parse3_SOURCES=parse3.c
-parse3_LDFLAGS=
-parse3_DEPENDENCIES= $(DEPS)
-parse3_LDADD= @RDL_LIBS@ $(LDADDS)
+tree1_SOURCES=tree1.c
+tree1_LDFLAGS=
+tree1_DEPENDENCIES= $(DEPS)
+tree1_LDADD= @RDL_LIBS@ $(LDADDS)
 
 tree2_SOURCES=tree2.c
 tree2_LDFLAGS=
 tree2_DEPENDENCIES= $(DEPS)
 tree2_LDADD= @RDL_LIBS@ $(LDADDS)
 
-tree1_SOURCES=tree1.c
-tree1_LDFLAGS=
-tree1_DEPENDENCIES= $(DEPS)
-tree1_LDADD= @RDL_LIBS@ $(LDADDS)
+xpath1_SOURCES=xpath1.c
+xpath1_LDFLAGS=
+xpath1_DEPENDENCIES= $(DEPS)
+xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
 
 xpath2_SOURCES=xpath2.c
 xpath2_LDFLAGS=
 xpath2_DEPENDENCIES= $(DEPS)
 xpath2_LDADD= @RDL_LIBS@ $(LDADDS)
 
-parse1_SOURCES=parse1.c
-parse1_LDFLAGS=
-parse1_DEPENDENCIES= $(DEPS)
-parse1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-xpath1_SOURCES=xpath1.c
-xpath1_LDFLAGS=
-xpath1_DEPENDENCIES= $(DEPS)
-xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-io1_SOURCES=io1.c
-io1_LDFLAGS=
-io1_DEPENDENCIES= $(DEPS)
-io1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse4_SOURCES=parse4.c
-parse4_LDFLAGS=
-parse4_DEPENDENCIES= $(DEPS)
-parse4_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse2_SOURCES=parse2.c
-parse2_LDFLAGS=
-parse2_DEPENDENCIES= $(DEPS)
-parse2_LDADD= @RDL_LIBS@ $(LDADDS)
-
 valgrind: 
 	$(MAKE) CHECKER='valgrind' tests
 
 tests: $(noinst_PROGRAMS)
 	@(echo '## examples regression tests')
 	@(echo > .memdump)
-	@($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+	@($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse1 test1.xml)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse2 test2.xml)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse3)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse4 test3.xml)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse3)
+	@($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
+	@($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse1 test1.xml)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse4 test3.xml)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse2 test2.xml)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 
 

Modified: packages/libxml2/branches/upstream/current/doc/examples/Makefile.in
===================================================================
--- packages/libxml2/branches/upstream/current/doc/examples/Makefile.in	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/examples/Makefile.in	2006-01-06 18:12:46 UTC (rev 501)
@@ -38,11 +38,11 @@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = reader3$(EXEEXT) io2$(EXEEXT) reader1$(EXEEXT) \
-	reader2$(EXEEXT) reader4$(EXEEXT) testWriter$(EXEEXT) \
-	parse3$(EXEEXT) tree2$(EXEEXT) tree1$(EXEEXT) xpath2$(EXEEXT) \
-	parse1$(EXEEXT) xpath1$(EXEEXT) io1$(EXEEXT) parse4$(EXEEXT) \
-	parse2$(EXEEXT)
+noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \
+	parse2$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) \
+	reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \
+	reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \
+	tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT)
 subdir = doc/examples
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -325,15 +325,31 @@
 INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I at srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
 DEPS = $(top_builddir)/libxml2.la
 LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
-EXTRA_DIST = examples.xsl index.py test3.xml tst.xml test2.xml writer.xml test1.xml examples.xml xpath1.res tree2.res reader3.res tree1.res reader1.res xpath2.res reader4.res io2.res io1.res 
-reader3_SOURCES = reader3.c
-reader3_LDFLAGS = 
-reader3_DEPENDENCIES = $(DEPS)
-reader3_LDADD = @RDL_LIBS@ $(LDADDS)
+EXTRA_DIST = examples.xsl index.py examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res 
+io1_SOURCES = io1.c
+io1_LDFLAGS = 
+io1_DEPENDENCIES = $(DEPS)
+io1_LDADD = @RDL_LIBS@ $(LDADDS)
 io2_SOURCES = io2.c
 io2_LDFLAGS = 
 io2_DEPENDENCIES = $(DEPS)
 io2_LDADD = @RDL_LIBS@ $(LDADDS)
+parse1_SOURCES = parse1.c
+parse1_LDFLAGS = 
+parse1_DEPENDENCIES = $(DEPS)
+parse1_LDADD = @RDL_LIBS@ $(LDADDS)
+parse2_SOURCES = parse2.c
+parse2_LDFLAGS = 
+parse2_DEPENDENCIES = $(DEPS)
+parse2_LDADD = @RDL_LIBS@ $(LDADDS)
+parse3_SOURCES = parse3.c
+parse3_LDFLAGS = 
+parse3_DEPENDENCIES = $(DEPS)
+parse3_LDADD = @RDL_LIBS@ $(LDADDS)
+parse4_SOURCES = parse4.c
+parse4_LDFLAGS = 
+parse4_DEPENDENCIES = $(DEPS)
+parse4_LDADD = @RDL_LIBS@ $(LDADDS)
 reader1_SOURCES = reader1.c
 reader1_LDFLAGS = 
 reader1_DEPENDENCIES = $(DEPS)
@@ -342,6 +358,10 @@
 reader2_LDFLAGS = 
 reader2_DEPENDENCIES = $(DEPS)
 reader2_LDADD = @RDL_LIBS@ $(LDADDS)
+reader3_SOURCES = reader3.c
+reader3_LDFLAGS = 
+reader3_DEPENDENCIES = $(DEPS)
+reader3_LDADD = @RDL_LIBS@ $(LDADDS)
 reader4_SOURCES = reader4.c
 reader4_LDFLAGS = 
 reader4_DEPENDENCIES = $(DEPS)
@@ -350,42 +370,22 @@
 testWriter_LDFLAGS = 
 testWriter_DEPENDENCIES = $(DEPS)
 testWriter_LDADD = @RDL_LIBS@ $(LDADDS)
-parse3_SOURCES = parse3.c
-parse3_LDFLAGS = 
-parse3_DEPENDENCIES = $(DEPS)
-parse3_LDADD = @RDL_LIBS@ $(LDADDS)
+tree1_SOURCES = tree1.c
+tree1_LDFLAGS = 
+tree1_DEPENDENCIES = $(DEPS)
+tree1_LDADD = @RDL_LIBS@ $(LDADDS)
 tree2_SOURCES = tree2.c
 tree2_LDFLAGS = 
 tree2_DEPENDENCIES = $(DEPS)
 tree2_LDADD = @RDL_LIBS@ $(LDADDS)
-tree1_SOURCES = tree1.c
-tree1_LDFLAGS = 
-tree1_DEPENDENCIES = $(DEPS)
-tree1_LDADD = @RDL_LIBS@ $(LDADDS)
+xpath1_SOURCES = xpath1.c
+xpath1_LDFLAGS = 
+xpath1_DEPENDENCIES = $(DEPS)
+xpath1_LDADD = @RDL_LIBS@ $(LDADDS)
 xpath2_SOURCES = xpath2.c
 xpath2_LDFLAGS = 
 xpath2_DEPENDENCIES = $(DEPS)
 xpath2_LDADD = @RDL_LIBS@ $(LDADDS)
-parse1_SOURCES = parse1.c
-parse1_LDFLAGS = 
-parse1_DEPENDENCIES = $(DEPS)
-parse1_LDADD = @RDL_LIBS@ $(LDADDS)
-xpath1_SOURCES = xpath1.c
-xpath1_LDFLAGS = 
-xpath1_DEPENDENCIES = $(DEPS)
-xpath1_LDADD = @RDL_LIBS@ $(LDADDS)
-io1_SOURCES = io1.c
-io1_LDFLAGS = 
-io1_DEPENDENCIES = $(DEPS)
-io1_LDADD = @RDL_LIBS@ $(LDADDS)
-parse4_SOURCES = parse4.c
-parse4_LDFLAGS = 
-parse4_DEPENDENCIES = $(DEPS)
-parse4_LDADD = @RDL_LIBS@ $(LDADDS)
-parse2_SOURCES = parse2.c
-parse2_LDFLAGS = 
-parse2_DEPENDENCIES = $(DEPS)
-parse2_LDADD = @RDL_LIBS@ $(LDADDS)
 all: all-am
 
 .SUFFIXES:
@@ -710,36 +710,36 @@
 tests: $(noinst_PROGRAMS)
 	@(echo '## examples regression tests')
 	@(echo > .memdump)
-	@($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+	@($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse1 test1.xml)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse2 test2.xml)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse3)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./parse4 test3.xml)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+	@($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse3)
+	@($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
+	@($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 	@($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
 	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse1 test1.xml)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse4 test3.xml)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-	@($(CHECKER) ./parse2 test2.xml)
-	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

Modified: packages/libxml2/branches/upstream/current/doc/examples/examples.xml
===================================================================
--- packages/libxml2/branches/upstream/current/doc/examples/examples.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/examples/examples.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,28 +1,28 @@
 <examples>
-  <example filename='reader3.c'>
-    <synopsis>Show how to extract subdocuments with xmlReader</synopsis>
-    <purpose>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
-    <usage>reader3</usage>
-    <test>reader3 &gt; reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp</test>
+  <example filename='io1.c'>
+    <synopsis>Example of custom Input/Output</synopsis>
+    <purpose>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.</purpose>
+    <usage>io1</usage>
+    <test>io1 &gt; io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp</test>
     <author>Daniel Veillard</author>
     <copy>see Copyright for the status of this software. </copy>
-    <section>xmlReader</section>
+    <section>InputOutput</section>
     <includes>
-      <include>&lt;libxml/xmlreader.h&gt;</include>
+      <include>&lt;libxml/parser.h&gt;</include>
+      <include>&lt;libxml/xmlIO.h&gt;</include>
+      <include>&lt;libxml/xinclude.h&gt;</include>
+      <include>&lt;libxml/tree.h&gt;</include>
     </includes>
     <uses>
-      <function line='106' file='parser' name='xmlCleanupParser'/>
-      <typedef line='31' file='xmlreader' name='xmlTextReaderPtr'/>
-      <function line='110' file='xmlmemory' name='xmlMemoryDump'/>
-      <function line='99' file='tree' name='xmlFreeDoc'/>
-      <function line='65' file='xmlreader' name='xmlFreeTextReader'/>
-      <macro line='90' file='xmlversion' name='LIBXML_TEST_VERSION'/>
-      <function line='95' file='tree' name='xmlDocDump'/>
-      <function line='51' file='xmlreader' name='xmlTextReaderRead'/>
-      <function line='61' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
-      <function line='42' file='xmlreader' name='xmlTextReaderPreservePattern'/>
-      <function line='37' file='xmlreader' name='xmlReaderForFile'/>
-      <typedef line='76' file='tree' name='xmlDocPtr'/>
+      <function line='143' file='tree' name='xmlDocDump'/>
+      <function line='158' file='xmlmemory' name='xmlMemoryDump'/>
+      <function line='149' file='tree' name='xmlFreeDoc'/>
+      <function line='154' file='parser' name='xmlCleanupParser'/>
+      <macro line='117' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+      <function line='134' file='xinclude' name='xmlXIncludeProcess'/>
+      <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/>
+      <function line='124' file='parser' name='xmlReadMemory'/>
+      <typedef line='105' file='tree' name='xmlDocPtr'/>
     </uses>
   </example>
   <example filename='io2.c'>
@@ -48,6 +48,97 @@
       <function line='28' file='tree' name='xmlNewNode'/>
     </uses>
   </example>
+  <example filename='parse1.c'>
+    <synopsis>Parse an XML file to a tree and free it</synopsis>
+    <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+    <usage>parse1 test1.xml</usage>
+    <test>parse1 test1.xml</test>
+    <author>Daniel Veillard</author>
+    <copy>see Copyright for the status of this software. </copy>
+    <section>Parsing</section>
+    <includes>
+      <include>&lt;libxml/tree.h&gt;</include>
+      <include>&lt;libxml/parser.h&gt;</include>
+    </includes>
+    <uses>
+      <function line='54' file='xmlmemory' name='xmlMemoryDump'/>
+      <function line='50' file='parser' name='xmlCleanupParser'/>
+      <macro line='45' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+      <typedef line='24' file='tree' name='xmlDocPtr'/>
+      <function line='31' file='tree' name='xmlFreeDoc'/>
+      <function line='26' file='parser' name='xmlReadFile'/>
+    </uses>
+  </example>
+  <example filename='parse2.c'>
+    <synopsis>Parse and validate an XML file to a tree and free the result</synopsis>
+    <purpose>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</purpose>
+    <usage>parse2 test2.xml</usage>
+    <test>parse2 test2.xml</test>
+    <author>Daniel Veillard</author>
+    <copy>see Copyright for the status of this software. </copy>
+    <section>Parsing</section>
+    <includes>
+      <include>&lt;libxml/tree.h&gt;</include>
+      <include>&lt;libxml/parser.h&gt;</include>
+    </includes>
+    <uses>
+      <function line='47' file='parser' name='xmlFreeParserCtxt'/>
+      <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/>
+      <function line='29' file='parser' name='xmlNewParserCtxt'/>
+      <typedef line='25' file='tree' name='xmlParserCtxtPtr'/>
+      <function line='35' file='parser' name='xmlCtxtReadFile'/>
+      <function line='66' file='parser' name='xmlCleanupParser'/>
+      <macro line='61' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+      <function line='44' file='tree' name='xmlFreeDoc'/>
+      <typedef line='26' file='tree' name='xmlDocPtr'/>
+      <function line='70' file='xmlmemory' name='xmlMemoryDump'/>
+    </uses>
+  </example>
+  <example filename='parse3.c'>
+    <synopsis>Parse an XML document in memory to a tree and free it</synopsis>
+    <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+    <usage>parse3</usage>
+    <test>parse3</test>
+    <author>Daniel Veillard</author>
+    <copy>see Copyright for the status of this software. </copy>
+    <section>Parsing</section>
+    <includes>
+      <include>&lt;libxml/tree.h&gt;</include>
+      <include>&lt;libxml/parser.h&gt;</include>
+    </includes>
+    <uses>
+      <function line='33' file='parser' name='xmlReadMemory'/>
+      <function line='58' file='xmlmemory' name='xmlMemoryDump'/>
+      <function line='54' file='parser' name='xmlCleanupParser'/>
+      <macro line='49' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+      <function line='38' file='tree' name='xmlFreeDoc'/>
+      <typedef line='27' file='tree' name='xmlDocPtr'/>
+    </uses>
+  </example>
+  <example filename='parse4.c'>
+    <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis>
+    <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+    <usage>parse4 test3.xml</usage>
+    <test>parse4 test3.xml</test>
+    <author>Daniel Veillard</author>
+    <copy>see Copyright for the status of this software. </copy>
+    <section>Parsing</section>
+    <includes>
+      <include>&lt;libxml/tree.h&gt;</include>
+      <include>&lt;libxml/parser.h&gt;</include>
+    </includes>
+    <uses>
+      <function line='94' file='parser' name='xmlFreeParserCtxt'/>
+      <function line='86' file='parser' name='xmlParseChunk'/>
+      <function line='103' file='tree' name='xmlFreeDoc'/>
+      <function line='135' file='xmlmemory' name='xmlMemoryDump'/>
+      <function line='67' file='parser' name='xmlCreatePushParserCtxt'/>
+      <function line='131' file='parser' name='xmlCleanupParser'/>
+      <macro line='120' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+      <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
+      <typedef line='47' file='tree' name='xmlDocPtr'/>
+    </uses>
+  </example>
   <example filename='reader1.c'>
     <synopsis>Parse an XML file with an xmlReader</synopsis>
     <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
@@ -89,17 +180,14 @@
     </includes>
     <uses>
       <function line='45' file='xmlstring' name='xmlStrlen'/>
-      <function line='109' file='parser' name='xmlCleanupParser'/>
       <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/>
       <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/>
-      <function line='113' file='xmlmemory' name='xmlMemoryDump'/>
       <function line='34' file='xmlreader' name='xmlTextReaderConstValue'/>
       <enum line='70' file='parser' name='XML_PARSE_NOENT'/>
       <function line='37' file='xmlreader' name='xmlTextReaderDepth'/>
       <enum line='71' file='parser' name='XML_PARSE_DTDVALID'/>
       <enum line='69' file='parser' name='XML_PARSE_DTDATTR'/>
       <function line='84' file='xmlreader' name='xmlFreeTextReader'/>
-      <macro line='104' file='xmlversion' name='LIBXML_TEST_VERSION'/>
       <function line='30' file='xmlreader' name='xmlTextReaderConstName'/>
       <function line='41' file='xmlreader' name='xmlTextReaderHasValue'/>
       <function line='76' file='xmlreader' name='xmlTextReaderRead'/>
@@ -108,6 +196,27 @@
       <function line='81' file='xmlreader' name='xmlTextReaderIsValid'/>
     </uses>
   </example>
+  <example filename='reader3.c'>
+    <synopsis>Show how to extract subdocuments with xmlReader</synopsis>
+    <purpose>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+    <usage>reader3</usage>
+    <test>reader3 &gt; reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp</test>
+    <author>Daniel Veillard</author>
+    <copy>see Copyright for the status of this software. </copy>
+    <section>xmlReader</section>
+    <includes>
+      <include>&lt;libxml/xmlreader.h&gt;</include>
+    </includes>
+    <uses>
+      <typedef line='31' file='xmlreader' name='xmlTextReaderPtr'/>
+      <function line='65' file='xmlreader' name='xmlFreeTextReader'/>
+      <function line='95' file='tree' name='xmlDocDump'/>
+      <function line='51' file='xmlreader' name='xmlTextReaderRead'/>
+      <function line='61' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
+      <function line='42' file='xmlreader' name='xmlTextReaderPreservePattern'/>
+      <function line='37' file='xmlreader' name='xmlReaderForFile'/>
+    </uses>
+  </example>
   <example filename='reader4.c'>
     <synopsis>Parse multiple XML files reusing an xmlReader</synopsis>
     <purpose>Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context.  (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
@@ -120,17 +229,12 @@
       <include>&lt;libxml/xmlreader.h&gt;</include>
     </includes>
     <uses>
-      <function line='99' file='tree' name='xmlFreeDoc'/>
       <typedef line='54' file='xmlreader' name='xmlTextReaderPtr'/>
-      <function line='109' file='parser' name='xmlCleanupParser'/>
-      <function line='113' file='xmlmemory' name='xmlMemoryDump'/>
       <function line='83' file='xmlreader' name='xmlReaderNewFile'/>
       <function line='104' file='xmlreader' name='xmlFreeTextReader'/>
-      <macro line='72' file='xmlversion' name='LIBXML_TEST_VERSION'/>
       <function line='26' file='xmlreader' name='xmlTextReaderRead'/>
       <function line='97' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
       <function line='72' file='xmlreader' name='xmlReaderForFile'/>
-      <typedef line='56' file='tree' name='xmlDocPtr'/>
     </uses>
   </example>
   <example filename='testWriter.c'>
@@ -152,9 +256,7 @@
       <function line='925' file='xmlwriter' name='xmlTextWriterWriteComment'/>
       <function line='1156' file='encoding' name='xmlFindCharEncodingHandler'/>
       <variable line='1166' file='globals' name='xmlMalloc'/>
-      <typedef line='879' file='tree' name='xmlDocPtr'/>
       <typedef line='341' file='tree' name='xmlBufferPtr'/>
-      <function line='58' file='xmlmemory' name='xmlMemoryDump'/>
       <macro line='885' file='parser' name='XML_DEFAULT_VERSION'/>
       <function line='901' file='tree' name='xmlDocSetRootElement'/>
       <function line='1127' file='xmlwriter' name='xmlFreeTextWriter'/>
@@ -163,10 +265,8 @@
       <function line='1111' file='xmlwriter' name='xmlTextWriterEndElement'/>
       <function line='76' file='xmlwriter' name='xmlNewTextWriterFilename'/>
       <function line='959' file='xmlwriter' name='xmlTextWriterWriteFormatComment'/>
-      <function line='54' file='parser' name='xmlCleanupParser'/>
       <function line='1073' file='xmlwriter' name='xmlTextWriterWriteFormatElement'/>
       <typedef line='1151' file='encoding' name='xmlCharEncodingHandlerPtr'/>
-      <function line='1131' file='tree' name='xmlFreeDoc'/>
       <typedef line='880' file='tree' name='xmlNodePtr'/>
       <function line='949' file='xmlwriter' name='xmlTextWriterWriteAttribute'/>
       <function line='632' file='xmlwriter' name='xmlNewTextWriterDoc'/>
@@ -175,32 +275,28 @@
       <function line='904' file='xmlwriter' name='xmlNewTextWriterTree'/>
       <function line='355' file='xmlwriter' name='xmlNewTextWriterMemory'/>
       <variable line='1180' file='globals' name='xmlFree'/>
-      <macro line='40' file='xmlversion' name='LIBXML_TEST_VERSION'/>
       <function line='613' file='tree' name='xmlBufferFree'/>
       <typedef line='878' file='xmlwriter' name='xmlTextWriterPtr'/>
       <function line='1103' file='xmlwriter' name='xmlTextWriterWriteElement'/>
       <function line='885' file='tree' name='xmlNewDoc'/>
     </uses>
   </example>
-  <example filename='parse3.c'>
-    <synopsis>Parse an XML document in memory to a tree and free it</synopsis>
-    <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
-    <usage>parse3</usage>
-    <test>parse3</test>
-    <author>Daniel Veillard</author>
+  <example filename='tree1.c'>
+    <synopsis>Navigates a tree to print element names</synopsis>
+    <purpose>Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.</purpose>
+    <usage>tree1 filename_or_URL</usage>
+    <test>tree1 test2.xml &gt; tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp</test>
+    <author>Dodji Seketeli</author>
     <copy>see Copyright for the status of this software. </copy>
-    <section>Parsing</section>
+    <section>Tree</section>
     <includes>
       <include>&lt;libxml/tree.h&gt;</include>
       <include>&lt;libxml/parser.h&gt;</include>
     </includes>
     <uses>
-      <function line='33' file='parser' name='xmlReadMemory'/>
-      <function line='58' file='xmlmemory' name='xmlMemoryDump'/>
-      <function line='54' file='parser' name='xmlCleanupParser'/>
-      <macro line='49' file='xmlversion' name='LIBXML_TEST_VERSION'/>
-      <function line='38' file='tree' name='xmlFreeDoc'/>
-      <typedef line='27' file='tree' name='xmlDocPtr'/>
+      <enum line='36' file='tree' name='XML_ELEMENT_NODE'/>
+      <function line='74' file='tree' name='xmlDocGetRootElement'/>
+      <function line='67' file='parser' name='xmlReadFile'/>
     </uses>
   </example>
   <example filename='tree2.c'>
@@ -224,73 +320,9 @@
       <function line='88' file='tree' name='xmlNewChild'/>
       <function line='74' file='tree' name='xmlNewNode'/>
       <function line='46' file='tree' name='xmlCreateIntSubset'/>
-      <function line='99' file='tree' name='xmlFreeDoc'/>
       <function line='39' file='tree' name='xmlNewDoc'/>
     </uses>
   </example>
-  <example filename='tree1.c'>
-    <synopsis>Navigates a tree to print element names</synopsis>
-    <purpose>Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.</purpose>
-    <usage>tree1 filename_or_URL</usage>
-    <test>tree1 test2.xml &gt; tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp</test>
-    <author>Dodji Seketeli</author>
-    <copy>see Copyright for the status of this software. </copy>
-    <section>Tree</section>
-    <includes>
-      <include>&lt;libxml/tree.h&gt;</include>
-      <include>&lt;libxml/parser.h&gt;</include>
-    </includes>
-    <uses>
-      <enum line='36' file='tree' name='XML_ELEMENT_NODE'/>
-      <function line='74' file='tree' name='xmlDocGetRootElement'/>
-      <function line='67' file='parser' name='xmlReadFile'/>
-    </uses>
-  </example>
-  <example filename='xpath2.c'>
-    <synopsis>Load a document, locate subelements with XPath, modify said elements and save the resulting document.</synopsis>
-    <purpose>Shows how to make a full round-trip from a load/edit/save</purpose>
-    <usage>xpath2 &lt;xml-file&gt; &lt;xpath-expr&gt; &lt;new-value&gt;</usage>
-    <test>xpath2 test3.xml &apos;//discarded&apos; discarded &gt; xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp</test>
-    <author>Aleksey Sanin and Daniel Veillard</author>
-    <copy>see Copyright for the status of this software. </copy>
-    <section>XPath</section>
-    <includes>
-      <include>&lt;libxml/parser.h&gt;</include>
-      <include>&lt;libxml/xpath.h&gt;</include>
-      <include>&lt;libxml/xpathInternals.h&gt;</include>
-      <include>&lt;libxml/tree.h&gt;</include>
-    </includes>
-    <uses>
-      <function line='162' file='tree' name='xmlNodeSetContent'/>
-      <function line='127' file='tree' name='xmlDocDump'/>
-      <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
-      <function line='110' file='xpath' name='xmlXPathEvalExpression'/>
-      <function line='95' file='parser' name='xmlParseFile'/>
-      <function line='123' file='xpath' name='xmlXPathFreeObject'/>
-      <function line='102' file='xpath' name='xmlXPathNewContext'/>
-      <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
-      <function line='124' file='xpath' name='xmlXPathFreeContext'/>
-      <function line='41' file='parser' name='xmlInitParser'/>
-      <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/>
-      <typedef line='86' file='tree' name='xmlDocPtr'/>
-    </uses>
-  </example>
-  <example filename='parse1.c'>
-    <synopsis>Parse an XML file to a tree and free it</synopsis>
-    <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
-    <usage>parse1 test1.xml</usage>
-    <test>parse1 test1.xml</test>
-    <author>Daniel Veillard</author>
-    <copy>see Copyright for the status of this software. </copy>
-    <section>Parsing</section>
-    <includes>
-      <include>&lt;libxml/tree.h&gt;</include>
-      <include>&lt;libxml/parser.h&gt;</include>
-    </includes>
-    <uses>
-      <function line='26' file='parser' name='xmlReadFile'/>
-    </uses>
-  </example>
   <example filename='xpath1.c'>
     <synopsis>Evaluate XPath expression and prints result node set.</synopsis>
     <purpose>Shows how to evaluate XPath expression and register known namespaces in XPath context.</purpose>
@@ -324,74 +356,42 @@
       <enum line='217' file='tree' name='XML_NAMESPACE_DECL'/>
     </uses>
   </example>
-  <example filename='io1.c'>
-    <synopsis>Example of custom Input/Output</synopsis>
-    <purpose>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.</purpose>
-    <usage>io1</usage>
-    <test>io1 &gt; io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp</test>
-    <author>Daniel Veillard</author>
+  <example filename='xpath2.c'>
+    <synopsis>Load a document, locate subelements with XPath, modify said elements and save the resulting document.</synopsis>
+    <purpose>Shows how to make a full round-trip from a load/edit/save</purpose>
+    <usage>xpath2 &lt;xml-file&gt; &lt;xpath-expr&gt; &lt;new-value&gt;</usage>
+    <test>xpath2 test3.xml &apos;//discarded&apos; discarded &gt; xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp</test>
+    <author>Aleksey Sanin and Daniel Veillard</author>
     <copy>see Copyright for the status of this software. </copy>
-    <section>InputOutput</section>
+    <section>XPath</section>
     <includes>
       <include>&lt;libxml/parser.h&gt;</include>
-      <include>&lt;libxml/xmlIO.h&gt;</include>
-      <include>&lt;libxml/xinclude.h&gt;</include>
+      <include>&lt;libxml/xpath.h&gt;</include>
+      <include>&lt;libxml/xpathInternals.h&gt;</include>
       <include>&lt;libxml/tree.h&gt;</include>
     </includes>
     <uses>
-      <function line='143' file='tree' name='xmlDocDump'/>
-      <function line='134' file='xinclude' name='xmlXIncludeProcess'/>
-      <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/>
-      <function line='124' file='parser' name='xmlReadMemory'/>
+      <function line='162' file='tree' name='xmlNodeSetContent'/>
+      <function line='127' file='tree' name='xmlDocDump'/>
+      <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
+      <function line='110' file='xpath' name='xmlXPathEvalExpression'/>
+      <function line='95' file='parser' name='xmlParseFile'/>
+      <function line='123' file='xpath' name='xmlXPathFreeObject'/>
+      <function line='102' file='xpath' name='xmlXPathNewContext'/>
+      <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
+      <function line='124' file='xpath' name='xmlXPathFreeContext'/>
+      <function line='41' file='parser' name='xmlInitParser'/>
+      <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/>
     </uses>
   </example>
-  <example filename='parse4.c'>
-    <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis>
-    <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
-    <usage>parse4 test3.xml</usage>
-    <test>parse4 test3.xml</test>
-    <author>Daniel Veillard</author>
-    <copy>see Copyright for the status of this software. </copy>
-    <section>Parsing</section>
-    <includes>
-      <include>&lt;libxml/tree.h&gt;</include>
-      <include>&lt;libxml/parser.h&gt;</include>
-    </includes>
-    <uses>
-      <function line='94' file='parser' name='xmlFreeParserCtxt'/>
-      <function line='86' file='parser' name='xmlParseChunk'/>
-      <function line='67' file='parser' name='xmlCreatePushParserCtxt'/>
-      <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
-    </uses>
-  </example>
-  <example filename='parse2.c'>
-    <synopsis>Parse and validate an XML file to a tree and free the result</synopsis>
-    <purpose>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</purpose>
-    <usage>parse2 test2.xml</usage>
-    <test>parse2 test2.xml</test>
-    <author>Daniel Veillard</author>
-    <copy>see Copyright for the status of this software. </copy>
-    <section>Parsing</section>
-    <includes>
-      <include>&lt;libxml/tree.h&gt;</include>
-      <include>&lt;libxml/parser.h&gt;</include>
-    </includes>
-    <uses>
-      <function line='47' file='parser' name='xmlFreeParserCtxt'/>
-      <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/>
-      <function line='29' file='parser' name='xmlNewParserCtxt'/>
-      <typedef line='25' file='tree' name='xmlParserCtxtPtr'/>
-      <function line='35' file='parser' name='xmlCtxtReadFile'/>
-    </uses>
-  </example>
   <symbols>
     <symbol name='LIBXML_TEST_VERSION'>
-      <ref filename='reader3.c'/>
+      <ref filename='io1.c'/>
+      <ref filename='parse1.c'/>
+      <ref filename='parse2.c'/>
+      <ref filename='parse3.c'/>
+      <ref filename='parse4.c'/>
       <ref filename='reader1.c'/>
-      <ref filename='reader2.c'/>
-      <ref filename='reader4.c'/>
-      <ref filename='testWriter.c'/>
-      <ref filename='parse3.c'/>
     </symbol>
     <symbol name='XML_DEFAULT_VERSION'>
       <ref filename='testWriter.c'/>
@@ -401,15 +401,15 @@
       <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='XML_NAMESPACE_DECL'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='XML_PARSE_DTDATTR'>
       <ref filename='reader2.c'/>
     </symbol>
     <symbol name='XML_PARSE_DTDVALID'>
+      <ref filename='parse2.c'/>
       <ref filename='reader2.c'/>
-      <ref filename='parse2.c'/>
     </symbol>
     <symbol name='XML_PARSE_NOENT'>
       <ref filename='reader2.c'/>
@@ -430,12 +430,12 @@
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlCleanupParser'>
-      <ref filename='reader3.c'/>
+      <ref filename='io1.c'/>
+      <ref filename='parse1.c'/>
+      <ref filename='parse2.c'/>
+      <ref filename='parse3.c'/>
+      <ref filename='parse4.c'/>
       <ref filename='reader1.c'/>
-      <ref filename='reader2.c'/>
-      <ref filename='reader4.c'/>
-      <ref filename='testWriter.c'/>
-      <ref filename='parse3.c'/>
     </symbol>
     <symbol name='xmlCreateIntSubset'>
       <ref filename='tree2.c'/>
@@ -447,9 +447,9 @@
       <ref filename='parse2.c'/>
     </symbol>
     <symbol name='xmlDocDump'>
+      <ref filename='io1.c'/>
       <ref filename='reader3.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='io1.c'/>
     </symbol>
     <symbol name='xmlDocDumpFormatMemory'>
       <ref filename='io2.c'/>
@@ -458,12 +458,12 @@
       <ref filename='tree1.c'/>
     </symbol>
     <symbol name='xmlDocPtr'>
-      <ref filename='reader3.c'/>
+      <ref filename='io1.c'/>
       <ref filename='io2.c'/>
-      <ref filename='reader4.c'/>
-      <ref filename='testWriter.c'/>
+      <ref filename='parse1.c'/>
+      <ref filename='parse2.c'/>
       <ref filename='parse3.c'/>
-      <ref filename='xpath2.c'/>
+      <ref filename='parse4.c'/>
     </symbol>
     <symbol name='xmlDocSetRootElement'>
       <ref filename='io2.c'/>
@@ -479,40 +479,40 @@
       <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlFreeDoc'>
-      <ref filename='reader3.c'/>
+      <ref filename='io1.c'/>
       <ref filename='io2.c'/>
-      <ref filename='reader4.c'/>
-      <ref filename='testWriter.c'/>
+      <ref filename='parse1.c'/>
+      <ref filename='parse2.c'/>
       <ref filename='parse3.c'/>
-      <ref filename='tree2.c'/>
+      <ref filename='parse4.c'/>
     </symbol>
     <symbol name='xmlFreeParserCtxt'>
+      <ref filename='parse2.c'/>
       <ref filename='parse4.c'/>
-      <ref filename='parse2.c'/>
     </symbol>
     <symbol name='xmlFreeTextReader'>
-      <ref filename='reader3.c'/>
       <ref filename='reader1.c'/>
       <ref filename='reader2.c'/>
+      <ref filename='reader3.c'/>
       <ref filename='reader4.c'/>
     </symbol>
     <symbol name='xmlFreeTextWriter'>
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlInitParser'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlMalloc'>
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlMemoryDump'>
-      <ref filename='reader3.c'/>
+      <ref filename='io1.c'/>
+      <ref filename='parse1.c'/>
+      <ref filename='parse2.c'/>
+      <ref filename='parse3.c'/>
+      <ref filename='parse4.c'/>
       <ref filename='reader1.c'/>
-      <ref filename='reader2.c'/>
-      <ref filename='reader4.c'/>
-      <ref filename='testWriter.c'/>
-      <ref filename='parse3.c'/>
     </symbol>
     <symbol name='xmlNewChild'>
       <ref filename='tree2.c'/>
@@ -566,25 +566,25 @@
       <ref filename='parse4.c'/>
     </symbol>
     <symbol name='xmlParseFile'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlParserCtxtPtr'>
+      <ref filename='parse2.c'/>
       <ref filename='parse4.c'/>
-      <ref filename='parse2.c'/>
     </symbol>
     <symbol name='xmlReadFile'>
+      <ref filename='parse1.c'/>
       <ref filename='tree1.c'/>
-      <ref filename='parse1.c'/>
     </symbol>
     <symbol name='xmlReadMemory'>
+      <ref filename='io1.c'/>
       <ref filename='parse3.c'/>
-      <ref filename='io1.c'/>
     </symbol>
     <symbol name='xmlReaderForFile'>
-      <ref filename='reader3.c'/>
       <ref filename='reader1.c'/>
       <ref filename='reader2.c'/>
+      <ref filename='reader3.c'/>
       <ref filename='reader4.c'/>
     </symbol>
     <symbol name='xmlReaderNewFile'>
@@ -647,15 +647,15 @@
       <ref filename='reader3.c'/>
     </symbol>
     <symbol name='xmlTextReaderPtr'>
-      <ref filename='reader3.c'/>
       <ref filename='reader1.c'/>
       <ref filename='reader2.c'/>
+      <ref filename='reader3.c'/>
       <ref filename='reader4.c'/>
     </symbol>
     <symbol name='xmlTextReaderRead'>
-      <ref filename='reader3.c'/>
       <ref filename='reader1.c'/>
       <ref filename='reader2.c'/>
+      <ref filename='reader3.c'/>
       <ref filename='reader4.c'/>
     </symbol>
     <symbol name='xmlTextWriterEndDocument'>
@@ -692,28 +692,28 @@
       <ref filename='io1.c'/>
     </symbol>
     <symbol name='xmlXPathContextPtr'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlXPathEvalExpression'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlXPathFreeContext'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlXPathFreeObject'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlXPathNewContext'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlXPathObjectPtr'>
+      <ref filename='xpath1.c'/>
       <ref filename='xpath2.c'/>
-      <ref filename='xpath1.c'/>
     </symbol>
     <symbol name='xmlXPathRegisterNs'>
       <ref filename='xpath1.c'/>
@@ -721,27 +721,27 @@
   </symbols>
   <sections>
     <section name='InputOutput'>
+      <example filename='io1.c'/>
       <example filename='io2.c'/>
-      <example filename='io1.c'/>
     </section>
     <section name='Parsing'>
+      <example filename='parse1.c'/>
+      <example filename='parse2.c'/>
       <example filename='parse3.c'/>
-      <example filename='parse1.c'/>
       <example filename='parse4.c'/>
-      <example filename='parse2.c'/>
     </section>
     <section name='Tree'>
+      <example filename='tree1.c'/>
       <example filename='tree2.c'/>
-      <example filename='tree1.c'/>
     </section>
     <section name='XPath'>
+      <example filename='xpath1.c'/>
       <example filename='xpath2.c'/>
-      <example filename='xpath1.c'/>
     </section>
     <section name='xmlReader'>
-      <example filename='reader3.c'/>
       <example filename='reader1.c'/>
       <example filename='reader2.c'/>
+      <example filename='reader3.c'/>
       <example filename='reader4.c'/>
     </section>
     <section name='xmlWriter'>

Modified: packages/libxml2/branches/upstream/current/doc/help.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/help.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/help.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>How to help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>How to help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>You can help the project in various ways, the best thing to do first is to
+</style><title>How to help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>How to help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>You can help the project in various ways, the best thing to do first is to
 subscribe to the mailing-list as explained before, check the <a href="http://mail.gnome.org/archives/xml/">archives </a>and the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome bug
 database</a>:</p><ol><li>Provide patches when you find problems.</li>
   <li>Provide the diffs when you port libxml2 to a new platform. They may not

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-HTMLtree.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-HTMLtree.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-HTMLtree.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -14,6 +14,7 @@
 <pre class="programlisting">void	<a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a>	(<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br />					 const char * encoding)</pre>
 <pre class="programlisting">int	<a href="#htmlDocDump">htmlDocDump</a>			(FILE * f, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)</pre>
 <pre class="programlisting">void	<a href="#htmlDocDumpMemory">htmlDocDumpMemory</a>		(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br />					 <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br />					 int * size)</pre>
+<pre class="programlisting">void	<a href="#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a>		(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br />					 <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br />					 int * size, <br />					 int format)</pre>
 <pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#htmlGetMetaEncoding">htmlGetMetaEncoding</a>	(<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)</pre>
 <pre class="programlisting">int	<a href="#htmlIsBooleanAttr">htmlIsBooleanAttr</a>		(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
 <pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a>	<a href="#htmlNewDoc">htmlNewDoc</a>		(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)</pre>
@@ -41,7 +42,9 @@
 </pre><p>Dump an HTML document to an open FILE.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="htmlDocDumpMemory" id="htmlDocDumpMemory"></a>Function: htmlDocDumpMemory</h3><pre class="programlisting">void	htmlDocDumpMemory		(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br />					 <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br />					 int * size)<br />
 </pre><p>Dump an HTML document in memory and return the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div><h3><a name="htmlGetMetaEncoding" id="htmlGetMetaEncoding"></a>Function: htmlGetMetaEncoding</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	htmlGetMetaEncoding	(<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div><h3><a name="htmlDocDumpMemoryFormat" id="htmlDocDumpMemoryFormat"></a>Function: htmlDocDumpMemoryFormat</h3><pre class="programlisting">void	htmlDocDumpMemoryFormat		(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br />					 <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br />					 int * size, <br />					 int format)<br />
+</pre><p>Dump an HTML document in memory and return the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div><h3><a name="htmlGetMetaEncoding" id="htmlGetMetaEncoding"></a>Function: htmlGetMetaEncoding</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	htmlGetMetaEncoding	(<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br />
 </pre><p>Encoding definition lookup in the Meta tags</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current encoding as flagged in the HTML source</td></tr></tbody></table></div><h3><a name="htmlIsBooleanAttr" id="htmlIsBooleanAttr"></a>Function: htmlIsBooleanAttr</h3><pre class="programlisting">int	htmlIsBooleanAttr		(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
 </pre><p>Determine if a given <a href="libxml-SAX.html#attribute">attribute</a> is a boolean attribute.</p>

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-pattern.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-pattern.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-pattern.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -30,6 +30,8 @@
 <pre class="programlisting">int	<a href="#xmlStreamPop">xmlStreamPop</a>			(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)</pre>
 <pre class="programlisting">int	<a href="#xmlStreamPush">xmlStreamPush</a>			(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre>
 <pre class="programlisting">int	<a href="#xmlStreamPushAttr">xmlStreamPushAttr</a>		(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre>
+<pre class="programlisting">int	<a href="#xmlStreamPushNode">xmlStreamPushNode</a>		(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br />					 int nodeType)</pre>
+<pre class="programlisting">int	<a href="#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a>		(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)</pre>
 <h2>Description</h2>
 <h3><a name="xmlPattern" id="xmlPattern">Structure xmlPattern</a></h3><pre class="programlisting">Structure xmlPattern<br />struct _xmlPattern {
 The content of this structure is not made public by the API.
@@ -64,7 +66,11 @@
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>the pattern to compile</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>an optional dictionary for interned strings</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>compilation flags, see <a href="libxml-pattern.html#xmlPatternFlags">xmlPatternFlags</a></td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled form of the pattern or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlStreamPop" id="xmlStreamPop"></a>Function: xmlStreamPop</h3><pre class="programlisting">int	xmlStreamPop			(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br />
 </pre><p>push one level from the stream.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPush" id="xmlStreamPush"></a>Function: xmlStreamPush</h3><pre class="programlisting">int	xmlStreamPush			(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br />
-</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p>
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPushAttr" id="xmlStreamPushAttr"></a>Function: xmlStreamPushAttr</h3><pre class="programlisting">int	xmlStreamPushAttr		(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br />
-</pre><p>Push new <a href="libxml-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
+</pre><p>Push new <a href="libxml-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPushNode" id="xmlStreamPushNode"></a>Function: xmlStreamPushNode</h3><pre class="programlisting">int	xmlStreamPushNode		(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br />					 int nodeType)<br />
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>nodeType</tt></i>:</span></td><td>the type of the node being pushed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamWantsAnyNode" id="xmlStreamWantsAnyNode"></a>Function: xmlStreamWantsAnyNode</h3><pre class="programlisting">int	xmlStreamWantsAnyNode		(<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)<br />
+</pre><p>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>streamCtxt</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-relaxng.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-relaxng.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-relaxng.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -131,7 +131,7 @@
 <div class="variablelist"><table border="0"><col align="left" /><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"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewValidCtxt" id="xmlRelaxNGNewValidCtxt"></a>Function: xmlRelaxNGNewValidCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a>	xmlRelaxNGNewValidCtxt	(<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br />
 </pre><p>Create an XML RelaxNGs validation context based on the given schema</p>
 <div class="variablelist"><table border="0"><col align="left" /><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"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGParse" id="xmlRelaxNGParse"></a>Function: xmlRelaxNGParse</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a>	xmlRelaxNGParse		(<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br />
-</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>
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
 <div class="variablelist"><table border="0"><col align="left" /><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"><i><tt>Returns</tt></i>:</span></td><td>the internal XML RelaxNG structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGSetParserErrors" id="xmlRelaxNGSetParserErrors"></a>Function: xmlRelaxNGSetParserErrors</h3><pre class="programlisting">void	xmlRelaxNGSetParserErrors	(<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br />					 <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br />					 void * ctx)<br />
 </pre><p>Set the callback functions used to handle errors for a validation context</p>
 <div class="variablelist"><table border="0"><col align="left" /><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><h3><a name="xmlRelaxNGSetValidErrors" id="xmlRelaxNGSetValidErrors"></a>Function: xmlRelaxNGSetValidErrors</h3><pre class="programlisting">void	xmlRelaxNGSetValidErrors	(<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br />					 <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br />					 void * ctx)<br />

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-schemasInternals.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-schemasInternals.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-schemasInternals.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -10,7 +10,7 @@
 </style><style type="text/css">
       div.deprecated pre.programlisting {border-style: double;border-color:red}
       pre.programlisting {border-style: double;background: #EECFA1}
-    </style><title>Module schemasInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schemasInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-relaxng.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-schematron.html">schematron</a></th><td><a accesskey="n" href="libxml-schematron.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for the XML Schemas handling and schema validity checking </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a></pre><pre class="programlisting">Structure <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a><br />struct _xmlSchemaAnnot
+    </style><title>Module schemasInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schemasInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-relaxng.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-schematron.html">schematron</a></th><td><a accesskey="n" href="libxml-schematron.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a></pre><pre class="programlisting">Structure <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a><br />struct _xmlSchemaAnnot
 </pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a> * <a name="xmlSchemaAnnotPtr" id="xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>
 </pre><pre class="programlisting">Structure <a href="#xmlSchemaAttribute">xmlSchemaAttribute</a><br />struct _xmlSchemaAttribute
 </pre><pre class="programlisting">Structure <a href="#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a><br />struct _xmlSchemaAttributeGroup
@@ -50,7 +50,9 @@
 <h3><a name="XML_SCHEMAS_ANY_SKIP" id="XML_SCHEMAS_ANY_SKIP"></a>Macro: XML_SCHEMAS_ANY_SKIP</h3><pre>#define XML_SCHEMAS_ANY_SKIP</pre><p>Skip unknown <a href="libxml-SAX.html#attribute">attribute</a> from validation</p>
 <h3><a name="XML_SCHEMAS_ANY_STRICT" id="XML_SCHEMAS_ANY_STRICT"></a>Macro: XML_SCHEMAS_ANY_STRICT</h3><pre>#define XML_SCHEMAS_ANY_STRICT</pre><p>Used by wildcards. Apply strict validation rules</p>
 <h3><a name="XML_SCHEMAS_ATTRGROUP_GLOBAL" id="XML_SCHEMAS_ATTRGROUP_GLOBAL"></a>Macro: XML_SCHEMAS_ATTRGROUP_GLOBAL</h3><pre>#define XML_SCHEMAS_ATTRGROUP_GLOBAL</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
+<h3><a name="XML_SCHEMAS_ATTRGROUP_HAS_REFS" id="XML_SCHEMAS_ATTRGROUP_HAS_REFS"></a>Macro: XML_SCHEMAS_ATTRGROUP_HAS_REFS</h3><pre>#define XML_SCHEMAS_ATTRGROUP_HAS_REFS</pre><p>Whether this attr. group contains attr. group references.</p>
 <h3><a name="XML_SCHEMAS_ATTRGROUP_MARKED" id="XML_SCHEMAS_ATTRGROUP_MARKED"></a>Macro: XML_SCHEMAS_ATTRGROUP_MARKED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_MARKED</pre><p>Marks the attr group as marked; used for circular checks.</p>
+<h3><a name="XML_SCHEMAS_ATTRGROUP_REDEFINED" id="XML_SCHEMAS_ATTRGROUP_REDEFINED"></a>Macro: XML_SCHEMAS_ATTRGROUP_REDEFINED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_REDEFINED</pre><p>The attr group was redefined.</p>
 <h3><a name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED" id="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED"></a>Macro: XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
 <h3><a name="XML_SCHEMAS_ATTR_FIXED" id="XML_SCHEMAS_ATTR_FIXED"></a>Macro: XML_SCHEMAS_ATTR_FIXED</h3><pre>#define XML_SCHEMAS_ATTR_FIXED</pre><p>the <a href="libxml-SAX.html#attribute">attribute</a> has a fixed value</p>
 <h3><a name="XML_SCHEMAS_ATTR_GLOBAL" id="XML_SCHEMAS_ATTR_GLOBAL"></a>Macro: XML_SCHEMAS_ATTR_GLOBAL</h3><pre>#define XML_SCHEMAS_ATTR_GLOBAL</pre><p>allow elements in no namespace</p>
@@ -114,7 +116,8 @@
 <h3><a name="XML_SCHEMAS_TYPE_MIXED" id="XML_SCHEMAS_TYPE_MIXED"></a>Macro: XML_SCHEMAS_TYPE_MIXED</h3><pre>#define XML_SCHEMAS_TYPE_MIXED</pre><p>the element content type is mixed</p>
 <h3><a name="XML_SCHEMAS_TYPE_NORMVALUENEEDED" id="XML_SCHEMAS_TYPE_NORMVALUENEEDED"></a>Macro: XML_SCHEMAS_TYPE_NORMVALUENEEDED</h3><pre>#define XML_SCHEMAS_TYPE_NORMVALUENEEDED</pre><p>indicates if the facets (pattern) need a normalized value</p>
 <h3><a name="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD" id="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD"></a>Macro: XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</h3><pre>#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</pre><p>the complexType owns an <a href="libxml-SAX.html#attribute">attribute</a> wildcard, i.e. it can be freed by the complexType</p>
-<h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" id="XML_SCHEMAS_TYPE_VARIETY_ABSENT"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ABSENT</pre><p>the simpleType has a variety of "absent".</p>
+<h3><a name="XML_SCHEMAS_TYPE_REDEFINED" id="XML_SCHEMAS_TYPE_REDEFINED"></a>Macro: XML_SCHEMAS_TYPE_REDEFINED</h3><pre>#define XML_SCHEMAS_TYPE_REDEFINED</pre><p>The type was redefined.</p>
+<h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" id="XML_SCHEMAS_TYPE_VARIETY_ABSENT"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ABSENT</pre><p>the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.</p>
 <h3><a name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC" id="XML_SCHEMAS_TYPE_VARIETY_ATOMIC"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ATOMIC</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC</pre><p>the simpleType has a variety of "union".</p>
 <h3><a name="XML_SCHEMAS_TYPE_VARIETY_LIST" id="XML_SCHEMAS_TYPE_VARIETY_LIST"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_LIST</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_LIST</pre><p>the simpleType has a variety of "list".</p>
 <h3><a name="XML_SCHEMAS_TYPE_VARIETY_UNION" id="XML_SCHEMAS_TYPE_VARIETY_UNION"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_UNION</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_UNION</pre><p>the simpleType has a variety of "union".</p>
@@ -126,40 +129,41 @@
     struct _xmlSchemaAnnot *	next
     <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	content	: the annotation
 }</pre><h3><a name="xmlSchemaAttribute" id="xmlSchemaAttribute">Structure xmlSchemaAttribute</a></h3><pre class="programlisting">Structure xmlSchemaAttribute<br />struct _xmlSchemaAttribute {
-    <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
-    struct _xmlSchemaAttribute *	next	: the next <a href="libxml-SAX.html#attribute">attribute</a> if in a group ...
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	name	: name of the declaration or empty if par
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref	: the local name of the <a href="libxml-SAX.html#attribute">attribute</a> decl. i
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: the ns URI of the <a href="libxml-SAX.html#attribute">attribute</a> decl. if a
+    <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type
+    struct _xmlSchemaAttribute *	next	: the next <a href="libxml-SAX.html#attribute">attribute</a> (not used?)
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	name	: the name of the declaration
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	typeName	: the local name of the type definition
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	typeNs	: the ns URI of the type definition
     <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
-    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	base	: obsolete, not used
-    int	occurs
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	defValue
+    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	base	: Deprecated; not used
+    int	occurs	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	defValue	: The initial value of the value constrai
     <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	subtypes	: the type definition
     <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	node
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
     int	flags
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal
-    <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	refDecl
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal	: The compiled value constraint
+    <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	refDecl	: Deprecated; not used
 }</pre><h3><a name="xmlSchemaAttributeGroup" id="xmlSchemaAttributeGroup">Structure xmlSchemaAttributeGroup</a></h3><pre class="programlisting">Structure xmlSchemaAttributeGroup<br />struct _xmlSchemaAttributeGroup {
     <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
     struct _xmlSchemaAttribute *	next	: the next <a href="libxml-SAX.html#attribute">attribute</a> if in a group ...
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	name
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
-    <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes
+    <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes	: Deprecated; not used
     <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	node
     int	flags
     <a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a>	attributeWildcard
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a>	refItem	: The referenced <a href="libxml-SAX.html#attribute">attribute</a> group
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace	: <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> redef Redefi
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a>	refItem	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
+    void *	attrUses
 }</pre><h3><a name="xmlSchemaAttributeLink" id="xmlSchemaAttributeLink">Structure xmlSchemaAttributeLink</a></h3><pre class="programlisting">Structure xmlSchemaAttributeLink<br />struct _xmlSchemaAttributeLink {
     struct _xmlSchemaAttributeLink *	next	: the next <a href="libxml-SAX.html#attribute">attribute</a> link ...
     struct _xmlSchemaAttribute *	attr	: the linked <a href="libxml-SAX.html#attribute">attribute</a>
@@ -169,23 +173,23 @@
     <a name="XML_SCHEMA_CONTENT_ELEMENTS" id="XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a> = 2
     <a name="XML_SCHEMA_CONTENT_MIXED" id="XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a> = 3
     <a name="XML_SCHEMA_CONTENT_SIMPLE" id="XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a> = 4
-    <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" id="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 : obsolete, not used
+    <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" id="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 : Obsolete
     <a name="XML_SCHEMA_CONTENT_BASIC" id="XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a> = 6
     <a name="XML_SCHEMA_CONTENT_ANY" id="XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a> = 7
 }
 </pre><h3><a name="xmlSchemaElement" id="xmlSchemaElement">Structure xmlSchemaElement</a></h3><pre class="programlisting">Structure xmlSchemaElement<br />struct _xmlSchemaElement {
     <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
-    struct _xmlSchemaType *	next	: the next type if in a sequence ...
+    struct _xmlSchemaType *	next	: Not used?
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	name
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref	: the local name of the element declarati
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: the ns URI of the element declaration i
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	subtypes	: the type definition
     <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes
     <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	minOccurs
-    int	maxOccurs
+    int	minOccurs	: Deprecated; not used
+    int	maxOccurs	: Deprecated; not used
     int	flags
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	namedType
@@ -193,24 +197,24 @@
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	substGroup
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	substGroupNs
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	scope
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	value
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	value	: The original value of the value constra
     struct _xmlSchemaElement *	refDecl	: This will now be used for the substitut
-    <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel
+    <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel	: Obsolete for WXS, maybe used for RelaxN
     <a href="libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a>	contentType
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal
-    void *	idcs
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	defVal	: The compiled value contraint.
+    void *	idcs	: The identity-constraint defs
 }</pre><h3><a name="xmlSchemaFacet" id="xmlSchemaFacet">Structure xmlSchemaFacet</a></h3><pre class="programlisting">Structure xmlSchemaFacet<br />struct _xmlSchemaFacet {
     <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
     struct _xmlSchemaFacet *	next	: the next type if in a sequence ...
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	value
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	value	: The original value
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id	: Obsolete
     <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	fixed
+    int	fixed	: XML_SCHEMAS_FACET_PRESERVE, etc.
     int	whitespace
-    <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	val
-    <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	regexp
+    <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	val	: The compiled value
+    <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	regexp	: The regex for patterns
 }</pre><h3><a name="xmlSchemaFacetLink" id="xmlSchemaFacetLink">Structure xmlSchemaFacetLink</a></h3><pre class="programlisting">Structure xmlSchemaFacetLink<br />struct _xmlSchemaFacetLink {
     struct _xmlSchemaFacetLink *	next	: the next facet link ...
     <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a>	facet	: the linked facet
@@ -224,35 +228,36 @@
     <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
     struct _xmlSchemaType *	next	: the next type if in a sequence ...
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	name
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	ref	: Deprecated; not used
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refNs	: Deprecated; not used
     <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	subtypes
-    <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes
+    <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>	attributes	: Deprecated; not used
     <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	minOccurs
-    int	maxOccurs
+    int	minOccurs	: Deprecated; not used
+    int	maxOccurs	: Deprecated; not used
     int	flags
     <a href="libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a>	contentType
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	base
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	baseNs
-    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	baseType
-    <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a>	facets
-    struct _xmlSchemaType *	redef	: possible redefinitions for the type
-    int	recurse
-    <a href="libxml-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a>	attributeUses
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	base	: Base type's local name
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	baseNs	: Base type's target namespace
+    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	baseType	: The base type component
+    <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a>	facets	: Local facets
+    struct _xmlSchemaType *	redef	: Deprecated; not used
+    int	recurse	: Obsolete
+    <a href="libxml-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> *	attributeUses	: Deprecated; not used
     <a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a>	attributeWildcard
-    int	builtInType
-    <a href="libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a>	memberTypes
-    <a href="libxml-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a>	facetSet
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix
-    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	contentTypeDef
-    <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel
+    int	builtInType	: Type of built-in types.
+    <a href="libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a>	memberTypes	: member-types if a union type.
+    <a href="libxml-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a>	facetSet	: All facets (incl. inherited)
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	refPrefix	: Deprecated; not used
+    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	contentTypeDef	: Used for the simple content of complex
+    <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	contModel	: Holds the automaton of the content mode
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace
+    void *	attrUses
 }</pre><h3><a name="xmlSchemaTypeLink" id="xmlSchemaTypeLink">Structure xmlSchemaTypeLink</a></h3><pre class="programlisting">Structure xmlSchemaTypeLink<br />struct _xmlSchemaTypeLink {
     struct _xmlSchemaTypeLink *	next	: the next type link ...
-    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	type	: the linked typ
+    <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	type	: the linked type
 }</pre><h3>Enum <a name="xmlSchemaTypeType" id="xmlSchemaTypeType">xmlSchemaTypeType</a></h3><pre class="programlisting">Enum xmlSchemaTypeType {
     <a name="XML_SCHEMA_TYPE_BASIC" id="XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a> = 1 : A built-in datatype
     <a name="XML_SCHEMA_TYPE_ANY" id="XML_SCHEMA_TYPE_ANY">XML_SCHEMA_TYPE_ANY</a> = 2
@@ -279,6 +284,7 @@
     <a name="XML_SCHEMA_TYPE_IDC_KEY" id="XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a> = 23
     <a name="XML_SCHEMA_TYPE_IDC_KEYREF" id="XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a> = 24
     <a name="XML_SCHEMA_TYPE_PARTICLE" id="XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a> = 25
+    <a name="XML_SCHEMA_TYPE_ATTRIBUTE_USE" id="XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a> = 26
     <a name="XML_SCHEMA_FACET_MININCLUSIVE" id="XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a> = 1000
     <a name="XML_SCHEMA_FACET_MINEXCLUSIVE" id="XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a> = 1001
     <a name="XML_SCHEMA_FACET_MAXINCLUSIVE" id="XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a> = 1002
@@ -292,6 +298,7 @@
     <a name="XML_SCHEMA_FACET_MAXLENGTH" id="XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a> = 1010
     <a name="XML_SCHEMA_FACET_MINLENGTH" id="XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a> = 1011
     <a name="XML_SCHEMA_EXTRA_QNAMEREF" id="XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a> = 2000
+    <a name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB" id="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a> = 2001
 }
 </pre><h3><a name="xmlSchemaVal" id="xmlSchemaVal">Structure xmlSchemaVal</a></h3><pre class="programlisting">Structure xmlSchemaVal<br />struct _xmlSchemaVal {
 The content of this structure is not made public by the API.
@@ -346,11 +353,11 @@
 }
 </pre><h3><a name="xmlSchemaWildcard" id="xmlSchemaWildcard">Structure xmlSchemaWildcard</a></h3><pre class="programlisting">Structure xmlSchemaWildcard<br />struct _xmlSchemaWildcard {
     <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a>	type	: The kind of type
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id	: Deprecated; not used
     <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	node
-    int	minOccurs
-    int	maxOccurs
+    int	minOccurs	: Deprecated; not used
+    int	maxOccurs	: Deprecated; not used
     int	processContents
     int	any	: Indicates if the ns constraint is of ##
     <a href="libxml-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a>	nsSet	: The list of allowed namespaces

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-tree.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-tree.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-tree.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -782,7 +782,7 @@
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDtd" id="xmlNewDtd"></a>Function: xmlNewDtd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a>	xmlNewDtd		(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
 </pre><p>Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div><h3><a name="xmlNewGlobalNs" id="xmlNewGlobalNs"></a>Function: xmlNewGlobalNs</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a>	xmlNewGlobalNs		(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
-</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.</p>
+</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL this functionality had been removed</td></tr></tbody></table></div><h3><a name="xmlNewNode" id="xmlNewNode"></a>Function: xmlNewNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	xmlNewNode		(<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
 </pre><p>Creation of a new node element. @ns is optional (NULL).</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object. Uses xmlStrdup() to make copy of @name.</td></tr></tbody></table></div><h3><a name="xmlNewNodeEatName" id="xmlNewNodeEatName"></a>Function: xmlNewNodeEatName</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a>	xmlNewNodeEatName	(<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br />					 <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-valid.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-valid.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-valid.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -76,7 +76,7 @@
 <pre class="programlisting">void	<a href="#xmlSprintfElementContent">xmlSprintfElementContent</a>	(char * buf, <br />					 <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br />					 int englob)</pre>
 <pre class="programlisting">int	<a href="#xmlValidBuildContentModel">xmlValidBuildContentModel</a>	(<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)</pre>
 <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a>	(<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br />							 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />							 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br />							 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />							 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
-<pre class="programlisting">int	<a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a>	(<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br />					 int * len, <br />					 int max)</pre>
+<pre class="programlisting">int	<a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a>	(<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br />					 int * len, <br />					 int max)</pre>
 <pre class="programlisting">int	<a href="#xmlValidGetValidElements">xmlValidGetValidElements</a>	(<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br />					 <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br />					 int max)</pre>
 <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a>	(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />						 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br />						 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />						 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
 <pre class="programlisting">int	<a href="#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a>	(<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />					 <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)</pre>
@@ -232,9 +232,9 @@
 </pre><p>(Re)Build the automata associated to the content model of this element</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element declaration node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, 0 in case of error</td></tr></tbody></table></div><h3><a name="xmlValidCtxtNormalizeAttributeValue" id="xmlValidCtxtNormalizeAttributeValue"></a>Function: xmlValidCtxtNormalizeAttributeValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	xmlValidCtxtNormalizeAttributeValue	(<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br />							 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />							 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br />							 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />							 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
 </pre><p>Does the validation related extra step of the normalization of <a href="libxml-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml-SAX.html#characters">characters</a> by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt-&gt;valid accordingly</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div><h3><a name="xmlValidGetPotentialChildren" id="xmlValidGetPotentialChildren"></a>Function: xmlValidGetPotentialChildren</h3><pre class="programlisting">int	xmlValidGetPotentialChildren	(<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br />					 int * len, <br />					 int max)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div><h3><a name="xmlValidGetPotentialChildren" id="xmlValidGetPotentialChildren"></a>Function: xmlValidGetPotentialChildren</h3><pre class="programlisting">int	xmlValidGetPotentialChildren	(<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br />					 int * len, <br />					 int max)<br />
 </pre><p>Build/extend a list of potential children allowed by the content tree</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlValidGetValidElements" id="xmlValidGetValidElements"></a>Function: xmlValidGetValidElements</h3><pre class="programlisting">int	xmlValidGetValidElements	(<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br />					 <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br />					 int max)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlValidGetValidElements" id="xmlValidGetValidElements"></a>Function: xmlValidGetValidElements</h3><pre class="programlisting">int	xmlValidGetValidElements	(<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br />					 <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br />					 int max)<br />
 </pre><p>This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node-&gt;prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node-&gt;next, ... to replace 'node': xmlValidGetValidElements(node-&gt;prev, node-&gt;next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node-&gt;childs, to append a child to 'node': xmlValidGetValidElements(node-&gt;last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>prev</tt></i>:</span></td><td>an element to insert after</td></tr><tr><td><span class="term"><i><tt>next</tt></i>:</span></td><td>an element to insert next</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.</td></tr></tbody></table></div><h3><a name="xmlValidNormalizeAttributeValue" id="xmlValidNormalizeAttributeValue"></a>Function: xmlValidNormalizeAttributeValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	xmlValidNormalizeAttributeValue	(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />						 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br />						 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />						 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
 </pre><p>Does the validation related extra step of the normalization of <a href="libxml-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml-SAX.html#characters">characters</a> by single space (#x20) character.</p>

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-xmlIO.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-xmlIO.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-xmlIO.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -45,6 +45,7 @@
 <pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a>	<a href="#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a>	(const char * URL, <br />							 const char * ID, <br />							 <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
 <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a>	(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)</pre>
 <pre class="programlisting">int	<a href="#xmlOutputBufferClose">xmlOutputBufferClose</a>		(<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	<a href="#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a>	(<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br />							 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
 <pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	<a href="#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a>	(int fd, <br />						 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
 <pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	<a href="#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a>	(FILE * file, <br />							 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
 <pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	<a href="#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a>	(const char * URI, <br />							 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br />							 int compression)</pre>
@@ -140,7 +141,9 @@
 </pre><p>This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the input file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a canonicalized version of the path</td></tr></tbody></table></div><h3><a name="xmlOutputBufferClose" id="xmlOutputBufferClose"></a>Function: xmlOutputBufferClose</h3><pre class="programlisting">int	xmlOutputBufferClose		(<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br />
 </pre><p>flushes and close the output I/O channel and free up all the associated resources</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFd" id="xmlOutputBufferCreateFd"></a>Function: xmlOutputBufferCreateFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	xmlOutputBufferCreateFd	(int fd, <br />						 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateBuffer" id="xmlOutputBufferCreateBuffer"></a>Function: xmlOutputBufferCreateBuffer</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	xmlOutputBufferCreateBuffer	(<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br />							 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
+</pre><p>Create a buffered output for the progressive saving to a <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFd" id="xmlOutputBufferCreateFd"></a>Function: xmlOutputBufferCreateFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	xmlOutputBufferCreateFd	(int fd, <br />						 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
 </pre><p>Create a buffered output for the progressive saving to a file descriptor</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFile" id="xmlOutputBufferCreateFile"></a>Function: xmlOutputBufferCreateFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a>	xmlOutputBufferCreateFile	(FILE * file, <br />							 <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
 </pre><p>Create a buffered output for the progressive saving to a FILE * buffered C I/O</p>

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-xmlerror.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-xmlerror.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-xmlerror.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -761,6 +761,11 @@
     <a name="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA" id="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a> = 3084 : 3084
     <a name="XML_SCHEMAP_WARN_ATTR_REDECL_PROH" id="XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a> = 3085 : 3085
     <a name="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH" id="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a> = 3086 : 3085
+    <a name="XML_SCHEMAP_AG_PROPS_CORRECT" id="XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a> = 3087 : 3086
+    <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_2" id="XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a> = 3088 : 3087
+    <a name="XML_SCHEMAP_AU_PROPS_CORRECT" id="XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a> = 3089 : 3088
+    <a name="XML_SCHEMAP_A_PROPS_CORRECT_3" id="XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a> = 3090 : 3089
+    <a name="XML_SCHEMAP_COS_ALL_LIMITED" id="XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a> = 3091 : 3090
     <a name="XML_MODULE_OPEN" id="XML_MODULE_OPEN">XML_MODULE_OPEN</a> = 4900 : 4900
     <a name="XML_MODULE_CLOSE" id="XML_MODULE_CLOSE">XML_MODULE_CLOSE</a> = 4901 : 4901
     <a name="XML_CHECK_FOUND_ELEMENT" id="XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a> = 5000

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-xmlreader.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-xmlreader.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-xmlreader.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -97,6 +97,7 @@
 <pre class="programlisting">int	<a href="#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a>	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)</pre>
 <pre class="programlisting">int	<a href="#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a>	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 const char * rng)</pre>
 <pre class="programlisting">int	<a href="#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a>	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 const char * xsd)</pre>
+<pre class="programlisting">int	<a href="#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a>	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 int options)</pre>
 <pre class="programlisting">void	<a href="#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a>	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br />					 void * arg)</pre>
 <pre class="programlisting">int	<a href="#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a>	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 int prop, <br />					 int value)</pre>
 <pre class="programlisting">int	<a href="#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a>		(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
@@ -303,8 +304,10 @@
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> 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"><i><tt>Returns</tt></i>:</span></td><td>0 in case the RelaxNG validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderRelaxNGValidate" id="xmlTextReaderRelaxNGValidate"></a>Function: xmlTextReaderRelaxNGValidate</h3><pre class="programlisting">int	xmlTextReaderRelaxNGValidate	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 const char * rng)<br />
 </pre><p>Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @rng is NULL, then RelaxNG validation is desactivated.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> 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"><i><tt>Returns</tt></i>:</span></td><td>0 in case the RelaxNG validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSchemaValidate" id="xmlTextReaderSchemaValidate"></a>Function: xmlTextReaderSchemaValidate</h3><pre class="programlisting">int	xmlTextReaderSchemaValidate	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 const char * xsd)<br />
-</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetErrorHandler" id="xmlTextReaderSetErrorHandler"></a>Function: xmlTextReaderSetErrorHandler</h3><pre class="programlisting">void	xmlTextReaderSetErrorHandler	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br />					 void * arg)<br />
+</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSchemaValidateCtxt" id="xmlTextReaderSchemaValidateCtxt"></a>Function: xmlTextReaderSchemaValidateCtxt</h3><pre class="programlisting">int	xmlTextReaderSchemaValidateCtxt	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 int options)<br />
+</pre><p>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML Schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetErrorHandler" id="xmlTextReaderSetErrorHandler"></a>Function: xmlTextReaderSetErrorHandler</h3><pre class="programlisting">void	xmlTextReaderSetErrorHandler	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br />					 void * arg)<br />
 </pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> 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><h3><a name="xmlTextReaderSetParserProp" id="xmlTextReaderSetParserProp"></a>Function: xmlTextReaderSetParserProp</h3><pre class="programlisting">int	xmlTextReaderSetParserProp	(<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br />					 int prop, <br />					 int value)<br />
 </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>

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-xmlregexp.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-xmlregexp.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-xmlregexp.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -29,8 +29,8 @@
 <pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>	<a href="#xmlExpExpDerive">xmlExpExpDerive</a>		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)</pre>
 <pre class="programlisting">void	<a href="#xmlExpFree">xmlExpFree</a>			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)</pre>
 <pre class="programlisting">void	<a href="#xmlExpFreeCtxt">xmlExpFreeCtxt</a>			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)</pre>
-<pre class="programlisting">int	<a href="#xmlExpGetLanguage">xmlExpGetLanguage</a>		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br />					 int len)</pre>
-<pre class="programlisting">int	<a href="#xmlExpGetStart">xmlExpGetStart</a>			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br />					 int len)</pre>
+<pre class="programlisting">int	<a href="#xmlExpGetLanguage">xmlExpGetLanguage</a>		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br />					 int len)</pre>
+<pre class="programlisting">int	<a href="#xmlExpGetStart">xmlExpGetStart</a>			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br />					 int len)</pre>
 <pre class="programlisting">int	<a href="#xmlExpIsNillable">xmlExpIsNillable</a>		(<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)</pre>
 <pre class="programlisting">int	<a href="#xmlExpMaxToken">xmlExpMaxToken</a>			(<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)</pre>
 <pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>	<a href="#xmlExpNewAtom">xmlExpNewAtom</a>		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 int len)</pre>
@@ -89,11 +89,11 @@
 </pre><p>Dereference the expression</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr></tbody></table></div><h3><a name="xmlExpFreeCtxt" id="xmlExpFreeCtxt"></a>Function: xmlExpFreeCtxt</h3><pre class="programlisting">void	xmlExpFreeCtxt			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br />
 </pre><p>Free an expression context</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div><h3><a name="xmlExpGetLanguage" id="xmlExpGetLanguage"></a>Function: xmlExpGetLanguage</h3><pre class="programlisting">int	xmlExpGetLanguage		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br />					 int len)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div><h3><a name="xmlExpGetLanguage" id="xmlExpGetLanguage"></a>Function: xmlExpGetLanguage</h3><pre class="programlisting">int	xmlExpGetLanguage		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br />					 int len)<br />
 </pre><p>Find all the strings used in @exp and store them in @list</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int	xmlExpGetStart			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br />					 int len)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int	xmlExpGetStart			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br />					 int len)<br />
 </pre><p>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int	xmlExpIsNillable		(<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int	xmlExpIsNillable		(<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />
 </pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if nillable, 0 if not and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpMaxToken" id="xmlExpMaxToken"></a>Function: xmlExpMaxToken</h3><pre class="programlisting">int	xmlExpMaxToken			(<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br />
 </pre><p>Indicate the maximum number of input a expression can accept</p>

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-xmlsave.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-xmlsave.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-xmlsave.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -19,6 +19,7 @@
 <pre class="programlisting">int	<a href="#xmlSaveFlush">xmlSaveFlush</a>			(<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)</pre>
 <pre class="programlisting">int	<a href="#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a>		(<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br />					 <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)</pre>
 <pre class="programlisting">int	<a href="#xmlSaveSetEscape">xmlSaveSetEscape</a>		(<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br />					 <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)</pre>
+<pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	<a href="#xmlSaveToBuffer">xmlSaveToBuffer</a>		(<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br />					 const char * encoding, <br />					 int options)</pre>
 <pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	<a href="#xmlSaveToFd">xmlSaveToFd</a>		(int fd, <br />					 const char * encoding, <br />					 int options)</pre>
 <pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	<a href="#xmlSaveToFilename">xmlSaveToFilename</a>	(const char * filename, <br />					 const char * encoding, <br />					 int options)</pre>
 <pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	<a href="#xmlSaveToIO">xmlSaveToIO</a>		(<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br />					 <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br />					 void * ioctx, <br />					 const char * encoding, <br />					 int options)</pre>
@@ -42,7 +43,9 @@
 </pre><p>Set a custom escaping function to be used for text in <a href="libxml-SAX.html#attribute">attribute</a> content</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveSetEscape" id="xmlSaveSetEscape"></a>Function: xmlSaveSetEscape</h3><pre class="programlisting">int	xmlSaveSetEscape		(<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br />					 <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)<br />
 </pre><p>Set a custom escaping function to be used for text in element content</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFd" id="xmlSaveToFd"></a>Function: xmlSaveToFd</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	xmlSaveToFd		(int fd, <br />					 const char * encoding, <br />					 int options)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToBuffer" id="xmlSaveToBuffer"></a>Function: xmlSaveToBuffer</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	xmlSaveToBuffer		(<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br />					 const char * encoding, <br />					 int options)<br />
+</pre><p>Create a document saving context serializing to a buffer with the encoding and the options given</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFd" id="xmlSaveToFd"></a>Function: xmlSaveToFd</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	xmlSaveToFd		(int fd, <br />					 const char * encoding, <br />					 int options)<br />
 </pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFilename" id="xmlSaveToFilename"></a>Function: xmlSaveToFilename</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>	xmlSaveToFilename	(const char * filename, <br />					 const char * encoding, <br />					 int options)<br />
 </pre><p>Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.</p>

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-xmlschemas.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-xmlschemas.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-xmlschemas.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -38,11 +38,12 @@
 <pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a>	<a href="#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a>	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />						 <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br />						 void ** user_data)</pre>
 <pre class="programlisting">int	<a href="#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a>		(<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)</pre>
 <pre class="programlisting">void	<a href="#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a>	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)</pre>
+<pre class="programlisting">void	<a href="#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a>	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />						 <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br />						 void * ctx)</pre>
 <pre class="programlisting">void	<a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)</pre>
 <pre class="programlisting">int	<a href="#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a>	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 int options)</pre>
 <pre class="programlisting">void	<a href="#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a>	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />						 <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br />						 void * ctx)</pre>
 <pre class="programlisting">int	<a href="#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a>	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre>
-<pre class="programlisting">int	<a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int	<a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance)</pre>
 <pre class="programlisting">int	<a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 const char * filename, <br />					 int options)</pre>
 <pre class="programlisting">int	<a href="#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a>	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
 <pre class="programlisting">int	<a href="#xmlSchemaValidateStream">xmlSchemaValidateStream</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br />					 <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br />					 <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br />					 void * user_data)</pre>
@@ -57,7 +58,7 @@
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	name	: schema name
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace	: the target namespace
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	version
-    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
+    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id	: Obsolete
     <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>	doc
     <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
     int	flags
@@ -73,8 +74,8 @@
     void *	includes	: the includes, this is opaque for now
     int	preserve	: whether to free the document
     int	counter	: used to give ononymous components uniqu
-    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	idcDef
-    void *	volatiles	: Deprecated; not used anymore.
+    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	idcDef	: All identity-constraint defs.
+    void *	volatiles	: Obsolete
 }</pre><h3><a name="xmlSchemaParserCtxt" id="xmlSchemaParserCtxt">Structure xmlSchemaParserCtxt</a></h3><pre class="programlisting">Structure xmlSchemaParserCtxt<br />struct _xmlSchemaParserCtxt {
 The content of this structure is not made public by the API.
 }</pre><h3><a name="xmlSchemaSAXPlugStruct" id="xmlSchemaSAXPlugStruct">Structure xmlSchemaSAXPlugStruct</a></h3><pre class="programlisting">Structure xmlSchemaSAXPlugStruct<br />struct _xmlSchemaSAXPlug {
@@ -119,46 +120,48 @@
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeParserCtxt" id="xmlSchemaFreeParserCtxt"></a>Function: xmlSchemaFreeParserCtxt</h3><pre class="programlisting">void	xmlSchemaFreeParserCtxt		(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br />
 </pre><p>Free the resources associated to the schema parser context</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeValidCtxt" id="xmlSchemaFreeValidCtxt"></a>Function: xmlSchemaFreeValidCtxt</h3><pre class="programlisting">void	xmlSchemaFreeValidCtxt		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
-</pre><p>Free the resources associated to the schema validation context</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div><h3><a name="xmlSchemaGetParserErrors" id="xmlSchemaGetParserErrors"></a>Function: xmlSchemaGetParserErrors</h3><pre class="programlisting">int	xmlSchemaGetParserErrors	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br />					 void ** ctx)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaGetParserErrors" id="xmlSchemaGetParserErrors"></a>Function: xmlSchemaGetParserErrors</h3><pre class="programlisting">int	xmlSchemaGetParserErrors	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br />					 void ** ctx)<br />
 </pre><p>Get the callback information used to handle errors for a parser context</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XMl-Schema parser 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"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSchemaGetValidErrors" id="xmlSchemaGetValidErrors"></a>Function: xmlSchemaGetValidErrors</h3><pre class="programlisting">int	xmlSchemaGetValidErrors		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br />					 void ** ctx)<br />
-</pre><p>Get the error and warning callback informations</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XML-Schema 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"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSchemaIsValid" id="xmlSchemaIsValid"></a>Function: xmlSchemaIsValid</h3><pre class="programlisting">int	xmlSchemaIsValid		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
-</pre><p>Check if any error was detected during validation.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid so far, 0 if errors were detected, and -1 in case of internal error.</td></tr></tbody></table></div><h3><a name="xmlSchemaNewDocParserCtxt" id="xmlSchemaNewDocParserCtxt"></a>Function: xmlSchemaNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewDocParserCtxt	(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaIsValid" id="xmlSchemaIsValid"></a>Function: xmlSchemaIsValid</h3><pre class="programlisting">int	xmlSchemaIsValid		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaNewDocParserCtxt" id="xmlSchemaNewDocParserCtxt"></a>Function: xmlSchemaNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewDocParserCtxt	(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
 </pre><p>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</p>
 <div class="variablelist"><table border="0"><col align="left" /><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"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewMemParserCtxt" id="xmlSchemaNewMemParserCtxt"></a>Function: xmlSchemaNewMemParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewMemParserCtxt	(const char * buffer, <br />							 int size)<br />
 </pre><p>Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.</p>
 <div class="variablelist"><table border="0"><col align="left" /><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"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewParserCtxt" id="xmlSchemaNewParserCtxt"></a>Function: xmlSchemaNewParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewParserCtxt	(const char * URL)<br />
 </pre><p>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</p>
 <div class="variablelist"><table border="0"><col align="left" /><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"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewValidCtxt" id="xmlSchemaNewValidCtxt"></a>Function: xmlSchemaNewValidCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>	xmlSchemaNewValidCtxt	(<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
-</pre><p>Create an XML Schemas validation context based on the given schema.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schemas</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaParse" id="xmlSchemaParse"></a>Function: xmlSchemaParse</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a>	xmlSchemaParse		(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br />
-</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>
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaParse" id="xmlSchemaParse"></a>Function: xmlSchemaParse</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a>	xmlSchemaParse		(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaSAXPlug" id="xmlSchemaSAXPlug"></a>Function: xmlSchemaSAXPlug</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a>	xmlSchemaSAXPlug	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />						 <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br />						 void ** user_data)<br />
-</pre><p>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a pointer to the original <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>a pointer to the original SAX user data pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaSAXUnplug" id="xmlSchemaSAXUnplug"></a>Function: xmlSchemaSAXUnplug</h3><pre class="programlisting">int	xmlSchemaSAXUnplug		(<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br />
-</pre><p>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td>a data structure returned by <a href="libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserErrors" id="xmlSchemaSetParserErrors"></a>Function: xmlSchemaSetParserErrors</h3><pre class="programlisting">void	xmlSchemaSetParserErrors	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSAXUnplug" id="xmlSchemaSAXUnplug"></a>Function: xmlSchemaSAXUnplug</h3><pre class="programlisting">int	xmlSchemaSAXUnplug		(<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserErrors" id="xmlSchemaSetParserErrors"></a>Function: xmlSchemaSetParserErrors</h3><pre class="programlisting">void	xmlSchemaSetParserErrors	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)<br />
 </pre><p>Set the callback functions used to handle errors for a validation context</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema 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><h3><a name="xmlSchemaSetValidErrors" id="xmlSchemaSetValidErrors"></a>Function: xmlSchemaSetValidErrors</h3><pre class="programlisting">void	xmlSchemaSetValidErrors		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)<br />
-</pre><p>Set the error and warning callback informations</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema 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><h3><a name="xmlSchemaSetValidOptions" id="xmlSchemaSetValidOptions"></a>Function: xmlSchemaSetValidOptions</h3><pre class="programlisting">int	xmlSchemaSetValidOptions	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 int options)<br />
-</pre><p>Sets the options to be used during the validation.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidStructuredErrors" id="xmlSchemaSetValidStructuredErrors"></a>Function: xmlSchemaSetValidStructuredErrors</h3><pre class="programlisting">void	xmlSchemaSetValidStructuredErrors	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />						 <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br />						 void * ctx)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema 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><h3><a name="xmlSchemaSetParserStructuredErrors" id="xmlSchemaSetParserStructuredErrors"></a>Function: xmlSchemaSetParserStructuredErrors</h3><pre class="programlisting">void	xmlSchemaSetParserStructuredErrors	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />						 <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br />						 void * ctx)<br />
 </pre><p>Set the structured error callback</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaValidCtxtGetOptions" id="xmlSchemaValidCtxtGetOptions"></a>Function: xmlSchemaValidCtxtGetOptions</h3><pre class="programlisting">int	xmlSchemaValidCtxtGetOptions	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
-</pre><p>Get the validation context options.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the option combination or -1 on error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateDoc" id="xmlSchemaValidateDoc"></a>Function: xmlSchemaValidateDoc</h3><pre class="programlisting">int	xmlSchemaValidateDoc		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
-</pre><p>Validate a document tree in memory.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema 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"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateFile" id="xmlSchemaValidateFile"></a>Function: xmlSchemaValidateFile</h3><pre class="programlisting">int	xmlSchemaValidateFile		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 const char * filename, <br />					 int options)<br />
-</pre><p>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI of the instance</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a future set of options, currently unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateOneElement" id="xmlSchemaValidateOneElement"></a>Function: xmlSchemaValidateOneElement</h3><pre class="programlisting">int	xmlSchemaValidateOneElement	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
-</pre><p>Validate a branch of a tree, starting with the given @elem.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateStream" id="xmlSchemaValidateStream"></a>Function: xmlSchemaValidateStream</h3><pre class="programlisting">int	xmlSchemaValidateStream		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br />					 <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br />					 <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br />					 void * user_data)<br />
-</pre><p>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input to use for reading the data</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding information</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler for the resulting events</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the context to provide to the SAX handler.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidityErrorFunc" id="xmlSchemaValidityErrorFunc"></a>Function type: xmlSchemaValidityErrorFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityErrorFunc
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidErrors" id="xmlSchemaSetValidErrors"></a>Function: xmlSchemaSetValidErrors</h3><pre class="programlisting">void	xmlSchemaSetValidErrors		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidOptions" id="xmlSchemaSetValidOptions"></a>Function: xmlSchemaSetValidOptions</h3><pre class="programlisting">int	xmlSchemaSetValidOptions	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 int options)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidStructuredErrors" id="xmlSchemaSetValidStructuredErrors"></a>Function: xmlSchemaSetValidStructuredErrors</h3><pre class="programlisting">void	xmlSchemaSetValidStructuredErrors	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />						 <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br />						 void * ctx)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidCtxtGetOptions" id="xmlSchemaValidCtxtGetOptions"></a>Function: xmlSchemaValidCtxtGetOptions</h3><pre class="programlisting">int	xmlSchemaValidCtxtGetOptions	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateDoc" id="xmlSchemaValidateDoc"></a>Function: xmlSchemaValidateDoc</h3><pre class="programlisting">int	xmlSchemaValidateDoc		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>instance</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateFile" id="xmlSchemaValidateFile"></a>Function: xmlSchemaValidateFile</h3><pre class="programlisting">int	xmlSchemaValidateFile		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 const char * filename, <br />					 int options)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateOneElement" id="xmlSchemaValidateOneElement"></a>Function: xmlSchemaValidateOneElement</h3><pre class="programlisting">int	xmlSchemaValidateOneElement	(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateStream" id="xmlSchemaValidateStream"></a>Function: xmlSchemaValidateStream</h3><pre class="programlisting">int	xmlSchemaValidateStream		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br />					 <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br />					 <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br />					 void * user_data)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidityErrorFunc" id="xmlSchemaValidityErrorFunc"></a>Function type: xmlSchemaValidityErrorFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityErrorFunc
 void	xmlSchemaValidityErrorFunc	(void * ctx, <br />					 const char * msg, <br />					 ... ...)
 </pre><p></p><div class="variablelist"><table border="0"><col align="left" /><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><br />
 <h3><a name="xmlSchemaValidityWarningFunc" id="xmlSchemaValidityWarningFunc"></a>Function type: xmlSchemaValidityWarningFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityWarningFunc

Modified: packages/libxml2/branches/upstream/current/doc/html/libxml-xmlstring.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/html/libxml-xmlstring.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/html/libxml-xmlstring.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -54,7 +54,7 @@
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>Pointer to putative UTF-8 encoded string.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>value: true if @utf is valid.</td></tr></tbody></table></div><h3><a name="xmlGetUTF8Char" id="xmlGetUTF8Char"></a>Function: xmlGetUTF8Char</h3><pre class="programlisting">int	xmlGetUTF8Char			(const unsigned char * utf, <br />					 int * len)<br />
 </pre><p>Read the first UTF8 character from @utf</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td></tr></tbody></table></div><h3><a name="xmlStrEqual" id="xmlStrEqual"></a>Function: xmlStrEqual</h3><pre class="programlisting">int	xmlStrEqual			(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)<br />
-</pre><p>Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()</p>
+</pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrPrintf" id="xmlStrPrintf"></a>Function: xmlStrPrintf</h3><pre class="programlisting">int	xmlStrPrintf			(<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />					 int len, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br />					 ... ...)<br />
 </pre><p>Formats @msg and places result into @buf.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div><h3><a name="xmlStrQEqual" id="xmlStrQEqual"></a>Function: xmlStrQEqual</h3><pre class="programlisting">int	xmlStrQEqual			(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pref, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
@@ -78,10 +78,10 @@
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> contained in the ARRAY.</td></tr></tbody></table></div><h3><a name="xmlStrncasecmp" id="xmlStrncasecmp"></a>Function: xmlStrncasecmp</h3><pre class="programlisting">int	xmlStrncasecmp			(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br />					 int len)<br />
 </pre><p>a strncasecmp for xmlChar's</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrncat" id="xmlStrncat"></a>Function: xmlStrncat</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrncat		(<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * add, <br />					 int len)<br />
-</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.</p>
+</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len &lt; 0 then this is an API error and NULL will be returned.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of @add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *, the original @cur is reallocated if needed and should not be freed</td></tr></tbody></table></div><h3><a name="xmlStrncatNew" id="xmlStrncatNew"></a>Function: xmlStrncatNew</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrncatNew		(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br />					 int len)<br />
-</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlStrncmp" id="xmlStrncmp"></a>Function: xmlStrncmp</h3><pre class="programlisting">int	xmlStrncmp			(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br />					 int len)<br />
+</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is &lt; 0 then the length will be calculated automatically.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2 or &lt; 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlStrncmp" id="xmlStrncmp"></a>Function: xmlStrncmp</h3><pre class="programlisting">int	xmlStrncmp			(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br />					 int len)<br />
 </pre><p>a strncmp for xmlChar's</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrndup" id="xmlStrndup"></a>Function: xmlStrndup</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrndup		(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br />					 int len)<br />
 </pre><p>a strndup for array of xmlChar's</p>

Modified: packages/libxml2/branches/upstream/current/doc/index.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/index.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/index.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-  <head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
     <link rel="SHORTCUT ICON" href="/favicon.ico" />
     <style type="text/css">
 TD {font-family: Verdana,Arial,Helvetica}
@@ -83,9 +84,6 @@
                                 <a href="index.html">Home</a>
                               </li>
                               <li>
-                                <a href="http://xmlsoft.org/wiki">Wiki</a>
-                              </li>
-                              <li>
                                 <a href="html/index.html">Reference Manual</a>
                               </li>
                               <li>

Modified: packages/libxml2/branches/upstream/current/doc/intro.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/intro.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/intro.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This document describes libxml, the <a href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the
+</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This document describes libxml, the <a href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the
 <a href="http://www.gnome.org/">Gnome</a> project. <a href="http://www.w3.org/XML/">XML is a standard</a> for building tag-based
 structured documents/data.</p><p>Here are some key points about libxml:</p><ul><li>Libxml2 exports Push (progressive) and Pull (blocking) type parser
     interfaces for both XML and HTML.</li>

Modified: packages/libxml2/branches/upstream/current/doc/libxml2-api.xml
===================================================================
--- packages/libxml2/branches/upstream/current/doc/libxml2-api.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/libxml2-api.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -110,9 +110,10 @@
      <exports symbol='htmlNodeDumpFileFormat' type='function'/>
      <exports symbol='htmlDocDumpMemory' type='function'/>
      <exports symbol='htmlSaveFile' type='function'/>
-     <exports symbol='htmlNewDocNoDtD' type='function'/>
      <exports symbol='htmlDocDump' type='function'/>
+     <exports symbol='htmlDocDumpMemoryFormat' type='function'/>
      <exports symbol='htmlIsBooleanAttr' type='function'/>
+     <exports symbol='htmlSaveFileFormat' type='function'/>
      <exports symbol='htmlNodeDumpFormatOutput' type='function'/>
      <exports symbol='htmlSetMetaEncoding' type='function'/>
      <exports symbol='htmlSaveFileEnc' type='function'/>
@@ -122,7 +123,7 @@
      <exports symbol='htmlGetMetaEncoding' type='function'/>
      <exports symbol='htmlNodeDumpFile' type='function'/>
      <exports symbol='htmlDocContentDumpFormatOutput' type='function'/>
-     <exports symbol='htmlSaveFileFormat' type='function'/>
+     <exports symbol='htmlNewDocNoDtD' type='function'/>
      <exports symbol='htmlDocContentDumpOutput' type='function'/>
     </file>
     <file name='SAX'>
@@ -1003,11 +1004,13 @@
      <exports symbol='xmlPatternStreamable' type='function'/>
      <exports symbol='xmlStreamPushAttr' type='function'/>
      <exports symbol='xmlPatternMatch' type='function'/>
+     <exports symbol='xmlStreamWantsAnyNode' type='function'/>
      <exports symbol='xmlStreamPop' type='function'/>
      <exports symbol='xmlFreePattern' type='function'/>
      <exports symbol='xmlStreamPush' type='function'/>
      <exports symbol='xmlPatternMaxDepth' type='function'/>
      <exports symbol='xmlPatterncompile' type='function'/>
+     <exports symbol='xmlStreamPushNode' type='function'/>
      <exports symbol='xmlFreeStreamCtxt' type='function'/>
     </file>
     <file name='relaxng'>
@@ -1093,7 +1096,7 @@
     </file>
     <file name='schemasInternals'>
      <summary>internal interfaces for XML Schemas</summary>
-     <description>internal interfaces for the XML Schemas handling and schema validity checking </description>
+     <description>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </description>
      <author>Daniel Veillard </author>
      <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION' type='macro'/>
      <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_EXTENSION' type='macro'/>
@@ -1118,11 +1121,12 @@
      <exports symbol='XML_SCHEMAS_ATTR_USE_PROHIBITED' type='macro'/>
      <exports symbol='XML_SCHEMAS_ELEM_NILLABLE' type='macro'/>
      <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION' type='macro'/>
-     <exports symbol='XML_SCHEMAS_ELEM_INTERNAL_RESOLVED' type='macro'/>
+     <exports symbol='XML_SCHEMAS_ATTRGROUP_REDEFINED' type='macro'/>
      <exports symbol='XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_BLOCK_DEFAULT' type='macro'/>
      <exports symbol='XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_FINAL_EXTENSION' type='macro'/>
+     <exports symbol='XML_SCHEMAS_TYPE_REDEFINED' type='macro'/>
      <exports symbol='XML_SCHEMAS_ELEM_FIXED' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_VARIETY_ATOMIC' type='macro'/>
@@ -1142,7 +1146,9 @@
      <exports symbol='XML_SCHEMAS_ANYATTR_LAX' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_GLOBAL' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_ABSTRACT' type='macro'/>
+     <exports symbol='XML_SCHEMAS_TYPE_MIXED' type='macro'/>
      <exports symbol='XML_SCHEMAS_ATTR_FIXED' type='macro'/>
+     <exports symbol='XML_SCHEMAS_ELEM_INTERNAL_RESOLVED' type='macro'/>
      <exports symbol='XML_SCHEMAS_ANY_SKIP' type='macro'/>
      <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_LIST' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_VARIETY_ABSENT' type='macro'/>
@@ -1151,7 +1157,7 @@
      <exports symbol='XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED' type='macro'/>
      <exports symbol='XML_SCHEMAS_ELEM_NSDEFAULT' type='macro'/>
      <exports symbol='XML_SCHEMAS_ELEM_GLOBAL' type='macro'/>
-     <exports symbol='XML_SCHEMAS_TYPE_MIXED' type='macro'/>
+     <exports symbol='XML_SCHEMAS_ELEM_TOPLEVEL' type='macro'/>
      <exports symbol='XML_SCHEMAS_ANY_LAX' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_FINAL_RESTRICTION' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_HAS_FACETS' type='macro'/>
@@ -1160,7 +1166,7 @@
      <exports symbol='XML_SCHEMAS_ELEM_FINAL_ABSENT' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_BLOCK_EXTENSION' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_INTERNAL_INVALID' type='macro'/>
-     <exports symbol='XML_SCHEMAS_ELEM_TOPLEVEL' type='macro'/>
+     <exports symbol='XML_SCHEMAS_ATTRGROUP_HAS_REFS' type='macro'/>
      <exports symbol='XML_SCHEMAS_ELEM_ABSTRACT' type='macro'/>
      <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION' type='macro'/>
      <exports symbol='XML_SCHEMAS_TYPE_FINAL_UNION' type='macro'/>
@@ -1223,6 +1229,7 @@
      <exports symbol='XML_SCHEMAS_GMONTH' type='enum'/>
      <exports symbol='XML_SCHEMA_CONTENT_ELEMENTS' type='enum'/>
      <exports symbol='XML_SCHEMAS_GYEAR' type='enum'/>
+     <exports symbol='XML_SCHEMA_EXTRA_ATTR_USE_PROHIB' type='enum'/>
      <exports symbol='XML_SCHEMAS_BYTE' type='enum'/>
      <exports symbol='XML_SCHEMA_TYPE_ALL' type='enum'/>
      <exports symbol='XML_SCHEMA_TYPE_IDC_KEYREF' type='enum'/>
@@ -1230,6 +1237,7 @@
      <exports symbol='XML_SCHEMA_FACET_MAXINCLUSIVE' type='enum'/>
      <exports symbol='XML_SCHEMAS_NAME' type='enum'/>
      <exports symbol='XML_SCHEMA_TYPE_LIST' type='enum'/>
+     <exports symbol='XML_SCHEMA_TYPE_ATTRIBUTE_USE' type='enum'/>
      <exports symbol='XML_SCHEMAS_GDAY' type='enum'/>
      <exports symbol='XML_SCHEMA_TYPE_ANY' type='enum'/>
      <exports symbol='XML_SCHEMAS_ANYURI' type='enum'/>
@@ -1853,9 +1861,10 @@
      <exports symbol='xmlFreeParserInputBuffer' type='function'/>
      <exports symbol='xmlRegisterDefaultInputCallbacks' type='function'/>
      <exports symbol='xmlParserInputBufferGrow' type='function'/>
+     <exports symbol='xmlOutputCloseCallback' type='function'/>
      <exports symbol='xmlAllocOutputBuffer' type='function'/>
      <exports symbol='xmlNoNetExternalEntityLoader' type='function'/>
-     <exports symbol='xmlOutputCloseCallback' type='function'/>
+     <exports symbol='xmlOutputBufferCreateBuffer' type='function'/>
      <exports symbol='xmlIOHTTPMatch' type='function'/>
      <exports symbol='xmlIOHTTPOpen' type='function'/>
      <exports symbol='xmlParserInputBufferCreateIO' type='function'/>
@@ -1927,7 +1936,7 @@
      <exports symbol='XML_XPATH_UNKNOWN_FUNC_ERROR' type='enum'/>
      <exports symbol='XML_ERR_DOCUMENT_START' type='enum'/>
      <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_TEXT' type='enum'/>
-     <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_2' type='enum'/>
+     <exports symbol='XML_SCHEMAP_AG_PROPS_CORRECT' type='enum'/>
      <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_1' type='enum'/>
      <exports symbol='XML_DTD_NOT_STANDALONE' type='enum'/>
      <exports symbol='XML_HTTP_USE_IP' type='enum'/>
@@ -2064,6 +2073,7 @@
      <exports symbol='XML_SAVE_CHAR_INVALID' type='enum'/>
      <exports symbol='XML_ERR_ENTITYREF_NO_NAME' type='enum'/>
      <exports symbol='XML_DTD_ID_FIXED' type='enum'/>
+     <exports symbol='XML_SCHEMAP_A_PROPS_CORRECT_3' type='enum'/>
      <exports symbol='XML_SCHEMAP_A_PROPS_CORRECT_2' type='enum'/>
      <exports symbol='XML_WAR_NS_COLUMN' type='enum'/>
      <exports symbol='XML_SCHEMAP_COS_VALID_DEFAULT_2_1' type='enum'/>
@@ -2083,6 +2093,7 @@
      <exports symbol='XML_FROM_HTTP' type='enum'/>
      <exports symbol='XML_DTD_NOTATION_REDEFINED' type='enum'/>
      <exports symbol='XML_WAR_LANG_VALUE' type='enum'/>
+     <exports symbol='XML_SCHEMAP_AU_PROPS_CORRECT' type='enum'/>
      <exports symbol='XML_ERR_SEPARATOR_REQUIRED' type='enum'/>
      <exports symbol='XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED' type='enum'/>
      <exports symbol='XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE' type='enum'/>
@@ -2220,7 +2231,7 @@
      <exports symbol='XML_XINCLUDE_PARSE_VALUE' type='enum'/>
      <exports symbol='XML_RNGP_NSNAME_NO_NS' type='enum'/>
      <exports symbol='XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD' type='enum'/>
-     <exports symbol='XML_SCHEMAP_UNION_NOT_EXPRESSIBLE' type='enum'/>
+     <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_2' type='enum'/>
      <exports symbol='XML_CHECK_FOUND_ELEMENT' type='enum'/>
      <exports symbol='XML_RNGP_PARENTREF_NAME_INVALID' type='enum'/>
      <exports symbol='XML_NS_ERR_QNAME' type='enum'/>
@@ -2230,6 +2241,7 @@
      <exports symbol='XML_I18N_NO_NAME' type='enum'/>
      <exports symbol='XML_SCHEMAP_ST_PROPS_CORRECT_1' type='enum'/>
      <exports symbol='XML_RNGP_EXCEPT_MISSING' type='enum'/>
+     <exports symbol='XML_SCHEMAP_COS_CT_EXTENDS_1_2' type='enum'/>
      <exports symbol='XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID' type='enum'/>
      <exports symbol='XML_SCHEMAP_UNKNOWN_ALL_CHILD' type='enum'/>
      <exports symbol='XML_DTD_MIXED_CORRUPT' type='enum'/>
@@ -2333,6 +2345,7 @@
      <exports symbol='XML_ERR_VALUE_REQUIRED' type='enum'/>
      <exports symbol='XML_RNGP_PAT_LIST_TEXT' type='enum'/>
      <exports symbol='XML_RNGP_URI_NOT_ABSOLUTE' type='enum'/>
+     <exports symbol='XML_SCHEMAP_UNION_NOT_EXPRESSIBLE' type='enum'/>
      <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_ATTR' type='enum'/>
      <exports symbol='XML_FTP_PASV_ANSWER' type='enum'/>
      <exports symbol='XML_SCHEMAP_INVALID_BOOLEAN' type='enum'/>
@@ -2521,6 +2534,7 @@
      <exports symbol='XML_CHECK_NAME_NOT_NULL' type='enum'/>
      <exports symbol='XML_SCHEMAP_INVALID_MINOCCURS' type='enum'/>
      <exports symbol='XML_SCHEMAV_CVC_ELT_1' type='enum'/>
+     <exports symbol='XML_SCHEMAP_COS_ALL_LIMITED' type='enum'/>
      <exports symbol='XML_CHECK_' type='enum'/>
      <exports symbol='XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID' type='enum'/>
      <exports symbol='XML_IO_EPIPE' type='enum'/>
@@ -2864,6 +2878,7 @@
      <exports symbol='xmlTextReaderConstValue' type='function'/>
      <exports symbol='xmlNewTextReader' type='function'/>
      <exports symbol='xmlTextReaderGetAttributeNo' type='function'/>
+     <exports symbol='xmlTextReaderSchemaValidateCtxt' type='function'/>
      <exports symbol='xmlTextReaderLocalName' type='function'/>
      <exports symbol='xmlTextReaderExpand' type='function'/>
      <exports symbol='xmlTextReaderConstName' type='function'/>
@@ -2943,6 +2958,7 @@
      <exports symbol='xmlSaveToFd' type='function'/>
      <exports symbol='xmlSaveClose' type='function'/>
      <exports symbol='xmlSaveSetAttrEscape' type='function'/>
+     <exports symbol='xmlSaveToBuffer' type='function'/>
      <exports symbol='xmlSaveToFilename' type='function'/>
      <exports symbol='xmlSaveFlush' type='function'/>
      <exports symbol='xmlSaveDoc' type='function'/>
@@ -3014,6 +3030,7 @@
      <exports symbol='xmlSchemaValidityWarningFunc' type='function'/>
      <exports symbol='xmlSchemaDump' type='function'/>
      <exports symbol='xmlSchemaFreeValidCtxt' type='function'/>
+     <exports symbol='xmlSchemaSetParserStructuredErrors' type='function'/>
      <exports symbol='xmlSchemaNewValidCtxt' type='function'/>
     </file>
     <file name='xmlschemastypes'>
@@ -4063,9 +4080,15 @@
     <macro name='XML_SCHEMAS_ATTRGROUP_GLOBAL' file='schemasInternals'>
       <info>The attribute wildcard has been already builded.</info>
     </macro>
+    <macro name='XML_SCHEMAS_ATTRGROUP_HAS_REFS' file='schemasInternals'>
+      <info>Whether this attr. group contains attr. group references.</info>
+    </macro>
     <macro name='XML_SCHEMAS_ATTRGROUP_MARKED' file='schemasInternals'>
       <info>Marks the attr group as marked; used for circular checks.</info>
     </macro>
+    <macro name='XML_SCHEMAS_ATTRGROUP_REDEFINED' file='schemasInternals'>
+      <info>The attr group was redefined.</info>
+    </macro>
     <macro name='XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED' file='schemasInternals'>
       <info>The attribute wildcard has been already builded.</info>
     </macro>
@@ -4255,8 +4278,11 @@
     <macro name='XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD' file='schemasInternals'>
       <info>the complexType owns an attribute wildcard, i.e. it can be freed by the complexType</info>
     </macro>
+    <macro name='XML_SCHEMAS_TYPE_REDEFINED' file='schemasInternals'>
+      <info>The type was redefined.</info>
+    </macro>
     <macro name='XML_SCHEMAS_TYPE_VARIETY_ABSENT' file='schemasInternals'>
-      <info>the simpleType has a variety of &quot;absent&quot;.</info>
+      <info>the simpleType has a variety of &quot;absent&quot;. TODO: Actually not necessary :-/, since if none of the variety flags occur then it&apos;s automatically absent.</info>
     </macro>
     <macro name='XML_SCHEMAS_TYPE_VARIETY_ATOMIC' file='schemasInternals'>
       <info>the simpleType has a variety of &quot;union&quot;.</info>
@@ -5155,13 +5181,18 @@
     <enum name='XML_SAVE_NO_EMPTY' file='xmlsave' value='4' type='xmlSaveOption' info='no empty tags'/>
     <enum name='XML_SAVE_NO_XHTML' file='xmlsave' value='8' type='xmlSaveOption' info=' disable XHTML1 specific rules'/>
     <enum name='XML_SAVE_UNKNOWN_ENCODING' file='xmlerror' value='1403' type='xmlParserErrors' info='1403'/>
+    <enum name='XML_SCHEMAP_AG_PROPS_CORRECT' file='xmlerror' value='3087' type='xmlParserErrors' info='3086'/>
     <enum name='XML_SCHEMAP_ATTRFORMDEFAULT_VALUE' file='xmlerror' value='1701' type='xmlParserErrors' info='1701'/>
     <enum name='XML_SCHEMAP_ATTRGRP_NONAME_NOREF' file='xmlerror' value='1702' type='xmlParserErrors' info='1702'/>
     <enum name='XML_SCHEMAP_ATTR_NONAME_NOREF' file='xmlerror' value='1703' type='xmlParserErrors' info='1703'/>
+    <enum name='XML_SCHEMAP_AU_PROPS_CORRECT' file='xmlerror' value='3089' type='xmlParserErrors' info='3088'/>
     <enum name='XML_SCHEMAP_AU_PROPS_CORRECT_2' file='xmlerror' value='3078' type='xmlParserErrors' info='3078'/>
     <enum name='XML_SCHEMAP_A_PROPS_CORRECT_2' file='xmlerror' value='3079' type='xmlParserErrors' info='3079'/>
+    <enum name='XML_SCHEMAP_A_PROPS_CORRECT_3' file='xmlerror' value='3090' type='xmlParserErrors' info='3089'/>
     <enum name='XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF' file='xmlerror' value='1704' type='xmlParserErrors' info='1704'/>
+    <enum name='XML_SCHEMAP_COS_ALL_LIMITED' file='xmlerror' value='3091' type='xmlParserErrors' info='3090'/>
     <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_1' file='xmlerror' value='3063' type='xmlParserErrors' info='3063'/>
+    <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_2' file='xmlerror' value='3088' type='xmlParserErrors' info='3087'/>
     <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_3' file='xmlerror' value='1800' type='xmlParserErrors' info='1800'/>
     <enum name='XML_SCHEMAP_COS_ST_DERIVED_OK_2_1' file='xmlerror' value='3031' type='xmlParserErrors' info='3031'/>
     <enum name='XML_SCHEMAP_COS_ST_DERIVED_OK_2_2' file='xmlerror' value='3032' type='xmlParserErrors' info='3032'/>
@@ -5505,9 +5536,10 @@
     <enum name='XML_SCHEMA_CONTENT_ELEMENTS' file='schemasInternals' value='2' type='xmlSchemaContentType'/>
     <enum name='XML_SCHEMA_CONTENT_EMPTY' file='schemasInternals' value='1' type='xmlSchemaContentType'/>
     <enum name='XML_SCHEMA_CONTENT_MIXED' file='schemasInternals' value='3' type='xmlSchemaContentType'/>
-    <enum name='XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS' file='schemasInternals' value='5' type='xmlSchemaContentType' info='obsolete, not used'/>
+    <enum name='XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS' file='schemasInternals' value='5' type='xmlSchemaContentType' info='Obsolete'/>
     <enum name='XML_SCHEMA_CONTENT_SIMPLE' file='schemasInternals' value='4' type='xmlSchemaContentType'/>
     <enum name='XML_SCHEMA_CONTENT_UNKNOWN' file='schemasInternals' value='0' type='xmlSchemaContentType'/>
+    <enum name='XML_SCHEMA_EXTRA_ATTR_USE_PROHIB' file='schemasInternals' value='2001' type='xmlSchemaTypeType'/>
     <enum name='XML_SCHEMA_EXTRA_QNAMEREF' file='schemasInternals' value='2000' type='xmlSchemaTypeType'/>
     <enum name='XML_SCHEMA_FACET_ENUMERATION' file='schemasInternals' value='1007' type='xmlSchemaTypeType'/>
     <enum name='XML_SCHEMA_FACET_FRACTIONDIGITS' file='schemasInternals' value='1005' type='xmlSchemaTypeType'/>
@@ -5526,6 +5558,7 @@
     <enum name='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' file='schemasInternals' value='21' type='xmlSchemaTypeType'/>
     <enum name='XML_SCHEMA_TYPE_ATTRIBUTE' file='schemasInternals' value='15' type='xmlSchemaTypeType'/>
     <enum name='XML_SCHEMA_TYPE_ATTRIBUTEGROUP' file='schemasInternals' value='16' type='xmlSchemaTypeType'/>
+    <enum name='XML_SCHEMA_TYPE_ATTRIBUTE_USE' file='schemasInternals' value='26' type='xmlSchemaTypeType'/>
     <enum name='XML_SCHEMA_TYPE_BASIC' file='schemasInternals' value='1' type='xmlSchemaTypeType' info='A built-in datatype'/>
     <enum name='XML_SCHEMA_TYPE_CHOICE' file='schemasInternals' value='7' type='xmlSchemaTypeType'/>
     <enum name='XML_SCHEMA_TYPE_COMPLEX' file='schemasInternals' value='5' type='xmlSchemaTypeType'/>
@@ -6343,7 +6376,7 @@
       <field name='name' type='const xmlChar *' info=' schema name'/>
       <field name='targetNamespace' type='const xmlChar *' info=' the target namespace'/>
       <field name='version' type='const xmlChar *' info=''/>
-      <field name='id' type='const xmlChar *' info=''/>
+      <field name='id' type='const xmlChar *' info=' Obsolete'/>
       <field name='doc' type='xmlDocPtr' info=''/>
       <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
       <field name='flags' type='int' info=''/>
@@ -6359,8 +6392,8 @@
       <field name='includes' type='void *' info=' the includes, this is opaque for now'/>
       <field name='preserve' type='int' info=' whether to free the document'/>
       <field name='counter' type='int' info=' used to give ononymous components unique names'/>
-      <field name='idcDef' type='xmlHashTablePtr' info=''/>
-      <field name='volatiles' type='void *' info=' Deprecated; not used anymore.'/>
+      <field name='idcDef' type='xmlHashTablePtr' info=' All identity-constraint defs.'/>
+      <field name='volatiles' type='void *' info=' Obsolete'/>
     </struct>
     <struct name='xmlSchemaAnnot' file='schemasInternals' type='struct _xmlSchemaAnnot'>
       <field name='next' type='struct _xmlSchemaAnnot *' info=''/>
@@ -6368,41 +6401,42 @@
     </struct>
     <typedef name='xmlSchemaAnnotPtr' file='schemasInternals' type='xmlSchemaAnnot *'/>
     <struct name='xmlSchemaAttribute' file='schemasInternals' type='struct _xmlSchemaAttribute'>
-      <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
-      <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute if in a group ...'/>
-      <field name='name' type='const xmlChar *' info=' name of the declaration or empty if particle'/>
-      <field name='id' type='const xmlChar *' info=''/>
-      <field name='ref' type='const xmlChar *' info=' the local name of the attribute decl. if a particle'/>
-      <field name='refNs' type='const xmlChar *' info=' the ns URI of the attribute decl. if a particle'/>
+      <field name='type' type='xmlSchemaTypeType' info=''/>
+      <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute (not used?)'/>
+      <field name='name' type='const xmlChar *' info=' the name of the declaration'/>
+      <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
       <field name='typeName' type='const xmlChar *' info=' the local name of the type definition'/>
       <field name='typeNs' type='const xmlChar *' info=' the ns URI of the type definition'/>
       <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
-      <field name='base' type='xmlSchemaTypePtr' info=' obsolete, not used'/>
-      <field name='occurs' type='int' info=''/>
-      <field name='defValue' type='const xmlChar *' info=''/>
+      <field name='base' type='xmlSchemaTypePtr' info=' Deprecated; not used'/>
+      <field name='occurs' type='int' info=' Deprecated; not used'/>
+      <field name='defValue' type='const xmlChar *' info=' The initial value of the value constraint'/>
       <field name='subtypes' type='xmlSchemaTypePtr' info=' the type definition'/>
       <field name='node' type='xmlNodePtr' info=''/>
       <field name='targetNamespace' type='const xmlChar *' info=''/>
       <field name='flags' type='int' info=''/>
-      <field name='refPrefix' type='const xmlChar *' info=''/>
-      <field name='defVal' type='xmlSchemaValPtr' info=''/>
-      <field name='refDecl' type='xmlSchemaAttributePtr' info=''/>
+      <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='defVal' type='xmlSchemaValPtr' info=' The compiled value constraint'/>
+      <field name='refDecl' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/>
     </struct>
     <struct name='xmlSchemaAttributeGroup' file='schemasInternals' type='struct _xmlSchemaAttributeGroup'>
       <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
       <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute if in a group ...'/>
       <field name='name' type='const xmlChar *' info=''/>
       <field name='id' type='const xmlChar *' info=''/>
-      <field name='ref' type='const xmlChar *' info=''/>
-      <field name='refNs' type='const xmlChar *' info=''/>
+      <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
       <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
-      <field name='attributes' type='xmlSchemaAttributePtr' info=''/>
+      <field name='attributes' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/>
       <field name='node' type='xmlNodePtr' info=''/>
       <field name='flags' type='int' info=''/>
       <field name='attributeWildcard' type='xmlSchemaWildcardPtr' info=''/>
-      <field name='refPrefix' type='const xmlChar *' info=''/>
-      <field name='refItem' type='xmlSchemaAttributeGroupPtr' info=' The referenced attribute group'/>
-      <field name='targetNamespace' type='const xmlChar *' info=' xmlSchemaAttributeGroupPtr redef Redefinitions'/>
+      <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='refItem' type='xmlSchemaAttributeGroupPtr' info=' Deprecated; not used'/>
+      <field name='targetNamespace' type='const xmlChar *' info=''/>
+      <field name='attrUses' type='void *' info=''/>
     </struct>
     <typedef name='xmlSchemaAttributeGroupPtr' file='schemasInternals' type='xmlSchemaAttributeGroup *'/>
     <struct name='xmlSchemaAttributeLink' file='schemasInternals' type='struct _xmlSchemaAttributeLink'>
@@ -6414,17 +6448,17 @@
     <typedef name='xmlSchemaContentType' file='schemasInternals' type='enum'/>
     <struct name='xmlSchemaElement' file='schemasInternals' type='struct _xmlSchemaElement'>
       <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
-      <field name='next' type='struct _xmlSchemaType *' info=' the next type if in a sequence ...'/>
+      <field name='next' type='struct _xmlSchemaType *' info=' Not used?'/>
       <field name='name' type='const xmlChar *' info=''/>
-      <field name='id' type='const xmlChar *' info=''/>
-      <field name='ref' type='const xmlChar *' info=' the local name of the element declaration if a particle'/>
-      <field name='refNs' type='const xmlChar *' info=' the ns URI of the element declaration if a particle'/>
+      <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
       <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
       <field name='subtypes' type='xmlSchemaTypePtr' info=' the type definition'/>
       <field name='attributes' type='xmlSchemaAttributePtr' info=''/>
       <field name='node' type='xmlNodePtr' info=''/>
-      <field name='minOccurs' type='int' info=''/>
-      <field name='maxOccurs' type='int' info=''/>
+      <field name='minOccurs' type='int' info=' Deprecated; not used'/>
+      <field name='maxOccurs' type='int' info=' Deprecated; not used'/>
       <field name='flags' type='int' info=''/>
       <field name='targetNamespace' type='const xmlChar *' info=''/>
       <field name='namedType' type='const xmlChar *' info=''/>
@@ -6432,26 +6466,27 @@
       <field name='substGroup' type='const xmlChar *' info=''/>
       <field name='substGroupNs' type='const xmlChar *' info=''/>
       <field name='scope' type='const xmlChar *' info=''/>
-      <field name='value' type='const xmlChar *' info=''/>
-      <field name='refDecl' type='struct _xmlSchemaElement *' info=' This will now be used for the substitution group affiliation'/>
-      <field name='contModel' type='xmlRegexpPtr' info=''/>
+      <field name='value' type='const xmlChar *' info=' The original value of the value constraint.'/>
+      <field name='refDecl' type='struct _xmlSchemaElement *' info=' This will now be used for the
+substitution group affiliation'/>
+      <field name='contModel' type='xmlRegexpPtr' info=' Obsolete for WXS, maybe used for RelaxNG'/>
       <field name='contentType' type='xmlSchemaContentType' info=''/>
-      <field name='refPrefix' type='const xmlChar *' info=''/>
-      <field name='defVal' type='xmlSchemaValPtr' info=''/>
-      <field name='idcs' type='void *' info=''/>
+      <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='defVal' type='xmlSchemaValPtr' info=' The compiled value contraint.'/>
+      <field name='idcs' type='void *' info=' The identity-constraint defs'/>
     </struct>
     <typedef name='xmlSchemaElementPtr' file='schemasInternals' type='xmlSchemaElement *'/>
     <struct name='xmlSchemaFacet' file='schemasInternals' type='struct _xmlSchemaFacet'>
       <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
       <field name='next' type='struct _xmlSchemaFacet *' info=' the next type if in a sequence ...'/>
-      <field name='value' type='const xmlChar *' info=''/>
-      <field name='id' type='const xmlChar *' info=''/>
+      <field name='value' type='const xmlChar *' info=' The original value'/>
+      <field name='id' type='const xmlChar *' info=' Obsolete'/>
       <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
       <field name='node' type='xmlNodePtr' info=''/>
-      <field name='fixed' type='int' info=''/>
+      <field name='fixed' type='int' info=' XML_SCHEMAS_FACET_PRESERVE, etc.'/>
       <field name='whitespace' type='int' info=''/>
-      <field name='val' type='xmlSchemaValPtr' info=''/>
-      <field name='regexp' type='xmlRegexpPtr' info=''/>
+      <field name='val' type='xmlSchemaValPtr' info=' The compiled value'/>
+      <field name='regexp' type='xmlRegexpPtr' info=' The regex for patterns'/>
     </struct>
     <struct name='xmlSchemaFacetLink' file='schemasInternals' type='struct _xmlSchemaFacetLink'>
       <field name='next' type='struct _xmlSchemaFacetLink *' info=' the next facet link ...'/>
@@ -6476,36 +6511,38 @@
       <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
       <field name='next' type='struct _xmlSchemaType *' info=' the next type if in a sequence ...'/>
       <field name='name' type='const xmlChar *' info=''/>
-      <field name='id' type='const xmlChar *' info=''/>
-      <field name='ref' type='const xmlChar *' info=''/>
-      <field name='refNs' type='const xmlChar *' info=''/>
+      <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
       <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
       <field name='subtypes' type='xmlSchemaTypePtr' info=''/>
-      <field name='attributes' type='xmlSchemaAttributePtr' info=''/>
+      <field name='attributes' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/>
       <field name='node' type='xmlNodePtr' info=''/>
-      <field name='minOccurs' type='int' info=''/>
-      <field name='maxOccurs' type='int' info=''/>
+      <field name='minOccurs' type='int' info=' Deprecated; not used'/>
+      <field name='maxOccurs' type='int' info=' Deprecated; not used'/>
       <field name='flags' type='int' info=''/>
       <field name='contentType' type='xmlSchemaContentType' info=''/>
-      <field name='base' type='const xmlChar *' info=''/>
-      <field name='baseNs' type='const xmlChar *' info=''/>
-      <field name='baseType' type='xmlSchemaTypePtr' info=''/>
-      <field name='facets' type='xmlSchemaFacetPtr' info=''/>
-      <field name='redef' type='struct _xmlSchemaType *' info=' possible redefinitions for the type'/>
-      <field name='recurse' type='int' info=''/>
-      <field name='attributeUses' type='xmlSchemaAttributeLinkPtr' info=''/>
+      <field name='base' type='const xmlChar *' info=' Base type&apos;s local name'/>
+      <field name='baseNs' type='const xmlChar *' info=' Base type&apos;s target namespace'/>
+      <field name='baseType' type='xmlSchemaTypePtr' info=' The base type component'/>
+      <field name='facets' type='xmlSchemaFacetPtr' info=' Local facets'/>
+      <field name='redef' type='struct _xmlSchemaType *' info=' Deprecated; not used'/>
+      <field name='recurse' type='int' info=' Obsolete'/>
+      <field name='attributeUses' type='xmlSchemaAttributeLinkPtr *' info=' Deprecated; not used'/>
       <field name='attributeWildcard' type='xmlSchemaWildcardPtr' info=''/>
-      <field name='builtInType' type='int' info=''/>
-      <field name='memberTypes' type='xmlSchemaTypeLinkPtr' info=''/>
-      <field name='facetSet' type='xmlSchemaFacetLinkPtr' info=''/>
-      <field name='refPrefix' type='const xmlChar *' info=''/>
-      <field name='contentTypeDef' type='xmlSchemaTypePtr' info=''/>
-      <field name='contModel' type='xmlRegexpPtr' info=''/>
+      <field name='builtInType' type='int' info=' Type of built-in types.'/>
+      <field name='memberTypes' type='xmlSchemaTypeLinkPtr' info=' member-types if a union type.'/>
+      <field name='facetSet' type='xmlSchemaFacetLinkPtr' info=' All facets (incl. inherited)'/>
+      <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+      <field name='contentTypeDef' type='xmlSchemaTypePtr' info=' Used for the simple content of complex types.
+Could we use @subtypes for this?'/>
+      <field name='contModel' type='xmlRegexpPtr' info=' Holds the automaton of the content model'/>
       <field name='targetNamespace' type='const xmlChar *' info=''/>
+      <field name='attrUses' type='void *' info=''/>
     </struct>
     <struct name='xmlSchemaTypeLink' file='schemasInternals' type='struct _xmlSchemaTypeLink'>
       <field name='next' type='struct _xmlSchemaTypeLink *' info=' the next type link ...'/>
-      <field name='type' type='xmlSchemaTypePtr' info=' the linked typ'/>
+      <field name='type' type='xmlSchemaTypePtr' info=' the linked type'/>
     </struct>
     <typedef name='xmlSchemaTypeLinkPtr' file='schemasInternals' type='xmlSchemaTypeLink *'/>
     <typedef name='xmlSchemaTypePtr' file='schemasInternals' type='xmlSchemaType *'/>
@@ -6520,11 +6557,11 @@
     <typedef name='xmlSchemaWhitespaceValueType' file='xmlschemastypes' type='enum'/>
     <struct name='xmlSchemaWildcard' file='schemasInternals' type='struct _xmlSchemaWildcard'>
       <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
-      <field name='id' type='const xmlChar *' info=''/>
+      <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
       <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
       <field name='node' type='xmlNodePtr' info=''/>
-      <field name='minOccurs' type='int' info=''/>
-      <field name='maxOccurs' type='int' info=''/>
+      <field name='minOccurs' type='int' info=' Deprecated; not used'/>
+      <field name='maxOccurs' type='int' info=' Deprecated; not used'/>
       <field name='processContents' type='int' info=''/>
       <field name='any' type='int' info=' Indicates if the ns constraint is of ##any'/>
       <field name='nsSet' type='xmlSchemaWildcardNsPtr' info=' The list of allowed namespaces'/>
@@ -7288,6 +7325,15 @@
       <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/>
       <arg name='size' type='int *' info='OUT: the memory length'/>
     </function>
+    <function name='htmlDocDumpMemoryFormat' file='HTMLtree' module='HTMLtree'>
+      <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+      <info>Dump an HTML document in memory and return the xmlChar * and it&apos;s size. It&apos;s up to the caller to free the memory.</info>
+      <return type='void'/>
+      <arg name='cur' type='xmlDocPtr' info='the document'/>
+      <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/>
+      <arg name='size' type='int *' info='OUT: the memory length'/>
+      <arg name='format' type='int' info='should formatting spaces been added'/>
+    </function>
     <function name='htmlElementAllowedHere' file='HTMLparser' module='HTMLparser'>
       <cond>defined(LIBXML_HTML_ENABLED)</cond>
       <info>Checks whether an HTML element may be a direct child of a parent element. Note - doesn&apos;t check for deprecated elements</info>
@@ -9412,7 +9458,7 @@
       <return type='int' info='the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings'/>
       <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
       <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
-      <arg name='list' type='const xmlChar **' info='where to store the tokens'/>
+      <arg name='langList' type='const xmlChar **' info='where to store the tokens'/>
       <arg name='len' type='int' info='the allocated lenght of @list'/>
     </function>
     <function name='xmlExpGetStart' file='xmlregexp' module='xmlregexp'>
@@ -9421,7 +9467,7 @@
       <return type='int' info='the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings'/>
       <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
       <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
-      <arg name='list' type='const xmlChar **' info='where to store the tokens'/>
+      <arg name='tokList' type='const xmlChar **' info='where to store the tokens'/>
       <arg name='len' type='int' info='the allocated lenght of @list'/>
     </function>
     <function name='xmlExpIsNillable' file='xmlregexp' module='xmlregexp'>
@@ -11139,7 +11185,7 @@
     </function>
     <function name='xmlNewGlobalNs' file='tree' module='legacy'>
       <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
-      <info>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.</info>
+      <info>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</info>
       <return type='xmlNsPtr' info='NULL this functionality had been removed'/>
       <arg name='doc' type='xmlDocPtr' info='the document carrying the namespace'/>
       <arg name='href' type='const xmlChar *' info='the URI associated'/>
@@ -11467,6 +11513,13 @@
       <return type='int' info='the number of byte written or -1 in case of error.'/>
       <arg name='out' type='xmlOutputBufferPtr' info='a buffered output'/>
     </function>
+    <function name='xmlOutputBufferCreateBuffer' file='xmlIO' module='xmlIO'>
+      <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+      <info>Create a buffered output for the progressive saving to a xmlBuffer</info>
+      <return type='xmlOutputBufferPtr' info='the new parser output or NULL'/>
+      <arg name='buffer' type='xmlBufferPtr' info='a xmlBufferPtr'/>
+      <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the encoding converter or NULL'/>
+    </function>
     <function name='xmlOutputBufferCreateFd' file='xmlIO' module='xmlIO'>
       <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
       <info>Create a buffered output for the progressive saving to a file descriptor</info>
@@ -12611,7 +12664,7 @@
     </function>
     <function name='xmlRelaxNGParse' file='relaxng' module='relaxng'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>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</info>
+      <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</info>
       <return type='xmlRelaxNGPtr' info='the internal XML RelaxNG structure built from the resource or NULL in case of error'/>
       <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='a Relax-NG parser context'/>
     </function>
@@ -13133,6 +13186,14 @@
       <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
       <arg name='escape' type='xmlCharEncodingOutputFunc' info='the escaping function'/>
     </function>
+    <function name='xmlSaveToBuffer' file='xmlsave' module='xmlsave'>
+      <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+      <info>Create a document saving context serializing to a buffer with the encoding and the options given</info>
+      <return type='xmlSaveCtxtPtr' info='a new serialization context or NULL in case of error.'/>
+      <arg name='buffer' type='xmlBufferPtr' info='a buffer'/>
+      <arg name='encoding' type='const char *' info='the encoding name to use or NULL'/>
+      <arg name='options' type='int' info='a set of xmlSaveOptions'/>
+    </function>
     <function name='xmlSaveToFd' file='xmlsave' module='xmlsave'>
       <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
       <info>Create a document saving context serializing to a file descriptor with the encoding and the options given.</info>
@@ -13252,9 +13313,9 @@
     </function>
     <function name='xmlSchemaFreeValidCtxt' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Free the resources associated to the schema validation context</info>
+      <info></info>
       <return type='void'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the schema validation context'/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
     </function>
     <function name='xmlSchemaFreeValue' file='xmlschemastypes' module='xmlschemastypes'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13325,12 +13386,12 @@
     </function>
     <function name='xmlSchemaGetValidErrors' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Get the error and warning callback informations</info>
-      <return type='int' info='-1 in case of error and 0 otherwise'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a XML-Schema validation context'/>
-      <arg name='err' type='xmlSchemaValidityErrorFunc *' info='the error function result'/>
-      <arg name='warn' type='xmlSchemaValidityWarningFunc *' info='the warning function result'/>
-      <arg name='ctx' type='void **' info='the functions context result'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='err' type='xmlSchemaValidityErrorFunc *' info=''/>
+      <arg name='warn' type='xmlSchemaValidityWarningFunc *' info=''/>
+      <arg name='ctx' type='void **' info=''/>
     </function>
     <function name='xmlSchemaInitTypes' file='xmlschemastypes' module='xmlschemastypes'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13346,9 +13407,9 @@
     </function>
     <function name='xmlSchemaIsValid' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Check if any error was detected during validation.</info>
-      <return type='int' info='1 if valid so far, 0 if errors were detected, and -1 in case of internal error.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the schema validation context'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
     </function>
     <function name='xmlSchemaNewDocParserCtxt' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13397,29 +13458,29 @@
     </function>
     <function name='xmlSchemaNewValidCtxt' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Create an XML Schemas validation context based on the given schema.</info>
-      <return type='xmlSchemaValidCtxtPtr' info='the validation context or NULL in case of error'/>
-      <arg name='schema' type='xmlSchemaPtr' info='a precompiled XML Schemas'/>
+      <info></info>
+      <return type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='schema' type='xmlSchemaPtr' info=''/>
     </function>
     <function name='xmlSchemaParse' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>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</info>
+      <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</info>
       <return type='xmlSchemaPtr' info='the internal XML Schema structure built from the resource or NULL in case of error'/>
       <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a schema validation context'/>
     </function>
     <function name='xmlSchemaSAXPlug' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</info>
-      <return type='xmlSchemaSAXPlugPtr' info='a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='sax' type='xmlSAXHandlerPtr *' info='a pointer to the original xmlSAXHandlerPtr'/>
-      <arg name='user_data' type='void **' info='a pointer to the original SAX user data pointer'/>
+      <info></info>
+      <return type='xmlSchemaSAXPlugPtr' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='sax' type='xmlSAXHandlerPtr *' info=''/>
+      <arg name='user_data' type='void **' info=''/>
     </function>
     <function name='xmlSchemaSAXUnplug' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</info>
-      <return type='int' info='0 in case of success and -1 in case of failure.'/>
-      <arg name='plug' type='xmlSchemaSAXPlugPtr' info='a data structure returned by xmlSchemaSAXPlug'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='plug' type='xmlSchemaSAXPlugPtr' info=''/>
     </function>
     <function name='xmlSchemaSetParserErrors' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13430,29 +13491,37 @@
       <arg name='warn' type='xmlSchemaValidityWarningFunc' info='the warning callback'/>
       <arg name='ctx' type='void *' info='contextual data for the callbacks'/>
     </function>
-    <function name='xmlSchemaSetValidErrors' file='xmlschemas' module='xmlschemas'>
+    <function name='xmlSchemaSetParserStructuredErrors' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Set the error and warning callback informations</info>
+      <info>Set the structured error callback</info>
       <return type='void'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='err' type='xmlSchemaValidityErrorFunc' info='the error function'/>
-      <arg name='warn' type='xmlSchemaValidityWarningFunc' info='the warning function'/>
+      <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a schema parser context'/>
+      <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
       <arg name='ctx' type='void *' info='the functions context'/>
     </function>
+    <function name='xmlSchemaSetValidErrors' file='xmlschemas' module='xmlschemas'>
+      <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+      <info></info>
+      <return type='void'/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='err' type='xmlSchemaValidityErrorFunc' info=''/>
+      <arg name='warn' type='xmlSchemaValidityWarningFunc' info=''/>
+      <arg name='ctx' type='void *' info=''/>
+    </function>
     <function name='xmlSchemaSetValidOptions' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Sets the options to be used during the validation.</info>
-      <return type='int' info='0 in case of success, -1 in case of an API error.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='options' type='int' info='a combination of xmlSchemaValidOption'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='options' type='int' info=''/>
     </function>
     <function name='xmlSchemaSetValidStructuredErrors' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Set the structured error callback</info>
+      <info></info>
       <return type='void'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
-      <arg name='ctx' type='void *' info='the functions context'/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='serror' type='xmlStructuredErrorFunc' info=''/>
+      <arg name='ctx' type='void *' info=''/>
     </function>
     <function name='xmlSchemaValPredefTypeNode' file='xmlschemastypes' module='xmlschemastypes'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13474,16 +13543,16 @@
     </function>
     <function name='xmlSchemaValidCtxtGetOptions' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Get the validation context options.</info>
-      <return type='int' info='the option combination or -1 on error.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
     </function>
     <function name='xmlSchemaValidateDoc' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Validate a document tree in memory.</info>
-      <return type='int' info='0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='doc' type='xmlDocPtr' info='a parsed document tree'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='instance' type='xmlDocPtr' info=''/>
     </function>
     <function name='xmlSchemaValidateFacet' file='xmlschemastypes' module='xmlschemastypes'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13507,11 +13576,11 @@
     </function>
     <function name='xmlSchemaValidateFile' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</info>
-      <return type='int' info='0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='filename' type='const char *' info='the URI of the instance'/>
-      <arg name='options' type='int' info='a future set of options, currently unused'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='filename' type='const char *' info=''/>
+      <arg name='options' type='int' info=''/>
     </function>
     <function name='xmlSchemaValidateLengthFacet' file='xmlschemastypes' module='xmlschemastypes'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13545,10 +13614,10 @@
     </function>
     <function name='xmlSchemaValidateOneElement' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Validate a branch of a tree, starting with the given @elem.</info>
-      <return type='int' info='0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='elem' type='xmlNodePtr' info='an element node'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='elem' type='xmlNodePtr' info=''/>
     </function>
     <function name='xmlSchemaValidatePredefinedType' file='xmlschemastypes' module='xmlschemastypes'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13560,13 +13629,13 @@
     </function>
     <function name='xmlSchemaValidateStream' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</info>
-      <return type='int' info='0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/>
-      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
-      <arg name='input' type='xmlParserInputBufferPtr' info='the input to use for reading the data'/>
-      <arg name='enc' type='xmlCharEncoding' info='an optional encoding information'/>
-      <arg name='sax' type='xmlSAXHandlerPtr' info='a SAX handler for the resulting events'/>
-      <arg name='user_data' type='void *' info='the context to provide to the SAX handler.'/>
+      <info></info>
+      <return type='int' info=''/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/>
+      <arg name='input' type='xmlParserInputBufferPtr' info=''/>
+      <arg name='enc' type='xmlCharEncoding' info=''/>
+      <arg name='sax' type='xmlSAXHandlerPtr' info=''/>
+      <arg name='user_data' type='void *' info=''/>
     </function>
     <functype name='xmlSchemaValidityErrorFunc' file='xmlschemas' module='xmlschemas'>
       <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -13971,7 +14040,7 @@
       <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
     </function>
     <function name='xmlStrEqual' file='xmlstring' module='xmlstring'>
-      <info>Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()</info>
+      <info>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</info>
       <return type='int' info='1 if they are equal, 0 if they are different'/>
       <arg name='str1' type='const xmlChar *' info='the first xmlChar *'/>
       <arg name='str2' type='const xmlChar *' info='the second xmlChar *'/>
@@ -14047,7 +14116,7 @@
     </function>
     <function name='xmlStreamPush' file='pattern' module='pattern'>
       <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
-      <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</info>
+      <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</info>
       <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/>
       <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
       <arg name='name' type='const xmlChar *' info='the current name'/>
@@ -14055,12 +14124,27 @@
     </function>
     <function name='xmlStreamPushAttr' file='pattern' module='pattern'>
       <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
-      <info>Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</info>
+      <info>Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</info>
       <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/>
       <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
       <arg name='name' type='const xmlChar *' info='the current name'/>
       <arg name='ns' type='const xmlChar *' info='the namespace name'/>
     </function>
+    <function name='xmlStreamPushNode' file='pattern' module='pattern'>
+      <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+      <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</info>
+      <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/>
+      <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
+      <arg name='name' type='const xmlChar *' info='the current name'/>
+      <arg name='ns' type='const xmlChar *' info='the namespace name'/>
+      <arg name='nodeType' type='int' info='the type of the node being pushed'/>
+    </function>
+    <function name='xmlStreamWantsAnyNode' file='pattern' module='pattern'>
+      <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+      <info>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</info>
+      <return type='int' info='1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.'/>
+      <arg name='streamCtxt' type='xmlStreamCtxtPtr' info='the stream context'/>
+    </function>
     <function name='xmlStringCurrentChar' file='parserInternals' module='parserInternals'>
       <info>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.</info>
       <return type='int' info='the current char value and its length'/>
@@ -14115,18 +14199,18 @@
       <arg name='len' type='int' info='the max comparison length'/>
     </function>
     <function name='xmlStrncat' file='xmlstring' module='xmlstring'>
-      <info>a strncat for array of xmlChar&apos;s, it will extend @cur with the len first bytes of @add.</info>
+      <info>a strncat for array of xmlChar&apos;s, it will extend @cur with the len first bytes of @add. Note that if @len &lt; 0 then this is an API error and NULL will be returned.</info>
       <return type='xmlChar *' info='a new xmlChar *, the original @cur is reallocated if needed and should not be freed'/>
       <arg name='cur' type='xmlChar *' info='the original xmlChar * array'/>
       <arg name='add' type='const xmlChar *' info='the xmlChar * array added'/>
       <arg name='len' type='int' info='the length of @add'/>
     </function>
     <function name='xmlStrncatNew' file='xmlstring' module='xmlstring'>
-      <info>same as xmlStrncat, but creates a new string.  The original two strings are not freed.</info>
+      <info>same as xmlStrncat, but creates a new string.  The original two strings are not freed. If @len is &lt; 0 then the length will be calculated automatically.</info>
       <return type='xmlChar *' info='a new xmlChar * or NULL'/>
       <arg name='str1' type='const xmlChar *' info='first xmlChar string'/>
       <arg name='str2' type='const xmlChar *' info='second xmlChar string'/>
-      <arg name='len' type='int' info='the len of @str2'/>
+      <arg name='len' type='int' info='the len of @str2 or &lt; 0'/>
     </function>
     <function name='xmlStrncmp' file='xmlstring' module='xmlstring'>
       <info>a strncmp for xmlChar&apos;s</info>
@@ -14546,13 +14630,13 @@
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderReadInnerXml' file='xmlreader' module='xmlreader'>
-      <cond>defined(LIBXML_READER_ENABLED)</cond>
+      <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_WRITER_ENABLED)</cond>
       <info>Reads the contents of the current node, including child nodes and markup.</info>
       <return type='xmlChar *' info='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.'/>
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderReadOuterXml' file='xmlreader' module='xmlreader'>
-      <cond>defined(LIBXML_READER_ENABLED)</cond>
+      <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_WRITER_ENABLED)</cond>
       <info>Reads the contents of the current node, including child nodes and markup.</info>
       <return type='xmlChar *' info='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.'/>
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
@@ -14585,11 +14669,19 @@
     </function>
     <function name='xmlTextReaderSchemaValidate' file='xmlreader' module='xmlreader'>
       <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
-      <info>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.</info>
-      <return type='int' info='0 in case the schemas validation could be (des)activated and -1 in case of error.'/>
+      <info>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</info>
+      <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/>
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
       <arg name='xsd' type='const char *' info='the path to a W3C XSD schema or NULL'/>
     </function>
+    <function name='xmlTextReaderSchemaValidateCtxt' file='xmlreader' module='xmlreader'>
+      <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
+      <info>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</info>
+      <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+      <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the XML Schema validation context or NULL'/>
+      <arg name='options' type='int' info='options (not used yet)'/>
+    </function>
     <function name='xmlTextReaderSetErrorHandler' file='xmlreader' module='xmlreader'>
       <cond>defined(LIBXML_READER_ENABLED)</cond>
       <info>Register a callback function that will be called on error and warnings.  If @f is NULL, the default error and warning handlers are restored.</info>
@@ -16436,7 +16528,7 @@
       <info>Build/extend a list of  potential children allowed by the content tree</info>
       <return type='int' info='the number of element in the list, or -1 in case of error.'/>
       <arg name='ctree' type='xmlElementContent *' info='an element content tree'/>
-      <arg name='list' type='const xmlChar **' info='an array to store the list of child names'/>
+      <arg name='names' type='const xmlChar **' info='an array to store the list of child names'/>
       <arg name='len' type='int *' info='a pointer to the number of element in the list'/>
       <arg name='max' type='int' info='the size of the array'/>
     </function>

Modified: packages/libxml2/branches/upstream/current/doc/libxml2.xsa
===================================================================
--- packages/libxml2/branches/upstream/current/doc/libxml2.xsa	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/libxml2.xsa	2006-01-06 18:12:46 UTC (rev 501)
@@ -8,45 +8,21 @@
   </vendor>
   <product id="libxml2">
     <name>libxml2</name>
-    <version>2.6.21</version>
-    <last-release> Sep 4 2005</last-release>
+    <version>2.6.22</version>
+    <last-release> Sep 12 2005</last-release>
     <info-url>http://xmlsoft.org/</info-url>
-    <changes>   - build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
-      convention problems on Windows (Marcus Boerger), cleanups based on
-      Linus' sparse tool, update of win32/configure.js (Rob Richards),
-      remove warnings on Windows(Marcus Boerger), compilation without SAX1,
-      detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew
-      W. Nosenko), compilation/link with threads and old gcc, compile
-      problem by C370 on Z/OS, 
-   - bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
-      bug (Jiri Netolicky), XPath NaN compare bug (William Brack), 
-      htmlParseScript potential bug, Schemas regexp handling of spaces,
-      Base64 Schemas comparisons NIST passes, automata build error xsd:all,
-      xmlGetNodePath for namespaced attributes (Alexander Pohoyda),
-      xmlSchemas foreign namespaces handling, XML Schemas facet comparison
-      (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier
-      Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model
-      group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI 
-      composition (William), xs:anyType in Schemas (Kasimier), Python resolver
-      emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr
-      Clapa), trying to fix the file path/URI conversion, 
-      xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak
-      (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism
-      detection problem, XInclude bug, Schemas context type (Dean Hill),
-      validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces
-      (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug,
-      error in encoding handling, xmlGetLineNo fixes, bug on entities handling,
-      entity name extraction in error handling with XInclude, text nodes
-      in HTML body tags (Gary Coady), xml:id and IDness at the treee level
-      fixes, XPath streaming patterns bugs.
-   - improvements: structured interfaces for schemas and RNG error reports
-      (Marcus Boerger), optimization of the char data inner loop parsing
-      (thanks to Behdad Esfahbod for the idea), schematron validation
-      though not finished yet, xmlSaveOption to omit XML declaration,
-      keyref match error reports (Kasimier), formal expression handling
-      code not plugged yet, more lax mode for the HTML parser, 
-      parser XML_PARSE_COMPACT option for text nodes allocation.
-   - documentation: xmllint man page had --nonet duplicated
+    <changes>   - build fixes: compile without schematron (Stéphane Bidoul)
+   - bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
+    CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
+    XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
+    output formatting for meta element (Rob Richards), script and style
+    XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
+    (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)
+   - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
+    XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
+    derive (Kasimier Buchcik).
+   - documentation: generation of gtk-doc like docs, integration with
+    devhelp.
 
 </changes>
   </product>

Modified: packages/libxml2/branches/upstream/current/doc/namespaces.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/namespaces.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/namespaces.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Namespaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Namespaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The libxml2 library implements <a href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by
+</style><title>Namespaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Namespaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The libxml2 library implements <a href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by
 recognizing namespace constructs in the input, and does namespace lookup
 automatically when building the DOM tree. A namespace declaration is
 associated with an in-memory structure and all elements or attributes within

Modified: packages/libxml2/branches/upstream/current/doc/news.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/news.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/news.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,164 +7,202 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Items not finished and worked on, get in touch with the list if you want
+</style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Items not finished and worked on, get in touch with the list if you want
 to help those</p><ul><li>More testing on RelaxNG</li>
   <li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML
   Schemas</a></li>
 </ul><p>The <a href="ChangeLog.html">change log</a> describes the recents commits
-to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p><p>There is the list of public releases:</p><h3>2.6.22: Sep 12 2005</h3><ul><li>build fixes: compile without schematron (Stéphane Bidoul)</li>
+to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p><p>There is the list of public releases:</p><h3>2.6.23: Jan 5 2006</h3><ul><li>portability fixes: Windows (Rob Richards), getaddrinfo on Windows
+    (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas),
+    --with-minimum compilation fixes (William Brack), error case handling fix
+    on Solaris (Albert Chin), don't use 'list' as parameter name reported by
+    Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin),
+    MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones),
+  </li>
+  <li>code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose
+    (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring
+    parsing code (Bjorn Reese)</li>
+  <li>bug fixes: xmlBuildRelativeURI and empty path (William Brack),
+    combinatory explosion and performances in regexp code, leak in
+    xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo
+    Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik),
+    XPath pattern based evaluation bugs (DV &amp; Kasimier),
+    xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in
+    xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of
+    vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF
+    split problem (William), issues with non-namespaced attributes in
+    xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
+    HTML parsing of script, Python must not output to stdout (Nic Ferrier),
+    exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+    totalDigits bug (Kasimier Buchcik), error handling when writing to an
+    xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
+    Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
+    XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier),
+    fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml
+    (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
+    runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
+    (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
+    compilation and build fixes (Michael Day), removed dependancies on
+    xmlSchemaValidError (Kasimier), bug with &lt;xml:foo/&gt;, more XPath
+    pattern based evaluation fixes (Kasimier)</li>
+  <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier
+    Buchcik), node copy checks and fix for attribute (Rob Richards), counted
+    transition bug in regexps, ctxt-&gt;standalone = -2 to indicate no
+    standalone attribute was found, add xmlSchemaSetParserStructuredErrors()
+    (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API
+    (Kasimier), handle gzipped HTTP resources (Gary Coady), add
+    htmlDocDumpMemoryFormat. (Rob Richards), </li>
+  <li>documentation: typo (Michael Day), libxml man page (Albert Chin), save
+    function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),
+  </li>
+</ul><h3>2.6.22: Sep 12 2005</h3><ul><li>build fixes: compile without schematron (Stéphane Bidoul)</li>
   <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
-      CDATA push parser bug, xmlElemDump problem with XHTML1 doc, 
-      XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx,
-      fix some output formatting for meta element (Rob Richards),
-      script and style XHTML1 serialization (David Madore), Attribute
-      derivation fixups in XSD (Kasimier Buchcik), better IDC error
-      reports (Kasimier Buchcik)
-      </li>
-  <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards),
-      add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements
-      preparing for derive (Kasimier Buchcik).</li>
+    CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
+    XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
+    output formatting for meta element (Rob Richards), script and style
+    XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
+    (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)</li>
+  <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
+    XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
+    derive (Kasimier Buchcik).</li>
   <li>documentation: generation of gtk-doc like docs, integration with
-      devhelp.</li>
+    devhelp.</li>
 </ul><h3>2.6.21: Sep 4 2005</h3><ul><li>build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
-      convention problems on Windows (Marcus Boerger), cleanups based on
-      Linus' sparse tool, update of win32/configure.js (Rob Richards),
-      remove warnings on Windows(Marcus Boerger), compilation without SAX1,
-      detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew
-      W. Nosenko), compilation/link with threads and old gcc, compile
-      problem by C370 on Z/OS, </li>
+    convention problems on Windows (Marcus Boerger), cleanups based on Linus'
+    sparse tool, update of win32/configure.js (Rob Richards), remove warnings
+    on Windows(Marcus Boerger), compilation without SAX1, detection of the
+    Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko),
+    compilation/link with threads and old gcc, compile problem by C370 on
+    Z/OS,</li>
   <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
-      bug (Jiri Netolicky), XPath NaN compare bug (William Brack), 
-      htmlParseScript potential bug, Schemas regexp handling of spaces,
-      Base64 Schemas comparisons NIST passes, automata build error xsd:all,
-      xmlGetNodePath for namespaced attributes (Alexander Pohoyda),
-      xmlSchemas foreign namespaces handling, XML Schemas facet comparison
-      (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier
-      Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model
-      group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI 
-      composition (William), xs:anyType in Schemas (Kasimier), Python resolver
-      emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr
-      Clapa), trying to fix the file path/URI conversion, 
-      xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak
-      (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism
-      detection problem, XInclude bug, Schemas context type (Dean Hill),
-      validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces
-      (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug,
-      error in encoding handling, xmlGetLineNo fixes, bug on entities handling,
-      entity name extraction in error handling with XInclude, text nodes
-      in HTML body tags (Gary Coady), xml:id and IDness at the treee level
-      fixes, XPath streaming patterns bugs.</li>
+    bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
+    htmlParseScript potential bug, Schemas regexp handling of spaces, Base64
+    Schemas comparisons NIST passes, automata build error xsd:all,
+    xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas
+    foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
+    Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
+    namespace ahndling in Schemas (Kasimier), empty model group in Schemas
+    (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+    xs:anyType in Schemas (Kasimier), Python resolver emmitting error
+    messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
+    fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
+    Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
+    serialization, streaming XPath, Schemas determinism detection problem,
+    XInclude bug, Schemas context type (Dean Hill), validation fix (Derek
+    Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas
+    type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
+    xmlGetLineNo fixes, bug on entities handling, entity name extraction in
+    error handling with XInclude, text nodes in HTML body tags (Gary Coady),
+    xml:id and IDness at the treee level fixes, XPath streaming patterns
+  bugs.</li>
   <li>improvements: structured interfaces for schemas and RNG error reports
-      (Marcus Boerger), optimization of the char data inner loop parsing
-      (thanks to Behdad Esfahbod for the idea), schematron validation
-      though not finished yet, xmlSaveOption to omit XML declaration,
-      keyref match error reports (Kasimier), formal expression handling
-      code not plugged yet, more lax mode for the HTML parser, 
-      parser XML_PARSE_COMPACT option for text nodes allocation.</li>
+    (Marcus Boerger), optimization of the char data inner loop parsing
+    (thanks to Behdad Esfahbod for the idea), schematron validation though
+    not finished yet, xmlSaveOption to omit XML declaration, keyref match
+    error reports (Kasimier), formal expression handling code not plugged
+    yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option
+    for text nodes allocation.</li>
   <li>documentation: xmllint man page had --nonet duplicated</li>
-</ul><h3>2.6.20: Jul 10 2005</h3><ul><li> build fixes: Windows build (Rob Richards), Mingw compilation (Igor
-       Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
-       andriy at google.com), use gcc weak references to pthread to avoid the
-       pthread dependancy on Linux, compilation problem (Steve Nairn),
-       compiling of subset (Morten Welinder), IPv6/ss_family compilation
-       (William Brack), compilation when disabling parts of the library,
-       standalone test distribution.
-       </li>
-  <li> bug fixes: bug in lang(), memory cleanup on errors (William Brack),
-       HTTP query strings (Aron Stansvik), memory leak in DTD (William),
-       integer overflow in XPath (William), nanoftp buffer size, pattern
-       "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe,
-       replaceNode patch (Brent Hendricks), CDATA with NULL content
-       (Mark Vakoc), xml:base fixup on XInclude (William), pattern
-       fixes (William), attribute bug in exclusive c14n (Aleksey Sanin),
-       xml:space and xml:lang with SAX2 (Rob Richards), namespace 
-       trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes
-       (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards),
-       Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards),
-       a small RelaxNG leak, HTML parsing in push mode bug (James Bursa),
-       failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks()
-       heuristic failure, duplicate attributes in DTD bug (William).
-       </li>
-  <li> improvements: lot of work on Schemas by Kasimier Buchcik both on 
-       conformance and streaming, Schemas validation messages (Kasimier
-       Buchcik, Matthew Burgess), namespace removal at the python level
-       (Brent Hendricks), Update to new Schemas regression tests from
-       W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation
-       of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
-       standalone test framework and programs, new DOM import APIs
-       xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
-       xmlDOMWrapRemoveNode(), extension of xmllint capabilities for
-       SAX and Schemas regression tests, xmlStopParser() available in
-       pull mode too, ienhancement to xmllint --shell namespaces support,
-       Windows port of the standalone testing tools (Kasimier and William),
-       xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug()
-       SAX Schemas APIs, Schemas xmlReader support.
-       </li>
-</ul><h3>2.6.19: Apr 02 2005</h3><ul><li> build fixes: drop .la from RPMs, --with-minimum build fix (William
-       Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with
-       AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction
-       code on Linux/ELF/gcc4</li>
-  <li> bug fixes: schemas type decimal fixups (William Brack), xmmlint return
-       code (Gerry Murphy), small schemas fixes (Matthew Burgess and
-       GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey
-       Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute
-       validation (Kasimier), Prop related functions and xmlNewNodeEatName
-       (Rob Richards), HTML serialization of name attribute on a elements,
-       Python error handlers leaks and improvement (Brent Hendricks), 
-       uninitialized variable in encoding code, Relax-NG validation bug,
-       potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and
-       xmlParseDoc signatures, switched back to assuming UTF-8 in case 
-       no encoding is given at serialization time</li>
-  <li> improvements: lot of work on Schemas by Kasimier Buchcik on facets
-       checking and also mixed handling.</li>
+</ul><h3>2.6.20: Jul 10 2005</h3><ul><li>build fixes: Windows build (Rob Richards), Mingw compilation (Igor
+    Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
+    andriy at google.com), use gcc weak references to pthread to avoid the
+    pthread dependancy on Linux, compilation problem (Steve Nairn), compiling
+    of subset (Morten Welinder), IPv6/ss_family compilation (William Brack),
+    compilation when disabling parts of the library, standalone test
+    distribution.</li>
+  <li>bug fixes: bug in lang(), memory cleanup on errors (William Brack),
+    HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer
+    overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup
+    (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch
+    (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup
+    on XInclude (William), pattern fixes (William), attribute bug in
+    exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob
+    Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type
+    QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug
+    (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob
+    Richards), a small RelaxNG leak, HTML parsing in push mode bug (James
+    Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
+    areBlanks() heuristic failure, duplicate attributes in DTD bug
+  (William).</li>
+  <li>improvements: lot of work on Schemas by Kasimier Buchcik both on
+    conformance and streaming, Schemas validation messages (Kasimier Buchcik,
+    Matthew Burgess), namespace removal at the python level (Brent
+    Hendricks), Update to new Schemas regression tests from W3C/Nist
+    (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of
+    xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
+    standalone test framework and programs, new DOM import APIs
+    xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
+    xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and
+    Schemas regression tests, xmlStopParser() available in pull mode too,
+    ienhancement to xmllint --shell namespaces support, Windows port of the
+    standalone testing tools (Kasimier and William),
+    xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX
+    Schemas APIs, Schemas xmlReader support.</li>
+</ul><h3>2.6.19: Apr 02 2005</h3><ul><li>build fixes: drop .la from RPMs, --with-minimum build fix (William
+    Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX
+    5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on
+    Linux/ELF/gcc4</li>
+  <li>bug fixes: schemas type decimal fixups (William Brack), xmmlint return
+    code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY
+    Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin),
+    segfault in Schemas (Kasimier Buchcik), Schemas attribute validation
+    (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards),
+    HTML serialization of name attribute on a elements, Python error handlers
+    leaks and improvement (Brent Hendricks), uninitialized variable in
+    encoding code, Relax-NG validation bug, potential crash if
+    gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures,
+    switched back to assuming UTF-8 in case no encoding is given at
+    serialization time</li>
+  <li>improvements: lot of work on Schemas by Kasimier Buchcik on facets
+    checking and also mixed handling.</li>
   <li></li>
-</ul><h3>2.6.18: Mar 13 2005</h3><ul><li> build fixes: warnings (Peter Breitenlohner), testapi.c generation, 
-       Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
-       some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li>
-  <li> bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
-       xmlreader stopping on non-fatal errors, thread support for dictionnaries
-       reference counting (Gary Coady), internal subset and push problem, 
-       URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python
-       paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, 
-       xmlSetNsProp fix (Mike Hommey), warning should not count as error
-       (William Brack), xmlCreatePushParser empty chunk, XInclude parser
-       flags (William), cleanup FTP and HTTP code to reuse the uri parsing
-       and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards),
-       XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards),
-       multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier),
-       Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4
-       on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type
-       fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).</li>
-  <li> improvement: speedup parsing comments and DTDs, dictionnary support for
-       hash tables, Schemas Identity constraints (Kasimier), streaming XPath
-       subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
-       values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
-       Stansvik), </li>
-  <li> Documentation: Wiki support (Joel Reed)
-</li></ul><h3>2.6.17: Jan 16 2005</h3><ul><li>build fixes: Windows, warnings removal (William Brack), 
-      maintainer-clean dependency(William), build in a different directory
-      (William), fixing --with-minimum configure build (William), BeOS
-      build (Marcin Konicki), Python-2.4 detection (William), compilation
-      on AIX (Dan McNichol)</li>
+</ul><h3>2.6.18: Mar 13 2005</h3><ul><li>build fixes: warnings (Peter Breitenlohner), testapi.c generation,
+    Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
+    some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li>
+  <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
+    xmlreader stopping on non-fatal errors, thread support for dictionnaries
+    reference counting (Gary Coady), internal subset and push problem, URL
+    saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
+    fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
+    (Mike Hommey), warning should not count as error (William Brack),
+    xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup
+    FTP and HTTP code to reuse the uri parsing and IPv6 (William),
+    xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being
+    empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows
+    (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent
+    Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
+    (Rob Richards), Schemas decimal type fixes (William Brack),
+    xmlByteConsumed static buffer (Ben Maurer).</li>
+  <li>improvement: speedup parsing comments and DTDs, dictionnary support for
+    hash tables, Schemas Identity constraints (Kasimier), streaming XPath
+    subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
+    values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
+  Stansvik),</li>
+  <li>Documentation: Wiki support (Joel Reed)</li>
+</ul><h3>2.6.17: Jan 16 2005</h3><ul><li>build fixes: Windows, warnings removal (William Brack),
+    maintainer-clean dependency(William), build in a different directory
+    (William), fixing --with-minimum configure build (William), BeOS build
+    (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
+    McNichol)</li>
   <li>bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile()
-      to use the catalog(s), loop on output (William Brack), XPath memory leak,
-      ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
-      warning not using error callback (William), xmlStopParser bug (William),
-      UTF-16 with BOM on DTDs (William), namespace bug on empty elements
-      in push mode (Rob Richards), line and col computations fixups (Aleksey
-      Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
-      patterns with too many steps, bug in RNG choice optimization, line
-      number sometimes missing.
-      </li>
-  <li>improvements: XSD Schemas (Kasimier Buchcik), python generator (William),
-      xmlUTF8Strpos speedup (William), unicode Python strings (William),
-      XSD error reports (Kasimier Buchcik), Python __str__ call serialize().
-      </li>
-  <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber
-      for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs
-      (mostly Joel Reed), error extraction API from regexps, new XMLSave
-      option for format (Phil Shafer)</li>
-  <li>documentation: site improvement (John Fleck), FAQ entries (William).</li>
+    to use the catalog(s), loop on output (William Brack), XPath memory leak,
+    ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
+    warning not using error callback (William), xmlStopParser bug (William),
+    UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
+    push mode (Rob Richards), line and col computations fixups (Aleksey
+    Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
+    patterns with too many steps, bug in RNG choice optimization, line number
+    sometimes missing.</li>
+  <li>improvements: XSD Schemas (Kasimier Buchcik), python generator
+    (William), xmlUTF8Strpos speedup (William), unicode Python strings
+    (William), XSD error reports (Kasimier Buchcik), Python __str__ call
+    serialize().</li>
+  <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for
+    the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel
+    Reed), error extraction API from regexps, new XMLSave option for format
+    (Phil Shafer)</li>
+  <li>documentation: site improvement (John Fleck), FAQ entries
+  (William).</li>
 </ul><h3>2.6.16: Nov 10 2004</h3><ul><li>general hardening and bug fixing crossing all the API based on new
     automated regression testing</li>
   <li>build fix: IPv6 build and test on AIX (Dodji Seketeli)</li>
@@ -174,7 +212,7 @@
   <li>documentation: fix to xmllint man page, some API function descritpion
     were updated.</li>
   <li>improvements: DTD validation APIs provided at the Python level (Brent
-    Hendricks) </li>
+    Hendricks)</li>
 </ul><h3>2.6.15: Oct 27 2004</h3><ul><li>security fixes on the nanoftp and nanohttp modules</li>
   <li>build fixes: xmllint detection bug in configure, building outside the
     source tree (Thomas Fitzsimmons)</li>

Modified: packages/libxml2/branches/upstream/current/doc/python.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/python.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/python.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -33,8 +33,9 @@
     libxml2</a> with Kylix, Delphi and other Pascal compilers.</li>
   <li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
     implementation for Kylix2/D5/D6 from Borland.</li>
-  <li>There is <a href="http://rubyforge.org/projects/xml-tools/">bindings for Ruby</a>  and
-    libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
+  <li>There is <a href="http://rubyforge.org/projects/xml-tools/">bindings
+    for Ruby</a>  and libxml2 bindings are also available in Ruby through the
+    <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
     maintained by Tobias Peters.</li>
   <li>Steve Ball and contributors maintains <a href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for
     Tcl</a>.</li>
@@ -49,17 +50,15 @@
     osax</a>. This is an osax for Mac OS X with a set of commands to
     implement in AppleScript the XML DOM, XPATH and XSLT. Also includes
     commands for Property-lists (Apple's fast lookup table XML format.)</li>
-  <li>Francesco Montorsi developped
-<a href="https://sourceforge.net/project/showfiles.php?group_id=51305&amp;package_id=45182">wxXml2</a>
+  <li>Francesco Montorsi developped <a href="https://sourceforge.net/project/showfiles.php?group_id=51305&amp;package_id=45182">wxXml2</a>
     wrappers that interface libxml2, allowing wxWidgets applications to
     load/save/edit XML instances.</li>
 </ul><p>The distribution includes a set of Python bindings, which are guaranteed
 to be maintained as part of the library in the future, though the Python
 interface have not yet reached the completeness of the C API.</p><p>Note that some of the Python purist dislike the default set of Python
-bindings, rather than complaining I suggest they have a look at 
-<a href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2 and libxslt</a> and 
-<a href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn Faassen</a>
-complete those.</p><p><a href="mailto:stephane.bidoul at softwareag.com">Stéphane Bidoul</a>
+bindings, rather than complaining I suggest they have a look at <a href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2
+and libxslt</a> and <a href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn
+Faassen</a> complete those.</p><p><a href="mailto:stephane.bidoul at softwareag.com">Stéphane Bidoul</a>
 maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port
 of the Python bindings</a>.</p><p>Note to people interested in building bindings, the API is formalized as
 <a href="libxml2-api.xml">an XML API description file</a> which allows to

Modified: packages/libxml2/branches/upstream/current/doc/site.xsl
===================================================================
--- packages/libxml2/branches/upstream/current/doc/site.xsl	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/site.xsl	2006-01-06 18:12:46 UTC (rev 501)
@@ -318,7 +318,7 @@
     </form>
     <ul><!-- style="margin-left: -1em" -->
       <li><a href="index.html">Home</a></li>
-      <li><a href="http://xmlsoft.org/wiki">Wiki</a></li>
+      <!--<li><a href="http://xmlsoft.org/wiki">Wiki</a></li> -->
       <li><a href="html/index.html">Reference Manual</a></li>
       <xsl:for-each select="/html/body/h2">
         <xsl:variable name="filename">

Modified: packages/libxml2/branches/upstream/current/doc/xml.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/xml.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/xml.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -3,7 +3,7 @@
 <html>
 <head>
   <title>The XML C parser and toolkit of Gnome</title>
-  <meta name="GENERATOR" content="amaya 5.1">
+  <meta name="GENERATOR" content="amaya 8.5, see http://www.w3.org/Amaya/">
   <meta http-equiv="Content-Type" content="text/html">
 </head>
 
@@ -124,7 +124,6 @@
 alt="benchmark results for Expat Xerces libxml2 Oracle and Sun toolkits"></p>
 -------------->
 
-
 <p>Logo designed by <a href="mailto:liyanage at access.ch">Marc Liyanage</a>.</p>
 
 <h2><a name="Introducti">Introduction</a></h2>
@@ -315,41 +314,49 @@
     <p><code>CFLAGS=`xml2-config --cflags`</code></p>
     <p><code>LIBS=`xml2-config --libs`</code></p>
   </li>
-  <li><em>I want to install my own copy of libxml2 in my home directory and link
-    my programs against it, but it doesn't work</em>
+  <li><em>I want to install my own copy of libxml2 in my home directory and
+    link my programs against it, but it doesn't work</em>
     <p>There are many different ways to accomplish this.  Here is one way to
-      do this under Linux.  Suppose your home directory is <code>/home/user.
-      </code>Then:</p>
-    <ul><li>Create a subdirectory, let's call it <code>myxml</code></li>
+    do this under Linux.  Suppose your home directory is <code>/home/user.
+    </code>Then:</p>
+    <ul>
+      <li>Create a subdirectory, let's call it <code>myxml</code></li>
       <li>unpack the libxml2 distribution into that subdirectory</li>
-      <li>chdir into the unpacked distribution (<code>/home/user/myxml/libxml2
-        </code>)</li>
+      <li>chdir into the unpacked distribution
+        (<code>/home/user/myxml/libxml2 </code>)</li>
       <li>configure the library using the "<code>--prefix</code>" switch,
-      specifying an installation subdirectory in <code>/home/user/myxml</code>,
-      e.g.
-      <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
-      configuration options}</p></li>
+        specifying an installation subdirectory in
+        <code>/home/user/myxml</code>, e.g.
+        <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
+        configuration options}</p>
+      </li>
       <li>now run <code>make</code> followed by <code>make install</code></li>
       <li>At this point, the installation subdirectory contains the complete
-      "private" include files, library files and binary program files (e.g.
-      xmllint), located in
-      <p> <code>/home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include
-      </code> and <code> /home/user/myxml/xmlinst/bin</code></p>
-      respectively.</li>
-      <li>In order to use this "private" library, you should first add it
-      to the beginning of your default PATH (so that your own private
-      program files such as xmllint will be used instead of the normal
-      system ones).  To do this, the Bash command would be
-      <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p></li>
+        "private" include files, library files and binary program files (e.g.
+        xmllint), located in
+        <p><code>/home/user/myxml/xmlinst/lib,
+        /home/user/myxml/xmlinst/include </code> and <code>
+        /home/user/myxml/xmlinst/bin</code></p>
+        respectively.</li>
+      <li>In order to use this "private" library, you should first add it to
+        the beginning of your default PATH (so that your own private program
+        files such as xmllint will be used instead of the normal system
+        ones).  To do this, the Bash command would be
+        <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p>
+      </li>
       <li>Now suppose you have a program <code>test1.c</code> that you would
-      like to compile with your "private" library.  Simply compile it
-      using the command <p><code>gcc `xml2-config --cflags --libs` -o test
-      test.c</code></p>  Note that, because your PATH has been set with <code>
-      /home/user/myxml/xmlinst/bin</code> at the beginning, the
-      xml2-config program which you just installed will be used instead of
-      the system default one, and this will <em>automatically</em> get the
-      correct libraries linked with your program.</li></ul>
-  </li><p/>
+        like to compile with your "private" library.  Simply compile it using
+        the command
+        <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p>
+        Note that, because your PATH has been set with <code>
+        /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config
+        program which you just installed will be used instead of the system
+        default one, and this will <em>automatically</em> get the correct
+        libraries linked with your program.</li>
+    </ul>
+  </li>
+
+  <p></p>
   <li><em>xmlDocDump() generates output on one line.</em>
     <p>Libxml2 will not <strong>invent</strong> spaces in the content of a
     document since <strong>all spaces in the content of a document are
@@ -663,14 +670,17 @@
     maintainer of the Windows port, <a
     href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
     binaries</a>.</li>
-  <li>Blastwave provides
-    <a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a>.</li>
+  <li>Blastwave provides <a
+    href="http://www.blastwave.org/packages.php/libxml2">Solaris
+  binaries</a>.</li>
   <li><a href="mailto:Steve.Ball at explain.com.au">Steve Ball</a> provides <a
     href="http://www.explain.com.au/oss/libxml2xslt.html">Mac Os X
     binaries</a>.</li>
   <li>The HP-UX porting center provides <a
     href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li>
-  <li>Bull provides precompiled <a href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as patr of their GNOME packages</li>
+  <li>Bull provides precompiled <a
+    href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as
+    patr of their GNOME packages</li>
 </ul>
 
 <p>If you know other supported binary ports, please <a
@@ -716,176 +726,223 @@
 
 <p>There is the list of public releases:</p>
 
+<h3>2.6.23: Jan 5 2006</h3>
+<ul>
+  <li>portability fixes: Windows (Rob Richards), getaddrinfo on Windows
+    (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas),
+    --with-minimum compilation fixes (William Brack), error case handling fix
+    on Solaris (Albert Chin), don't use 'list' as parameter name reported by
+    Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin),
+    MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones),
+  </li>
+  <li>code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose
+    (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring
+    parsing code (Bjorn Reese)</li>
+  <li>bug fixes: xmlBuildRelativeURI and empty path (William Brack),
+    combinatory explosion and performances in regexp code, leak in
+    xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo
+    Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik),
+    XPath pattern based evaluation bugs (DV &amp; Kasimier),
+    xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in
+    xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of
+    vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF
+    split problem (William), issues with non-namespaced attributes in
+    xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
+    HTML parsing of script, Python must not output to stdout (Nic Ferrier),
+    exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+    totalDigits bug (Kasimier Buchcik), error handling when writing to an
+    xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
+    Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
+    XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier),
+    fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml
+    (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
+    runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
+    (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
+    compilation and build fixes (Michael Day), removed dependancies on
+    xmlSchemaValidError (Kasimier), bug with &lt;xml:foo/&gt;, more XPath
+    pattern based evaluation fixes (Kasimier)</li>
+  <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier
+    Buchcik), node copy checks and fix for attribute (Rob Richards), counted
+    transition bug in regexps, ctxt-&gt;standalone = -2 to indicate no
+    standalone attribute was found, add xmlSchemaSetParserStructuredErrors()
+    (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API
+    (Kasimier), handle gzipped HTTP resources (Gary Coady), add
+    htmlDocDumpMemoryFormat. (Rob Richards), </li>
+  <li>documentation: typo (Michael Day), libxml man page (Albert Chin), save
+    function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),
+  </li>
+</ul>
+
 <h3>2.6.22: Sep 12 2005</h3>
 <ul>
   <li>build fixes: compile without schematron (Stéphane Bidoul)</li>
   <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
-      CDATA push parser bug, xmlElemDump problem with XHTML1 doc, 
-      XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx,
-      fix some output formatting for meta element (Rob Richards),
-      script and style XHTML1 serialization (David Madore), Attribute
-      derivation fixups in XSD (Kasimier Buchcik), better IDC error
-      reports (Kasimier Buchcik)
-      </li>
-  <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards),
-      add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements
-      preparing for derive (Kasimier Buchcik).</li>
+    CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
+    XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
+    output formatting for meta element (Rob Richards), script and style
+    XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
+    (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)</li>
+  <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
+    XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
+    derive (Kasimier Buchcik).</li>
   <li>documentation: generation of gtk-doc like docs, integration with
-      devhelp.</li>
+    devhelp.</li>
 </ul>
+
 <h3>2.6.21: Sep 4 2005</h3>
 <ul>
   <li>build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
-      convention problems on Windows (Marcus Boerger), cleanups based on
-      Linus' sparse tool, update of win32/configure.js (Rob Richards),
-      remove warnings on Windows(Marcus Boerger), compilation without SAX1,
-      detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew
-      W. Nosenko), compilation/link with threads and old gcc, compile
-      problem by C370 on Z/OS, </li>
+    convention problems on Windows (Marcus Boerger), cleanups based on Linus'
+    sparse tool, update of win32/configure.js (Rob Richards), remove warnings
+    on Windows(Marcus Boerger), compilation without SAX1, detection of the
+    Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko),
+    compilation/link with threads and old gcc, compile problem by C370 on
+    Z/OS,</li>
   <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
-      bug (Jiri Netolicky), XPath NaN compare bug (William Brack), 
-      htmlParseScript potential bug, Schemas regexp handling of spaces,
-      Base64 Schemas comparisons NIST passes, automata build error xsd:all,
-      xmlGetNodePath for namespaced attributes (Alexander Pohoyda),
-      xmlSchemas foreign namespaces handling, XML Schemas facet comparison
-      (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier
-      Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model
-      group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI 
-      composition (William), xs:anyType in Schemas (Kasimier), Python resolver
-      emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr
-      Clapa), trying to fix the file path/URI conversion, 
-      xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak
-      (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism
-      detection problem, XInclude bug, Schemas context type (Dean Hill),
-      validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces
-      (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug,
-      error in encoding handling, xmlGetLineNo fixes, bug on entities handling,
-      entity name extraction in error handling with XInclude, text nodes
-      in HTML body tags (Gary Coady), xml:id and IDness at the treee level
-      fixes, XPath streaming patterns bugs.</li>
+    bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
+    htmlParseScript potential bug, Schemas regexp handling of spaces, Base64
+    Schemas comparisons NIST passes, automata build error xsd:all,
+    xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas
+    foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
+    Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
+    namespace ahndling in Schemas (Kasimier), empty model group in Schemas
+    (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+    xs:anyType in Schemas (Kasimier), Python resolver emmitting error
+    messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
+    fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
+    Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
+    serialization, streaming XPath, Schemas determinism detection problem,
+    XInclude bug, Schemas context type (Dean Hill), validation fix (Derek
+    Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas
+    type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
+    xmlGetLineNo fixes, bug on entities handling, entity name extraction in
+    error handling with XInclude, text nodes in HTML body tags (Gary Coady),
+    xml:id and IDness at the treee level fixes, XPath streaming patterns
+  bugs.</li>
   <li>improvements: structured interfaces for schemas and RNG error reports
-      (Marcus Boerger), optimization of the char data inner loop parsing
-      (thanks to Behdad Esfahbod for the idea), schematron validation
-      though not finished yet, xmlSaveOption to omit XML declaration,
-      keyref match error reports (Kasimier), formal expression handling
-      code not plugged yet, more lax mode for the HTML parser, 
-      parser XML_PARSE_COMPACT option for text nodes allocation.</li>
+    (Marcus Boerger), optimization of the char data inner loop parsing
+    (thanks to Behdad Esfahbod for the idea), schematron validation though
+    not finished yet, xmlSaveOption to omit XML declaration, keyref match
+    error reports (Kasimier), formal expression handling code not plugged
+    yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option
+    for text nodes allocation.</li>
   <li>documentation: xmllint man page had --nonet duplicated</li>
 </ul>
+
 <h3>2.6.20: Jul 10 2005</h3>
 <ul>
-  <li> build fixes: Windows build (Rob Richards), Mingw compilation (Igor
-       Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
-       andriy at google.com), use gcc weak references to pthread to avoid the
-       pthread dependancy on Linux, compilation problem (Steve Nairn),
-       compiling of subset (Morten Welinder), IPv6/ss_family compilation
-       (William Brack), compilation when disabling parts of the library,
-       standalone test distribution.
-       </li>
-  <li> bug fixes: bug in lang(), memory cleanup on errors (William Brack),
-       HTTP query strings (Aron Stansvik), memory leak in DTD (William),
-       integer overflow in XPath (William), nanoftp buffer size, pattern
-       "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe,
-       replaceNode patch (Brent Hendricks), CDATA with NULL content
-       (Mark Vakoc), xml:base fixup on XInclude (William), pattern
-       fixes (William), attribute bug in exclusive c14n (Aleksey Sanin),
-       xml:space and xml:lang with SAX2 (Rob Richards), namespace 
-       trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes
-       (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards),
-       Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards),
-       a small RelaxNG leak, HTML parsing in push mode bug (James Bursa),
-       failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks()
-       heuristic failure, duplicate attributes in DTD bug (William).
-       </li>
-  <li> improvements: lot of work on Schemas by Kasimier Buchcik both on 
-       conformance and streaming, Schemas validation messages (Kasimier
-       Buchcik, Matthew Burgess), namespace removal at the python level
-       (Brent Hendricks), Update to new Schemas regression tests from
-       W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation
-       of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
-       standalone test framework and programs, new DOM import APIs
-       xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
-       xmlDOMWrapRemoveNode(), extension of xmllint capabilities for
-       SAX and Schemas regression tests, xmlStopParser() available in
-       pull mode too, ienhancement to xmllint --shell namespaces support,
-       Windows port of the standalone testing tools (Kasimier and William),
-       xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug()
-       SAX Schemas APIs, Schemas xmlReader support.
-       </li>
+  <li>build fixes: Windows build (Rob Richards), Mingw compilation (Igor
+    Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
+    andriy at google.com), use gcc weak references to pthread to avoid the
+    pthread dependancy on Linux, compilation problem (Steve Nairn), compiling
+    of subset (Morten Welinder), IPv6/ss_family compilation (William Brack),
+    compilation when disabling parts of the library, standalone test
+    distribution.</li>
+  <li>bug fixes: bug in lang(), memory cleanup on errors (William Brack),
+    HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer
+    overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup
+    (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch
+    (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup
+    on XInclude (William), pattern fixes (William), attribute bug in
+    exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob
+    Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type
+    QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug
+    (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob
+    Richards), a small RelaxNG leak, HTML parsing in push mode bug (James
+    Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
+    areBlanks() heuristic failure, duplicate attributes in DTD bug
+  (William).</li>
+  <li>improvements: lot of work on Schemas by Kasimier Buchcik both on
+    conformance and streaming, Schemas validation messages (Kasimier Buchcik,
+    Matthew Burgess), namespace removal at the python level (Brent
+    Hendricks), Update to new Schemas regression tests from W3C/Nist
+    (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of
+    xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
+    standalone test framework and programs, new DOM import APIs
+    xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
+    xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and
+    Schemas regression tests, xmlStopParser() available in pull mode too,
+    ienhancement to xmllint --shell namespaces support, Windows port of the
+    standalone testing tools (Kasimier and William),
+    xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX
+    Schemas APIs, Schemas xmlReader support.</li>
 </ul>
+
 <h3>2.6.19: Apr 02 2005</h3>
 <ul>
-  <li> build fixes: drop .la from RPMs, --with-minimum build fix (William
-       Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with
-       AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction
-       code on Linux/ELF/gcc4</li>
-  <li> bug fixes: schemas type decimal fixups (William Brack), xmmlint return
-       code (Gerry Murphy), small schemas fixes (Matthew Burgess and
-       GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey
-       Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute
-       validation (Kasimier), Prop related functions and xmlNewNodeEatName
-       (Rob Richards), HTML serialization of name attribute on a elements,
-       Python error handlers leaks and improvement (Brent Hendricks), 
-       uninitialized variable in encoding code, Relax-NG validation bug,
-       potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and
-       xmlParseDoc signatures, switched back to assuming UTF-8 in case 
-       no encoding is given at serialization time</li>
-  <li> improvements: lot of work on Schemas by Kasimier Buchcik on facets
-       checking and also mixed handling.</li>
+  <li>build fixes: drop .la from RPMs, --with-minimum build fix (William
+    Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX
+    5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on
+    Linux/ELF/gcc4</li>
+  <li>bug fixes: schemas type decimal fixups (William Brack), xmmlint return
+    code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY
+    Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin),
+    segfault in Schemas (Kasimier Buchcik), Schemas attribute validation
+    (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards),
+    HTML serialization of name attribute on a elements, Python error handlers
+    leaks and improvement (Brent Hendricks), uninitialized variable in
+    encoding code, Relax-NG validation bug, potential crash if
+    gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures,
+    switched back to assuming UTF-8 in case no encoding is given at
+    serialization time</li>
+  <li>improvements: lot of work on Schemas by Kasimier Buchcik on facets
+    checking and also mixed handling.</li>
   <li></li>
 </ul>
+
 <h3>2.6.18: Mar 13 2005</h3>
 <ul>
-  <li> build fixes: warnings (Peter Breitenlohner), testapi.c generation, 
-       Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
-       some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li>
-  <li> bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
-       xmlreader stopping on non-fatal errors, thread support for dictionnaries
-       reference counting (Gary Coady), internal subset and push problem, 
-       URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python
-       paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, 
-       xmlSetNsProp fix (Mike Hommey), warning should not count as error
-       (William Brack), xmlCreatePushParser empty chunk, XInclude parser
-       flags (William), cleanup FTP and HTTP code to reuse the uri parsing
-       and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards),
-       XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards),
-       multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier),
-       Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4
-       on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type
-       fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).</li>
-  <li> improvement: speedup parsing comments and DTDs, dictionnary support for
-       hash tables, Schemas Identity constraints (Kasimier), streaming XPath
-       subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
-       values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
-       Stansvik), </li>
-  <li> Documentation: Wiki support (Joel Reed)
+  <li>build fixes: warnings (Peter Breitenlohner), testapi.c generation,
+    Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
+    some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li>
+  <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
+    xmlreader stopping on non-fatal errors, thread support for dictionnaries
+    reference counting (Gary Coady), internal subset and push problem, URL
+    saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
+    fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
+    (Mike Hommey), warning should not count as error (William Brack),
+    xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup
+    FTP and HTTP code to reuse the uri parsing and IPv6 (William),
+    xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being
+    empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows
+    (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent
+    Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
+    (Rob Richards), Schemas decimal type fixes (William Brack),
+    xmlByteConsumed static buffer (Ben Maurer).</li>
+  <li>improvement: speedup parsing comments and DTDs, dictionnary support for
+    hash tables, Schemas Identity constraints (Kasimier), streaming XPath
+    subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
+    values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
+  Stansvik),</li>
+  <li>Documentation: Wiki support (Joel Reed)</li>
 </ul>
+
 <h3>2.6.17: Jan 16 2005</h3>
 <ul>
-  <li>build fixes: Windows, warnings removal (William Brack), 
-      maintainer-clean dependency(William), build in a different directory
-      (William), fixing --with-minimum configure build (William), BeOS
-      build (Marcin Konicki), Python-2.4 detection (William), compilation
-      on AIX (Dan McNichol)</li>
+  <li>build fixes: Windows, warnings removal (William Brack),
+    maintainer-clean dependency(William), build in a different directory
+    (William), fixing --with-minimum configure build (William), BeOS build
+    (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
+    McNichol)</li>
   <li>bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile()
-      to use the catalog(s), loop on output (William Brack), XPath memory leak,
-      ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
-      warning not using error callback (William), xmlStopParser bug (William),
-      UTF-16 with BOM on DTDs (William), namespace bug on empty elements
-      in push mode (Rob Richards), line and col computations fixups (Aleksey
-      Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
-      patterns with too many steps, bug in RNG choice optimization, line
-      number sometimes missing.
-      </li>
-  <li>improvements: XSD Schemas (Kasimier Buchcik), python generator (William),
-      xmlUTF8Strpos speedup (William), unicode Python strings (William),
-      XSD error reports (Kasimier Buchcik), Python __str__ call serialize().
-      </li>
-  <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber
-      for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs
-      (mostly Joel Reed), error extraction API from regexps, new XMLSave
-      option for format (Phil Shafer)</li>
-  <li>documentation: site improvement (John Fleck), FAQ entries (William).</li>
+    to use the catalog(s), loop on output (William Brack), XPath memory leak,
+    ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
+    warning not using error callback (William), xmlStopParser bug (William),
+    UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
+    push mode (Rob Richards), line and col computations fixups (Aleksey
+    Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
+    patterns with too many steps, bug in RNG choice optimization, line number
+    sometimes missing.</li>
+  <li>improvements: XSD Schemas (Kasimier Buchcik), python generator
+    (William), xmlUTF8Strpos speedup (William), unicode Python strings
+    (William), XSD error reports (Kasimier Buchcik), Python __str__ call
+    serialize().</li>
+  <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for
+    the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel
+    Reed), error extraction API from regexps, new XMLSave option for format
+    (Phil Shafer)</li>
+  <li>documentation: site improvement (John Fleck), FAQ entries
+  (William).</li>
 </ul>
 
 <h3>2.6.16: Nov 10 2004</h3>
@@ -899,7 +956,7 @@
   <li>documentation: fix to xmllint man page, some API function descritpion
     were updated.</li>
   <li>improvements: DTD validation APIs provided at the Python level (Brent
-    Hendricks) </li>
+    Hendricks)</li>
 </ul>
 
 <h3>2.6.15: Oct 27 2004</h3>
@@ -2443,10 +2500,9 @@
   <li>Uwe Fechner also provides <a
     href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
     implementation for Kylix2/D5/D6 from Borland.</li>
-  <li>There is <a
-    href="http://rubyforge.org/projects/xml-tools/">bindings for Ruby</a>  and
-    libxml2 bindings are also available in Ruby through the <a
-    href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
+  <li>There is <a href="http://rubyforge.org/projects/xml-tools/">bindings
+    for Ruby</a>  and libxml2 bindings are also available in Ruby through the
+    <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
     maintained by Tobias Peters.</li>
   <li>Steve Ball and contributors maintains <a
     href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for
@@ -2457,14 +2513,15 @@
     libxslt as part of GNU ClasspathX project.</li>
   <li>Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for
     <a href="http://www.interlog.com/~ptjm/software.html">RexxXML</a>.</li>
-  <li><a href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a>
+  <li><a
+    href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a>
     provides <a
     href="http://www.satimage.fr/software/en/downloads_osaxen.html">XMLLib
     osax</a>. This is an osax for Mac OS X with a set of commands to
     implement in AppleScript the XML DOM, XPATH and XSLT. Also includes
     commands for Property-lists (Apple's fast lookup table XML format.)</li>
-  <li>Francesco Montorsi developped
-<a href="https://sourceforge.net/project/showfiles.php?group_id=51305&amp;package_id=45182">wxXml2</a>
+  <li>Francesco Montorsi developped <a
+    href="https://sourceforge.net/project/showfiles.php?group_id=51305&amp;package_id=45182">wxXml2</a>
     wrappers that interface libxml2, allowing wxWidgets applications to
     load/save/edit XML instances.</li>
 </ul>
@@ -2474,10 +2531,11 @@
 interface have not yet reached the completeness of the C API.</p>
 
 <p>Note that some of the Python purist dislike the default set of Python
-bindings, rather than complaining I suggest they have a look at 
-<a href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2 and libxslt</a> and 
-<a href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn Faassen</a>
-complete those.</p>
+bindings, rather than complaining I suggest they have a look at <a
+href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2
+and libxslt</a> and <a
+href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn
+Faassen</a> complete those.</p>
 
 <p><a href="mailto:stephane.bidoul at softwareag.com">Stéphane Bidoul</a>
 maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port
@@ -3251,12 +3309,13 @@
 is I18N) , Unicode, characters and glyphs, I suggest you read a <a
 href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a>
 by Tim Bray on Unicode and why you should care about it.</p>
+
 <p>If you don't understand why <b>it does not make sense to have a string
-without knowing what encoding it uses</b>, then as Joel Spolsky said
-<a href="http://www.joelonsoftware.com/articles/Unicode.html">please do
-not write another line of code until you finish reading that article.</a>.
-It is a prerequisite to understand this page, and avoid a lot of problems
-with libxml2, XML or text processing in general.</p>
+without knowing what encoding it uses</b>, then as Joel Spolsky said <a
+href="http://www.joelonsoftware.com/articles/Unicode.html">please do not
+write another line of code until you finish reading that article.</a>. It is
+a prerequisite to understand this page, and avoid a lot of problems with
+libxml2, XML or text processing in general.</p>
 
 <p>Table of Content:</p>
 <ol>
@@ -3452,7 +3511,7 @@
 &lt;très&gt;là&lt;/très&gt;
 ~/XML -&gt; ./xmllint --encode UTF-8 isolat1 
 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;très&gt;là  &lt;/très&gt;
+&lt;très&gt;là &nbsp;&lt;/très&gt;
 ~/XML -&gt; </pre>
 
 <p>The same processing is applied (and reuse most of the code) for HTML I18N
@@ -3482,6 +3541,14 @@
 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the
 various Japanese ones.</p>
 
+<p>To convert from the UTF-8 values returned from the API to another encoding
+then it is possible to use the function provided from <a
+href="html/libxml-encoding.html">the encoding module</a> like <a
+href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the
+POSIX <a
+href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a>
+API directly.</p>
+
 <h4>Encoding aliases</h4>
 
 <p>From 2.2.3, libxml2 has support to register encoding names aliases. The
@@ -3666,19 +3733,19 @@
     the file:
     <pre>xmlOutputBufferPtr
 xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
-    xmlOutputBufferPtr ret;
-    
-    if (xmlOutputCallbackInitialized == 0)
-        xmlRegisterDefaultOutputCallbacks();
+&nbsp;&nbsp;&nbsp;&nbsp;xmlOutputBufferPtr ret;
+&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;if (xmlOutputCallbackInitialized == 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlRegisterDefaultOutputCallbacks();
 
-    if (file == NULL) return(NULL);
-    ret = xmlAllocOutputBuffer(encoder);
-    if (ret != NULL) {
-        ret-&gt;context = file;
-        ret-&gt;writecallback = xmlFileWrite;
-        ret-&gt;closecallback = NULL;  /* No close callback */
-    }
-    return(ret);
+&nbsp;&nbsp;&nbsp;&nbsp;if (file == NULL) return(NULL);
+&nbsp;&nbsp;&nbsp;&nbsp;ret = xmlAllocOutputBuffer(encoder);
+&nbsp;&nbsp;&nbsp;&nbsp;if (ret != NULL) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;context = file;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;writecallback = xmlFileWrite;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;closecallback = NULL;  /* No close callback */
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;return(ret);
 } </pre>
   </li>
   <li>And then use it to save the document:
@@ -4844,10 +4911,9 @@
     <a href="http://www.w3.org/Signature/">XML Canonicalization and XML
     Digital Signature</a> <a
     href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li>
-  <li><a href="mailto:Steve.Ball at explain.com.au">Steve Ball</a>
-    and contributors maintain <a
-    href="http://tclxml.sourceforge.net/">tcl bindings for libxml2 and
-    libxslt</a>, as well as <a
+  <li><a href="mailto:Steve.Ball at explain.com.au">Steve Ball</a> and
+    contributors maintain <a href="http://tclxml.sourceforge.net/">tcl
+    bindings for libxml2 and libxslt</a>, as well as <a
     href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for
     xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a>
     a GUI for xsltproc.</li>

Modified: packages/libxml2/branches/upstream/current/doc/xmldtd.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/xmldtd.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/xmldtd.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -7,7 +7,7 @@
 H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
-</style><title>Validation &amp; DTDs</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Validation &amp; DTDs</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="#General5">General overview</a></li>
+</style><title>Validation &amp; DTDs</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Validation &amp; DTDs</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="#General5">General overview</a></li>
   <li><a href="#definition">The definition</a></li>
   <li><a href="#Simple">Simple rules</a>
     <ol><li><a href="#reference">How to reference a DTD from a document</a></li>

Modified: packages/libxml2/branches/upstream/current/doc/xmlreader.html
===================================================================
--- packages/libxml2/branches/upstream/current/doc/xmlreader.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/doc/xmlreader.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -466,9 +466,9 @@
 not useful anymore, and the Next() operation allows to skip it completely and
 process to the successor or return 0 if the document end is reached.</p>
 
-<p><a href="mailto:veillard at redhat.com">Daniel Veillard</a></p>
+<p><a href="mailto:xml at gnome.org">Daniel Veillard</a></p>
 
-<p>$Id: xmlreader.html,v 1.8 2003/11/05 04:15:16 jfleck Exp $</p>
+<p>$Id: xmlreader.html,v 1.9 2005/10/18 19:11:54 veillard Exp $</p>
 
 <p></p>
 </body>

Modified: packages/libxml2/branches/upstream/current/elfgcchack.h
===================================================================
--- packages/libxml2/branches/upstream/current/elfgcchack.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/elfgcchack.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -301,6 +301,18 @@
 #endif
 #endif
 
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlDocDumpMemoryFormat
+extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat __attribute((alias("htmlDocDumpMemoryFormat__internal_alias")));
+#else
+#ifndef htmlDocDumpMemoryFormat
+extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat__internal_alias __attribute((visibility("hidden")));
+#define htmlDocDumpMemoryFormat htmlDocDumpMemoryFormat__internal_alias
+#endif
+#endif
+#endif
+
 #if defined(LIBXML_HTML_ENABLED)
 #ifdef bottom_HTMLparser
 #undef htmlElementAllowedHere
@@ -6573,6 +6585,18 @@
 
 #if defined(LIBXML_OUTPUT_ENABLED)
 #ifdef bottom_xmlIO
+#undef xmlOutputBufferCreateBuffer
+extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer __attribute((alias("xmlOutputBufferCreateBuffer__internal_alias")));
+#else
+#ifndef xmlOutputBufferCreateBuffer
+extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferCreateBuffer xmlOutputBufferCreateBuffer__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
 #undef xmlOutputBufferCreateFd
 extern __typeof (xmlOutputBufferCreateFd) xmlOutputBufferCreateFd __attribute((alias("xmlOutputBufferCreateFd__internal_alias")));
 #else
@@ -9155,6 +9179,18 @@
 
 #if defined(LIBXML_OUTPUT_ENABLED)
 #ifdef bottom_xmlsave
+#undef xmlSaveToBuffer
+extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer __attribute((alias("xmlSaveToBuffer__internal_alias")));
+#else
+#ifndef xmlSaveToBuffer
+extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveToBuffer xmlSaveToBuffer__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
 #undef xmlSaveToFd
 extern __typeof (xmlSaveToFd) xmlSaveToFd __attribute((alias("xmlSaveToFd__internal_alias")));
 #else
@@ -9681,6 +9717,18 @@
 
 #if defined(LIBXML_SCHEMAS_ENABLED)
 #ifdef bottom_xmlschemas
+#undef xmlSchemaSetParserStructuredErrors
+extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors __attribute((alias("xmlSchemaSetParserStructuredErrors__internal_alias")));
+#else
+#ifndef xmlSchemaSetParserStructuredErrors
+extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSetParserStructuredErrors xmlSchemaSetParserStructuredErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
 #undef xmlSchemaSetValidErrors
 extern __typeof (xmlSchemaSetValidErrors) xmlSchemaSetValidErrors __attribute((alias("xmlSchemaSetValidErrors__internal_alias")));
 #else
@@ -11423,7 +11471,7 @@
 #endif
 #endif
 
-#if defined(LIBXML_READER_ENABLED)
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
 #ifdef bottom_xmlreader
 #undef xmlTextReaderReadInnerXml
 extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml __attribute((alias("xmlTextReaderReadInnerXml__internal_alias")));
@@ -11435,7 +11483,7 @@
 #endif
 #endif
 
-#if defined(LIBXML_READER_ENABLED)
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
 #ifdef bottom_xmlreader
 #undef xmlTextReaderReadOuterXml
 extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml __attribute((alias("xmlTextReaderReadOuterXml__internal_alias")));
@@ -11507,6 +11555,18 @@
 #endif
 #endif
 
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSchemaValidateCtxt
+extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt __attribute((alias("xmlTextReaderSchemaValidateCtxt__internal_alias")));
+#else
+#ifndef xmlTextReaderSchemaValidateCtxt
+extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSchemaValidateCtxt xmlTextReaderSchemaValidateCtxt__internal_alias
+#endif
+#endif
+#endif
+
 #if defined(LIBXML_READER_ENABLED)
 #ifdef bottom_xmlreader
 #undef xmlTextReaderSetErrorHandler

Modified: packages/libxml2/branches/upstream/current/error.c
===================================================================
--- packages/libxml2/branches/upstream/current/error.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/error.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -21,7 +21,7 @@
 				 ...);
 
 #define XML_GET_VAR_STR(msg, str) {				\
-    int       size;						\
+    int       size, prev_size = -1;				\
     int       chars;						\
     char      *larger;						\
     va_list   ap;						\
@@ -35,8 +35,13 @@
 	va_start(ap, msg);					\
   	chars = vsnprintf(str, size, msg, ap);			\
 	va_end(ap);						\
-	if ((chars > -1) && (chars < size))			\
-	    break;						\
+	if ((chars > -1) && (chars < size)) {			\
+	    if (prev_size == chars) {				\
+		break;						\
+	    } else {						\
+		prev_size = chars;				\
+	    }							\
+	}							\
 	if (chars > -1)						\
 	    size += chars + 1;					\
 	else							\
@@ -293,8 +298,6 @@
     if (name != NULL) {
         channel(data, "element %s: ", name);
     }
-    if (code == XML_ERR_OK)
-        return;
     switch (domain) {
         case XML_FROM_PARSER:
             channel(data, "parser ");
@@ -360,8 +363,6 @@
         default:
             break;
     }
-    if (code == XML_ERR_OK)
-        return;
     switch (level) {
         case XML_ERR_NONE:
             channel(data, ": ");
@@ -376,8 +377,6 @@
             channel(data, "error : ");
             break;
     }
-    if (code == XML_ERR_OK)
-        return;
     if (str != NULL) {
         int len;
 	len = xmlStrlen((const xmlChar *)str);
@@ -388,8 +387,6 @@
     } else {
         channel(data, "%s\n", "out of memory error");
     }
-    if (code == XML_ERR_OK)
-        return;
 
     if (ctxt != NULL) {
         xmlParserPrintFileContextInternal(input, channel, data);

Modified: packages/libxml2/branches/upstream/current/gentest.py
===================================================================
--- packages/libxml2/branches/upstream/current/gentest.py	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/gentest.py	2006-01-06 18:12:46 UTC (rev 501)
@@ -46,6 +46,7 @@
     "DOCBparser" : "LIBXML_DOCB_ENABLED",
     "xmlmodule" : "LIBXML_MODULES_ENABLED",
     "pattern" : "LIBXML_PATTERN_ENABLED",
+    "schematron" : "LIBXML_SCHEMATRON_ENABLED",
 }
 
 #

Modified: packages/libxml2/branches/upstream/current/include/libxml/HTMLtree.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/HTMLtree.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/HTMLtree.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -75,6 +75,11 @@
 		htmlDocDumpMemory	(xmlDocPtr cur,
 					 xmlChar **mem,
 					 int *size);
+XMLPUBFUN void XMLCALL	    
+		htmlDocDumpMemoryFormat	(xmlDocPtr cur,
+					 xmlChar **mem,
+					 int *size,
+					 int format);
 XMLPUBFUN int XMLCALL		
 		htmlDocDump		(FILE *f,
 					 xmlDocPtr cur);

Modified: packages/libxml2/branches/upstream/current/include/libxml/pattern.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/pattern.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/pattern.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -75,6 +75,11 @@
 XMLPUBFUN void XMLCALL
 			xmlFreeStreamCtxt	(xmlStreamCtxtPtr stream);
 XMLPUBFUN int XMLCALL
+			xmlStreamPushNode	(xmlStreamCtxtPtr stream,
+						 const xmlChar *name,
+						 const xmlChar *ns,
+						 int nodeType);
+XMLPUBFUN int XMLCALL
 			xmlStreamPush		(xmlStreamCtxtPtr stream,
 						 const xmlChar *name,
 						 const xmlChar *ns);
@@ -84,6 +89,8 @@
 						 const xmlChar *ns);
 XMLPUBFUN int XMLCALL
 			xmlStreamPop		(xmlStreamCtxtPtr stream);
+XMLPUBFUN int XMLCALL
+			xmlStreamWantsAnyNode	(xmlStreamCtxtPtr stream);
 #ifdef __cplusplus
 }
 #endif

Modified: packages/libxml2/branches/upstream/current/include/libxml/schemasInternals.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/schemasInternals.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/schemasInternals.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -2,6 +2,8 @@
  * Summary: internal interfaces for XML Schemas
  * Description: internal interfaces for the XML Schemas handling
  *              and schema validity checking
+ *		The Schemas development is a Work In Progress.
+ *              Some of those interfaces are not garanteed to be API or ABI stable !
  *
  * Copy: See Copyright for the status of this software.
  *
@@ -103,6 +105,7 @@
     XML_SCHEMA_TYPE_IDC_KEY,
     XML_SCHEMA_TYPE_IDC_KEYREF,
     XML_SCHEMA_TYPE_PARTICLE = 25, 
+    XML_SCHEMA_TYPE_ATTRIBUTE_USE, 
     XML_SCHEMA_FACET_MININCLUSIVE = 1000,
     XML_SCHEMA_FACET_MINEXCLUSIVE,
     XML_SCHEMA_FACET_MAXINCLUSIVE,
@@ -115,7 +118,8 @@
     XML_SCHEMA_FACET_LENGTH,
     XML_SCHEMA_FACET_MAXLENGTH,
     XML_SCHEMA_FACET_MINLENGTH,
-    XML_SCHEMA_EXTRA_QNAMEREF = 2000
+    XML_SCHEMA_EXTRA_QNAMEREF = 2000,
+    XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
 } xmlSchemaTypeType;
 
 typedef enum {
@@ -124,7 +128,7 @@
     XML_SCHEMA_CONTENT_ELEMENTS,
     XML_SCHEMA_CONTENT_MIXED,
     XML_SCHEMA_CONTENT_SIMPLE,
-    XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* obsolete, not used */
+    XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
     XML_SCHEMA_CONTENT_BASIC,
     XML_SCHEMA_CONTENT_ANY
 } xmlSchemaContentType;
@@ -242,31 +246,32 @@
 typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
 typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
 struct _xmlSchemaAttribute {
-    xmlSchemaTypeType type;        /* The kind of type */
-    struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
-    const xmlChar *name; /* name of the declaration or empty if particle */
-    const xmlChar *id;
-    const xmlChar *ref; /* the local name of the attribute decl. if a particle */
-    const xmlChar *refNs; /* the ns URI of the attribute decl. if a particle */
+    xmlSchemaTypeType type;
+    struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
+    const xmlChar *name; /* the name of the declaration */
+    const xmlChar *id; /* Deprecated; not used */
+    const xmlChar *ref; /* Deprecated; not used */
+    const xmlChar *refNs; /* Deprecated; not used */
     const xmlChar *typeName; /* the local name of the type definition */
     const xmlChar *typeNs; /* the ns URI of the type definition */
     xmlSchemaAnnotPtr annot;
 
-    xmlSchemaTypePtr base; /* obsolete, not used */
-    int occurs;
-    const xmlChar *defValue;
+    xmlSchemaTypePtr base; /* Deprecated; not used */
+    int occurs; /* Deprecated; not used */
+    const xmlChar *defValue; /* The initial value of the value constraint */
     xmlSchemaTypePtr subtypes; /* the type definition */
     xmlNodePtr node;
     const xmlChar *targetNamespace;
     int flags;
-    const xmlChar *refPrefix;
-    xmlSchemaValPtr defVal;
-    xmlSchemaAttributePtr refDecl;
+    const xmlChar *refPrefix; /* Deprecated; not used */
+    xmlSchemaValPtr defVal; /* The compiled value constraint */
+    xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
 };
 
 /**
  * xmlSchemaAttributeLink:
  * Used to build a list of attribute uses on complexType definitions.
+ * WARNING: Deprecated; not used.
  */
 typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
 typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
@@ -301,11 +306,11 @@
 typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
 struct _xmlSchemaWildcard {
     xmlSchemaTypeType type;        /* The kind of type */
-    const xmlChar *id;
+    const xmlChar *id; /* Deprecated; not used */
     xmlSchemaAnnotPtr annot;
     xmlNodePtr node;
-    int minOccurs;
-    int maxOccurs;
+    int minOccurs; /* Deprecated; not used */
+    int maxOccurs; /* Deprecated; not used */
     int processContents;
     int any; /* Indicates if the ns constraint is of ##any */
     xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
@@ -333,6 +338,19 @@
 #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
 
 /**
+ * XML_SCHEMAS_ATTRGROUP_REDEFINED:
+ *
+ * The attr group was redefined.
+ */
+#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
+/**
+ * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
+ *
+ * Whether this attr. group contains attr. group references.
+ */
+#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
+
+/**
  * An attribute group definition.
  *
  * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
@@ -345,18 +363,18 @@
     struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
     const xmlChar *name;
     const xmlChar *id;
-    const xmlChar *ref;
-    const xmlChar *refNs;
+    const xmlChar *ref; /* Deprecated; not used */
+    const xmlChar *refNs; /* Deprecated; not used */
     xmlSchemaAnnotPtr annot;
 
-    xmlSchemaAttributePtr attributes;
+    xmlSchemaAttributePtr attributes; /* Deprecated; not used */
     xmlNodePtr node;
     int flags;
     xmlSchemaWildcardPtr attributeWildcard;
-    const xmlChar *refPrefix;
-    xmlSchemaAttributeGroupPtr refItem; /* The referenced attribute group */
+    const xmlChar *refPrefix; /* Deprecated; not used */
+    xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
     const xmlChar *targetNamespace;
-    /* xmlSchemaAttributeGroupPtr redef;*/  /* Redefinitions */
+    void *attrUses;
 };
 
 /**
@@ -368,7 +386,7 @@
 typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
 struct _xmlSchemaTypeLink {
     struct _xmlSchemaTypeLink *next;/* the next type link ... */
-    xmlSchemaTypePtr type;/* the linked type*/
+    xmlSchemaTypePtr type;/* the linked type */
 };
 
 /**
@@ -417,6 +435,9 @@
  * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
  *
  * the simpleType has a variety of "absent".
+ * TODO: Actually not necessary :-/, since if
+ * none of the variety flags occur then it's
+ * automatically absent.
  */
 #define XML_SCHEMAS_TYPE_VARIETY_ABSENT    1 << 5
 /**
@@ -561,41 +582,56 @@
 #define XML_SCHEMAS_TYPE_FIXUP_1    1 << 29
 
 /**
+ * XML_SCHEMAS_TYPE_REDEFINED:
+ *
+ * The type was redefined.
+ */
+#define XML_SCHEMAS_TYPE_REDEFINED    1 << 30
+/**
+ * XML_SCHEMAS_TYPE_REDEFINING:
+ *
+ * The type redefines an other type.
+ */
+/* #define XML_SCHEMAS_TYPE_REDEFINING    1 << 31 */
+
+/**
  * _xmlSchemaType:
  *
  * Schemas type definition.
  */
 struct _xmlSchemaType {
-    xmlSchemaTypeType type;        /* The kind of type */
-    struct _xmlSchemaType *next;/* the next type if in a sequence ... */
+    xmlSchemaTypeType type; /* The kind of type */
+    struct _xmlSchemaType *next; /* the next type if in a sequence ... */
     const xmlChar *name;
-    const xmlChar *id;
-    const xmlChar *ref;
-    const xmlChar *refNs;
+    const xmlChar *id ; /* Deprecated; not used */
+    const xmlChar *ref; /* Deprecated; not used */
+    const xmlChar *refNs; /* Deprecated; not used */
     xmlSchemaAnnotPtr annot;
     xmlSchemaTypePtr subtypes;
-    xmlSchemaAttributePtr attributes;
+    xmlSchemaAttributePtr attributes; /* Deprecated; not used */
     xmlNodePtr node;
-    int minOccurs;
-    int maxOccurs;
+    int minOccurs; /* Deprecated; not used */
+    int maxOccurs; /* Deprecated; not used */
 
     int flags;
     xmlSchemaContentType contentType;
-    const xmlChar *base;
-    const xmlChar *baseNs;
-    xmlSchemaTypePtr baseType;
-    xmlSchemaFacetPtr facets;
-    struct _xmlSchemaType *redef;/* possible redefinitions for the type */
-    int recurse;
-    xmlSchemaAttributeLinkPtr attributeUses;
+    const xmlChar *base; /* Base type's local name */
+    const xmlChar *baseNs; /* Base type's target namespace */
+    xmlSchemaTypePtr baseType; /* The base type component */
+    xmlSchemaFacetPtr facets; /* Local facets */
+    struct _xmlSchemaType *redef; /* Deprecated; not used */
+    int recurse; /* Obsolete */
+    xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
     xmlSchemaWildcardPtr attributeWildcard;
-    int builtInType;
-    xmlSchemaTypeLinkPtr memberTypes;
-    xmlSchemaFacetLinkPtr facetSet;
-    const xmlChar *refPrefix;
-    xmlSchemaTypePtr contentTypeDef;
-    xmlRegexpPtr contModel;
+    int builtInType; /* Type of built-in types. */
+    xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
+    xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
+    const xmlChar *refPrefix; /* Deprecated; not used */
+    xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
+                                        Could we use @subtypes for this? */
+    xmlRegexpPtr contModel; /* Holds the automaton of the content model */
     const xmlChar *targetNamespace;
+    void *attrUses;
 };
 
 /*
@@ -727,18 +763,18 @@
 typedef struct _xmlSchemaElement xmlSchemaElement;
 typedef xmlSchemaElement *xmlSchemaElementPtr;
 struct _xmlSchemaElement {
-    xmlSchemaTypeType type;        /* The kind of type */
-    struct _xmlSchemaType *next;/* the next type if in a sequence ... */
+    xmlSchemaTypeType type; /* The kind of type */
+    struct _xmlSchemaType *next; /* Not used? */
     const xmlChar *name;
-    const xmlChar *id;
-    const xmlChar *ref; /* the local name of the element declaration if a particle */
-    const xmlChar *refNs; /* the ns URI of the element declaration if a particle */
+    const xmlChar *id; /* Deprecated; not used */
+    const xmlChar *ref; /* Deprecated; not used */
+    const xmlChar *refNs; /* Deprecated; not used */
     xmlSchemaAnnotPtr annot;
     xmlSchemaTypePtr subtypes; /* the type definition */
     xmlSchemaAttributePtr attributes;
     xmlNodePtr node;
-    int minOccurs;
-    int maxOccurs;
+    int minOccurs; /* Deprecated; not used */
+    int maxOccurs; /* Deprecated; not used */
 
     int flags;
     const xmlChar *targetNamespace;
@@ -747,13 +783,14 @@
     const xmlChar *substGroup;
     const xmlChar *substGroupNs;
     const xmlChar *scope;
-    const xmlChar *value;
-    struct _xmlSchemaElement *refDecl; /* This will now be used for the substitution group affiliation */
-    xmlRegexpPtr contModel;
+    const xmlChar *value; /* The original value of the value constraint. */
+    struct _xmlSchemaElement *refDecl; /* This will now be used for the
+                                          substitution group affiliation */
+    xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
     xmlSchemaContentType contentType;
-    const xmlChar *refPrefix;
-    xmlSchemaValPtr defVal;
-    void *idcs;
+    const xmlChar *refPrefix; /* Deprecated; not used */
+    xmlSchemaValPtr defVal; /* The compiled value contraint. */
+    void *idcs; /* The identity-constraint defs */
 };
 
 /*
@@ -786,14 +823,14 @@
 struct _xmlSchemaFacet {
     xmlSchemaTypeType type;        /* The kind of type */
     struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
-    const xmlChar *value;
-    const xmlChar *id;
+    const xmlChar *value; /* The original value */
+    const xmlChar *id; /* Obsolete */
     xmlSchemaAnnotPtr annot;
     xmlNodePtr node;
-    int fixed;
+    int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
     int whitespace;
-    xmlSchemaValPtr val;
-    xmlRegexpPtr    regexp;
+    xmlSchemaValPtr val; /* The compiled value */
+    xmlRegexpPtr    regexp; /* The regex for patterns */
 };
 
 /**
@@ -802,7 +839,7 @@
 typedef struct _xmlSchemaNotation xmlSchemaNotation;
 typedef xmlSchemaNotation *xmlSchemaNotationPtr;
 struct _xmlSchemaNotation {
-    xmlSchemaTypeType type;        /* The kind of type */
+    xmlSchemaTypeType type; /* The kind of type */
     const xmlChar *name;
     xmlSchemaAnnotPtr annot;
     const xmlChar *identifier;
@@ -810,7 +847,7 @@
 };
 
 /*
-* Actually all those flags used for the schema should sit
+* TODO: Actually all those flags used for the schema should sit
 * on the schema parser context, since they are used only
 * during parsing an XML schema document, and not available
 * on the component level as per spec.
@@ -884,10 +921,10 @@
  * A Schemas definition
  */
 struct _xmlSchema {
-    const xmlChar *name;        /* schema name */
-    const xmlChar *targetNamespace;     /* the target namespace */
+    const xmlChar *name; /* schema name */
+    const xmlChar *targetNamespace; /* the target namespace */
     const xmlChar *version;
-    const xmlChar *id;
+    const xmlChar *id; /* Obsolete */
     xmlDocPtr doc;
     xmlSchemaAnnotPtr annot;
     int flags;
@@ -906,8 +943,8 @@
     void *includes;     /* the includes, this is opaque for now */
     int preserve;        /* whether to free the document */
     int counter; /* used to give ononymous components unique names */
-    xmlHashTablePtr idcDef;
-    void *volatiles; /* Deprecated; not used anymore. */
+    xmlHashTablePtr idcDef; /* All identity-constraint defs. */
+    void *volatiles; /* Obsolete */
 };
 
 XMLPUBFUN void XMLCALL         xmlSchemaFreeType        (xmlSchemaTypePtr type);

Modified: packages/libxml2/branches/upstream/current/include/libxml/valid.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/valid.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/valid.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -410,7 +410,7 @@
 
 XMLPUBFUN int XMLCALL		
 		xmlValidGetPotentialChildren(xmlElementContent *ctree,
-					 const xmlChar **list,
+					 const xmlChar **names,
 					 int *len,
 					 int max);
 

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlIO.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlIO.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlIO.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -232,6 +232,10 @@
 					 xmlCharEncodingHandlerPtr encoder);
 
 XMLPUBFUN xmlOutputBufferPtr XMLCALL
+	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer,
+					 xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
 	xmlOutputBufferCreateFd		(int fd,
 					 xmlCharEncodingHandlerPtr encoder);
 

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlerror.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlerror.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlerror.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -767,6 +767,11 @@
     XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
     XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
     XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
+    XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
+    XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
+    XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
+    XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
+    XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
     XML_MODULE_OPEN = 4900, /* 4900 */
     XML_MODULE_CLOSE, /* 4901 */
     XML_CHECK_FOUND_ELEMENT = 5000,

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlreader.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlreader.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlreader.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -121,10 +121,15 @@
  */
 XMLPUBFUN int XMLCALL		
 			xmlTextReaderRead	(xmlTextReaderPtr reader);
+
+#ifdef LIBXML_WRITER_ENABLED
 XMLPUBFUN xmlChar * XMLCALL	
 			xmlTextReaderReadInnerXml	(xmlTextReaderPtr reader);
+			
 XMLPUBFUN xmlChar * XMLCALL	
 			xmlTextReaderReadOuterXml	(xmlTextReaderPtr reader);
+#endif
+
 XMLPUBFUN xmlChar * XMLCALL	
 			xmlTextReaderReadString		(xmlTextReaderPtr reader);
 XMLPUBFUN int XMLCALL		
@@ -279,6 +284,10 @@
 XMLPUBFUN int XMLCALL
 		    xmlTextReaderSchemaValidate	(xmlTextReaderPtr reader,
 		    				 const char *xsd);
+XMLPUBFUN int XMLCALL
+		    xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
+						 xmlSchemaValidCtxtPtr ctxt,
+						 int options);
 XMLPUBFUN int XMLCALL		
 		    xmlTextReaderSetSchema	(xmlTextReaderPtr reader,
 		    				 xmlSchemaPtr schema);

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlregexp.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlregexp.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlregexp.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -183,12 +183,12 @@
 XMLPUBFUN int XMLCALL
 			xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
 					 xmlExpNodePtr expr,
-					 const xmlChar**list,
+					 const xmlChar**langList,
 					 int len);
 XMLPUBFUN int XMLCALL
 			xmlExpGetStart	(xmlExpCtxtPtr ctxt,
 					 xmlExpNodePtr expr,
-					 const xmlChar**list,
+					 const xmlChar**tokList,
 					 int len);
 XMLPUBFUN xmlExpNodePtr XMLCALL
 			xmlExpStringDerive(xmlExpCtxtPtr ctxt,

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlsave.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlsave.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlsave.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -45,14 +45,12 @@
 		xmlSaveToFilename	(const char *filename,
 					 const char *encoding,
 					 int options);
-/******
-  Not yet implemented.
 
 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
 		xmlSaveToBuffer		(xmlBufferPtr buffer,
 					 const char *encoding,
 					 int options);
- ******/
+
 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
 		xmlSaveToIO		(xmlOutputWriteCallback iowrite,
 					 xmlOutputCloseCallback ioclose,

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlschemas.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlschemas.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlschemas.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -113,6 +113,10 @@
 					 xmlSchemaValidityErrorFunc err,
 					 xmlSchemaValidityWarningFunc warn,
 					 void *ctx);
+XMLPUBFUN void XMLCALL
+	    xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
+					 xmlStructuredErrorFunc serror,
+					 void *ctx);
 XMLPUBFUN int XMLCALL
 		xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
 					xmlSchemaValidityErrorFunc * err,
@@ -140,7 +144,8 @@
 					 void *ctx);
 XMLPUBFUN void XMLCALL
 	    xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
-								  xmlStructuredErrorFunc serror, void *ctx);
+					 xmlStructuredErrorFunc serror,
+					 void *ctx);
 XMLPUBFUN int XMLCALL
 	    xmlSchemaGetValidErrors	(xmlSchemaValidCtxtPtr ctxt,
 					 xmlSchemaValidityErrorFunc *err,

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -29,28 +29,28 @@
  *
  * the version string like "1.2.3"
  */
-#define LIBXML_DOTTED_VERSION "2.6.22"
+#define LIBXML_DOTTED_VERSION "2.6.23"
 
 /**
  * LIBXML_VERSION:
  *
  * the version number: 1.2.3 value is 1002003
  */
-#define LIBXML_VERSION 20622
+#define LIBXML_VERSION 20623
 
 /**
  * LIBXML_VERSION_STRING:
  *
  * the version number string, 1.2.3 value is "1002003"
  */
-#define LIBXML_VERSION_STRING "20622"
+#define LIBXML_VERSION_STRING "20623"
 
 /**
  * LIBXML_VERSION_EXTRA:
  *
  * extra version information, used to show a CVS compilation
  */
-#define LIBXML_VERSION_EXTRA "-CVS2634"
+#define LIBXML_VERSION_EXTRA "-CVS2717"
 
 /**
  * LIBXML_TEST_VERSION:
@@ -58,7 +58,7 @@
  * Macro to check that the libxml version in use is compatible with
  * the version the software has been compiled against
  */
-#define LIBXML_TEST_VERSION xmlCheckVersion(20622);
+#define LIBXML_TEST_VERSION xmlCheckVersion(20623);
 
 #ifndef VMS
 #if 0

Modified: packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h.in
===================================================================
--- packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h.in	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/libxml/xmlversion.h.in	2006-01-06 18:12:46 UTC (rev 501)
@@ -299,7 +299,7 @@
  *
  * Whether the runtime debugging is configured in
  */
-#if @WITH_MEM_DEBUG@
+#if @WITH_RUN_DEBUG@
 #define LIBXML_DEBUG_RUNTIME
 #endif
 

Modified: packages/libxml2/branches/upstream/current/include/win32config.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/win32config.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/win32config.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -84,10 +84,12 @@
 #endif
 #endif /* _MSC_VER */
 
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#if defined(_MSC_VER)
 #define mkdir(p,m) _mkdir(p)
 #define snprintf _snprintf
 #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+#elif defined(__MINGW32__)
+#define mkdir(p,m) _mkdir(p)
 #endif
 
 /* Threading API to use should be specified here for compatibility reasons.

Modified: packages/libxml2/branches/upstream/current/include/wsockcompat.h
===================================================================
--- packages/libxml2/branches/upstream/current/include/wsockcompat.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/include/wsockcompat.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -10,8 +10,20 @@
 #else
 #undef HAVE_ERRNO_H
 #include <winsock2.h>
+#include <ws2tcpip.h>
+/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
+#if defined(GetAddrInfo)
+#define HAVE_GETADDRINFO
 #endif
+#endif
 
+#ifdef __MINGW32__
+/* Include <errno.h> here to ensure that it doesn't get included later
+ * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
+#include <errno.h>
+#undef EWOULDBLOCK
+#endif
+
 #if !defined SOCKLEN_T
 #define SOCKLEN_T int
 #endif

Modified: packages/libxml2/branches/upstream/current/legacy.c
===================================================================
--- packages/libxml2/branches/upstream/current/legacy.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/legacy.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -673,7 +673,6 @@
  *
  * Creation of a Namespace, the old way using PI and without scoping
  *   DEPRECATED !!!
- * It now create a namespace on the root element of the document if found.
  * Returns NULL this functionality had been removed
  */
 xmlNsPtr

Modified: packages/libxml2/branches/upstream/current/libxml.3
===================================================================
--- packages/libxml2/branches/upstream/current/libxml.3	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/libxml.3	2006-01-06 18:12:46 UTC (rev 501)
@@ -53,7 +53,7 @@
 static library
 .TP
 .B /depot/lib/libxml_2.0.0/libxml.so
-shareable library
+shared library
 .TP
 .B /depot/package/libxml_2.0.0/bin/xmllint
 binary application for parsing XML files

Modified: packages/libxml2/branches/upstream/current/libxml.spec.in
===================================================================
--- packages/libxml2/branches/upstream/current/libxml.spec.in	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/libxml.spec.in	2006-01-06 18:12:46 UTC (rev 501)
@@ -60,36 +60,6 @@
 %setup -q
 
 %build
-#
-# try to use compiler profiling, based on Arjan van de Ven <arjanv at redhat.com>
-# initial test spec. This really doesn't work okay for most tests done.
-#
-# Well except it's just broken most of the time.
-#GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'`
-#if [ $GCC_VERSION -ge 34 ]
-#then
-#    PROF_GEN='-fprofile-generate'
-#    PROF_USE='-fprofile-use'
-#fi
-#
-#if [ "$PROF_GEN" != "" ]
-#then
-#    # First generate a profiling version
-#    CFLAGS="${RPM_OPT_FLAGS} ${PROF_GEN}"  %configure
-#    make
-#    # Run a few sampling
-#    make dba100000.xml
-#    ./xmllint --noout  dba100000.xml
-#    ./xmllint --stream  dba100000.xml
-#    ./xmllint --noout --valid test/valid/REC-xml-19980210.xml
-#    ./xmllint --stream --valid test/valid/REC-xml-19980210.xml
-#    # Then generate code based on profile
-#    CFLAGS="${RPM_OPT_FLAGS} ${PROF_USE}"  %configure
-#    make
-#else
-#    %configure
-#    make
-#fi
 %configure
 make
 gzip -9 ChangeLog

Modified: packages/libxml2/branches/upstream/current/libxml2.spec
===================================================================
--- packages/libxml2/branches/upstream/current/libxml2.spec	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/libxml2.spec	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,6 +1,6 @@
 Summary: Library providing XML and HTML support
 Name: libxml2
-Version: 2.6.22
+Version: 2.6.23
 Release: 1
 License: MIT
 Group: Development/Libraries
@@ -60,36 +60,6 @@
 %setup -q
 
 %build
-#
-# try to use compiler profiling, based on Arjan van de Ven <arjanv at redhat.com>
-# initial test spec. This really doesn't work okay for most tests done.
-#
-# Well except it's just broken most of the time.
-#GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'`
-#if [ $GCC_VERSION -ge 34 ]
-#then
-#    PROF_GEN='-fprofile-generate'
-#    PROF_USE='-fprofile-use'
-#fi
-#
-#if [ "$PROF_GEN" != "" ]
-#then
-#    # First generate a profiling version
-#    CFLAGS="${RPM_OPT_FLAGS} ${PROF_GEN}"  %configure
-#    make
-#    # Run a few sampling
-#    make dba100000.xml
-#    ./xmllint --noout  dba100000.xml
-#    ./xmllint --stream  dba100000.xml
-#    ./xmllint --noout --valid test/valid/REC-xml-19980210.xml
-#    ./xmllint --stream --valid test/valid/REC-xml-19980210.xml
-#    # Then generate code based on profile
-#    CFLAGS="${RPM_OPT_FLAGS} ${PROF_USE}"  %configure
-#    make
-#else
-#    %configure
-#    make
-#fi
 %configure
 make
 gzip -9 ChangeLog
@@ -157,8 +127,8 @@
 %doc doc/python.html
 
 %changelog
-* Mon Sep 12 2005 Daniel Veillard <veillard at redhat.com>
-- upstream release 2.6.22 see http://xmlsoft.org/news.html
+* Thu Jan  5 2006 Daniel Veillard <veillard at redhat.com>
+- upstream release 2.6.23 see http://xmlsoft.org/news.html
 
 * Thu Jan  2 2003 Daniel Veillard <veillard at redhat.com>
 - integrated drv_libxml2 xml.sax driver from Stéphane Bidoul

Modified: packages/libxml2/branches/upstream/current/macos/src/config-mac.h
===================================================================
--- packages/libxml2/branches/upstream/current/macos/src/config-mac.h	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/macos/src/config-mac.h	2006-01-06 18:12:46 UTC (rev 501)
@@ -177,15 +177,6 @@
 /* Define if you have the <zlib.h> header file.  */
 #undef HAVE_ZLIB_H
 
-/* Define if you have the inet library (-linet).  */
-#undef HAVE_LIBINET
-
-/* Define if you have the nsl library (-lnsl).  */
-#undef HAVE_LIBNSL
-
-/* Define if you have the socket library (-lsocket).  */
-#undef HAVE_LIBSOCKET
-
 /* Name of package */
 #define PACKAGE
 

Modified: packages/libxml2/branches/upstream/current/nanohttp.c
===================================================================
--- packages/libxml2/branches/upstream/current/nanohttp.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/nanohttp.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -11,9 +11,6 @@
  * daniel at veillard.com
  */
  
-/* TODO add compression support, Send the Accept- , and decompress on the
-        fly with ZLIB if found at compile-time */
-
 #define NEED_SOCKETS
 #define IN_LIBXML
 #include "libxml.h"
@@ -66,7 +63,11 @@
 #ifdef SUPPORT_IP6
 #include <resolv.h>
 #endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
 
+
 #ifdef VMS
 #include <stropts>
 #define XML_SOCKLEN_T unsigned int
@@ -152,6 +153,10 @@
     char *authHeader;	/* contents of {WWW,Proxy}-Authenticate header */
     char *encoding;	/* encoding extracted from the contentType */
     char *mimeType;	/* Mime-Type extracted from the contentType */
+#ifdef HAVE_ZLIB_H
+    z_stream *strm;	/* Zlib stream object */
+    int usesGzip;	/* "Content-Encoding: gzip" was detected */
+#endif
 } xmlNanoHTTPCtxt, *xmlNanoHTTPCtxtPtr;
 
 static int initialized = 0;
@@ -413,6 +418,13 @@
     if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType);
     if (ctxt->location != NULL) xmlFree(ctxt->location);
     if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader);
+#ifdef HAVE_ZLIB_H
+    if (ctxt->strm != NULL) {
+	inflateEnd(ctxt->strm);
+	xmlFree(ctxt->strm);
+    }
+#endif
+
     ctxt->state = XML_NANO_HTTP_NONE;
     if (ctxt->fd >= 0) closesocket(ctxt->fd);
     ctxt->fd = -1;
@@ -752,6 +764,26 @@
 	if (ctxt->authHeader != NULL)
 	    xmlFree(ctxt->authHeader);
 	ctxt->authHeader = xmlMemStrdup(cur);
+#ifdef HAVE_ZLIB_H
+    } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Encoding:", 17) ) {
+	cur += 17;
+	while ((*cur == ' ') || (*cur == '\t')) cur++;
+	if ( !xmlStrncasecmp( BAD_CAST cur, BAD_CAST"gzip", 4) ) {
+	    ctxt->usesGzip = 1;
+
+	    ctxt->strm = xmlMalloc(sizeof(z_stream));
+
+	    if (ctxt->strm != NULL) {
+		ctxt->strm->zalloc = Z_NULL;
+		ctxt->strm->zfree = Z_NULL;
+		ctxt->strm->opaque = Z_NULL;
+		ctxt->strm->avail_in = 0;
+		ctxt->strm->next_in = Z_NULL;
+
+		inflateInit2( ctxt->strm, 31 );
+	    }
+	}
+#endif
     } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Length:", 15) ) {
 	cur += 15;
 	ctxt->ContentLength = strtol( cur, NULL, 10 );
@@ -946,14 +978,21 @@
     memset (&sockin, 0, sizeof(sockin));
 #ifdef SUPPORT_IP6
     memset (&sockin6, 0, sizeof(sockin6));
+#endif
+
+#if !defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && defined(RES_USE_INET6)
     if (have_ipv6 ())
-#if !defined(HAVE_GETADDRINFO) && defined(RES_USE_INET6)
     {
 	if (!(_res.options & RES_INIT))
 	    res_init();
 	_res.options |= RES_USE_INET6;
     }
-#elif defined(HAVE_GETADDRINFO)
+#endif
+
+#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
+    if (have_ipv6 ())
+#endif
+#if defined(HAVE_GETADDRINFO) && (defined(SUPPORT_IP6) || defined(_WIN32))
     {
 	int status;
 	struct addrinfo hints, *res, *result;
@@ -969,42 +1008,45 @@
 	}
 
 	for (res = result; res; res = res->ai_next) {
-	    if (res->ai_family == AF_INET || res->ai_family == AF_INET6) {
-		if (res->ai_family == AF_INET6) {
-		    if (res->ai_addrlen > sizeof(sockin6)) {
-			__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
-			freeaddrinfo (result);
-			return (-1);
-		    }
-		    memcpy (&sockin6, res->ai_addr, res->ai_addrlen);
-		    sockin6.sin6_port = htons (port);
-		    addr = (struct sockaddr *)&sockin6;
+	    if (res->ai_family == AF_INET) {
+		if (res->ai_addrlen > sizeof(sockin)) {
+		    __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
+		    freeaddrinfo (result);
+		    return (-1);
 		}
-		else {
-		    if (res->ai_addrlen > sizeof(sockin)) {
-			__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
-			freeaddrinfo (result);
-			return (-1);
-		    }
-		    memcpy (&sockin, res->ai_addr, res->ai_addrlen);
-		    sockin.sin_port = htons (port);
-		    addr = (struct sockaddr *)&sockin;
+		memcpy (&sockin, res->ai_addr, res->ai_addrlen);
+		sockin.sin_port = htons (port);
+		addr = (struct sockaddr *)&sockin;
+#ifdef SUPPORT_IP6
+	    } else if (have_ipv6 () && (res->ai_family == AF_INET6)) {
+		if (res->ai_addrlen > sizeof(sockin6)) {
+		    __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
+		    freeaddrinfo (result);
+		    return (-1);
 		}
+		memcpy (&sockin6, res->ai_addr, res->ai_addrlen);
+		sockin6.sin6_port = htons (port);
+		addr = (struct sockaddr *)&sockin6;
+#endif
+	    } else
+		continue;              /* for */
 
-		s = xmlNanoHTTPConnectAttempt (addr);
-		if (s != -1) {
-		    freeaddrinfo (result);
-		    return (s);
-		}
+	    s = xmlNanoHTTPConnectAttempt (addr);
+	    if (s != -1) {
+		freeaddrinfo (result);
+		return (s);
 	    }
 	}
+
 	if (result)
 	    freeaddrinfo (result);
-	return (-1);
-    } else
+    }
 #endif
+#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
+    else
 #endif
-    {   
+#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32)
+    {
 	h = gethostbyname (host);
 	if (h == NULL) {
 
@@ -1080,6 +1122,8 @@
 		return (s);
 	}
     }
+#endif
+
 #ifdef DEBUG_HTTP
     xmlGenericError(xmlGenericErrorContext,
                     "xmlNanoHTTPConnectHost:  unable to connect to '%s'.\n",
@@ -1144,11 +1188,38 @@
 int
 xmlNanoHTTPRead(void *ctx, void *dest, int len) {
     xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx;
+#ifdef HAVE_ZLIB_H
+    int bytes_read = 0;
+    int orig_avail_in;
+    int z_ret;
+#endif
 
     if (ctx == NULL) return(-1);
     if (dest == NULL) return(-1);
     if (len <= 0) return(0);
 
+#ifdef HAVE_ZLIB_H
+    if (ctxt->usesGzip == 1) {
+        if (ctxt->strm == NULL) return(0);
+ 
+        ctxt->strm->next_out = dest;
+        ctxt->strm->avail_out = len;
+
+        do {
+            orig_avail_in = ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr - bytes_read;
+            ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read);
+
+            z_ret = inflate(ctxt->strm, Z_NO_FLUSH);
+            bytes_read += orig_avail_in - ctxt->strm->avail_in;
+
+            if (z_ret != Z_OK) break;
+        } while (ctxt->strm->avail_out > 0 && xmlNanoHTTPRecv(ctxt) > 0);
+
+        ctxt->inrptr += bytes_read;
+        return(len - ctxt->strm->avail_out);
+    }
+#endif
+
     while (ctxt->inptr - ctxt->inrptr < len) {
         if (xmlNanoHTTPRecv(ctxt) <= 0) break;
     }
@@ -1263,6 +1334,9 @@
     if (ctxt->query != NULL)
 	blen += strlen(ctxt->query) + 1;
     blen += strlen(method) + strlen(ctxt->path) + 24;
+#ifdef HAVE_ZLIB_H
+    blen += 23;
+#endif
     bp = (char*)xmlMallocAtomic(blen);
     if ( bp == NULL ) {
         xmlNanoHTTPFreeCtxt( ctxt );
@@ -1291,6 +1365,10 @@
     p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n", 
 		    ctxt->hostname);
 
+#ifdef HAVE_ZLIB_H
+    p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n");
+#endif
+
     if (contentType != NULL && *contentType) 
 	p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType);
 

Modified: packages/libxml2/branches/upstream/current/parser.c
===================================================================
--- packages/libxml2/branches/upstream/current/parser.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/parser.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -2177,6 +2177,9 @@
 	    if (val != 0) {
 		COPY_BUF(0,buffer,nbchars,val);
 	    }
+	    if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) {
+	        growBuffer(buffer);
+	    }
 	} else if ((c == '&') && (what & XML_SUBSTITUTE_REF)) {
 	    if (xmlParserDebugEntities)
 		xmlGenericError(xmlGenericErrorContext,
@@ -2187,6 +2190,9 @@
 		(ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
 		if (ent->content != NULL) {
 		    COPY_BUF(0,buffer,nbchars,ent->content[0]);
+		    if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) {
+			growBuffer(buffer);
+		    }
 		} else {
 		    xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
 			    "predefined entity has no content\n");
@@ -3449,12 +3455,10 @@
 get_more_space:
 	    while (*in == 0x20) in++;
 	    if (*in == 0xA) {
-		ctxt->input->line++; ctxt->input->col = 1;
-		in++;
-		while (*in == 0xA) {
+		do {
 		    ctxt->input->line++; ctxt->input->col = 1;
 		    in++;
-		}
+		} while (*in == 0xA);
 		goto get_more_space;
 	    }
 	    if (*in == '<') {
@@ -3490,12 +3494,10 @@
 	    }
 	    ctxt->input->col = ccol;
 	    if (*in == 0xA) {
-		ctxt->input->line++; ctxt->input->col = 1;
-		in++;
-		while (*in == 0xA) {
+		do {
 		    ctxt->input->line++; ctxt->input->col = 1;
 		    in++;
-		}
+		} while (*in == 0xA);
 		goto get_more;
 	    }
 	    if (*in == ']') {
@@ -3537,12 +3539,16 @@
 	    ctxt->input->cur = in;
 	    if (*in == 0xD) {
 		in++;
+		if (!*in)	/* if end of current chunk return */
+		    return;
 		if (*in == 0xA) {
 		    ctxt->input->cur = in;
 		    in++;
 		    ctxt->input->line++; ctxt->input->col = 1;
 		    continue; /* while */
 		}
+		if (!*in)	/* if end of current chunk return */
+		    return;
 		in--;
 	    }
 	    if (*in == '<') {
@@ -3856,12 +3862,10 @@
     in = ctxt->input->cur;
     do {
 	if (*in == 0xA) {
-	    ctxt->input->line++; ctxt->input->col = 1;
-	    in++;
-	    while (*in == 0xA) {
+	    do {
 		ctxt->input->line++; ctxt->input->col = 1;
 		in++;
-	    }
+	    } while (*in == 0xA);
 	}
 get_more:
         ccol = ctxt->input->col;
@@ -3873,12 +3877,10 @@
 	}
 	ctxt->input->col = ccol;
 	if (*in == 0xA) {
-	    ctxt->input->line++; ctxt->input->col = 1;
-	    in++;
-	    while (*in == 0xA) {
+	    do {
 		ctxt->input->line++; ctxt->input->col = 1;
 		in++;
-	    }
+	    } while (*in == 0xA);
 	    goto get_more;
 	}
 	nbchar = in - ctxt->input->cur;
@@ -3929,6 +3931,8 @@
 		ctxt->input->line++; ctxt->input->col = 1;
 		continue; /* while */
 	    }
+	    if (!*in)	/* if end of current chunk return */
+		return;
 	    in--;
 	}
 	SHRINK;
@@ -8889,6 +8893,13 @@
     xmlChar *version;
 
     /*
+     * This value for standalone indicates that the document has an
+     * XML declaration but it does not have a standalone attribute.
+     * It will be overwritten later if a standalone attribute is found.
+     */
+    ctxt->input->standalone = -2;
+
+    /*
      * We know that '<?xml' is here.
      */
     SKIP(5);

Modified: packages/libxml2/branches/upstream/current/parserInternals.c
===================================================================
--- packages/libxml2/branches/upstream/current/parserInternals.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/parserInternals.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -1206,50 +1206,13 @@
 
         }
         return (0);
-    } else {
-        if ((input->length == 0) || (input->buf == NULL)) {
-            /*
-             * When parsing a static memory array one must know the
-             * size to be able to convert the buffer.
-             */
-            xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
-            return (-1);
-        } else {
-            int processed;
-
-            /*
-             * Shrink the current input buffer.
-             * Move it as the raw buffer and create a new input buffer
-             */
-            processed = input->cur - input->base;
-
-            input->buf->raw = xmlBufferCreate();
-            xmlBufferAdd(input->buf->raw, input->cur,
-                         input->length - processed);
-            input->buf->buffer = xmlBufferCreate();
-
-            /*
-             * convert as much as possible of the raw input
-             * to the parser reading buffer.
-             */
-            nbchars = xmlCharEncInFunc(input->buf->encoder,
-                                       input->buf->buffer,
-                                       input->buf->raw);
-            if (nbchars < 0) {
-                xmlErrInternal(ctxt,
-                               "switching encoding: encoder error\n",
-                               NULL);
-                return (-1);
-            }
-
-            /*
-             * Conversion succeeded, get rid of the old buffer
-             */
-            if ((input->free != NULL) && (input->base != NULL))
-                input->free((xmlChar *) input->base);
-            input->base = input->cur = input->buf->buffer->content;
-            input->end = &input->base[input->buf->buffer->use];
-        }
+    } else if (input->length == 0) {
+	/*
+	 * When parsing a static memory array one must know the
+	 * size to be able to convert the buffer.
+	 */
+	xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
+	return (-1);
     }
     return (0);
 }
@@ -1492,8 +1455,13 @@
     if (ctxt == NULL) return(NULL);
     buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
     if (buf == NULL) {
-        __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
-                     (const char *) filename);
+	if (filename == NULL)
+	    __xmlLoaderErr(ctxt,
+	                   "failed to load external entity: NULL filename \n",
+			   NULL);
+	else
+	    __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
+			   (const char *) filename);
 	return(NULL);
     }
 
@@ -1912,7 +1880,7 @@
     int found = 0;
 
     if ((seq == NULL) || (node == NULL))
-        return (-1);
+        return ((unsigned long) -1);
 
     /* Do a binary search for the key */
     lower = 1;

Modified: packages/libxml2/branches/upstream/current/pattern.c
===================================================================
--- packages/libxml2/branches/upstream/current/pattern.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/pattern.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -46,26 +46,43 @@
 #define XML_STREAM_STEP_FINAL	2
 #define XML_STREAM_STEP_ROOT	4
 #define XML_STREAM_STEP_ATTR	8
+#define XML_STREAM_STEP_NODE	16
+#define XML_STREAM_STEP_IN_SET	32
 
 /*
-* TODO: This is used on _xmlStreamCtxt, so don't use any values
-* from xmlPatternFlags.
+* NOTE: Those private flags (XML_STREAM_xxx) are used
+*   in _xmlStreamCtxt->flag. They extend the public
+*   xmlPatternFlags, so be carefull not to interfere with the
+*   reserved values for xmlPatternFlags. 
 */
+#define XML_STREAM_FINAL_IS_ANY_NODE 1<<14
+#define XML_STREAM_FROM_ROOT 1<<15
 #define XML_STREAM_DESC 1<<16
 
+/*
+* XML_STREAM_ANY_NODE is used for comparison against
+* xmlElementType enums, to indicate a node of any type.
+*/
+#define XML_STREAM_ANY_NODE 100
+
 #define XML_PATTERN_NOTPATTERN  (XML_PATTERN_XPATH | \
 				 XML_PATTERN_XSSEL | \
 				 XML_PATTERN_XSFIELD)
 
-#define XML_STREAM_XS_IDC(item) (item->flags & \
+#define XML_STREAM_XS_IDC(c) ((c)->flags & \
     (XML_PATTERN_XSSEL | XML_PATTERN_XSFIELD))
 
+#define XML_STREAM_XS_IDC_SEL(c) ((c)->flags & XML_PATTERN_XSSEL)
+
+#define XML_STREAM_XS_IDC_FIELD(c) ((c)->flags & XML_PATTERN_XSFIELD)
+
 typedef struct _xmlStreamStep xmlStreamStep;
 typedef xmlStreamStep *xmlStreamStepPtr;
 struct _xmlStreamStep {
     int flags;			/* properties of that step */
     const xmlChar *name;	/* first string value if NULL accept all */
     const xmlChar *ns;		/* second string value */
+    int nodeType;		/* type of node */
 };
 
 typedef struct _xmlStreamComp xmlStreamComp;
@@ -690,6 +707,7 @@
 #define CUR (*ctxt->cur)
 #define SKIP(val) ctxt->cur += (val)
 #define NXT(val) ctxt->cur[(val)]
+#define PEEKPREV(val) ctxt->cur[-(val)]
 #define CUR_PTR ctxt->cur
 
 #define SKIP_BLANKS 							\
@@ -884,6 +902,7 @@
     xmlChar *name = NULL;
     xmlChar *URL = NULL;
     
+    SKIP_BLANKS;
     name = xmlPatScanNCName(ctxt);
     if (name == NULL) {
 	if (CUR == '*') {
@@ -901,6 +920,13 @@
 	xmlChar *prefix = name;
 	
 	NEXT;
+
+	if (IS_BLANK_CH(CUR)) {	    
+	    ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
+	    xmlFree(prefix);
+	    ctxt->error = 1;
+	    goto error;
+	}
 	/*
 	* This is a namespace match
 	*/
@@ -967,25 +993,39 @@
     xmlChar *token = NULL;
     xmlChar *name = NULL;
     xmlChar *URL = NULL;
+    int hasBlanks = 0;
 
     SKIP_BLANKS;
     if (CUR == '.') {
+	/*
+	* Context node.
+	*/
 	NEXT;
 	PUSH(XML_OP_ELEM, NULL, NULL);
 	return;
     }
+    if (CUR == '@') {
+	/*
+	* Attribute test.
+	*/
+	if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) {
+	    ERROR5(NULL, NULL, NULL,
+		"Unexpected attribute axis in '%s'.\n", ctxt->base);
+	    ctxt->error = 1;
+	    return;
+	}
+	NEXT;
+	xmlCompileAttributeTest(ctxt);
+	if (ctxt->error != 0) 
+	    goto error;
+	return;
+    }
     name = xmlPatScanNCName(ctxt);
     if (name == NULL) {
 	if (CUR == '*') {
 	    NEXT;
 	    PUSH(XML_OP_ALL, NULL, NULL);
 	    return;
-	} else if (CUR == '@') {
-	    NEXT;
-	    xmlCompileAttributeTest(ctxt);
-	    if (ctxt->error != 0) 
-		goto error;
-	    return;
 	} else {
 	    ERROR(NULL, NULL, NULL,
 		    "xmlCompileStepPattern : Name expected\n");
@@ -993,13 +1033,21 @@
 	    return;
 	}
     }
-    SKIP_BLANKS;
+    if (IS_BLANK_CH(CUR)) {
+	hasBlanks = 1;
+	SKIP_BLANKS;
+    }
     if (CUR == ':') {
 	NEXT;
 	if (CUR != ':') {
 	    xmlChar *prefix = name;
-	    int i;
+	    int i;	    
 
+	    if (hasBlanks || IS_BLANK_CH(CUR)) {
+		ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
+		ctxt->error = 1;
+		goto error;
+	    }
 	    /*
 	     * This is a namespace match
 	     */
@@ -1060,6 +1108,11 @@
 		    int i;
 		    
 		    NEXT;
+		    if (IS_BLANK_CH(CUR)) {
+			ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
+			ctxt->error = 1;
+			goto error;
+		    }
 		    /*
 		    * This is a namespace match
 		    */
@@ -1104,13 +1157,19 @@
 	    } else if (xmlStrEqual(name, (const xmlChar *) "attribute")) {
 		xmlFree(name);
 		name = NULL;
+		if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) {
+		    ERROR5(NULL, NULL, NULL,
+			"Unexpected attribute axis in '%s'.\n", ctxt->base);
+		    ctxt->error = 1;
+		    goto error;
+		}
 		xmlCompileAttributeTest(ctxt);
 		if (ctxt->error != 0)
 		    goto error;
 		return;
 	    } else {
-		ERROR(NULL, NULL, NULL,
-		    "xmlCompileStepPattern : 'child' or 'attribute' expected\n");
+		ERROR5(NULL, NULL, NULL,
+		    "The 'element' or 'attribute' axis is expected.\n", NULL);
 		ctxt->error = 1;
 		goto error;
 	    }
@@ -1167,20 +1226,41 @@
 	NEXT;
 	NEXT;
 	NEXT;
+	/* Check for incompleteness. */
+	SKIP_BLANKS;
+	if (CUR == 0) {
+	    ERROR5(NULL, NULL, NULL,
+	       "Incomplete expression '%s'.\n", ctxt->base);
+	    ctxt->error = 1;
+	    goto error;
+	}
     }
     if (CUR == '@') {
 	NEXT;
 	xmlCompileAttributeTest(ctxt);
 	SKIP_BLANKS;
+	/* TODO: check for incompleteness */
 	if (CUR != 0) {
 	    xmlCompileStepPattern(ctxt);
+	    if (ctxt->error != 0)
+		goto error;
 	}
     } else {
         if (CUR == '/') {
 	    PUSH(XML_OP_ROOT, NULL, NULL);
 	    NEXT;
+	    /* Check for incompleteness. */
+	    SKIP_BLANKS;
+	    if (CUR == 0) {
+		ERROR5(NULL, NULL, NULL,
+		    "Incomplete expression '%s'.\n", ctxt->base);
+		ctxt->error = 1;
+		goto error;
+	    }
 	}
 	xmlCompileStepPattern(ctxt);
+	if (ctxt->error != 0)
+	    goto error;
 	SKIP_BLANKS;
 	while (CUR == '/') {
 	    if (NXT(1) == '/') {
@@ -1189,13 +1269,21 @@
 		NEXT;
 		SKIP_BLANKS;
 		xmlCompileStepPattern(ctxt);
+		if (ctxt->error != 0)
+		    goto error;
 	    } else {
 	        PUSH(XML_OP_PARENT, NULL, NULL);
 		NEXT;
 		SKIP_BLANKS;
-		if (CUR != 0) {
-		    xmlCompileStepPattern(ctxt);
+		if (CUR == 0) {
+		    ERROR5(NULL, NULL, NULL,
+		    "Incomplete expression '%s'.\n", ctxt->base);
+		    ctxt->error = 1;
+		    goto error;		    
 		}
+		xmlCompileStepPattern(ctxt);
+		if (ctxt->error != 0)
+		    goto error;
 	    }
 	}
     }
@@ -1208,6 +1296,107 @@
     return;
 }
 
+/**
+ * xmlCompileIDCXPathPath:
+ * @ctxt:  the compilation context
+ *
+ * Compile the Path Pattern and generates a precompiled
+ * form suitable for fast matching.
+ *
+ * [5]    Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest ) 
+ */
+static void
+xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
+    SKIP_BLANKS;
+    if (CUR == '/') {
+	ERROR5(NULL, NULL, NULL,
+	    "Unexpected selection of the document root in '%s'.\n",
+	    ctxt->base);
+	goto error;
+    }
+    ctxt->comp->flags |= PAT_FROM_CUR;
+
+    if (CUR == '.') {
+	/* "." - "self::node()" */
+	NEXT;
+	SKIP_BLANKS;
+	if (CUR == 0) {
+	    /*
+	    * Selection of the context node.
+	    */
+	    PUSH(XML_OP_ELEM, NULL, NULL);
+	    return;
+	}
+	if (CUR != '/') {
+	    /* TODO: A more meaningful error message. */
+	    ERROR5(NULL, NULL, NULL,
+	    "Unexpected token after '.' in '%s'.\n", ctxt->base);
+	    goto error;
+	}
+	/* "./" - "self::node()/" */
+	NEXT;
+	SKIP_BLANKS;
+	if (CUR == '/') {
+	    if (IS_BLANK_CH(PEEKPREV(1))) {
+		/*
+		* Disallow "./ /"
+		*/
+		ERROR5(NULL, NULL, NULL,
+		    "Unexpected '/' token in '%s'.\n", ctxt->base);
+		goto error;
+	    }
+	    /* ".//" - "self:node()/descendant-or-self::node()/" */
+	    PUSH(XML_OP_ANCESTOR, NULL, NULL);
+	    NEXT;
+	    SKIP_BLANKS;
+	}
+	if (CUR == 0)
+	    goto error_unfinished;
+    }
+    /*
+    * Process steps.
+    */
+    do {
+	xmlCompileStepPattern(ctxt);
+	if (ctxt->error != 0) 
+	    goto error;
+	SKIP_BLANKS;
+	if (CUR != '/')
+	    break;
+	PUSH(XML_OP_PARENT, NULL, NULL);
+	NEXT;
+	SKIP_BLANKS;
+	if (CUR == '/') {
+	    /*
+	    * Disallow subsequent '//'.
+	    */
+	    ERROR5(NULL, NULL, NULL,
+		"Unexpected subsequent '//' in '%s'.\n",
+		ctxt->base);
+	    goto error;
+	}
+	if (CUR == 0)
+	    goto error_unfinished;
+	
+    } while (CUR != 0);
+
+    if (CUR != 0) {
+	ERROR5(NULL, NULL, NULL,
+	    "Failed to compile expression '%s'.\n", ctxt->base);
+	ctxt->error = 1;
+    }
+    return;
+error:
+    ctxt->error = 1;
+    return;
+
+error_unfinished:
+    ctxt->error = 1;
+    ERROR5(NULL, NULL, NULL,
+	"Unfinished expression '%s'.\n", ctxt->base);    
+    return;
+}
+
 /************************************************************************
  *									*
  *			The streaming code				*
@@ -1334,7 +1523,7 @@
  */
 static int
 xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name,
-                     const xmlChar *ns, int flags) {
+                     const xmlChar *ns, int nodeType, int flags) {
     xmlStreamStepPtr cur;
 
     if (comp->nbStep >= comp->maxStep) {
@@ -1352,6 +1541,7 @@
     cur->flags = flags;
     cur->name = name;
     cur->ns = ns;
+    cur->nodeType = nodeType;
     return(comp->nbStep - 1);
 }
 
@@ -1366,7 +1556,8 @@
 static int
 xmlStreamCompile(xmlPatternPtr comp) {
     xmlStreamCompPtr stream;
-    int i, s = 0, root = 0, flags = 0;
+    int i, s = 0, root = 0, flags = 0, prevs = -1;
+    xmlStepOp step;
 
     if ((comp == NULL) || (comp->steps == NULL))
         return(-1);
@@ -1380,6 +1571,8 @@
 	stream = xmlNewStreamComp(0);
 	if (stream == NULL)
 	    return(-1);
+	/* Note that the stream will have no steps in this case. */
+	stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE;
 	comp->stream = stream;
 	return(0);
     }
@@ -1392,19 +1585,13 @@
 	xmlDictReference(stream->dict);
     }
 
-    /*
-     * Skip leading ./ on relative paths
-     */
-    i = 0;
-    while ((comp->flags & PAT_FROM_CUR) && (comp->nbStep > i + 2) &&
-        (comp->steps[i].op == XML_OP_ELEM) &&
-	(comp->steps[i].value == NULL) &&
-	(comp->steps[i].value2 == NULL) &&
-	(comp->steps[i + 1].op == XML_OP_PARENT)) {
-	i += 2;
-    }
+    i = 0;        
+    if (comp->flags & PAT_FROM_ROOT)
+	stream->flags |= XML_STREAM_FROM_ROOT;
+
     for (;i < comp->nbStep;i++) {
-        switch (comp->steps[i].op) {
+	step = comp->steps[i];
+        switch (step.op) {
 	    case XML_OP_END:
 	        break;
 	    case XML_OP_ROOT:
@@ -1413,51 +1600,95 @@
 		root = 1;
 		break;
 	    case XML_OP_NS:
-		s = xmlStreamCompAddStep(stream, NULL,
-		    comp->steps[i].value, flags);
-		flags = 0;
+		s = xmlStreamCompAddStep(stream, NULL, step.value,
+		    XML_ELEMENT_NODE, flags);		
 		if (s < 0)
 		    goto error;
+		prevs = s;
+		flags = 0;		
 		break;	    
 	    case XML_OP_ATTR:
 		flags |= XML_STREAM_STEP_ATTR;
-		s = xmlStreamCompAddStep(stream, comp->steps[i].value,
-		    comp->steps[i].value2, flags);
+		prevs = -1;
+		s = xmlStreamCompAddStep(stream,
+		    step.value, step.value2, XML_ATTRIBUTE_NODE, flags);
 		flags = 0;
 		if (s < 0)
 		    goto error;
 		break;
-	    case XML_OP_ELEM:
-	        if ((comp->steps[i].value == NULL) &&
-		    (comp->steps[i].value2 == NULL) &&
-		    (comp->nbStep > i + 2) &&
-		    (comp->steps[i + 1].op == XML_OP_PARENT)) {
-		    i++;
-		    continue;
-		 }
+	    case XML_OP_ELEM:		
+	        if ((step.value == NULL) && (step.value2 == NULL)) {
+		    /*
+		    * We have a "." or "self::node()" here.
+		    * Eliminate redundant self::node() tests like in "/./."
+		    * or "//./"
+		    * The only case we won't eliminate is "//.", i.e. if
+		    * self::node() is the last node test and we had
+		    * continuation somewhere beforehand.
+		    */
+		    if ((comp->nbStep == i + 1) &&
+			(flags & XML_STREAM_STEP_DESC)) {
+			/*
+			* Mark the special case where the expression resolves
+			* to any type of node.
+			*/
+			if (comp->nbStep == i + 1) {
+			    stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE;
+			}
+			flags |= XML_STREAM_STEP_NODE;			
+			s = xmlStreamCompAddStep(stream, NULL, NULL,
+			    XML_STREAM_ANY_NODE, flags);
+			if (s < 0)
+			    goto error;
+			flags = 0;
+			/*
+			* If there was a previous step, mark it to be added to
+			* the result node-set; this is needed since only
+			* the last step will be marked as "final" and only
+			* "final" nodes are added to the resulting set.
+			*/
+			if (prevs != -1) {
+			    stream->steps[prevs].flags |= XML_STREAM_STEP_IN_SET;
+			    prevs = -1;
+			}
+			break;	
+
+		    } else {
+			/* Just skip this one. */
+			continue;
+		    }
+		}
+		/* An element node. */		
+	        s = xmlStreamCompAddStep(stream, step.value, step.value2,
+		    XML_ELEMENT_NODE, flags);		
+		if (s < 0)
+		    goto error;
+		prevs = s;
+		flags = 0;		
+		break;		
 	    case XML_OP_CHILD:
-	        s = xmlStreamCompAddStep(stream, comp->steps[i].value,
-		                         comp->steps[i].value2, flags);
-		flags = 0;
+		/* An element node child. */
+	        s = xmlStreamCompAddStep(stream, step.value, step.value2,
+		    XML_ELEMENT_NODE, flags);		
 		if (s < 0)
 		    goto error;
+		prevs = s;
+		flags = 0;
 		break;	    
 	    case XML_OP_ALL:
-	        s = xmlStreamCompAddStep(stream, NULL, NULL, flags);
-		flags = 0;
+	        s = xmlStreamCompAddStep(stream, NULL, NULL,
+		    XML_ELEMENT_NODE, flags);		
 		if (s < 0)
 		    goto error;
+		prevs = s;
+		flags = 0;
 		break;
-	    case XML_OP_PARENT:
-	        if ((comp->nbStep > i + 1) &&
-		    (comp->steps[i + 1].op == XML_OP_ELEM) &&
-		    (comp->steps[i + 1].value == NULL) &&
-		    (comp->steps[i + 1].value2 == NULL)) {
-		    i++;
-		    continue;
-		 }
+	    case XML_OP_PARENT:	
 	        break;
 	    case XML_OP_ANCESTOR:
+		/* Skip redundant continuations. */
+		if (flags & XML_STREAM_STEP_DESC)
+		    break;
 	        flags |= XML_STREAM_STEP_DESC;
 		/*
 		* Mark the expression as having "//".
@@ -1481,6 +1712,8 @@
 		stream->steps[0].flags |= XML_STREAM_STEP_DESC;	    
 	}
     }
+    if (stream->nbStep <= s)
+	goto error;
     stream->steps[s].flags |= XML_STREAM_STEP_FINAL;
     if (root)
 	stream->steps[0].flags |= XML_STREAM_STEP_ROOT;
@@ -1603,7 +1836,7 @@
 static int
 xmlStreamPushInternal(xmlStreamCtxtPtr stream,
 		      const xmlChar *name, const xmlChar *ns,
-		      xmlElementType nodeType) {
+		      int nodeType) {
     int ret = 0, err = 0, final = 0, tmp, i, m, match, step, desc;
     xmlStreamCompPtr comp;
 #ifdef DEBUG_STREAMING
@@ -1615,16 +1848,34 @@
 
     while (stream != NULL) {
 	comp = stream->comp;
-	if ((name == NULL) && (ns == NULL)) {
+
+	if ((nodeType == XML_ELEMENT_NODE) &&
+	    (name == NULL) && (ns == NULL)) {
+	    /* We have a document node here (or a reset). */
 	    stream->nbState = 0;
 	    stream->level = 0;
 	    stream->blockLevel = -1;
-	    if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) {
-		tmp = xmlStreamCtxtAddState(stream, 0, 0);
-		if (tmp < 0)
-		    err++;
-		if (comp->nbStep == 0)
+	    if (comp->flags & XML_STREAM_FROM_ROOT) {
+		if (comp->nbStep == 0) {
+		    /* TODO: We have a "/." here? */
 		    ret = 1;
+		} else {
+		    if ((comp->nbStep == 1) &&
+			(comp->steps[0].nodeType == XML_STREAM_ANY_NODE) &&
+			(comp->steps[0].flags & XML_STREAM_STEP_DESC))
+		    {
+			/*
+			* In the case of "//." the document node will match
+			* as well.
+			*/
+			ret = 1;
+		    } else if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) {
+			/* TODO: Do we need this ? */
+			tmp = xmlStreamCtxtAddState(stream, 0, 0);
+			if (tmp < 0)
+			    err++;
+		    }
+		}
 	    }
 	    stream = stream->next;
 	    continue; /* while */
@@ -1647,7 +1898,7 @@
 	    * or traditional XPath expressions, this will match if
 	    * we are at the first level only, otherwise on every level.
 	    */
-	    if ((nodeType == XML_ELEMENT_NODE) &&
+	    if ((nodeType != XML_ATTRIBUTE_NODE) &&
 		(((stream->flags & XML_PATTERN_NOTPATTERN) == 0) ||
 		(stream->level == 0))) {
 		    ret = 1;		
@@ -1662,6 +1913,19 @@
     	    stream->level++;
 	    goto stream_next;
 	}
+
+	if ((nodeType != XML_ELEMENT_NODE) &&
+	    (nodeType != XML_ATTRIBUTE_NODE) &&
+	    ((comp->flags & XML_STREAM_FINAL_IS_ANY_NODE) == 0)) {
+	    /*
+	    * No need to process nodes of other types if we don't
+	    * resolve to those types.
+	    * TODO: Do we need to block the context here?
+	    */
+	    stream->level++;
+	    goto stream_next;
+	}
+
 	/*
 	 * Check evolution of existing states
 	 */
@@ -1710,14 +1974,24 @@
 	    /* 
 	    * Check for correct node-type.
 	    */
-	    if ((nodeType == XML_ATTRIBUTE_NODE) && 
-		((comp->steps[step].flags & XML_STREAM_STEP_ATTR) == 0))
-		goto next_state;
+	    if (comp->steps[step].nodeType != nodeType) {
+		if (comp->steps[step].nodeType == XML_ATTRIBUTE_NODE) {
+		    /*
+		    * Block this expression for deeper evaluation.
+		    */
+		    if ((comp->flags & XML_STREAM_DESC) == 0)
+			stream->blockLevel = stream->level +1;
+		    goto next_state;
+		} else if (comp->steps[step].nodeType != XML_STREAM_ANY_NODE)
+		    goto next_state;
+	    }	    
 	    /*
 	    * Compare local/namespace-name.
 	    */
 	    match = 0;
-	    if (comp->dict) {
+	    if (comp->steps[step].nodeType == XML_STREAM_ANY_NODE) {
+		match = 1;
+	    } else if (comp->dict) {
 		if (comp->steps[step].name == NULL) {
 		    if (comp->steps[step].ns == NULL)
 			match = 1;
@@ -1756,7 +2030,15 @@
 			                      stream->level + 1);
 		    }
 		}
-	    }
+		if ((ret != 1) &&
+		    (comp->steps[step].flags & XML_STREAM_STEP_IN_SET)) {
+		    /*
+		    * Check if we have a special case like "foo/bar//.", where
+		    * "foo" is selected as well.
+		    */
+		    ret = 1;
+		}
+	    }	    
 	    if (((comp->flags & XML_STREAM_DESC) == 0) &&
 		((! match) || final))  {
 		/*
@@ -1774,6 +2056,8 @@
 
 	/*
 	* Re/enter the expression.
+	* Don't reenter if it's an absolute expression like "/foo",
+	*   except "//foo".
 	*/
 	if (comp->steps[0].flags & XML_STREAM_STEP_ROOT)
 	    goto stream_next;
@@ -1816,14 +2100,19 @@
 	/*
 	* Check expected node-type.
 	*/
-	if ((nodeType == XML_ATTRIBUTE_NODE) && 
-	    ((comp->steps[0].flags & XML_STREAM_STEP_ATTR) == 0))
-	    goto stream_next;
+	if (comp->steps[0].nodeType != nodeType) {
+	    if (nodeType == XML_ATTRIBUTE_NODE)
+		goto stream_next;
+	    else if (comp->steps[0].nodeType != XML_STREAM_ANY_NODE)
+		goto stream_next;	     
+	}
 	/*
 	* Compare local/namespace-name.
 	*/
 	match = 0;
-	if (comp->steps[0].name == NULL) {
+	if (comp->steps[0].nodeType == XML_STREAM_ANY_NODE) {
+	    match = 1;
+	} else if (comp->steps[0].name == NULL) {
 	    if (comp->steps[0].ns == NULL)
 		match = 1;
 	    else {
@@ -1840,12 +2129,20 @@
 		match = ((xmlStrEqual(comp->steps[0].name, name)) &&
 		    (xmlStrEqual(comp->steps[0].ns, ns)));
 	}
-	if (match) {
-	    final = comp->steps[0].flags & XML_STREAM_STEP_FINAL;
+	final = comp->steps[0].flags & XML_STREAM_STEP_FINAL;
+	if (match) {	    
 	    if (final)
 		ret = 1;
 	    else
 		xmlStreamCtxtAddState(stream, 1, stream->level);
+	    if ((ret != 1) &&
+		(comp->steps[0].flags & XML_STREAM_STEP_IN_SET)) {
+		/*
+		* Check if we have a special case like "foo//.", where
+		* "foo" is selected as well.
+		*/
+		ret = 1;
+	    }
 	}
 	if (((comp->flags & XML_STREAM_DESC) == 0) &&
 	    ((! match) || final))  {
@@ -1855,7 +2152,7 @@
 	    */
 	    stream->blockLevel = stream->level;
 	}
-	
+
 stream_next:
         stream = stream->next;
     } /* while stream != NULL */
@@ -1879,6 +2176,7 @@
  * to come from the dictionary.
  * Both @name and @ns being NULL means the / i.e. the root of the document.
  * This can also act as a reset.
+ * Otherwise the function will act as if it has been given an element-node.
  *
  * Returns: -1 in case of error, 1 if the current state in the stream is a
  *    match and 0 otherwise.
@@ -1886,10 +2184,38 @@
 int
 xmlStreamPush(xmlStreamCtxtPtr stream,
               const xmlChar *name, const xmlChar *ns) {
-    return (xmlStreamPushInternal(stream, name, ns, XML_ELEMENT_NODE));
+    return (xmlStreamPushInternal(stream, name, ns, (int) XML_ELEMENT_NODE));
 }
 
 /**
+ * xmlStreamPushNode:
+ * @stream: the stream context
+ * @name: the current name
+ * @ns: the namespace name
+ * @nodeType: the type of the node being pushed
+ *
+ * Push new data onto the stream. NOTE: if the call xmlPatterncompile()
+ * indicated a dictionary, then strings for name and ns will be expected
+ * to come from the dictionary.
+ * Both @name and @ns being NULL means the / i.e. the root of the document.
+ * This can also act as a reset.
+ * Different from xmlStreamPush() this function can be fed with nodes of type:
+ * element-, attribute-, text-, cdata-section-, comment- and
+ * processing-instruction-node.
+ *
+ * Returns: -1 in case of error, 1 if the current state in the stream is a
+ *    match and 0 otherwise.
+ */
+int
+xmlStreamPushNode(xmlStreamCtxtPtr stream,
+		  const xmlChar *name, const xmlChar *ns,
+		  int nodeType)
+{
+    return (xmlStreamPushInternal(stream, name, ns,
+	nodeType));
+}
+
+/**
 * xmlStreamPushAttr:
 * @stream: the stream context
 * @name: the current name
@@ -1900,6 +2226,7 @@
 * to come from the dictionary.
 * Both @name and @ns being NULL means the / i.e. the root of the document.
 * This can also act as a reset.
+* Otherwise the function will act as if it has been given an attribute-node.
 *
 * Returns: -1 in case of error, 1 if the current state in the stream is a
 *    match and 0 otherwise.
@@ -1907,7 +2234,7 @@
 int
 xmlStreamPushAttr(xmlStreamCtxtPtr stream,
 		  const xmlChar *name, const xmlChar *ns) {
-    return (xmlStreamPushInternal(stream, name, ns, XML_ATTRIBUTE_NODE));
+    return (xmlStreamPushInternal(stream, name, ns, (int) XML_ATTRIBUTE_NODE));
 }
 
 /**
@@ -1921,11 +2248,9 @@
 int
 xmlStreamPop(xmlStreamCtxtPtr stream) {
     int i, lev;
-    int ret;
-
+    
     if (stream == NULL)
         return(-1);
-    ret = 0;
     while (stream != NULL) {
 	/*
 	* Reset block-level.
@@ -1935,7 +2260,7 @@
 
 	stream->level--;
 	if (stream->level < 0)
-	    ret = -1;		
+	    return(-1);		
 	/*
 	 * Check evolution of existing states
 	 */	
@@ -1952,6 +2277,31 @@
     return(0);
 }
 
+/**
+ * xmlStreamWantsAnyNode:
+ * @streamCtxt: the stream context
+ *
+ * Query if the streaming pattern additionally needs to be fed with
+ * text-, cdata-section-, comment- and processing-instruction-nodes.
+ * If the result is 0 then only element-nodes and attribute-nodes
+ * need to be pushed.
+ *
+ * Returns: 1 in case of need of nodes of the above described types,
+ *          0 otherwise. -1 on API errors.
+ */
+int
+xmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt)
+{    
+    if (streamCtxt == NULL)
+	return(-1);
+    while (streamCtxt != NULL) {
+	if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE)	
+	    return(1);
+	streamCtxt = streamCtxt->next;
+    }
+    return(0);
+}
+
 /************************************************************************
  *									*
  *			The public interfaces				*
@@ -2008,7 +2358,10 @@
 	cur->flags = flags;
 	ctxt->comp = cur;
 
-	xmlCompilePathPattern(ctxt);
+	if (XML_STREAM_XS_IDC(cur))
+	    xmlCompileIDCXPathPath(ctxt);
+	else
+	    xmlCompilePathPattern(ctxt);
 	if (ctxt->error != 0)
 	    goto error;
 	xmlFreePatParserContext(ctxt);

Modified: packages/libxml2/branches/upstream/current/python/libxml.py
===================================================================
--- packages/libxml2/branches/upstream/current/python/libxml.py	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/python/libxml.py	2006-01-06 18:12:46 UTC (rev 501)
@@ -211,7 +211,8 @@
         pass
 
     def warning(self, msg):
-        print msg
+        #print msg
+	pass
 
     def error(self, msg):
         raise parserError(msg)

Modified: packages/libxml2/branches/upstream/current/python/libxml2-py.c
===================================================================
--- packages/libxml2/branches/upstream/current/python/libxml2-py.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/python/libxml2-py.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -1497,15 +1497,15 @@
     int c_retval;
     xmlSchemaValidCtxtPtr ctxt;
     PyObject *pyobj_ctxt;
-    xmlDocPtr doc;
-    PyObject *pyobj_doc;
+    xmlDocPtr instance;
+    PyObject *pyobj_instance;
 
-    if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_doc))
+    if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_instance))
         return(NULL);
     ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
-    doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+    instance = (xmlDocPtr) PyxmlNode_Get(pyobj_instance);
 
-    c_retval = xmlSchemaValidateDoc(ctxt, doc);
+    c_retval = xmlSchemaValidateDoc(ctxt, instance);
     py_retval = libxml_intWrap((int) c_retval);
     return(py_retval);
 }
@@ -5874,6 +5874,21 @@
 }
 
 #endif /* defined(LIBXML_UNICODE_ENABLED) */
+PyObject *
+libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+    PyObject *py_retval;
+    xmlChar * c_retval;
+    xmlChar * utf;
+    int len;
+
+    if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len))
+        return(NULL);
+
+    c_retval = xmlUTF8Strndup(utf, len);
+    py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+    return(py_retval);
+}
+
 #if defined(LIBXML_LEGACY_ENABLED)
 PyObject *
 libxml_xmlNewGlobalNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
@@ -7689,6 +7704,28 @@
 }
 
 #endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderSchemaValidateCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+    PyObject *py_retval;
+    int c_retval;
+    xmlTextReaderPtr reader;
+    PyObject *pyobj_reader;
+    xmlSchemaValidCtxtPtr ctxt;
+    PyObject *pyobj_ctxt;
+    int options;
+
+    if (!PyArg_ParseTuple(args, (char *)"OOi:xmlTextReaderSchemaValidateCtxt", &pyobj_reader, &pyobj_ctxt, &options))
+        return(NULL);
+    reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+    ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+    c_retval = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options);
+    py_retval = libxml_intWrap((int) c_retval);
+    return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
 PyObject *
 libxml_xmlNewProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
@@ -7783,7 +7820,7 @@
 }
 
 #endif /* defined(LIBXML_HTML_ENABLED) */
-#if defined(LIBXML_READER_ENABLED)
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
 PyObject *
 libxml_xmlTextReaderReadOuterXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
     PyObject *py_retval;
@@ -7800,7 +7837,7 @@
     return(py_retval);
 }
 
-#endif /* defined(LIBXML_READER_ENABLED) */
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
 #if defined(LIBXML_UNICODE_ENABLED)
 PyObject *
 libxml_xmlUCSIsTamil(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
@@ -10749,21 +10786,6 @@
     return(py_retval);
 }
 
-PyObject *
-libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
-    PyObject *py_retval;
-    xmlChar * c_retval;
-    xmlChar * utf;
-    int len;
-
-    if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len))
-        return(NULL);
-
-    c_retval = xmlUTF8Strndup(utf, len);
-    py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
-    return(py_retval);
-}
-
 #if defined(LIBXML_XPATH_ENABLED)
 PyObject *
 libxml_xmlXPathGetContextDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
@@ -12028,20 +12050,6 @@
     return(Py_None);
 }
 
-PyObject *
-libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
-    xmlNodePtr cur;
-    PyObject *pyobj_cur;
-
-    if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur))
-        return(NULL);
-    cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
-
-    xmlUnlinkNode(cur);
-    Py_INCREF(Py_None);
-    return(Py_None);
-}
-
 #if defined(LIBXML_DEBUG_ENABLED)
 PyObject *
 libxml_xmlBoolToText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
@@ -13675,7 +13683,7 @@
     return(Py_None);
 }
 
-#if defined(LIBXML_READER_ENABLED)
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
 PyObject *
 libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
     PyObject *py_retval;
@@ -13692,7 +13700,7 @@
     return(py_retval);
 }
 
-#endif /* defined(LIBXML_READER_ENABLED) */
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
 PyObject *
 libxml_xmlThrDefKeepBlanksDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
     PyObject *py_retval;
@@ -14076,6 +14084,20 @@
 }
 
 PyObject *
+libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+    xmlNodePtr cur;
+    PyObject *pyobj_cur;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur))
+        return(NULL);
+    cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+    xmlUnlinkNode(cur);
+    Py_INCREF(Py_None);
+    return(Py_None);
+}
+
+PyObject *
 libxml_xmlCreateEntityParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
     PyObject *py_retval;
     xmlParserCtxtPtr c_retval;

Modified: packages/libxml2/branches/upstream/current/python/setup.py
===================================================================
--- packages/libxml2/branches/upstream/current/python/setup.py	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/python/setup.py	2006-01-06 18:12:46 UTC (rev 501)
@@ -226,7 +226,7 @@
 setup (name = "libxml2-python",
        # On *nix, the version number is created from setup.py.in
        # On windows, it is set by configure.js
-       version = "2.6.22",
+       version = "2.6.23",
        description = descr,
        author = "Daniel Veillard",
        author_email = "veillard at redhat.com",

Modified: packages/libxml2/branches/upstream/current/relaxng.c
===================================================================
--- packages/libxml2/branches/upstream/current/relaxng.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/relaxng.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -7331,7 +7331,6 @@
  *
  * 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
  *
  * Returns the internal XML RelaxNG structure built from the resource or
  *         NULL in case of error

Added: packages/libxml2/branches/upstream/current/result/HTML/53867.html
===================================================================
--- packages/libxml2/branches/upstream/current/result/HTML/53867.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/HTML/53867.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><head><style>
+.......
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+</style></head></html>

Added: packages/libxml2/branches/upstream/current/result/HTML/53867.html.err
===================================================================

Added: packages/libxml2/branches/upstream/current/result/HTML/53867.html.sax
===================================================================
--- packages/libxml2/branches/upstream/current/result/HTML/53867.html.sax	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/HTML/53867.html.sax	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,26 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(html)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(head)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(style)
+SAX.cdata(
+.......
+....................., 1000)
+SAX.cdata(.............................., 1000)
+SAX.cdata(.............................., 1000)
+SAX.cdata(................
+............., 977)
+SAX.endElement(style)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endElement(head)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endElement(html)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endDocument()

Added: packages/libxml2/branches/upstream/current/result/XPath/tests/nodespat
===================================================================
--- packages/libxml2/branches/upstream/current/result/XPath/tests/nodespat	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/XPath/tests/nodespat	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,94 @@
+
+========================
+Expression: /.
+Object is a Node Set :
+Set contains 1 nodes:
+1   /
+
+========================
+Expression: //.
+Object is a Node Set :
+Set contains 12 nodes:
+1   /
+2  ELEMENT root
+3  ELEMENT foo
+4  TEXT
+    content=txt
+5  COMMENT
+    content=hello
+6  CDATA_SECTION
+    content=data
+7  PI target
+    content=data
+8  ELEMENT bar
+9  TEXT
+    content=txt
+10  COMMENT
+    content=hello
+11  CDATA_SECTION
+    content=data
+12  PI target
+    content=data
+
+========================
+Expression: /root//.
+Object is a Node Set :
+Set contains 11 nodes:
+1  ELEMENT root
+2  ELEMENT foo
+3  TEXT
+    content=txt
+4  COMMENT
+    content=hello
+5  CDATA_SECTION
+    content=data
+6  PI target
+    content=data
+7  ELEMENT bar
+8  TEXT
+    content=txt
+9  COMMENT
+    content=hello
+10  CDATA_SECTION
+    content=data
+11  PI target
+    content=data
+
+========================
+Expression: //.//./././/.
+Object is a Node Set :
+Set contains 12 nodes:
+1   /
+2  ELEMENT root
+3  ELEMENT foo
+4  TEXT
+    content=txt
+5  COMMENT
+    content=hello
+6  CDATA_SECTION
+    content=data
+7  PI target
+    content=data
+8  ELEMENT bar
+9  TEXT
+    content=txt
+10  COMMENT
+    content=hello
+11  CDATA_SECTION
+    content=data
+12  PI target
+    content=data
+
+========================
+Expression: /root//././/bar//.
+Object is a Node Set :
+Set contains 5 nodes:
+1  ELEMENT bar
+2  TEXT
+    content=txt
+3  COMMENT
+    content=hello
+4  CDATA_SECTION
+    content=data
+5  PI target
+    content=data

Added: packages/libxml2/branches/upstream/current/result/c14n/exc-without-comments/test-2
===================================================================
--- packages/libxml2/branches/upstream/current/result/c14n/exc-without-comments/test-2	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/c14n/exc-without-comments/test-2	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,11 @@
+<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
+    <ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod>
+    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
+    <Reference URI="#ndid:1234-5678-0987">
+      <Transforms>
+        <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
+      </Transforms>
+      <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
+      <DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue>
+    </Reference>
+  </SignedInfo>
\ No newline at end of file

Added: packages/libxml2/branches/upstream/current/result/noent/ns7
===================================================================
--- packages/libxml2/branches/upstream/current/result/noent/ns7	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/noent/ns7	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<xml:test/>

Added: packages/libxml2/branches/upstream/current/result/ns7
===================================================================
--- packages/libxml2/branches/upstream/current/result/ns7	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/ns7	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<xml:test/>

Added: packages/libxml2/branches/upstream/current/result/ns7.rde
===================================================================
--- packages/libxml2/branches/upstream/current/result/ns7.rde	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/ns7.rde	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+0 1 xml:test 1 0

Added: packages/libxml2/branches/upstream/current/result/ns7.rdr
===================================================================
--- packages/libxml2/branches/upstream/current/result/ns7.rdr	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/ns7.rdr	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+0 1 xml:test 1 0

Added: packages/libxml2/branches/upstream/current/result/ns7.sax
===================================================================
--- packages/libxml2/branches/upstream/current/result/ns7.sax	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/ns7.sax	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,5 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(xml:test)
+SAX.endElement(xml:test)
+SAX.endDocument()

Added: packages/libxml2/branches/upstream/current/result/ns7.sax2
===================================================================
--- packages/libxml2/branches/upstream/current/result/ns7.sax2	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/ns7.sax2	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,5 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace', 0, 0, 0)
+SAX.endElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace')
+SAX.endDocument()

Deleted: packages/libxml2/branches/upstream/current/result/regexp/*
===================================================================
--- packages/libxml2/branches/upstream/current/result/regexp/*	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/regexp/*	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +0,0 @@
-Ops: 0 nodes, 0 cons

Modified: packages/libxml2/branches/upstream/current/result/regexp/hard
===================================================================
--- packages/libxml2/branches/upstream/current/result/regexp/hard	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/regexp/hard	2006-01-06 18:12:46 UTC (rev 501)
@@ -5,3 +5,8 @@
 a0b: Ok
 aa0aaa: Fail
 b0aaa: Ok
+Regexp: (\d{1,3}\.){3}\d{1,3}
+1.2.3.4: Ok
+1.22.333.44: Ok
+1.2.3: Fail
+1..2.3: Fail

Modified: packages/libxml2/branches/upstream/current/result/schemas/bug303566_1_1.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/bug303566_1_1.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/bug303566_1_1.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/bug303566_1.xml:9: Schemas validity error : Element 'Part': No match found for key-sequence ['B'] of key reference 'PartRefCountryDummy'.
+./test/schemas/bug303566_1.xml:9: Schemas validity error : Element 'Part': No match found for key-sequence ['B'] of keyref 'PartRefCountryDummy'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/bug312957_1_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/bug312957_1_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/bug312957_1_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/bug312957_0.xml:11: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of key reference 'sibling_key_ref'.
+./test/schemas/bug312957_0.xml:11: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of keyref 'sibling_key_ref'.

Added: packages/libxml2/branches/upstream/current/result/schemas/bug321475_1_0
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/bug321475_1_0	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/bug321475_1_0	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/bug321475_0.xml validates

Added: packages/libxml2/branches/upstream/current/result/schemas/bug321475_1_0.err
===================================================================

Added: packages/libxml2/branches/upstream/current/result/schemas/bug322411_1_0
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/bug322411_1_0	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/bug322411_1_0	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/bug322411_0.xml validates

Added: packages/libxml2/branches/upstream/current/result/schemas/bug322411_1_0.err
===================================================================

Added: packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/bug323510_0.xml fails to validate

Added: packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/bug323510_1_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/bug323510_0.xml:2: element foo: Schemas validity error : Element 'foo': Missing child element(s). Expected is ( bar ).

Added: packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/decimal-1_0.xml fails to validate

Added: packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/decimal-1_1_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,8 @@
+./test/schemas/decimal-1_0.xml:16: element val: Schemas validity error : Element 'val': '.' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-1_0.xml:17: element val: Schemas validity error : Element 'val': '-' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-1_0.xml:18: element val: Schemas validity error : Element 'val': '+' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-1_0.xml:19: element val: Schemas validity error : Element 'val': '*' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-1_0.xml:20: element val: Schemas validity error : Element 'val': '- 1' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-1_0.xml:21: element val: Schemas validity error : Element 'val': '+ 1' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-1_0.xml:22: element val: Schemas validity error : Element 'val': '+ 0' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-1_0.xml:23: element val: Schemas validity error : Element 'val': '- 0' is not a valid value of the atomic type 'myDecimal'.

Added: packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/decimal-2_0.xml fails to validate

Added: packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/decimal-2_1_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,4 @@
+./test/schemas/decimal-2_0.xml:12: element val: Schemas validity error : Element 'val': [facet 'minInclusive'] The value '-0.1' is less than the minimum value allowed ('0').
+./test/schemas/decimal-2_0.xml:12: element val: Schemas validity error : Element 'val': '-0.1' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-2_0.xml:13: element val: Schemas validity error : Element 'val': [facet 'minInclusive'] The value '-1' is less than the minimum value allowed ('0').
+./test/schemas/decimal-2_0.xml:13: element val: Schemas validity error : Element 'val': '-1' is not a valid value of the atomic type 'myDecimal'.

Added: packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/decimal-3_0.xml fails to validate

Added: packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/decimal-3_1_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,8 @@
+./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '0.123' has more digits than are allowed ('2').
+./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': '0.123' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '0.023' has more digits than are allowed ('2').
+./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': '0.023' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '123' has more digits than are allowed ('2').
+./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': '123' is not a valid value of the atomic type 'myDecimal'.
+./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '12.3' has more digits than are allowed ('2').
+./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': '12.3' is not a valid value of the atomic type 'myDecimal'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension-err_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension-err_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension-err_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/derivation-ok-extension-err_0.xsd:9: element attribute: Schemas parser error : local complex type, attribute decl. 'barA_1': Duplicate attribute use specified.
+./test/schemas/derivation-ok-extension-err_0.xsd:6: element complexType: Schemas parser error : local complex type: Duplicate attribute use 'barA_1'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-extension_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/derivation-ok-extension_0.xsd:10: element attribute: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}attribute': Attribute use prohibitions are pointless when extending a type.
+./test/schemas/derivation-ok-extension_0.xsd:10: element attribute: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}attribute': Skipping attribute use prohibition, since it is pointless when extending a type.

Modified: packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-2-1-1_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-2-1-1_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-2-1-1_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,6 +1,6 @@
-./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type: A matching attribute use for the 'required' attribute use 'barB_3' of the base type is missing.
-./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:16: element attribute: Schemas parser error : local complex type, attribute decl. 'barB_1': The 'optional' use is inconsistent with a matching 'required' use of the base type.
-./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:23: element attribute: Schemas parser error : local complex type, attribute decl. 'barC_1': Neither a matching attribute use, nor a matching wildcard in the base type does exist.
-./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:25: element attribute: Schemas parser error : local complex type, attribute decl. 'barC_2': Neither a matching attribute use, nor a matching wildcard in the base type does exist.
-./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:30: element attribute: Schemas parser error : local complex type, attribute decl. 'barD_1': Neither a matching attribute use, nor a matching wildcard in the base type does exist.
-./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:32: element attribute: Schemas parser error : local complex type, attribute decl. 'barD_2': Neither a matching attribute use, nor a matching wildcard in the base type does exist.
+./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barB_1': The 'optional' attribute use is inconsistent with the corresponding 'required' attribute use of the base complex type definition '{http://FOO}typeA'.
+./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barC_1': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'.
+./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barC_2': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'.
+./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barD_1': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'.
+./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barD_2': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'.
+./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type: A matching attribute use for the 'required' attribute use 'barB_3' of the base complex type definition '{http://FOO}typeA' is missing.

Modified: packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-4-1-err_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-4-1-err_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/derivation-ok-restriction-4-1-err_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,3 +1,3 @@
-./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:33: element complexType: Schemas parser error : complex type 'type.A': The type has an attribute wildcard, but the base type complex type 'base.type.A' does not have one.
-./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:45: element complexType: Schemas parser error : complex type 'type.B': The attribute wildcard is not a valid subset of the wildcard in the base type complex type 'base.type.B'.
-./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:57: element complexType: Schemas parser error : complex type 'type.C': The 'process contents' of the attribute wildcard is weaker than the one in the base type complex type 'base.type.C'.
+./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:33: element complexType: Schemas parser error : complex type 'type.A': The complex type definition has an attribute wildcard, but the base complex type definition '{http://FOO}base.type.A' does not have one.
+./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:45: element complexType: Schemas parser error : complex type 'type.B': The attribute wildcard is not a valid subset of the wildcard in the base complex type definition '{http://FOO}base.type.B'.
+./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:65: element complexType: Schemas parser error : complex type 'base.type.C': The {process contents} of the attribute wildcard is weaker than the one in the base complex type definition '{http://FOO}base.type.C'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/element-err_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/element-err_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/element-err_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,20 +1,20 @@
 ./test/schemas/element-err_0.xsd:8: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'name' is required but missing.
-./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'ref' is not allowed.
-./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'minOccurs' is not allowed.
-./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'maxOccurs' is not allowed.
-./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'form' is not allowed.
+./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'ref' is not allowed.
+./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'minOccurs' is not allowed.
+./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'maxOccurs' is not allowed.
+./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'form' is not allowed.
 ./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'final': The value 'fantasy' is not valid. Expected is '(#all | List of (extension | restriction))'.
 ./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'block': The value 'flute' is not valid. Expected is '(#all | List of (extension | restriction | substitution))'.
-./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attributes 'default' and 'fixed' are mutually exclusive.
+./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive.
 ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'minOccurs': The value must not be greater than the value of 'maxOccurs'.
 ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'ref' and 'name' are mutually exclusive.
 ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'abstract': Only the attributes 'minOccurs', 'maxOccurs' and 'id' are allowed in addition to 'ref'.
 ./test/schemas/element-err_0.xsd:23: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The content is not valid. Expected is (annotation?).
 ./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'maxOccurs': The value must be greater than or equal to 1.
-./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'abstract' is not allowed.
-./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'substitutionGroup' is not allowed.
-./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'final' is not allowed.
+./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'abstract' is not allowed.
+./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'substitutionGroup' is not allowed.
+./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'final' is not allowed.
 ./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'block': The value 'flute' is not valid. Expected is '(#all | List of (extension | restriction | substitution))'.
-./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attributes 'default' and 'fixed' are mutually exclusive.
-./test/schemas/element-err_0.xsd:31: element complexType: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'type' and the <complexType> child are mutually exclusive.
-./test/schemas/element-err_0.xsd:32: element simpleType: Schemas parser error : element decl. '{http://FOO}myomy': The content is not valid. Expected is (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)).
+./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive.
+./test/schemas/element-err_0.xsd:31: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the <complexType> child are mutually exclusive.
+./test/schemas/element-err_0.xsd:32: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The content is not valid. Expected is (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)).

Added: packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/idc-keyref-err1_0.xml fails to validate

Added: packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/idc-keyref-err1_1_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+./test/schemas/idc-keyref-err1_0.xml:12: Schemas validity error : Element '{urn:test:foo}Ref': No match found for key-sequence ['L4'] of keyref '{urn:test:foo}LinkKeyRef'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/include3_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/include3_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/include3_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/include3_0.xsd:7: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': A global element declaration with the name 'bar' does already exist.
+test/schemas/include3_0.inc:4: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': A global element declaration '{http://FOO}bar' does already exist.

Modified: packages/libxml2/branches/upstream/current/result/schemas/restriction-attr1_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/restriction-attr1_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/restriction-attr1_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/restriction-attr1_0.xsd:8: element attribute: Schemas parser error : local complex type, attribute decl. 'barA': The 'optional' use is inconsistent with a matching 'required' use of the base type.
+./test/schemas/restriction-attr1_0.xsd:5: element complexType: Schemas parser error : local complex type, attribute use 'barA': The 'optional' attribute use is inconsistent with the corresponding 'required' attribute use of the base complex type definition '{http://FOO}typeA'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/scc-no-xmlns_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/scc-no-xmlns_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/scc-no-xmlns_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/scc-no-xmlns_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name': The value of type 'xs:NCName' must not match 'xmlns'.
+./test/schemas/scc-no-xmlns_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name': The value of the attribute must not match 'xmlns'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/scc-no-xsi_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/scc-no-xsi_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/scc-no-xsi_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/scc-no-xsi_0.xsd:7: element attribute: Schemas parser error : attribute decl. '{http://www.w3.org/2001/XMLSchema-instance}bar': The target namespace must not match 'http://www.w3.org/2001/XMLSchema-instance'.
+./test/schemas/scc-no-xsi_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The target namespace must not match 'http://www.w3.org/2001/XMLSchema-instance'.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-attribute1_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-attribute1_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-attribute1_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-attribute1_0.xsd:9: element attribute: Schemas parser error : attribute decl. 'bar': The attributes 'default' and 'fixed' are mutually exclusive.
+./test/schemas/src-attribute1_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attributes 'default' and 'fixed' are mutually exclusive.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-attribute2_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-attribute2_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-attribute2_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-attribute2_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'use': The value must be 'optional' if the attribute 'default' is present as well.
+./test/schemas/src-attribute2_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The value of the attribute 'use' must be 'optional' if the attribute 'default' is present.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-1_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-1_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-1_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-attribute3-1_0.xsd:9: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attributes 'ref' and 'name' are mutually exclusive.
+./test/schemas/src-attribute3-1_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'name' is not allowed.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-form_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-form_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-form_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-attribute3-2-form_0.xsd:10: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attribute 'form' is not allowed.
+./test/schemas/src-attribute3-2-form_0.xsd:10: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'form' is not allowed.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-st_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-st_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-st_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-attribute3-2-st_0.xsd:11: element simpleType: Schemas parser error : attribute use '{http://foo}bar': The content is not valid. Expected is (annotation?).
+./test/schemas/src-attribute3-2-st_0.xsd:11: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The content is not valid. Expected is (annotation?).

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-type_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-type_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-attribute3-2-type_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-attribute3-2-type_0.xsd:10: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attribute 'type' is not allowed.
+./test/schemas/src-attribute3-2-type_0.xsd:10: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'type' is not allowed.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-attribute4_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-attribute4_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-attribute4_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-attribute4_0.xsd:8: element simpleType: Schemas parser error : attribute decl. '{http://foo}bar': The attribute 'type' and the <simpleType> child are mutually exclusive.
+./test/schemas/src-attribute4_0.xsd:8: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'type' and the <simpleType> child are mutually exclusive.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-element1_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-element1_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-element1_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1 +1 @@
-./test/schemas/src-element1_0.xsd:7: element element: Schemas parser error : element decl. '{http://foo}foo': The attributes 'default' and 'fixed' are mutually exclusive.
+./test/schemas/src-element1_0.xsd:7: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive.

Modified: packages/libxml2/branches/upstream/current/result/schemas/src-element3_0_0.err
===================================================================
--- packages/libxml2/branches/upstream/current/result/schemas/src-element3_0_0.err	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/result/schemas/src-element3_0_0.err	2006-01-06 18:12:46 UTC (rev 501)
@@ -1,2 +1,2 @@
-./test/schemas/src-element3_0.xsd:8: element complexType: Schemas parser error : element decl. '{http://foo}foo': The attribute 'type' and the <complexType> child are mutually exclusive.
-./test/schemas/src-element3_0.xsd:16: element simpleType: Schemas parser error : element decl. '{http://foo}bar': The attribute 'type' and the <simpleType> child are mutually exclusive.
+./test/schemas/src-element3_0.xsd:8: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the <complexType> child are mutually exclusive.
+./test/schemas/src-element3_0.xsd:16: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the <simpleType> child are mutually exclusive.

Modified: packages/libxml2/branches/upstream/current/runsuite.c
===================================================================
--- packages/libxml2/branches/upstream/current/runsuite.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/runsuite.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -6,11 +6,16 @@
  * daniel at veillard.com
  */
 
+#ifdef HAVE_CONFIG_H
+#include "libxml.h"
+#else
+#include <stdio.h>
+#endif
+
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
 #endif
 #include <string.h>
-#include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -31,11 +36,16 @@
 
 #define LOGFILE "runsuite.log"
 static FILE *logfile = NULL;
-static int verbose = 0;
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
+static int verbose = 0;
+
+
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+
+#define vsnprintf _vsnprintf
+
+#define snprintf _snprintf
+
 #endif
 
 /************************************************************************
@@ -83,7 +93,6 @@
 static int nb_schematas = 0;
 static int nb_unimplemented = 0;
 static int nb_leaks = 0;
-static long libxmlMemoryAllocatedBase = 0;
 static int extraMemoryFromResolver = 0;
 
 static int
@@ -225,7 +234,6 @@
     xmlSchemaInitTypes();
     xmlRelaxNGInitTypes();
 #endif
-    libxmlMemoryAllocatedBase = xmlMemUsed();
 }
 
 static xmlNodePtr
@@ -931,9 +939,17 @@
 	}
 	instance = getNext(cur, "./ts:instanceTest[1]");
 	while (instance != NULL) {
-            xstcTestInstance(instance, schemas, path, base);
+	    if (schemas != NULL) {
+		xstcTestInstance(instance, schemas, path, base);		
+	    } else {
+		/*
+		* We'll automatically mark the instances as failed
+		* if the schema was broken.
+		*/
+		nb_errors++;
+	    }
 	    instance = getNext(instance,
-	                       "following-sibling::ts:instanceTest[1]");
+		"following-sibling::ts:instanceTest[1]");
 	}
     } else if (xmlStrEqual(validity, BAD_CAST "invalid")) {
         nb_schematas++;
@@ -1033,7 +1049,7 @@
 
 int
 main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
-    int res, ret = 0;
+    int ret = 0;
     int old_errors, old_tests, old_leaks;
 
     logfile = fopen(LOGFILE, "w");
@@ -1051,7 +1067,7 @@
     old_errors = nb_errors;
     old_tests = nb_tests;
     old_leaks = nb_leaks;
-    res = xsdTest();
+    xsdTest();
     if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
 	printf("Ran %d tests, no errors\n", nb_tests - old_tests);
     else
@@ -1062,7 +1078,7 @@
     old_errors = nb_errors;
     old_tests = nb_tests;
     old_leaks = nb_leaks;
-    res = rngTest1();
+    rngTest1();
     if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
 	printf("Ran %d tests, no errors\n", nb_tests - old_tests);
     else
@@ -1073,7 +1089,7 @@
     old_errors = nb_errors;
     old_tests = nb_tests;
     old_leaks = nb_leaks;
-    res = rngTest2();
+    rngTest2();
     if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
 	printf("Ran %d tests, no errors\n", nb_tests - old_tests);
     else
@@ -1086,8 +1102,7 @@
     old_leaks = nb_leaks;
     nb_internals = 0;
     nb_schematas = 0;
-    res = xstcMetadata(
-                 "xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet",
+    xstcMetadata("xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet",
 		 "xstc/Tests/Metadata/");
     if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
 	printf("Ran %d tests (%d schemata), no errors\n",
@@ -1104,8 +1119,7 @@
     old_leaks = nb_leaks;
     nb_internals = 0;
     nb_schematas = 0;
-    res = xstcMetadata(
-                 "xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet",
+    xstcMetadata("xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet",
 		 "xstc/Tests/");
     if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
 	printf("Ran %d tests (%d schemata), no errors\n",
@@ -1122,8 +1136,7 @@
     old_leaks = nb_leaks;
     nb_internals = 0;
     nb_schematas = 0;
-    res = xstcMetadata(
-                 "xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet",
+    xstcMetadata("xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet",
 		 "xstc/Tests/");
     if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
 	printf("Ran %d tests (%d schemata), no errors\n",

Modified: packages/libxml2/branches/upstream/current/runtest.c
===================================================================
--- packages/libxml2/branches/upstream/current/runtest.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/runtest.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -11,11 +11,16 @@
  * daniel at veillard.com
  */
 
+#ifdef HAVE_CONFIG_H
+#include "libxml.h"
+#else
+#include <stdio.h>
+#endif
+
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
 #endif
 #include <string.h>
-#include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -204,7 +209,6 @@
 static int nb_tests = 0;
 static int nb_errors = 0;
 static int nb_leaks = 0;
-static long libxmlMemoryAllocatedBase = 0;
 static int extraMemoryFromResolver = 0;
 
 static int
@@ -536,7 +540,6 @@
     xmlSchemaInitTypes();
     xmlRelaxNGInitTypes();
 #endif
-    libxmlMemoryAllocatedBase = xmlMemUsed();
 }
 
 
@@ -2926,14 +2929,15 @@
     unlink(temp);
     free(temp);
 
-    if (err != NULL) {
+    if ((ret != 0) && (err != NULL)) {
 	if (compareFileMem(err, testErrors, testErrorsSize)) {
 	    fprintf(stderr, "Error for %s on %s failed\n", filename, sch);
 	    ret = 1;
+	} else {
+	    ret = 0;
 	}
     }
 
-
     xmlSchemaFreeValidCtxt(ctxt);
     xmlFreeDoc(doc);
     return(ret);
@@ -3029,8 +3033,8 @@
 	    nb_tests++;
 	    ret = schemasOneTest(filename, instance, result, err,
 	                         options, schemas);
-	    if (res != 0)
-		ret = res;
+	    if (ret != 0)
+		res = ret;
 	}
     }
     globfree(&globbuf);

Modified: packages/libxml2/branches/upstream/current/schematron.c
===================================================================
--- packages/libxml2/branches/upstream/current/schematron.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/schematron.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -562,7 +562,7 @@
         xmlFreeDoc(schema->doc);
 
     if (schema->namespaces != NULL)
-        xmlFree(schema->namespaces);
+        xmlFree((char **) schema->namespaces);
     
     xmlSchematronFreeRules(schema->rules);
     xmlSchematronFreePatterns(schema->patterns);
@@ -709,7 +709,7 @@
         xmlXPathFreeContext(ctxt->xctxt);
     }
     if (ctxt->namespaces != NULL)
-        xmlFree(ctxt->namespaces);
+        xmlFree((char **) ctxt->namespaces);
     xmlDictFree(ctxt->dict);
     xmlFree(ctxt);
 }
@@ -809,7 +809,7 @@
         const xmlChar **tmp;
 
 	tmp = (const xmlChar **)
-	    xmlRealloc(ctxt->namespaces, ctxt->maxNamespaces * 4 *
+	    xmlRealloc((xmlChar **) ctxt->namespaces, ctxt->maxNamespaces * 4 *
 	               sizeof(const xmlChar *));
 	if (tmp == NULL) {
 	    xmlSchematronPErrMemory(NULL, "allocating parser namespaces",

Added: packages/libxml2/branches/upstream/current/test/HTML/53867.html
===================================================================
--- packages/libxml2/branches/upstream/current/test/HTML/53867.html	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/HTML/53867.html	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<style>
+.......
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+...............................................................
+</style>
+</head>
+</html>

Added: packages/libxml2/branches/upstream/current/test/XPath/docs/nodes
===================================================================
--- packages/libxml2/branches/upstream/current/test/XPath/docs/nodes	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/XPath/docs/nodes	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<root><foo>txt<!--hello--><![CDATA[data]]><?target data?><bar>txt<!--hello--><![CDATA[data]]><?target data?></bar></foo></root>
\ No newline at end of file

Added: packages/libxml2/branches/upstream/current/test/XPath/tests/nodespat
===================================================================
--- packages/libxml2/branches/upstream/current/test/XPath/tests/nodespat	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/XPath/tests/nodespat	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,5 @@
+/.
+//.
+/root//.
+//.//./././/.
+/root//././/bar//.
\ No newline at end of file

Added: packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
+  <SignedInfo>
+    <ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
+    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
+    <Reference URI="#ndid:1234-5678-0987">
+      <Transforms>
+        <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
+      </Transforms>
+      <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+      <DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue>
+    </Reference>
+  </SignedInfo>
+  <SignatureValue>...</SignatureValue>
+  <KeyInfo>
+    <X509Data>
+      <X509Certificate>...</X509Certificate>
+    </X509Data>
+  </KeyInfo>
+</Signature>

Added: packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xpath
===================================================================
--- packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xpath	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/c14n/exc-without-comments/test-2.xpath	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,6 @@
+<XPath xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+(//. | //@* | //namespace::*)
+[
+    ancestor-or-self::ds:SignedInfo
+] 
+</XPath>
\ No newline at end of file

Added: packages/libxml2/branches/upstream/current/test/ns7
===================================================================
--- packages/libxml2/branches/upstream/current/test/ns7	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/ns7	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1 @@
+<xml:test/>

Modified: packages/libxml2/branches/upstream/current/test/regexp/hard
===================================================================
--- packages/libxml2/branches/upstream/current/test/regexp/hard	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/regexp/hard	2006-01-06 18:12:46 UTC (rev 501)
@@ -5,3 +5,8 @@
 a0b
 aa0aaa
 b0aaa
+=>(\d{1,3}\.){3}\d{1,3}
+1.2.3.4
+1.22.333.44
+1.2.3
+1..2.3

Added: packages/libxml2/branches/upstream/current/test/schemas/bug321475_0.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/bug321475_0.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/bug321475_0.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<animation xmlns="http://www.collada.org/2005/11/COLLADASchema"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.collada.org/2005/11/COLLADASchema bug321475.xsd">
+    <asset/>
+    <source/>
+    <sampler/>
+    <channel/>
+</animation>
+

Added: packages/libxml2/branches/upstream/current/test/schemas/bug321475_1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/bug321475_1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/bug321475_1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xs:schema targetNamespace="http://www.collada.org/2005/11/COLLADASchema"
+    xmlns="http://www.collada.org/2005/11/COLLADASchema"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    elementFormDefault="qualified" version="1.4.0" xml:lang="EN">
+    <xs:element name="animation">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="asset" minOccurs="0"/>
+                <xs:choice>
+                    <xs:sequence>
+                        <xs:element ref="source" maxOccurs="unbounded"/>
+                        <xs:choice>
+                            <xs:sequence>
+                                <xs:element ref="sampler" maxOccurs="unbounded"/>
+                                <xs:element ref="channel" maxOccurs="unbounded"/>
+                                <xs:element ref="animation" minOccurs="0" maxOccurs="unbounded"/>
+                            </xs:sequence>
+                            <xs:element ref="animation" maxOccurs="unbounded"/>
+                        </xs:choice>
+                    </xs:sequence>
+                    <xs:sequence>
+                        <xs:element ref="sampler" maxOccurs="unbounded"/>
+                        <xs:element ref="channel" maxOccurs="unbounded"/>
+                        <xs:element ref="animation" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <xs:element ref="animation" maxOccurs="unbounded"/>
+                </xs:choice>
+                <xs:element ref="extra" minOccurs="0" maxOccurs="unbounded"/>
+            </xs:sequence>
+            <xs:attribute name="id" type="xs:ID"/>
+            <xs:attribute name="name" type="xs:NCName"/>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="extra"/>
+    <xs:element name="asset"/>
+    <xs:element name="channel"/>
+    <xs:element name="sampler"/>
+    <xs:element name="source"/>
+    <xs:element name="technique"/>
+</xs:schema>
+
+
+
+
+             
\ No newline at end of file

Added: packages/libxml2/branches/upstream/current/test/schemas/bug322411_0.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/bug322411_0.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/bug322411_0.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<ELEMENTS>
+  <ELEMENT>
+    <items>
+      <item>1</item>
+      <item>2</item>
+      <item>3</item>
+      <item>4</item>
+      <item>5</item>
+      <!-- Some dupls. -->
+      <item>dupl1</item>
+      <item>dupl2</item>
+      <item>dupl3</item>
+      <item>dupl4</item>
+      <item>dupl5</item>
+      <item>dupl6</item>
+      <item>dupl7</item>
+      <item>dupl8</item>
+      <item>dupl9</item>
+      <item>dupl10</item>
+      <item>dupl11</item>
+
+      <item>6</item>
+      <item>7</item>
+      <item>8</item>
+      <item>9</item>
+      <item>10</item>
+      <item>11</item>
+      <items>
+        <item>12</item>
+        <item>13</item>
+        <item>14</item>
+        <item>15</item>
+        <!-- Some dupls. -->
+        <item>dupl1</item>
+        <item>dupl2</item>
+        <item>dupl3</item>
+        <item>dupl4</item>
+        <item>dupl5</item>
+        <item>dupl6</item>
+        <item>dupl7</item>
+        <item>dupl8</item>
+        <item>dupl9</item>
+        <item>dupl10</item>
+        <item>dupl11</item>
+
+        <item>16</item>
+        <item>17</item>
+        <item>18</item>
+        <item>19</item>
+        <item>20</item>
+        <item>21</item>
+      </items>
+      <items>
+        <item>22</item>
+        <item>23</item>
+        <item>24</item>
+        <item>25</item>
+        <item>26</item>
+        <item>27</item>
+        <item>28</item>
+        <item>29</item>
+        <item>30</item>
+        <item>31</item>
+        <item>32</item>
+        <item>33</item>
+        <item>34</item>
+        <item>35</item>
+        <item>36</item>
+        <item>37</item>
+        <item>38</item>
+        <item>39</item>
+        <item>40</item>
+        <item>41</item>
+        <!-- Some dupls. -->
+        <item>dupl1</item>
+        <item>dupl2</item>
+        <item>dupl3</item>
+        <item>dupl4</item>
+        <item>dupl5</item>
+        <item>dupl6</item>
+        <item>dupl7</item>
+        <item>dupl8</item>
+        <item>dupl9</item>
+        <item>dupl10</item>
+        <item>dupl11</item>
+      </items>
+    </items>
+    <!-- Keyrefs. -->
+    <ref>41</ref>
+  </ELEMENT>
+</ELEMENTS>
+

Added: packages/libxml2/branches/upstream/current/test/schemas/bug322411_1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/bug322411_1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/bug322411_1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+  <xsd:element name="items">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="item" maxOccurs="unbounded" type="xsd:string"/>
+        <xsd:element ref="items" minOccurs="0" maxOccurs="2"/>
+      </xsd:sequence>
+    </xsd:complexType>
+    <xsd:unique name="ItemUnique">
+      <xsd:selector xpath="item"/>
+      <xsd:field xpath="."/>
+    </xsd:unique>
+  </xsd:element>
+
+  <xsd:element name="ELEMENTS">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="ELEMENT">
+          <xsd:complexType>
+            <xsd:sequence>
+              <xsd:element ref="items"/>
+              <xsd:element name="ref" type="xsd:string" maxOccurs="unbounded"/>
+            </xsd:sequence>
+          </xsd:complexType>
+          <xsd:keyref name="ItemRef" refer="ItemUnique">
+            <xsd:selector xpath="ref"/>
+            <xsd:field xpath="."/>
+          </xsd:keyref>
+        </xsd:element>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+</xsd:schema>

Added: packages/libxml2/branches/upstream/current/test/schemas/bug323510_0.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/bug323510_0.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/bug323510_0.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<foo/>
+

Added: packages/libxml2/branches/upstream/current/test/schemas/bug323510_1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/bug323510_1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/bug323510_1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+    <xs:element name="foo">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="bar" minOccurs="1" maxOccurs="unbounded"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+
+</xs:schema>              
\ No newline at end of file

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- test the values:
+	  -  BAD
+	  +  BAD
+	  1.
+	  .1
+	  0.
+	  .0
+	  - 1 BAD
+	  + 1 BAD
+	  .   BAD
+	  000  !
+	-->
+<foo
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:noNamespaceSchemaLocation="decimal-1.xsd">
+	<!-- The good ones. -->
+	<val> 0. </val>
+	<val> .0 </val>
+	<val> .10 </val>
+	<val> 01. </val>
+	<val> 000 </val>	
+	<val>123456789012345678</val>
+	<val>-123456789012345678</val>
+	<val>0.123456789012345678</val>
+	<val>-0.123456789012345678</val>
+	<!-- The bad ones. -->
+	<val>.</val>
+	<val>-</val>
+	<val>+</val>
+	<val>*</val>
+	<val>- 1</val>
+	<val>+ 1</val>
+	<val>+ 0</val>
+	<val>- 0</val>
+	<!--ref>0.0</ref-->	
+</foo>

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+	
+	<xsd:simpleType name="myDecimal">
+		<xsd:restriction base="xsd:decimal">			
+			<xsd:totalDigits value="18"/>			
+		</xsd:restriction>
+	</xsd:simpleType>
+
+	<xsd:element name="foo">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+				<xsd:element name="ref" type="myDecimal" minOccurs="0"/>
+			</xsd:sequence>
+		</xsd:complexType>
+
+		<!--xsd:key name="myKey">
+			<xsd:selector xpath="val"/>
+			<xsd:field xpath="."/>
+		</xsd:key>
+
+		<xsd:keyref name="myKeyRef" refer="myKey">
+			<xsd:selector xpath="ref"/>
+			<xsd:field xpath="."/>
+		</xsd:keyref-->
+	</xsd:element>
+
+</xsd:schema>

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-1_0.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-1_0.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-1_0.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<foo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="decimal-1.xsd">
+    <!-- The good ones. -->
+    <val> 0. </val>
+    <val> .0 </val>
+    <val> .10 </val>
+    <val> 01. </val>
+    <val> 000 </val>
+    <val>123456789012345678</val>
+    <val>-123456789012345678</val>
+    <val>0.123456789012345678</val>
+    <val>-0.123456789012345678</val>
+    <!-- The bad ones. -->
+    <val>.</val>
+    <val>-</val>
+    <val>+</val>
+    <val>*</val>
+    <val>- 1</val>
+    <val>+ 1</val>
+    <val>+ 0</val>
+    <val>- 0</val>
+</foo>

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-1_1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-1_1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-1_1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <xsd:simpleType name="myDecimal">
+        <xsd:restriction base="xsd:decimal">
+            <xsd:totalDigits value="18"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:element name="foo">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+            </xsd:sequence>
+        </xsd:complexType>
+
+    </xsd:element>
+
+</xsd:schema>

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-2_0.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-2_0.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-2_0.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<foo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="decimal-2.xsd">
+    <!-- The good ones. -->
+    <val>0.1</val>
+    <val>0.001</val>
+    <val>0.0</val>
+    <val>-0.0</val>
+    <val>1</val>
+    <!-- The bad ones. -->
+    <val>-0.1</val>
+    <val>-1</val>
+</foo>

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-2_1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-2_1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-2_1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <xsd:simpleType name="myDecimal">
+        <xsd:restriction base="xsd:decimal">
+            <xsd:minInclusive value="0"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:element name="foo">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+            </xsd:sequence>
+        </xsd:complexType>
+    </xsd:element>
+
+</xsd:schema>

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-3_0.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-3_0.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-3_0.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<foo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="decimal-3.xsd">
+    <!-- The good ones. -->
+    <val>0.12</val>
+    <val>0.0</val>
+    <val>0.02</val>
+    <val>12</val>
+    <val>1.2</val>
+    <!-- The bad ones. -->
+    <val>0.123</val>
+    <val>0.023</val>
+    <val>123</val>
+    <val>12.3</val>
+</foo>
+

Added: packages/libxml2/branches/upstream/current/test/schemas/decimal-3_1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/decimal-3_1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/decimal-3_1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <xsd:simpleType name="myDecimal">
+        <xsd:restriction base="xsd:decimal">
+            <xsd:totalDigits value="2"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:element name="foo">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+            </xsd:sequence>
+        </xsd:complexType>
+    </xsd:element>
+
+</xsd:schema>

Added: packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_0.xml
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_0.xml	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_0.xml	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<Foo
+	xmlns="urn:test:foo"
+	xmlns:foo="urn:test:foo"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="urn:test:foo idc-keyref_1.xsd">
+
+    <Def>
+        <Link foo:linkKey="L4"/>
+    </Def>
+
+    <Ref foo:linkRef="L4"/>
+
+</Foo> 
\ No newline at end of file

Added: packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_1.xsd
===================================================================
--- packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_1.xsd	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/test/schemas/idc-keyref-err1_1.xsd	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xs:schema
+    targetNamespace="urn:test:foo"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:foo="urn:test:foo"
+    elementFormDefault="qualified"
+    attributeFormDefault="qualified">
+  
+   <xs:element name="Link">
+       <xs:complexType>
+           <xs:simpleContent>
+               <xs:extension base="xs:string">
+                   <xs:attribute name="linkKey" type="xs:string" use="required"/>
+               </xs:extension>
+           </xs:simpleContent>
+       </xs:complexType>
+   </xs:element>
+      
+    
+  <!--  -->
+  <xs:element name="Foo">
+    <xs:complexType>
+      <xs:sequence>
+	          
+        <xs:element name="Def">
+            <xs:complexType>
+                <xs:sequence>
+                    <xs:element ref="foo:Link"/>
+                </xs:sequence>
+            </xs:complexType>
+        </xs:element>
+        
+        <xs:element name="Ref">
+            <xs:complexType>
+                <xs:attribute name="linkRef" use="required"/>
+            </xs:complexType>
+        </xs:element>
+
+      </xs:sequence>
+	</xs:complexType>      
+
+	<xs:key name="LinkKey">
+	  <xs:selector xpath=".//foo:Link | .//foo:Link"/>
+	  <xs:field xpath="@foo:linkKey"/>
+	</xs:key>
+
+	<xs:keyref name="LinkKeyRef" refer="foo:LinkKey">
+	  <xs:selector xpath=".//foo:Ref"/>
+	  <xs:field xpath="@foo:linkRef"/>
+	</xs:keyref>    
+  </xs:element>
+
+</xs:schema>
\ No newline at end of file

Modified: packages/libxml2/branches/upstream/current/testapi.c
===================================================================
--- packages/libxml2/branches/upstream/current/testapi.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/testapi.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -8,7 +8,12 @@
  * daniel at veillard.com
  */
 
+#ifdef HAVE_CONFIG_H
+#include "libxml.h"
+#else
 #include <stdio.h>
+#endif
+
 #include <string.h>
 #include <libxml/xmlerror.h>
 #include <libxml/relaxng.h>
@@ -278,7 +283,7 @@
 static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
     if (no == 0) return('a');
     if (no == 1) return(' ');
-    if (no == 2) return('ø');
+    if (no == 2) return((xmlChar) 'ø');
     return(0);
 }
 
@@ -291,7 +296,7 @@
     if (no == 0) return(0);
     if (no == 1) return(1);
     if (no == 2) return(122);
-    return(-1);
+    return((unsigned int) -1);
 }
 
 static void des_unsigned_int(int no ATTRIBUTE_UNUSED, unsigned int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
@@ -303,7 +308,7 @@
     if (no == 0) return(0);
     if (no == 1) return(1);
     if (no == 2) return(122);
-    return(-1);
+    return((unsigned long) -1);
 }
 
 static void des_unsigned_long(int no ATTRIBUTE_UNUSED, unsigned long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
@@ -689,6 +694,24 @@
 static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
 }
 
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+
+#define gen_nb_xmlExpCtxtPtr 1
+static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+    return(NULL);
+}
+static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlExpNodePtr 1
+static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+    return(NULL);
+}
+static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#endif
+
 #define gen_nb_xmlHashDeallocator 2
 static void 
 test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) {
@@ -2929,6 +2952,59 @@
 
 
 static int
+test_htmlDocDumpMemoryFormat(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+    int mem_base;
+    xmlDocPtr cur; /* the document */
+    int n_cur;
+    xmlChar ** mem; /* OUT: the memory pointer */
+    int n_mem;
+    int * size; /* OUT: the memory length */
+    int n_size;
+    int format; /* should formatting spaces been added */
+    int n_format;
+
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+    for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
+    for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
+    for (n_format = 0;n_format < gen_nb_int;n_format++) {
+        mem_base = xmlMemBlocks();
+        cur = gen_xmlDocPtr(n_cur, 0);
+        mem = gen_xmlChar_ptr_ptr(n_mem, 1);
+        size = gen_int_ptr(n_size, 2);
+        format = gen_int(n_format, 3);
+
+        htmlDocDumpMemoryFormat(cur, mem, size, format);
+        call_tests++;
+        des_xmlDocPtr(n_cur, cur, 0);
+        des_xmlChar_ptr_ptr(n_mem, mem, 1);
+        des_int_ptr(n_size, size, 2);
+        des_int(n_format, format, 3);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in htmlDocDumpMemoryFormat",
+	           xmlMemBlocks() - mem_base);
+	    test_ret++;
+            printf(" %d", n_cur);
+            printf(" %d", n_mem);
+            printf(" %d", n_size);
+            printf(" %d", n_format);
+            printf("\n");
+        }
+    }
+    }
+    }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
+static int
 test_htmlGetMetaEncoding(void) {
     int test_ret = 0;
 
@@ -3535,11 +3611,12 @@
 test_HTMLtree(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing HTMLtree : 17 of 17 functions ...\n");
+    if (quiet == 0) printf("Testing HTMLtree : 18 of 18 functions ...\n");
     test_ret += test_htmlDocContentDumpFormatOutput();
     test_ret += test_htmlDocContentDumpOutput();
     test_ret += test_htmlDocDump();
     test_ret += test_htmlDocDumpMemory();
+    test_ret += test_htmlDocDumpMemoryFormat();
     test_ret += test_htmlGetMetaEncoding();
     test_ret += test_htmlIsBooleanAttr();
     test_ret += test_htmlNewDoc();
@@ -16960,11 +17037,100 @@
     return(test_ret);
 }
 
+
 static int
+test_xmlStreamPushNode(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+    int mem_base;
+    int ret_val;
+    xmlStreamCtxtPtr stream; /* the stream context */
+    int n_stream;
+    xmlChar * name; /* the current name */
+    int n_name;
+    xmlChar * ns; /* the namespace name */
+    int n_ns;
+    int nodeType; /* the type of the node being pushed */
+    int n_nodeType;
+
+    for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+    for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
+    for (n_nodeType = 0;n_nodeType < gen_nb_int;n_nodeType++) {
+        mem_base = xmlMemBlocks();
+        stream = gen_xmlStreamCtxtPtr(n_stream, 0);
+        name = gen_const_xmlChar_ptr(n_name, 1);
+        ns = gen_const_xmlChar_ptr(n_ns, 2);
+        nodeType = gen_int(n_nodeType, 3);
+
+        ret_val = xmlStreamPushNode(stream, (const xmlChar *)name, (const xmlChar *)ns, nodeType);
+        desret_int(ret_val);
+        call_tests++;
+        des_xmlStreamCtxtPtr(n_stream, stream, 0);
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+        des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
+        des_int(n_nodeType, nodeType, 3);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlStreamPushNode",
+	           xmlMemBlocks() - mem_base);
+	    test_ret++;
+            printf(" %d", n_stream);
+            printf(" %d", n_name);
+            printf(" %d", n_ns);
+            printf(" %d", n_nodeType);
+            printf("\n");
+        }
+    }
+    }
+    }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
+static int
+test_xmlStreamWantsAnyNode(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+    int mem_base;
+    int ret_val;
+    xmlStreamCtxtPtr streamCtxt; /* the stream context */
+    int n_streamCtxt;
+
+    for (n_streamCtxt = 0;n_streamCtxt < gen_nb_xmlStreamCtxtPtr;n_streamCtxt++) {
+        mem_base = xmlMemBlocks();
+        streamCtxt = gen_xmlStreamCtxtPtr(n_streamCtxt, 0);
+
+        ret_val = xmlStreamWantsAnyNode(streamCtxt);
+        desret_int(ret_val);
+        call_tests++;
+        des_xmlStreamCtxtPtr(n_streamCtxt, streamCtxt, 0);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlStreamWantsAnyNode",
+	           xmlMemBlocks() - mem_base);
+	    test_ret++;
+            printf(" %d", n_streamCtxt);
+            printf("\n");
+        }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+static int
 test_pattern(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing pattern : 8 of 13 functions ...\n");
+    if (quiet == 0) printf("Testing pattern : 10 of 15 functions ...\n");
     test_ret += test_xmlPatternFromRoot();
     test_ret += test_xmlPatternGetStreamCtxt();
     test_ret += test_xmlPatternMatch();
@@ -16975,6 +17141,8 @@
     test_ret += test_xmlStreamPop();
     test_ret += test_xmlStreamPush();
     test_ret += test_xmlStreamPushAttr();
+    test_ret += test_xmlStreamPushNode();
+    test_ret += test_xmlStreamWantsAnyNode();
 
     if (test_ret != 0)
 	printf("Module pattern: %d errors\n", test_ret);
@@ -17757,6 +17925,7 @@
     return(test_ret);
 }
 
+#ifdef LIBXML_SCHEMATRON_ENABLED
 
 #define gen_nb_xmlSchematronPtr 1
 static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
@@ -17764,7 +17933,9 @@
 }
 static void des_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, xmlSchematronPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
 }
+#endif
 
+
 static int
 test_xmlSchematronNewValidCtxt(void) {
     int test_ret = 0;
@@ -17774,6 +17945,7 @@
     return(test_ret);
 }
 
+#ifdef LIBXML_SCHEMATRON_ENABLED
 
 #define gen_nb_xmlSchematronParserCtxtPtr 1
 static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
@@ -17781,7 +17953,9 @@
 }
 static void des_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
 }
+#endif
 
+
 static int
 test_xmlSchematronParse(void) {
     int test_ret = 0;
@@ -17791,6 +17965,7 @@
     return(test_ret);
 }
 
+#ifdef LIBXML_SCHEMATRON_ENABLED
 
 #define gen_nb_xmlSchematronValidCtxtPtr 1
 static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
@@ -17798,7 +17973,9 @@
 }
 static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
 }
+#endif
 
+
 static int
 test_xmlSchematronValidateDoc(void) {
     int test_ret = 0;
@@ -25337,28 +25514,28 @@
     int ret_val;
     xmlElementContent * ctree; /* an element content tree */
     int n_ctree;
-    xmlChar ** list; /* an array to store the list of child names */
-    int n_list;
+    xmlChar ** names; /* an array to store the list of child names */
+    int n_names;
     int * len; /* a pointer to the number of element in the list */
     int n_len;
     int max; /* the size of the array */
     int n_max;
 
     for (n_ctree = 0;n_ctree < gen_nb_xmlElementContent_ptr;n_ctree++) {
-    for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) {
+    for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) {
     for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
     for (n_max = 0;n_max < gen_nb_int;n_max++) {
         mem_base = xmlMemBlocks();
         ctree = gen_xmlElementContent_ptr(n_ctree, 0);
-        list = gen_const_xmlChar_ptr_ptr(n_list, 1);
+        names = gen_const_xmlChar_ptr_ptr(n_names, 1);
         len = gen_int_ptr(n_len, 2);
         max = gen_int(n_max, 3);
 
-        ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)list, len, max);
+        ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)names, len, max);
         desret_int(ret_val);
         call_tests++;
         des_xmlElementContent_ptr(n_ctree, ctree, 0);
-        des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 1);
+        des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 1);
         des_int_ptr(n_len, len, 2);
         des_int(n_max, max, 3);
         xmlResetLastError();
@@ -25367,7 +25544,7 @@
 	           xmlMemBlocks() - mem_base);
 	    test_ret++;
             printf(" %d", n_ctree);
-            printf(" %d", n_list);
+            printf(" %d", n_names);
             printf(" %d", n_len);
             printf(" %d", n_max);
             printf("\n");
@@ -27508,6 +27685,47 @@
 
 
 static int
+test_xmlOutputBufferCreateBuffer(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+    int mem_base;
+    xmlOutputBufferPtr ret_val;
+    xmlBufferPtr buffer; /* a xmlBufferPtr */
+    int n_buffer;
+    xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
+    int n_encoder;
+
+    for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
+    for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
+        mem_base = xmlMemBlocks();
+        buffer = gen_xmlBufferPtr(n_buffer, 0);
+        encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
+
+        ret_val = xmlOutputBufferCreateBuffer(buffer, encoder);
+        desret_xmlOutputBufferPtr(ret_val);
+        call_tests++;
+        des_xmlBufferPtr(n_buffer, buffer, 0);
+        des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlOutputBufferCreateBuffer",
+	           xmlMemBlocks() - mem_base);
+	    test_ret++;
+            printf(" %d", n_buffer);
+            printf(" %d", n_encoder);
+            printf("\n");
+        }
+    }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
+static int
 test_xmlOutputBufferCreateFd(void) {
     int test_ret = 0;
 
@@ -28215,7 +28433,7 @@
 test_xmlIO(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlIO : 38 of 47 functions ...\n");
+    if (quiet == 0) printf("Testing xmlIO : 39 of 48 functions ...\n");
     test_ret += test_xmlAllocOutputBuffer();
     test_ret += test_xmlAllocParserInputBuffer();
     test_ret += test_xmlCheckFilename();
@@ -28236,6 +28454,7 @@
     test_ret += test_xmlIOHTTPRead();
     test_ret += test_xmlNoNetExternalEntityLoader();
     test_ret += test_xmlNormalizeWindowsPath();
+    test_ret += test_xmlOutputBufferCreateBuffer();
     test_ret += test_xmlOutputBufferCreateFd();
     test_ret += test_xmlOutputBufferCreateFile();
     test_ret += test_xmlOutputBufferCreateFilename();
@@ -31629,8 +31848,66 @@
     return(test_ret);
 }
 
+#ifdef LIBXML_READER_ENABLED
 
+#define gen_nb_xmlSchemaValidCtxtPtr 1
+static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+    return(NULL);
+}
+static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
 static int
+test_xmlTextReaderSchemaValidateCtxt(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+    int mem_base;
+    int ret_val;
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+    int n_reader;
+    xmlSchemaValidCtxtPtr ctxt; /* the XML Schema validation context or NULL */
+    int n_ctxt;
+    int options; /* options (not used yet) */
+    int n_options;
+
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+    for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+    for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+        mem_base = xmlMemBlocks();
+        reader = gen_xmlTextReaderPtr(n_reader, 0);
+        ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 1);
+        options = gen_parseroptions(n_options, 2);
+
+        ret_val = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options);
+        desret_int(ret_val);
+        call_tests++;
+        des_xmlTextReaderPtr(n_reader, reader, 0);
+        des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 1);
+        des_parseroptions(n_options, options, 2);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlTextReaderSchemaValidateCtxt",
+	           xmlMemBlocks() - mem_base);
+	    test_ret++;
+            printf(" %d", n_reader);
+            printf(" %d", n_ctxt);
+            printf(" %d", n_options);
+            printf("\n");
+        }
+    }
+    }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
+static int
 test_xmlTextReaderSetErrorHandler(void) {
     int test_ret = 0;
 
@@ -31854,7 +32131,7 @@
 test_xmlreader(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlreader : 73 of 83 functions ...\n");
+    if (quiet == 0) printf("Testing xmlreader : 74 of 84 functions ...\n");
     test_ret += test_xmlNewTextReader();
     test_ret += test_xmlNewTextReaderFilename();
     test_ret += test_xmlReaderForDoc();
@@ -31923,6 +32200,7 @@
     test_ret += test_xmlTextReaderRelaxNGSetSchema();
     test_ret += test_xmlTextReaderRelaxNGValidate();
     test_ret += test_xmlTextReaderSchemaValidate();
+    test_ret += test_xmlTextReaderSchemaValidateCtxt();
     test_ret += test_xmlTextReaderSetErrorHandler();
     test_ret += test_xmlTextReaderSetParserProp();
     test_ret += test_xmlTextReaderSetSchema();
@@ -31935,17 +32213,7 @@
 	printf("Module xmlreader: %d errors\n", test_ret);
     return(test_ret);
 }
-#ifdef LIBXML_REGEXP_ENABLED
 
-#define gen_nb_xmlExpCtxtPtr 1
-static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-    return(NULL);
-}
-static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
-
 static int
 test_xmlExpCtxtNbCons(void) {
     int test_ret = 0;
@@ -32013,17 +32281,7 @@
     return(test_ret);
 }
 
-#ifdef LIBXML_REGEXP_ENABLED
 
-#define gen_nb_xmlExpNodePtr 1
-static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-    return(NULL);
-}
-static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
-
 static int
 test_xmlExpDump(void) {
     int test_ret = 0;
@@ -32084,27 +32342,27 @@
     int n_ctxt;
     xmlExpNodePtr exp; /* the expression */
     int n_exp;
-    xmlChar ** list; /* where to store the tokens */
-    int n_list;
+    xmlChar ** langList; /* where to store the tokens */
+    int n_langList;
     int len; /* the allocated lenght of @list */
     int n_len;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
     for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
-    for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) {
+    for (n_langList = 0;n_langList < gen_nb_const_xmlChar_ptr_ptr;n_langList++) {
     for (n_len = 0;n_len < gen_nb_int;n_len++) {
         mem_base = xmlMemBlocks();
         ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
         exp = gen_xmlExpNodePtr(n_exp, 1);
-        list = gen_const_xmlChar_ptr_ptr(n_list, 2);
+        langList = gen_const_xmlChar_ptr_ptr(n_langList, 2);
         len = gen_int(n_len, 3);
 
-        ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)list, len);
+        ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)langList, len);
         desret_int(ret_val);
         call_tests++;
         des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
         des_xmlExpNodePtr(n_exp, exp, 1);
-        des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 2);
+        des_const_xmlChar_ptr_ptr(n_langList, (const xmlChar **)langList, 2);
         des_int(n_len, len, 3);
         xmlResetLastError();
         if (mem_base != xmlMemBlocks()) {
@@ -32113,7 +32371,7 @@
 	    test_ret++;
             printf(" %d", n_ctxt);
             printf(" %d", n_exp);
-            printf(" %d", n_list);
+            printf(" %d", n_langList);
             printf(" %d", n_len);
             printf("\n");
         }
@@ -32139,27 +32397,27 @@
     int n_ctxt;
     xmlExpNodePtr exp; /* the expression */
     int n_exp;
-    xmlChar ** list; /* where to store the tokens */
-    int n_list;
+    xmlChar ** tokList; /* where to store the tokens */
+    int n_tokList;
     int len; /* the allocated lenght of @list */
     int n_len;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
     for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
-    for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) {
+    for (n_tokList = 0;n_tokList < gen_nb_const_xmlChar_ptr_ptr;n_tokList++) {
     for (n_len = 0;n_len < gen_nb_int;n_len++) {
         mem_base = xmlMemBlocks();
         ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
         exp = gen_xmlExpNodePtr(n_exp, 1);
-        list = gen_const_xmlChar_ptr_ptr(n_list, 2);
+        tokList = gen_const_xmlChar_ptr_ptr(n_tokList, 2);
         len = gen_int(n_len, 3);
 
-        ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)list, len);
+        ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)tokList, len);
         desret_int(ret_val);
         call_tests++;
         des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
         des_xmlExpNodePtr(n_exp, exp, 1);
-        des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 2);
+        des_const_xmlChar_ptr_ptr(n_tokList, (const xmlChar **)tokList, 2);
         des_int(n_len, len, 3);
         xmlResetLastError();
         if (mem_base != xmlMemBlocks()) {
@@ -32168,7 +32426,7 @@
 	    test_ret++;
             printf(" %d", n_ctxt);
             printf(" %d", n_exp);
-            printf(" %d", n_list);
+            printf(" %d", n_tokList);
             printf(" %d", n_len);
             printf("\n");
         }
@@ -32965,6 +33223,16 @@
 
 
 static int
+test_xmlSaveToBuffer(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
+static int
 test_xmlSaveToFd(void) {
     int test_ret = 0;
 
@@ -33028,12 +33296,13 @@
 test_xmlsave(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlsave : 4 of 9 functions ...\n");
+    if (quiet == 0) printf("Testing xmlsave : 4 of 10 functions ...\n");
     test_ret += test_xmlSaveClose();
     test_ret += test_xmlSaveDoc();
     test_ret += test_xmlSaveFlush();
     test_ret += test_xmlSaveSetAttrEscape();
     test_ret += test_xmlSaveSetEscape();
+    test_ret += test_xmlSaveToBuffer();
     test_ret += test_xmlSaveToFd();
     test_ret += test_xmlSaveToFilename();
     test_ret += test_xmlSaveTree();
@@ -33166,17 +33435,7 @@
     return(test_ret);
 }
 
-#ifdef LIBXML_SCHEMAS_ENABLED
 
-#define gen_nb_xmlSchemaValidCtxtPtr 1
-static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-    return(NULL);
-}
-static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
-
 static int
 test_xmlSchemaGetValidErrors(void) {
     int test_ret = 0;
@@ -33184,13 +33443,13 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* a XML-Schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
-    xmlSchemaValidityErrorFunc * err; /* the error function result */
+    xmlSchemaValidityErrorFunc * err; /*  */
     int n_err;
-    xmlSchemaValidityWarningFunc * warn; /* the warning function result */
+    xmlSchemaValidityWarningFunc * warn; /*  */
     int n_warn;
-    void ** ctx; /* the functions context result */
+    void ** ctx; /*  */
     int n_ctx;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
@@ -33239,7 +33498,7 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* the schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
@@ -33432,7 +33691,7 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaSAXPlugPtr plug; /* a data structure returned by xmlSchemaSAXPlug */
+    xmlSchemaSAXPlugPtr plug; /*  */
     int n_plug;
 
     for (n_plug = 0;n_plug < gen_nb_xmlSchemaSAXPlugPtr;n_plug++) {
@@ -33470,6 +33729,16 @@
 
 
 static int
+test_xmlSchemaSetParserStructuredErrors(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
+static int
 test_xmlSchemaSetValidErrors(void) {
     int test_ret = 0;
 
@@ -33486,9 +33755,9 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
-    int options; /* a combination of xmlSchemaValidOption */
+    int options; /*  */
     int n_options;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
@@ -33537,7 +33806,7 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
@@ -33571,29 +33840,29 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
-    xmlDocPtr doc; /* a parsed document tree */
-    int n_doc;
+    xmlDocPtr instance; /*  */
+    int n_instance;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
-    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+    for (n_instance = 0;n_instance < gen_nb_xmlDocPtr;n_instance++) {
         mem_base = xmlMemBlocks();
         ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
-        doc = gen_xmlDocPtr(n_doc, 1);
+        instance = gen_xmlDocPtr(n_instance, 1);
 
-        ret_val = xmlSchemaValidateDoc(ctxt, doc);
+        ret_val = xmlSchemaValidateDoc(ctxt, instance);
         desret_int(ret_val);
         call_tests++;
         des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
-        des_xmlDocPtr(n_doc, doc, 1);
+        des_xmlDocPtr(n_instance, instance, 1);
         xmlResetLastError();
         if (mem_base != xmlMemBlocks()) {
             printf("Leak of %d blocks found in xmlSchemaValidateDoc",
 	           xmlMemBlocks() - mem_base);
 	    test_ret++;
             printf(" %d", n_ctxt);
-            printf(" %d", n_doc);
+            printf(" %d", n_instance);
             printf("\n");
         }
     }
@@ -33612,11 +33881,11 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
-    const char * filename; /* the URI of the instance */
+    const char * filename; /*  */
     int n_filename;
-    int options; /* a future set of options, currently unused */
+    int options; /*  */
     int n_options;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
@@ -33660,9 +33929,9 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
-    xmlNodePtr elem; /* an element node */
+    xmlNodePtr elem; /*  */
     int n_elem;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
@@ -33701,15 +33970,15 @@
 #if defined(LIBXML_SCHEMAS_ENABLED)
     int mem_base;
     int ret_val;
-    xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+    xmlSchemaValidCtxtPtr ctxt; /*  */
     int n_ctxt;
-    xmlParserInputBufferPtr input; /* the input to use for reading the data */
+    xmlParserInputBufferPtr input; /*  */
     int n_input;
-    xmlCharEncoding enc; /* an optional encoding information */
+    xmlCharEncoding enc; /*  */
     int n_enc;
-    xmlSAXHandlerPtr sax; /* a SAX handler for the resulting events */
+    xmlSAXHandlerPtr sax; /*  */
     int n_sax;
-    void * user_data; /* the context to provide to the SAX handler. */
+    void * user_data; /*  */
     int n_user_data;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
@@ -33759,7 +34028,7 @@
 test_xmlschemas(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlschemas : 14 of 23 functions ...\n");
+    if (quiet == 0) printf("Testing xmlschemas : 14 of 24 functions ...\n");
     test_ret += test_xmlSchemaDump();
     test_ret += test_xmlSchemaGetParserErrors();
     test_ret += test_xmlSchemaGetValidErrors();
@@ -33772,6 +34041,7 @@
     test_ret += test_xmlSchemaSAXPlug();
     test_ret += test_xmlSchemaSAXUnplug();
     test_ret += test_xmlSchemaSetParserErrors();
+    test_ret += test_xmlSchemaSetParserStructuredErrors();
     test_ret += test_xmlSchemaSetValidErrors();
     test_ret += test_xmlSchemaSetValidOptions();
     test_ret += test_xmlSchemaSetValidStructuredErrors();
@@ -35579,7 +35849,7 @@
     int n_str1;
     xmlChar * str2; /* second xmlChar string */
     int n_str2;
-    int len; /* the len of @str2 */
+    int len; /* the len of @str2 or < 0 */
     int n_len;
 
     for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {

Modified: packages/libxml2/branches/upstream/current/tree.c
===================================================================
--- packages/libxml2/branches/upstream/current/tree.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/tree.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -2012,6 +2012,8 @@
     tmp = cur->parent->properties;
     if (tmp == cur) {
         cur->parent->properties = cur->next;
+		if (cur->next != NULL)
+			cur->next->prev = NULL;
 	xmlFreeProp(cur);
 	return(0);
     }
@@ -2831,6 +2833,14 @@
 	return(NULL);
     }
 
+    if (cur == elem) {
+#ifdef DEBUG_TREE
+        xmlGenericError(xmlGenericErrorContext,
+		"xmlAddNextSibling : cur == elem\n");
+#endif
+	return(NULL);
+    }
+
     xmlUnlinkNode(elem);
 
     if (elem->type == XML_TEXT_NODE) {
@@ -2854,12 +2864,16 @@
         /* check if an attribute with the same name exists */
 	xmlAttrPtr attr;
 
+		if (cur->type != XML_ATTRIBUTE_NODE)
+			return(NULL);
 	if (elem->ns == NULL)
-	    attr = xmlHasProp(cur->parent, elem->name);
+	    attr = xmlHasNsProp(cur->parent, elem->name, NULL);
 	else
 	    attr = xmlHasNsProp(cur->parent, elem->name, elem->ns->href);
-	if ((attr != NULL) && (attr != (xmlAttrPtr) elem)) {
+	/* elem has already been unlinked so can never be attr */
+	if ((attr != NULL) && (attr->type != XML_ATTRIBUTE_DECL)) {
 	    /* different instance, destroy it (attributes must be unique) */
+		xmlUnlinkNode((xmlNodePtr) attr);
 	    xmlFreeProp(attr);
 	}
     }
@@ -2911,6 +2925,14 @@
 	return(NULL);
     }
 
+    if (cur == elem) {
+#ifdef DEBUG_TREE
+        xmlGenericError(xmlGenericErrorContext,
+		"xmlAddPrevSibling : cur == elem\n");
+#endif
+	return(NULL);
+    }
+
     xmlUnlinkNode(elem);
 
     if (elem->type == XML_TEXT_NODE) {
@@ -2934,12 +2956,16 @@
         /* check if an attribute with the same name exists */
 	xmlAttrPtr attr;
 
+		if (cur->type != XML_ATTRIBUTE_NODE)
+			return(NULL);
 	if (elem->ns == NULL)
-	    attr = xmlHasProp(cur->parent, elem->name);
+	    attr = xmlHasNsProp(cur->parent, elem->name, NULL);
 	else
 	    attr = xmlHasNsProp(cur->parent, elem->name, elem->ns->href);
-	if ((attr != NULL) && (attr != (xmlAttrPtr) elem)) {
+	/* elem has already been unlinked so can never be attr */
+	if ((attr != NULL) && (attr->type != XML_ATTRIBUTE_DECL)) {
 	    /* different instance, destroy it (attributes must be unique) */
+		xmlUnlinkNode((xmlNodePtr) attr);
 	    xmlFreeProp(attr);
 	}
     }
@@ -3149,6 +3175,13 @@
 	return(NULL);
     }
 
+    if (parent == cur) {
+#ifdef DEBUG_TREE
+        xmlGenericError(xmlGenericErrorContext,
+		"xmlAddChild : parent == cur\n");
+#endif
+	return(NULL);
+    }
     /*
      * If cur is a TEXT node, merge its content with adjacent TEXT nodes
      * cur is then freed.
@@ -3156,8 +3189,7 @@
     if (cur->type == XML_TEXT_NODE) {
 	if ((parent->type == XML_TEXT_NODE) &&
 	    (parent->content != NULL) &&
-	    (parent->name == cur->name) &&
-	    (parent != cur)) {
+	    (parent->name == cur->name)) {
 	    xmlNodeAddContent(parent, cur->content);
 	    xmlFreeNode(cur);
 	    return(parent);
@@ -3196,6 +3228,8 @@
 	return(parent);
     }
     if (cur->type == XML_ATTRIBUTE_NODE) {
+		if (parent->type != XML_ELEMENT_NODE)
+			return(NULL);
 	if (parent->properties == NULL) {
 	    parent->properties = (xmlAttrPtr) cur;
 	} else {
@@ -3203,13 +3237,16 @@
 	    xmlAttrPtr lastattr;
 
 	    if (cur->ns == NULL)
-		lastattr = xmlHasProp(parent, cur->name);
+		lastattr = xmlHasNsProp(parent, cur->name, NULL);
 	    else
 		lastattr = xmlHasNsProp(parent, cur->name, cur->ns->href);
-	    if ((lastattr != NULL) && (lastattr != (xmlAttrPtr) cur)) {
+	    if ((lastattr != NULL) && (lastattr != (xmlAttrPtr) cur) && (lastattr->type != XML_ATTRIBUTE_DECL)) {
 		/* different instance, destroy it (attributes must be unique) */
+			xmlUnlinkNode((xmlNodePtr) lastattr);
 		xmlFreeProp(lastattr);
 	    }
+		if (lastattr == (xmlAttrPtr) cur)
+			return(cur);
 	    /* find the end */
 	    lastattr = parent->properties;
 	    while (lastattr->next != NULL) {
@@ -3575,22 +3612,16 @@
 
 static xmlNodePtr
 xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
-/**
- * xmlCopyProp:
- * @target:  the element where the attribute will be grafted
- * @cur:  the attribute
- *
- * Do a copy of the attribute.
- *
- * Returns: a new #xmlAttrPtr, or NULL in case of error.
- */
-xmlAttrPtr
-xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) {
+
+static xmlAttrPtr
+xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) {
     xmlAttrPtr ret;
 
     if (cur == NULL) return(NULL);
     if (target != NULL)
 	ret = xmlNewDocProp(target->doc, cur->name, NULL);
+    else if (doc != NULL)
+	ret = xmlNewDocProp(doc, cur->name, NULL);
     else if (cur->parent != NULL)
 	ret = xmlNewDocProp(cur->parent->doc, cur->name, NULL);
     else if (cur->children != NULL)
@@ -3679,6 +3710,20 @@
 }
 
 /**
+ * xmlCopyProp:
+ * @target:  the element where the attribute will be grafted
+ * @cur:  the attribute
+ *
+ * Do a copy of the attribute.
+ *
+ * Returns: a new #xmlAttrPtr, or NULL in case of error.
+ */
+xmlAttrPtr
+xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) {
+	return xmlCopyPropInternal(NULL, target, cur);
+}
+
+/**
  * xmlCopyPropList:
  * @target:  the element where the attributes will be grafted
  * @cur:  the first attribute
@@ -3746,7 +3791,7 @@
         case XML_XINCLUDE_END:
 	    break;
         case XML_ATTRIBUTE_NODE:
-	    return((xmlNodePtr) xmlCopyProp(parent, (xmlAttrPtr) node));
+		return((xmlNodePtr) xmlCopyPropInternal(doc, parent, (xmlAttrPtr) node));
         case XML_NAMESPACE_DECL:
 	    return((xmlNodePtr) xmlCopyNamespaceList((xmlNsPtr) node));
 	    
@@ -4861,8 +4906,8 @@
                                 xmlBufferCat(buffer, tmp->content);
                             break;
                         case XML_ENTITY_REF_NODE:
-			    xmlNodeBufGetContent(buffer, tmp->children);
-			    break;
+                            xmlNodeBufGetContent(buffer, tmp);
+                            break;
                         default:
                             break;
                     }
@@ -6258,7 +6303,7 @@
  */
 int
 xmlUnsetProp(xmlNodePtr node, const xmlChar *name) {
-    xmlAttrPtr prop, prev = NULL;;
+    xmlAttrPtr prop;
 
     if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL))
 	return(-1);
@@ -6270,7 +6315,6 @@
 	    xmlFreeProp(prop);
 	    return(0);
 	}
-	prev = prop;
 	prop = prop->next;
     }
     return(-1);
@@ -6287,7 +6331,7 @@
  */
 int
 xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) {
-    xmlAttrPtr prop, prev = NULL;;
+    xmlAttrPtr prop;
 
     if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL))
 	return(-1);
@@ -6303,7 +6347,6 @@
 	    xmlFreeProp(prop);
 	    return(0);
 	}
-	prev = prop;
 	prop = prop->next;
     }
     return(-1);

Modified: packages/libxml2/branches/upstream/current/uri.c
===================================================================
--- packages/libxml2/branches/upstream/current/uri.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/uri.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -2130,9 +2130,11 @@
     int ix;
     int pos = 0;
     int nbslash = 0;
+    int len;
     xmlURIPtr ref = NULL;
     xmlURIPtr bas = NULL;
     xmlChar *bptr, *uptr, *vptr;
+    int remove_path = 0;
 
     if ((URI == NULL) || (*URI == 0))
 	return NULL;
@@ -2173,63 +2175,101 @@
      * just return the URI
      */
     if ((ref->scheme != NULL) &&
-	  ((bas->scheme == NULL) ||
-	   xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme) ||
-	   xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server))) {
+	((bas->scheme == NULL) ||
+	 (xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme)) ||
+	 (xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)))) {
 	val = xmlStrdup (URI);
 	goto done;
     }
+    if (xmlStrEqual((xmlChar *)bas->path, (xmlChar *)ref->path)) {
+	val = xmlStrdup(BAD_CAST "");
+	goto done;
+    }
+    if (bas->path == NULL) {
+	val = xmlStrdup((xmlChar *)ref->path);
+	goto done;
+    }
+    if (ref->path == NULL) {
+        ref->path = (char *) "/";
+	remove_path = 1;
+    }
 
     /*
      * At this point (at last!) we can compare the two paths
      *
-     * First we compare the two strings and find where they first differ
+     * First we take care of the special case where either of the
+     * two path components may be missing (bug 316224)
      */
+    if (bas->path == NULL) {
+	if (ref->path != NULL) {
+	    uptr = (xmlChar *) ref->path;
+	    if (*uptr == '/')
+		uptr++;
+	    val = xmlStrdup(uptr);
+	}
+	goto done;
+    }
     bptr = (xmlChar *)bas->path;
-    if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/'))
-        pos += 2;
-    if ((*bptr == '.') && (bptr[1] == '/'))
-        bptr += 2;
-    else if ((*bptr == '/') && (ref->path[pos] != '/'))
-	bptr++;
-    while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
-	pos++;
-
-    if (bptr[pos] == ref->path[pos]) {
-	val = NULL;		/* if no differences, return NULL */
-	goto done;		/* (I can't imagine why anyone would do this) */
-    }
-
+    if (ref->path == NULL) {
+	for (ix = 0; bptr[ix] != 0; ix++) {
+	    if (bptr[ix] == '/')
+		nbslash++;
+	}
+	uptr = NULL;
+	len = 1;	/* this is for a string terminator only */
+    } else {
     /*
-     * In URI, "back up" to the last '/' encountered.  This will be the
-     * beginning of the "unique" suffix of URI
+     * Next we compare the two strings and find where they first differ
      */
-    ix = pos;
-    if ((ref->path[ix] == '/') && (ix > 0))
-	ix--;
-    for (; ix > 0; ix--) {
-	if (ref->path[ix] == '/')
-	    break;
-    }
-    if (ix == 0) {
-	uptr = (xmlChar *)ref->path;
-    } else {
-	ix++;
-	uptr = (xmlChar *)&ref->path[ix];
-    }
+	if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/'))
+            pos += 2;
+	if ((*bptr == '.') && (bptr[1] == '/'))
+            bptr += 2;
+	else if ((*bptr == '/') && (ref->path[pos] != '/'))
+	    bptr++;
+	while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
+	    pos++;
 
-    /*
-     * In base, count the number of '/' from the differing point
-     */
-    if (bptr[pos] != ref->path[pos]) {	/* check for trivial URI == base */
-	for (; bptr[ix] != 0; ix++) {
-	    if (bptr[ix] == '/')
-		nbslash++;
+	if (bptr[pos] == ref->path[pos]) {
+	    val = xmlStrdup(BAD_CAST "");
+	    goto done;		/* (I can't imagine why anyone would do this) */
 	}
+
+	/*
+	 * In URI, "back up" to the last '/' encountered.  This will be the
+	 * beginning of the "unique" suffix of URI
+	 */
+	ix = pos;
+	if ((ref->path[ix] == '/') && (ix > 0))
+	    ix--;
+	else if ((ref->path[ix] == 0) && (ix > 1) && (ref->path[ix - 1] == '/'))
+	    ix -= 2;
+	for (; ix > 0; ix--) {
+	    if (ref->path[ix] == '/')
+		break;
+	}
+	if (ix == 0) {
+	    uptr = (xmlChar *)ref->path;
+	} else {
+	    ix++;
+	    uptr = (xmlChar *)&ref->path[ix];
+	}
+
+	/*
+	 * In base, count the number of '/' from the differing point
+	 */
+	if (bptr[pos] != ref->path[pos]) {/* check for trivial URI == base */
+	    for (; bptr[ix] != 0; ix++) {
+		if (bptr[ix] == '/')
+		    nbslash++;
+	    }
+	}
+	len = xmlStrlen (uptr) + 1;
     }
-
+    
     if (nbslash == 0) {
-	val = xmlStrdup (uptr);
+	if (uptr != NULL)
+	    val = xmlStrdup (uptr);
 	goto done;
     }
 
@@ -2238,8 +2278,7 @@
      * length of the remainder of the URI, plus enough space
      * for the "../" groups, plus one for the terminator
      */
-    ix = xmlStrlen (uptr) + 1;
-    val = (xmlChar *) xmlMalloc (ix + 3 * nbslash);
+    val = (xmlChar *) xmlMalloc (len + 3 * nbslash);
     if (val == NULL) {
 	xmlGenericError(xmlGenericErrorContext,
 		"xmlBuildRelativeURI: out of memory\n");
@@ -2257,12 +2296,25 @@
     /*
      * Finish up with the end of the URI
      */
-    memcpy (vptr, uptr, ix);
+    if (uptr != NULL) {
+        if ((vptr > val) && (len > 0) &&
+	    (uptr[0] == '/') && (vptr[-1] == '/')) {
+	    memcpy (vptr, uptr + 1, len - 1);
+	    vptr[len - 2] = 0;
+	} else {
+	    memcpy (vptr, uptr, len);
+	    vptr[len - 1] = 0;
+	}
+    } else {
+	vptr[len - 1] = 0;
+    }
 
-  done:
+done:
     /*
      * Free the working variables
      */
+    if (remove_path != 0)
+        ref->path = NULL;
     if (ref != NULL)
 	xmlFreeURI (ref);
     if (bas != NULL)

Modified: packages/libxml2/branches/upstream/current/valid.c
===================================================================
--- packages/libxml2/branches/upstream/current/valid.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/valid.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -6760,7 +6760,7 @@
 /**
  * xmlValidGetPotentialChildren:
  * @ctree:  an element content tree
- * @list:  an array to store the list of child names
+ * @names:  an array to store the list of child names
  * @len:  a pointer to the number of element in the list
  * @max:  the size of the array
  *
@@ -6770,32 +6770,33 @@
  */
 
 int
-xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
+xmlValidGetPotentialChildren(xmlElementContent *ctree,
+                             const xmlChar **names,
                              int *len, int max) {
     int i;
 
-    if ((ctree == NULL) || (list == NULL) || (len == NULL))
+    if ((ctree == NULL) || (names == NULL) || (len == NULL))
         return(-1);
     if (*len >= max) return(*len);
 
     switch (ctree->type) {
 	case XML_ELEMENT_CONTENT_PCDATA: 
 	    for (i = 0; i < *len;i++)
-		if (xmlStrEqual(BAD_CAST "#PCDATA", list[i])) return(*len);
-	    list[(*len)++] = BAD_CAST "#PCDATA";
+		if (xmlStrEqual(BAD_CAST "#PCDATA", names[i])) return(*len);
+	    names[(*len)++] = BAD_CAST "#PCDATA";
 	    break;
 	case XML_ELEMENT_CONTENT_ELEMENT: 
 	    for (i = 0; i < *len;i++)
-		if (xmlStrEqual(ctree->name, list[i])) return(*len);
-	    list[(*len)++] = ctree->name;
+		if (xmlStrEqual(ctree->name, names[i])) return(*len);
+	    names[(*len)++] = ctree->name;
 	    break;
 	case XML_ELEMENT_CONTENT_SEQ: 
-	    xmlValidGetPotentialChildren(ctree->c1, list, len, max);
-	    xmlValidGetPotentialChildren(ctree->c2, list, len, max);
+	    xmlValidGetPotentialChildren(ctree->c1, names, len, max);
+	    xmlValidGetPotentialChildren(ctree->c2, names, len, max);
 	    break;
 	case XML_ELEMENT_CONTENT_OR:
-	    xmlValidGetPotentialChildren(ctree->c1, list, len, max);
-	    xmlValidGetPotentialChildren(ctree->c2, list, len, max);
+	    xmlValidGetPotentialChildren(ctree->c1, names, len, max);
+	    xmlValidGetPotentialChildren(ctree->c2, names, len, max);
 	    break;
    }
    

Modified: packages/libxml2/branches/upstream/current/vms/config.vms
===================================================================
--- packages/libxml2/branches/upstream/current/vms/config.vms	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/vms/config.vms	2006-01-06 18:12:46 UTC (rev 501)
@@ -151,15 +151,6 @@
 /* Define if you have the <zlib.h> header file.  */
 #undef HAVE_ZLIB_H
 
-/* Define if you have the inet library (-linet).  */
-#undef HAVE_LIBINET
-
-/* Define if you have the nsl library (-lnsl).  */
-#undef HAVE_LIBNSL
-
-/* Define if you have the socket library (-lsocket).  */
-#undef HAVE_LIBSOCKET
-
 /* Name of package */
 #undef PACKAGE
 

Modified: packages/libxml2/branches/upstream/current/win32/Makefile.mingw
===================================================================
--- packages/libxml2/branches/upstream/current/win32/Makefile.mingw	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/win32/Makefile.mingw	2006-01-06 18:12:46 UTC (rev 501)
@@ -126,6 +126,7 @@
 	$(XML_INTDIR)/relaxng.o\
 	$(XML_INTDIR)/SAX.o\
 	$(XML_INTDIR)/SAX2.o\
+	$(XML_INTDIR)/schematron.o\
 	$(XML_INTDIR)/threads.o\
 	$(XML_INTDIR)/tree.o\
 	$(XML_INTDIR)/uri.o\
@@ -172,6 +173,7 @@
 	$(XML_INTDIR_A)/relaxng.o\
 	$(XML_INTDIR_A)/SAX.o\
 	$(XML_INTDIR_A)/SAX2.o\
+	$(XML_INTDIR_A)/schematron.o\
 	$(XML_INTDIR_A)/threads.o\
 	$(XML_INTDIR_A)/tree.o\
 	$(XML_INTDIR_A)/uri.o\
@@ -209,7 +211,7 @@
 	$(BINDIR)/testSchemas.exe\
 	$(BINDIR)/testURI.exe\
 	$(BINDIR)/testXPath.exe\
-	$(BINDIR)/runtest.exe\
+	$(BINDIR)/runtest.exe\
 	$(BINDIR)/runsuite.exe
 ifeq ($(WITH_THREADS),yes)
 UTILS += $(BINDIR)/testThreadsWin32.exe

Added: packages/libxml2/branches/upstream/current/win32/Makefile.mingw.orig
===================================================================
--- packages/libxml2/branches/upstream/current/win32/Makefile.mingw.orig	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/win32/Makefile.mingw.orig	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,336 @@
+# Makefile for libxml2, specific for Windows, GCC (mingw) and GNU make.
+#
+# Take a look at the beginning and modify the variables to suit your 
+# environment. Having done that, you can do a
+#
+# nmake [all]     to build the libxml and the accompanying utilities.
+# nmake clean     to remove all compiler output files and return to a
+#                 clean state.
+# nmake rebuild   to rebuild everything from scratch. This basically does
+#                 a 'nmake clean' and then a 'nmake all'.
+# nmake install   to install the library and its header files.
+#
+# November 2002, Igor Zlatkovic <igor at zlatkovic.com>
+
+# There should never be a need to modify anything below this line.
+# ----------------------------------------------------------------
+
+AUTOCONF = .\config.mingw
+include $(AUTOCONF)
+
+# Names of various input and output components.
+XML_NAME = xml2
+XML_BASENAME = lib$(XML_NAME)
+XML_SO = $(XML_BASENAME).dll
+XML_IMP = $(XML_BASENAME).lib
+XML_A = $(XML_BASENAME).a
+
+# Place where we let the compiler put its output.
+BINDIR = bin.mingw
+XML_INTDIR = int.mingw
+XML_INTDIR_A = int.a.mingw
+UTILS_INTDIR = int.utils.mingw
+
+# The preprocessor and its options.
+CPP = gcc.exe -E
+CPPFLAGS += -I$(XML_SRCDIR)/include
+ifeq ($(WITH_THREADS),1)
+CPPFLAGS += -D_REENTRANT
+endif
+
+# The compiler and its options.
+CC = gcc.exe
+CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS
+CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX)
+ifneq ($(WITH_THREADS),no)
+CFLAGS += -D_REENTRANT
+endif
+ifeq ($(WITH_THREADS),yes) 
+CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
+endif
+ifeq ($(WITH_THREADS),ctls)
+CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
+endif
+ifeq ($(WITH_THREADS),native)
+CFLAGS += -DHAVE_WIN32_THREADS
+endif
+ifeq ($(WITH_THREADS),posix)
+CFLAGS += -DHAVE_PTHREAD_H
+endif
+ifeq ($(WITH_ZLIB),1)
+CFLAGS += -DHAVE_ZLIB_H
+endif
+
+# The linker and its options.
+LD = gcc.exe
+LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION)
+LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION)
+LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
+LIBS = 
+ifeq ($(WITH_FTP),1)
+CFLAGS += -D_WINSOCKAPI_
+LIBS += -lwsock32
+endif 
+ifeq ($(WITH_HTTP),1)
+CFLAGS += -D_WINSOCKAPI_
+LIBS += -lwsock32
+endif 
+ifeq ($(WITH_ICONV),1)
+LIBS += -liconv
+endif 
+ifeq ($(WITH_ZLIB),1)
+LIBS += -lzdll
+endif
+ifeq ($(WITH_THREADS),posix)
+LIBS += -lpthreadGC
+endif
+ifeq ($(WITH_MODULES),1)
+LIBS += -lkernel32
+endif
+
+# The archiver and its options.
+AR = ar.exe
+ARFLAGS = -r
+
+# Optimisation and debug symbols.
+ifeq ($(DEBUG),1)
+CFLAGS += -D_DEBUG -g
+LDFLAGS += 
+else
+CFLAGS += -DNDEBUG -O2 
+LDFLAGS += 
+endif
+
+
+# Libxml object files.
+XML_OBJS = $(XML_INTDIR)/c14n.o\
+	$(XML_INTDIR)/catalog.o\
+	$(XML_INTDIR)/chvalid.o\
+	$(XML_INTDIR)/debugXML.o\
+	$(XML_INTDIR)/dict.o\
+	$(XML_INTDIR)/DOCBparser.o\
+	$(XML_INTDIR)/encoding.o\
+	$(XML_INTDIR)/entities.o\
+	$(XML_INTDIR)/error.o\
+	$(XML_INTDIR)/globals.o\
+	$(XML_INTDIR)/hash.o\
+	$(XML_INTDIR)/HTMLparser.o\
+	$(XML_INTDIR)/HTMLtree.o\
+	$(XML_INTDIR)/legacy.o\
+	$(XML_INTDIR)/list.o\
+	$(XML_INTDIR)/nanoftp.o\
+	$(XML_INTDIR)/nanohttp.o\
+	$(XML_INTDIR)/parser.o\
+	$(XML_INTDIR)/parserInternals.o\
+	$(XML_INTDIR)/pattern.o\
+	$(XML_INTDIR)/relaxng.o\
+	$(XML_INTDIR)/SAX.o\
+	$(XML_INTDIR)/SAX2.o\
+	$(XML_INTDIR)/threads.o\
+	$(XML_INTDIR)/tree.o\
+	$(XML_INTDIR)/uri.o\
+	$(XML_INTDIR)/valid.o\
+	$(XML_INTDIR)/xinclude.o\
+	$(XML_INTDIR)/xlink.o\
+	$(XML_INTDIR)/xmlIO.o\
+	$(XML_INTDIR)/xmlmemory.o\
+	$(XML_INTDIR)/xmlreader.o\
+	$(XML_INTDIR)/xmlregexp.o\
+	$(XML_INTDIR)/xmlmodule.o\
+	$(XML_INTDIR)/xmlsave.o\
+	$(XML_INTDIR)/xmlschemas.o\
+	$(XML_INTDIR)/xmlschemastypes.o\
+	$(XML_INTDIR)/xmlunicode.o\
+	$(XML_INTDIR)/xmlwriter.o\
+	$(XML_INTDIR)/xpath.o\
+	$(XML_INTDIR)/xpointer.o\
+	$(XML_INTDIR)/xmlstring.o
+
+XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS)))
+
+# Static libxml object files.
+XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\
+	$(XML_INTDIR_A)/catalog.o\
+	$(XML_INTDIR_A)/chvalid.o\
+	$(XML_INTDIR_A)/debugXML.o\
+	$(XML_INTDIR_A)/dict.o\
+	$(XML_INTDIR_A)/DOCBparser.o\
+	$(XML_INTDIR_A)/encoding.o\
+	$(XML_INTDIR_A)/entities.o\
+	$(XML_INTDIR_A)/error.o\
+	$(XML_INTDIR_A)/globals.o\
+	$(XML_INTDIR_A)/hash.o\
+	$(XML_INTDIR_A)/HTMLparser.o\
+	$(XML_INTDIR_A)/HTMLtree.o\
+	$(XML_INTDIR_A)/legacy.o\
+	$(XML_INTDIR_A)/list.o\
+	$(XML_INTDIR_A)/nanoftp.o\
+	$(XML_INTDIR_A)/nanohttp.o\
+	$(XML_INTDIR_A)/parser.o\
+	$(XML_INTDIR_A)/parserInternals.o\
+	$(XML_INTDIR_A)/pattern.o\
+	$(XML_INTDIR_A)/relaxng.o\
+	$(XML_INTDIR_A)/SAX.o\
+	$(XML_INTDIR_A)/SAX2.o\
+	$(XML_INTDIR_A)/threads.o\
+	$(XML_INTDIR_A)/tree.o\
+	$(XML_INTDIR_A)/uri.o\
+	$(XML_INTDIR_A)/valid.o\
+	$(XML_INTDIR_A)/xinclude.o\
+	$(XML_INTDIR_A)/xlink.o\
+	$(XML_INTDIR_A)/xmlIO.o\
+	$(XML_INTDIR_A)/xmlmemory.o\
+	$(XML_INTDIR_A)/xmlreader.o\
+	$(XML_INTDIR_A)/xmlregexp.o\
+	$(XML_INTDIR_A)/xmlmodule.o\
+	$(XML_INTDIR_A)/xmlsave.o\
+	$(XML_INTDIR_A)/xmlschemas.o\
+	$(XML_INTDIR_A)/xmlschemastypes.o\
+	$(XML_INTDIR_A)/xmlunicode.o\
+	$(XML_INTDIR_A)/xmlwriter.o\
+	$(XML_INTDIR_A)/xpath.o\
+	$(XML_INTDIR_A)/xpointer.o\
+	$(XML_INTDIR_A)/xmlstring.o
+
+XML_SRCS_A = $(subst .o,.c,$(subst $(XML_INTDIR_A)/,$(XML_SRCDIR)/,$(XML_OBJS_A)))
+
+# Xmllint and friends executables.
+UTILS = $(BINDIR)/xmllint.exe\
+	$(BINDIR)/xmlcatalog.exe\
+	$(BINDIR)/testAutomata.exe\
+	$(BINDIR)/testC14N.exe\
+	$(BINDIR)/testDocbook.exe\
+	$(BINDIR)/testHTML.exe\
+	$(BINDIR)/testReader.exe\
+	$(BINDIR)/testRegexp.exe\
+	$(BINDIR)/testModule.exe\
+	$(BINDIR)/testRelax.exe\
+	$(BINDIR)/testSAX.exe\
+	$(BINDIR)/testSchemas.exe\
+	$(BINDIR)/testURI.exe\
+	$(BINDIR)/testXPath.exe\
+	$(BINDIR)/runtest.exe\
+	$(BINDIR)/runsuite.exe
+ifeq ($(WITH_THREADS),yes)
+UTILS += $(BINDIR)/testThreadsWin32.exe
+endif
+ifeq ($(WITH_THREADS),ctls) 
+UTILS += $(BINDIR)/testThreadsWin32.exe
+endif
+ifeq ($(WITH_THREADS),native)
+UTILS += $(BINDIR)/testThreadsWin32.exe
+endif
+ifeq ($(WITH_THREADS),posix)
+UTILS += $(BINDIR)/testThreads.exe
+endif
+
+all : dep libxml libxmla utils
+
+libxml : $(BINDIR)/$(XML_SO) 
+
+libxmla : $(BINDIR)/$(XML_A)
+
+utils : $(UTILS)
+
+clean :
+	cmd.exe /C if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR)
+	cmd.exe /C if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A)
+	cmd.exe /C if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR)
+	cmd.exe /C if exist $(BINDIR) rmdir /S /Q $(BINDIR)
+	cmd.exe /C if exist depends.mingw del depends.mingw
+
+distclean : clean
+	cmd.exe /C if exist config.* del config.*
+	cmd.exe /C if exist Makefile del Makefile
+
+rebuild : clean all
+
+install-libs : all
+	cmd.exe /C if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml
+	cmd.exe /C if not exist $(BINPREFIX) mkdir $(BINPREFIX)
+	cmd.exe /C if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)
+	cmd.exe /C copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml
+	cmd.exe /C copy $(BINDIR)\$(XML_SO) $(SOPREFIX)
+	cmd.exe /C copy $(BINDIR)\$(XML_A) $(LIBPREFIX)
+	cmd.exe /C copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)
+	cmd.exe /C copy $(BINDIR)\xml*.exe $(BINPREFIX)
+
+install : install-libs
+	cmd.exe /C copy $(BINDIR)\*.exe $(BINPREFIX)
+
+install-dist : install-libs
+	cmd.exe /C copy $(BINDIR)\xml*.exe $(BINPREFIX)
+
+# This is a target for me, to make a binary distribution. Not for the public use,
+# keep your hands off :-)
+BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION)
+BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32
+bindist : all
+	$(MAKE) PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)/bin install-dist
+	cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt
+
+
+# Creates the dependency file
+dep :
+	$(CC) $(CFLAGS) -M $(XML_SRCS) > depends.mingw
+
+
+# Makes the output directory.
+$(BINDIR) :
+	cmd.exe /C if not exist $(BINDIR) mkdir $(BINDIR)
+
+
+# Makes the libxml intermediate directory.
+$(XML_INTDIR) :
+	cmd.exe /C if not exist $(XML_INTDIR) mkdir $(XML_INTDIR)
+
+# Makes the static libxml intermediate directory.
+$(XML_INTDIR_A) :
+	cmd.exe /C if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A)
+
+# An implicit rule for libxml compilation.
+$(XML_INTDIR)/%.o : $(XML_SRCDIR)/%.c
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+# An implicit rule for static libxml compilation.
+$(XML_INTDIR_A)/%.o : $(XML_SRCDIR)/%.c
+	$(CC) $(CFLAGS) -DLIBXML_STATIC -o $@ -c $<
+
+
+# Compiles libxml source. Uses the implicit rule for commands.
+$(XML_OBJS) : $(XML_INTDIR)
+
+# Compiles static libxml source. Uses the implicit rule for commands.
+$(XML_OBJS_A) : $(XML_INTDIR_A) 
+
+# Creates the libxml shared object.
+XMLSO_LDFLAGS = $(LDFLAGS) -shared -Wl,--dll -Wl,--out-implib,$(BINDIR)/$(XML_IMP)
+$(BINDIR)/$(XML_SO) : $(BINDIR) $(XML_OBJS)
+	$(LD) $(XMLSO_LDFLAGS) -o $(BINDIR)/$(XML_SO) $(XML_OBJS) $(LIBS)
+
+# Creates the libxml archive.
+$(BINDIR)/$(XML_A) : $(BINDIR) $(XML_OBJS_A)
+	$(AR) $(ARFLAGS) $(BINDIR)\$(XML_A) $(XML_OBJS_A)
+
+
+# Makes the utils intermediate directory.
+$(UTILS_INTDIR) :
+	cmd.exe /C if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR)
+
+# An implicit rule for xmllint and friends.
+ifeq ($(STATIC),1)
+$(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c
+	$(CC) -DLIBXML_STATIC $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< 
+	$(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS) 
+else
+$(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c
+	$(CC) $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< 
+	$(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS) 
+endif
+
+# Builds xmllint and friends. Uses the implicit rule for commands.
+$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla
+
+# Source dependencies
+#-include depends.mingw
+

Added: packages/libxml2/branches/upstream/current/win32/Makefile.mingw.rej
===================================================================
--- packages/libxml2/branches/upstream/current/win32/Makefile.mingw.rej	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/win32/Makefile.mingw.rej	2006-01-06 18:12:46 UTC (rev 501)
@@ -0,0 +1,17 @@
+***************
+*** 209,215 ****
+  	$(BINDIR)/testSchemas.exe\
+  	$(BINDIR)/testURI.exe\
+  	$(BINDIR)/testXPath.exe\
+- 	$(BINDIR)/runtest.exe\
+  	$(BINDIR)/runsuite.exe
+  ifeq ($(WITH_THREADS),yes)
+  UTILS += $(BINDIR)/testThreadsWin32.exe
+--- 211,217 ----
+  	$(BINDIR)/testSchemas.exe\
+  	$(BINDIR)/testURI.exe\
+  	$(BINDIR)/testXPath.exe\
++ 	$(BINDIR)/runtest.exe\
+  	$(BINDIR)/runsuite.exe
+  ifeq ($(WITH_THREADS),yes)
+  UTILS += $(BINDIR)/testThreadsWin32.exe

Modified: packages/libxml2/branches/upstream/current/win32/configure.js
===================================================================
--- packages/libxml2/branches/upstream/current/win32/configure.js	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/win32/configure.js	2006-01-06 18:12:46 UTC (rev 501)
@@ -44,6 +44,7 @@
 var withZlib = false;
 var withDebug = true;
 var withMemDebug = false;
+var withRunDebug = false;
 var withSchemas = true;
 var withSchematron = true;
 var withRegExps = true;
@@ -126,6 +127,7 @@
 	txt += "  zlib:       Enable zlib support (" + (withZlib? "yes" : "no")  + ")\n";
 	txt += "  xml_debug:  Enable XML debbugging module (" + (withDebug? "yes" : "no")  + ")\n";
 	txt += "  mem_debug:  Enable memory debugger (" + (withMemDebug? "yes" : "no")  + ")\n";
+	txt += "  run_debug:  Enable memory debugger (" + (withRunDebug? "yes" : "no")  + ")\n";
 	txt += "  regexps:    Enable regular expressions (" + (withRegExps? "yes" : "no") + ")\n";
 	txt += "  modules:    Enable module support (" + (withModules? "yes" : "no") + ")\n";
 	txt += "  tree:       Enable tree api (" + (withTree? "yes" : "no") + ")\n";
@@ -233,6 +235,7 @@
 	vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
 	vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0"));
 	vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
+	vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0"));
 	vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0"));
 	vf.WriteLine("WITH_SCHEMATRON=" + (withSchematron? "1" : "0"));
 	vf.WriteLine("WITH_REGEXPS=" + (withRegExps? "1" : "0"));
@@ -321,6 +324,8 @@
 			of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0"));
 		} else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
 			of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
+		} else if (s.search(/\@WITH_RUN_DEBUG\@/) != -1) {
+			of.WriteLine(s.replace(/\@WITH_RUN_DEBUG\@/, withRunDebug? "1" : "0"));
 		} else if (s.search(/\@WITH_SCHEMAS\@/) != -1) {
 			of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0"));
 		} else if (s.search(/\@WITH_SCHEMATRON\@/) != -1) {
@@ -462,6 +467,8 @@
 			withDebug = strToBool(arg.substring(opt.length + 1, arg.length));
 		else if (opt == "mem_debug")
 			withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length));
+		else if (opt == "run_debug")
+			withRunDebug = strToBool(arg.substring(opt.length + 1, arg.length));
 		else if (opt == "schemas")
 			withSchemas = strToBool(arg.substring(opt.length + 1, arg.length));
 		else if (opt == "schematron")
@@ -634,6 +641,7 @@
 txtOut += "      zlib support: " + boolToStr(withZlib) + "\n";
 txtOut += "  Debugging module: " + boolToStr(withDebug) + "\n";
 txtOut += "  Memory debugging: " + boolToStr(withMemDebug) + "\n";
+txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n";
 txtOut += "    Regexp support: " + boolToStr(withRegExps) + "\n";
 txtOut += "    Module support: " + boolToStr(withModules) + "\n";
 txtOut += "      Tree support: " + boolToStr(withTree) + "\n";

Modified: packages/libxml2/branches/upstream/current/win32/libxml2.def.src
===================================================================
--- packages/libxml2/branches/upstream/current/win32/libxml2.def.src	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/win32/libxml2.def.src	2006-01-06 18:12:46 UTC (rev 501)
@@ -290,6 +290,9 @@
 htmlDocDumpMemory
 #endif
 #ifdef LIBXML_HTML_ENABLED
+htmlDocDumpMemoryFormat
+#endif
+#ifdef LIBXML_HTML_ENABLED
 htmlElementAllowedHere
 #endif
 #ifdef LIBXML_HTML_ENABLED
@@ -1270,6 +1273,7 @@
 xmlNormalizeURIPath
 xmlNormalizeWindowsPath
 xmlOutputBufferClose
+xmlOutputBufferCreateBuffer
 xmlOutputBufferCreateFd
 xmlOutputBufferCreateFile
 xmlOutputBufferCreateFilename
@@ -1580,6 +1584,7 @@
 xmlSaveFormatFileTo
 xmlSaveSetAttrEscape
 xmlSaveSetEscape
+xmlSaveToBuffer
 xmlSaveToFd
 xmlSaveToFilename
 xmlSaveToIO
@@ -1697,6 +1702,9 @@
 xmlSchemaSetParserErrors
 #endif
 #ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSetParserStructuredErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
 xmlSchemaSetValidErrors
 #endif
 #ifdef LIBXML_SCHEMAS_ENABLED
@@ -1930,6 +1938,7 @@
 xmlTextReaderRelaxNGValidate
 #endif
 xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
 xmlTextReaderSetErrorHandler
 xmlTextReaderSetParserProp
 xmlTextReaderSetSchema

Modified: packages/libxml2/branches/upstream/current/xmlIO.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlIO.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlIO.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -610,10 +610,12 @@
  */
 static int
 xmlFdWrite (void * context, const char * buffer, int len) {
-    int ret;
+    int ret = 0;
 
-    ret = write((int) (long) context, &buffer[0], len);
-    if (ret < 0) xmlIOErr(0, "write()");
+    if (len > 0) {
+	ret = write((int) (long) context, &buffer[0], len);
+	if (ret < 0) xmlIOErr(0, "write()");
+    }
     return(ret);
 }
 #endif /* LIBXML_OUTPUT_ENABLED */
@@ -860,6 +862,28 @@
     return(ret);
 }
 
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlBufferWrite:
+ * @context:  the xmlBuffer
+ * @buffer:  the data to write
+ * @len:  number of bytes to write
+ *
+ * Write @len bytes from @buffer to the xml buffer
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlBufferWrite (void * context, const char * buffer, int len) {
+    int ret;
+
+    ret = xmlBufferAdd((xmlBufferPtr) context, (const xmlChar *) buffer, len);
+    if (ret != 0)
+        return(-1);
+    return(len);
+}
+#endif
+
 #ifdef HAVE_ZLIB_H
 /************************************************************************
  *									*
@@ -2436,6 +2460,31 @@
 
     return(ret);
 }
+
+/**
+ * xmlOutputBufferCreateBuffer:
+ * @buffer:  a xmlBufferPtr
+ * @encoder:  the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving to a xmlBuffer
+ *
+ * Returns the new parser output or NULL
+ */
+xmlOutputBufferPtr
+xmlOutputBufferCreateBuffer(xmlBufferPtr buffer,
+                            xmlCharEncodingHandlerPtr encoder) {
+    xmlOutputBufferPtr ret;
+
+    if (buffer == NULL) return(NULL);
+
+    ret = xmlOutputBufferCreateIO((xmlOutputWriteCallback)
+                                  xmlBufferWrite,
+                                  (xmlOutputCloseCallback)
+                                  NULL, (void *) buffer, encoder);
+
+    return(ret);
+}
+
 #endif /* LIBXML_OUTPUT_ENABLED */
 
 /**

Modified: packages/libxml2/branches/upstream/current/xmlmodule.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlmodule.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlmodule.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -195,6 +195,10 @@
 #include <dlfcn.h>
 #endif
 
+#ifndef RTLD_GLOBAL            /* For Tru64 UNIX 4.0 */
+#define RTLD_GLOBAL 0
+#endif
+
 /**
  * xmlModulePlatformOpen:
  * @name: path to the module
@@ -277,10 +281,7 @@
     int rc;
 
     errno = 0;
-    rc = shl_findsym(handle, name, TYPE_PROCEDURE, symbol);
-    if ((-1 == rc) && (0 == errno)) {
-        rc = shl_findsym(handle, name, TYPE_DATA, symbol);
-    }
+    rc = shl_findsym(&handle, name, TYPE_UNDEFINED, symbol);
     return rc;
 }
 

Modified: packages/libxml2/branches/upstream/current/xmlreader.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlreader.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlreader.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -131,12 +131,13 @@
     /* Handling of RelaxNG validation */
     xmlRelaxNGPtr          rngSchemas;	/* The Relax NG schemas */
     xmlRelaxNGValidCtxtPtr rngValidCtxt;/* The Relax NG validation context */
-    int                  rngValidErrors;/* The number of errors detected */
+    int                    rngValidErrors;/* The number of errors detected */
     xmlNodePtr             rngFullNode;	/* the node if RNG not progressive */
     /* Handling of Schemas validation */
     xmlSchemaPtr          xsdSchemas;	/* The Schemas schemas */
     xmlSchemaValidCtxtPtr xsdValidCtxt;/* The Schemas validation context */
-    int                  xsdValidErrors;/* The number of errors detected */
+    int                   xsdPreserveCtxt; /* 1 if the context was provided by the user */
+    int                   xsdValidErrors;/* The number of errors detected */
     xmlSchemaSAXPlugPtr   xsdPlug;	/* the schemas plug in SAX pipeline */
 #endif
 #ifdef LIBXML_XINCLUDE_ENABLED
@@ -1200,8 +1201,14 @@
        case XML_CDATA_SECTION_NODE:
            xmlBufferCat(buffer, node->content);
            break;
-       case XML_ELEMENT_NODE:
-           xmlBufferCat(buffer, xmlTextReaderCollectSiblings(node->children));
+       case XML_ELEMENT_NODE: {
+           xmlChar *tmp;
+
+	   tmp = xmlTextReaderCollectSiblings(node->children);
+           xmlBufferCat(buffer, tmp);
+	   xmlFree(tmp);
+	   break;
+       }
        default:
            break;
        }
@@ -1619,6 +1626,7 @@
     return(xmlTextReaderRead(reader));
 }
 
+#ifdef LIBXML_WRITER_ENABLED
 /**
  * xmlTextReaderReadInnerXml:
  * @reader:  the xmlTextReaderPtr used
@@ -1657,9 +1665,14 @@
         xmlBufferFree(buff2);
     }
     resbuf = buff->content;
+    buff->content = NULL;
+
+    xmlBufferFree(buff);
     return resbuf;
 }
+#endif
 
+#ifdef LIBXML_WRITER_ENABLED
 /**
  * xmlTextReaderReadOuterXml:
  * @reader:  the xmlTextReaderPtr used
@@ -1698,6 +1711,7 @@
     xmlBufferFree(buff);
     return resbuf;
 }
+#endif
 
 /**
  * xmlTextReaderReadString:
@@ -2141,7 +2155,8 @@
 	reader->xsdPlug = NULL;
     }
     if (reader->xsdValidCtxt != NULL) {
-	xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+	if (! reader->xsdPreserveCtxt)
+	    xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
 	reader->xsdValidCtxt = NULL;
     }
     if (reader->xsdSchemas != NULL) {
@@ -4086,15 +4101,17 @@
 	    reader->xsdPlug = NULL;
 	}
         if (reader->xsdValidCtxt != NULL) {
-	    xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
-	    reader->xsdValidCtxt = NULL;
+	    if (! reader->xsdPreserveCtxt)
+		xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+	    reader->xsdValidCtxt = NULL;	    
         }
+	reader->xsdPreserveCtxt = 0;
         if (reader->xsdSchemas != NULL) {
 	    xmlSchemaFree(reader->xsdSchemas);
 	    reader->xsdSchemas = NULL;
-	}
+	}	
 	return(0);
-    }
+    }    
     if (reader->mode != XML_TEXTREADER_MODE_INITIAL)
 	return(-1);
     if (reader->xsdPlug != NULL) {
@@ -4102,9 +4119,11 @@
 	reader->xsdPlug = NULL;
     }
     if (reader->xsdValidCtxt != NULL) {
-	xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+	if (! reader->xsdPreserveCtxt)
+	    xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);	
 	reader->xsdValidCtxt = NULL;
     }
+    reader->xsdPreserveCtxt = 0;
     if (reader->xsdSchemas != NULL) {
 	xmlSchemaFree(reader->xsdSchemas);
 	reader->xsdSchemas = NULL;
@@ -4221,82 +4240,107 @@
 }
 
 /**
- * xmlTextReaderSchemaValidate:
+ * xmlTextReaderSchemaValidateInternal:
  * @reader:  the xmlTextReaderPtr used
  * @xsd:  the path to a W3C XSD schema or NULL
+ * @ctxt: the XML Schema validation context or NULL
+ * @options: options (not used yet)
  *
- * Use W3C XSD schema to validate the document as it is processed.
+ * Validate the document as it is processed using XML Schema.
  * Activation is only possible before the first Read().
- * if @xsd is NULL, then RelaxNG validation is desactivated.
+ * If both @xsd and @ctxt are NULL then XML Schema validation is deactivated.
  *
- * Returns 0 in case the schemas validation could be (des)activated and
+ * Returns 0 in case the schemas validation could be (de)activated and
  *         -1 in case of error.
  */
-int
-xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) {
-    xmlSchemaParserCtxtPtr ctxt;
-
+static int
+xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader,
+				    const char *xsd,
+				    xmlSchemaValidCtxtPtr ctxt,
+				    int options ATTRIBUTE_UNUSED)
+{    
     if (reader == NULL)
         return(-1);
-    
-    if (xsd == NULL) {
-	if (reader->xsdPlug != NULL) {
-	    xmlSchemaSAXUnplug(reader->xsdPlug);
-	    reader->xsdPlug = NULL;
-	}
-        if (reader->xsdSchemas != NULL) {
-	    xmlSchemaFree(reader->xsdSchemas);
-	    reader->xsdSchemas = NULL;
-	}
-        if (reader->xsdValidCtxt != NULL) {
-	    xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
-	    reader->xsdValidCtxt = NULL;
-        }
-	return(0);
-    }
-    if ((reader->mode != XML_TEXTREADER_MODE_INITIAL) ||
-        (reader->ctxt == NULL))
+
+    if ((xsd != NULL) && (ctxt != NULL))
 	return(-1);
+
+    if (((xsd != NULL) || (ctxt != NULL)) &&
+	((reader->mode != XML_TEXTREADER_MODE_INITIAL) ||
+        (reader->ctxt == NULL)))
+	return(-1);
+        
+    /* Cleanup previous validation stuff. */
     if (reader->xsdPlug != NULL) {
 	xmlSchemaSAXUnplug(reader->xsdPlug);
 	reader->xsdPlug = NULL;
     }
     if (reader->xsdValidCtxt != NULL) {
-	xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+	if (! reader->xsdPreserveCtxt)
+	    xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);	
 	reader->xsdValidCtxt = NULL;
     }
+    reader->xsdPreserveCtxt = 0;
     if (reader->xsdSchemas != NULL) {
 	xmlSchemaFree(reader->xsdSchemas);
 	reader->xsdSchemas = NULL;
+    }    
+
+    if ((xsd == NULL) && (ctxt == NULL)) {
+	/* We just want to deactivate the validation, so get out. */
+	return(0);
+    }    
+    
+    if (xsd != NULL) {
+	xmlSchemaParserCtxtPtr pctxt;
+	/* Parse the schema and create validation environment. */
+	pctxt = xmlSchemaNewParserCtxt(xsd);
+	if (reader->errorFunc != NULL) {
+	    xmlSchemaSetParserErrors(pctxt,
+		xmlTextReaderValidityErrorRelay,
+		xmlTextReaderValidityWarningRelay,
+		reader);
+	}
+	reader->xsdSchemas = xmlSchemaParse(pctxt);
+	xmlSchemaFreeParserCtxt(pctxt);
+	if (reader->xsdSchemas == NULL)
+	    return(-1);
+	reader->xsdValidCtxt = xmlSchemaNewValidCtxt(reader->xsdSchemas);
+	if (reader->xsdValidCtxt == NULL) {
+	    xmlSchemaFree(reader->xsdSchemas);
+	    reader->xsdSchemas = NULL;
+	    return(-1);
+	}
+	reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt,
+	    &(reader->ctxt->sax),
+	    &(reader->ctxt->userData));
+	if (reader->xsdPlug == NULL) {
+	    xmlSchemaFree(reader->xsdSchemas);
+	    reader->xsdSchemas = NULL;
+	    xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+	    reader->xsdValidCtxt = NULL;
+	    return(-1);
+	}
+    } else {
+	/* Use the given validation context. */	
+	reader->xsdValidCtxt = ctxt;
+	reader->xsdPreserveCtxt = 1;
+	reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt,
+	    &(reader->ctxt->sax),
+	    &(reader->ctxt->userData));
+	if (reader->xsdPlug == NULL) {	    
+	    reader->xsdValidCtxt = NULL;
+	    reader->xsdPreserveCtxt = 0;
+	    return(-1);
+	}
     }
-    ctxt = xmlSchemaNewParserCtxt(xsd);
+    /*
+    * Redirect the validation context's error channels to use
+    * the reader channels.
+    * TODO: In case the user provides the validation context we
+    *   could make this redirection optional.
+    */
     if (reader->errorFunc != NULL) {
-	xmlSchemaSetParserErrors(ctxt,
-			 xmlTextReaderValidityErrorRelay,
-			 xmlTextReaderValidityWarningRelay,
-			 reader);
-    }
-    reader->xsdSchemas = xmlSchemaParse(ctxt);
-    xmlSchemaFreeParserCtxt(ctxt);
-    if (reader->xsdSchemas == NULL)
-        return(-1);
-    reader->xsdValidCtxt = xmlSchemaNewValidCtxt(reader->xsdSchemas);
-    if (reader->xsdValidCtxt == NULL) {
-	xmlSchemaFree(reader->xsdSchemas);
-	reader->xsdSchemas = NULL;
-        return(-1);
-    }
-    reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt,
-                                       &(reader->ctxt->sax),
-				       &(reader->ctxt->userData));
-    if (reader->xsdPlug == NULL) {
-	xmlSchemaFree(reader->xsdSchemas);
-	reader->xsdSchemas = NULL;
-	xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
-	reader->xsdValidCtxt = NULL;
-	return(-1);
-    }
-    if (reader->errorFunc != NULL) {
 	xmlSchemaSetValidErrors(reader->xsdValidCtxt,
 			 xmlTextReaderValidityErrorRelay,
 			 xmlTextReaderValidityWarningRelay,
@@ -4311,6 +4355,45 @@
     reader->validate = XML_TEXTREADER_VALIDATE_XSD;
     return(0);
 }
+
+/**
+ * xmlTextReaderSchemaValidateCtxt:
+ * @reader:  the xmlTextReaderPtr used
+ * @ctxt: the XML Schema validation context or NULL
+ * @options: options (not used yet)
+ *
+ * Use W3C XSD schema context to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * If @ctxt is NULL, then XML Schema validation is deactivated.
+ *
+ * Returns 0 in case the schemas validation could be (de)activated and
+ *         -1 in case of error.
+ */
+int
+xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
+				    xmlSchemaValidCtxtPtr ctxt,
+				    int options)
+{
+    return(xmlTextReaderSchemaValidateInternal(reader, NULL, ctxt, options));
+}
+
+/**
+ * xmlTextReaderSchemaValidate:
+ * @reader:  the xmlTextReaderPtr used
+ * @xsd:  the path to a W3C XSD schema or NULL
+ *
+ * Use W3C XSD schema to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * If @xsd is NULL, then XML Schema validation is deactivated.
+ *
+ * Returns 0 in case the schemas validation could be (de)activated and
+ *         -1 in case of error.
+ */
+int
+xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd)
+{
+    return(xmlTextReaderSchemaValidateInternal(reader, xsd, NULL, 0));
+}
 #endif
 
 /**

Modified: packages/libxml2/branches/upstream/current/xmlregexp.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlregexp.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlregexp.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -42,6 +42,8 @@
 /* #define DEBUG_PUSH */
 /* #define DEBUG_COMPACTION */
 
+#define MAX_PUSH 10000000
+
 #define ERROR(str)							\
     ctxt->error = XML_REGEXP_COMPILE_ERROR;				\
     xmlRegexpErrCompile(ctxt, str);
@@ -73,20 +75,20 @@
     XML_REGEXP_EPSILON = 1,
     XML_REGEXP_CHARVAL,
     XML_REGEXP_RANGES,
-    XML_REGEXP_SUBREG,
+    XML_REGEXP_SUBREG,  /* used for () sub regexps */
     XML_REGEXP_STRING,
     XML_REGEXP_ANYCHAR, /* . */
     XML_REGEXP_ANYSPACE, /* \s */
     XML_REGEXP_NOTSPACE, /* \S */
     XML_REGEXP_INITNAME, /* \l */
-    XML_REGEXP_NOTINITNAME, /* \l */
+    XML_REGEXP_NOTINITNAME, /* \L */
     XML_REGEXP_NAMECHAR, /* \c */
     XML_REGEXP_NOTNAMECHAR, /* \C */
     XML_REGEXP_DECIMAL, /* \d */
-    XML_REGEXP_NOTDECIMAL, /* \d */
+    XML_REGEXP_NOTDECIMAL, /* \D */
     XML_REGEXP_REALCHAR, /* \w */
-    XML_REGEXP_NOTREALCHAR, /* \w */
-    XML_REGEXP_LETTER,
+    XML_REGEXP_NOTREALCHAR, /* \W */
+    XML_REGEXP_LETTER = 100,
     XML_REGEXP_LETTER_UPPERCASE,
     XML_REGEXP_LETTER_LOWERCASE,
     XML_REGEXP_LETTER_TITLECASE,
@@ -201,6 +203,7 @@
     int to;
     int counter;
     int count;
+    int nd;
 };
 
 struct _xmlAutomataState {
@@ -326,6 +329,7 @@
     xmlRegStatePtr errState;    /* the error state */
     xmlChar *errString;		/* the string raising the error */
     int *errCounts;		/* counters at the error state */
+    int nbPush;
 };
 
 #define REGEXP_ALL_COUNTER	0x123456
@@ -335,6 +339,9 @@
 static void xmlRegFreeState(xmlRegStatePtr state);
 static void xmlRegFreeAtom(xmlRegAtomPtr atom);
 static int xmlRegStrEqualWildcard(const xmlChar *expStr, const xmlChar *valStr);
+static int xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint);
+static int xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint,
+                  int neg, int start, int end, const xmlChar *blockName);
 
 /************************************************************************
  *									*
@@ -417,6 +424,9 @@
     ret->nbCounters = ctxt->nbCounters;
     ret->counters = ctxt->counters;
     ret->determinist = ctxt->determinist;
+    if (ret->determinist == -1) {
+        xmlRegexpIsDeterminist(ret);
+    }
 
     if ((ret->determinist != 0) &&
 	(ret->nbCounters == 0) &&
@@ -569,7 +579,6 @@
 			       i, j, trans->atom->no, trans->to, atomno, targetno);
 			printf("       previous to is %d\n", prev);
 #endif
-			ret->determinist = 0;
 			if (transdata != NULL)
 			    xmlFree(transdata);
 			xmlFree(transitions);
@@ -1016,6 +1025,12 @@
 	fprintf(output, "removed\n");
 	return;
     }
+    if (trans->nd != 0) {
+	if (trans->nd == 2)
+	    fprintf(output, "last not determinist, ");
+	else
+	    fprintf(output, "not determinist, ");
+    }
     if (trans->counter >= 0) {
 	fprintf(output, "counted %d, ", trans->counter);
     }
@@ -1235,7 +1250,7 @@
 static void 
 xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
 	            xmlRegAtomPtr atom, xmlRegStatePtr target,
-		    int counter, int count, int nchk) {
+		    int counter, int count) {
 
     int nrtrans;
 
@@ -1253,19 +1268,17 @@
      * so, silently ignore this request.
      */
 
-    if (nchk == 0) {
-	for (nrtrans = state->nbTrans - 1; nrtrans >= 0; nrtrans--) {
-	    xmlRegTransPtr trans = &(state->trans[nrtrans]);
-	    if ((trans->atom == atom) &&
-		(trans->to == target->no) &&
-		(trans->counter == counter) &&
-		(trans->count == count)) {
+    for (nrtrans = state->nbTrans - 1; nrtrans >= 0; nrtrans--) {
+	xmlRegTransPtr trans = &(state->trans[nrtrans]);
+	if ((trans->atom == atom) &&
+	    (trans->to == target->no) &&
+	    (trans->counter == counter) &&
+	    (trans->count == count)) {
 #ifdef DEBUG_REGEXP_GRAPH
-		printf("Ignoring duplicate transition from %d to %d\n",
-			state->no, target->no);
+	    printf("Ignoring duplicate transition from %d to %d\n",
+		    state->no, target->no);
 #endif
-		return;
-	    }
+	    return;
 	}
     }
 
@@ -1308,6 +1321,7 @@
     state->trans[state->nbTrans].to = target->no;
     state->trans[state->nbTrans].counter = counter;
     state->trans[state->nbTrans].count = count;
+    state->trans[state->nbTrans].nd = 0;
     state->nbTrans++;
     xmlRegStateAddTransTo(ctxt, target, state->no);
 }
@@ -1359,9 +1373,9 @@
 	ctxt->state = to;
     }
     if (lax)
-	xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER, 0);
+	xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER);
     else
-	xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER, 0);
+	xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER);
 }
 
 /**
@@ -1379,7 +1393,7 @@
 	xmlRegStatePush(ctxt, to);
 	ctxt->state = to;
     }
-    xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1, 0);
+    xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1);
 }
 
 /**
@@ -1398,7 +1412,7 @@
 	xmlRegStatePush(ctxt, to);
 	ctxt->state = to;
     }
-    xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1, 0);
+    xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1);
 }
 
 /**
@@ -1417,7 +1431,7 @@
 	xmlRegStatePush(ctxt, to);
 	ctxt->state = to;
     }
-    xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter, 0);
+    xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter);
 }
 
 /**
@@ -1450,6 +1464,14 @@
 	     * Generate an epsilon transition to link to the target
 	     */
 	    xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
+#ifdef DV
+	} else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) && 
+		   (atom->quant != XML_REGEXP_QUANT_ONCE)) {
+	    to = xmlRegNewState(ctxt);
+	    xmlRegStatePush(ctxt, to);
+	    ctxt->state = to;
+	    xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
+#endif
 	}
 	switch (atom->quant) {
 	    case XML_REGEXP_QUANT_OPT:
@@ -1504,8 +1526,8 @@
 		} else {
 		    newstate = xmlRegNewState(ctxt);
 		    xmlRegStatePush(ctxt, newstate);
-		    ctxt->state = newstate;
 		}
+		ctxt->state = newstate;
 		xmlFAGenerateCountedTransition(ctxt, atom->stop,
 			                       newstate, counter);
 	    }
@@ -1513,7 +1535,8 @@
 		break;
 	}
 	return(0);
-    } else if ((atom->min == 0) && (atom->max == 0) &&
+    } 
+    if ((atom->min == 0) && (atom->max == 0) &&
                (atom->quant == XML_REGEXP_QUANT_RANGE)) {
         /*
 	 * we can discard the atom and generate an epsilon transition instead
@@ -1530,21 +1553,20 @@
 	ctxt->state = to;
 	xmlRegFreeAtom(atom);
 	return(0);
-    } else {
-	if (to == NULL) {
-	    to = xmlRegNewState(ctxt);
-	    if (to != NULL)
-		xmlRegStatePush(ctxt, to);
-	    else {
-		return(-1);
-	    }
-	}
-	if (xmlRegAtomPush(ctxt, atom) < 0) {
+    }
+    if (to == NULL) {
+	to = xmlRegNewState(ctxt);
+	if (to != NULL)
+	    xmlRegStatePush(ctxt, to);
+	else {
 	    return(-1);
 	}
-	xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1, 0);
-	ctxt->state = to;
     }
+    if (xmlRegAtomPush(ctxt, atom) < 0) {
+	return(-1);
+    }
+    xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1);
+    ctxt->state = to;
     switch (atom->quant) {
 	case XML_REGEXP_QUANT_OPT:
 	    atom->quant = XML_REGEXP_QUANT_ONCE;
@@ -1553,11 +1575,11 @@
 	case XML_REGEXP_QUANT_MULT:
 	    atom->quant = XML_REGEXP_QUANT_ONCE;
 	    xmlFAGenerateEpsilonTransition(ctxt, from, to);
-	    xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1, 0);
+	    xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
 	    break;
 	case XML_REGEXP_QUANT_PLUS:
 	    atom->quant = XML_REGEXP_QUANT_ONCE;
-	    xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1, 0);
+	    xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
 	    break;
 	default:
 	    break;
@@ -1614,7 +1636,7 @@
 
 		    xmlRegStateAddTrans(ctxt, from, NULL,
 					ctxt->states[newto], 
-					-1, to->trans[transnr].count, 0);
+					-1, to->trans[transnr].count);
 		} else {
 #ifdef DEBUG_REGEXP_GRAPH
 		    printf("Found epsilon trans %d from %d to %d\n",
@@ -1637,10 +1659,10 @@
 	    if (to->trans[transnr].counter >= 0) {
 		xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, 
 				    ctxt->states[newto], 
-				    to->trans[transnr].counter, -1, 1);
+				    to->trans[transnr].counter, -1);
 	    } else {
 		xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, 
-				    ctxt->states[newto], counter, -1, 1);
+				    ctxt->states[newto], counter, -1);
 	    }
 	}
     }
@@ -1869,12 +1891,175 @@
 
 }
 
+static int
+xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) {
+    int ret = 0;
+
+    if ((range1->type == XML_REGEXP_RANGES) ||
+        (range2->type == XML_REGEXP_RANGES) ||
+        (range2->type == XML_REGEXP_SUBREG) ||
+        (range1->type == XML_REGEXP_SUBREG) ||
+        (range1->type == XML_REGEXP_STRING) ||
+        (range2->type == XML_REGEXP_STRING))
+	return(-1);
+
+    /* put them in order */
+    if (range1->type > range2->type) {
+        xmlRegRangePtr tmp;
+
+	tmp = range1;
+	range1 = range2;
+	range2 = tmp;
+    }
+    if ((range1->type == XML_REGEXP_ANYCHAR) ||
+        (range2->type == XML_REGEXP_ANYCHAR)) {
+	ret = 1;
+    } else if ((range1->type == XML_REGEXP_EPSILON) ||
+               (range2->type == XML_REGEXP_EPSILON)) {
+	return(0);
+    } else if (range1->type == range2->type) {
+        if ((range1->type != XML_REGEXP_CHARVAL) ||
+	    (range1->end < range2->start) ||
+	    (range2->end < range1->start))
+	    ret = 1;
+	else
+	    ret = 0;
+    } else if (range1->type == XML_REGEXP_CHARVAL) {
+        int codepoint;
+	int neg = 0;
+
+	/*
+	 * just check all codepoints in the range for acceptance,
+	 * this is usually way cheaper since done only once at
+	 * compilation than testing over and over at runtime or 
+	 * pushing too many states when evaluating.
+	 */
+	if (((range1->neg == 0) && (range2->neg != 0)) ||
+	    ((range1->neg != 0) && (range2->neg == 0)))
+	    neg = 1;
+
+	for (codepoint = range1->start;codepoint <= range1->end ;codepoint++) {
+	    ret = xmlRegCheckCharacterRange(range2->type, codepoint,
+					    0, range2->start, range2->end,
+					    range2->blockName);
+	    if (ret < 0)
+	        return(-1);
+	    if (((neg == 1) && (ret == 0)) ||
+	        ((neg == 0) && (ret == 1)))
+		return(1);
+	}
+	return(0);
+    } else if ((range1->type == XML_REGEXP_BLOCK_NAME) ||
+               (range2->type == XML_REGEXP_BLOCK_NAME)) {
+	if (range1->type == range2->type) {
+	    ret = xmlStrEqual(range1->blockName, range2->blockName);
+	} else {
+	    /*
+	     * comparing a block range with anything else is way
+	     * too costly, and maintining the table is like too much
+	     * memory too, so let's force the automata to save state
+	     * here.
+	     */
+	    return(1);
+	}
+    } else if ((range1->type < XML_REGEXP_LETTER) ||
+               (range2->type < XML_REGEXP_LETTER)) {
+	if ((range1->type == XML_REGEXP_ANYSPACE) &&
+	    (range2->type == XML_REGEXP_NOTSPACE))
+	    ret = 0;
+	else if ((range1->type == XML_REGEXP_INITNAME) &&
+	         (range2->type == XML_REGEXP_NOTINITNAME))
+	    ret = 0;
+	else if ((range1->type == XML_REGEXP_NAMECHAR) &&
+	         (range2->type == XML_REGEXP_NOTNAMECHAR))
+	    ret = 0;
+	else if ((range1->type == XML_REGEXP_DECIMAL) &&
+	         (range2->type == XML_REGEXP_NOTDECIMAL))
+	    ret = 0;
+	else if ((range1->type == XML_REGEXP_REALCHAR) &&
+	         (range2->type == XML_REGEXP_NOTREALCHAR))
+	    ret = 0;
+	else {
+	    /* same thing to limit complexity */
+	    return(1);
+	}
+    } else {
+        ret = 0;
+        /* range1->type < range2->type here */
+        switch (range1->type) {
+	    case XML_REGEXP_LETTER:
+	         /* all disjoint except in the subgroups */
+	         if ((range2->type == XML_REGEXP_LETTER_UPPERCASE) ||
+		     (range2->type == XML_REGEXP_LETTER_LOWERCASE) ||
+		     (range2->type == XML_REGEXP_LETTER_TITLECASE) ||
+		     (range2->type == XML_REGEXP_LETTER_MODIFIER) ||
+		     (range2->type == XML_REGEXP_LETTER_OTHERS))
+		     ret = 1;
+		 break;
+	    case XML_REGEXP_MARK:
+	         if ((range2->type == XML_REGEXP_MARK_NONSPACING) ||
+		     (range2->type == XML_REGEXP_MARK_SPACECOMBINING) ||
+		     (range2->type == XML_REGEXP_MARK_ENCLOSING))
+		     ret = 1;
+		 break;
+	    case XML_REGEXP_NUMBER:
+	         if ((range2->type == XML_REGEXP_NUMBER_DECIMAL) ||
+		     (range2->type == XML_REGEXP_NUMBER_LETTER) ||
+		     (range2->type == XML_REGEXP_NUMBER_OTHERS))
+		     ret = 1;
+		 break;
+	    case XML_REGEXP_PUNCT:
+	         if ((range2->type == XML_REGEXP_PUNCT_CONNECTOR) ||
+		     (range2->type == XML_REGEXP_PUNCT_DASH) ||
+		     (range2->type == XML_REGEXP_PUNCT_OPEN) ||
+		     (range2->type == XML_REGEXP_PUNCT_CLOSE) ||
+		     (range2->type == XML_REGEXP_PUNCT_INITQUOTE) ||
+		     (range2->type == XML_REGEXP_PUNCT_FINQUOTE) ||
+		     (range2->type == XML_REGEXP_PUNCT_OTHERS))
+		     ret = 1;
+		 break;
+	    case XML_REGEXP_SEPAR:
+	         if ((range2->type == XML_REGEXP_SEPAR_SPACE) ||
+		     (range2->type == XML_REGEXP_SEPAR_LINE) ||
+		     (range2->type == XML_REGEXP_SEPAR_PARA))
+		     ret = 1;
+		 break;
+	    case XML_REGEXP_SYMBOL:
+	         if ((range2->type == XML_REGEXP_SYMBOL_MATH) ||
+		     (range2->type == XML_REGEXP_SYMBOL_CURRENCY) ||
+		     (range2->type == XML_REGEXP_SYMBOL_MODIFIER) ||
+		     (range2->type == XML_REGEXP_SYMBOL_OTHERS))
+		     ret = 1;
+		 break;
+	    case XML_REGEXP_OTHER:
+	         if ((range2->type == XML_REGEXP_OTHER_CONTROL) ||
+		     (range2->type == XML_REGEXP_OTHER_FORMAT) ||
+		     (range2->type == XML_REGEXP_OTHER_PRIVATE))
+		     ret = 1;
+		 break;
+            default:
+	         if ((range2->type >= XML_REGEXP_LETTER) &&
+		     (range2->type < XML_REGEXP_BLOCK_NAME))
+		     ret = 0;
+		 else {
+		     /* safety net ! */
+		     return(1);
+		 }
+	}
+    }
+    if (((range1->neg == 0) && (range2->neg != 0)) ||
+        ((range1->neg != 0) && (range2->neg == 0)))
+	ret = !ret;
+    return(1);
+}
+
 /**
  * xmlFACompareAtoms:
  * @atom1:  an atom
  * @atom2:  an atom
  *
- * Compares two atoms to check whether they are equivalents
+ * Compares two atoms to check whether they intersect in some ways,
+ * this is used by xmlFAComputesDeterminism only
  *
  * Returns 1 if yes and 0 otherwise
  */
@@ -1887,28 +2072,65 @@
     if ((atom1 == NULL) || (atom2 == NULL))
 	return(0);
 
-    if (atom1->type != atom2->type)
+    if ((atom1->type == XML_REGEXP_RANGES) &&
+        (atom2->type == XML_REGEXP_CHARVAL)) {
+    } else if ((atom1->type == XML_REGEXP_CHARVAL) &&
+	       (atom2->type == XML_REGEXP_RANGES)) {
+	xmlRegAtomPtr tmp;
+	tmp = atom1;
+	atom1 = atom2;
+	atom2 = tmp;
+    } else if (atom1->type != atom2->type) {
 	return(0);
+    }
     switch (atom1->type) {
         case XML_REGEXP_STRING:
 	    ret = xmlRegStrEqualWildcard((xmlChar *)atom1->valuep,
 	                                 (xmlChar *)atom2->valuep);
 	    break;
         case XML_REGEXP_EPSILON:
-	    return(1);
+	    goto not_determinist;
         case XML_REGEXP_CHARVAL:
-	    ret = atom1->codepoint == atom2->codepoint;
+	    ret = (atom1->codepoint == atom2->codepoint);
 	    break;
         case XML_REGEXP_RANGES:
-	    TODO;
-	    return(0);
+	    if (atom2->type == XML_REGEXP_CHARVAL) {
+	        ret = xmlRegCheckCharacter(atom1, atom2->codepoint);
+		if (ret < 0)
+		    return(-1);
+		break;
+	    } else {
+	        int i, j, res;
+		xmlRegRangePtr r1, r2;
+
+		/*
+		 * need to check that none of the ranges eventually matches
+		 */
+		for (i = 0;i < atom1->nbRanges;i++) {
+		    for (j = 0;j < atom2->nbRanges;j++) {
+			r1 = atom1->ranges[i];
+			r2 = atom2->ranges[j];
+			res = xmlFACompareRanges(r1, r2);
+			if (res == 1) {
+			    ret = 1;
+			    goto done;
+			}
+		    }
+		}
+		ret = 0;
+	    }
+	    break;
 	default:
-	    return(1);
+	    goto not_determinist;
     }
+done:
     if (atom1->neg != atom2->neg) {
         ret = !ret;
     }
-    return(ret);
+    if (ret == 0)
+        return(0);
+not_determinist:
+    return(1);
 }
 
 /**
@@ -1923,12 +2145,18 @@
 xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
 	                 int to, xmlRegAtomPtr atom) {
     int ret = 1;
-    int transnr;
+    int res;
+    int transnr, nbTrans;
     xmlRegTransPtr t1;
 
     if (state == NULL)
 	return(ret);
-    for (transnr = 0;transnr < state->nbTrans;transnr++) {
+    /*
+     * don't recurse on transitions potentially added in the course of
+     * the elimination.
+     */
+    nbTrans = state->nbTrans;
+    for (transnr = 0;transnr < nbTrans;transnr++) {
 	t1 = &(state->trans[transnr]);
 	/*
 	 * check transitions conflicting with the one looked at
@@ -1936,16 +2164,21 @@
 	if (t1->atom == NULL) {
 	    if (t1->to == -1)
 		continue;
-	    ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to],
+	    res = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to],
 		                           to, atom);
-	    if (ret == 0)
-		return(0);
+	    if (res == 0) {
+	        ret = 0;
+		/* t1->nd = 1; */
+	    }
 	    continue;
 	}
 	if (t1->to != to)
 	    continue;
-	if (xmlFACompareAtoms(t1->atom, atom))
-	    return(0);
+	if (xmlFACompareAtoms(t1->atom, atom)) {
+	    ret = 0;
+	    /* mark the transition as non-deterministic */
+	    t1->nd = 1;
+	}
     }
     return(ret);
 }
@@ -1962,7 +2195,7 @@
 xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
     int statenr, transnr;
     xmlRegStatePtr state;
-    xmlRegTransPtr t1, t2;
+    xmlRegTransPtr t1, t2, last;
     int i;
     int ret = 1;
 
@@ -1974,8 +2207,7 @@
 	return(ctxt->determinist);
 
     /*
-     * Check for all states that there aren't 2 transitions
-     * with the same atom and a different target.
+     * First cleanup the automata removing cancelled transitions
      */
     for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
 	state = ctxt->states[statenr];
@@ -1989,8 +2221,10 @@
 	     * Determinism checks in case of counted or all transitions
 	     * will have to be handled separately
 	     */
-	    if (t1->atom == NULL)
+	    if (t1->atom == NULL) {
+		/* t1->nd = 1; */
 		continue;
+	    }
 	    if (t1->to == -1) /* eliminated */
 		continue;
 	    for (i = 0;i < transnr;i++) {
@@ -2001,11 +2235,47 @@
 		    if (t1->to == t2->to) {
 			if (xmlFACompareAtoms(t1->atom, t2->atom))
 			    t2->to = -1; /* eliminated */
-		    } else {
-			/* not determinist ! */
-			if (xmlFACompareAtoms(t1->atom, t2->atom))
-			    ret = 0;
 		    }
+		}
+	    }
+	}
+    }
+
+    /*
+     * Check for all states that there aren't 2 transitions
+     * with the same atom and a different target.
+     */
+    for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+	state = ctxt->states[statenr];
+	if (state == NULL)
+	    continue;
+	if (state->nbTrans < 2)
+	    continue;
+	last = NULL;
+	for (transnr = 0;transnr < state->nbTrans;transnr++) {
+	    t1 = &(state->trans[transnr]);
+	    /*
+	     * Determinism checks in case of counted or all transitions
+	     * will have to be handled separately
+	     */
+	    if (t1->atom == NULL) {
+		continue;
+	    }
+	    if (t1->to == -1) /* eliminated */
+		continue;
+	    for (i = 0;i < transnr;i++) {
+		t2 = &(state->trans[i]);
+		if (t2->to == -1) /* eliminated */
+		    continue;
+		if (t2->atom != NULL) {
+		    /* not determinist ! */
+		    if (xmlFACompareAtoms(t1->atom, t2->atom)) {
+			ret = 0;
+			/* mark the transitions as non-deterministic ones */
+			t1->nd = 1;
+			t2->nd = 1;
+			last = t1;
+		    }
 		} else if (t1->to != -1) {
 		    /*
 		     * do the closure in case of remaining specific
@@ -2013,16 +2283,39 @@
 		     */
 		    ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to],
 						   t2->to, t2->atom);
+		    /* don't shortcut the computation so all non deterministic
+		       transition get marked down
 		    if (ret == 0)
 			return(0);
+		     */
+		    if (ret == 0) {
+			t1->nd = 1;
+			/* t2->nd = 1; */
+			last = t1;
+		    }
 		}
 	    }
+	    /* don't shortcut the computation so all non deterministic
+	       transition get marked down
 	    if (ret == 0)
-		break;
+		break; */
 	}
+
+	/*
+	 * mark specifically the last non-deterministic transition
+	 * from a state since there is no need to set-up rollback
+	 * from it
+	 */
+	if (last != NULL) {
+	    last->nd = 2;
+	}
+
+	/* don't shortcut the computation so all non deterministic
+	   transition get marked down
 	if (ret == 0)
-	    break;
+	    break; */
     }
+
     ctxt->determinist = ret;
     return(ret);
 }
@@ -2336,6 +2629,12 @@
     xmlFARegDebugExec(exec);
     exec->transno--;
 #endif
+#ifdef MAX_PUSH
+    if (exec->nbPush > MAX_PUSH) {
+        return;
+    }
+    exec->nbPush++;
+#endif
 
     if (exec->maxRollbacks == 0) {
 	exec->maxRollbacks = 4;
@@ -2422,10 +2721,11 @@
 xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) {
     xmlRegExecCtxt execval;
     xmlRegExecCtxtPtr exec = &execval;
-    int ret, codepoint = 0, len;
+    int ret, codepoint = 0, len, deter;
 
     exec->inputString = content;
     exec->index = 0;
+    exec->nbPush = 0;
     exec->determinist = 1;
     exec->maxRollbacks = 0;
     exec->nbRollbacks = 0;
@@ -2482,6 +2782,7 @@
 		continue;
 	    atom = trans->atom;
 	    ret = 0;
+	    deter = 1;
 	    if (trans->count >= 0) {
 		int count;
 		xmlRegCounterPtr counter;
@@ -2497,6 +2798,8 @@
 		       trans->count, count, counter->min,  counter->max);
 #endif
 		ret = ((count >= counter->min) && (count <= counter->max));
+		if ((ret) && (counter->min != counter->max))
+		    deter = 0;
 	    } else if (atom == NULL) {
 		fprintf(stderr, "epsilon transition left at runtime\n");
 		exec->status = -2;
@@ -2509,7 +2812,15 @@
 
 		    /*
 		     * this is a multiple input sequence
+		     * If there is a counter associated increment it now.
+		     * before potentially saving and rollback
 		     */
+		    if (trans->counter >= 0) {
+#ifdef DEBUG_REGEXP_EXEC
+			printf("Increasing count %d\n", trans->counter);
+#endif
+			exec->counts[trans->counter]++;
+		    }
 		    if (exec->state->nbTrans > exec->transno + 1) {
 			xmlFARegExecSave(exec);
 		    }
@@ -2559,6 +2870,12 @@
 		    if (ret == 0) {
 			goto rollback;
 		    }
+		    if (trans->counter >= 0) {
+#ifdef DEBUG_REGEXP_EXEC
+			printf("Decreasing count %d\n", trans->counter);
+#endif
+			exec->counts[trans->counter]--;
+		    }
 		} else if ((ret == 0) && (atom->min == 0) && (atom->max > 0)) {
 		    /*
 		     * we don't match on the codepoint, but minOccurs of 0
@@ -2576,7 +2893,17 @@
 		ret = 1;
 	    }
 	    if (ret == 1) {
-		if (exec->state->nbTrans > exec->transno + 1) {
+		if ((trans->nd == 1) ||
+		    ((trans->count >= 0) && (deter == 0) &&
+		     (exec->state->nbTrans > exec->transno + 1))) {
+#ifdef DEBUG_REGEXP_EXEC
+		    if (trans->nd == 1)
+		        printf("Saving on nd transition atom %d for %c at %d\n",
+			       trans->atom->no, codepoint, exec->index);
+		    else
+		        printf("Saving on counted transition count %d for %c at %d\n",
+			       trans->count, codepoint, exec->index);
+#endif
 		    xmlFARegExecSave(exec);
 		}
 		if (trans->counter >= 0) {
@@ -2613,6 +2940,10 @@
 	     * Failed to find a way out
 	     */
 	    exec->determinist = 0;
+#ifdef DEBUG_REGEXP_EXEC
+	    printf("rollback from state %d on %d:%c\n", exec->state->no,
+	           codepoint,codepoint);
+#endif
 	    xmlFARegExecRollBack(exec);
 	}
 progress:
@@ -2632,8 +2963,11 @@
 	xmlFree(exec->counts);
     if (exec->status == 0)
 	return(1);
-    if (exec->status == -1)
+    if (exec->status == -1) {
+	if (exec->nbPush > MAX_PUSH)
+	    return(-1);
 	return(0);
+    }
     return(exec->status);
 }
 
@@ -2708,6 +3042,7 @@
     exec->inputStack = NULL;
     exec->errStateNo = -1;
     exec->errString = NULL;
+    exec->nbPush = 0;
     return(exec);
 }
 
@@ -3344,7 +3679,7 @@
         ret = xmlRegExecPushStringInternal(exec, str, data, 1);
 
     if (str != buf)
-        xmlFree(buf);
+        xmlFree(str);
     return(ret);
 }
 
@@ -4784,11 +5119,11 @@
     /* initialize the parser */
     ctxt->end = NULL;
     ctxt->start = ctxt->state = xmlRegNewState(ctxt);
-    ctxt->start->type = XML_REGEXP_START_STATE;
     if (ctxt->start == NULL) {
 	xmlFreeAutomata(ctxt);
 	return(NULL);
     }
+    ctxt->start->type = XML_REGEXP_START_STATE;
     if (xmlRegStatePush(ctxt, ctxt->start) < 0) {
         xmlRegFreeState(ctxt->start);
 	xmlFreeAutomata(ctxt);
@@ -5081,7 +5416,7 @@
         to = xmlRegNewState(am);
 	xmlRegStatePush(am, to);
     }
-    xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0);
+    xmlRegStateAddTrans(am, from, atom, to, counter, -1);
     xmlRegAtomPush(am, atom);
     am->state = to;
 
@@ -5147,7 +5482,7 @@
         to = xmlRegNewState(am);
 	xmlRegStatePush(am, to);
     }
-    xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0);
+    xmlRegStateAddTrans(am, from, atom, to, counter, -1);
     xmlRegAtomPush(am, atom);
     am->state = to;
 
@@ -5236,7 +5571,7 @@
 	to = xmlRegNewState(am);
 	xmlRegStatePush(am, to);
     }
-    xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0);
+    xmlRegStateAddTrans(am, from, atom, to, counter, -1);
     xmlRegAtomPush(am, atom);
     am->state = to;
     return(to);
@@ -5298,7 +5633,7 @@
 	to = xmlRegNewState(am);
 	xmlRegStatePush(am, to);
     }
-    xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0);
+    xmlRegStateAddTrans(am, from, atom, to, counter, -1);
     xmlRegAtomPush(am, atom);
     am->state = to;
     return(to);
@@ -6134,7 +6469,7 @@
  * xmlExpGetLanguage:
  * @ctxt: the expression context
  * @exp: the expression
- * @list: where to store the tokens
+ * @langList: where to store the tokens
  * @len: the allocated lenght of @list
  *
  * Find all the strings used in @exp and store them in @list
@@ -6144,10 +6479,10 @@
  */
 int
 xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, 
-                  const xmlChar**list, int len) {
-    if ((ctxt == NULL) || (exp == NULL) || (list == NULL) || (len <= 0))
+                  const xmlChar**langList, int len) {
+    if ((ctxt == NULL) || (exp == NULL) || (langList == NULL) || (len <= 0))
         return(-1);
-    return(xmlExpGetLanguageInt(ctxt, exp, list, len, 0));
+    return(xmlExpGetLanguageInt(ctxt, exp, langList, len, 0));
 }
 
 static int
@@ -6200,7 +6535,7 @@
  * xmlExpGetStart:
  * @ctxt: the expression context
  * @exp: the expression
- * @list: where to store the tokens
+ * @tokList: where to store the tokens
  * @len: the allocated lenght of @list
  *
  * Find all the strings that appears at the start of the languages
@@ -6212,10 +6547,10 @@
  */
 int
 xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, 
-               const xmlChar**list, int len) {
-    if ((ctxt == NULL) || (exp == NULL) || (list == NULL) || (len <= 0))
+               const xmlChar**tokList, int len) {
+    if ((ctxt == NULL) || (exp == NULL) || (tokList == NULL) || (len <= 0))
         return(-1);
-    return(xmlExpGetStartInt(ctxt, exp, list, len, 0));
+    return(xmlExpGetStartInt(ctxt, exp, tokList, len, 0));
 }
 
 /**
@@ -6861,10 +7196,10 @@
     len = xmlExpGetStartInt(ctxt, sub, tab, ctxt->tabSize, 0);
     while (len < 0) {
         const xmlChar **temp;
-	temp = (const xmlChar **) xmlRealloc(tab, ctxt->tabSize * 2 *
+	temp = (const xmlChar **) xmlRealloc((xmlChar **) tab, ctxt->tabSize * 2 *
 	                                     sizeof(const xmlChar *));
 	if (temp == NULL) {
-	    xmlFree(tab);
+	    xmlFree((xmlChar **) tab);
 	    return(NULL);
 	}
 	tab = temp;
@@ -6875,14 +7210,14 @@
         tmp = xmlExpStringDeriveInt(ctxt, exp, tab[i]);
 	if ((tmp == NULL) || (tmp == forbiddenExp)) {
 	    xmlExpFree(ctxt, ret);
-	    xmlFree(tab);
+	    xmlFree((xmlChar **) tab);
 	    return(tmp);
 	}
 	tmp2 = xmlExpStringDeriveInt(ctxt, sub, tab[i]);
 	if ((tmp2 == NULL) || (tmp2 == forbiddenExp)) {
 	    xmlExpFree(ctxt, tmp);
 	    xmlExpFree(ctxt, ret);
-	    xmlFree(tab);
+	    xmlFree((xmlChar **) tab);
 	    return(tmp);
 	}
 	tmp3 = xmlExpExpDeriveInt(ctxt, tmp, tmp2);
@@ -6891,7 +7226,7 @@
 
 	if ((tmp3 == NULL) || (tmp3 == forbiddenExp)) {
 	    xmlExpFree(ctxt, ret);
-	    xmlFree(tab);
+	    xmlFree((xmlChar **) tab);
 	    return(tmp3);
 	}
 
@@ -6900,12 +7235,12 @@
 	else {
 	    ret = xmlExpHashGetEntry(ctxt, XML_EXP_OR, ret, tmp3, NULL, 0, 0);
 	    if (ret == NULL) {
-		xmlFree(tab);
+		xmlFree((xmlChar **) tab);
 	        return(NULL);
 	    }
 	}
     }
-    xmlFree(tab);
+    xmlFree((xmlChar **) tab);
     return(ret);
 }
     

Modified: packages/libxml2/branches/upstream/current/xmlsave.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlsave.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlsave.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -344,9 +344,9 @@
         ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0;
     }
 
-	if (xmlSaveNoEmptyTags) {
-		ctxt->options |= XML_SAVE_NO_EMPTY;
-	}
+    if (xmlSaveNoEmptyTags) {
+	ctxt->options |= XML_SAVE_NO_EMPTY;
+    }
 }
 
 /**
@@ -400,10 +400,10 @@
      * Use the options
      */
 
-	/* Re-check this option as it may already have been set */
-	if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) {
-		options |= XML_SAVE_NO_EMPTY;
-	}
+    /* Re-check this option as it may already have been set */
+    if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) {
+	options |= XML_SAVE_NO_EMPTY;
+    }
 
     ret->options = options;
     if (options & XML_SAVE_FORMAT)
@@ -1111,6 +1111,10 @@
         xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
 	return;
     }
+    if (cur->type == XML_DOCUMENT_FRAG_NODE) {
+        xhtmlNodeListDumpOutput(ctxt, cur->children);
+	return;
+    }
     buf = ctxt->buf;
     if (cur->type == XML_ELEMENT_DECL) {
         xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
@@ -1473,13 +1477,36 @@
  * with the encoding and the options given
  *
  * Returns a new serialization context or NULL in case of error.
+ */
+
 xmlSaveCtxtPtr
 xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options)
 {
-    TODO
-    return(NULL);
+    xmlSaveCtxtPtr ret;
+    xmlOutputBufferPtr out_buff;
+    xmlCharEncodingHandlerPtr handler;
+
+    ret = xmlNewSaveCtxt(encoding, options);
+    if (ret == NULL) return(NULL);
+
+    if (encoding != NULL) {
+        handler = xmlFindCharEncodingHandler(encoding);
+        if (handler == NULL) {
+            xmlFree(ret);
+            return(NULL);
+        }
+    } else
+        handler = NULL;
+    out_buff = xmlOutputBufferCreateBuffer(buffer, handler);
+    if (out_buff == NULL) {
+        xmlFree(ret);
+        if (handler) xmlCharEncCloseFunc(handler);
+        return(NULL);
+    }
+
+    ret->buf = out_buff;
+    return(ret);
 }
- */
 
 /**
  * xmlSaveToIO:

Modified: packages/libxml2/branches/upstream/current/xmlschemas.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlschemas.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlschemas.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -17,10 +17,32 @@
  *     against their types.
  *   - Eliminate item creation for: ??
  *
+ * URGENT TODO:
+ *   - For xsi-driven schema acquisition, augment the IDCs after every
+ *     acquisition episode (xmlSchemaAugmentIDC).
+ *
  * NOTES:
  *   - Elimated item creation for: <restriction>, <extension>,
  *     <simpleContent>, <complexContent>, <list>, <union>
  *
+ * PROBLEMS:
+ *   - http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0337.html
+ *     IDC XPath expression and chameleon includes: the targetNamespace is changed, so
+ *     XPath will have trouble to resolve to this namespace, since not known.
+ *
+ *
+ * CONSTRAINTS:
+ *
+ * Schema Component Constraint:
+ *   All Group Limited (cos-all-limited)
+ *   Status: complete
+ *   (1.2)
+ *     In xmlSchemaGroupDefReferenceTermFixup() and
+ *   (2)
+ *     In xmlSchemaParseModelGroup()
+ *     TODO: Actually this should go to component-level checks,
+ *     but is done here due to performance. Move it to an other layer
+ *     is schema construction via an API is implemented.
  */
 #define IN_LIBXML
 #include "libxml.h"
@@ -58,20 +80,24 @@
 
 /* #define DEBUG_AUTOMATA 1 */
 
-#define DEBUG_ATTR_VALIDATION 0
+/* #define DEBUG_IDC */
 
-/* #define DEBUG_IDC 1 */
+/* #define DEBUG_IDC_NODE_TABLE */
 
-/* #define DEBUG_INCLUDES 1 */
+#ifdef DEBUG_IDC
+ #ifndef DEBUG_IDC_NODE_TABLE
+  #define DEBUG_IDC_NODE_TABLE
+ #endif
+#endif   
 
 /* #define ENABLE_PARTICLE_RESTRICTION 1 */
 
-/* #define ENABLE_SCHEMA_SPACES */
+#define ENABLE_REDEFINE
 
-/* #define ENABLE_REDEFINE */
-
 /* #define ENABLE_NAMED_LOCALS */
 
+/* #define ENABLE_IDC_NODE_TABLES_TEST */
+
 #define DUMP_CONTENT_MODEL
 
 #ifdef LIBXML_READER_ENABLED
@@ -98,101 +124,160 @@
 static const xmlChar *xmlNamespaceNs = (const xmlChar *)
     "http://www.w3.org/2000/xmlns/";
 
-static const xmlChar *xmlSchemaElemDesElemDecl = (const xmlChar *)
-    "element decl.";
-static const xmlChar *xmlSchemaElemDesAttrDecl = (const xmlChar *)
-    "attribute decl.";
-static const xmlChar *xmlSchemaElemDesAttrRef = (const xmlChar *)
-    "attribute use";
-static const xmlChar *xmlSchemaElemModelGrDef = (const xmlChar *)
-    "model group";
+/*
+* Come casting macros.
+*/
+#define ACTXT_CAST (xmlSchemaAbstractCtxtPtr)
+#define PCTXT_CAST (xmlSchemaParserCtxtPtr)
+#define VCTXT_CAST (xmlSchemaValidCtxtPtr)
+#define WXS_BASIC_CAST (xmlSchemaBasicItemPtr)
+#define WXS_TREE_CAST (xmlSchemaTreeItemPtr)
+#define WXS_PTC_CAST (xmlSchemaParticlePtr)
+#define WXS_TYPE_CAST (xmlSchemaTypePtr)
+#define WXS_ELEM_CAST (xmlSchemaElementPtr)
+#define WXS_ATTR_GROUP_CAST (xmlSchemaAttributeGroupPtr)
+#define WXS_ATTR_CAST (xmlSchemaAttributePtr)
+#define WXS_ATTR_USE_CAST (xmlSchemaAttributeUsePtr)
+#define WXS_ATTR_PROHIB_CAST (xmlSchemaAttributeUseProhibPtr)
+#define WXS_MODEL_GROUPDEF_CAST (xmlSchemaModelGroupDefPtr)
+#define WXS_MODEL_GROUP_CAST (xmlSchemaModelGroupPtr)
+#define WXS_IDC_CAST (xmlSchemaIDCPtr)
+#define WXS_QNAME_CAST (xmlSchemaQNameRefPtr)
+#define WXS_LIST_CAST (xmlSchemaItemListPtr)
 
-#define IS_SCHEMA(node, type)						\
-   ((node != NULL) && (node->ns != NULL) &&				\
-    (xmlStrEqual(node->name, (const xmlChar *) type)) &&		\
-    (xmlStrEqual(node->ns->href, xmlSchemaNs)))
+/*
+* Macros to query common properties of components.
+*/
+#define WXS_ITEM_NODE(i) xmlSchemaGetComponentNode(WXS_BASIC_CAST (i))
 
-#define FREE_AND_NULL(str)						\
-    if (str != NULL) {							\
-	xmlFree((xmlChar *) str);							\
-	str = NULL;							\
-    }
+#define WXS_ITEM_TYPE_NAME(i) xmlSchemaGetComponentTypeStr(WXS_BASIC_CAST (i))
+/*
+* Macros for element declarations.
+*/
+#define WXS_ELEM_TYPEDEF(e) (e)->subtypes
 
-#define IS_ANYTYPE(item)                           \
-     ((item->type == XML_SCHEMA_TYPE_BASIC) &&     \
-      (item->builtInType == XML_SCHEMAS_ANYTYPE))
+#define WXS_SUBST_HEAD(item) (item)->refDecl
+/*
+* Macros for attribute declarations.
+*/
+#define WXS_ATTR_TYPEDEF(a) (a)->subtypes
+/*
+* Macros for attribute uses.
+*/
+#define WXS_ATTRUSE_DECL(au) WXS_ATTR_CAST (WXS_ATTR_USE_CAST (au))->attrDecl
 
-#define IS_COMPLEX_TYPE(item)                      \
-    ((item->type == XML_SCHEMA_TYPE_COMPLEX) ||    \
-     (item->builtInType == XML_SCHEMAS_ANYTYPE))
+#define WXS_ATTRUSE_TYPEDEF(au) WXS_ATTR_TYPEDEF(WXS_ATTRUSE_DECL( WXS_ATTR_USE_CAST au))
 
-#define IS_SIMPLE_TYPE(item)                       \
-    ((item->type == XML_SCHEMA_TYPE_SIMPLE) ||     \
-     ((item->type == XML_SCHEMA_TYPE_BASIC) &&     \
-      (item->builtInType != XML_SCHEMAS_ANYTYPE)))
+#define WXS_ATTRUSE_DECL_NAME(au) (WXS_ATTRUSE_DECL(au))->name
 
-#define IS_ANY_SIMPLE_TYPE(item)                   \
-    ((item->type == XML_SCHEMA_TYPE_BASIC) &&      \
-      (item->builtInType == XML_SCHEMAS_ANYSIMPLETYPE))
+#define WXS_ATTRUSE_DECL_TNS(au) (WXS_ATTRUSE_DECL(au))->targetNamespace
+/*
+* Macros for attribute groups.
+*/
+#define WXS_ATTR_GROUP_HAS_REFS(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS)
+#define WXS_ATTR_GROUP_EXPANDED(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED)
+/*
+* Macros for particles.
+*/
+#define WXS_PARTICLE(p) WXS_PTC_CAST (p)
 
-#define IS_NOT_TYPEFIXED(item)                      \
-    ((item->type != XML_SCHEMA_TYPE_BASIC) &&       \
-     ((item->flags & XML_SCHEMAS_TYPE_INTERNAL_RESOLVED) == 0))
+#define WXS_PARTICLE_TERM(p) (WXS_PARTICLE(p))->children
 
-#define TYPE_IS_NOT_FIXEDUP_1(item)                   \
-    (((item)->type != XML_SCHEMA_TYPE_BASIC) &&       \
-     (((item)->flags & XML_SCHEMAS_TYPE_FIXUP_1) == 0))
+#define WXS_PARTICLE_MODEL(p) WXS_MODEL_GROUP_CAST WXS_PARTICLE(p)->children
+/*
+* Macros for model groups definitions.
+*/
+#define WXS_MODELGROUPDEF_MODEL(mgd) (WXS_MODEL_GROUP_CAST (mgd))->children
+/*
+* Macros for model groups.
+*/
+#define WXS_IS_MODEL_GROUP(i) \
+    (((i)->type == XML_SCHEMA_TYPE_SEQUENCE) || \
+     ((i)->type == XML_SCHEMA_TYPE_CHOICE) || \
+     ((i)->type == XML_SCHEMA_TYPE_ALL))
 
-#define HAS_COMPLEX_CONTENT(item)			 \
-    ((item->contentType == XML_SCHEMA_CONTENT_MIXED) ||  \
-     (item->contentType == XML_SCHEMA_CONTENT_EMPTY) ||  \
-     (item->contentType == XML_SCHEMA_CONTENT_ELEMENTS))
+#define WXS_MODELGROUP_PARTICLE(mg) WXS_PTC_CAST (mg)->children
+/*
+* Macros for schema buckets.
+*/
+#define WXS_IS_BUCKET_INCREDEF(t) (((t) == XML_SCHEMA_SCHEMA_INCLUDE) || \
+    ((t) == XML_SCHEMA_SCHEMA_REDEFINE))
 
-#define HAS_SIMPLE_CONTENT(item)			 \
-    ((item->contentType == XML_SCHEMA_CONTENT_SIMPLE) ||  \
-     (item->contentType == XML_SCHEMA_CONTENT_BASIC))
+#define WXS_IS_BUCKET_IMPMAIN(t) (((t) == XML_SCHEMA_SCHEMA_MAIN) || \
+    ((t) == XML_SCHEMA_SCHEMA_IMPORT))
 
-#define HAS_MIXED_CONTENT(item)	(item->contentType == XML_SCHEMA_CONTENT_MIXED)
+#define WXS_IMPBUCKET(b) ((xmlSchemaImportPtr) (b))
 
-#define IS_PARTICLE_EMPTIABLE(item) \
-    (xmlSchemaIsParticleEmptiable((xmlSchemaParticlePtr) item->subtypes))
+#define WXS_INCBUCKET(b) ((xmlSchemaIncludePtr) (b))
+/*
+* Macros for complex/simple types.
+*/
+#define WXS_IS_ANYTYPE(i) \
+     (( (i)->type == XML_SCHEMA_TYPE_BASIC) && \
+      ( (WXS_TYPE_CAST (i))->builtInType == XML_SCHEMAS_ANYTYPE))
 
-#define GET_NODE(item) xmlSchemaGetComponentNode((xmlSchemaBasicItemPtr) item)
+#define WXS_IS_COMPLEX(i) \
+    (((i)->type == XML_SCHEMA_TYPE_COMPLEX) || \
+     ((i)->builtInType == XML_SCHEMAS_ANYTYPE))
 
-#define GET_LIST_ITEM_TYPE(item) item->subtypes
+#define WXS_IS_SIMPLE(item) \
+    ((item->type == XML_SCHEMA_TYPE_SIMPLE) || \
+     ((item->type == XML_SCHEMA_TYPE_BASIC) && \
+      (item->builtInType != XML_SCHEMAS_ANYTYPE)))
 
-#define VARIETY_ATOMIC(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC)
-#define VARIETY_LIST(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_LIST)
-#define VARIETY_UNION(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_UNION)
+#define WXS_IS_ANY_SIMPLE_TYPE(i) \
+    (((i)->type == XML_SCHEMA_TYPE_BASIC) && \
+      ((i)->builtInType == XML_SCHEMAS_ANYSIMPLETYPE))
 
-#define IS_MODEL_GROUP(item)                     \
-    ((item->type == XML_SCHEMA_TYPE_SEQUENCE) || \
-     (item->type == XML_SCHEMA_TYPE_CHOICE) ||   \
-     (item->type == XML_SCHEMA_TYPE_ALL))
+#define WXS_IS_RESTRICTION(t) \
+    ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION)
 
-#define INODE_NILLED(item) (item->flags & XML_SCHEMA_ELEM_INFO_NILLED)
+#define WXS_IS_EXTENSION(t) \
+    ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION)
 
-#define ELEM_TYPE(item) item->subtypes
+#define WXS_IS_TYPE_NOT_FIXED(i) \
+    (((i)->type != XML_SCHEMA_TYPE_BASIC) && \
+     (((i)->flags & XML_SCHEMAS_TYPE_INTERNAL_RESOLVED) == 0))
 
-#define GET_PARTICLE(item) (xmlSchemaParticlePtr) item->subtypes;
+#define WXS_IS_TYPE_NOT_FIXED_1(item) \
+    (((item)->type != XML_SCHEMA_TYPE_BASIC) && \
+     (((item)->flags & XML_SCHEMAS_TYPE_FIXUP_1) == 0))
+/*
+* Macros for exclusively for complex types.
+*/
+#define WXS_HAS_COMPLEX_CONTENT(item) \
+    ((item->contentType == XML_SCHEMA_CONTENT_MIXED) || \
+     (item->contentType == XML_SCHEMA_CONTENT_EMPTY) || \
+     (item->contentType == XML_SCHEMA_CONTENT_ELEMENTS))
 
-#define SUBST_GROUP_AFF(item) (item)->refDecl
+#define WXS_HAS_SIMPLE_CONTENT(item) \
+    ((item->contentType == XML_SCHEMA_CONTENT_SIMPLE) || \
+     (item->contentType == XML_SCHEMA_CONTENT_BASIC))
 
-#define ACTXT_CAST (xmlSchemaAbstractCtxtPtr)
+#define WXS_HAS_MIXED_CONTENT(item) \
+    (item->contentType == XML_SCHEMA_CONTENT_MIXED)
 
-#if 0
-#define WXS_GET_NEXT(item) \
-    xmlSchemaGetNextComponent((xmlSchemaBasicItemPtr) item)
-#endif
+#define WXS_EMPTIABLE(t) \
+    (xmlSchemaIsParticleEmptiable(WXS_PTC_CAST (t)->subtypes))
 
-#define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0))
+#define WXS_TYPE_CONTENTTYPE(t) (t)->subtypes
 
-#define HFAILURE if (res == -1) goto exit_failure;
+#define WXS_TYPE_PARTICLE(t) WXS_PTC_CAST (t)->subtypes
 
-#define HERROR if (res != 0) goto exit_error;
+#define WXS_TYPE_PARTICLE_TERM(t) WXS_PARTICLE_TERM(WXS_TYPE_PARTICLE(t))
+/*
+* Macros for exclusively for simple types.
+*/
+#define WXS_LIST_ITEMTYPE(t) (t)->subtypes
 
-#define HSTOP(ctx) if ((ctx)->stop) goto exit;
+#define WXS_IS_ATOMIC(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC)
 
+#define WXS_IS_LIST(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_LIST)
+
+#define WXS_IS_UNION(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_UNION)
+/*
+* Misc parser context macros.
+*/
 #define WXS_CONSTRUCTOR(ctx) (ctx)->constructor
 
 #define WXS_HAS_BUCKETS(ctx) \
@@ -201,47 +286,57 @@
 
 #define WXS_SUBST_GROUPS(ctx) WXS_CONSTRUCTOR((ctx))->substGroups
 
-#define WXS_SCHEMA_BUCKET(ctx) WXS_CONSTRUCTOR((ctx))->bucket
+#define WXS_BUCKET(ctx) WXS_CONSTRUCTOR((ctx))->bucket
 
 #define WXS_SCHEMA(ctx) (ctx)->schema
 
-#define ADD_LOCAL_ITEM(ctx, item) \
-    xmlSchemaAddItem(&(WXS_SCHEMA_BUCKET(ctx)->locals), item)
+#define WXS_ADD_LOCAL(ctx, item) \
+    xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->locals), 10, item)
 
-#define ADD_GLOBAL_ITEM(ctx, item) \
-    xmlSchemaAddItem(&(WXS_SCHEMA_BUCKET(ctx)->globals), item)
+#define WXS_ADD_GLOBAL(ctx, item) \
+    xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->globals), 5, item)
 
-#define WXS_ADD_PENDING_ITEM(ctx, item) \
-    xmlSchemaAddItem(&((ctx)->constructor->pending), item)
+#define WXS_ADD_PENDING(ctx, item) \
+    xmlSchemaAddItemSize(&((ctx)->constructor->pending), 10, item)
+/*
+* xmlSchemaItemList macros.
+*/
+#define WXS_ILIST_IS_EMPTY(l) ((l == NULL) || ((l)->nbItems == 0))
+/*
+* Misc macros.
+*/
+#define IS_SCHEMA(node, type) \
+   ((node != NULL) && (node->ns != NULL) && \
+    (xmlStrEqual(node->name, (const xmlChar *) type)) && \
+    (xmlStrEqual(node->ns->href, xmlSchemaNs)))
 
-#define WXS_IS_RESTRICTION(t) \
-    ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION)
+#define FREE_AND_NULL(str) if ((str) != NULL) { xmlFree((xmlChar *) (str)); str = NULL; }
 
-#define WXS_IS_EXTENSION(t) \
-    ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION)
-
 /*
-* @b: The schema bucket
+* Since we put the default/fixed values into the dict, we can
+* use pointer comparison for those values.
+* REMOVED: (xmlStrEqual((v1), (v2)))
 */
-#define WXS_IS_INCREDEF(t) (((t) == XML_SCHEMA_SCHEMA_INCLUDE) || \
-    ((t) == XML_SCHEMA_SCHEMA_REDEFINE))
+#define WXS_ARE_DEFAULT_STR_EQUAL(v1, v2) ((v1) == (v2))
 
-#define WXS_IS_IMPMAIN(t) (((t) == XML_SCHEMA_SCHEMA_MAIN) || \
-    ((t) == XML_SCHEMA_SCHEMA_IMPORT))
+#define INODE_NILLED(item) (item->flags & XML_SCHEMA_ELEM_INFO_NILLED)
 
-#define IMPBUCKET_CAST(b) ((xmlSchemaImportPtr) (b))
-#define INCBUCKET_CAST(b) ((xmlSchemaIncludePtr) (b))
+#define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0))
 
+#define HFAILURE if (res == -1) goto exit_failure;
+
+#define HERROR if (res != 0) goto exit_error;
+
+#define HSTOP(ctx) if ((ctx)->stop) goto exit;
+/*
+* Some flags used for various schema constraints.
+*/
 #define SUBSET_RESTRICTION  1<<0
 #define SUBSET_EXTENSION    1<<1
 #define SUBSET_SUBSTITUTION 1<<2
 #define SUBSET_LIST         1<<3
 #define SUBSET_UNION        1<<4
 
-#define XML_SCHEMAS_PARSE_ERROR		1
-
-#define SCHEMAS_PARSE_OPTIONS XML_PARSE_NOENT
-
 typedef struct _xmlSchemaNodeInfo xmlSchemaNodeInfo;
 typedef xmlSchemaNodeInfo *xmlSchemaNodeInfoPtr;
 
@@ -253,10 +348,13 @@
     int sizeItems; /* used for dynamic addition of schemata */
 };
 
+#define XML_SCHEMA_CTXT_PARSER 1
+#define XML_SCHEMA_CTXT_VALIDATOR 2
+
 typedef struct _xmlSchemaAbstractCtxt xmlSchemaAbstractCtxt;
 typedef xmlSchemaAbstractCtxt *xmlSchemaAbstractCtxtPtr;
 struct _xmlSchemaAbstractCtxt {
-    int type;
+    int type; /* E.g. XML_SCHEMA_CTXT_VALIDATOR */
 };
 
 typedef struct _xmlSchemaBucket xmlSchemaBucket;
@@ -281,8 +379,12 @@
     xmlSchemaBucketPtr bucket;
 };
 
+#define XML_SCHEMA_BUCKET_MARKED 1<<0
+#define XML_SCHEMA_BUCKET_COMPS_ADDED 1<<1
+
 struct _xmlSchemaBucket {
     int type;
+    int flags;
     const xmlChar *schemaLocation;
     const xmlChar *origTargetNamespace;
     const xmlChar *targetNamespace;
@@ -308,6 +410,7 @@
 typedef xmlSchemaImport *xmlSchemaImportPtr;
 struct _xmlSchemaImport {
     int type; /* Main OR import OR include. */
+    int flags;
     const xmlChar *schemaLocation; /* The URI of the schema document. */
     /* For chameleon includes, @origTargetNamespace will be NULL */
     const xmlChar *origTargetNamespace;
@@ -336,6 +439,7 @@
 typedef xmlSchemaInclude *xmlSchemaIncludePtr;
 struct _xmlSchemaInclude {
     int type;
+    int flags;
     const xmlChar *schemaLocation;
     const xmlChar *origTargetNamespace;
     const xmlChar *targetNamespace;
@@ -352,38 +456,142 @@
     xmlSchemaImportPtr ownerImport;
 };
 
+/**
+ * xmlSchemaBasicItem:
+ *
+ * The abstract base type for schema components.
+ */
+typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem;
+typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr;
+struct _xmlSchemaBasicItem {
+    xmlSchemaTypeType type;
+};
+
+/**
+ * xmlSchemaAnnotItem:
+ *
+ * The abstract base type for annotated schema components.
+ * (Extends xmlSchemaBasicItem)
+ */
+typedef struct _xmlSchemaAnnotItem xmlSchemaAnnotItem;
+typedef xmlSchemaAnnotItem *xmlSchemaAnnotItemPtr;
+struct _xmlSchemaAnnotItem {
+    xmlSchemaTypeType type;
+    xmlSchemaAnnotPtr annot;
+};
+
+/**
+ * xmlSchemaTreeItem:
+ *
+ * The abstract base type for tree-like structured schema components.
+ * (Extends xmlSchemaAnnotItem)
+ */
+typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem;
+typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr;
+struct _xmlSchemaTreeItem {
+    xmlSchemaTypeType type;
+    xmlSchemaAnnotPtr annot;
+    xmlSchemaTreeItemPtr next;
+    xmlSchemaTreeItemPtr children;
+};
+
+
+#define XML_SCHEMA_ATTR_USE_FIXED 1<<0
+/**
+ * xmlSchemaAttributeUsePtr:
+ *
+ * The abstract base type for tree-like structured schema components.
+ * (Extends xmlSchemaTreeItem)
+ */
+typedef struct _xmlSchemaAttributeUse xmlSchemaAttributeUse;
+typedef xmlSchemaAttributeUse *xmlSchemaAttributeUsePtr;
+struct _xmlSchemaAttributeUse {
+    xmlSchemaTypeType type;
+    xmlSchemaAnnotPtr annot;
+    xmlSchemaAttributeUsePtr next; /* The next attr. use. */
+    /* 
+    * The attr. decl. OR a QName-ref. to an attr. decl. OR
+    * a QName-ref. to an attribute group definition.
+    */
+    xmlSchemaAttributePtr attrDecl;
+
+    int flags;
+    xmlNodePtr node;
+    int occurs; /* required, optional */
+    const xmlChar * defValue;
+    xmlSchemaValPtr defVal;
+};
+
+/**
+ * xmlSchemaAttributeUseProhibPtr:
+ *
+ * A helper component to reflect attribute prohibitions.
+ * (Extends xmlSchemaBasicItem)
+ */
+typedef struct _xmlSchemaAttributeUseProhib xmlSchemaAttributeUseProhib;
+typedef xmlSchemaAttributeUseProhib *xmlSchemaAttributeUseProhibPtr;
+struct _xmlSchemaAttributeUseProhib {
+    xmlSchemaTypeType type; /* == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB */
+    xmlNodePtr node;
+    const xmlChar *name;
+    const xmlChar *targetNamespace;
+    int isRef;
+};
+
+/**
+ * xmlSchemaRedef:
+ */
+typedef struct _xmlSchemaRedef xmlSchemaRedef;
+typedef xmlSchemaRedef *xmlSchemaRedefPtr;
+struct _xmlSchemaRedef {
+    xmlSchemaRedefPtr next;
+    xmlSchemaBasicItemPtr item; /* The redefining component. */
+    xmlSchemaBasicItemPtr reference; /* The referencing component. */
+    xmlSchemaBasicItemPtr target; /* The to-be-redefined component. */
+    const xmlChar *refName; /* The name of the to-be-redefined component. */
+    const xmlChar *refTargetNs; /* The target namespace of the
+                                   to-be-redefined comp. */
+    xmlSchemaBucketPtr targetBucket; /* The redefined schema. */
+};
+
+/**
+ * xmlSchemaConstructionCtxt:
+ */
 typedef struct _xmlSchemaConstructionCtxt xmlSchemaConstructionCtxt;
 typedef xmlSchemaConstructionCtxt *xmlSchemaConstructionCtxtPtr;
 struct _xmlSchemaConstructionCtxt {
-    xmlSchemaPtr schema; /* The main schema. */
+    xmlSchemaPtr mainSchema; /* The main schema. */
+    xmlSchemaBucketPtr mainBucket; /* The main schema bucket */
     xmlDictPtr dict;
     xmlSchemaItemListPtr buckets; /* List of schema buckets. */
     /* xmlSchemaItemListPtr relations; */ /* List of schema relations. */
-    xmlSchemaBucketPtr bucket; /* The current schema bucket */
-    /* All Components of all schemas that need to be fixed. */
-    xmlSchemaItemListPtr pending;
+    xmlSchemaBucketPtr bucket; /* The current schema bucket */    
+    xmlSchemaItemListPtr pending; /* All Components of all schemas that
+                                     need to be fixed. */
     xmlHashTablePtr substGroups;
+    xmlSchemaRedefPtr redefs;
+    xmlSchemaRedefPtr lastRedef;
 };
 
-#define XML_SCHEMA_CTXT_PARSER 1
-#define XML_SCHEMA_CTXT_VALIDATOR 2
+#define XML_SCHEMAS_PARSE_ERROR		1
+#define SCHEMAS_PARSE_OPTIONS XML_PARSE_NOENT
 
 struct _xmlSchemaParserCtxt {
     int type;
-    void *userData;             /* user specific data block */    
+    void *errCtxt;             /* user specific error context */    
     xmlSchemaValidityErrorFunc error;   /* the callback in case of errors */
     xmlSchemaValidityWarningFunc warning;       /* the callback in case of warning */
-    xmlSchemaValidError err;
+    int err;
     int nberrors;
     xmlStructuredErrorFunc serror;
 
     xmlSchemaConstructionCtxtPtr constructor;
-    int ownsConstructor; /* TODO: Move this to parser flags. */
+    int ownsConstructor; /* TODO: Move this to parser *flags*. */
 
-    /* xmlSchemaPtr topschema;	 The main schema */
-    /* xmlHashTablePtr namespaces;	 Hash table of namespaces to schemas */
+    /* xmlSchemaPtr topschema;	*/
+    /* xmlHashTablePtr namespaces;  */
 
-    xmlSchemaPtr schema;        /* The schema in use */
+    xmlSchemaPtr schema;        /* The main schema in use */
     int counter;
 
     const xmlChar *URL;
@@ -403,7 +611,6 @@
 
     xmlDictPtr dict;		/* dictionnary for interned string names */
     xmlSchemaTypePtr ctxtType; /* The current context simple/complex type */
-    xmlSchemaTypePtr parentItem; /* The current parent schema item */    
     int options;
     xmlSchemaValidCtxtPtr vctxt;
     int isS4S;
@@ -411,66 +618,14 @@
     int xsiAssemble;
     int stop; /* If the parser should stop; i.e. a critical error. */
     const xmlChar *targetNamespace;
-};
+    xmlSchemaBucketPtr redefined; /* The schema to be redefined. */
 
-#define XML_SCHEMAS_ATTR_UNKNOWN 1
-#define XML_SCHEMAS_ATTR_ASSESSED 2
-#define XML_SCHEMAS_ATTR_PROHIBITED 3
-#define XML_SCHEMAS_ATTR_ERR_MISSING 4
-#define XML_SCHEMAS_ATTR_INVALID_VALUE 5
-#define XML_SCHEMAS_ATTR_ERR_NO_TYPE 6
-#define XML_SCHEMAS_ATTR_ERR_FIXED_VALUE 7
-#define XML_SCHEMAS_ATTR_DEFAULT 8
-#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9
-#define XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL 10
-#define XML_SCHEMAS_ATTR_HAS_ATTR_USE 11
-#define XML_SCHEMAS_ATTR_HAS_ATTR_DECL 12
-#define XML_SCHEMAS_ATTR_WILD_SKIP 13
-#define XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL 14
-#define XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID 15
-#define XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID 16
-#define XML_SCHEMAS_ATTR_META 17
-
-/**
- * xmlSchemaBasicItem:
- *
- * The abstract base type for schema components.
- */
-typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem;
-typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr;
-struct _xmlSchemaBasicItem {
-    xmlSchemaTypeType type;
+    xmlSchemaRedefPtr redef; /* Used for redefinitions. */
+    int redefCounter; /* Used for redefinitions. */ 
+    xmlSchemaItemListPtr attrProhibs;
 };
 
 /**
- * xmlSchemaAnnotItem:
- *
- * The abstract base type for annotated schema components.
- * (Extends xmlSchemaBasicItem)
- */
-typedef struct _xmlSchemaAnnotItem xmlSchemaAnnotItem;
-typedef xmlSchemaAnnotItem *xmlSchemaAnnotItemPtr;
-struct _xmlSchemaAnnotItem {
-    xmlSchemaTypeType type;
-    xmlSchemaAnnotPtr annot;
-};
-
-/**
- * xmlSchemaTreeItem:
- *
- * The abstract base type for tree-like structured schema components.
- * (Extends xmlSchemaAnnotItem)
- */
-typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem;
-typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr;
-struct _xmlSchemaTreeItem {
-    xmlSchemaTypeType type;
-    xmlSchemaAnnotPtr annot;
-    xmlSchemaTreeItemPtr next;
-    xmlSchemaTreeItemPtr children;
-};
-
-/**
  * xmlSchemaQNameRef:
  *
  * A component reference item (not a schema component)
@@ -480,10 +635,11 @@
 typedef xmlSchemaQNameRef *xmlSchemaQNameRefPtr;
 struct _xmlSchemaQNameRef {
     xmlSchemaTypeType type;
-    xmlSchemaBasicItemPtr item;
+    xmlSchemaBasicItemPtr item; /* The resolved referenced item. */
     xmlSchemaTypeType itemType;
     const xmlChar *name;
     const xmlChar *targetNamespace;
+    xmlNodePtr node;
 };
 
 /**
@@ -497,8 +653,10 @@
 struct _xmlSchemaParticle {
     xmlSchemaTypeType type;
     xmlSchemaAnnotPtr annot;
-    xmlSchemaTreeItemPtr next; /* next particle (OR "element decl" OR "wildcard") */
-    xmlSchemaTreeItemPtr children; /* the "term" ("model group" OR "group definition") */
+    xmlSchemaTreeItemPtr next; /* next particle */
+    xmlSchemaTreeItemPtr children; /* the "term" (e.g. a model group,
+	a group definition, a XML_SCHEMA_EXTRA_QNAMEREF (if a reference),
+        etc.) */
     int minOccurs;
     int maxOccurs;
     xmlNodePtr node;
@@ -521,6 +679,7 @@
 };
 
 #define XML_SCHEMA_MODEL_GROUP_DEF_MARKED 1<<0
+#define XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED 1<<1
 /**
  * xmlSchemaModelGroupDef:
  *
@@ -538,7 +697,6 @@
     const xmlChar *targetNamespace;
     xmlNodePtr node;
     int flags;
-    xmlSchemaModelGroupDefPtr redef; /* Redefinitions. */
 };
 
 typedef struct _xmlSchemaIDC xmlSchemaIDC;
@@ -590,7 +748,7 @@
 struct _xmlSchemaIDCAug {
     xmlSchemaIDCAugPtr next; /* next in a list */
     xmlSchemaIDCPtr def; /* the IDC definition */
-    int bubbleDepth; /* the lowest tree level to which IDC
+    int keyrefDepth; /* the lowest tree level to which IDC
                         tables need to be bubbled upwards */
 };
 
@@ -634,11 +792,10 @@
     xmlSchemaPSVIIDCNodePtr *nodeTable; /* array of key-sequences */
     int nbNodes; /* number of entries in the node table */
     int sizeNodes; /* size of the node table */
-    int nbDupls; /* number of already identified duplicates in the node
-                    table */
-    /* int nbKeys; number of keys in each key-sequence */
+    xmlSchemaItemListPtr dupls;
 };
 
+
 #define XPATH_STATE_OBJ_TYPE_IDC_SELECTOR 1
 #define XPATH_STATE_OBJ_TYPE_IDC_FIELD 2
 
@@ -673,17 +830,20 @@
 /**
  * xmlSchemaIDCMatcher:
  *
- * Used to  IDC selectors (and fields) successively.
+ * Used to evaluate IDC selectors (and fields).
  */
 struct _xmlSchemaIDCMatcher {
     int type;
     int depth; /* the tree depth at creation time */
     xmlSchemaIDCMatcherPtr next; /* next in the list */
     xmlSchemaIDCAugPtr aidc; /* the augmented IDC item */
+    int idcType;
     xmlSchemaPSVIIDCKeyPtr **keySeqs; /* the key-sequences of the target
                                          elements */
     int sizeKeySeqs;
     int targetDepth;
+    xmlSchemaItemListPtr targets; /* list of target-node
+                                     (xmlSchemaPSVIIDCNodePtr) entries */
 };
 
 /*
@@ -733,9 +893,29 @@
 
     const xmlChar **nsBindings; /* Namespace bindings on this element */
     int nbNsBindings;
-    int sizeNsBindings;
+    int sizeNsBindings;    
+
+    int hasKeyrefs;
+    int appliedXPath; /* Indicates that an XPath has been applied. */
 };
 
+#define XML_SCHEMAS_ATTR_UNKNOWN 1
+#define XML_SCHEMAS_ATTR_ASSESSED 2
+#define XML_SCHEMAS_ATTR_PROHIBITED 3
+#define XML_SCHEMAS_ATTR_ERR_MISSING 4
+#define XML_SCHEMAS_ATTR_INVALID_VALUE 5
+#define XML_SCHEMAS_ATTR_ERR_NO_TYPE 6
+#define XML_SCHEMAS_ATTR_ERR_FIXED_VALUE 7
+#define XML_SCHEMAS_ATTR_DEFAULT 8
+#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9
+#define XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL 10
+#define XML_SCHEMAS_ATTR_HAS_ATTR_USE 11
+#define XML_SCHEMAS_ATTR_HAS_ATTR_DECL 12
+#define XML_SCHEMAS_ATTR_WILD_SKIP 13
+#define XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL 14
+#define XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID 15
+#define XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID 16
+#define XML_SCHEMAS_ATTR_META 17
 /*
 * @metaType values of xmlSchemaAttrInfo.
 */
@@ -759,7 +939,7 @@
     int flags; /* combination of node info flags */
 
     xmlSchemaAttributePtr decl; /* the attribute declaration */
-    xmlSchemaAttributePtr use;  /* the attribute use */
+    xmlSchemaAttributeUsePtr use;  /* the attribute use */
     int state;
     int metaType;
     const xmlChar *vcValue; /* the value constraint value */
@@ -775,7 +955,7 @@
  */
 struct _xmlSchemaValidCtxt {
     int type;
-    void *userData;             /* user specific data block */
+    void *errCtxt;             /* user specific data block */
     xmlSchemaValidityErrorFunc error;   /* the callback in case of errors */
     xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */
     xmlStructuredErrorFunc serror;
@@ -786,7 +966,7 @@
     xmlCharEncoding enc;
     xmlSAXHandlerPtr sax;
     xmlParserCtxtPtr parserCtxt;
-    void *user_data;
+    void *user_data; /* TODO: What is this for? */
 
     int err;
     int nberrors;
@@ -836,6 +1016,9 @@
 
     int skipDepth;
     xmlSchemaItemListPtr nodeQNames;
+    int hasKeyrefs;
+    int createIDCNodeTables;
+    int psviExposeIDCNodeTables;
 };
 
 /**
@@ -864,7 +1047,7 @@
                                  xmlNodePtr node);
 static int
 xmlSchemaTypeFixup(xmlSchemaTypePtr type,
-                   xmlSchemaParserCtxtPtr ctxt);
+                   xmlSchemaAbstractCtxtPtr ctxt);
 static const xmlChar *
 xmlSchemaFacetTypeToString(xmlSchemaTypeType type);
 static int
@@ -882,7 +1065,7 @@
 			 xmlNodePtr node, xmlSchemaTypeType type,
 			 int withParticle);
 static const xmlChar *
-xmlSchemaCompTypeToString(xmlSchemaTypeType type);
+xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item);
 static xmlSchemaTypeLinkPtr
 xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type);
 static void
@@ -890,7 +1073,8 @@
 		     const char *funcName,
 		     const char *message);
 static int
-xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type,
+xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr ctxt,
+			     xmlSchemaTypePtr type,
 			     xmlSchemaTypePtr baseType,
 			     int subset);
 static void
@@ -898,6 +1082,10 @@
 				   xmlSchemaParserCtxtPtr ctxt);
 static void
 xmlSchemaComponentListFree(xmlSchemaItemListPtr list);
+static xmlSchemaQNameRefPtr
+xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
+				xmlSchemaPtr schema,
+				xmlNodePtr node);
 
 /************************************************************************
  *									*
@@ -906,21 +1094,25 @@
  ************************************************************************/
 
 /**
- * xmlSchemaCompTypeToString:
+ * xmlSchemaItemTypeToStr:
  * @type: the type of the schema item
  *
  * Returns the component name of a schema item.
  */
 static const xmlChar *
-xmlSchemaCompTypeToString(xmlSchemaTypeType type)
+xmlSchemaItemTypeToStr(xmlSchemaTypeType type)
 {
     switch (type) {
+	case XML_SCHEMA_TYPE_BASIC:
+	    return(BAD_CAST "simple type definition");
 	case XML_SCHEMA_TYPE_SIMPLE:
 	    return(BAD_CAST "simple type definition");
 	case XML_SCHEMA_TYPE_COMPLEX:
 	    return(BAD_CAST "complex type definition");
 	case XML_SCHEMA_TYPE_ELEMENT:
 	    return(BAD_CAST "element declaration");
+	case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+	    return(BAD_CAST "attribute use");
 	case XML_SCHEMA_TYPE_ATTRIBUTE:
 	    return(BAD_CAST "attribute declaration");
 	case XML_SCHEMA_TYPE_GROUP:
@@ -950,12 +1142,34 @@
 	    return(BAD_CAST "wildcard (any)");
 	case XML_SCHEMA_EXTRA_QNAMEREF:
 	    return(BAD_CAST "[helper component] QName reference");
+	case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB:
+	    return(BAD_CAST "[helper component] attribute use prohibition");
 	default:
 	    return(BAD_CAST "Not a schema component");
     }
 }
 
 /**
+ * xmlSchemaGetComponentTypeStr:
+ * @type: the type of the schema item
+ *
+ * Returns the component name of a schema item.
+ */
+static const xmlChar *
+xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item)
+{
+    switch (item->type) {
+	case XML_SCHEMA_TYPE_BASIC:
+	    if (WXS_IS_COMPLEX(WXS_TYPE_CAST item))
+		return(BAD_CAST "complex type definition");
+	    else
+		return(BAD_CAST "simple type definition");	
+	default:
+	    return(xmlSchemaItemTypeToStr(item->type));
+    }
+}
+
+/**
  * xmlSchemaGetComponentNode:
  * @item: a schema component
  *
@@ -993,6 +1207,14 @@
 	case XML_SCHEMA_TYPE_IDC_KEY:
 	case XML_SCHEMA_TYPE_IDC_KEYREF:
 	    return (((xmlSchemaIDCPtr) item)->node);
+	case XML_SCHEMA_EXTRA_QNAMEREF:
+	    return(((xmlSchemaQNameRefPtr) item)->node);
+	/* TODO: What to do with NOTATIONs?
+	case XML_SCHEMA_TYPE_NOTATION:
+	    return (((xmlSchemaNotationPtr) item)->node);
+	*/
+	case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+	    return (((xmlSchemaAttributeUsePtr) item)->node);
 	default:
 	    return (NULL);
     }
@@ -1039,39 +1261,8 @@
 }
 #endif
 
-/**
- * xmlSchemaGetAttrName:
- * @attr:  the attribute declaration/use
- *
- * Returns the name of the attribute; if the attribute
- * is a reference, the name of the referenced global type will be returned.
- */
-static const xmlChar *
-xmlSchemaGetAttrName(xmlSchemaAttributePtr attr)
-{
-    if (attr->ref != NULL)
-	return(attr->ref);
-    else
-	return(attr->name);
-}
 
 /**
- * xmlSchemaGetAttrTargetNsURI:
- * @type:  the type (element or attribute)
- *
- * Returns the target namespace URI of the type; if the type is a reference,
- * the target namespace of the referenced type will be returned.
- */
-static const xmlChar *
-xmlSchemaGetAttrTargetNsURI(xmlSchemaAttributePtr attr)
-{
-    if (attr->ref != NULL)
-	return (attr->refNs);
-    else
-	return(attr->targetNamespace);
-}
-
-/**
  * xmlSchemaFormatQName:
  * @buf: the string buffer
  * @namespaceName:  the namespace name
@@ -1089,14 +1280,18 @@
 		     const xmlChar *localName)
 {
     FREE_AND_NULL(*buf)
-    if (namespaceName == NULL)
-	return(localName);
-
-    *buf = xmlStrdup(BAD_CAST "{");
-    *buf = xmlStrcat(*buf, namespaceName);
-    *buf = xmlStrcat(*buf, BAD_CAST "}");
-    *buf = xmlStrcat(*buf, localName);
-
+    if (namespaceName != NULL) {
+	*buf = xmlStrdup(BAD_CAST "{");
+	*buf = xmlStrcat(*buf, namespaceName);
+	*buf = xmlStrcat(*buf, BAD_CAST "}");
+    }
+    if (localName != NULL) {
+	if (namespaceName == NULL)
+	    return(localName);
+	*buf = xmlStrcat(*buf, localName);
+    } else {
+	*buf = xmlStrcat(*buf, BAD_CAST "(NULL)");
+    }    
     return ((const xmlChar *) *buf);
 }
 
@@ -1129,6 +1324,16 @@
 	case XML_SCHEMA_TYPE_IDC_UNIQUE:
 	case XML_SCHEMA_TYPE_IDC_KEYREF:
 	    return (((xmlSchemaIDCPtr) item)->name);
+	case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+	    if (WXS_ATTRUSE_DECL(item) != NULL) {
+		return(xmlSchemaGetComponentName(
+		    WXS_BASIC_CAST WXS_ATTRUSE_DECL(item)));
+	    } else
+		return(NULL);
+	case XML_SCHEMA_EXTRA_QNAMEREF:
+	    return (((xmlSchemaQNameRefPtr) item)->name);
+	case XML_SCHEMA_TYPE_NOTATION:
+	    return (((xmlSchemaNotationPtr) item)->name);
 	default:
 	    /*
 	    * Other components cannot have names.
@@ -1138,7 +1343,23 @@
     return (NULL);
 }
 
+#define xmlSchemaGetQNameRefName(r) (WXS_QNAME_CAST (r))->name
+#define xmlSchemaGetQNameRefTargetNs(r) (WXS_QNAME_CAST (r))->targetNamespace
+/*
 static const xmlChar *
+xmlSchemaGetQNameRefName(void *ref)
+{
+    return(((xmlSchemaQNameRefPtr) ref)->name);
+}
+
+static const xmlChar *
+xmlSchemaGetQNameRefTargetNs(void *ref)
+{
+    return(((xmlSchemaQNameRefPtr) ref)->targetNamespace);
+}
+*/
+
+static const xmlChar *
 xmlSchemaGetComponentTargetNs(xmlSchemaBasicItemPtr item)
 {
     switch (item->type) {
@@ -1159,6 +1380,17 @@
 	case XML_SCHEMA_TYPE_IDC_UNIQUE:
 	case XML_SCHEMA_TYPE_IDC_KEYREF:
 	    return (((xmlSchemaIDCPtr) item)->targetNamespace);
+	case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+	    if (WXS_ATTRUSE_DECL(item) != NULL) {
+		return(xmlSchemaGetComponentTargetNs(
+		    WXS_BASIC_CAST WXS_ATTRUSE_DECL(item)));
+	    }
+	    /* TODO: Will returning NULL break something? */
+	    break;
+	case XML_SCHEMA_EXTRA_QNAMEREF:
+	    return (((xmlSchemaQNameRefPtr) item)->targetNamespace);
+	case XML_SCHEMA_TYPE_NOTATION:
+	    return (((xmlSchemaNotationPtr) item)->targetNamespace);
 	default:
 	    /*
 	    * Other components cannot have names.
@@ -1178,18 +1410,25 @@
 }
 
 static const xmlChar*
-xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc)
+xmlSchemaGetComponentDesignation(xmlChar **buf, void *item)
 {
     xmlChar *str = NULL;
 
-    *buf = xmlStrcat(*buf, xmlSchemaCompTypeToString(idc->type));
+    *buf = xmlStrcat(*buf, WXS_ITEM_TYPE_NAME(item));
     *buf = xmlStrcat(*buf, BAD_CAST " '");
-    *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, idc));
+    *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str,
+	(xmlSchemaBasicItemPtr) item));
     *buf = xmlStrcat(*buf, BAD_CAST "'");
     FREE_AND_NULL(str);
     return(*buf);
 }
 
+static const xmlChar*
+xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc)
+{
+    return(xmlSchemaGetComponentDesignation(buf, idc));
+}
+
 /**
  * xmlSchemaWildcardPCToString:
  * @pc: the type of processContents
@@ -1316,7 +1555,7 @@
 static xmlChar*   
 xmlSchemaFormatItemForReport(xmlChar **buf,		     
 		     const xmlChar *itemDes,
-		     xmlSchemaTypePtr item,
+		     xmlSchemaBasicItemPtr item,
 		     xmlNodePtr itemNode)
 {
     xmlChar *str = NULL;
@@ -1331,84 +1570,99 @@
 	*buf = xmlStrdup(itemDes);	
     } else if (item != NULL) {
 	switch (item->type) {
-	case XML_SCHEMA_TYPE_BASIC:
-	    if (VARIETY_ATOMIC(item))
+	case XML_SCHEMA_TYPE_BASIC: {
+	    xmlSchemaTypePtr type = WXS_TYPE_CAST item;
+
+	    if (WXS_IS_ATOMIC(type))
 		*buf = xmlStrdup(BAD_CAST "atomic type 'xs:");
-	    else if (VARIETY_LIST(item))
+	    else if (WXS_IS_LIST(type))
 		*buf = xmlStrdup(BAD_CAST "list type 'xs:");
-	    else if (VARIETY_UNION(item))
+	    else if (WXS_IS_UNION(type))
 		*buf = xmlStrdup(BAD_CAST "union type 'xs:");
 	    else
 		*buf = xmlStrdup(BAD_CAST "simple type 'xs:");
-	    *buf = xmlStrcat(*buf, item->name);
+	    *buf = xmlStrcat(*buf, type->name);
 	    *buf = xmlStrcat(*buf, BAD_CAST "'");
+	    }
 	    break;
-	case XML_SCHEMA_TYPE_SIMPLE:
-	    if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) {
+	case XML_SCHEMA_TYPE_SIMPLE: {
+	    xmlSchemaTypePtr type = WXS_TYPE_CAST item;
+
+	    if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) {
 		*buf = xmlStrdup(BAD_CAST"");
 	    } else {
 		*buf = xmlStrdup(BAD_CAST "local ");
 	    }
-	    if (VARIETY_ATOMIC(item))
+	    if (WXS_IS_ATOMIC(type))
 		*buf = xmlStrcat(*buf, BAD_CAST "atomic type");
-	    else if (VARIETY_LIST(item))
+	    else if (WXS_IS_LIST(type))
 		*buf = xmlStrcat(*buf, BAD_CAST "list type");
-	    else if (VARIETY_UNION(item))
+	    else if (WXS_IS_UNION(type))
 		*buf = xmlStrcat(*buf, BAD_CAST "union type");
 	    else
 		*buf = xmlStrcat(*buf, BAD_CAST "simple type");
-	    if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) {
+	    if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) {
 		*buf = xmlStrcat(*buf, BAD_CAST " '");
-		*buf = xmlStrcat(*buf, item->name);
+		*buf = xmlStrcat(*buf, type->name);
 		*buf = xmlStrcat(*buf, BAD_CAST "'");
 	    }
+	    }
 	    break;
-	case XML_SCHEMA_TYPE_COMPLEX:
-	    if (item->flags & XML_SCHEMAS_TYPE_GLOBAL)
+	case XML_SCHEMA_TYPE_COMPLEX: {
+	    xmlSchemaTypePtr type = WXS_TYPE_CAST item;
+
+	    if (type->flags & XML_SCHEMAS_TYPE_GLOBAL)
 		*buf = xmlStrdup(BAD_CAST "");
 	    else
 		*buf = xmlStrdup(BAD_CAST "local ");
 	    *buf = xmlStrcat(*buf, BAD_CAST "complex type");
-	    if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) {
+	    if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) {
 		*buf = xmlStrcat(*buf, BAD_CAST " '");
-		*buf = xmlStrcat(*buf, item->name);
+		*buf = xmlStrcat(*buf, type->name);
 		*buf = xmlStrcat(*buf, BAD_CAST "'");
 	    }
+	    }
 	    break;
+	case XML_SCHEMA_TYPE_ATTRIBUTE_USE: {
+		xmlSchemaAttributeUsePtr ause;
+	    
+		ause = WXS_ATTR_USE_CAST item;
+		*buf = xmlStrdup(BAD_CAST "attribute use ");
+		if (WXS_ATTRUSE_DECL(ause) != NULL) {
+		    *buf = xmlStrcat(*buf, BAD_CAST "'");
+		    *buf = xmlStrcat(*buf,
+			xmlSchemaGetComponentQName(&str, WXS_ATTRUSE_DECL(ause)));
+		    FREE_AND_NULL(str)
+			*buf = xmlStrcat(*buf, BAD_CAST "'");
+		} else {
+		    *buf = xmlStrcat(*buf, BAD_CAST "(unknown)");
+		}
+	    }
+	    break;
 	case XML_SCHEMA_TYPE_ATTRIBUTE: {
 		xmlSchemaAttributePtr attr;
 	    
-		attr = (xmlSchemaAttributePtr) item;	    
-		if ((attr->flags & XML_SCHEMAS_ATTR_GLOBAL) ||
-		    (attr->ref == NULL)) {
-		    *buf = xmlStrdup(xmlSchemaElemDesAttrDecl);
-		    *buf = xmlStrcat(*buf, BAD_CAST " '");
-		    *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
-			attr->targetNamespace, attr->name));
-		    FREE_AND_NULL(str)
+		attr = (xmlSchemaAttributePtr) item;
+		*buf = xmlStrdup(BAD_CAST "attribute decl.");
+		*buf = xmlStrcat(*buf, BAD_CAST " '");
+		*buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
+		    attr->targetNamespace, attr->name));
+		FREE_AND_NULL(str)
 		    *buf = xmlStrcat(*buf, BAD_CAST "'");
-		} else {
-		    *buf = xmlStrdup(xmlSchemaElemDesAttrRef);
-		    *buf = xmlStrcat(*buf, BAD_CAST " '");
-		    *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
-			attr->refNs, attr->ref));
-		    FREE_AND_NULL(str)
-		    *buf = xmlStrcat(*buf, BAD_CAST "'");
-		}	
 	    }
 	    break;
+	case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+	    xmlSchemaGetComponentDesignation(buf, item);
+	    break;
 	case XML_SCHEMA_TYPE_ELEMENT: {
 		xmlSchemaElementPtr elem;
 
 		elem = (xmlSchemaElementPtr) item;	    
-		if ((elem->flags & XML_SCHEMAS_ELEM_GLOBAL) || 
-		    (elem->ref == NULL)) {
-		    *buf = xmlStrdup(xmlSchemaElemDesElemDecl);
-		    *buf = xmlStrcat(*buf, BAD_CAST " '");
-		    *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
-			elem->targetNamespace, elem->name));
-		    *buf = xmlStrcat(*buf, BAD_CAST "'");
-		}
+		*buf = xmlStrdup(BAD_CAST "element decl.");
+		*buf = xmlStrcat(*buf, BAD_CAST " '");
+		*buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
+		    elem->targetNamespace, elem->name));
+		*buf = xmlStrcat(*buf, BAD_CAST "'");
 	    }
 	    break;
 	case XML_SCHEMA_TYPE_IDC_UNIQUE:
@@ -1445,15 +1699,10 @@
 	    *buf = xmlStrcat(*buf, xmlSchemaFacetTypeToString(item->type));
 	    *buf = xmlStrcat(*buf, BAD_CAST "'");
 	    break;
-	case XML_SCHEMA_TYPE_NOTATION:
-	    *buf = xmlStrdup(BAD_CAST "notation");
-	    break;
 	case XML_SCHEMA_TYPE_GROUP: {
-		*buf = xmlStrdup(xmlSchemaElemModelGrDef);
+		*buf = xmlStrdup(BAD_CAST "model group def.");
 		*buf = xmlStrcat(*buf, BAD_CAST " '");
-		*buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
-		    ((xmlSchemaModelGroupDefPtr) item)->targetNamespace,
-		    ((xmlSchemaModelGroupDefPtr) item)->name));
+		*buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item));
 		*buf = xmlStrcat(*buf, BAD_CAST "'");
 		FREE_AND_NULL(str)
 	    }
@@ -1462,8 +1711,15 @@
 	case XML_SCHEMA_TYPE_CHOICE:
 	case XML_SCHEMA_TYPE_ALL:
 	case XML_SCHEMA_TYPE_PARTICLE:
-	    *buf = xmlStrdup(xmlSchemaCompTypeToString(item->type));
-	    break;	
+	    *buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item));
+	    break;
+	case XML_SCHEMA_TYPE_NOTATION: {
+		*buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item));
+		*buf = xmlStrcat(*buf, BAD_CAST " '");
+		*buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item));
+		*buf = xmlStrcat(*buf, BAD_CAST "'");
+		FREE_AND_NULL(str);
+	    }
 	default:
 	    named = 0;
 	}
@@ -1575,6 +1831,13 @@
 }
 #endif
 
+static void
+xmlSchemaPSimpleErr(const char *msg)
+{
+    __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, NULL, NULL,
+                     msg);
+}
+
 /**
  * xmlSchemaPErrMemory:
  * @node: a context node
@@ -1613,8 +1876,9 @@
 
     if (ctxt != NULL) {
         ctxt->nberrors++;
+	ctxt->err = error;
         channel = ctxt->error;
-        data = ctxt->userData;
+        data = ctxt->errCtxt;
 	schannel = ctxt->serror;
     }
     __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP,
@@ -1678,8 +1942,9 @@
 
     if (ctxt != NULL) {
         ctxt->nberrors++;
+	ctxt->err = error;
         channel = ctxt->error;
-        data = ctxt->userData;
+        data = ctxt->errCtxt;
 	schannel = ctxt->serror;
     }
     __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP,
@@ -1737,11 +2002,11 @@
  * Handle a validation error
  */
 static void
-xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt,
+xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
 		  xmlErrorLevel errorLevel,
 		  int error, xmlNodePtr node, int line, const char *msg,
 		  const xmlChar *str1, const xmlChar *str2,
-		  const xmlChar *str3)
+		  const xmlChar *str3, const xmlChar *str4)
 {
     xmlStructuredErrorFunc schannel = NULL;
     xmlGenericErrorFunc channel = NULL;
@@ -1759,7 +2024,7 @@
 		channel = vctxt->warning;
 	    }
 	    schannel = vctxt->serror;
-	    data = vctxt->userData;
+	    data = vctxt->errCtxt;
 
 	    /*
 	    * Error node. If we specify a line number, then
@@ -1799,7 +2064,7 @@
 		node, XML_FROM_SCHEMASV,
 		error, errorLevel, file, line,
 		(const char *) str1, (const char *) str2,
-		(const char *) str3, 0, 0, msg, str1, str2, str3);
+		(const char *) str3, 0, 0, msg, str1, str2, str3, str4);
 
 	} else if (ctxt->type == XML_SCHEMA_CTXT_PARSER) {
 	    xmlSchemaParserCtxtPtr pctxt = (xmlSchemaParserCtxtPtr) ctxt;
@@ -1811,12 +2076,12 @@
 		channel = pctxt->warning;
 	    }
 	    schannel = pctxt->serror;
-	    data = pctxt->userData;
+	    data = pctxt->errCtxt;
 	    __xmlRaiseError(schannel, channel, data, ctxt,
 		node, XML_FROM_SCHEMASP, error,
 		errorLevel, NULL, 0,
 		(const char *) str1, (const char *) str2,
-		(const char *) str3, 0, 0, msg, str1, str2, str3);
+		(const char *) str3, 0, 0, msg, str1, str2, str3, str4);
 	} else {
 	    TODO
 	}
@@ -1840,16 +2105,26 @@
 	      int error, xmlNodePtr node, const char *msg,
 	      const xmlChar *str1, const xmlChar *str2, const xmlChar *str3)
 {
-    xmlSchemaErr3Line(actxt, XML_ERR_ERROR, error, node, 0,
-	msg, str1, str2, str3);
+    xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0,
+	msg, str1, str2, str3, NULL);
 }
 
 static void
+xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt,  
+	      int error, xmlNodePtr node, const char *msg,
+	      const xmlChar *str1, const xmlChar *str2,
+	      const xmlChar *str3, const xmlChar *str4)
+{
+    xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0,
+	msg, str1, str2, str3, str4);
+}
+
+static void
 xmlSchemaErr(xmlSchemaAbstractCtxtPtr actxt,
 	     int error, xmlNodePtr node, const char *msg,
 	     const xmlChar *str1, const xmlChar *str2)
 {
-    xmlSchemaErr3(actxt, error, node, msg, str1, str2, NULL);
+    xmlSchemaErr4(actxt, error, node, msg, str1, str2, NULL, NULL);
 }
 
 static xmlChar *
@@ -1859,6 +2134,19 @@
 {
     xmlChar *str = NULL;
 
+    *msg = NULL;
+    if ((node != NULL) &&
+	(node->type != XML_ELEMENT_NODE) &&
+	(node->type != XML_ATTRIBUTE_NODE))
+    {
+	/* 
+	* Don't try to format other nodes than element and
+	* attribute nodes.
+	* Play save and return an empty string.
+	*/
+	*msg = xmlStrdup(BAD_CAST "");
+	return(*msg);
+    }
     if (node != NULL) {
 	/*
 	* Work on tree nodes.
@@ -1923,7 +2211,7 @@
     * VAL TODO: The output of the given schema component is currently
     * disabled.
     */
-#if 0    
+#if 0
     if ((type != NULL) && (xmlSchemaIsGlobalItem(type))) {
 	*msg = xmlStrcat(*msg, BAD_CAST " [");
 	*msg = xmlStrcat(*msg, xmlSchemaFormatItemForReport(&str,
@@ -1983,25 +2271,46 @@
 #endif
 
 static void
-xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt,
+xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt,
 		   xmlParserErrors error,
 		   xmlNodePtr node,
-		   xmlSchemaTypePtr type ATTRIBUTE_UNUSED,
+		   xmlSchemaBasicItemPtr item,
 		   const char *message,
-		   const xmlChar *str1,
-		   const xmlChar *str2)
+		   const xmlChar *str1, const xmlChar *str2,
+		   const xmlChar *str3, const xmlChar *str4)
 {
     xmlChar *msg = NULL;
 
-    xmlSchemaFormatNodeForError(&msg, actxt, node);
+    if ((node == NULL) && (item != NULL) &&
+	(actxt->type == XML_SCHEMA_CTXT_PARSER)) {
+	node = WXS_ITEM_NODE(item);
+	xmlSchemaFormatItemForReport(&msg, NULL, item, NULL);
+	msg = xmlStrcat(msg, BAD_CAST ": ");
+    } else
+	xmlSchemaFormatNodeForError(&msg, actxt, node);
     msg = xmlStrcat(msg, (const xmlChar *) message);
     msg = xmlStrcat(msg, BAD_CAST ".\n");   
-    xmlSchemaErr(actxt, error, node,
-	(const char *) msg, str1, str2);
+    xmlSchemaErr4(actxt, error, node,
+	(const char *) msg, str1, str2, str3, str4);
     FREE_AND_NULL(msg)
 }
 
 static void
+xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt,
+		   xmlParserErrors error,
+		   xmlNodePtr node,
+		   xmlSchemaBasicItemPtr item,
+		   const char *message,
+		   const xmlChar *str1,
+		   const xmlChar *str2)
+{
+    xmlSchemaCustomErr4(actxt, error, node, item,
+	message, str1, str2, NULL, NULL);    
+}
+
+
+
+static void
 xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt,
 		   xmlParserErrors error,
 		   xmlNodePtr node,
@@ -2018,8 +2327,8 @@
     msg = xmlStrcat(msg, BAD_CAST ".\n"); 
     
     /* URGENT TODO: Set the error code to something sane. */
-    xmlSchemaErr3Line(actxt, XML_ERR_WARNING, error, node, 0,
-	(const char *) msg, str1, str2, str3);
+    xmlSchemaErr4Line(actxt, XML_ERR_WARNING, error, node, 0,
+	(const char *) msg, str1, str2, str3, NULL);
 
     FREE_AND_NULL(msg)
 }
@@ -2040,12 +2349,12 @@
     msg = xmlStrdup(BAD_CAST "Element '%s': ");        
     msg = xmlStrcat(msg, (const xmlChar *) message);
     msg = xmlStrcat(msg, BAD_CAST ".\n");
-    xmlSchemaErr3Line(ACTXT_CAST vctxt, XML_ERR_ERROR,
+    xmlSchemaErr4Line(ACTXT_CAST vctxt, XML_ERR_ERROR,
 	error, NULL, idcNode->nodeLine, (const char *) msg,
 	xmlSchemaFormatQName(&qname,
 	    vctxt->nodeQNames->items[idcNode->nodeQNameID +1],
 	    vctxt->nodeQNames->items[idcNode->nodeQNameID]), 
-	str1, str2);
+	str1, str2, NULL);
     FREE_AND_NULL(qname);
     FREE_AND_NULL(msg);
 }
@@ -2114,11 +2423,11 @@
     else
 	msg = xmlStrcat(msg, BAD_CAST "the ");
 
-    if (VARIETY_ATOMIC(type))
+    if (WXS_IS_ATOMIC(type))
 	msg = xmlStrcat(msg, BAD_CAST "atomic type");
-    else if (VARIETY_LIST(type))
+    else if (WXS_IS_LIST(type))
 	msg = xmlStrcat(msg, BAD_CAST "list type");
-    else if (VARIETY_UNION(type))
+    else if (WXS_IS_UNION(type))
 	msg = xmlStrcat(msg, BAD_CAST "union type");
 
     if (xmlSchemaIsGlobalItem(type)) {
@@ -2188,7 +2497,7 @@
     xmlChar *str = NULL, *msg = NULL;
     xmlChar *localName, *nsName;
     const xmlChar *cur, *end;
-    int i, is_not;
+    int i;
     
     xmlSchemaFormatNodeForError(&msg, actxt, node);
     msg = xmlStrcat(msg, (const xmlChar *) message);
@@ -2211,11 +2520,8 @@
 	        continue;
 	    if ((cur[0] == 'n') && (cur[1] == 'o') && (cur[2] == 't') &&
 	        (cur[3] == ' ')) {
-	        is_not = 1;
 		cur += 4;
 		str = xmlStrcat(str, BAD_CAST "##other");
-	    } else {
-	        is_not = 0;
 	    }
 	    /*
 	    * Get the local name.
@@ -2366,12 +2672,12 @@
 	    xmlSchemaErr(actxt, error, node, (const char *) msg, value,
 		facet->value);
 	} else if (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE) {
-	    msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than "
+	    msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be greater than "
 		"'%s'.\n");
 	    xmlSchemaErr(actxt, error, node, (const char *) msg, value,
 		facet->value);
 	} else if (facetType == XML_SCHEMA_FACET_MAXEXCLUSIVE) {
-	    msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be more than "
+	    msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than "
 		"'%s'.\n");
 	    xmlSchemaErr(actxt, error, node, (const char *) msg, value,
 		facet->value);
@@ -2427,7 +2733,7 @@
 static void
 xmlSchemaPMissingAttrErr(xmlSchemaParserCtxtPtr ctxt,
 			 xmlParserErrors error,
-			 xmlSchemaTypePtr ownerItem,
+			 xmlSchemaBasicItemPtr ownerItem,
 			 xmlNodePtr ownerElem,
 			 const char *name,
 			 const char *message)
@@ -2464,7 +2770,7 @@
 static void
 xmlSchemaPResCompAttrErr(xmlSchemaParserCtxtPtr ctxt,
 			 xmlParserErrors error,
-			 xmlSchemaTypePtr ownerItem,
+			 xmlSchemaBasicItemPtr ownerItem,
 			 xmlNodePtr ownerElem,
 			 const char *name,
 			 const xmlChar *refName,
@@ -2476,7 +2782,7 @@
 
     xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
     if (refTypeStr == NULL)
-	refTypeStr = (const char *) xmlSchemaCompTypeToString(refType);
+	refTypeStr = (const char *) xmlSchemaItemTypeToStr(refType);
 	xmlSchemaPErrExt(ctxt, ownerElem, error,
 	    NULL, NULL, NULL,
 	    "%s, attribute '%s': The QName value '%s' does not resolve to a(n) "
@@ -2501,7 +2807,7 @@
 xmlSchemaPCustomAttrErr(xmlSchemaParserCtxtPtr ctxt,
 			xmlParserErrors error,
 			xmlChar **ownerDes,
-			xmlSchemaTypePtr ownerItem,
+			xmlSchemaBasicItemPtr ownerItem,
 			xmlAttrPtr attr,
 			const char *msg)
 {
@@ -2534,52 +2840,21 @@
 static void
 xmlSchemaPIllegalAttrErr(xmlSchemaParserCtxtPtr ctxt,
 			 xmlParserErrors error,
-			 xmlChar **ownerDes,
-			 xmlSchemaTypePtr ownerItem,
+			 xmlSchemaBasicItemPtr ownerComp ATTRIBUTE_UNUSED,
 			 xmlAttrPtr attr)
 {
-    xmlChar *des = NULL, *strA = NULL;
+    xmlChar *strA = NULL, *strB = NULL;
 
-    if (ownerDes == NULL)
-	xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent);
-    else if (*ownerDes == NULL) {
-	xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent);
-	des = *ownerDes;
-    } else
-	des = *ownerDes;
-    xmlSchemaPErr(ctxt, (xmlNodePtr) attr, error,
-	"%s: The attribute '%s' is not allowed.\n", BAD_CAST des,
-	xmlSchemaFormatQNameNs(&strA, attr->ns, attr->name));
-    if (ownerDes == NULL)
-	FREE_AND_NULL(des);
+    xmlSchemaFormatNodeForError(&strA, ACTXT_CAST ctxt, attr->parent);
+    xmlSchemaErr4(ACTXT_CAST ctxt, error, (xmlNodePtr) attr,
+	"%sThe attribute '%s' is not allowed.\n", BAD_CAST strA,
+	xmlSchemaFormatQNameNs(&strB, attr->ns, attr->name),
+	NULL, NULL);
     FREE_AND_NULL(strA);
+    FREE_AND_NULL(strB);
 }
 
 /**
- * xmlSchemaPAquireDes:
- * @des: the first designation
- * @itemDes: the second designation
- * @item: the schema item
- * @itemElem: the node of the schema item
- *
- * Creates a designation for an item.
- */
-static void
-xmlSchemaPAquireDes(xmlChar **des,
-		    xmlChar **itemDes,
-		    xmlSchemaTypePtr item,
-		    xmlNodePtr itemElem)
-{
-    if (itemDes == NULL)
-	xmlSchemaFormatItemForReport(des, NULL, item, itemElem);
-    else if (*itemDes == NULL) {
-	xmlSchemaFormatItemForReport(itemDes, NULL, item, itemElem);
-	*des = *itemDes;
-    } else
-	*des = *itemDes;
-}
-
-/**
  * xmlSchemaPCustomErr:
  * @ctxt: the schema parser context
  * @error: the error code
@@ -2596,8 +2871,7 @@
 static void
 xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt,
 		    xmlParserErrors error,
-		    xmlChar **itemDes,
-		    xmlSchemaTypePtr item,
+		    xmlSchemaBasicItemPtr item,
 		    xmlNodePtr itemElem,
 		    const char *message,
 		    const xmlChar *str1,
@@ -2606,16 +2880,15 @@
 {
     xmlChar *des = NULL, *msg = NULL;
 
-    xmlSchemaPAquireDes(&des, itemDes, item, itemElem);
+    xmlSchemaFormatItemForReport(&des, NULL, item, itemElem);
     msg = xmlStrdup(BAD_CAST "%s: ");
     msg = xmlStrcat(msg, (const xmlChar *) message);
     msg = xmlStrcat(msg, BAD_CAST ".\n");
     if ((itemElem == NULL) && (item != NULL))
-	itemElem = item->node;
+	itemElem = WXS_ITEM_NODE(item);
     xmlSchemaPErrExt(ctxt, itemElem, error, NULL, NULL, NULL,
 	(const char *) msg, BAD_CAST des, str1, str2, str3, NULL);
-    if (itemDes == NULL)
-	FREE_AND_NULL(des);
+    FREE_AND_NULL(des);
     FREE_AND_NULL(msg);
 }
 
@@ -2634,13 +2907,12 @@
 static void
 xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt,
 		    xmlParserErrors error,
-		    xmlChar **itemDes,
-		    xmlSchemaTypePtr item,
+		    xmlSchemaBasicItemPtr item,
 		    xmlNodePtr itemElem,
 		    const char *message,
 		    const xmlChar *str1)
 {
-    xmlSchemaPCustomErrExt(ctxt, error, itemDes, item, itemElem, message,
+    xmlSchemaPCustomErrExt(ctxt, error, item, itemElem, message,
 	str1, NULL, NULL);
 }
 
@@ -2658,25 +2930,28 @@
  * Reports an attribute use error during parsing.
  */
 static void
-xmlSchemaPAttrUseErr(xmlSchemaParserCtxtPtr ctxt,
+xmlSchemaPAttrUseErr4(xmlSchemaParserCtxtPtr ctxt,
 		    xmlParserErrors error,
-		    xmlSchemaTypePtr item,
-		    const xmlSchemaAttributePtr attr,
+		    xmlNodePtr node,
+		    xmlSchemaBasicItemPtr ownerItem,
+		    const xmlSchemaAttributeUsePtr attruse,
 		    const char *message,
-		    const xmlChar *str1)
+		    const xmlChar *str1, const xmlChar *str2,
+		    const xmlChar *str3,const xmlChar *str4)
 {
     xmlChar *str = NULL, *msg = NULL;
-    xmlSchemaFormatItemForReport(&msg, NULL, item, NULL);
-    msg = xmlStrcat(msg, BAD_CAST ", ");
+    
+    xmlSchemaFormatItemForReport(&msg, NULL, ownerItem, NULL);
+    msg = xmlStrcat(msg, BAD_CAST ", ");    
     msg = xmlStrcat(msg,
 	BAD_CAST xmlSchemaFormatItemForReport(&str, NULL,
-	(xmlSchemaTypePtr) attr, NULL));
+	WXS_BASIC_CAST attruse, NULL));
     FREE_AND_NULL(str);
     msg = xmlStrcat(msg, BAD_CAST ": ");
     msg = xmlStrcat(msg, (const xmlChar *) message);
     msg = xmlStrcat(msg, BAD_CAST ".\n");
-    xmlSchemaPErr(ctxt, attr->node, error,
-	(const char *) msg, str1, NULL);
+    xmlSchemaErr4(ACTXT_CAST ctxt, error, node, 
+	(const char *) msg, str1, str2, str3, str4);
     xmlFree(msg);
 }
 
@@ -2684,9 +2959,8 @@
  * xmlSchemaPIllegalFacetAtomicErr:
  * @ctxt: the schema parser context
  * @error: the error code
- * @itemDes: the designation of the type
- * @item: the schema type
- * @baseItem: the base type of type
+ * @type: the schema type
+ * @baseType: the base type of type
  * @facet: the illegal facet
  *
  * Reports an illegal facet for atomic simple types.
@@ -2694,22 +2968,20 @@
 static void
 xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt,
 			  xmlParserErrors error,
-			  xmlChar **itemDes,
-			  xmlSchemaTypePtr item,
-			  xmlSchemaTypePtr baseItem,
+			  xmlSchemaTypePtr type,
+			  xmlSchemaTypePtr baseType,
 			  xmlSchemaFacetPtr facet)
 {
     xmlChar *des = NULL, *strT = NULL;
 
-    xmlSchemaPAquireDes(&des, itemDes, item, item->node);
-    xmlSchemaPErrExt(ctxt, item->node, error, NULL, NULL, NULL,
+    xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type, type->node);
+    xmlSchemaPErrExt(ctxt, type->node, error, NULL, NULL, NULL,
 	"%s: The facet '%s' is not allowed on types derived from the "
 	"type %s.\n",
 	BAD_CAST des, xmlSchemaFacetTypeToString(facet->type),
-	xmlSchemaFormatItemForReport(&strT, NULL, baseItem, NULL),
+	xmlSchemaFormatItemForReport(&strT, NULL, WXS_BASIC_CAST baseType, NULL),
 	NULL, NULL);
-    if (itemDes == NULL)
-	FREE_AND_NULL(des);
+    FREE_AND_NULL(des);
     FREE_AND_NULL(strT);
 }
 
@@ -2726,18 +2998,17 @@
 static void
 xmlSchemaPIllegalFacetListUnionErr(xmlSchemaParserCtxtPtr ctxt,
 			  xmlParserErrors error,
-			  xmlChar **itemDes,
-			  xmlSchemaTypePtr item,
+			  xmlSchemaTypePtr type,
 			  xmlSchemaFacetPtr facet)
 {
     xmlChar *des = NULL, *strT = NULL;
 
-    xmlSchemaPAquireDes(&des, itemDes, item, item->node);
-    xmlSchemaPErr(ctxt, item->node, error,
+    xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type,
+	type->node);
+    xmlSchemaPErr(ctxt, type->node, error,
 	"%s: The facet '%s' is not allowed.\n",
 	BAD_CAST des, xmlSchemaFacetTypeToString(facet->type));
-    if (itemDes == NULL)
-	FREE_AND_NULL(des);
+    FREE_AND_NULL(des);
     FREE_AND_NULL(strT);
 }
 
@@ -2754,26 +3025,18 @@
 static void
 xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt,
 			 xmlParserErrors error,
-			 xmlChar **ownerDes,
-			 xmlSchemaTypePtr ownerItem,
+			 xmlSchemaBasicItemPtr ownerItem,
 			 xmlAttrPtr attr,
 			 const char *name1,
 			 const char *name2)
 {
     xmlChar *des = NULL;
 
-    if (ownerDes == NULL)
-	xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent);
-    else if (*ownerDes == NULL) {
-	xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent);
-	des = *ownerDes;
-    } else
-	des = *ownerDes;
+    xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST ownerItem, attr->parent);
     xmlSchemaPErrExt(ctxt, (xmlNodePtr) attr, error, NULL, NULL, NULL,
 	"%s: The attributes '%s' and '%s' are mutually exclusive.\n",
 	BAD_CAST des, BAD_CAST name1, BAD_CAST name2, NULL, NULL);
-    if (ownerDes == NULL)
-	FREE_AND_NULL(des)
+    FREE_AND_NULL(des);
 }
 
 /**
@@ -2792,7 +3055,7 @@
 static void
 xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, 
 			xmlParserErrors error,
-			xmlSchemaTypePtr ownerItem ATTRIBUTE_UNUSED,
+			xmlSchemaBasicItemPtr ownerItem ATTRIBUTE_UNUSED,
 			xmlNodePtr node,
 			xmlSchemaTypePtr type,
 			const char *expected,
@@ -2819,11 +3082,11 @@
 	    else
 		msg = xmlStrcat(msg, BAD_CAST "the ");
 	    
-	    if (VARIETY_ATOMIC(type))
+	    if (WXS_IS_ATOMIC(type))
 		msg = xmlStrcat(msg, BAD_CAST "atomic type");
-	    else if (VARIETY_LIST(type))
+	    else if (WXS_IS_LIST(type))
 		msg = xmlStrcat(msg, BAD_CAST "list type");
-	    else if (VARIETY_UNION(type))
+	    else if (WXS_IS_UNION(type))
 		msg = xmlStrcat(msg, BAD_CAST "union type");
 	    
 	    if (xmlSchemaIsGlobalItem(type)) {
@@ -2882,8 +3145,7 @@
 static void
 xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt,
 		     xmlParserErrors error,
-		     xmlChar **ownerDes,
-		     xmlSchemaTypePtr ownerItem,
+		     xmlSchemaBasicItemPtr ownerItem,
 		     xmlNodePtr ownerElem,
 		     xmlNodePtr child,
 		     const char *message,
@@ -2891,13 +3153,7 @@
 {
     xmlChar *des = NULL;
 
-    if (ownerDes == NULL)
-	xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
-    else if (*ownerDes == NULL) {
-	xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, ownerElem);
-	des = *ownerDes;
-    } else
-	des = *ownerDes;
+    xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
     if (message != NULL)
 	xmlSchemaPErr2(ctxt, ownerElem, child, error,
 	    "%s: %s.\n",
@@ -2913,8 +3169,7 @@
 		BAD_CAST des, NULL);
 	}
     }
-    if (ownerDes == NULL)
-	FREE_AND_NULL(des)
+    FREE_AND_NULL(des)
 }
 
 /************************************************************************
@@ -3056,11 +3311,144 @@
 	    return(-1);
 	}
     }
-    /* ((xmlSchemaBasicItemPtr *) list->items)[list->nbItems++] = (void *) item; */
     list->items[list->nbItems++] = item;
     return(0);
 }
 
+static int
+xmlSchemaItemListAddSize(xmlSchemaItemListPtr list,
+			 int initialSize,
+			 void *item)
+{
+    if (list->items == NULL) {
+	if (initialSize <= 0)
+	    initialSize = 1;
+	list->items = (void **) xmlMalloc(
+	    initialSize * sizeof(void *));
+	if (list->items == NULL) {
+	    xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
+	    return(-1);
+	}
+	list->sizeItems = initialSize;
+    } else if (list->sizeItems <= list->nbItems) {
+	list->sizeItems *= 2;
+	list->items = (void **) xmlRealloc(list->items,
+	    list->sizeItems * sizeof(void *));
+	if (list->items == NULL) {
+	    xmlSchemaPErrMemory(NULL, "growing item list", NULL);
+	    list->sizeItems = 0;
+	    return(-1);
+	}
+    }
+    list->items[list->nbItems++] = item;
+    return(0);
+}
+
+static int
+xmlSchemaItemListInsert(xmlSchemaItemListPtr list, void *item, int idx)
+{    
+    if (list->items == NULL) {
+	list->items = (void **) xmlMalloc(
+	    20 * sizeof(void *));
+	if (list->items == NULL) {
+	    xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
+	    return(-1);
+	}
+	list->sizeItems = 20;
+    } else if (list->sizeItems <= list->nbItems) {
+	list->sizeItems *= 2;
+	list->items = (void **) xmlRealloc(list->items,
+	    list->sizeItems * sizeof(void *));
+	if (list->items == NULL) {
+	    xmlSchemaPErrMemory(NULL, "growing item list", NULL);
+	    list->sizeItems = 0;
+	    return(-1);
+	}
+    }
+    /*
+    * Just append if the index is greater/equal than the item count.
+    */
+    if (idx >= list->nbItems) {
+	list->items[list->nbItems++] = item;
+    } else {
+	int i;
+	for (i = list->nbItems; i > idx; i--)
+	    list->items[i] = list->items[i-1];
+	list->items[idx] = item;
+	list->nbItems++;
+    }
+    return(0);
+}
+
+#if 0 /* enable if ever needed */
+static int
+xmlSchemaItemListInsertSize(xmlSchemaItemListPtr list,
+			    int initialSize,
+			    void *item,
+			    int idx)
+{    
+    if (list->items == NULL) {
+	if (initialSize <= 0)
+	    initialSize = 1;
+	list->items = (void **) xmlMalloc(
+	    initialSize * sizeof(void *));
+	if (list->items == NULL) {
+	    xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
+	    return(-1);
+	}
+	list->sizeItems = initialSize;
+    } else if (list->sizeItems <= list->nbItems) {
+	list->sizeItems *= 2;
+	list->items = (void **) xmlRealloc(list->items,
+	    list->sizeItems * sizeof(void *));
+	if (list->items == NULL) {
+	    xmlSchemaPErrMemory(NULL, "growing item list", NULL);
+	    list->sizeItems = 0;
+	    return(-1);
+	}
+    }
+    /*
+    * Just append if the index is greater/equal than the item count.
+    */
+    if (idx >= list->nbItems) {
+	list->items[list->nbItems++] = item;
+    } else {
+	int i;
+	for (i = list->nbItems; i > idx; i--)
+	    list->items[i] = list->items[i-1];
+	list->items[idx] = item;
+	list->nbItems++;
+    }
+    return(0);
+}
+#endif
+
+static int
+xmlSchemaItemListRemove(xmlSchemaItemListPtr list, int idx)
+{
+    int i;
+    if ((list->items == NULL) || (idx >= list->nbItems)) {
+	xmlSchemaPSimpleErr("Internal error: xmlSchemaItemListRemove, "
+	    "index error.\n");
+	return(-1);
+    }
+
+    if (list->nbItems == 1) {
+	/* TODO: Really free the list? */
+	xmlFree(list->items);
+	list->items = NULL;
+	list->nbItems = 0;
+	list->sizeItems = 0;
+    } else if (list->nbItems -1 == idx) {
+	list->nbItems--;
+    } else {	
+	for (i = idx; i < list->nbItems -1; i++)
+	    list->items[i] = list->items[i+1];
+	list->nbItems--;
+    }
+    return(0);
+}
+
 /**
  * xmlSchemaItemListFree:
  * @annot:  a schema type structure
@@ -3102,30 +3490,28 @@
 	xmlFreeDoc(bucket->doc);
     } 
     if (bucket->type == XML_SCHEMA_SCHEMA_IMPORT) {
-	if (IMPBUCKET_CAST(bucket)->schema != NULL)
-	    xmlSchemaFree(IMPBUCKET_CAST(bucket)->schema);
+	if (WXS_IMPBUCKET(bucket)->schema != NULL)
+	    xmlSchemaFree(WXS_IMPBUCKET(bucket)->schema);
     }
     xmlFree(bucket);
 }
 
 static xmlSchemaBucketPtr
 xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt,
-			 int type,
-			 const xmlChar *targetNamespace)
+			 int type, const xmlChar *targetNamespace)
 {
     xmlSchemaBucketPtr ret;
-    xmlSchemaConstructionCtxtPtr constr = pctxt->constructor;
     int size;
     xmlSchemaPtr mainSchema;
 
-    if (constr->schema == NULL) {
+    if (WXS_CONSTRUCTOR(pctxt)->mainSchema == NULL) {
 	PERROR_INT("xmlSchemaBucketCreate",
 	    "no main schema on constructor");
 	return(NULL);
     }
-    mainSchema = constr->schema;
+    mainSchema = WXS_CONSTRUCTOR(pctxt)->mainSchema;
     /* Create the schema bucket. */
-    if (WXS_IS_INCREDEF(type))
+    if (WXS_IS_BUCKET_INCREDEF(type))
 	size = sizeof(xmlSchemaInclude);
     else
 	size = sizeof(xmlSchemaImport);
@@ -3137,13 +3523,23 @@
     memset(ret, 0, size);
     ret->targetNamespace = targetNamespace;
     ret->type = type;
+    ret->globals = xmlSchemaItemListCreate();
+    if (ret->globals == NULL) {
+	xmlFree(ret);
+	return(NULL);
+    }
+    ret->locals = xmlSchemaItemListCreate();
+    if (ret->locals == NULL) {
+	xmlFree(ret);
+	return(NULL);
+    }
     /* 
     * The following will assure that only the first bucket is marked as
     * XML_SCHEMA_SCHEMA_MAIN and it points to the *main* schema.
     * For each following import buckets an xmlSchema will be created.
     */
     if (! WXS_HAS_BUCKETS(pctxt)) {
-	if (WXS_IS_INCREDEF(type)) {
+	if (WXS_IS_BUCKET_INCREDEF(type)) {
 	    PERROR_INT("xmlSchemaBucketCreate",
 		"first bucket but it's an include or redefine");
 	    xmlSchemaBucketFree(ret);
@@ -3152,7 +3548,8 @@
 	/* Force the type to be XML_SCHEMA_SCHEMA_MAIN. */ 
 	ret->type = XML_SCHEMA_SCHEMA_MAIN;
 	/* Point to the *main* schema. */
-	IMPBUCKET_CAST(ret)->schema = mainSchema;
+	WXS_CONSTRUCTOR(pctxt)->mainBucket = ret;
+	WXS_IMPBUCKET(ret)->schema = mainSchema;
     } else {
 	if (type == XML_SCHEMA_SCHEMA_MAIN) {	    
 	    PERROR_INT("xmlSchemaBucketCreate",
@@ -3163,18 +3560,19 @@
 	    /*
 	    * Create a schema for imports.
 	    */
-	    IMPBUCKET_CAST(ret)->schema = xmlSchemaNewSchema(pctxt);
-	    if (IMPBUCKET_CAST(ret)->schema == NULL) {
+	    WXS_IMPBUCKET(ret)->schema = xmlSchemaNewSchema(pctxt);
+	    if (WXS_IMPBUCKET(ret)->schema == NULL) {
 		xmlSchemaBucketFree(ret);
 		return(NULL);
 	    }
 	}
     }    
-    if (WXS_IS_IMPMAIN(type)) {
+    if (WXS_IS_BUCKET_IMPMAIN(type)) {
 	int res;
-	/* Imports got into the "schemasImports" slot of the main *schema*. */
+	/* Imports go into the "schemasImports" slot of the main *schema*. */
 	if (mainSchema->schemasImports == NULL) {
-	    mainSchema->schemasImports = xmlHashCreateDict(5, constr->dict);
+	    mainSchema->schemasImports = xmlHashCreateDict(5,
+		WXS_CONSTRUCTOR(pctxt)->dict);
 	    if (mainSchema->schemasImports == NULL) {
 		xmlSchemaBucketFree(ret);
 		return(NULL);
@@ -3194,12 +3592,12 @@
 	}
     } else {
 	/* Set the @ownerImport of an include bucket. */
-	if (WXS_IS_IMPMAIN(constr->bucket->type))
-	    INCBUCKET_CAST(ret)->ownerImport =
-		IMPBUCKET_CAST(constr->bucket);
+	if (WXS_IS_BUCKET_IMPMAIN(WXS_CONSTRUCTOR(pctxt)->bucket->type))
+	    WXS_INCBUCKET(ret)->ownerImport =
+		WXS_IMPBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket);
 	else
-	    INCBUCKET_CAST(ret)->ownerImport =
-		INCBUCKET_CAST(constr->bucket)->ownerImport;
+	    WXS_INCBUCKET(ret)->ownerImport =
+		WXS_INCBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket)->ownerImport;
 
 	/* Includes got into the "includes" slot of the *main* schema. */
 	if (mainSchema->includes == NULL) {
@@ -3215,20 +3613,20 @@
     * Add to list of all buckets; this is used for lookup
     * during schema construction time only.
     */
-    if (xmlSchemaItemListAdd(constr->buckets, ret) == -1)
+    if (xmlSchemaItemListAdd(WXS_CONSTRUCTOR(pctxt)->buckets, ret) == -1)
 	return(NULL);
     return(ret);
 }
 
 static int
-xmlSchemaAddItem(xmlSchemaItemListPtr *list, void *item)
+xmlSchemaAddItemSize(xmlSchemaItemListPtr *list, int initialSize, void *item)
 {
     if (*list == NULL) {
 	*list = xmlSchemaItemListCreate();
 	if (*list == NULL)
 	    return(-1);
     }
-    xmlSchemaItemListAdd(*list, item);
+    xmlSchemaItemListAddSize(*list, initialSize, item);
     return(0);
 }
 
@@ -3272,9 +3670,9 @@
 
 /**
  * xmlSchemaFreeAttribute:
- * @schema:  a schema attribute structure
+ * @attr:  an attribute declaration
  *
- * Deallocate a Schema Attribute structure.
+ * Deallocates an attribute declaration structure.
  */
 static void
 xmlSchemaFreeAttribute(xmlSchemaAttributePtr attr)
@@ -3289,6 +3687,38 @@
 }
 
 /**
+ * xmlSchemaFreeAttributeUse:
+ * @use:  an attribute use
+ *
+ * Deallocates an attribute use structure.
+ */
+static void
+xmlSchemaFreeAttributeUse(xmlSchemaAttributeUsePtr use)
+{
+    if (use == NULL)
+        return;
+    if (use->annot != NULL)
+	xmlSchemaFreeAnnot(use->annot);
+    if (use->defVal != NULL)
+	xmlSchemaFreeValue(use->defVal);
+    xmlFree(use);
+}
+
+/**
+ * xmlSchemaFreeAttributeUseProhib:
+ * @prohib:  an attribute use prohibition
+ *
+ * Deallocates an attribute use structure.
+ */
+static void
+xmlSchemaFreeAttributeUseProhib(xmlSchemaAttributeUseProhibPtr prohib)
+{
+    if (prohib == NULL)
+        return;
+    xmlFree(prohib);
+}
+
+/**
  * xmlSchemaFreeWildcardNsSet:
  * set:  a schema wildcard namespace
  *
@@ -3333,34 +3763,18 @@
  * Deallocate a Schema Attribute Group structure.
  */
 static void
-xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attr)
+xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attrGr)
 {
-    if (attr == NULL)
+    if (attrGr == NULL)
         return;
-    if (attr->annot != NULL)
-        xmlSchemaFreeAnnot(attr->annot);
-    xmlFree(attr);
+    if (attrGr->annot != NULL)
+        xmlSchemaFreeAnnot(attrGr->annot);
+    if (attrGr->attrUses != NULL)
+	xmlSchemaItemListFree(WXS_LIST_CAST attrGr->attrUses);
+    xmlFree(attrGr);
 }
 
 /**
- * xmlSchemaFreeAttributeUseList:
- * @attrUse:  an attribute link
- *
- * Deallocate a list of schema attribute uses.
- */
-static void
-xmlSchemaFreeAttributeUseList(xmlSchemaAttributeLinkPtr attrUse)
-{
-    xmlSchemaAttributeLinkPtr next;
-
-    while (attrUse != NULL) {
-	next = attrUse->next;
-	xmlFree(attrUse);
-	attrUse = next;
-    }
-}
-
-/**
  * xmlSchemaFreeQNameRef:
  * @item: a QName reference structure
  *
@@ -3503,13 +3917,8 @@
             facet = next;
         }
     }
-    if (type->type != XML_SCHEMA_TYPE_BASIC) {
-	/*
-	* TODO: Why is this restricted to non built-in types?
-	*/
-	if (type->attributeUses != NULL)
-	    xmlSchemaFreeAttributeUseList(type->attributeUses);
-    }
+    if (type->attrUses != NULL)
+	xmlSchemaItemListFree((xmlSchemaItemListPtr) type->attrUses);
     if (type->memberTypes != NULL)
 	xmlSchemaFreeTypeLinkList(type->memberTypes);
     if (type->facetSet != NULL) {
@@ -3555,25 +3964,7 @@
     xmlFree(item);
 }
 
-/**
- * xmlSchemaFreeTypeList:
- * @type:  a schema type structure
- *
- * Deallocate a Schema Type structure.
- */
 static void
-xmlSchemaFreeTypeList(xmlSchemaTypePtr type)
-{
-    xmlSchemaTypePtr next;
-
-    while (type != NULL) {
-        next = type->redef;
-	xmlSchemaFreeType(type);
-	type = next;
-    }
-}
-
-static void
 xmlSchemaComponentListFree(xmlSchemaItemListPtr list)
 {
     if ((list == NULL) || (list->nbItems == 0))
@@ -3590,11 +3981,18 @@
 	    switch (item->type) {
 		case XML_SCHEMA_TYPE_SIMPLE:
 		case XML_SCHEMA_TYPE_COMPLEX:
-		    xmlSchemaFreeTypeList((xmlSchemaTypePtr) item);
+		    xmlSchemaFreeType((xmlSchemaTypePtr) item);
 		    break;
 		case XML_SCHEMA_TYPE_ATTRIBUTE:
 		    xmlSchemaFreeAttribute((xmlSchemaAttributePtr) item);
-		    break;		
+		    break;
+		case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+		    xmlSchemaFreeAttributeUse((xmlSchemaAttributeUsePtr) item);
+		    break;
+		case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB:
+		    xmlSchemaFreeAttributeUseProhib(
+			(xmlSchemaAttributeUseProhibPtr) item);
+		    break;
 		case XML_SCHEMA_TYPE_ELEMENT:
 		    xmlSchemaFreeElement((xmlSchemaElementPtr) item);
 		    break;
@@ -3636,8 +4034,7 @@
 		    xmlSchemaPSimpleInternalErr(NULL,
 			"Internal error: xmlSchemaComponentListFree, "
 			"unexpected component type '%s'\n",
-			(const xmlChar *)
-			    xmlSchemaCompTypeToString(item->type));
+			(const xmlChar *) WXS_ITEM_TYPE_NAME(item));
 			 }
 		    break;
 	    }
@@ -3707,6 +4104,9 @@
 
 #ifdef LIBXML_OUTPUT_ENABLED
 
+static void
+xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output); /* forward */
+
 /**
  * xmlSchemaElementDump:
  * @elem:  an element
@@ -3723,20 +4123,15 @@
     if (elem == NULL)
         return;
 
-    if (elem->flags & XML_SCHEMAS_ELEM_REF) {
-	fprintf(output, "Particle: %s", name);
-	fprintf(output, ", term element: %s", elem->ref);
-	if (elem->refNs != NULL)
-	    fprintf(output, " ns %s", elem->refNs);
-    } else {
-	fprintf(output, "Element");
-	if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL)
-	    fprintf(output, " (global)");
-	fprintf(output, ": %s ", elem->name);
-	if (namespace != NULL)
-	    fprintf(output, "ns %s", namespace);
-    }
+
+    fprintf(output, "Element");
+    if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL)
+	fprintf(output, " (global)");
+    fprintf(output, ": '%s' ", elem->name);
+    if (namespace != NULL)
+	fprintf(output, "ns '%s'", namespace);
     fprintf(output, "\n");
+#if 0
     if ((elem->minOccurs != 1) || (elem->maxOccurs != 1)) {
 	fprintf(output, "  min %d ", elem->minOccurs);
         if (elem->maxOccurs >= UNBOUNDED)
@@ -3746,14 +4141,14 @@
         else
             fprintf(output, "\n");
     }
+#endif
     /*
     * Misc other properties.
     */
     if ((elem->flags & XML_SCHEMAS_ELEM_NILLABLE) ||
 	(elem->flags & XML_SCHEMAS_ELEM_ABSTRACT) ||
 	(elem->flags & XML_SCHEMAS_ELEM_FIXED) ||
-	(elem->flags & XML_SCHEMAS_ELEM_DEFAULT) ||
-	(elem->id != NULL)) {
+	(elem->flags & XML_SCHEMAS_ELEM_DEFAULT)) {
 	fprintf(output, "  props: ");
 	if (elem->flags & XML_SCHEMAS_ELEM_FIXED)
 	    fprintf(output, "[fixed] ");
@@ -3763,8 +4158,6 @@
 	    fprintf(output, "[abstract] ");
 	if (elem->flags & XML_SCHEMAS_ELEM_NILLABLE)
 	    fprintf(output, "[nillable] ");
-	if (elem->id != NULL)
-	    fprintf(output, "[id: '%s'] ", elem->id);
 	fprintf(output, "\n");
     }
     /*
@@ -3776,19 +4169,24 @@
     * Type.
     */
     if (elem->namedType != NULL) {
-	fprintf(output, "  type: %s ", elem->namedType);
+	fprintf(output, "  type: '%s' ", elem->namedType);
 	if (elem->namedTypeNs != NULL)
-	    fprintf(output, "ns %s\n", elem->namedTypeNs);
+	    fprintf(output, "ns '%s'\n", elem->namedTypeNs);
 	else
 	    fprintf(output, "\n");
+    } else if (elem->subtypes != NULL) {
+	/*
+	* Dump local types.
+	*/
+	xmlSchemaTypeDump(elem->subtypes, output);
     }
     /*
     * Substitution group.
     */
     if (elem->substGroup != NULL) {
-	fprintf(output, "  substitutionGroup: %s ", elem->substGroup);
+	fprintf(output, "  substitutionGroup: '%s' ", elem->substGroup);
 	if (elem->substGroupNs != NULL)
-	    fprintf(output, "ns %s\n", elem->substGroupNs);
+	    fprintf(output, "ns '%s'\n", elem->substGroupNs);
 	else
 	    fprintf(output, "\n");
     }
@@ -3818,9 +4216,10 @@
 }
 
 /**
- * xmlSchemaTypeDump:
- * @output:  the file output
- * @type:  a type structure
+ * xmlSchemaContentModelDump:
+ * @particle: the schema particle
+ * @output: the file output
+ * @depth: the depth used for intentation
  *
  * Dump a SchemaType structure
  */
@@ -3843,27 +4242,32 @@
 	return;
     }
     term = particle->children;
-    switch (term->type) {
-	case XML_SCHEMA_TYPE_ELEMENT:
-	    fprintf(output, "ELEM '%s'", xmlSchemaFormatQName(&str,
-		((xmlSchemaElementPtr)term)->targetNamespace,
-		((xmlSchemaElementPtr)term)->name));
-	    break;
-	case XML_SCHEMA_TYPE_SEQUENCE:
-	    fprintf(output, "SEQUENCE");
-	    break;
-	case XML_SCHEMA_TYPE_CHOICE:
-	    fprintf(output, "CHOICE");
-	    break;
-	case XML_SCHEMA_TYPE_ALL:
-	    fprintf(output, "ALL");
-	    break;
-	case XML_SCHEMA_TYPE_ANY:
-	    fprintf(output, "ANY");
-	    break;
-	default:
-	    fprintf(output, "UNKNOWN\n");
-	    return;
+    if (term == NULL) {
+	fprintf(output, "(NULL)");
+    } else {
+	switch (term->type) {
+	    case XML_SCHEMA_TYPE_ELEMENT:
+		fprintf(output, "ELEM '%s'", xmlSchemaFormatQName(&str,
+		    ((xmlSchemaElementPtr)term)->targetNamespace,
+		    ((xmlSchemaElementPtr)term)->name));
+		FREE_AND_NULL(str);
+		break;
+	    case XML_SCHEMA_TYPE_SEQUENCE:
+		fprintf(output, "SEQUENCE");
+		break;
+	    case XML_SCHEMA_TYPE_CHOICE:
+		fprintf(output, "CHOICE");
+		break;
+	    case XML_SCHEMA_TYPE_ALL:
+		fprintf(output, "ALL");
+		break;
+	    case XML_SCHEMA_TYPE_ANY:
+		fprintf(output, "ANY");
+		break;
+	    default:
+		fprintf(output, "UNKNOWN\n");
+		return;
+	}
     }
     if (particle->minOccurs != 1)
 	fprintf(output, " min: %d", particle->minOccurs);
@@ -3872,10 +4276,11 @@
     else if (particle->maxOccurs != 1)
 	fprintf(output, " max: %d", particle->maxOccurs);
     fprintf(output, "\n");
-    if (((term->type == XML_SCHEMA_TYPE_SEQUENCE) ||
-	(term->type == XML_SCHEMA_TYPE_CHOICE) ||
-	(term->type == XML_SCHEMA_TYPE_ALL)) &&
-	(term->children != NULL)) {
+    if (term &&
+	((term->type == XML_SCHEMA_TYPE_SEQUENCE) ||
+	 (term->type == XML_SCHEMA_TYPE_CHOICE) ||
+	 (term->type == XML_SCHEMA_TYPE_ALL)) &&
+	 (term->children != NULL)) {
 	xmlSchemaContentModelDump((xmlSchemaParticlePtr) term->children,
 	    output, depth +1);
     }
@@ -3883,7 +4288,52 @@
 	xmlSchemaContentModelDump((xmlSchemaParticlePtr) particle->next,
 		output, depth);
 }
+
 /**
+ * xmlSchemaAttrUsesDump:
+ * @uses:  attribute uses list
+ * @output:  the file output 
+ *
+ * Dumps a list of attribute use components.
+ */
+static void
+xmlSchemaAttrUsesDump(xmlSchemaItemListPtr uses, FILE * output)
+{
+    xmlSchemaAttributeUsePtr use;
+    xmlSchemaAttributeUseProhibPtr prohib;
+    xmlSchemaQNameRefPtr ref;
+    const xmlChar *name, *tns;
+    xmlChar *str = NULL;
+    int i;
+
+    if ((uses == NULL) || (uses->nbItems == 0))
+        return;
+
+    fprintf(output, "  attributes:\n");    
+    for (i = 0; i < uses->nbItems; i++) {
+	use = uses->items[i];
+	if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) {
+	    fprintf(output, "  [prohibition] ");
+	    prohib = (xmlSchemaAttributeUseProhibPtr) use;
+	    name = prohib->name;
+	    tns = prohib->targetNamespace;
+	} else if (use->type == XML_SCHEMA_EXTRA_QNAMEREF) {
+	    fprintf(output, "  [reference] ");
+	    ref = (xmlSchemaQNameRefPtr) use;
+	    name = ref->name;
+	    tns = ref->targetNamespace;
+	} else {
+	    fprintf(output, "  [use] ");
+	    name = WXS_ATTRUSE_DECL_NAME(use);
+	    tns = WXS_ATTRUSE_DECL_TNS(use);
+	}
+	fprintf(output, "'%s'\n",
+	    (const char *) xmlSchemaFormatQName(&str, tns, name));
+	FREE_AND_NULL(str);
+    }
+}
+
+/**
  * xmlSchemaTypeDump:
  * @output:  the file output
  * @type:  a type structure
@@ -3899,11 +4349,11 @@
     }
     fprintf(output, "Type: ");
     if (type->name != NULL)
-        fprintf(output, "%s ", type->name);
+        fprintf(output, "'%s' ", type->name);
     else
-        fprintf(output, "no name ");
+        fprintf(output, "(no name) ");
     if (type->targetNamespace != NULL)
-	fprintf(output, "ns %s ", type->targetNamespace);
+	fprintf(output, "ns '%s' ", type->targetNamespace);
     switch (type->type) {
         case XML_SCHEMA_TYPE_BASIC:
             fprintf(output, "[basic] ");
@@ -3965,12 +4415,14 @@
     }
     fprintf(output, "\n");
     if (type->base != NULL) {
-        fprintf(output, "  base type: %s", type->base);
+        fprintf(output, "  base type: '%s'", type->base);
 	if (type->baseNs != NULL)
-	    fprintf(output, " ns %s\n", type->baseNs);
+	    fprintf(output, " ns '%s'\n", type->baseNs);
 	else
 	    fprintf(output, "\n");
     }
+    if (type->attrUses != NULL)
+	xmlSchemaAttrUsesDump(type->attrUses, output);
     if (type->annot != NULL)
         xmlSchemaAnnotDump(output, type->annot);
 #ifdef DUMP_CONTENT_MODEL
@@ -4010,14 +4462,13 @@
     fprintf(output, "\n");
     if (schema->annot != NULL)
         xmlSchemaAnnotDump(output, schema->annot);
-
     xmlHashScan(schema->typeDecl, (xmlHashScanner) xmlSchemaTypeDump,
                 output);
     xmlHashScanFull(schema->elemDecl,
                     (xmlHashScannerFull) xmlSchemaElementDump, output);
 }
 
-#ifdef DEBUG_IDC
+#ifdef DEBUG_IDC_NODE_TABLE
 /**
  * xmlSchemaDebugDumpIDCTable:
  * @vctxt: the WXS validation context
@@ -4030,21 +4481,22 @@
 			   const xmlChar *localName,
 			   xmlSchemaPSVIIDCBindingPtr bind)
 {
-    xmlChar *str = NULL, *value;
+    xmlChar *str = NULL;
+    const xmlChar *value;
     xmlSchemaPSVIIDCNodePtr tab;
     xmlSchemaPSVIIDCKeyPtr key;
     int i, j, res;
 
-    fprintf(output, "IDC: TABLES on %s\n",
+    fprintf(output, "IDC: TABLES on '%s'\n",
 	xmlSchemaFormatQName(&str, namespaceName, localName));
     FREE_AND_NULL(str)
 
     if (bind == NULL)
 	return;
     do {
-	fprintf(output, "IDC:   BINDING %s\n",
-	    xmlSchemaFormatQName(&str, bind->definition->targetNamespace,
-	    bind->definition->name));
+	fprintf(output, "IDC:   BINDING '%s' (%d)\n",
+	    xmlSchemaGetComponentQName(&str, 
+		bind->definition), bind->nbNodes);
 	FREE_AND_NULL(str)
 	for (i = 0; i < bind->nbNodes; i++) {
 	    tab = bind->nodeTable[i];
@@ -4054,7 +4506,7 @@
 		if ((key != NULL) && (key->val != NULL)) {
 		    res = xmlSchemaGetCanonValue(key->val, &value);
 		    if (res >= 0)
-			fprintf(output, "\"%s\" ", value);
+			fprintf(output, "'%s' ", value);
 		    else
 			fprintf(output, "CANON-VALUE-FAILED ");
 		    if (res == 0)
@@ -4066,6 +4518,29 @@
 	    }
 	    fprintf(output, ")\n");
 	}
+	if (bind->dupls && bind->dupls->nbItems) {
+	    fprintf(output, "IDC:     dupls (%d):\n", bind->dupls->nbItems);
+	    for (i = 0; i < bind->dupls->nbItems; i++) {
+		tab = bind->dupls->items[i];
+		fprintf(output, "         ( ");
+		for (j = 0; j < bind->definition->nbFields; j++) {
+		    key = tab->keys[j];
+		    if ((key != NULL) && (key->val != NULL)) {
+			res = xmlSchemaGetCanonValue(key->val, &value);
+			if (res >= 0)
+			    fprintf(output, "'%s' ", value);
+			else
+			    fprintf(output, "CANON-VALUE-FAILED ");
+			if (res == 0)
+			    FREE_AND_NULL(value)
+		    } else if (key != NULL)
+		    fprintf(output, "(no val), ");
+			else
+			    fprintf(output, "(key missing), ");
+		}
+		fprintf(output, ")\n");
+	    }
+	}
 	bind = bind->next;
     } while (bind != NULL);
 }
@@ -4147,6 +4622,12 @@
     return(ret);
 }
 
+static const xmlChar *
+xmlSchemaGetNodeContentNoDict(xmlNodePtr node)
+{
+    return((const xmlChar*) xmlNodeGetContent(node));
+}
+
 /**
  * xmlSchemaGetProp:
  * @ctxt: the parser context
@@ -4263,10 +4744,7 @@
 	WXS_FIND_GLOBAL_ITEM(typeDecl)
     } 
 exit:
-    if ((ret != NULL) && (ret->redef != NULL)) {
-	/* Return the last redefinition. */
-	ret = ret->redef;
-    }
+
 #ifdef DEBUG
     if (ret == NULL) {
         if (nsName == NULL)
@@ -4375,10 +4853,7 @@
 	WXS_FIND_GLOBAL_ITEM(groupDecl)
     }
 exit:
-    if ((ret != NULL) && (ret->redef != NULL)) {
-	/* Return the last redefinition. */
-	ret = ret->redef;
-    }
+    
 #ifdef DEBUG
     if (ret == NULL) {
         if (nsName == NULL)
@@ -4491,18 +4966,93 @@
     return (1);
 }
 
-#define WXS_GET_GLOBAL_HASH(c, s, slot) \
-{ \
-    if (WXS_IS_IMPMAIN((c)->type)) \
-	table = &(IMPBUCKET_CAST((c))->schema->slot); \
-    else \
-	table = &(INCBUCKET_CAST((c))->ownerImport->schema->slot); \
-} \
+#define WXS_COMP_NAME(c, t) ((t) (c))->name
+#define WXS_COMP_TNS(c, t) ((t) (c))->targetNamespace
+/*
+* xmlSchemaFindRedefCompInGraph:
+* ATTENTION TODO: This uses pointer comp. for strings.
+*/
+static xmlSchemaBasicItemPtr
+xmlSchemaFindRedefCompInGraph(xmlSchemaBucketPtr bucket,
+			      xmlSchemaTypeType type,
+			      const xmlChar *name,
+			      const xmlChar *nsName)
+{
+    xmlSchemaBasicItemPtr ret;
+    int i;
 
-#define WXS_INIT_GLOBAL_HASH(ctx, tbl) \
-if (*(tbl) == NULL) *(tbl) = xmlHashCreateDict(10, (ctx)->dict); \
-if (*(tbl) == NULL) { if (ret != NULL) xmlFree(ret); return (NULL); }
+    if ((bucket == NULL) || (name == NULL))
+	return(NULL);
+    if ((bucket->globals == NULL) ||
+	(bucket->globals->nbItems == 0))
+	goto subschemas;
+    /*
+    * Search in global components.
+    */
+    for (i = 0; i < bucket->globals->nbItems; i++) {
+	ret = bucket->globals->items[i];
+	if (ret->type == type) {
+	    switch (type) {
+		case XML_SCHEMA_TYPE_COMPLEX:
+		case XML_SCHEMA_TYPE_SIMPLE:
+		    if ((WXS_COMP_NAME(ret, xmlSchemaTypePtr) == name) &&
+			(WXS_COMP_TNS(ret, xmlSchemaTypePtr) ==
+			nsName))
+		    {
+			return(ret);
+		    }
+		    break;
+		case XML_SCHEMA_TYPE_GROUP:
+		    if ((WXS_COMP_NAME(ret,
+			    xmlSchemaModelGroupDefPtr) == name) &&
+			(WXS_COMP_TNS(ret,
+			    xmlSchemaModelGroupDefPtr) == nsName))
+		    {
+			return(ret);
+		    }
+		    break;
+		case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+		    if ((WXS_COMP_NAME(ret,
+			    xmlSchemaAttributeGroupPtr) == name) &&
+			(WXS_COMP_TNS(ret,
+			    xmlSchemaAttributeGroupPtr) == nsName))
+		    {
+			return(ret);
+		    }
+		    break;
+		default:
+		    /* Should not be hit. */
+		    return(NULL);
+	    }		
+	}
+    }
+subschemas:
+    /*
+    * Process imported/included schemas.
+    */
+    if (bucket->relations != NULL) {
+	xmlSchemaSchemaRelationPtr rel = bucket->relations;
 
+	/*
+	* TODO: Marking the bucket will not avoid multiple searches
+	* in the same schema, but avoids at least circularity.
+	*/
+	bucket->flags |= XML_SCHEMA_BUCKET_MARKED;
+	do {
+	    if ((rel->bucket != NULL) &&
+		((rel->bucket->flags & XML_SCHEMA_BUCKET_MARKED) == 0)) {
+		ret = xmlSchemaFindRedefCompInGraph(rel->bucket,
+		    type, name, nsName);
+		if (ret != NULL)
+		    return(ret);
+	    }
+	    rel = rel->next;
+	} while (rel != NULL);
+	 bucket->flags ^= XML_SCHEMA_BUCKET_MARKED;
+    }
+    return(NULL);
+}
+
 /**
  * xmlSchemaAddNotation:
  * @ctxt:  a schema parser context
@@ -4516,18 +5066,14 @@
  */
 static xmlSchemaNotationPtr
 xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
-                     const xmlChar *name)
+                     const xmlChar *name, const xmlChar *nsName,
+		     xmlNodePtr node ATTRIBUTE_UNUSED)
 {
     xmlSchemaNotationPtr ret = NULL;
-    xmlHashTablePtr *table = NULL;
-    int val;
 
     if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
         return (NULL);
 
-    WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, notaDecl)
-
-    WXS_INIT_GLOBAL_HASH(ctxt, table)
     ret = (xmlSchemaNotationPtr) xmlMalloc(sizeof(xmlSchemaNotation));
     if (ret == NULL) {
         xmlSchemaPErrMemory(ctxt, "add annotation", NULL);
@@ -4535,18 +5081,11 @@
     }
     memset(ret, 0, sizeof(xmlSchemaNotation));
     ret->type = XML_SCHEMA_TYPE_NOTATION;
-    ret->name = xmlDictLookup(ctxt->dict, name, -1);
-
-    val = xmlHashAddEntry(*table, ret->name, ret);
-    if (val != 0) {
-	xmlSchemaPErr(ctxt, (xmlNodePtr) ctxt->doc,
-	    XML_SCHEMAP_REDEFINED_NOTATION,
-	    "A notation declaration with the name '%s' does already exist.\n",
-	    name, NULL);
-        xmlFree(ret);
-        return (NULL);
-    }
-    ADD_GLOBAL_ITEM(ctxt, ret);
+    ret->name = name;
+    ret->targetNamespace = nsName;
+    /* TODO: do we need the node to be set?
+    * ret->node = node;*/
+    WXS_ADD_GLOBAL(ctxt, ret);
     return (ret);
 }
 
@@ -4568,8 +5107,6 @@
 		      xmlNodePtr node, int topLevel)
 {
     xmlSchemaAttributePtr ret = NULL;
-    int val;
-    xmlHashTablePtr *table;
 
     if ((ctxt == NULL) || (schema == NULL))
         return (NULL);
@@ -4580,86 +5117,138 @@
         return (NULL);
     }
     memset(ret, 0, sizeof(xmlSchemaAttribute));
-    ret->name = xmlDictLookup(ctxt->dict, name, -1);
+    ret->type = XML_SCHEMA_TYPE_ATTRIBUTE;
+    ret->node = node;
+    ret->name = name;
     ret->targetNamespace = nsName;
 
-    if (topLevel) {
-	WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, attrDecl)
-	WXS_INIT_GLOBAL_HASH(ctxt, table)
-	val = xmlHashAddEntry(*table, name, ret);
-	if (val != 0) {
-	    xmlSchemaPCustomErr(ctxt,
-		XML_SCHEMAP_REDEFINED_ATTR,
-		NULL, NULL, node,
-		"A global attribute declaration with the name '%s' does "
-		"already exist", name);
-	    xmlFree(ret);
-	    return (NULL);
-	}
-	ADD_GLOBAL_ITEM(ctxt, ret);
-    } else
-	ADD_LOCAL_ITEM(ctxt, ret);
-    WXS_ADD_PENDING_ITEM(ctxt, ret);
+    if (topLevel)
+	WXS_ADD_GLOBAL(ctxt, ret);
+    else
+	WXS_ADD_LOCAL(ctxt, ret);
+    WXS_ADD_PENDING(ctxt, ret);
     return (ret);
 }
 
 /**
- * xmlSchemaAddAttributeGroup:
+ * xmlSchemaAddAttributeUse:
  * @ctxt:  a schema parser context
  * @schema:  the schema being built
  * @name:  the item name
+ * @namespace:  the namespace
  *
- * Add an XML schema Attrribute Group declaration
+ * Add an XML schema Attrribute declaration
+ * *WARNING* this interface is highly subject to change
  *
  * Returns the new struture or NULL in case of error
  */
+static xmlSchemaAttributeUsePtr
+xmlSchemaAddAttributeUse(xmlSchemaParserCtxtPtr pctxt,
+			 xmlNodePtr node)
+{
+    xmlSchemaAttributeUsePtr ret = NULL;
+
+    if (pctxt == NULL)
+        return (NULL);
+
+    ret = (xmlSchemaAttributeUsePtr) xmlMalloc(sizeof(xmlSchemaAttributeUse));
+    if (ret == NULL) {
+        xmlSchemaPErrMemory(pctxt, "allocating attribute", NULL);
+        return (NULL);
+    }
+    memset(ret, 0, sizeof(xmlSchemaAttributeUse));
+    ret->type = XML_SCHEMA_TYPE_ATTRIBUTE_USE;
+    ret->node = node;
+
+    WXS_ADD_LOCAL(pctxt, ret);
+    return (ret);
+}
+
+/*
+* xmlSchemaAddRedef:
+*
+* Adds a redefinition information. This is used at a later stage to:
+* resolve references to the redefined components and to check constraints.
+*/
+static xmlSchemaRedefPtr
+xmlSchemaAddRedef(xmlSchemaParserCtxtPtr pctxt,		  
+		  xmlSchemaBucketPtr targetBucket,
+		  void *item,
+		  const xmlChar *refName,
+		  const xmlChar *refTargetNs)
+{
+    xmlSchemaRedefPtr ret;
+
+    ret = (xmlSchemaRedefPtr)
+	xmlMalloc(sizeof(xmlSchemaRedef));
+    if (ret == NULL) {
+	xmlSchemaPErrMemory(pctxt,
+	    "allocating redefinition info", NULL);
+	return (NULL);
+    }
+    memset(ret, 0, sizeof(xmlSchemaRedef));
+    ret->item = item;
+    ret->targetBucket = targetBucket;
+    ret->refName = refName;
+    ret->refTargetNs = refTargetNs;
+    if (WXS_CONSTRUCTOR(pctxt)->redefs == NULL)
+	WXS_CONSTRUCTOR(pctxt)->redefs = ret;
+    else
+	WXS_CONSTRUCTOR(pctxt)->lastRedef->next = ret;
+    WXS_CONSTRUCTOR(pctxt)->lastRedef = ret;
+
+    return (ret);
+}
+
+/**
+ * xmlSchemaAddAttributeGroupDefinition:
+ * @ctxt:  a schema parser context
+ * @schema:  the schema being built
+ * @name:  the item name
+ * @nsName:  the target namespace
+ * @node: the corresponding node
+ *
+ * Add an XML schema Attrribute Group definition.
+ *
+ * Returns the new struture or NULL in case of error
+ */
 static xmlSchemaAttributeGroupPtr
-xmlSchemaAddAttributeGroup(xmlSchemaParserCtxtPtr ctxt,
-                           xmlSchemaPtr schema,
-			   const xmlChar * name,
-			   xmlNodePtr node,
-			   int topLevel)
+xmlSchemaAddAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
+                           xmlSchemaPtr schema ATTRIBUTE_UNUSED,
+			   const xmlChar *name,
+			   const xmlChar *nsName,
+			   xmlNodePtr node)
 {
     xmlSchemaAttributeGroupPtr ret = NULL;
-    xmlHashTablePtr *table = NULL;
-    int val;
 
-    if ((ctxt == NULL) || (schema == NULL))
+    if ((pctxt == NULL) || (name == NULL))
         return (NULL);
 
     ret = (xmlSchemaAttributeGroupPtr)
         xmlMalloc(sizeof(xmlSchemaAttributeGroup));
     if (ret == NULL) {
-	xmlSchemaPErrMemory(ctxt, "allocating attribute group", NULL);
+	xmlSchemaPErrMemory(pctxt, "allocating attribute group", NULL);
 	return (NULL);
     }
     memset(ret, 0, sizeof(xmlSchemaAttributeGroup));
     ret->type = XML_SCHEMA_TYPE_ATTRIBUTEGROUP;
-    ret->node = node;    
+    ret->name = name;
+    ret->targetNamespace = nsName;
+    ret->node = node;   
 
-    if (topLevel) {
-	ret->flags |= XML_SCHEMAS_ATTRGROUP_GLOBAL;
-	ret->name = xmlDictLookup(ctxt->dict, name, -1);
-	ret->targetNamespace = ctxt->targetNamespace;
-
-	WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, attrgrpDecl)
-	WXS_INIT_GLOBAL_HASH(ctxt, table)
-		
-	val = xmlHashAddEntry(*table, name, ret);
-	if (val != 0) {
-	    xmlSchemaPCustomErr(ctxt,
-		XML_SCHEMAP_REDEFINED_ATTRGROUP,
-		NULL, NULL, node,
-		"A global attribute group definition with the name '%s' "
-		"does already exist", name);
+    /* TODO: Remove the flag. */
+    ret->flags |= XML_SCHEMAS_ATTRGROUP_GLOBAL;
+    if (pctxt->isRedefine) {
+	pctxt->redef = xmlSchemaAddRedef(pctxt, pctxt->redefined,
+	    ret, name, nsName);
+	if (pctxt->redef == NULL) {
 	    xmlFree(ret);
-	    return (NULL);
-	}
-	ADD_GLOBAL_ITEM(ctxt, ret);
-    } else
-	ADD_LOCAL_ITEM(ctxt, ret);	
-	
-    WXS_ADD_PENDING_ITEM(ctxt, ret);
+	    return(NULL);
+	}	    
+	pctxt->redefCounter = 0;
+    }
+    WXS_ADD_GLOBAL(pctxt, ret);
+    WXS_ADD_PENDING(pctxt, ret);
     return (ret);
 }
 
@@ -4676,15 +5265,13 @@
  * Returns the new struture or NULL in case of error
  */
 static xmlSchemaElementPtr
-xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt,
                     const xmlChar * name, const xmlChar * nsName,
 		    xmlNodePtr node, int topLevel)
 {
     xmlSchemaElementPtr ret = NULL;
-    xmlHashTablePtr *table = NULL;
-    int val;
 
-    if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
+    if ((ctxt == NULL) || (name == NULL))
         return (NULL);
 
     ret = (xmlSchemaElementPtr) xmlMalloc(sizeof(xmlSchemaElement));
@@ -4693,26 +5280,16 @@
         return (NULL);
     }
     memset(ret, 0, sizeof(xmlSchemaElement));
-    ret->name = xmlDictLookup(ctxt->dict, name, -1);
+    ret->type = XML_SCHEMA_TYPE_ELEMENT;
+    ret->name = name;
     ret->targetNamespace = nsName;
+    ret->node = node;
 
-    if (topLevel) {
-	WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, elemDecl)
-	WXS_INIT_GLOBAL_HASH(ctxt, table) 
-	val = xmlHashAddEntry(*table, name, ret);
-	if (val != 0) {
-	    xmlSchemaPCustomErr(ctxt,
-		XML_SCHEMAP_REDEFINED_ELEMENT,
-		NULL, NULL, node,
-		"A global element declaration with the name '%s' does "
-		"already exist", name);
-	    xmlFree(ret);
-	    return (NULL);
-	}
-	ADD_GLOBAL_ITEM(ctxt, ret);
-    } else
-	ADD_LOCAL_ITEM(ctxt, ret);
-    WXS_ADD_PENDING_ITEM(ctxt, ret);
+    if (topLevel)
+	WXS_ADD_GLOBAL(ctxt, ret);
+    else
+	WXS_ADD_LOCAL(ctxt, ret);
+    WXS_ADD_PENDING(ctxt, ret);
     return (ret);
 }
 
@@ -4730,12 +5307,11 @@
  */
 static xmlSchemaTypePtr
 xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+		 xmlSchemaTypeType type,
                  const xmlChar * name, const xmlChar * nsName,
 		 xmlNodePtr node, int topLevel)
 {
     xmlSchemaTypePtr ret = NULL;
-    xmlHashTablePtr *table = NULL;
-    int val;
 
     if ((ctxt == NULL) || (schema == NULL))
         return (NULL);
@@ -4746,53 +5322,24 @@
         return (NULL);
     }
     memset(ret, 0, sizeof(xmlSchemaType));
-    if (name != NULL)
-	ret->name = xmlDictLookup(ctxt->dict, name, -1);
+    ret->type = type;
+    ret->name = name;
     ret->targetNamespace = nsName;
     ret->node = node;
-    /* TODO: Get rid of occurences here. */
-    ret->minOccurs = 1;
-    ret->maxOccurs = 1;
-
     if (topLevel) {
-	WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, typeDecl)
-	WXS_INIT_GLOBAL_HASH(ctxt, table)          
-	val = xmlHashAddEntry(*table, name, ret);
-	if (val != 0) {
-	    if (! ctxt->isRedefine) {
-		xmlChar *str = NULL;
-
-		xmlSchemaPCustomErr(ctxt,
-		    XML_SCHEMAP_REDEFINED_TYPE,
-		    NULL, NULL, node,
-		    "A global type definition with the name '%s' does "
-		    "already exist",
-		    xmlSchemaFormatQName(&str, nsName, name));
-		FREE_AND_NULL(str);
-		xmlFree(ret);		
-		return (NULL);
-	    } else {
-		xmlSchemaTypePtr prev;
-		
-		/* REDEFINE: Add a redefinition. */
-		TODO
-		prev = xmlHashLookup(*table, name);
-		if (prev == NULL) {
-		    PERROR_INT2("xmlSchemaAddType", "hash list did not "
-			"return a redefined type component, but should");
-		    xmlFree(ret);
-		    return (NULL);
-		}
-		ret->redef = prev->redef;
-		prev->redef = ret;
-		/* TODO: Add to locals; dunno if this will make trouble. */
-		ADD_LOCAL_ITEM(ctxt, ret);
-	    }
-	} else
-	    ADD_GLOBAL_ITEM(ctxt, ret);
+	if (ctxt->isRedefine) {
+	    ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined,
+		ret, name, nsName);
+	    if (ctxt->redef == NULL) {
+		xmlFree(ret);
+		return(NULL);
+	    }	    
+	    ctxt->redefCounter = 0;
+	}
+	WXS_ADD_GLOBAL(ctxt, ret);
     } else
-	ADD_LOCAL_ITEM(ctxt, ret);
-    WXS_ADD_PENDING_ITEM(ctxt, ret);    
+	WXS_ADD_LOCAL(ctxt, ret);
+    WXS_ADD_PENDING(ctxt, ret);    
     return (ret);
 }
 
@@ -4811,6 +5358,7 @@
 	    "allocating QName reference item", NULL);
 	return (NULL);
     }
+    ret->node = NULL;
     ret->type = XML_SCHEMA_EXTRA_QNAMEREF;
     ret->name = refName;
     ret->targetNamespace = refNs;
@@ -4819,10 +5367,29 @@
     /*
     * Store the reference item in the schema.
     */
-    ADD_LOCAL_ITEM(pctxt, ret);
+    WXS_ADD_LOCAL(pctxt, ret);
     return (ret);
 }
 
+static xmlSchemaAttributeUseProhibPtr
+xmlSchemaAddAttributeUseProhib(xmlSchemaParserCtxtPtr pctxt)
+{
+    xmlSchemaAttributeUseProhibPtr ret;
+
+    ret = (xmlSchemaAttributeUseProhibPtr)
+	xmlMalloc(sizeof(xmlSchemaAttributeUseProhib));
+    if (ret == NULL) {
+	xmlSchemaPErrMemory(pctxt,
+	    "allocating attribute use prohibition", NULL);
+	return (NULL);
+    }
+    memset(ret, 0, sizeof(xmlSchemaAttributeUseProhib));
+    ret->type = XML_SCHEMA_EXTRA_ATTR_USE_PROHIB;
+    WXS_ADD_LOCAL(pctxt, ret);
+    return (ret);
+}
+
+
 /**
  * xmlSchemaAddModelGroup:
  * @ctxt:  a schema parser context
@@ -4856,7 +5423,10 @@
     memset(ret, 0, sizeof(xmlSchemaModelGroup));
     ret->type = type;
     ret->node = node;
-    ADD_LOCAL_ITEM(ctxt, ret);
+    WXS_ADD_LOCAL(ctxt, ret);
+    if ((type == XML_SCHEMA_TYPE_SEQUENCE) ||
+	(type == XML_SCHEMA_TYPE_CHOICE))
+	WXS_ADD_PENDING(ctxt, ret);
     return (ret);
 }
 
@@ -4900,12 +5470,12 @@
     ret->next = NULL;
     ret->children = NULL;
 
-    ADD_LOCAL_ITEM(ctxt, ret);
+    WXS_ADD_LOCAL(ctxt, ret);
     /* 
     * Note that addition to pending components will be done locally
     * to the specific parsing function, since the most particles
     * need not to be fixed up (i.e. the reference to be resolved).
-    * REMOVED: WXS_ADD_PENDING_ITEM(ctxt, ret);
+    * REMOVED: WXS_ADD_PENDING(ctxt, ret);
     */
     return (ret);
 }
@@ -4928,15 +5498,10 @@
 				 xmlNodePtr node)
 {
     xmlSchemaModelGroupDefPtr ret = NULL;
-    xmlHashTablePtr *table = NULL;
-    int val;
 
     if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
         return (NULL);
 
-    WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, groupDecl)
-    WXS_INIT_GLOBAL_HASH(ctxt, table)
-
     ret = (xmlSchemaModelGroupDefPtr)
 	xmlMalloc(sizeof(xmlSchemaModelGroupDef));
     if (ret == NULL) {
@@ -4944,23 +5509,22 @@
         return (NULL);
     }
     memset(ret, 0, sizeof(xmlSchemaModelGroupDef));
-    ret->name = xmlDictLookup(ctxt->dict, name, -1);
+    ret->name = name;
     ret->type = XML_SCHEMA_TYPE_GROUP;
     ret->node = node;
     ret->targetNamespace = nsName;
 
-    val = xmlHashAddEntry(*table, ret->name, ret);
-    if (val != 0) {
-	xmlSchemaPCustomErr(ctxt,
-	    XML_SCHEMAP_REDEFINED_GROUP,
-	    NULL, NULL, node,
-	    "A global model group definition with the name '%s' does "
-	    "already exist", name);
-        xmlFree(ret);
-        return (NULL);
+    if (ctxt->isRedefine) {
+	ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined,
+	    ret, name, nsName);
+	if (ctxt->redef == NULL) {
+	    xmlFree(ret);
+	    return(NULL);
+	}	    
+	ctxt->redefCounter = 0;
     }
-    ADD_GLOBAL_ITEM(ctxt, ret);
-    WXS_ADD_PENDING_ITEM(ctxt, ret);
+    WXS_ADD_GLOBAL(ctxt, ret);
+    WXS_ADD_PENDING(ctxt, ret);
     return (ret);
 }
 
@@ -4993,16 +5557,11 @@
                   const xmlChar *name, const xmlChar *nsName,
 		  int category, xmlNodePtr node)
 {
-    xmlSchemaIDCPtr ret = NULL;
-    xmlHashTablePtr *table = NULL;
-    int val;
+    xmlSchemaIDCPtr ret = NULL;    
 
     if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
         return (NULL);
 
-    WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, idcDef)
-    WXS_INIT_GLOBAL_HASH(ctxt, table)
-
     ret = (xmlSchemaIDCPtr) xmlMalloc(sizeof(xmlSchemaIDC));
     if (ret == NULL) {
         xmlSchemaPErrMemory(ctxt,
@@ -5016,25 +5575,12 @@
     ret->type = category;
     ret->node = node;        
     
-    val = xmlHashAddEntry(*table, ret->name, ret);
-    if (val != 0) {
-	xmlSchemaPCustomErrExt(ctxt,
-	    /* TODO: Error code! */
-	    XML_SCHEMAP_REDEFINED_TYPE,
-	    NULL, NULL, node,
-	    "An identity-constraint definition with the name '%s' "
-	    "and targetNamespace '%s' does already exist",
-	    ret->name, ret->targetNamespace, NULL);
-
-        xmlFree(ret);
-        return (NULL);
-    }
-    ADD_GLOBAL_ITEM(ctxt, ret);
+    WXS_ADD_GLOBAL(ctxt, ret);
     /*
     * Only keyrefs need to be fixup up.
     */
     if (category == XML_SCHEMA_TYPE_IDC_KEYREF)
-	WXS_ADD_PENDING_ITEM(ctxt, ret);
+	WXS_ADD_PENDING(ctxt, ret);
     return (ret);
 }
 
@@ -5064,11 +5610,8 @@
     }
     memset(ret, 0, sizeof(xmlSchemaWildcard));
     ret->type = type;
-    ret->node = node;
-    ret->minOccurs = 1;
-    ret->maxOccurs = 1; 
-    
-    ADD_LOCAL_ITEM(ctxt, ret);
+    ret->node = node;    
+    WXS_ADD_LOCAL(ctxt, ret);
     return (ret);
 }
 
@@ -5187,8 +5730,7 @@
 static int
 xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt,
 				       xmlSchemaPtr schema,
-				       xmlChar **ownerDes ATTRIBUTE_UNUSED,
-				       xmlSchemaTypePtr ownerItem,
+				       xmlSchemaBasicItemPtr ownerItem,
 				       xmlAttrPtr attr,
 				       const xmlChar *value,
 				       const xmlChar **uri,
@@ -5269,8 +5811,7 @@
 static int
 xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt,
 				       xmlSchemaPtr schema,
-				       xmlChar **ownerDes,
-				       xmlSchemaTypePtr ownerItem,
+				       xmlSchemaBasicItemPtr ownerItem,
 				       xmlAttrPtr attr,
 				       const xmlChar **uri,
 				       const xmlChar **local)
@@ -5279,7 +5820,7 @@
 
     value = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
     return (xmlSchemaPValAttrNodeQNameValue(ctxt, schema,
-	ownerDes, ownerItem, attr, value, uri, local));
+	ownerItem, attr, value, uri, local));
 }
 
 /**
@@ -5301,8 +5842,7 @@
 static int
 xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt,
 				   xmlSchemaPtr schema,
-				   xmlChar **ownerDes,
-				   xmlSchemaTypePtr ownerItem,
+				   xmlSchemaBasicItemPtr ownerItem,
 				   xmlNodePtr ownerElem,
 				   const char *name,
 				   const xmlChar **uri,
@@ -5317,7 +5857,7 @@
 	return (0);
     }
     return (xmlSchemaPValAttrNodeQName(ctxt, schema,
-	ownerDes, ownerItem, attr, uri, local));
+	ownerItem, attr, uri, local));
 }
 
 /**
@@ -5335,25 +5875,15 @@
  * if not valid and -1 if an internal error occurs.
  */
 static int
-xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt,
-		    xmlChar **ownerDes ATTRIBUTE_UNUSED,
-		    xmlSchemaTypePtr ownerItem,
-		    xmlNodePtr ownerElem,
-		    const xmlChar *name)
+xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr)
 {
     int ret;
-    xmlChar *value;
-    xmlAttrPtr attr;
+    const xmlChar *value;
 
-    value = xmlGetNoNsProp(ownerElem, name);
-    if (value == NULL)
-	return (0);
-
-    attr = xmlSchemaGetPropNode(ownerElem, (const char *) name);
     if (attr == NULL)
-	return (-1);
-
-    ret = xmlValidateNCName(BAD_CAST value, 1);
+	return(0);
+    value = xmlSchemaGetNodeContentNoDict((xmlNodePtr) attr);
+    ret = xmlValidateNCName(value, 1);
     if (ret == 0) {
 	/*
 	* NOTE: the IDness might have already be declared in the DTD
@@ -5366,38 +5896,53 @@
 	    * TODO: Use xmlSchemaStrip here; it's not exported at this
 	    * moment.
 	    */
-	    strip = xmlSchemaCollapseString(BAD_CAST value);
-	    if (strip != NULL)
+	    strip = xmlSchemaCollapseString(value);
+	    if (strip != NULL) {
+		xmlFree((xmlChar *) value);
 		value = strip;
-    	    res = xmlAddID(NULL, ownerElem->doc, BAD_CAST value, attr);
+	    }
+    	    res = xmlAddID(NULL, attr->doc, value, attr);
 	    if (res == NULL) {
 		ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
 		xmlSchemaPSimpleTypeErr(ctxt,
 		    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-		    ownerItem, (xmlNodePtr) attr,
+		    NULL, (xmlNodePtr) attr,
 		    xmlSchemaGetBuiltInType(XML_SCHEMAS_ID),
 		    NULL, NULL, "Duplicate value '%s' of simple "
-		    "type 'xs:ID'", BAD_CAST value, NULL);
+		    "type 'xs:ID'", value, NULL);
 	    } else
 		attr->atype = XML_ATTRIBUTE_ID;
-	    if (strip != NULL)
-		xmlFree(strip);
 	}
     } else if (ret > 0) {
 	ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
 	xmlSchemaPSimpleTypeErr(ctxt,
 	    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-	    ownerItem, (xmlNodePtr) attr,
+	    NULL, (xmlNodePtr) attr,
 	    xmlSchemaGetBuiltInType(XML_SCHEMAS_ID),
 	    NULL, NULL, "The value '%s' of simple type 'xs:ID' is "
 	    "not a valid 'xs:NCName'",
-	    BAD_CAST value, NULL);
+	    value, NULL);
     }
-    xmlFree(value);
+    if (value != NULL)
+	xmlFree((xmlChar *)value);
 
     return (ret);
 }
 
+static int
+xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt,
+		    xmlNodePtr ownerElem,
+		    const xmlChar *name)
+{
+    xmlAttrPtr attr;
+
+    attr = xmlSchemaGetPropNode(ownerElem, (const char *) name);
+    if (attr == NULL)
+	return(0);
+    return(xmlSchemaPValAttrNodeID(ctxt, attr));
+
+}
+
 /**
  * xmlGetMaxOccurs:
  * @ctxt:  a schema validation context
@@ -5528,8 +6073,7 @@
  */
 static int
 xmlSchemaPGetBoolNodeValue(xmlSchemaParserCtxtPtr ctxt,
-			   xmlChar **ownerDes ATTRIBUTE_UNUSED,
-			   xmlSchemaTypePtr ownerItem,
+			   xmlSchemaBasicItemPtr ownerItem,
 			   xmlNodePtr node)
 {
     xmlChar *value = NULL;
@@ -5576,8 +6120,6 @@
  */
 static int
 xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
-		  xmlChar **ownerDes ATTRIBUTE_UNUSED,
-		  xmlSchemaTypePtr ownerItem,
 		  xmlNodePtr node,
                   const char *name, int def)
 {
@@ -5602,7 +6144,7 @@
     else {
         xmlSchemaPSimpleTypeErr(ctxt,
 	    XML_SCHEMAP_INVALID_BOOLEAN,
-	    ownerItem,
+	    NULL,
 	    (xmlNodePtr) xmlSchemaGetPropNode(node, name),
 	    xmlSchemaGetBuiltInType(XML_SCHEMAS_BOOLEAN),
 	    NULL, val, NULL, NULL, NULL);
@@ -5629,15 +6171,12 @@
                                                   xmlSchemaPtr schema,
                                                   xmlNodePtr node,
 						  xmlSchemaTypeType parentType);
-static xmlSchemaAttributePtr xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr
-                                                     ctxt,
-                                                     xmlSchemaPtr schema,
-                                                     xmlNodePtr node,
-						     int topLevel);
-static xmlSchemaAttributeGroupPtr
-xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt,
-                             xmlSchemaPtr schema, xmlNodePtr node,
-			     int topLevel);
+static xmlSchemaBasicItemPtr
+xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt,
+			     xmlSchemaPtr schema,
+			     xmlNodePtr node,
+			     xmlSchemaItemListPtr uses,
+			     int parentType);
 static xmlSchemaTypePtr xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt,
                                            xmlSchemaPtr schema,
                                            xmlNodePtr node);
@@ -5664,8 +6203,7 @@
  */
 static int
 xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt,
-			   xmlChar **ownerDes ATTRIBUTE_UNUSED,
-			   xmlSchemaTypePtr ownerItem,
+			   xmlSchemaBasicItemPtr ownerItem,
 			   xmlAttrPtr attr,
 			   const xmlChar *value,
 			   xmlSchemaTypePtr type)
@@ -5695,7 +6233,8 @@
 	    break;
 	default: {
 	    PERROR_INT("xmlSchemaPValAttrNodeValue",
-		"validation using the given type is not supported");
+		"validation using the given type is not supported while "
+		"parsing a schema");
 	    return (-1);
 	}
     }
@@ -5707,7 +6246,7 @@
 	    "failed to validate a schema attribute value");
 	return (-1);
     } else if (ret > 0) {
-	if (VARIETY_LIST(type))
+	if (WXS_IS_LIST(type))
 	    ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
 	else
 	    ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;
@@ -5737,8 +6276,7 @@
  */
 static int
 xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt,
-			   xmlChar **ownerDes,
-			   xmlSchemaTypePtr ownerItem,
+			   xmlSchemaBasicItemPtr ownerItem,
 			   xmlAttrPtr attr,
 			   xmlSchemaTypePtr type,
 			   const xmlChar **value)
@@ -5752,7 +6290,7 @@
     if (value != NULL)
 	*value = val;
 
-    return (xmlSchemaPValAttrNodeValue(ctxt, ownerDes, ownerItem, attr,
+    return (xmlSchemaPValAttrNodeValue(ctxt, ownerItem, attr,
 	val, type));
 }
 
@@ -5776,9 +6314,8 @@
  * number otherwise and -1 in case of an internal or API error.
  */
 static int
-xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt,
-		       xmlChar **ownerDes,
-		       xmlSchemaTypePtr ownerItem,
+xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt,		       
+		       xmlSchemaBasicItemPtr ownerItem,
 		       xmlNodePtr ownerElem,
 		       const char *name,
 		       xmlSchemaTypePtr type,
@@ -5807,7 +6344,7 @@
 	    *value = NULL;
 	return (0);
     }
-    return (xmlSchemaPValAttrNode(ctxt, ownerDes, ownerItem, attr,
+    return (xmlSchemaPValAttrNode(ctxt, ownerItem, attr,
 	type, value));
 }
 
@@ -5815,87 +6352,90 @@
 xmlSchemaCheckReference(xmlSchemaParserCtxtPtr pctxt,
 		  xmlSchemaPtr schema ATTRIBUTE_UNUSED,
 		  xmlNodePtr node,
-		  xmlSchemaBasicItemPtr item,
+		  xmlAttrPtr attr,
 		  const xmlChar *namespaceName)
 {
     /* TODO: Pointer comparison instead? */
     if (xmlStrEqual(pctxt->targetNamespace, namespaceName))
-	return (1);
+	return (0);
     if (xmlStrEqual(xmlSchemaNs, namespaceName))
-	return (1);
+	return (0);
     /*
     * Check if the referenced namespace was <import>ed.
     */
-    if (WXS_SCHEMA_BUCKET(pctxt)->relations != NULL) {
+    if (WXS_BUCKET(pctxt)->relations != NULL) {
 	xmlSchemaSchemaRelationPtr rel;
 
-	rel = WXS_SCHEMA_BUCKET(pctxt)->relations;
+	rel = WXS_BUCKET(pctxt)->relations;
 	do {
-	    if (WXS_IS_IMPMAIN(rel->type) &&
+	    if (WXS_IS_BUCKET_IMPMAIN(rel->type) &&
 		xmlStrEqual(namespaceName, rel->importNamespace))
-		return (1);
+		return (0);
 	    rel = rel->next;
 	} while (rel != NULL);
     }
     /*
     * No matching <import>ed namespace found.
     */
-    if (namespaceName == NULL)
-	xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE,
-	    NULL, (xmlSchemaTypePtr) item, node,
-	    "References from this schema to components in no "
-	    "namespace are not valid, since not indicated by an import "
-	    "statement", NULL);
-    else
-	xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE,
-	    NULL, (xmlSchemaTypePtr) item, node,
-	    "References from this schema to components in the "
-	    "namespace '%s' are not valid, since not indicated by an import "
-	    "statement", namespaceName);
-    return (0);
+    {
+	xmlNodePtr n = (attr != NULL) ? (xmlNodePtr) attr : node;
+
+	if (namespaceName == NULL)
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		XML_SCHEMAP_SRC_RESOLVE, n, NULL,
+		"References from this schema to components in no "
+		"namespace are not allowed, since not indicated by an "
+		"import statement", NULL, NULL);
+	else
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		XML_SCHEMAP_SRC_RESOLVE, n, NULL,
+		"References from this schema to components in the "
+		"namespace '%s' are not allowed, since not indicated by an "
+		"import statement", namespaceName, NULL);
+    }
+    return (XML_SCHEMAP_SRC_RESOLVE);
 }
 
 /**
- * xmlSchemaParseAttrDecls:
+ * xmlSchemaParseLocalAttributes:
  * @ctxt:  a schema validation context
  * @schema:  the schema being built
  * @node:  a subtree containing XML Schema informations
  * @type:  the hosting type where the attributes will be anchored
  *
- * parse a XML schema attrDecls declaration corresponding to
- * <!ENTITY % attrDecls
- *       '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
+ * Parses attribute uses and attribute declarations and
+ * attribute group references. 
  */
-static xmlNodePtr
-xmlSchemaParseAttrDecls(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
-                        xmlNodePtr child, xmlSchemaTypePtr type)
+static int
+xmlSchemaParseLocalAttributes(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+                        xmlNodePtr *child, xmlSchemaItemListPtr *list,
+			int parentType, int *hasRefs)
 {
-    xmlSchemaAttributePtr lastattr = NULL, attr;
+    void *item;
 
-    while ((IS_SCHEMA(child, "attribute")) ||
-           (IS_SCHEMA(child, "attributeGroup"))) {
-        attr = NULL;
-        if (IS_SCHEMA(child, "attribute")) {
-            attr = xmlSchemaParseAttribute(ctxt, schema, child, 0);
-        } else if (IS_SCHEMA(child, "attributeGroup")) {
-            attr = (xmlSchemaAttributePtr)
-                xmlSchemaParseAttributeGroup(ctxt, schema, child, 0);
+    while ((IS_SCHEMA((*child), "attribute")) ||
+           (IS_SCHEMA((*child), "attributeGroup"))) {
+        if (IS_SCHEMA((*child), "attribute")) {
+	    item = xmlSchemaParseLocalAttribute(ctxt, schema, *child,
+		*list, parentType);
+        } else {
+            item = xmlSchemaParseAttributeGroupRef(ctxt, schema, *child);
+	    if ((item != NULL) && (hasRefs != NULL))
+		*hasRefs = 1;
         }
-        if (attr != NULL) {
-            if (lastattr == NULL) {
-		if (type->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP)
-		    ((xmlSchemaAttributeGroupPtr) type)->attributes = attr;
-		else
-		    type->attributes = attr;
-                lastattr = attr;
-            } else {
-                lastattr->next = attr;
-                lastattr = attr;
-            }
-        }
-        child = child->next;
+	if (item != NULL) {
+	    if (*list == NULL) {
+		/* TODO: Customize grow factor. */
+		*list = xmlSchemaItemListCreate();
+		if (*list == NULL)
+		    return(-1);
+	    }
+	    if (xmlSchemaItemListAddSize(*list, 2, item) == -1)
+		return(-1);
+	}
+        *child = (*child)->next;
     }
-    return (child);
+    return (0);
 }
 
 /**
@@ -5912,7 +6452,7 @@
  */
 static xmlSchemaAnnotPtr
 xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
-                         xmlNodePtr node)
+                         xmlNodePtr node, int needed)
 {
     xmlSchemaAnnotPtr ret;
     xmlNodePtr child = NULL;
@@ -5929,7 +6469,10 @@
     */
     if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
         return (NULL);
-    ret = xmlSchemaNewAnnot(ctxt, node);
+    if (needed)
+	ret = xmlSchemaNewAnnot(ctxt, node);
+    else
+	ret = NULL;
     attr = node->properties;
     while (attr != NULL) {
 	if (((attr->ns == NULL) &&
@@ -5938,12 +6481,11 @@
 	    xmlStrEqual(attr->ns->href, xmlSchemaNs))) {
 
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * And now for the children...
     */
@@ -5964,12 +6506,11 @@
 		      xmlStrEqual(attr->ns->href, xmlSchemaNs))) {
 
 		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			NULL, NULL, attr);
+			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		}
 		attr = attr->next;
 	    }
-	    xmlSchemaPValAttr(ctxt, NULL, NULL, child, "source",
+	    xmlSchemaPValAttr(ctxt, NULL, child, "source",
 		xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL);
 	    child = child->next;
 	} else if (IS_SCHEMA(child, "documentation")) {
@@ -5984,8 +6525,7 @@
 		if (attr->ns == NULL) {
 		    if (!xmlStrEqual(attr->name, BAD_CAST "source")) {
 			xmlSchemaPIllegalAttrErr(ctxt,
-			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			    NULL, NULL, attr);
+			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		    }
 		} else {
 		    if (xmlStrEqual(attr->ns->href, xmlSchemaNs) ||
@@ -5993,8 +6533,7 @@
 			(!xmlStrEqual(attr->ns->href, XML_XML_NAMESPACE)))) {
 
 			xmlSchemaPIllegalAttrErr(ctxt,
-			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			    NULL, NULL, attr);
+			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		    }
 		}
 		attr = attr->next;
@@ -6004,14 +6543,14 @@
 	    */
 	    attr = xmlSchemaGetPropNodeNs(child, (const char *) XML_XML_NAMESPACE, "lang");
 	    if (attr != NULL)
-		xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr,
+		xmlSchemaPValAttrNode(ctxt, NULL, attr,
 		xmlSchemaGetBuiltInType(XML_SCHEMAS_LANGUAGE), NULL);
 	    child = child->next;
 	} else {
 	    if (!barked)
 		xmlSchemaPContentErr(ctxt,
 		    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		    NULL, NULL, node, child, NULL, "(appinfo | documentation)*");
+		    NULL, node, child, NULL, "(appinfo | documentation)*");
 	    barked = 1;
 	    child = child->next;
 	}
@@ -6085,8 +6624,7 @@
         xmlSchemaFreeFacet(facet);
         return (NULL);
     }
-    xmlSchemaPValAttrID(ctxt, NULL,
-	(xmlSchemaTypePtr) facet, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     facet->value = value;
     if ((facet->type != XML_SCHEMA_FACET_PATTERN) &&
 	(facet->type != XML_SCHEMA_FACET_ENUMERATION)) {
@@ -6101,7 +6639,7 @@
     child = node->children;
 
     if (IS_SCHEMA(child, "annotation")) {
-        facet->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        facet->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
     if (child != NULL) {
@@ -6199,7 +6737,7 @@
 		    /*
 		    * Validate the item (anyURI).
 		    */
-		    xmlSchemaPValAttrNodeValue(ctxt, NULL, NULL, attr,
+		    xmlSchemaPValAttrNodeValue(ctxt, NULL, attr,
 			nsItem, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI));
 		    dictnsItem = xmlDictLookup(ctxt->dict, nsItem, -1);
 		}
@@ -6317,17 +6855,15 @@
 	        (!xmlStrEqual(attr->name, BAD_CAST "namespace")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "processContents"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * minOccurs/maxOccurs.
     */
@@ -6348,13 +6884,13 @@
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child,
+	    NULL, node, child,
 	    NULL, "(annotation?)");
     }
     /*
@@ -6371,8 +6907,6 @@
     if (particle == NULL)
         return (NULL);
     particle->annot = annot;
-    wild->minOccurs = min;
-    wild->maxOccurs = max;
     particle->children = (xmlSchemaTreeItemPtr) wild;
 
     return (particle);
@@ -6404,29 +6938,26 @@
                        "Notation has no name\n", NULL, NULL);
         return (NULL);
     }
-    ret = xmlSchemaAddNotation(ctxt, schema, name);
-    if (ret == NULL) {
+    ret = xmlSchemaAddNotation(ctxt, schema, name,
+	ctxt->targetNamespace, node);
+    if (ret == NULL)
         return (NULL);
-    }
-    ret->targetNamespace = ctxt->targetNamespace;
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
 
-    xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret,
-	node, BAD_CAST "id");
-
      if (IS_SCHEMA(child, "annotation")) {
-        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
 
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child,
+	    NULL, node, child,
 	    NULL, "(annotation?)");
     }
 
@@ -6470,18 +7001,15 @@
 	        (!xmlStrEqual(attr->name, BAD_CAST "namespace")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "processContents"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
-    xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret,
-	node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * Parse the namespace list.
     */
@@ -6492,13 +7020,13 @@
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child,
+	    NULL, node, child,
 	    NULL, "(annotation?)");
     }
 
@@ -6517,227 +7045,491 @@
  *
  * Returns the attribute declaration.
  */
-static xmlSchemaAttributePtr
-xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
-                        xmlNodePtr node, int topLevel)
+static xmlSchemaBasicItemPtr
+xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt,
+			     xmlSchemaPtr schema,
+			     xmlNodePtr node,
+			     xmlSchemaItemListPtr uses,
+			     int parentType)
 {
-    const xmlChar *name, *attrValue;
-    xmlChar *repName = NULL; /* The reported designation. */
-    xmlSchemaAttributePtr ret;
+    const xmlChar *attrValue, *name = NULL, *ns = NULL;
+    xmlSchemaAttributeUsePtr use = NULL;    
     xmlNodePtr child = NULL;
-    xmlAttrPtr attr, nameAttr;
-    int isRef = 0;
+    xmlAttrPtr attr;
+    const xmlChar *tmpNs = NULL, *tmpName = NULL, *defValue = NULL;
+    int isRef = 0, occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
+    int	nberrors, hasForm = 0, defValueType = 0;
 
+#define WXS_ATTR_DEF_VAL_DEFAULT 1
+#define WXS_ATTR_DEF_VAL_FIXED 2
+
     /*
-     * Note that the w3c spec assumes the schema to be validated with schema
-     * for schemas beforehand.
-     *
      * 3.2.3 Constraints on XML Representations of Attribute Declarations
      */
 
-    if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+    if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
         return (NULL);
     attr = xmlSchemaGetPropNode(node, "ref");
-    nameAttr = xmlSchemaGetPropNode(node, "name");
-
-    if ((attr == NULL) && (nameAttr == NULL)) {
-	/*
-	* 3.2.3 : 3.1
-	* One of ref or name must be present, but not both
-	*/
-	xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_1,
-	    NULL, node, NULL,
-	    "One of the attributes 'ref' or 'name' must be present");
-	return (NULL);
-    }
-    if ((topLevel) || (attr == NULL)) {
-	if (nameAttr == NULL) {
-	    xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING,
-		NULL, node, "name", NULL);
+    if (attr != NULL) {
+	if (xmlSchemaPValAttrNodeQName(pctxt, schema,
+	    NULL, attr, &tmpNs, &tmpName) != 0) {
 	    return (NULL);
 	}
-    } else
+	if (xmlSchemaCheckReference(pctxt, schema, node, attr, tmpNs) != 0)
+	    return(NULL);
 	isRef = 1;
+    }
+    nberrors = pctxt->nberrors;
+    /*
+    * Check for illegal attributes.
+    */
+    attr = node->properties;
+    while (attr != NULL) {
+	if (attr->ns == NULL) {
+	    if (isRef) {
+		if (xmlStrEqual(attr->name, BAD_CAST "id")) {
+		    xmlSchemaPValAttrNodeID(pctxt, attr);
+		    goto attr_next;
+		} else if (xmlStrEqual(attr->name, BAD_CAST "ref")) {
+		    goto attr_next;
+		}
+	    } else {
+		if (xmlStrEqual(attr->name, BAD_CAST "name")) {
+		    goto attr_next;
+		} else if (xmlStrEqual(attr->name, BAD_CAST "id")) {
+		    xmlSchemaPValAttrNodeID(pctxt, attr);
+		    goto attr_next;
+		} else if (xmlStrEqual(attr->name, BAD_CAST "type")) {
+		    xmlSchemaPValAttrNodeQName(pctxt, schema, NULL,
+			attr, &tmpNs, &tmpName);
+		    goto attr_next;
+		} else if (xmlStrEqual(attr->name, BAD_CAST "form")) {
+		    /*
+		    * Evaluate the target namespace
+		    */
+		    hasForm = 1;		    
+		    attrValue = xmlSchemaGetNodeContent(pctxt,
+			(xmlNodePtr) attr);
+		    if (xmlStrEqual(attrValue, BAD_CAST "qualified")) {
+			ns = pctxt->targetNamespace;
+		    } else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified"))
+		    {
+			xmlSchemaPSimpleTypeErr(pctxt,
+			    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+			    NULL, (xmlNodePtr) attr,
+			    NULL, "(qualified | unqualified)",
+			    attrValue, NULL, NULL, NULL);
+		    }
+		    goto attr_next;
+		}
+	    }
+	    if (xmlStrEqual(attr->name, BAD_CAST "use")) {
 
-    if (isRef) {
-#ifdef ENABLE_NAMED_LOCALS
-	char buf[50];
-#endif
-	const xmlChar *refNs = NULL, *ref = NULL;
+		attrValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
+		/* TODO: Maybe we need to normalize the value beforehand. */
+		if (xmlStrEqual(attrValue, BAD_CAST "optional"))
+		    occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
+		else if (xmlStrEqual(attrValue, BAD_CAST "prohibited"))
+		    occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED;
+		else if (xmlStrEqual(attrValue, BAD_CAST "required"))
+		    occurs = XML_SCHEMAS_ATTR_USE_REQUIRED;
+		else {
+		    xmlSchemaPSimpleTypeErr(pctxt,
+			XML_SCHEMAP_INVALID_ATTR_USE,
+			NULL, (xmlNodePtr) attr,
+			NULL, "(optional | prohibited | required)",
+			attrValue, NULL, NULL, NULL);
+		}
+		goto attr_next;
+	    } else if (xmlStrEqual(attr->name, BAD_CAST "default")) {
+		/*
+		* 3.2.3 : 1
+		* default and fixed must not both be present.
+		*/
+		if (defValue) {
+		    xmlSchemaPMutualExclAttrErr(pctxt,
+			XML_SCHEMAP_SRC_ATTRIBUTE_1,
+			NULL, attr, "default", "fixed");
+		} else {
+		    defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
+		    defValueType = WXS_ATTR_DEF_VAL_DEFAULT;
+		}
+		goto attr_next;
+	    } else if (xmlStrEqual(attr->name, BAD_CAST "fixed")) {
+		/*
+		* 3.2.3 : 1
+		* default and fixed must not both be present.
+		*/
+		if (defValue) {
+		    xmlSchemaPMutualExclAttrErr(pctxt,
+			XML_SCHEMAP_SRC_ATTRIBUTE_1,
+			NULL, attr, "default", "fixed");
+		} else {
+		    defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
+		    defValueType = WXS_ATTR_DEF_VAL_FIXED;
+		}
+		goto attr_next;
+	    }
+	} else if (! xmlStrEqual(attr->ns->href, xmlSchemaNs))
+	    goto attr_next;
 
+	xmlSchemaPIllegalAttrErr(pctxt,
+	    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+
+attr_next:
+	attr = attr->next;
+    }        
+    /*
+    * 3.2.3 : 2
+    * If default and use are both present, use must have
+    * the actual value optional.
+    */
+    if ((defValueType == WXS_ATTR_DEF_VAL_DEFAULT) &&
+	(occurs != XML_SCHEMAS_ATTR_USE_OPTIONAL)) {
+	xmlSchemaPSimpleTypeErr(pctxt,
+	    XML_SCHEMAP_SRC_ATTRIBUTE_2,
+	    NULL, node, NULL,
+	    "(optional | prohibited | required)", NULL,
+	    "The value of the attribute 'use' must be 'optional' "
+	    "if the attribute 'default' is present",
+	    NULL, NULL);
+    }
+    /*
+    * We want correct attributes.
+    */
+    if (nberrors != pctxt->nberrors)
+	return(NULL);
+    if (! isRef) {
+	xmlSchemaAttributePtr attrDecl;
+
+	/* TODO: move XML_SCHEMAS_QUALIF_ATTR to the parser. */
+	if ((! hasForm) && (schema->flags & XML_SCHEMAS_QUALIF_ATTR))
+	    ns = pctxt->targetNamespace;		
 	/*
-	* Parse as attribute reference.
+	* 3.2.6 Schema Component Constraint: xsi: Not Allowed
+	* TODO: Move this to the component layer.
 	*/
-	if (xmlSchemaPValAttrNodeQName(ctxt, schema,
-	    (xmlChar **) &xmlSchemaElemDesAttrRef, NULL, attr, &refNs,
-	    &ref) != 0) {
+	if (xmlStrEqual(ns, xmlSchemaInstanceNs)) {
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		XML_SCHEMAP_NO_XSI,
+		node, NULL,
+		"The target namespace must not match '%s'",
+		xmlSchemaInstanceNs, NULL);
+	}
+	attr = xmlSchemaGetPropNode(node, "name");
+	if (attr == NULL) {
+	    xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING,
+		NULL, node, "name", NULL);
 	    return (NULL);
 	}
-#ifdef ENABLE_NAMED_LOCALS
-        snprintf(buf, 49, "#aRef%d", ctxt->counter++ + 1);
-        name = (const xmlChar *) buf;
-	ret = xmlSchemaAddAttribute(ctxt, schema, name, NULL, node, 0);
-#else
-	ret = xmlSchemaAddAttribute(ctxt, schema, NULL, NULL, node, 0);
-#endif
-	
-	if (ret == NULL) {
-	    if (repName != NULL)
-		xmlFree(repName);
+	if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
+	    xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
 	    return (NULL);
 	}
-	ret->type = XML_SCHEMA_TYPE_ATTRIBUTE;
-	ret->node = node;
-	ret->refNs = refNs;
-	ret->ref = ref;
-	xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaBasicItemPtr) ret,
-	    refNs);
 	/*
-	xmlSchemaFormatTypeRep(&repName, (xmlSchemaTypePtr) ret, NULL, NULL);
+	* 3.2.6 Schema Component Constraint: xmlns Not Allowed
+	* TODO: Move this to the component layer.
 	*/
-	if (nameAttr != NULL)
-	    xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_1,
-		&repName, (xmlSchemaTypePtr) ret, nameAttr,
-		"ref", "name");
+	if (xmlStrEqual(name, BAD_CAST "xmlns")) {
+	    xmlSchemaPSimpleTypeErr(pctxt,
+		XML_SCHEMAP_NO_XMLNS,
+		NULL, (xmlNodePtr) attr,
+		xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL,
+		"The value of the attribute must not match 'xmlns'",
+		NULL, NULL);
+	    return (NULL);
+	}
+	if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED)
+	    goto check_children;
 	/*
-	* Check for illegal attributes.
+	* Create the attribute use component.
 	*/
-	attr = node->properties;
-	while (attr != NULL) {
-	    if (attr->ns == NULL) {
-		if (xmlStrEqual(attr->name, BAD_CAST "type") ||
-		    xmlStrEqual(attr->name, BAD_CAST "form")) {
-		    /*
-		    * 3.2.3 : 3.2
-		    * If ref is present, then all of <simpleType>,
-		    * form and type must be absent.
-		    */
-		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_SRC_ATTRIBUTE_3_2, &repName,
-			(xmlSchemaTypePtr) ret, attr);
-		} else if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "use")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "id")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "name")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "fixed")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "default"))) {
-		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			&repName, (xmlSchemaTypePtr) ret, attr);
-		}
-	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
-		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    &repName, (xmlSchemaTypePtr) ret, attr);
-	    }
-	    attr = attr->next;
-	}
-    } else {
-        const xmlChar *ns = NULL;
-
+	use = xmlSchemaAddAttributeUse(pctxt, node);
+	if (use == NULL)
+	    return(NULL);
+	use->occurs = occurs;
 	/*
-	* Parse as attribute declaration.
+	* Create the attribute declaration.
 	*/
-	if (xmlSchemaPValAttrNode(ctxt,
-	    (xmlChar **) &xmlSchemaElemDesAttrDecl, NULL, nameAttr,
-	    xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
+	attrDecl = xmlSchemaAddAttribute(pctxt, schema, name, ns, node, 0);
+	if (attrDecl == NULL)
 	    return (NULL);
+	if (tmpName != NULL) {
+	    attrDecl->typeName = tmpName;
+	    attrDecl->typeNs = tmpNs;
 	}
+	use->attrDecl = attrDecl;
 	/*
-	xmlSchemaFormatTypeRep(&repName, NULL, xmlSchemaElemDesAttrDecl, name);
+	* Value constraint.
+	*/	
+	if (defValue != NULL) {
+	    attrDecl->defValue = defValue;
+	    if (defValueType == WXS_ATTR_DEF_VAL_FIXED)
+		attrDecl->flags |= XML_SCHEMAS_ATTR_FIXED;
+	}
+    } else if (occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED) {
+	xmlSchemaQNameRefPtr ref;
+
+	/*
+	* Create the attribute use component.
 	*/
+	use = xmlSchemaAddAttributeUse(pctxt, node);
+	if (use == NULL)
+	    return(NULL);
 	/*
-	* 3.2.6 Schema Component Constraint: xmlns Not Allowed
-	* TODO: Move this to the component layer.
+	* We need to resolve the reference at later stage.
 	*/
-	if (xmlStrEqual(name, BAD_CAST "xmlns")) {
-	    xmlSchemaPSimpleTypeErr(ctxt,
-		XML_SCHEMAP_NO_XMLNS,
-		NULL, (xmlNodePtr) nameAttr,
-		xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL,
-		"The value of type 'xs:NCName' must not match 'xmlns'",
-		NULL, NULL);
-	    if (repName != NULL)
-		xmlFree(repName);
-	    return (NULL);
+	WXS_ADD_PENDING(pctxt, use);
+	use->occurs = occurs;
+	/*
+	* Create a QName reference to the attribute declaration.
+	*/
+	ref = xmlSchemaNewQNameRef(pctxt, XML_SCHEMA_TYPE_ATTRIBUTE,
+	    tmpName, tmpNs);
+	if (ref == NULL)
+	    return(NULL);
+	/*
+	* Assign the reference. This will be substituted for the
+	* referenced attribute declaration when the QName is resolved.
+	*/
+	use->attrDecl = WXS_ATTR_CAST ref;
+	/*
+	* Value constraint.
+	*/
+	if (defValue != NULL)
+	    use->defValue = defValue;
+	    if (defValueType == WXS_ATTR_DEF_VAL_FIXED)
+		use->flags |= XML_SCHEMA_ATTR_USE_FIXED;
+    }
+    
+check_children:
+    /*
+    * And now for the children...
+    */
+    child = node->children;
+    if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) {
+	xmlSchemaAttributeUseProhibPtr prohib;	
+
+	if (IS_SCHEMA(child, "annotation")) {
+	    xmlSchemaParseAnnotation(pctxt, schema, child, 0);
+	    child = child->next;
 	}
+	if (child != NULL) {
+	    xmlSchemaPContentErr(pctxt,
+		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+		NULL, node, child, NULL,
+		"(annotation?)");
+	}
 	/*
-	* Evaluate the target namespace
+	* Check for pointlessness of attribute prohibitions.
 	*/
-	if (topLevel) {
-	    ns = ctxt->targetNamespace;
-	} else {
-	    attr = xmlSchemaGetPropNode(node, "form");
-	    if (attr != NULL) {
-		attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
-		if (xmlStrEqual(attrValue, BAD_CAST "qualified")) {
-		    ns = ctxt->targetNamespace;
-		} else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified")) {
-		    xmlSchemaPSimpleTypeErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-			NULL, (xmlNodePtr) attr,
-			NULL, "(qualified | unqualified)",
-			attrValue, NULL, NULL, NULL);
-		}
-	    } else if (schema->flags & XML_SCHEMAS_QUALIF_ATTR)
-		/* TODO: move XML_SCHEMAS_QUALIF_ATTR to the parser. */
-		ns = ctxt->targetNamespace;
+	if (parentType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) {		
+	    xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+		XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+		node, NULL,
+		"Skipping attribute use prohibition, since it is "
+		"pointless inside an <attributeGroup>",
+		NULL, NULL, NULL);
+	    return(NULL);
+	} else if (parentType == XML_SCHEMA_TYPE_EXTENSION) {
+	    xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+		XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+		node, NULL,
+		"Skipping attribute use prohibition, since it is "
+		"pointless when extending a type",
+		NULL, NULL, NULL);
+	    return(NULL);
 	}
-        ret = xmlSchemaAddAttribute(ctxt, schema, name, ns, node, topLevel);
-	if (ret == NULL) {
-	    if (repName != NULL)
-		xmlFree(repName);
-	    return (NULL);
+	if (! isRef) {
+	    tmpName = name; 
+	    tmpNs = ns;
 	}
-	ret->type = XML_SCHEMA_TYPE_ATTRIBUTE;
-	ret->node = node;
-	if (topLevel)
-	    ret->flags |= XML_SCHEMAS_ATTR_GLOBAL;
 	/*
-	* 3.2.6 Schema Component Constraint: xsi: Not Allowed
-	* TODO: Move this to the component layer.
+	* Check for duplicate attribute prohibitions.
 	*/
-	if (xmlStrEqual(ret->targetNamespace, xmlSchemaInstanceNs)) {
-	    xmlSchemaPCustomErr(ctxt,
-		XML_SCHEMAP_NO_XSI,
-		&repName, (xmlSchemaTypePtr) ret, node,
-		"The target namespace must not match '%s'",
-		xmlSchemaInstanceNs);
+	if (uses) {
+	    int i;
+	    
+	    for (i = 0; i < uses->nbItems; i++) {
+		use = uses->items[i];
+		if ((use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) &&
+		    (tmpName == (WXS_ATTR_PROHIB_CAST use)->name) &&
+		    (tmpNs == (WXS_ATTR_PROHIB_CAST use)->targetNamespace))
+		{
+		    xmlChar *str = NULL;
+		    
+		    xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+			XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+			node, NULL,
+			"Skipping duplicate attribute use prohibition '%s'",
+			xmlSchemaFormatQName(&str, tmpNs, tmpName),
+			NULL, NULL);
+		    FREE_AND_NULL(str)			
+		    return(NULL);
+		}	
+	    }
 	}
 	/*
-	* Check for illegal attributes.
+	* Create the attribute prohibition helper component.
 	*/
-	attr = node->properties;
-	while (attr != NULL) {
-	    if (attr->ns == NULL) {
-		if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "default")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "fixed")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "name")) &&
-		    (!xmlStrEqual(attr->name, BAD_CAST "type"))) {
-		    if ((topLevel) ||
-		        ((!xmlStrEqual(attr->name, BAD_CAST "form")) &&
-			 (!xmlStrEqual(attr->name, BAD_CAST "use")))) {
-			xmlSchemaPIllegalAttrErr(ctxt,
-			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			    &repName, (xmlSchemaTypePtr) ret, attr);
-		    }
-		}
-	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
-		xmlSchemaPIllegalAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    &repName, (xmlSchemaTypePtr) ret, attr);
+	prohib = xmlSchemaAddAttributeUseProhib(pctxt);
+	if (prohib == NULL)
+	    return(NULL);
+	prohib->node = node;
+	prohib->name = tmpName;
+	prohib->targetNamespace = tmpNs;
+	if (isRef) {
+	    /*
+	    * We need at least to resolve to the attribute declaration.
+	    */
+	    WXS_ADD_PENDING(pctxt, prohib);
+	}
+	return(WXS_BASIC_CAST prohib);
+    } else {        
+	if (IS_SCHEMA(child, "annotation")) {
+	    /*
+	    * TODO: Should this go into the attr decl?
+	    */
+	    use->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1);
+	    child = child->next;
+	}
+	if (isRef) {
+	    if (child != NULL) {
+		if (IS_SCHEMA(child, "simpleType"))
+		    /*
+		    * 3.2.3 : 3.2
+		    * If ref is present, then all of <simpleType>,
+		    * form and type must be absent.
+		    */
+		    xmlSchemaPContentErr(pctxt,
+			XML_SCHEMAP_SRC_ATTRIBUTE_3_2,
+			NULL, node, child, NULL,
+			"(annotation?)");
+		else
+		    xmlSchemaPContentErr(pctxt,
+			XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+			NULL, node, child, NULL,
+			"(annotation?)");
 	    }
-	    attr = attr->next;
+	} else {
+	    if (IS_SCHEMA(child, "simpleType")) {
+		if (WXS_ATTRUSE_DECL(use)->typeName != NULL) {
+		    /*
+		    * 3.2.3 : 4
+		    * type and <simpleType> must not both be present.
+		    */
+		    xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4,
+			NULL, node, child,
+			"The attribute 'type' and the <simpleType> child "
+			"are mutually exclusive", NULL);
+		} else
+		    WXS_ATTRUSE_TYPEDEF(use) =
+			xmlSchemaParseSimpleType(pctxt, schema, child, 0);
+		child = child->next;
+	    }
+	    if (child != NULL)
+		xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+		NULL, node, child, NULL,
+		"(annotation?, simpleType?)");
 	}
-	xmlSchemaPValAttrQName(ctxt, schema, &repName, (xmlSchemaTypePtr) ret,
-	    node, "type", &ret->typeNs, &ret->typeName);
+    }   
+    return (WXS_BASIC_CAST use);
+}
+
+
+static xmlSchemaAttributePtr
+xmlSchemaParseGlobalAttribute(xmlSchemaParserCtxtPtr pctxt,
+			      xmlSchemaPtr schema,
+			      xmlNodePtr node)
+{
+    const xmlChar *attrValue;
+    xmlSchemaAttributePtr ret;
+    xmlNodePtr child = NULL;
+    xmlAttrPtr attr;
+
+    /*
+     * Note that the w3c spec assumes the schema to be validated with schema
+     * for schemas beforehand.
+     *
+     * 3.2.3 Constraints on XML Representations of Attribute Declarations
+     */
+    if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+        return (NULL);        
+    /*
+    * 3.2.3 : 3.1
+    * One of ref or name must be present, but not both
+    */
+    attr = xmlSchemaGetPropNode(node, "name");
+    if (attr == NULL) {
+	xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING,
+	    NULL, node, "name", NULL);
+	return (NULL);
     }
-    xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret,
-	node, BAD_CAST "id");
+    if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
+	xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0) {
+	return (NULL);
+    }
     /*
+    * 3.2.6 Schema Component Constraint: xmlns Not Allowed
+    * TODO: Move this to the component layer.
+    */
+    if (xmlStrEqual(attrValue, BAD_CAST "xmlns")) {
+	xmlSchemaPSimpleTypeErr(pctxt,
+	    XML_SCHEMAP_NO_XMLNS,
+	    NULL, (xmlNodePtr) attr,
+	    xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL,
+	    "The value of the attribute must not match 'xmlns'",
+	    NULL, NULL);
+	return (NULL);
+    }
+    /*
+    * 3.2.6 Schema Component Constraint: xsi: Not Allowed
+    * TODO: Move this to the component layer.
+    *       Or better leave it here and add it to the component layer
+    *       if we have a schema construction API.
+    */
+    if (xmlStrEqual(pctxt->targetNamespace, xmlSchemaInstanceNs)) {
+	xmlSchemaCustomErr(ACTXT_CAST pctxt,
+	    XML_SCHEMAP_NO_XSI, node, NULL,
+	    "The target namespace must not match '%s'",
+	    xmlSchemaInstanceNs, NULL);
+    }
+
+    ret = xmlSchemaAddAttribute(pctxt, schema, attrValue,
+	pctxt->targetNamespace, node, 1);
+    if (ret == NULL)
+	return (NULL);
+    ret->flags |= XML_SCHEMAS_ATTR_GLOBAL;
+	
+    /*
+    * Check for illegal attributes.
+    */
+    attr = node->properties;
+    while (attr != NULL) {
+	if (attr->ns == NULL) {
+	    if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+		(!xmlStrEqual(attr->name, BAD_CAST "default")) &&
+		(!xmlStrEqual(attr->name, BAD_CAST "fixed")) &&
+		(!xmlStrEqual(attr->name, BAD_CAST "name")) &&
+		(!xmlStrEqual(attr->name, BAD_CAST "type")))
+	    {
+		xmlSchemaPIllegalAttrErr(pctxt,
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);		
+	    }
+	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+	    xmlSchemaPIllegalAttrErr(pctxt,
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+	}
+	attr = attr->next;
+    }
+    xmlSchemaPValAttrQName(pctxt, schema, NULL,
+	node, "type", &ret->typeNs, &ret->typeName);
+    
+    xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
+    /*
     * Attribute "fixed".
     */
-    ret->defValue = xmlSchemaGetProp(ctxt, node, "fixed");
+    ret->defValue = xmlSchemaGetProp(pctxt, node, "fixed");
     if (ret->defValue != NULL)
 	ret->flags |= XML_SCHEMAS_ATTR_FIXED;
     /*
@@ -6750,233 +7542,268 @@
 	* default and fixed must not both be present.
 	*/
 	if (ret->flags & XML_SCHEMAS_ATTR_FIXED) {
-	    xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1,
-		&repName, (xmlSchemaTypePtr) ret, attr, "default", "fixed");
+	    xmlSchemaPMutualExclAttrErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1,
+		WXS_BASIC_CAST ret, attr, "default", "fixed");
 	} else
-	    ret->defValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+	    ret->defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
     }
-    if (topLevel == 0) {
-	/*
-	* Attribute "use".
-	*/
-	attr = xmlSchemaGetPropNode(node, "use");
-	if (attr != NULL) {
-	    attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
-	    if (xmlStrEqual(attrValue, BAD_CAST "optional"))
-		ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
-	    else if (xmlStrEqual(attrValue, BAD_CAST "prohibited"))
-		ret->occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED;
-	    else if (xmlStrEqual(attrValue, BAD_CAST "required"))
-		ret->occurs = XML_SCHEMAS_ATTR_USE_REQUIRED;
-	    else
-		xmlSchemaPSimpleTypeErr(ctxt,
-		    XML_SCHEMAP_INVALID_ATTR_USE,
-		    (xmlSchemaTypePtr) ret, (xmlNodePtr) attr,
-		    NULL, "(optional | prohibited | required)",
-		    attrValue, NULL, NULL, NULL);
-	} else
-	    ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
-	/*
-	* 3.2.3 : 2
-	* If default and use are both present, use must have
-	* the actual value optional.
-	*/
-	if ((ret->occurs != XML_SCHEMAS_ATTR_USE_OPTIONAL) &&
-	    (ret->defValue != NULL) &&
-	    ((ret->flags & XML_SCHEMAS_ATTR_FIXED) == 0)) {
-	    xmlSchemaPSimpleTypeErr(ctxt,
-		XML_SCHEMAP_SRC_ATTRIBUTE_2,
-		(xmlSchemaTypePtr) ret, (xmlNodePtr) attr,
-		NULL, "(optional | prohibited | required)", NULL,
-		"The value must be 'optional' if the attribute "
-		"'default' is present as well", NULL, NULL);
-	}
-    }
     /*
     * And now for the children...
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        ret->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1);
         child = child->next;
     }
-    if (isRef) {
-	if (child != NULL) {
-	    if (IS_SCHEMA(child, "simpleType"))
-		/*
-		* 3.2.3 : 3.2
-		* If ref is present, then all of <simpleType>,
-		* form and type must be absent.
-		*/
-		xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_2,
-		    &repName, (xmlSchemaTypePtr) ret, node, child, NULL,
-		    "(annotation?)");
-	    else
-		xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		    &repName, (xmlSchemaTypePtr) ret, node, child, NULL,
-		    "(annotation?)");
-	}
-    } else {
-	if (IS_SCHEMA(child, "simpleType")) {
-	    if (ret->typeName != NULL) {
-		/*
-		* 3.2.3 : 4
-		* type and <simpleType> must not both be present.
-		*/
-		xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4,
-		    &repName,  (xmlSchemaTypePtr) ret, node, child,
-		    "The attribute 'type' and the <simpleType> child "
-		    "are mutually exclusive", NULL);
-	    } else
-		ret->subtypes = xmlSchemaParseSimpleType(ctxt, schema, child, 0);
-	    child = child->next;
-	}
-	if (child != NULL)
-	    xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		&repName, (xmlSchemaTypePtr) ret, node, child, NULL,
-		"(annotation?, simpleType?)");
+    if (IS_SCHEMA(child, "simpleType")) {
+	if (ret->typeName != NULL) {
+	    /*
+	    * 3.2.3 : 4
+	    * type and <simpleType> must not both be present.
+	    */
+	    xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4,
+		NULL, node, child,
+		"The attribute 'type' and the <simpleType> child "
+		"are mutually exclusive", NULL);
+	} else
+	    ret->subtypes = xmlSchemaParseSimpleType(pctxt, schema, child, 0);
+	child = child->next;
     }
-    /*
-    * Cleanup.
-    */
-    if (repName != NULL)
-	xmlFree(repName);
+    if (child != NULL)
+	xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+	    NULL, node, child, NULL,
+	    "(annotation?, simpleType?)");
+
     return (ret);
 }
 
 /**
- * xmlSchemaParseAttributeGroup:
+ * xmlSchemaParseAttributeGroupRef:
  * @ctxt:  a schema validation context
  * @schema:  the schema being built
  * @node:  a subtree containing XML Schema informations
  *
- * parse a XML schema Attribute Group declaration
+ * Parse an attribute group definition reference.
+ * Note that a reference to an attribute group does not
+ * correspond to any component at all.
  * *WARNING* this interface is highly subject to change
  *
  * Returns the attribute group or NULL in case of error.
  */
-static xmlSchemaAttributeGroupPtr
-xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt,
-                             xmlSchemaPtr schema, xmlNodePtr node,
-			     int topLevel)
+static xmlSchemaQNameRefPtr
+xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
+				xmlSchemaPtr schema,
+				xmlNodePtr node)
 {
-    const xmlChar *name;
-    xmlSchemaAttributeGroupPtr ret;
+    xmlSchemaQNameRefPtr ret;
     xmlNodePtr child = NULL;
-    xmlAttrPtr attr, nameAttr;
+    xmlAttrPtr attr;
+    const xmlChar *refNs = NULL, *ref = NULL;
 
-    if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+    if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
         return (NULL);
 
-    nameAttr = xmlSchemaGetPropNode(node, "name");
     attr = xmlSchemaGetPropNode(node, "ref");
-    if ((topLevel) || (attr == NULL)) {
+    if (attr == NULL) {
+	xmlSchemaPMissingAttrErr(pctxt,
+	    XML_SCHEMAP_S4S_ATTR_MISSING,
+	    NULL, node, "ref", NULL);
+	return (NULL);
+    }	
+    xmlSchemaPValAttrNodeQName(pctxt, schema,
+	NULL, attr, &refNs, &ref);
+    if (xmlSchemaCheckReference(pctxt, schema, node, attr, refNs) != 0)
+	return(NULL);
+   
+    /*
+    * Check for illegal attributes.
+    */
+    attr = node->properties;
+    while (attr != NULL) {
+	if (attr->ns == NULL) {
+	    if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) &&
+		(!xmlStrEqual(attr->name, BAD_CAST "id")))
+	    {
+		xmlSchemaPIllegalAttrErr(pctxt,
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+	    }
+	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+	    xmlSchemaPIllegalAttrErr(pctxt,
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+	}
+	attr = attr->next;
+    }
+    /* Attribute ID */
+    xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
+
+    /*
+    * And now for the children...
+    */
+    child = node->children;
+    if (IS_SCHEMA(child, "annotation")) {
 	/*
-	* Parse as an attribute group definition.
-	* Note that those are allowed at top level only.
+	* TODO: We do not have a place to store the annotation, do we?
 	*/
-	if (nameAttr == NULL) {
-	    xmlSchemaPMissingAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_MISSING,
-		NULL, node, "name", NULL);
-	    return (NULL);
+        xmlSchemaParseAnnotation(pctxt, schema, child, 0);
+        child = child->next;
+    }
+    if (child != NULL) {
+	xmlSchemaPContentErr(pctxt,
+	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+	    NULL, node, child, NULL,
+	    "(annotation?)");
+    }
+
+    /*
+    * Handle attribute group redefinitions.
+    */
+    if (pctxt->isRedefine && pctxt->redef &&
+	(pctxt->redef->item->type ==
+	    XML_SCHEMA_TYPE_ATTRIBUTEGROUP) &&
+	(ref == pctxt->redef->refName) &&
+	(refNs == pctxt->redef->refTargetNs))
+    {
+	/*
+	* SPEC src-redefine:
+	* (7.1) "If it has an <attributeGroup> among its contents
+	* the ·actual value· of whose ref [attribute] is the same
+	* as the ·actual value· of its own name attribute plus
+	* target namespace, then it must have exactly one such group."
+	*/
+	if (pctxt->redefCounter != 0) {
+	    xmlChar *str = NULL;
+	    
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		XML_SCHEMAP_SRC_REDEFINE, node, NULL,
+		"The redefining attribute group definition "
+		"'%s' must not contain more than one "
+		"reference to the redefined definition",
+		xmlSchemaFormatQName(&str, refNs, ref), NULL);
+	    FREE_AND_NULL(str);
+	    return(NULL);
 	}
-	/* REDUNDANT: name = xmlSchemaGetNodeContent(ctxt,
-	* (xmlNodePtr) nameAttr);
-	*/
+	pctxt->redefCounter++;
 	/*
-	* The name is crucial, exit if invalid.
+	* URGENT TODO: How to ensure that the reference will not be
+	* handled by the normal component resolution mechanism?
 	*/
-	if (xmlSchemaPValAttrNode(ctxt,
-	    NULL, NULL, nameAttr,
-	    xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
-	    return (NULL);
-	}
-	ret = xmlSchemaAddAttributeGroup(ctxt, schema, name, node, 1);
+	ret = xmlSchemaNewQNameRef(pctxt,
+	    XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs);
 	if (ret == NULL)
-	    return (NULL);	
+	    return(NULL);
+	ret->node = node;
+	pctxt->redef->reference = WXS_BASIC_CAST ret;
     } else {
-#ifdef ENABLE_NAMED_LOCALS
-	char buf[50];
-#endif
-	const xmlChar *refNs = NULL, *ref = NULL;
-
 	/*
-	* Parse as an attribute group definition reference.
+	* Create a QName-reference helper component. We will substitute this
+	* component for the attribute uses of the referenced attribute group
+	* definition.
 	*/
-	if (attr == NULL) {
-	    xmlSchemaPMissingAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_MISSING,
-		NULL, node, "ref", NULL);
-	}
-	xmlSchemaPValAttrNodeQName(ctxt, schema,
-	    NULL, NULL, attr, &refNs,&ref);
-#ifdef ENABLE_NAMED_LOCALS
-        snprintf(buf, 49, "#agRef%d", ctxt->counter++ + 1);
-	name = (const xmlChar *) buf;
-	if (name == NULL) {
-	    xmlSchemaPErrMemory(ctxt, "creating internal name for an "
-		"attribute group definition reference", node);
-            return (NULL);
-        }
-	ret = xmlSchemaAddAttributeGroup(ctxt, schema, name, node, 0);
-#else
-	ret = xmlSchemaAddAttributeGroup(ctxt, schema, NULL, node, 0);
-#endif
+	ret = xmlSchemaNewQNameRef(pctxt,
+	    XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs);
 	if (ret == NULL)
-	    return (NULL);
-	ret->ref = ref;
-	ret->refNs = refNs;
-	xmlSchemaCheckReference(ctxt, schema, node,
-	    (xmlSchemaBasicItemPtr) ret, refNs);
+	    return(NULL);
+	ret->node = node;
+	/* Add to pending items, to be able to resolve the reference. */
+	WXS_ADD_PENDING(pctxt, ret);
+    }    
+    return (ret);
+}
+
+/**
+ * xmlSchemaParseAttributeGroupDefinition:
+ * @pctxt:  a schema validation context
+ * @schema:  the schema being built
+ * @node:  a subtree containing XML Schema informations
+ *
+ * parse a XML schema Attribute Group declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the attribute group definition or NULL in case of error.
+ */
+static xmlSchemaAttributeGroupPtr
+xmlSchemaParseAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
+				       xmlSchemaPtr schema,
+				       xmlNodePtr node)
+{
+    const xmlChar *name;
+    xmlSchemaAttributeGroupPtr ret;
+    xmlNodePtr child = NULL;
+    xmlAttrPtr attr;
+    int hasRefs = 0;
+
+    if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+        return (NULL);
+
+    attr = xmlSchemaGetPropNode(node, "name");
+    if (attr == NULL) {
+	xmlSchemaPMissingAttrErr(pctxt,
+	    XML_SCHEMAP_S4S_ATTR_MISSING,
+	    NULL, node, "name", NULL);
+	return (NULL);
     }
     /*
+    * The name is crucial, exit if invalid.
+    */
+    if (xmlSchemaPValAttrNode(pctxt,
+	NULL, attr,
+	xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
+	return (NULL);
+    }
+    ret = xmlSchemaAddAttributeGroupDefinition(pctxt, schema,
+	name, pctxt->targetNamespace, node);
+    if (ret == NULL)
+	return (NULL);	
+    /*
     * Check for illegal attributes.
     */
     attr = node->properties;
     while (attr != NULL) {
 	if (attr->ns == NULL) {
-	    if ((((topLevel == 0) &&
-		(!xmlStrEqual(attr->name, BAD_CAST "ref"))) ||
-		 (topLevel && (!xmlStrEqual(attr->name, BAD_CAST "name")))) &&
+	    if ((!xmlStrEqual(attr->name, BAD_CAST "name")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "id")))
 	    {
-		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		xmlSchemaPIllegalAttrErr(pctxt,
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
-	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+	    xmlSchemaPIllegalAttrErr(pctxt,
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
     /* Attribute ID */
-    xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret,
-	node, BAD_CAST "id");
+    xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
     /*
     * And now for the children...
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        ret->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1);
         child = child->next;
     }
-    if (topLevel) {
-	child = xmlSchemaParseAttrDecls(ctxt, schema, child,
-	    (xmlSchemaTypePtr) ret);
-	if (IS_SCHEMA(child, "anyAttribute")) {
-	    ret->attributeWildcard = xmlSchemaParseAnyAttribute(ctxt,
-		schema, child);
-	    child = child->next;
-	}
+    /*
+    * Parse contained attribute decls/refs.
+    */
+    if (xmlSchemaParseLocalAttributes(pctxt, schema, &child,
+	(xmlSchemaItemListPtr *) &(ret->attrUses),
+	XML_SCHEMA_TYPE_ATTRIBUTEGROUP, &hasRefs) == -1)
+	return(NULL);
+    if (hasRefs)
+	ret->flags |= XML_SCHEMAS_ATTRGROUP_HAS_REFS;
+    /*
+    * Parse the attribute wildcard.
+    */
+    if (IS_SCHEMA(child, "anyAttribute")) {
+	ret->attributeWildcard = xmlSchemaParseAnyAttribute(pctxt,
+	    schema, child);
+	child = child->next;
     }
     if (child != NULL) {
-	xmlSchemaPContentErr(ctxt,
+	xmlSchemaPContentErr(pctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child, NULL,
-	    "(annotation?)");
+	    NULL, node, child, NULL,
+	    "(annotation?, ((attribute | attributeGroup)*, anyAttribute?))");
     }
     return (ret);
 }
@@ -7139,7 +7966,7 @@
 	xmlSchemaPCustomErr(ctxt,
 	    /* TODO: Adjust error code. */
 	    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-	    NULL, NULL, node,
+	    NULL, node,
 	    "The XPath expression of the selector is not valid", NULL);
 	return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE);
     } else {
@@ -7159,7 +7986,6 @@
 	*/
 	if (nsList != NULL) {
 	    int i, count = 0;
-	    xmlNsPtr ns;
 
 	    for (i = 0; nsList[i] != NULL; i++)
 		count++;
@@ -7169,10 +7995,10 @@
 	    if (nsArray == NULL) {
 		xmlSchemaPErrMemory(ctxt, "allocating a namespace array",
 		    NULL);
+		xmlFree(nsList);
 		return (-1);
 	    }
 	    for (i = 0; i < count; i++) {
-		ns = nsList[i];
 		nsArray[2 * i] = nsList[i]->href;
 		nsArray[2 * i + 1] = nsList[i]->prefix;
 	    }
@@ -7195,7 +8021,7 @@
 	    xmlSchemaPCustomErr(ctxt,
 		/* TODO: Adjust error code? */
 		XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-		NULL, NULL, node,
+		NULL, node,
 		"The XPath expression '%s' could not be "
 		"compiled", selector->xpath);
 	    return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE);
@@ -7304,7 +8130,7 @@
 	default:
 	     xmlSchemaPCustomErr(NULL,
 		XML_SCHEMAP_INTERNAL,
-		NULL, NULL, NULL,
+		NULL, NULL,
 		"Internal error: xmlSchemaAddAnnotation, "
 		"The item is not a annotated schema component", NULL);
 	     break;
@@ -7343,13 +8169,11 @@
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "xpath"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
@@ -7390,7 +8214,7 @@
 	}
 
     }
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * And now for the children...
     */
@@ -7400,13 +8224,13 @@
 	* Add the annotation to the parent IDC.
 	*/
 	xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) idc,
-	    xmlSchemaParseAnnotation(ctxt, schema, child));
+	    xmlSchemaParseAnnotation(ctxt, schema, child, 1));
 	child = child->next;
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child,
+	    NULL, node, child,
 	    NULL, "(annotation?)");
     }
 
@@ -7447,13 +8271,11 @@
 		((idcCategory != XML_SCHEMA_TYPE_IDC_KEYREF) ||
 		 (!xmlStrEqual(attr->name, BAD_CAST "refer")))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
@@ -7468,7 +8290,7 @@
 	    "name", NULL);
 	return (NULL);
     } else if (xmlSchemaPValAttrNode(ctxt,
-	NULL, NULL, attr,
+	NULL, attr,
 	xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
 	return (NULL);
     }
@@ -7478,8 +8300,7 @@
     if (item == NULL)
 	return(NULL);
 
-    xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) item,
-	node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     if (idcCategory == XML_SCHEMA_TYPE_IDC_KEYREF) {
 	/*
 	* Attribute "refer" (mandatory).
@@ -7499,11 +8320,10 @@
 	    if (item->ref == NULL)
 		return (NULL);
 	    xmlSchemaPValAttrNodeQName(ctxt, schema,
-		NULL, NULL, attr,
+		NULL, attr,
 		&(item->ref->targetNamespace),
 		&(item->ref->name));
-	    xmlSchemaCheckReference(ctxt, schema, node,
-		(xmlSchemaBasicItemPtr) item,
+	    xmlSchemaCheckReference(ctxt, schema, node, attr,
 		item->ref->targetNamespace);
 	}
     }
@@ -7512,13 +8332,13 @@
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-	item->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+	item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
 	child = child->next;
     }
     if (child == NULL) {
 	xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_MISSING,
-		NULL, NULL, node, child,
+		NULL, node, child,
 		"A child element is missing",
 		"(annotation?, (selector, field+))");
     }
@@ -7550,14 +8370,14 @@
 	} else {
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child,
+		NULL, node, child,
 		NULL, "(annotation?, (selector, field+))");
 	}
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child,
+	    NULL, node, child,
 	    NULL, "(annotation?, (selector, field+))");
     }
 
@@ -7579,7 +8399,7 @@
  */
 static xmlSchemaBasicItemPtr
 xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
-                      xmlNodePtr node, int topLevel)
+                      xmlNodePtr node, int *isElemRef, int topLevel)
 {
     xmlSchemaElementPtr decl = NULL;
     xmlSchemaParticlePtr particle = NULL;
@@ -7594,6 +8414,9 @@
 
     if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
         return (NULL);
+
+    if (isElemRef != NULL)
+	*isElemRef = 0;
     /*
     * If we get a "ref" attribute on a local <element> we will assume it's
     * a reference - even if there's a "name" attribute; this seems to be more
@@ -7611,10 +8434,10 @@
     } else
 	isRef = 1;
 
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-	annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+	annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
 	child = child->next;
     }
     /*
@@ -7640,16 +8463,18 @@
 	/*
 	* The reference part =============================================
 	*/
+	if (isElemRef != NULL)
+	    *isElemRef = 1;
+
 	xmlSchemaPValAttrNodeQName(ctxt, schema,
-	    NULL, NULL, attr, &refNs, &ref);
-	xmlSchemaCheckReference(ctxt, schema, node, NULL, refNs);
+	    NULL, attr, &refNs, &ref);
+	xmlSchemaCheckReference(ctxt, schema, node, attr, refNs);
 	/*
 	* SPEC (3.3.3 : 2.1) "One of ref or name must be present, but not both"
 	*/
 	if (nameAttr != NULL) {
 	    xmlSchemaPMutualExclAttrErr(ctxt,
-		XML_SCHEMAP_SRC_ELEMENT_2_1,
-		NULL, NULL, nameAttr, "ref", "name");
+		XML_SCHEMAP_SRC_ELEMENT_2_1, NULL, nameAttr, "ref", "name");
 	}
 	/*
 	* Check for illegal attributes.
@@ -7676,8 +8501,7 @@
 		}
 	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	    attr = attr->next;
 	}
@@ -7686,12 +8510,12 @@
 	*/
 	if (child != NULL) {
 	    xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL, "(annotation?)");
+		NULL, node, child, NULL, "(annotation?)");
 	}
 	if ((min == 0) && (max == 0))
 	    goto return_null;
 	/*
-	* Create the reference item.
+	* Create the reference item and attach it to the particle.
 	*/
 	refer = xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_ELEMENT,
 	    ref, refNs);
@@ -7703,7 +8527,7 @@
 	* Add the particle to pending components, since the reference
 	* need to be resolved.
 	*/
-	WXS_ADD_PENDING_ITEM(ctxt, particle);
+	WXS_ADD_PENDING(ctxt, particle);
 	return ((xmlSchemaBasicItemPtr) particle);
     }
     /*
@@ -7714,7 +8538,7 @@
 	const xmlChar *ns = NULL, *fixed, *name, *attrValue;
 	xmlSchemaIDCPtr curIDC = NULL, lastIDC = NULL;
 
-	if (xmlSchemaPValAttrNode(ctxt, NULL, NULL, nameAttr,
+	if (xmlSchemaPValAttrNode(ctxt, NULL, nameAttr,
 	    xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0)
 	    goto return_null;
 	/*
@@ -7738,13 +8562,10 @@
 	    } else if (schema->flags & XML_SCHEMAS_QUALIF_ELEM)
 		ns = ctxt->targetNamespace;
 	}
-	decl = xmlSchemaAddElement(ctxt, schema, name, ns, node, topLevel);
+	decl = xmlSchemaAddElement(ctxt, name, ns, node, topLevel);
 	if (decl == NULL) {
 	    goto return_null;
 	}
-	decl->type = XML_SCHEMA_TYPE_ELEMENT;
-	decl->node = node;
-	decl->targetNamespace = ns;
 	/*
 	* Check for illegal attributes.
 	*/
@@ -7765,23 +8586,20 @@
 			    (!xmlStrEqual(attr->name, BAD_CAST "form")))
 			{
 			    xmlSchemaPIllegalAttrErr(ctxt,
-				XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-				NULL, (xmlSchemaTypePtr) decl, attr);
+				XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 			}
 		    } else if ((!xmlStrEqual(attr->name, BAD_CAST "final")) &&
 			(!xmlStrEqual(attr->name, BAD_CAST "abstract")) &&
 			(!xmlStrEqual(attr->name, BAD_CAST "substitutionGroup"))) {
 
 			xmlSchemaPIllegalAttrErr(ctxt,
-			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			    NULL, (xmlSchemaTypePtr) decl, attr);
+			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		    }
 		}
 	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, (xmlSchemaTypePtr) decl, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	    attr = attr->next;
 	}
@@ -7794,11 +8612,10 @@
 	    */
 	    decl->flags |= XML_SCHEMAS_ELEM_GLOBAL;
 	    decl->flags |= XML_SCHEMAS_ELEM_TOPLEVEL;
-	    xmlSchemaPValAttrQName(ctxt, schema, NULL,
-		(xmlSchemaTypePtr) decl, node, "substitutionGroup",
+	    xmlSchemaPValAttrQName(ctxt, schema,
+		NULL, node, "substitutionGroup",
 		&(decl->substGroupNs), &(decl->substGroup));
-	    if (xmlGetBooleanProp(ctxt, NULL, (xmlSchemaTypePtr) decl,
-		node, "abstract", 0))
+	    if (xmlGetBooleanProp(ctxt, node, "abstract", 0))
 		decl->flags |= XML_SCHEMAS_ELEM_ABSTRACT;
 	    /*
 	    * Attribute "final".
@@ -7817,7 +8634,7 @@
 		    XML_SCHEMAS_ELEM_FINAL_RESTRICTION, -1, -1, -1) != 0) {
 		    xmlSchemaPSimpleTypeErr(ctxt,
 			XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-			(xmlSchemaTypePtr) decl, (xmlNodePtr) attr,
+			NULL, (xmlNodePtr) attr,
 			NULL, "(#all | List of (extension | restriction))",
 			attrValue, NULL, NULL, NULL);
 		}
@@ -7846,23 +8663,22 @@
 		XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION, -1, -1) != 0) {
 		xmlSchemaPSimpleTypeErr(ctxt,
 		    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-		    (xmlSchemaTypePtr) decl, (xmlNodePtr) attr,
+		    NULL, (xmlNodePtr) attr,
 		    NULL, "(#all | List of (extension | "
 		    "restriction | substitution))", attrValue,
 		    NULL, NULL, NULL);
 	    }
 	}
-	if (xmlGetBooleanProp(ctxt, NULL, (xmlSchemaTypePtr) decl,
-	    node, "nillable", 0))
+	if (xmlGetBooleanProp(ctxt, node, "nillable", 0))
 	    decl->flags |= XML_SCHEMAS_ELEM_NILLABLE;
 
 	attr = xmlSchemaGetPropNode(node, "type");
 	if (attr != NULL) {
 	    xmlSchemaPValAttrNodeQName(ctxt, schema,
-		NULL, (xmlSchemaTypePtr) decl, attr,
+		NULL, attr,
 		&(decl->namedTypeNs), &(decl->namedType));
 	    xmlSchemaCheckReference(ctxt, schema, node,
-	    (xmlSchemaBasicItemPtr) decl, decl->namedTypeNs);
+		attr, decl->namedTypeNs);
 	}
 	decl->value = xmlSchemaGetProp(ctxt, node, "default");
 	attr = xmlSchemaGetPropNode(node, "fixed");
@@ -7875,8 +8691,7 @@
 		*/
 		xmlSchemaPMutualExclAttrErr(ctxt,
 		    XML_SCHEMAP_SRC_ELEMENT_1,
-		    NULL, (xmlSchemaTypePtr) decl, attr,
-		    "default", "fixed");
+		    NULL, attr, "default", "fixed");
 	    } else {
 		decl->flags |= XML_SCHEMAS_ELEM_FIXED;
 		decl->value = fixed;
@@ -7894,11 +8709,11 @@
 	    if (decl->namedType != NULL) {
 		xmlSchemaPContentErr(ctxt,
 		    XML_SCHEMAP_SRC_ELEMENT_3,
-		    NULL, (xmlSchemaTypePtr) decl, node, child,
+		    NULL, node, child,
 		    "The attribute 'type' and the <complexType> child are "
 		    "mutually exclusive", NULL);
 	    } else
-		ELEM_TYPE(decl) = xmlSchemaParseComplexType(ctxt, schema, child, 0);
+		WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseComplexType(ctxt, schema, child, 0);
 	    child = child->next;
 	} else if (IS_SCHEMA(child, "simpleType")) {
 	    /*
@@ -7909,11 +8724,11 @@
 	    if (decl->namedType != NULL) {
 		xmlSchemaPContentErr(ctxt,
 		    XML_SCHEMAP_SRC_ELEMENT_3,
-		    NULL, (xmlSchemaTypePtr) decl, node, child,
+		    NULL, node, child,
 		    "The attribute 'type' and the <simpleType> child are "
 		    "mutually exclusive", NULL);
 	    } else
-		ELEM_TYPE(decl) = xmlSchemaParseSimpleType(ctxt, schema, child, 0);
+		WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseSimpleType(ctxt, schema, child, 0);
 	    child = child->next;
 	}
 	while ((IS_SCHEMA(child, "unique")) ||
@@ -7938,7 +8753,7 @@
 	if (child != NULL) {
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, (xmlSchemaTypePtr) decl, node, child,
+		NULL, node, child,
 		NULL, "(annotation?, ((simpleType | complexType)?, "
 		"(unique | key | keyref)*))");
 	}
@@ -8011,17 +8826,15 @@
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "memberTypes"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * Attribute "memberTypes". This is a list of QNames.
     * TODO: Check the value to contain anything.
@@ -8035,7 +8848,7 @@
 	xmlSchemaQNameRefPtr ref;
 
 	cur = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
-	type->ref = cur;
+	type->base = cur;
 	do {
 	    while (IS_BLANK_CH(*cur))
 		cur++;
@@ -8045,7 +8858,7 @@
 	    if (end == cur)
 		break;
 	    tmp = xmlStrndup(cur, end - cur);
-	    if (xmlSchemaPValAttrNodeQNameValue(ctxt, schema, NULL,
+	    if (xmlSchemaPValAttrNodeQNameValue(ctxt, schema,
 		NULL, attr, BAD_CAST tmp, &nsName, &localName) == 0) {
 		/*
 		* Create the member type link.
@@ -8093,7 +8906,7 @@
 	* Add the annotation to the simple type ancestor.
 	*/
 	xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
-	    xmlSchemaParseAnnotation(ctxt, schema, child));
+	    xmlSchemaParseAnnotation(ctxt, schema, child, 1));
         child = child->next;
     }
     if (IS_SCHEMA(child, "simpleType")) {
@@ -8122,7 +8935,7 @@
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child, NULL, "(annotation?, simpleType*)");
+	    NULL, node, child, NULL, "(annotation?, simpleType*)");
     }
     if ((attr == NULL) && (type->subtypes == NULL)) {
 	 /*
@@ -8132,7 +8945,7 @@
 	*/
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES,
-	    NULL, NULL, node,
+	    NULL, node,
 	    "Either the attribute 'memberTypes' or "
 	    "at least one <simpleType> child must be present", NULL);
     }
@@ -8181,32 +8994,33 @@
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "itemType"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
 
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
 
     /*
     * Attribute "itemType". NOTE that we will use the "ref" and "refNs"
     * fields for holding the reference to the itemType.
+    *
+    * REVAMP TODO: Use the "base" and "baseNs" fields, since we will remove
+    * the "ref" fields.
     */
-    xmlSchemaPValAttrQName(ctxt, schema, NULL, NULL,
-	node, "itemType", &(type->refNs), &(type->ref));
+    xmlSchemaPValAttrQName(ctxt, schema, NULL,
+	node, "itemType", &(type->baseNs), &(type->base));
     /*
     * And now for the children...
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
 	xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
-	    xmlSchemaParseAnnotation(ctxt, schema, child));
+	    xmlSchemaParseAnnotation(ctxt, schema, child, 1));
         child = child->next;
     }
     if (IS_SCHEMA(child, "simpleType")) {
@@ -8215,34 +9029,34 @@
 	* Either the itemType [attribute] or the <simpleType> [child] of
 	* the <list> element must be present, but not both.
 	*/
-	if (type->ref != NULL) {
+	if (type->base != NULL) {
 	    xmlSchemaPCustomErr(ctxt,
 		XML_SCHEMAP_SRC_SIMPLE_TYPE_1,
-		NULL, NULL, node,
+		NULL, node,
 		"The attribute 'itemType' and the <simpleType> child "
 		"are mutually exclusive", NULL);
 	} else {
 	    type->subtypes = xmlSchemaParseSimpleType(ctxt, schema, child, 0);
 	}
         child = child->next;
-    } else if (type->ref == NULL) {
+    } else if (type->base == NULL) {
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_SRC_SIMPLE_TYPE_1,
-	    NULL, NULL, node,
+	    NULL, node,
 	    "Either the attribute 'itemType' or the <simpleType> child "
 	    "must be present", NULL);
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child, NULL, "(annotation?, simpleType?)");
+	    NULL, node, child, NULL, "(annotation?, simpleType?)");
     }
-    if ((type->ref == NULL) &&
+    if ((type->base == NULL) &&
 	(type->subtypes == NULL) &&
 	(xmlSchemaGetPropNode(node, "itemType") == NULL)) {
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_SRC_SIMPLE_TYPE_1,
-	    NULL, NULL, node,
+	    NULL, node,
 	    "Either the attribute 'itemType' or the <simpleType> child "
 	    "must be present", NULL);
     }
@@ -8265,7 +9079,7 @@
 xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
                          xmlNodePtr node, int topLevel)
 {
-    xmlSchemaTypePtr type, oldCtxtType, oldParentItem;
+    xmlSchemaTypePtr type, oldCtxtType;
     xmlNodePtr child = NULL;
     const xmlChar *attrValue = NULL;
     xmlAttrPtr attr;
@@ -8284,7 +9098,7 @@
 	    return (NULL);
 	} else {
 	    if (xmlSchemaPValAttrNode(ctxt,
-		NULL, NULL, attr,
+		NULL, attr,
 		xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0)
 		return (NULL);
 	    /*
@@ -8300,7 +9114,7 @@
 		    * about this case.
 		    */
 		    xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE,
-			NULL, NULL, node,
+			NULL, node,
 			"Redefinition of built-in simple types is not "
 			"supported", NULL);
 		    return(NULL);
@@ -8326,11 +9140,14 @@
 	*/
 #ifdef ENABLE_NAMED_LOCALS
         snprintf(buf, 39, "#ST%d", ctxt->counter++ + 1);
-	type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf,
+	type = xmlSchemaAddType(ctxt, schema,
+	    XML_SCHEMA_TYPE_SIMPLE,
+	    xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1),
 	    ctxt->targetNamespace, node, 0);
 #else
-	type = xmlSchemaAddType(ctxt, schema, NULL,
-	    ctxt->targetNamespace, node, 0);
+	type = xmlSchemaAddType(ctxt, schema,
+	    XML_SCHEMA_TYPE_SIMPLE,
+	    NULL, ctxt->targetNamespace, node, 0);
 #endif
 	if (type == NULL)
 	    return (NULL);
@@ -8344,13 +9161,11 @@
 	    if (attr->ns == NULL) {
 		if (!xmlStrEqual(attr->name, BAD_CAST "id")) {
 		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			NULL, type, attr);
+			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); 
 		}
 	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			NULL, type, attr);
+			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	    attr = attr->next;
 	}
@@ -8360,8 +9175,8 @@
 	*
 	* Note that attrValue is the value of the attribute "name" here.
 	*/
-	type = xmlSchemaAddType(ctxt, schema, attrValue,
-	    ctxt->targetNamespace, node, 1);
+	type = xmlSchemaAddType(ctxt, schema, XML_SCHEMA_TYPE_SIMPLE,
+	    attrValue, ctxt->targetNamespace, node, 1);
 	if (type == NULL)
 	    return (NULL);
 	type->type = XML_SCHEMA_TYPE_SIMPLE;
@@ -8377,13 +9192,11 @@
 		    (!xmlStrEqual(attr->name, BAD_CAST "name")) &&
 		    (!xmlStrEqual(attr->name, BAD_CAST "final"))) {
 		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			NULL, type, attr);
+			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		}
 	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, type, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	    attr = attr->next;
 	}
@@ -8407,29 +9220,29 @@
 
 		xmlSchemaPSimpleTypeErr(ctxt,
 		    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-		    type, (xmlNodePtr) attr,
+		    WXS_BASIC_CAST type, (xmlNodePtr) attr,
 		    NULL, "(#all | List of (list | union | restriction)",
 		    attrValue, NULL, NULL, NULL);
 	    }
 	}
     }
     type->targetNamespace = ctxt->targetNamespace;
-    xmlSchemaPValAttrID(ctxt, NULL, type, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * And now for the children...
     */
     oldCtxtType = ctxt->ctxtType;
-    oldParentItem = ctxt->parentItem;
+    
     ctxt->ctxtType = type;
-    ctxt->parentItem = type;
+    
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        type->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        type->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
     if (child == NULL) {
 	xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING,
-	    NULL, type, node, child, NULL,
+	    NULL, node, child, NULL,
 	    "(annotation?, (restriction | list | union))");
     } else if (IS_SCHEMA(child, "restriction")) {	
         xmlSchemaParseRestriction(ctxt, schema, child,
@@ -8445,7 +9258,7 @@
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, type, node, child, NULL,
+	    NULL, node, child, NULL,
 	    "(annotation?, (restriction | list | union))");
     }
     /*
@@ -8457,26 +9270,24 @@
     */
     if (topLevel && ctxt->isRedefine && (! hasRestriction)) {
 	xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE,
-	    NULL, NULL, node, "This is a redefinition, thus the "
+	    NULL, node, "This is a redefinition, thus the "
 	    "<simpleType> must have a <restriction> child", NULL);
     }
-
-    ctxt->parentItem = oldParentItem;
+    
     ctxt->ctxtType = oldCtxtType;
     return (type);
 }
 
 /**
  * xmlSchemaParseModelGroupDefRef:
- * @ctxt:  a schema validation context
- * @schema:  the schema being built
- * @node:  a subtree containing XML Schema informations
+ * @ctxt:  the parser context
+ * @schema: the schema being built
+ * @node:  the node
  *
- * Parses a XML schema particle (reference to a model group definition).
- * *WARNING* this interface is highly subject to change
+ * Parses a reference to a model group definition.
  *
- * Returns -1 in case of error, 0 if the declaration is improper and
- *         1 in case of success.
+ * We will return a particle component with a qname-component or
+ * NULL in case of an error.
  */
 static xmlSchemaTreeItemPtr
 xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt,
@@ -8496,13 +9307,13 @@
     if (attr == NULL) {
 	xmlSchemaPMissingAttrErr(ctxt,
 	    XML_SCHEMAP_S4S_ATTR_MISSING,
-	    NULL, node,
-	    "ref", NULL);
+	    NULL, node, "ref", NULL);
 	return (NULL);
-    } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL, NULL,
+    } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL,
 	attr, &refNs, &ref) != 0) {
 	return (NULL);
     }
+    xmlSchemaCheckReference(ctxt, schema, node, attr, refNs);
     min = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "xs:nonNegativeInteger");
     max = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1,
 	"(xs:nonNegativeInteger | unbounded)");
@@ -8517,29 +9328,24 @@
 		(!xmlStrEqual(attr->name, BAD_CAST "minOccurs")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "maxOccurs"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     item = xmlSchemaAddParticle(ctxt, schema, node, min, max);
     if (item == NULL)
-	return (NULL);
-    /* Add to pending components; the reference needs to be resolved. */
-    WXS_ADD_PENDING_ITEM(ctxt, item);
+	return (NULL);    
     /*
-    * Create a reference item as the term; it will be substituted for
-    * the model group after the reference has been resolved.
+    * Create a qname-reference and set as the term; it will be substituted
+    * for the model group after the reference has been resolved.
     */
     item->children = (xmlSchemaTreeItemPtr)
-	xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_GROUP, ref, refNs);
-    xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaBasicItemPtr) item, refNs);
+	xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_GROUP, ref, refNs);    
     xmlSchemaPCheckParticleCorrect_2(ctxt, item, node, min, max);
     /*
     * And now for the children...
@@ -8550,13 +9356,13 @@
 	/*
 	* TODO: What to do exactly with the annotation?
 	*/
-	item->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+	item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
 	child = child->next;
     }
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child, NULL,
+	    NULL, node, child, NULL,
 	    "(annotation?)");
     }
     /*
@@ -8575,6 +9381,11 @@
  * @node:  a subtree containing XML Schema informations
  *
  * Parses a XML schema model group definition.
+ *
+ * Note that the contraint src-redefine (6.2) can't be applied until
+ * references have been resolved. So we will do this at the
+ * component fixup level.
+ *    
  * *WARNING* this interface is highly subject to change
  *
  * Returns -1 in case of error, 0 if the declaration is improper and
@@ -8600,8 +9411,7 @@
 	    NULL, node,
 	    "name", NULL);
 	return (NULL);
-    } else if (xmlSchemaPValAttrNode(ctxt,
-	NULL, NULL, attr,
+    } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr,
 	xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
 	return (NULL);
     }
@@ -8618,23 +9428,21 @@
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "name")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "id"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * And now for the children...
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-	item->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+	item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
 	child = child->next;
     }
     if (IS_SCHEMA(child, "all")) {
@@ -8650,13 +9458,15 @@
 	    XML_SCHEMA_TYPE_SEQUENCE, 0);
 	child = child->next;
     }
+
+   
+
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child, NULL,
+	    NULL, node, child, NULL,
 	    "(annotation?, (all | choice | sequence)?)");
     }
-
     return (item);
 }
 
@@ -8776,7 +9586,7 @@
     * since they are not visible at the component level. I.e.
     * they are used if processing schema *documents* only.
     */
-    res = xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    res = xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     HFAILURE;
 
     /*
@@ -8793,7 +9603,7 @@
     */
     attr = xmlSchemaGetPropNode(node, "targetNamespace");
     if (attr != NULL) {
-	res = xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr,
+	res = xmlSchemaPValAttrNode(ctxt, NULL, attr,
 	    xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL);
 	HFAILURE;
 	if (res != 0) {
@@ -8897,7 +9707,7 @@
 	   (IS_SCHEMA(child, "redefine")) ||
 	   (IS_SCHEMA(child, "annotation"))) {
 	if (IS_SCHEMA(child, "annotation")) {
-	    annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+	    annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
 	    if (schema->annot == NULL)
 		schema->annot = annot;
 	    else
@@ -8938,13 +9748,13 @@
 	    xmlSchemaParseSimpleType(ctxt, schema, child, 1);
 	    child = child->next;
 	} else if (IS_SCHEMA(child, "element")) {
-	    xmlSchemaParseElement(ctxt, schema, child, 1);
+	    xmlSchemaParseElement(ctxt, schema, child, NULL, 1);
 	    child = child->next;
 	} else if (IS_SCHEMA(child, "attribute")) {
-	    xmlSchemaParseAttribute(ctxt, schema, child, 1);
+	    xmlSchemaParseGlobalAttribute(ctxt, schema, child);
 	    child = child->next;
 	} else if (IS_SCHEMA(child, "attributeGroup")) {
-	    xmlSchemaParseAttributeGroup(ctxt, schema, child, 1);
+	    xmlSchemaParseAttributeGroupDefinition(ctxt, schema, child);
 	    child = child->next;
 	} else if (IS_SCHEMA(child, "group")) {
 	    xmlSchemaParseModelGroupDefinition(ctxt, schema, child);
@@ -8955,14 +9765,17 @@
 	} else {
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, child->parent, child,
+		NULL, child->parent, child,
 		NULL, "((include | import | redefine | annotation)*, "
 		"(((simpleType | complexType | group | attributeGroup) "
 		"| element | attribute | notation), annotation*)*)");
 	    child = child->next;
 	}
 	while (IS_SCHEMA(child, "annotation")) {
-	    annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+	    /*
+	    * TODO: We should add all annotations.
+	    */
+	    annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
 	    if (schema->annot == NULL)
 		schema->annot = annot;
 	    else
@@ -8971,7 +9784,6 @@
 	}
     }
 exit:
-    ctxt->parentItem = NULL;
     ctxt->ctxtType = NULL;
     if (oldErrs != ctxt->nberrors)
 	res = ctxt->err;
@@ -9004,6 +9816,18 @@
 #endif
 
 static void
+xmlSchemaRedefListFree(xmlSchemaRedefPtr redef)
+{
+    xmlSchemaRedefPtr prev;
+
+    while (redef != NULL) {
+	prev = redef;
+	redef = redef->next;
+	xmlFree(prev);
+    }
+}
+
+static void
 xmlSchemaConstructionCtxtFree(xmlSchemaConstructionCtxtPtr con)
 {
     /*
@@ -9019,6 +9843,8 @@
     if (con->substGroups != NULL)
 	xmlHashFree(con->substGroups,
 	    (xmlHashDeallocator) xmlSchemaSubstGroupFree);
+    if (con->redefs != NULL)
+	xmlSchemaRedefListFree(con->redefs);
     if (con->dict != NULL)
 	xmlDictFree(con->dict);
     xmlFree(con);
@@ -9070,6 +9896,11 @@
     }
     memset(ret, 0, sizeof(xmlSchemaParserCtxt));
     ret->type = XML_SCHEMA_CTXT_PARSER;
+    ret->attrProhibs = xmlSchemaItemListCreate();
+    if (ret->attrProhibs == NULL) {
+	xmlFree(ret);
+	return(NULL);
+    }
     return(ret);
 }
 
@@ -9114,7 +9945,9 @@
 	}
 	/* TODO: Pass user data. */
 	xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error,
-	    vctxt->warning, vctxt->userData);
+	    vctxt->warning, vctxt->errCtxt);
+	xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror,
+	    vctxt->errCtxt);
     }
     return (0);
 }
@@ -9312,7 +10145,9 @@
     */
     newpctxt->schema = schema;
     xmlSchemaSetParserErrors(newpctxt, pctxt->error, pctxt->warning,
-	pctxt->userData);
+	pctxt->errCtxt);
+    xmlSchemaSetParserStructuredErrors(newpctxt, pctxt->serror,
+	pctxt->errCtxt);
     newpctxt->counter = pctxt->counter;
     
 
@@ -9459,7 +10294,7 @@
     /*
     * Save the namespace import information.
     */
-    if (WXS_IS_IMPMAIN(type)) {
+    if (WXS_IS_BUCKET_IMPMAIN(type)) {
 	relation->importNamespace = importNamespace;	
 	if (schemaLocation == NULL) {
 	    /*
@@ -9475,7 +10310,7 @@
     /* Did we already fetch the doc? */
     if (bkt != NULL) {		
 	/* TODO: The following nasty cases will produce an error. */
-	if ((WXS_IS_IMPMAIN(type)) && (! bkt->imported)) {
+	if ((WXS_IS_BUCKET_IMPMAIN(type)) && (! bkt->imported)) {
 	    /* We included/redefined and then try to import a schema. */
 	    xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
 		invokingNode, NULL,
@@ -9483,7 +10318,7 @@
 		"it was already included or redefined",
 		schemaLocation, NULL);
 	    goto exit;
-	} else if ((! WXS_IS_IMPMAIN(type)) && (bkt->imported)) {
+	} else if ((! WXS_IS_BUCKET_IMPMAIN(type)) && (bkt->imported)) {
 	    /* We imported and then try to include/redefine a schema. */
 	    xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
 		invokingNode, NULL,
@@ -9494,7 +10329,7 @@
 	}	
     }
     	
-    if (WXS_IS_IMPMAIN(type)) {
+    if (WXS_IS_BUCKET_IMPMAIN(type)) {
 	/*
 	* Given that the schemaLocation [attribute] is only a hint, it is open
 	* to applications to ignore all but the first <import> for a given
@@ -9751,7 +10586,7 @@
 	    if (preserveDoc)
 		bkt->preserveDoc = 1;
 	}
-	if (WXS_IS_IMPMAIN(type))
+	if (WXS_IS_BUCKET_IMPMAIN(type))
 	    bkt->imported++;
 	    /*
 	    * Add it to the graph of schemas.
@@ -9803,8 +10638,8 @@
                      xmlNodePtr node)
 {
     xmlNodePtr child;
-    const xmlChar *namespaceName = NULL;
-    const xmlChar *schemaLocation = NULL;
+    const xmlChar *namespaceName = NULL, *schemaLocation = NULL;
+    const xmlChar *thisTargetNamespace;
     xmlAttrPtr attr;
     int ret = 0;
     xmlSchemaBucketPtr bucket = NULL;
@@ -9822,20 +10657,18 @@
 		(!xmlStrEqual(attr->name, BAD_CAST "namespace")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) {
 		xmlSchemaPIllegalAttrErr(pctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(pctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
     /*
     * Extract and validate attributes.
     */
-    if (xmlSchemaPValAttr(pctxt, NULL, NULL, node,
+    if (xmlSchemaPValAttr(pctxt, NULL, node,
 	"namespace", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
 	&namespaceName) != 0) {
 	xmlSchemaPSimpleTypeErr(pctxt,
@@ -9846,7 +10679,7 @@
 	return (pctxt->err);
     }
 
-    if (xmlSchemaPValAttr(pctxt, NULL, NULL, node,
+    if (xmlSchemaPValAttr(pctxt, NULL, node,
 	"schemaLocation", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
 	&schemaLocation) != 0) {
 	xmlSchemaPSimpleTypeErr(pctxt,
@@ -9870,25 +10703,31 @@
     if (child != NULL) {
 	xmlSchemaPContentErr(pctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child, NULL,
+	    NULL, node, child, NULL,
 	    "(annotation?)");
     }
     /*
     * Apply additional constraints.
+    *
+    * Note that it is important to use the original @targetNamespace
+    * (or none at all), to rule out imports of schemas _with_ a
+    * @targetNamespace if the importing schema is a chameleon schema
+    * (with no @targetNamespace).
     */
+    thisTargetNamespace = WXS_BUCKET(pctxt)->origTargetNamespace;
     if (namespaceName != NULL) {
 	/*
 	* 1.1 If the namespace [attribute] is present, then its ·actual value·
 	* must not match the ·actual value· of the enclosing <schema>'s
 	* targetNamespace [attribute].
 	*/
-	if (xmlStrEqual(pctxt->targetNamespace, namespaceName)) {
+	if (xmlStrEqual(thisTargetNamespace, namespaceName)) {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_SRC_IMPORT_1_1,
-		NULL, NULL, node,
+		NULL, node,
 		"The value of the attribute 'namespace' must not match "
 		"the target namespace '%s' of the importing schema",
-		pctxt->targetNamespace);
+		thisTargetNamespace);
 	    return (pctxt->err);
 	}
     } else {
@@ -9896,10 +10735,10 @@
 	* 1.2 If the namespace [attribute] is not present, then the enclosing
 	* <schema> must have a targetNamespace [attribute].
 	*/
-	if (pctxt->targetNamespace == NULL) {
+	if (thisTargetNamespace == NULL) {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_SRC_IMPORT_1_2,
-		NULL, NULL, node,
+		NULL, node,
 		"The attribute 'namespace' must be existent if "
 		"the importing schema has no target namespace",
 		NULL);
@@ -9907,13 +10746,13 @@
 	}
     }
     /*
-    * Locate and aquire the schema document.
+    * Locate and acquire the schema document.
     */
     if (schemaLocation != NULL)
 	schemaLocation = xmlSchemaBuildAbsoluteURI(pctxt->dict,
 	    schemaLocation, node);
     ret = xmlSchemaAddSchemaDoc(pctxt, XML_SCHEMA_SCHEMA_IMPORT,
-	schemaLocation, NULL, NULL, 0, node, pctxt->targetNamespace,
+	schemaLocation, NULL, NULL, 0, node, thisTargetNamespace,
 	namespaceName, &bucket);
 
     if (ret != 0)
@@ -9965,17 +10804,15 @@
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) {
 		xmlSchemaPIllegalAttrErr(pctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(pctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
-    xmlSchemaPValAttrID(pctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
     /*
     * Preliminary step, extract the URI-Reference and make an URI
     * from the base.
@@ -9988,7 +10825,7 @@
         xmlChar *base = NULL;
         xmlChar *uri = NULL;
 
-	if (xmlSchemaPValAttrNode(pctxt, NULL, NULL, attr,
+	if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
 	    xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
 	    (const xmlChar **) schemaLocation) != 0)
 	    goto exit_error;
@@ -10019,13 +10856,13 @@
 	if (type == XML_SCHEMA_SCHEMA_REDEFINE) {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_SRC_REDEFINE,
-		NULL, NULL, node,
+		NULL, node,
 		"The schema document '%s' cannot redefine itself.",
 		*schemaLocation);	    
 	} else {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_SRC_INCLUDE,
-		NULL, NULL, node,
+		NULL, node,
 		"The schema document '%s' cannot include itself.",
 		*schemaLocation);
 	}
@@ -10047,7 +10884,7 @@
 {
     xmlNodePtr child = NULL;
     const xmlChar *schemaLocation = NULL;
-    int res = 0, /* docRes = 0, located = 0, */ hasRedefinitions = 0;
+    int res = 0; /* hasRedefinitions = 0 */
     int isChameleon = 0, wasChameleon = 0;
     xmlSchemaBucketPtr bucket = NULL;
 
@@ -10070,12 +10907,10 @@
     if (res != 0)
 	return(res);    
     /*
-    if (bucket == NULL) {	
-	PERROR_INT("xmlSchemaParseIncludeOrRedefine",
-	    "no schema bucket aquired");
-	return(-1);
-    }
-    */
+    * If we get no schema bucket back, then this means that the schema
+    * document could not be located or was broken XML or was not
+    * a schema document.
+    */    
     if ((bucket == NULL) || (bucket->doc == NULL)) {
 	if (type == XML_SCHEMA_SCHEMA_INCLUDE) {
 	    /*
@@ -10139,7 +10974,7 @@
 		/* TODO: Change error function. */
 		xmlSchemaPCustomErrExt(pctxt,
 		    XML_SCHEMAP_SRC_INCLUDE,
-		    NULL, NULL, node,
+		    NULL, node,
 		    "The target namespace '%s' of the included/redefined "
 		    "schema '%s' differs from '%s' of the "
 		    "including/redefining schema",
@@ -10186,11 +11021,11 @@
     * And now for the children...
     */
     child = node->children;    
-    if (type == XML_SCHEMA_SCHEMA_REDEFINE) {
-	
+    if (type == XML_SCHEMA_SCHEMA_REDEFINE) {	
 	/*
 	* Parse (simpleType | complexType | group | attributeGroup))*
 	*/
+	pctxt->redefined = bucket;
 	/*
 	* How to proceed if the redefined schema was not located?
 	*/
@@ -10204,30 +11039,23 @@
 		/*
 		* TODO: discard or not?
 		*/
-	    } else if (bucket && bucket->parsed) {
-		/*
-		* TODO: Not nice: we won't parse the stuff if the redefined
-		* document was not parsed or not located.
-		*/
-		if (IS_SCHEMA(child, "simpleType")) {
-		    xmlSchemaParseSimpleType(pctxt, schema, child, 1);
-		} else if (IS_SCHEMA(child, "complexType")) {
-		    xmlSchemaParseComplexType(pctxt, schema, child, 1);
-		    hasRedefinitions = 1;
-		} else if (IS_SCHEMA(child, "group")) {
-		    TODO
-		    hasRedefinitions = 1;
-		    /* xmlSchemaParseModelGroupDefinition(pctxt,
-			schema, child); */
-		} else if (IS_SCHEMA(child, "attributeGroup")) {
-		    TODO
-		    hasRedefinitions = 1;
-		    /* xmlSchemaParseAttributeGroup(pctxt, schema,
-			child, 1); */
-		}
+	    } else if (IS_SCHEMA(child, "simpleType")) {
+		xmlSchemaParseSimpleType(pctxt, schema, child, 1);
+	    } else if (IS_SCHEMA(child, "complexType")) {
+		xmlSchemaParseComplexType(pctxt, schema, child, 1);
+		/* hasRedefinitions = 1; */
+	    } else if (IS_SCHEMA(child, "group")) {		
+		/* hasRedefinitions = 1; */
+		xmlSchemaParseModelGroupDefinition(pctxt,
+		    schema, child);
+	    } else if (IS_SCHEMA(child, "attributeGroup")) {
+		/* hasRedefinitions = 1; */
+		xmlSchemaParseAttributeGroupDefinition(pctxt, schema,
+		    child);
 	    }
 	    child = child->next;
 	}
+	pctxt->redefined = NULL;
 	pctxt->isRedefine = 0;
     } else {
 	if (IS_SCHEMA(child, "annotation")) {
@@ -10241,11 +11069,11 @@
 	res = XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED;
 	if (type == XML_SCHEMA_SCHEMA_REDEFINE) {
 	    xmlSchemaPContentErr(pctxt, res,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation | (simpleType | complexType | group | attributeGroup))*");
 	} else {
 	     xmlSchemaPContentErr(pctxt, res,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation?)");
 	}	
     }       
@@ -10292,7 +11120,18 @@
  * @type: the "compositor" type
  * @particleNeeded: if a a model group with a particle
  *
- * parse a XML schema Sequence definition
+ * parse a XML schema Sequence definition.
+ * Applies parts of:
+ *   Schema Representation Constraint:
+ *     Redefinition Constraints and Semantics (src-redefine)
+ *     (6.1), (6.1.1), (6.1.2)
+ *
+ *   Schema Component Constraint: 
+ *     All Group Limited (cos-all-limited) (2)
+ *     TODO: Actually this should go to component-level checks,
+ *     but is done here due to performance. Move it to an other layer
+ *     is schema construction via an API is implemented.
+ *
  * *WARNING* this interface is highly subject to change
  *
  * Returns -1 in case of error, 0 if the declaration is improper and
@@ -10307,7 +11146,7 @@
     xmlSchemaParticlePtr particle = NULL;
     xmlNodePtr child = NULL;
     xmlAttrPtr attr;
-    int min = 0, max = 0;
+    int min = 1, max = 1, isElemRef, hasRefs = 0;
 
     if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
         return (NULL);
@@ -10346,13 +11185,11 @@
 		    (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs")) &&
 		    (!xmlStrEqual(attr->name, BAD_CAST "minOccurs"))) {
 		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			NULL, NULL, attr);
+			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		}
 	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	    attr = attr->next;
 	}
@@ -10365,29 +11202,26 @@
 	    if (attr->ns == NULL) {
 		if (!xmlStrEqual(attr->name, BAD_CAST "id")) {
 		    xmlSchemaPIllegalAttrErr(ctxt,
-			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			NULL, NULL, attr);
+			XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		}
 	    } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	    attr = attr->next;
 	}
-
     }
 
     /*
     * Extract and validate attributes.
     */
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * And now for the children...
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        item->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
     if (type == XML_SCHEMA_TYPE_ALL) {
@@ -10395,17 +11229,33 @@
 
 	while (IS_SCHEMA(child, "element")) {
 	    part = (xmlSchemaParticlePtr) xmlSchemaParseElement(ctxt,
-		schema, child, 0);
+		schema, child, &isElemRef, 0);
+	    /*
+	    * SPEC cos-all-limited (2)
+	    * "The {max occurs} of all the particles in the {particles}
+	    * of the ('all') group must be 0 or 1.
+	    */
 	    if (part != NULL) {
-		if (part->minOccurs > 1)
-		    xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INVALID_MINOCCURS,
-			NULL, NULL, child,
-			"Invalid value for minOccurs (must be 0 or 1)", NULL);
-		if (part->maxOccurs > 1)
-		    xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INVALID_MAXOCCURS,
-			NULL, NULL, child,
+		if (isElemRef)
+		    hasRefs++;
+		if (part->minOccurs > 1) {
+		    xmlSchemaPCustomErr(ctxt,
+			XML_SCHEMAP_COS_ALL_LIMITED,
+			NULL, child,
+			"Invalid value for minOccurs (must be 0 or 1)",
+			NULL);
+		    /* Reset to 1. */
+		    part->minOccurs = 1;
+		}
+		if (part->maxOccurs > 1) {
+		    xmlSchemaPCustomErr(ctxt,
+			XML_SCHEMAP_COS_ALL_LIMITED,
+			NULL, child,
 			"Invalid value for maxOccurs (must be 0 or 1)",
 			NULL);
+		    /* Reset to 1. */
+		    part->maxOccurs = 1;
+		}
 		if (last == NULL)
 		    item->children = (xmlSchemaTreeItemPtr) part;
 		else
@@ -10417,7 +11267,7 @@
 	if (child != NULL) {
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation?, (annotation?, element*)");
 	}
     } else {
@@ -10432,10 +11282,76 @@
 
 	    if (IS_SCHEMA(child, "element")) {
 		part = (xmlSchemaTreeItemPtr)
-		    xmlSchemaParseElement(ctxt, schema, child, 0);
+		    xmlSchemaParseElement(ctxt, schema, child, &isElemRef, 0);
+		if (part && isElemRef)
+		    hasRefs++;
 	    } else if (IS_SCHEMA(child, "group")) {
 		part =
 		    xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+		if (part != NULL)
+		    hasRefs++;
+		/*
+		* Handle redefinitions.
+		*/
+		if (ctxt->isRedefine && ctxt->redef &&
+		    (ctxt->redef->item->type == XML_SCHEMA_TYPE_GROUP) &&
+		    part && part->children)
+		{
+		    if ((xmlSchemaGetQNameRefName(part->children) ==
+			    ctxt->redef->refName) &&
+			(xmlSchemaGetQNameRefTargetNs(part->children) ==
+			    ctxt->redef->refTargetNs))
+		    {
+			/*
+			* SPEC src-redefine:
+			* (6.1) "If it has a <group> among its contents at
+			* some level the ·actual value· of whose ref
+			* [attribute] is the same as the ·actual value· of
+			* its own name attribute plus target namespace, then
+			* all of the following must be true:"
+			* (6.1.1) "It must have exactly one such group."
+			*/
+			if (ctxt->redefCounter != 0) {
+			    xmlChar *str = NULL;
+
+			    xmlSchemaCustomErr(ACTXT_CAST ctxt,
+				XML_SCHEMAP_SRC_REDEFINE, child, NULL,
+				"The redefining model group definition "
+				"'%s' must not contain more than one "
+				"reference to the redefined definition",
+				xmlSchemaFormatQName(&str,
+				    ctxt->redef->refTargetNs,
+				    ctxt->redef->refName),
+				NULL);
+			    FREE_AND_NULL(str)
+			    part = NULL;
+			} else if (((WXS_PARTICLE(part))->minOccurs != 1) ||
+			    ((WXS_PARTICLE(part))->maxOccurs != 1))
+			{
+			    xmlChar *str = NULL;
+			    /*
+			    * SPEC src-redefine:
+			    * (6.1.2) "The ·actual value· of both that
+			    * group's minOccurs and maxOccurs [attribute]
+			    * must be 1 (or ·absent·).
+			    */
+			    xmlSchemaCustomErr(ACTXT_CAST ctxt,
+				XML_SCHEMAP_SRC_REDEFINE, child, NULL,
+				"The redefining model group definition "
+				"'%s' must not contain a reference to the "
+				"redefined definition with a "
+				"maxOccurs/minOccurs other than 1",
+				xmlSchemaFormatQName(&str,
+				    ctxt->redef->refTargetNs,
+				    ctxt->redef->refName),
+				NULL);
+			    FREE_AND_NULL(str)
+			    part = NULL;
+			}
+			ctxt->redef->reference = WXS_BASIC_CAST part;
+			ctxt->redefCounter++;
+		    }		        		   
+		}
 	    } else if (IS_SCHEMA(child, "any")) {
 		part = (xmlSchemaTreeItemPtr)
 		    xmlSchemaParseAny(ctxt, schema, child);
@@ -10458,16 +11374,21 @@
 	if (child != NULL) {
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation?, (element | group | choice | sequence | any)*)");
 	}
     }
-    if (withParticle) {
-	if ((min == 0) && (max == 0))
-	    return (NULL);
-	else
-	    return ((xmlSchemaTreeItemPtr) particle);
-    } else
+    if ((max == 0) && (min == 0))
+	return (NULL);
+    if (hasRefs) {
+	/*
+	* We need to resolve references.
+	*/
+	WXS_ADD_PENDING(ctxt, item);
+    }
+    if (withParticle)
+	return ((xmlSchemaTreeItemPtr) particle);	
+    else
 	return ((xmlSchemaTreeItemPtr) item);
 }
 
@@ -10505,20 +11426,18 @@
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "base"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
     /*
     * Extract and validate attributes.
     */
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
     /*
     * Attribute 
     */
@@ -10531,21 +11450,20 @@
     * the {content type} of the type definition ·resolved· to by
     * the ·actual value· of the base [attribute]"
     */
-    if (xmlSchemaPValAttrQName(ctxt, schema,
-	NULL, NULL, node, "base",
+    if (xmlSchemaPValAttrQName(ctxt, schema, NULL, node, "base",
 	&(type->baseNs), &(type->base)) == 0)
     {
 	if ((type->base == NULL) && (type->type == XML_SCHEMA_TYPE_COMPLEX)) {
 	    xmlSchemaPMissingAttrErr(ctxt,
 		XML_SCHEMAP_S4S_ATTR_MISSING,
-		type, node, "base", NULL);
+		NULL, node, "base", NULL);
 	} else if ((ctxt->isRedefine) &&
 	    (type->flags & XML_SCHEMAS_TYPE_GLOBAL))
 	{
 	    if (type->base == NULL) {
 		xmlSchemaPMissingAttrErr(ctxt,
 		    XML_SCHEMAP_S4S_ATTR_MISSING,
-		    type, node, "base", NULL);
+		    NULL, node, "base", NULL);
 	    } else if ((! xmlStrEqual(type->base, type->name)) ||
 		(! xmlStrEqual(type->baseNs, type->targetNamespace)))
 	    {
@@ -10558,7 +11476,7 @@
 		* of its own name attribute plus target namespace;"
 		*/
 		xmlSchemaPCustomErrExt(ctxt, XML_SCHEMAP_SRC_REDEFINE,
-		    NULL, NULL, node, "This is a redefinition, but the QName "
+		    NULL, node, "This is a redefinition, but the QName "
 		    "value '%s' of the 'base' attribute does not match the "
 		    "type's designation '%s'",
 		    xmlSchemaFormatQName(&str1, type->baseNs, type->base),
@@ -10566,6 +11484,9 @@
 			type->name), NULL);
 		FREE_AND_NULL(str1);
 		FREE_AND_NULL(str2);
+		/* Avoid confusion and erase the values. */
+		type->base = NULL;
+		type->baseNs = NULL;
 	    }
 	}		
     }
@@ -10578,7 +11499,7 @@
 	* Add the annotation to the simple type ancestor.
 	*/
 	xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
-	    xmlSchemaParseAnnotation(ctxt, schema, child));
+	    xmlSchemaParseAnnotation(ctxt, schema, child, 1));
         child = child->next;
     }
     if (parentType == XML_SCHEMA_TYPE_SIMPLE) {
@@ -10594,7 +11515,7 @@
 		*/
 		xmlSchemaPContentErr(ctxt,
 		    XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE,
-		    NULL, NULL, node, child,
+		    NULL, node, child,
 		    "The attribute 'base' and the <simpleType> child are "
 		    "mutually exclusive", NULL);
 	    } else {
@@ -10605,7 +11526,7 @@
 	} else if (type->base == NULL) {
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE,
-		NULL, NULL, node, child,
+		NULL, node, child,
 		"Either the attribute 'base' or a <simpleType> child "
 		"must be present", NULL);
 	}
@@ -10634,9 +11555,13 @@
 	/*
 	* Model group reference <group>.
 	*/
-	} else if (IS_SCHEMA(child, "group")) {
+	} else if (IS_SCHEMA(child, "group")) {	    
 	    type->subtypes = (xmlSchemaTypePtr)
 		xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+	    /*
+	    * Note that the reference will be resolved in
+	    * xmlSchemaResolveTypeReferences();
+	    */
 	    child = child->next;
 	}
     } else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) {
@@ -10728,7 +11653,10 @@
 	/*
 	* Attribute uses/declarations.
 	*/
-	child = xmlSchemaParseAttrDecls(ctxt, schema, child, type);
+	if (xmlSchemaParseLocalAttributes(ctxt, schema, &child,
+	    (xmlSchemaItemListPtr *) &(type->attrUses),
+	    XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1)
+	    return(NULL);
 	/*
 	* Attribute wildcard.
 	*/
@@ -10742,13 +11670,13 @@
 	if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) {
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"annotation?, (group | all | choice | sequence)?, "
 		"((attribute | attributeGroup)*, anyAttribute?))");
 	} else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) {
 	     xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation?, (simpleType?, (minExclusive | minInclusive | "
 		"maxExclusive | maxInclusive | totalDigits | fractionDigits | "
 		"length | minLength | maxLength | enumeration | whiteSpace | "
@@ -10757,7 +11685,7 @@
 	    /* Simple type */
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation?, (simpleType?, (minExclusive | minInclusive | "
 		"maxExclusive | maxInclusive | totalDigits | fractionDigits | "
 		"length | minLength | maxLength | enumeration | whiteSpace | "
@@ -10802,24 +11730,22 @@
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
 		(!xmlStrEqual(attr->name, BAD_CAST "base"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
 
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
 
     /*
     * Attribute "base" - mandatory.
     */
-    if ((xmlSchemaPValAttrQName(ctxt, schema,
-	NULL, NULL, node, "base", &(type->baseNs), &(type->base)) == 0) &&
+    if ((xmlSchemaPValAttrQName(ctxt, schema, NULL, node,
+	"base", &(type->baseNs), &(type->base)) == 0) &&
 	(type->base == NULL)) {
 	xmlSchemaPMissingAttrErr(ctxt,
 	    XML_SCHEMAP_S4S_ATTR_MISSING,
@@ -10834,7 +11760,7 @@
 	* Add the annotation to the type ancestor.
 	*/
 	xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
-	    xmlSchemaParseAnnotation(ctxt, schema, child));
+	    xmlSchemaParseAnnotation(ctxt, schema, child, 1));
         child = child->next;
     }
     if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) {
@@ -10861,6 +11787,10 @@
 	} else if (IS_SCHEMA(child, "group")) {
 	    type->subtypes = (xmlSchemaTypePtr)
 		xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+	    /*
+	    * Note that the reference will be resolved in
+	    * xmlSchemaResolveTypeReferences();
+	    */
 	    child = child->next;
 	}
     }
@@ -10868,7 +11798,10 @@
 	/*
 	* Attribute uses/declarations.
 	*/
-	child = xmlSchemaParseAttrDecls(ctxt, schema, child, type);
+	if (xmlSchemaParseLocalAttributes(ctxt, schema, &child,
+	    (xmlSchemaItemListPtr *) &(type->attrUses),
+	    XML_SCHEMA_TYPE_EXTENSION, NULL) == -1)
+	    return(NULL);
 	/*
 	* Attribute wildcard.
 	*/
@@ -10883,14 +11816,14 @@
 	    /* Complex content extension. */
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation?, ((group | all | choice | sequence)?, "
 		"((attribute | attributeGroup)*, anyAttribute?)))");
 	} else {
 	    /* Simple content extension. */
 	    xmlSchemaPContentErr(ctxt,
 		XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-		NULL, NULL, node, child, NULL,
+		NULL, node, child, NULL,
 		"(annotation?, ((attribute | attributeGroup)*, "
 		"anyAttribute?))");
 	}
@@ -10933,18 +11866,16 @@
 	if (attr->ns == NULL) {
 	    if ((!xmlStrEqual(attr->name, BAD_CAST "id"))) {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
 
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
 
     /*
     * And now for the children...
@@ -10955,19 +11886,19 @@
 	* Add the annotation to the complex type ancestor.
 	*/
 	xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
-	    xmlSchemaParseAnnotation(ctxt, schema, child));
+	    xmlSchemaParseAnnotation(ctxt, schema, child, 1));
         child = child->next;
     }
     if (child == NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_MISSING,
-	    NULL, NULL, node, NULL, NULL,
+	    NULL, node, NULL, NULL,
 	    "(annotation?, (restriction | extension))");	
     }
     if (child == NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_MISSING,
-	    NULL, NULL, node, NULL, NULL,
+	    NULL, node, NULL, NULL,
 	    "(annotation?, (restriction | extension))");	
     }
     if (IS_SCHEMA(child, "restriction")) {
@@ -10984,7 +11915,7 @@
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child, NULL,
+	    NULL, node, child, NULL,
 	    "(annotation?, (restriction | extension))");
     }
     return (0);
@@ -11026,23 +11957,21 @@
 		(!xmlStrEqual(attr->name, BAD_CAST "mixed")))
 	    {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, NULL, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
 	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, NULL, attr);
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
 
-    xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id");
+    xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
 
     /*
     * Set the 'mixed' on the complex type ancestor.
     */
-    if (xmlGetBooleanProp(ctxt, NULL, NULL, node, "mixed", 0))  {
+    if (xmlGetBooleanProp(ctxt, node, "mixed", 0))  {
 	if ((type->flags & XML_SCHEMAS_TYPE_MIXED) == 0)
 	    type->flags |= XML_SCHEMAS_TYPE_MIXED;
     }
@@ -11052,19 +11981,19 @@
 	* Add the annotation to the complex type ancestor.
 	*/
 	xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
-	    xmlSchemaParseAnnotation(ctxt, schema, child));
+	    xmlSchemaParseAnnotation(ctxt, schema, child, 1));
         child = child->next;
     }
     if (child == NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_MISSING,
-	    NULL, NULL, node, NULL,
+	    NULL, node, NULL,
 	    NULL, "(annotation?, (restriction | extension))");
     }
     if (child == NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_MISSING,
-	    NULL, NULL, node, NULL,
+	    NULL, node, NULL,
 	    NULL, "(annotation?, (restriction | extension))");
     }
     if (IS_SCHEMA(child, "restriction")) {
@@ -11081,7 +12010,7 @@
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, NULL, node, child,
+	    NULL, node, child,
 	    NULL, "(annotation?, (restriction | extension))");
     }
     return (0);
@@ -11124,8 +12053,7 @@
 	    xmlSchemaPMissingAttrErr(ctxt,
 		XML_SCHEMAP_S4S_ATTR_MISSING, NULL, node, "name", NULL);
 	    return (NULL);
-	} else if (xmlSchemaPValAttrNode(ctxt,
-	    NULL, NULL, attr,
+	} else if (xmlSchemaPValAttrNode(ctxt, NULL, attr,
 	    xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
 	    return (NULL);
 	}	
@@ -11137,11 +12065,14 @@
 	*/
 #ifdef ENABLE_NAMED_LOCALS
         snprintf(buf, 39, "#CT%d", ctxt->counter++ + 1);
-	type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf,
+	type = xmlSchemaAddType(ctxt, schema,
+	    XML_SCHEMA_TYPE_COMPLEX,
+	    xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1),
 	    ctxt->targetNamespace, node, 0);
 #else
-	type = xmlSchemaAddType(ctxt, schema, NULL,
-	    ctxt->targetNamespace, node, 0);
+	type = xmlSchemaAddType(ctxt, schema,
+	    XML_SCHEMA_TYPE_COMPLEX,
+	    NULL, ctxt->targetNamespace, node, 0);
 #endif
 	if (type == NULL)
 	    return (NULL);
@@ -11155,8 +12086,9 @@
 	/*
 	* Parse as global complex type definition.
 	*/
-	type = xmlSchemaAddType(ctxt, schema, name, ctxt->targetNamespace,
-	    node, 1);
+	type = xmlSchemaAddType(ctxt, schema,
+	    XML_SCHEMA_TYPE_COMPLEX,
+	    name, ctxt->targetNamespace, node, 1);
 	if (type == NULL)
 	    return (NULL);
 	type->node = node;
@@ -11174,14 +12106,13 @@
 		/*
 		* Attribute "id".
 		*/
-		xmlSchemaPValAttrID(ctxt, NULL, type, node,
-		    BAD_CAST "id");
+		xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
 	    } else if (xmlStrEqual(attr->name, BAD_CAST "mixed")) {
 		/*
 		* Attribute "mixed".
 		*/
-		if (xmlSchemaPGetBoolNodeValue(ctxt, NULL, type,
-		    (xmlNodePtr) attr))
+		if (xmlSchemaPGetBoolNodeValue(ctxt,
+			NULL, (xmlNodePtr) attr))
 		    type->flags |= XML_SCHEMAS_TYPE_MIXED;
 	    } else if (topLevel) {
 		/*
@@ -11193,8 +12124,8 @@
 		    /*
 		    * Attribute "abstract".
 		    */
-		    if (xmlSchemaPGetBoolNodeValue(ctxt, NULL, type,
-			(xmlNodePtr) attr))
+		    if (xmlSchemaPGetBoolNodeValue(ctxt,
+			    NULL, (xmlNodePtr) attr))
 			type->flags |= XML_SCHEMAS_TYPE_ABSTRACT;
 		} else if (xmlStrEqual(attr->name, BAD_CAST "final")) {
 		    /*
@@ -11211,7 +12142,7 @@
 		    {
 			xmlSchemaPSimpleTypeErr(ctxt,
 			    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-			    type, (xmlNodePtr) attr, NULL,
+			    NULL, (xmlNodePtr) attr, NULL,
 			    "(#all | List of (extension | restriction))",
 			    attrValue, NULL, NULL, NULL);
 		    } else 
@@ -11229,25 +12160,22 @@
 			-1, -1, -1) != 0) {
 			xmlSchemaPSimpleTypeErr(ctxt,
 			    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
-			    type, (xmlNodePtr) attr, NULL,
+			    NULL, (xmlNodePtr) attr, NULL,
 			    "(#all | List of (extension | restriction)) ",
 			    attrValue, NULL, NULL, NULL);
 		    } else 
 			block = 1;
 		} else {
 			xmlSchemaPIllegalAttrErr(ctxt,
-			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-			    NULL, type, attr);
+			    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 		}
 	    } else {
 		xmlSchemaPIllegalAttrErr(ctxt,
-		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		    NULL, type, attr);
+		    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	    }
 	} else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
-	    xmlSchemaPIllegalAttrErr(ctxt,
-		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
-		NULL, type, attr);
+	    xmlSchemaPIllegalAttrErr(ctxt, 
+		XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
 	}
 	attr = attr->next;
     }
@@ -11274,7 +12202,7 @@
     */
     child = node->children;
     if (IS_SCHEMA(child, "annotation")) {
-        type->annot = xmlSchemaParseAnnotation(ctxt, schema, child);
+        type->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1);
         child = child->next;
     }
     ctxt->ctxtType = type;
@@ -11331,12 +12259,19 @@
         } else if (IS_SCHEMA(child, "group")) {
             type->subtypes = (xmlSchemaTypePtr)
 		xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+	    /*
+	    * Note that the reference will be resolved in
+	    * xmlSchemaResolveTypeReferences();
+	    */
             child = child->next;
         }
 	/*
 	* Parse attribute decls/refs.
 	*/
-        child = xmlSchemaParseAttrDecls(ctxt, schema, child, type);
+        if (xmlSchemaParseLocalAttributes(ctxt, schema, &child,
+	    (xmlSchemaItemListPtr *) &(type->attrUses),
+	    XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1)
+	    return(NULL);
 	/*
 	* Parse attribute wildcard.
 	*/
@@ -11348,7 +12283,7 @@
     if (child != NULL) {
 	xmlSchemaPContentErr(ctxt,
 	    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
-	    NULL, type, node, child,
+	    NULL, node, child,
 	    NULL, "(annotation?, (simpleContent | complexContent | "
 	    "((group | all | choice | sequence)?, ((attribute | "
 	    "attributeGroup)*, anyAttribute?))))");
@@ -11358,7 +12293,7 @@
     */
     if (topLevel && ctxt->isRedefine && (! hasRestrictionOrExtension)) {
 	xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE,
-	    NULL, NULL, node, "This is a redefinition, thus the "
+	    NULL, node, "This is a redefinition, thus the "
 	    "<complexType> must have a <restriction> or <extension> "
 	    "grand-child", NULL);
     }
@@ -11527,6 +12462,8 @@
 	ctxt->constructor = NULL;
 	ctxt->ownsConstructor = 0;
     }
+    if (ctxt->attrProhibs != NULL)
+	xmlSchemaItemListFree(ctxt->attrProhibs);
     xmlDictFree(ctxt->dict);
     xmlFree(ctxt);
 }
@@ -11555,7 +12492,7 @@
 	end = xmlAutomataNewState(pctxt->am);
     substGroup = xmlSchemaSubstGroupGet(pctxt, elemDecl);
     if (substGroup == NULL) {
-	xmlSchemaPErr(pctxt, GET_NODE(particle),
+	xmlSchemaPErr(pctxt, WXS_ITEM_NODE(particle),
 	    XML_SCHEMAP_INTERNAL,
 	    "Internal error: xmlSchemaBuildContentModelForSubstGroup, "
 	    "declaration is marked having a subst. group but none "
@@ -11658,10 +12595,11 @@
 	} else if ((particle->maxOccurs >= UNBOUNDED) &&
 	           (particle->minOccurs < 2)) {
 	    /* Special case. */
-	    start = ctxt->state;
+	    start = ctxt->state;	    
 	    ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL,
-		elemDecl->name, elemDecl->targetNamespace, elemDecl);
-	    xmlAutomataNewEpsilon(ctxt->am, ctxt->state, start);
+		elemDecl->name, elemDecl->targetNamespace, elemDecl);	    
+	    ctxt->state = xmlAutomataNewTransition2(ctxt->am, ctxt->state, ctxt->state,
+		elemDecl->name, elemDecl->targetNamespace, elemDecl);	    
 	} else {
 	    int counter;
 	    int maxOccurs = particle->maxOccurs == UNBOUNDED ?
@@ -11688,7 +12626,8 @@
  * @particle:  the particle component
  * @name:  the complex type's name whose content is being built
  *
- * Generate the automata sequence needed for that type
+ * Create the automaton for the {content type} of a complex type.
+ *
  */
 static void
 xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
@@ -11699,7 +12638,10 @@
 	return;
     }
     if (particle->children == NULL) {
-	PERROR_INT("xmlSchemaBuildAContentModel", "no term on particle");
+	/*
+	* Just return in this case. A missing "term" of the particle
+	* might arise due to an invalid "term" component.
+	*/
 	return;
     }
 
@@ -12037,7 +12979,7 @@
 	    xmlSchemaInternalErr2(ACTXT_CAST pctxt,
 		"xmlSchemaBuildAContentModel",
 		"found unexpected term of type '%s' in content model",
-		xmlSchemaCompTypeToString(particle->children->type), NULL);
+		WXS_ITEM_TYPE_NAME(particle->children), NULL);
             return;
     }
 }
@@ -12054,8 +12996,6 @@
 xmlSchemaBuildContentModel(xmlSchemaTypePtr type,
 			   xmlSchemaParserCtxtPtr ctxt)
 {
-    xmlAutomataStatePtr start;
-
     if ((type->type != XML_SCHEMA_TYPE_COMPLEX) ||
 	(type->contModel != NULL) ||
 	((type->contentType != XML_SCHEMA_CONTENT_ELEMENTS) &&
@@ -12066,27 +13006,30 @@
     xmlGenericError(xmlGenericErrorContext,
                     "Building content model for %s\n", name);
 #endif
-
+    ctxt->am = NULL;
     ctxt->am = xmlNewAutomata();
     if (ctxt->am == NULL) {
         xmlGenericError(xmlGenericErrorContext,
 	    "Cannot create automata for complex type %s\n", type->name);
         return;
     }
-    start = ctxt->state = xmlAutomataGetInitState(ctxt->am);
-    xmlSchemaBuildAContentModel(ctxt, (xmlSchemaParticlePtr) type->subtypes);
+    ctxt->state = xmlAutomataGetInitState(ctxt->am);
+    /*
+    * Build the automaton.
+    */
+    xmlSchemaBuildAContentModel(ctxt, WXS_TYPE_PARTICLE(type));
     xmlAutomataSetFinalState(ctxt->am, ctxt->state);
     type->contModel = xmlAutomataCompile(ctxt->am);
     if (type->contModel == NULL) {
         xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_INTERNAL,
-	    NULL, type, type->node,
+	    WXS_BASIC_CAST type, type->node,
 	    "Failed to compile the content model", NULL);
     } else if (xmlRegexpIsDeterminist(type->contModel) != 1) {
         xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_NOT_DETERMINISTIC,
 	    /* XML_SCHEMAS_ERR_NOTDETERMINIST, */
-	    NULL, type, type->node,
+	    WXS_BASIC_CAST type, type->node,
 	    "The content model is not determinist", NULL);
     } else {
 #ifdef DEBUG_CONTENT_REGEXP
@@ -12130,7 +13073,7 @@
 	if (type == NULL) {
 	    xmlSchemaPResCompAttrErr(ctxt,
 		XML_SCHEMAP_SRC_RESOLVE,
-		(xmlSchemaTypePtr) elemDecl, elemDecl->node,
+		WXS_BASIC_CAST elemDecl, elemDecl->node,
 		"type", elemDecl->namedType, elemDecl->namedTypeNs,
 		XML_SCHEMA_TYPE_BASIC, "type definition");
 	} else
@@ -12148,7 +13091,7 @@
 	if (substHead == NULL) {
 	    xmlSchemaPResCompAttrErr(ctxt,
 		XML_SCHEMAP_SRC_RESOLVE,
-		(xmlSchemaTypePtr) elemDecl, NULL,
+		WXS_BASIC_CAST elemDecl, NULL,
 		"substitutionGroup", elemDecl->substGroup,
 		elemDecl->substGroupNs, XML_SCHEMA_TYPE_ELEMENT, NULL);
 	} else {
@@ -12157,7 +13100,7 @@
 	    * Set the "substitution group affiliation".
 	    * NOTE that now we use the "refDecl" field for this.
 	    */
-	    SUBST_GROUP_AFF(elemDecl) = substHead;
+	    WXS_SUBST_HEAD(elemDecl) = substHead;
 	    /*
 	    * The type definitions is set to:
 	    * SPEC "...the {type definition} of the element
@@ -12216,9 +13159,9 @@
 	nsName = ((xmlSchemaQNameRefPtr) link->type)->targetNamespace;
 
 	memberType = xmlSchemaGetType(ctxt->schema, name, nsName);
-	if ((memberType == NULL) || (! IS_SIMPLE_TYPE(memberType))) {
+	if ((memberType == NULL) || (! WXS_IS_SIMPLE(memberType))) {
 	    xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE,
-		type, type->node, "memberTypes",
+		WXS_BASIC_CAST type, type->node, "memberTypes",
 		name, nsName, XML_SCHEMA_TYPE_SIMPLE, NULL);
 	    /*
 	    * Remove the member type link.
@@ -12273,7 +13216,7 @@
 {
     if (type == NULL)
 	return (0);
-    if (IS_COMPLEX_TYPE(type))
+    if (WXS_IS_COMPLEX(type))
 	return (0);
     if (type->type == XML_SCHEMA_TYPE_BASIC) {
 	if (type->builtInType == valType)
@@ -12282,10 +13225,8 @@
 	    (type->builtInType == XML_SCHEMAS_ANYTYPE))
 	    return (0);
 	return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
-    } else
-	return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
-
-    return (0);
+    }
+    return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
 }
 
 #if 0
@@ -12304,7 +13245,7 @@
 {
     if (type == NULL)
 	return (0);
-    if (IS_COMPLEX_TYPE(type))
+    if (WXS_IS_COMPLEX(type))
 	return (0);
     if (type->type == XML_SCHEMA_TYPE_BASIC) {
 	if (type->builtInType == valType)
@@ -12322,14 +13263,11 @@
 {
     if (type == NULL)
 	return (NULL);
-    if (IS_COMPLEX_TYPE(type))
+    if (WXS_IS_COMPLEX(type))
 	return (NULL);
     if (type->type == XML_SCHEMA_TYPE_BASIC)
-	    return(type);
-    else
-	return(xmlSchemaQueryBuiltInType(type->subtypes));
-
-    return (NULL);
+	return(type);
+    return(xmlSchemaQueryBuiltInType(type->subtypes));
 }
 
 /**
@@ -12368,7 +13306,7 @@
 static xmlSchemaTypePtr
 xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type)
 {
-    if (VARIETY_LIST(type) || VARIETY_UNION(type))
+    if (WXS_IS_LIST(type) || WXS_IS_UNION(type))
 	return (0);
     while (type != NULL) {
 	if (type->type == XML_SCHEMA_TYPE_BASIC)
@@ -12381,73 +13319,6 @@
 #endif
 
 /**
- * xmlSchemaBuildAttributeUsesOwned:
- * @ctxt:  the schema parser context
- * @type:  the complex type definition
- * @cur: the attribute declaration list
- * @lastUse: the top of the attribute use list
- *
- * Builds the attribute uses list on the given complex type.
- * This one is supposed to be called by
- * xmlSchemaBuildAttributeValidation only.
- */
-static int
-xmlSchemaBuildAttributeUsesOwned(xmlSchemaParserCtxtPtr ctxt,
-				 int isRestriction,
-				 xmlSchemaAttributePtr cur,
-				 xmlSchemaAttributeLinkPtr *uses,
-				 xmlSchemaAttributeLinkPtr *lastUse,
-				 int *hasProhibitions)
-{
-    xmlSchemaAttributeLinkPtr tmp;
-    while (cur != NULL) {
-	if (cur->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) {
-	    /*
-	     * W3C: "2 The {attribute uses} of the attribute groups ·resolved·
-	     * to by the ·actual value·s of the ref [attribute] of the
-	     * <attributeGroup> [children], if any."
-	     */
-	    if (xmlSchemaBuildAttributeUsesOwned(ctxt, isRestriction,
-		((xmlSchemaAttributeGroupPtr) cur)->attributes, uses,
-		lastUse, hasProhibitions) == -1) {
-		return (-1);
-	    }
-	} else if ((! isRestriction) &&
-		(cur->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED)) {
-	    /*
-	    * Warn about pointless prohibitions when extending.
-	    */
-	    xmlSchemaCustomWarning(ACTXT_CAST ctxt,
-		XML_SCHEMAP_WARN_ATTR_REDECL_PROH,
-		cur->node, NULL,
-		"Attribute use prohibitions are pointless when "
-		"extending a type", NULL, NULL, NULL);
-	} else {
-	    /* W3C: "1 The set of attribute uses corresponding to the
-	     * <attribute> [children], if any."
-	     */
-	    tmp = (xmlSchemaAttributeLinkPtr)
-		xmlMalloc(sizeof(xmlSchemaAttributeLink));
-	    if (tmp == NULL) {
-		xmlSchemaPErrMemory(ctxt, "building attribute uses", NULL);
-		return (-1);
-	    }
-	    tmp->attr = cur;
-	    tmp->next = NULL;
-	    if (*uses == NULL)
-		*uses = tmp;
-	    else
-		(*lastUse)->next = tmp;
-	    *lastUse = tmp;
-	    if (cur->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED)
-		(*hasProhibitions)++;
-	}
-	cur = cur->next;
-    }
-    return (0);
-}
-
-/**
  * xmlSchemaCloneWildcardNsConstraints:
  * @ctxt:  the schema parser context
  * @dest:  the destination wildcard
@@ -12459,14 +13330,14 @@
  */
 static int
 xmlSchemaCloneWildcardNsConstraints(xmlSchemaParserCtxtPtr ctxt,
-				    xmlSchemaWildcardPtr *dest,
+				    xmlSchemaWildcardPtr dest,
 				    xmlSchemaWildcardPtr source)
 {
     xmlSchemaWildcardNsPtr cur, tmp, last;
 
-    if ((source == NULL) || (*dest == NULL))
+    if ((source == NULL) || (dest == NULL))
 	return(-1);
-    (*dest)->any = source->any;
+    dest->any = source->any;
     cur = source->nsSet;
     last = NULL;
     while (cur != NULL) {
@@ -12475,21 +13346,21 @@
 	    return(-1);
 	tmp->value = cur->value;
 	if (last == NULL)
-	    (*dest)->nsSet = tmp;
+	    dest->nsSet = tmp;
 	else
 	    last->next = tmp;
 	last = tmp;
 	cur = cur->next;
     }
-    if ((*dest)->negNsSet != NULL)
-	xmlSchemaFreeWildcardNsSet((*dest)->negNsSet);
+    if (dest->negNsSet != NULL)
+	xmlSchemaFreeWildcardNsSet(dest->negNsSet);
     if (source->negNsSet != NULL) {
-	(*dest)->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt);
-	if ((*dest)->negNsSet == NULL)
+	dest->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt);
+	if (dest->negNsSet == NULL)
 	    return(-1);
-	(*dest)->negNsSet->value = source->negNsSet->value;
+	dest->negNsSet->value = source->negNsSet->value;
     } else
-	(*dest)->negNsSet = NULL;
+	dest->negNsSet = NULL;
     return(0);
 }
 
@@ -12813,7 +13684,7 @@
     * 2 If either O1 or O2 is any, then the other must be the value.
     */
     if ((completeWild->any != curWild->any) && (completeWild->any)) {
-	if (xmlSchemaCloneWildcardNsConstraints(ctxt, &completeWild, curWild) == -1)
+	if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1)
 	    return(-1);
 	return(0);
     }
@@ -12829,7 +13700,7 @@
 
 	if (completeWild->nsSet == NULL) {
 	    neg = completeWild->negNsSet->value;
-	    if (xmlSchemaCloneWildcardNsConstraints(ctxt, &completeWild, curWild) == -1)
+	    if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1)
 		return(-1);
 	} else
 	    neg = curWild->negNsSet->value;
@@ -13005,85 +13876,8 @@
     return (1);
 }
 
-/**
- * xmlSchemaBuildCompleteAttributeWildcard:
- * @ctxt:  the schema parser context
- * @attrs: the attribute list
- * @completeWild: the resulting complete wildcard
- *
- * Returns -1 in case of an internal error, 0 otherwise.
- */
 static int
-xmlSchemaBuildCompleteAttributeWildcard(xmlSchemaParserCtxtPtr ctxt,
-				   xmlSchemaAttributePtr attrs,
-				   xmlSchemaWildcardPtr *completeWild)
-{
-    while (attrs != NULL) {
-	if (attrs->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) {
-	    xmlSchemaAttributeGroupPtr group;
-
-	    group = (xmlSchemaAttributeGroupPtr) attrs;
-	    /*
-	    * Handle attribute group references.
-	    */
-	    if (group->ref != NULL) {
-		if (group->refItem == NULL) {
-		    /*
-		    * TODO: Should we raise a warning here?
-		    */
-		    /*
-		    * The referenced attribute group definition could not
-		    * be resolved beforehand, so skip.
-		    */
-		    attrs = attrs->next;
-		    continue;
-		} else
-		    group = group->refItem;
-	    }
-	    /*
-	    * For every attribute group definition, an intersected wildcard
-	    * will be created (assumed that a wildcard exists on the
-	    * particular attr. gr. def. or on any contained attr. gr. def
-	    * at all).
-	    * The flag XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED ensures
-	    * that the intersection will be performed only once.
-	    */
-	    if ((group->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) == 0) {
-		if (group->attributes != NULL) {
-		    if (xmlSchemaBuildCompleteAttributeWildcard(ctxt,
-			group->attributes, &group->attributeWildcard) == -1)
-			return (-1);
-		}
-		group->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED;
-	    }
-	    if (group->attributeWildcard != NULL) {
-		if (*completeWild == NULL) {
-		    /*
-		    * Copy the first encountered wildcard as context, except for the annotation.
-		    *
-		    * Although the complete wildcard might not correspond to any
-		    * node in the schema, we will save this context node.
-		    */
-		    *completeWild = xmlSchemaAddWildcard(ctxt, ctxt->schema,
-			XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
-			group->attributeWildcard->node);
-		    if (xmlSchemaCloneWildcardNsConstraints(ctxt,
-			completeWild, group->attributeWildcard) == -1)
-			return (-1);
-		    (*completeWild)->processContents = group->attributeWildcard->processContents;
-		    (*completeWild)->node = group->attributeWildcard->node;
-		} else if (xmlSchemaIntersectWildcards(ctxt, *completeWild, group->attributeWildcard) == -1)
-		    return (-1);
-	    }
-	}
-	attrs = attrs->next;
-    }
-
-    return (0);
-}
-
-static int
-xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributePtr item,
+xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributeUsePtr attruse,
 				     int *fixed,
 				     const xmlChar **value,
 				     xmlSchemaValPtr *val)
@@ -13093,21 +13887,23 @@
     if (val != 0)
 	*val = NULL;
 
-    if (item->defValue == NULL)
-	item = item->refDecl;
-
-    if (item == NULL)
-	return (0);
-
-    if (item->defValue != NULL) {
-	*value = item->defValue;
-	if (val != 0)
-	    *val = item->defVal;
-	if (item->flags & XML_SCHEMAS_ATTR_FIXED)
+    if (attruse->defValue != NULL) {	    
+	*value = attruse->defValue;
+	if (val != NULL)
+	    *val = attruse->defVal;
+	if (attruse->flags & XML_SCHEMA_ATTR_USE_FIXED)
 	    *fixed = 1;
-	return (1);
+	return(1);
+    } else if ((attruse->attrDecl != NULL) &&
+	(attruse->attrDecl->defValue != NULL)) {
+	*value = attruse->attrDecl->defValue;
+	if (val != NULL)
+	    *val = attruse->attrDecl->defVal;
+	if (attruse->attrDecl->flags & XML_SCHEMAS_ATTR_FIXED)
+	    *fixed = 1;
+	return(1);
     }
-    return (0);
+    return(0);
 }
 /**
  * xmlSchemaCheckCVCWildcardNamespace:
@@ -13117,9 +13913,8 @@
  * Validation Rule: Wildcard allows Namespace Name
  * (cvc-wildcard-namespace)
  *
- *
- * Returns 1 if the given namespace matches the wildcard,
- * 0 otherwise.
+ * Returns 0 if the given namespace matches the wildcard,
+ * 1 otherwise and -1 on API errors.
  */
 static int
 xmlSchemaCheckCVCWildcardNamespace(xmlSchemaWildcardPtr wild,
@@ -13129,659 +13924,527 @@
 	return(-1);
 
     if (wild->any)
-	return(1);
+	return(0);
     else if (wild->nsSet != NULL) {
 	xmlSchemaWildcardNsPtr cur;
 
 	cur = wild->nsSet;
 	while (cur != NULL) {
 	    if (xmlStrEqual(cur->value, ns))
-		return(1);
+		return(0);
 	    cur = cur->next;
 	}
     } else if ((wild->negNsSet != NULL) && (ns != NULL) &&
 	(!xmlStrEqual(wild->negNsSet->value, ns)))
-	return(1);
+	return(0);
 
-    return(0);
+    return(1);
 }
 
-/**
- * xmlSchemaBuildAttributeValidation:
- * @ctxt:  the schema parser context
- * @type:  the complex type definition
- *
- *
- * Builds the wildcard and the attribute uses on the given complex type.
- * Returns -1 if an internal error occurs, 0 otherwise.
- */
+#define XML_SCHEMA_ACTION_DERIVE 0
+#define XML_SCHEMA_ACTION_REDEFINE 1
+
+#define WXS_ACTION_STR(a) \
+((a) == XML_SCHEMA_ACTION_DERIVE) ? (const xmlChar *) "base" : (const xmlChar *) "redefined"
+
+/*
+* Schema Component Constraint:
+*   Derivation Valid (Restriction, Complex)
+*   derivation-ok-restriction (2) - (4)
+*
+* ATTENTION:
+* In XML Schema 1.1 this will be:
+* Validation Rule:
+*     Checking complex type subsumption (practicalSubsumption) (1, 2 and 3)
+*
+*/
 static int
-xmlSchemaBuildAttributeValidation(xmlSchemaParserCtxtPtr pctxt,
-				  xmlSchemaTypePtr type)
-{
-    xmlSchemaTypePtr baseType = NULL;
-    xmlSchemaAttributeLinkPtr cur, base, tmp, id = NULL,
-	prev = NULL, localUses = NULL, lastUse = NULL, lastBaseUse = NULL;
-    xmlSchemaAttributePtr attrs;
-    xmlSchemaTypePtr anyType;
-    xmlChar *str = NULL;
-    int err = 0, hasProhibitions = 0;
-
-    anyType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE);
-    /*
-     * Complex Type Definition with complex content Schema Component.
-     *
-     * Attribute uses.
-     * TODO: Add checks for absent referenced attribute declarations and
-     * simple types.
-     */
-    if (type->attributeUses != NULL) {
-	PERROR_INT("xmlSchemaBuildAttributeValidation",
-	    "attribute uses already builded");
-        return (-1);
-    }
-    if (type->baseType == NULL) {
-	PERROR_INT("xmlSchemaBuildAttributeValidation",
-	    "no base type");
-        return (-1);
-    }
-    baseType = type->baseType;
-    /*
-    * Gather attribute uses defined by this type.
-    */
-    attrs = type->attributes;
-    if (attrs != NULL) {
-	if (xmlSchemaBuildAttributeUsesOwned(pctxt, 
-	    WXS_IS_RESTRICTION(type) ? 1 : 0,
-	    attrs,
-	    &localUses, &lastUse, &hasProhibitions) == -1) {
-	    return (-1);
-	}
-	/*
-	* Handle attribute wildcards.
-	*/
-	err = xmlSchemaBuildCompleteAttributeWildcard(pctxt,
-	    attrs, &type->attributeWildcard);
-	/*
-	* NOTE: During the parse time, the wildcard is created
-	* on the complexType directly, if encountered in a
-	* <restriction> or <extension> element.
-	*/
-	if (err == -1) {
-	    PERROR_INT("xmlSchemaBuildAttributeValidation",
-		"failed to build an intersected attribute wildcard");
-	    return (-1);
-	}
-    }
+xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt,
+				       int action,
+				       xmlSchemaBasicItemPtr item,
+				       xmlSchemaBasicItemPtr baseItem,
+				       xmlSchemaItemListPtr uses,
+				       xmlSchemaItemListPtr baseUses,
+				       xmlSchemaWildcardPtr wild,
+				       xmlSchemaWildcardPtr baseWild)
+{        
+    xmlSchemaAttributeUsePtr cur = NULL, bcur;
+    int i, j, found; /* err = 0; */
+    const xmlChar *bEffValue;
+    int effFixed;
     
-    if (hasProhibitions) {
-	xmlSchemaAttributeLinkPtr tmpPrev = NULL;
-	/*
-	* Handle annoying pointless prohibitions.
-        * Note that this will be done for restrictions only, since
-	* prohibitions are not gathered for extensions.
-	*/	
-	cur = localUses;
-
-pointless_prohib_next:    
-	while (cur != NULL) {
-	    tmp = cur->next;
-	    tmpPrev = cur;
-	    while (tmp != NULL) {
-		if ( ((cur->attr->occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED) &&
-		      (tmp->attr->occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED)) ||
-		    (xmlSchemaGetAttrName(cur->attr) !=
-			xmlSchemaGetAttrName(tmp->attr)) ||
-		    (xmlSchemaGetAttrTargetNsURI(cur->attr) !=
-			xmlSchemaGetAttrTargetNsURI(tmp->attr)))
+    if (uses != NULL) {
+	for (i = 0; i < uses->nbItems; i++) {
+	    cur = uses->items[i];
+	    found = 0;
+	    if (baseUses == NULL)
+		goto not_found;
+	    for (j = 0; j < baseUses->nbItems; j++) {
+		bcur = baseUses->items[j];	
+		if ((WXS_ATTRUSE_DECL_NAME(cur) ==
+			WXS_ATTRUSE_DECL_NAME(bcur)) &&
+		    (WXS_ATTRUSE_DECL_TNS(cur) ==
+			WXS_ATTRUSE_DECL_TNS(bcur)))
 		{
-		    tmpPrev = tmp;
-		    tmp = tmp->next;
-		    continue;
-		}
-		if (cur->attr->occurs == tmp->attr->occurs) {
-		    xmlSchemaAttributeLinkPtr tmpFree;
 		    /*
-		    * Warn about duplicate prohibitions.
+		    * (2.1) "If there is an attribute use in the {attribute
+		    * uses} of the {base type definition} (call this B) whose
+		    * {attribute declaration} has the same {name} and {target
+		    * namespace}, then  all of the following must be true:"
 		    */
-		    xmlSchemaCustomWarning(ACTXT_CAST pctxt,
-			XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
-			tmp->attr->node, NULL,
-			"Skipping duplicate prohibition "
-			"of attribute use '%s'",
-			xmlSchemaFormatQName(&str,
-			    xmlSchemaGetAttrTargetNsURI(tmp->attr),
-			    xmlSchemaGetAttrName(tmp->attr)),
-			NULL, NULL);
-		    FREE_AND_NULL(str)
-		    /*
-		    * Remove the duplicate prohibition.
-		    */
-		    tmpFree = tmp;
-		    tmpPrev->next = tmp->next;
-		    tmp = tmp->next;
-		    xmlFree(tmpFree);
-		    hasProhibitions--;
-		    continue;
-		} else {
-		    xmlSchemaAttributeLinkPtr tmpFree;
-		    xmlSchemaAttributePtr reattr;
-		    /*
-		    * Annoying case:
-		    * This is the case when we prohibited
-		    * the base attribute decl in the previous
-		    * step; i.e. when we prohibit and declare the
-		    * same attribute in the same <complexType>.
-		    */
-		    if (cur->attr->occurs ==
-			XML_SCHEMAS_ATTR_USE_PROHIBITED)
-			reattr = cur->attr;
-		    else
-			reattr = tmp->attr;
-		    xmlSchemaCustomWarning(ACTXT_CAST pctxt,
-			XML_SCHEMAP_WARN_ATTR_REDECL_PROH,
-			reattr->node, NULL,
-			"Skipping pointless prohibition of "
-			"attribute use '%s', since a corresponding "
-			"attribute was explicitely declared as well",
-			xmlSchemaFormatQName(&str,
-			    xmlSchemaGetAttrTargetNsURI(reattr),
-			    xmlSchemaGetAttrName(reattr)),
-			NULL, NULL);
-		    FREE_AND_NULL(str);
-		    /*
-		    * Remove the prohibition.
-		    */
-		    if (reattr == cur->attr) {
-			tmpFree = cur;
-			if (prev != NULL)
-			    prev->next = cur->next;
-			else
-			    localUses = cur->next;
-			cur = cur->next;
-			xmlFree(tmpFree);
-			hasProhibitions--;
-			goto pointless_prohib_next;
+		    found = 1;
+		    
+		    if ((cur->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) &&
+			(bcur->occurs == XML_SCHEMAS_ATTR_USE_REQUIRED))
+		    {
+			xmlChar *str = NULL;
+			/*
+			* (2.1.1) "one of the following must be true:"
+			* (2.1.1.1) "B's {required} is false."
+			* (2.1.1.2) "R's {required} is true."
+			*/
+			xmlSchemaPAttrUseErr4(pctxt,
+			    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1,
+			    WXS_ITEM_NODE(item), item, cur,
+			    "The 'optional' attribute use is inconsistent "
+			    "with the corresponding 'required' attribute use of "
+			    "the %s %s",
+			    WXS_ACTION_STR(action),
+			    xmlSchemaGetComponentDesignation(&str, baseItem),
+			    NULL, NULL);
+			FREE_AND_NULL(str);
+			/* err = pctxt->err; */
+		    } else if (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt,
+			WXS_ATTRUSE_TYPEDEF(cur),
+			WXS_ATTRUSE_TYPEDEF(bcur), 0) != 0)
+		    {
+			xmlChar *strA = NULL, *strB = NULL, *strC = NULL;
+			
+			/*
+			* SPEC (2.1.2) "R's {attribute declaration}'s
+			* {type definition} must be validly derived from
+			* B's {type definition} given the empty set as
+			* defined in Type Derivation OK (Simple) (§3.14.6)."
+			*/
+			xmlSchemaPAttrUseErr4(pctxt,
+			    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2,
+			    WXS_ITEM_NODE(item), item, cur,
+			    "The attribute declaration's %s "
+			    "is not validly derived from "
+			    "the corresponding %s of the "
+			    "attribute declaration in the %s %s",
+			    xmlSchemaGetComponentDesignation(&strA,
+				WXS_ATTRUSE_TYPEDEF(cur)),
+			    xmlSchemaGetComponentDesignation(&strB,
+				WXS_ATTRUSE_TYPEDEF(bcur)),
+			    WXS_ACTION_STR(action),
+			    xmlSchemaGetComponentDesignation(&strC, baseItem));
+			    /* xmlSchemaGetComponentDesignation(&str, baseItem), */
+			FREE_AND_NULL(strA);
+			FREE_AND_NULL(strB);
+			FREE_AND_NULL(strC);
+			/* err = pctxt->err; */
 		    } else {
-			tmpFree = tmp;
-			tmpPrev->next = tmp->next;
-			tmp = tmp->next;
-			xmlFree(tmpFree);
-			hasProhibitions--;
-			continue;
+			/*
+			* 2.1.3 [Definition:]  Let the effective value
+			* constraint of an attribute use be its {value
+			* constraint}, if present, otherwise its {attribute
+			* declaration}'s {value constraint} .
+			*/
+			xmlSchemaGetEffectiveValueConstraint(bcur,
+			    &effFixed, &bEffValue, NULL);
+			/*
+			* 2.1.3 ... one of the following must be true
+			*
+			* 2.1.3.1 B's ·effective value constraint· is
+			* ·absent· or default.
+			*/
+			if ((bEffValue != NULL) &&
+			    (effFixed == 1)) {
+			    const xmlChar *rEffValue = NULL;
+			    
+			    xmlSchemaGetEffectiveValueConstraint(bcur,
+				&effFixed, &rEffValue, NULL);
+			    /*
+			    * 2.1.3.2 R's ·effective value constraint· is
+			    * fixed with the same string as B's.
+			    * MAYBE TODO: Compare the computed values.
+			    *       Hmm, it says "same string" so
+			    *       string-equality might really be sufficient.
+			    */
+			    if ((effFixed == 0) ||
+				(! WXS_ARE_DEFAULT_STR_EQUAL(rEffValue, bEffValue)))
+			    {
+				xmlChar *str = NULL;
+				
+				xmlSchemaPAttrUseErr4(pctxt,
+				    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3,
+				    WXS_ITEM_NODE(item), item, cur,
+				    "The effective value constraint of the "
+				    "attribute use is inconsistent with "
+				    "its correspondent in the %s %s",
+				    WXS_ACTION_STR(action),
+				    xmlSchemaGetComponentDesignation(&str,
+					baseItem),
+				    NULL, NULL);
+				FREE_AND_NULL(str);
+				/* err = pctxt->err; */
+			    }
+			}
 		    }
+		    break;
 		}
-		tmpPrev = tmp;
-		tmp = tmp->next;
 	    }
-	    prev = cur;
-	    cur = cur->next;
+not_found:	
+	    if (!found) {
+		/*
+		* (2.2) "otherwise the {base type definition} must have an
+		* {attribute wildcard} and the {target namespace} of the
+		* R's {attribute declaration} must be ·valid· with respect
+		* to that wildcard, as defined in Wildcard allows Namespace
+		* Name (§3.10.4)."
+		*/
+		if ((baseWild == NULL) ||
+		    (xmlSchemaCheckCVCWildcardNamespace(baseWild,
+		    (WXS_ATTRUSE_DECL(cur))->targetNamespace) != 0))
+		{
+		    xmlChar *str = NULL;
+		    
+		    xmlSchemaPAttrUseErr4(pctxt,
+			XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2,
+			WXS_ITEM_NODE(item), item, cur,
+			"Neither a matching attribute use, "
+			"nor a matching wildcard exists in the %s %s",
+			WXS_ACTION_STR(action),
+			xmlSchemaGetComponentDesignation(&str, baseItem),
+			NULL, NULL);
+		    FREE_AND_NULL(str);
+		    /* err = pctxt->err; */
+		}
+	    }
 	}
     }
-
-    /* 3.4.6 -> Complex Type Definition Properties Correct 4.
-    * "Two distinct attribute declarations in the {attribute uses} must
-    * not have identical {name}s and {target namespace}s."
-    *
-    * This is done here for <restriction>s. We will compare only the
-    * attr uses of the current type.
-    * For <extension>s this is done further down.
+    /*
+    * SPEC derivation-ok-restriction (3):    
+    * (3) "For each attribute use in the {attribute uses} of the {base type
+    * definition} whose {required} is true, there must be an attribute
+    * use with an {attribute declaration} with the same {name} and
+    * {target namespace} as its {attribute declaration} in the {attribute
+    * uses} of the complex type definition itself whose {required} is true.
     */
-    if ((localUses != NULL) && (localUses->next != NULL) &&
-	(WXS_IS_RESTRICTION(type))) {	
-	cur = localUses;
-	while (cur != NULL) {
-	    if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) {
-		cur = cur->next;
+    if (baseUses != NULL) {
+	for (j = 0; j < baseUses->nbItems; j++) {
+	    bcur = baseUses->items[j];
+	    if (bcur->occurs != XML_SCHEMAS_ATTR_USE_REQUIRED)
 		continue;
-	    }
-	    tmp = cur->next;
-	    while (tmp != NULL) {
-		if (tmp->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) {
-		    tmp = tmp->next;
-		    continue;
+	    found = 0;
+	    if (uses != NULL) {
+		for (i = 0; i < uses->nbItems; i++) {
+		    cur = uses->items[i];	
+		    if ((WXS_ATTRUSE_DECL_NAME(cur) ==
+			WXS_ATTRUSE_DECL_NAME(bcur)) &&
+			(WXS_ATTRUSE_DECL_TNS(cur) ==
+			WXS_ATTRUSE_DECL_TNS(bcur))) {
+			found = 1;
+			break;
+		    }
 		}
-		if ((xmlStrEqual(xmlSchemaGetAttrName(cur->attr),
-			xmlSchemaGetAttrName(tmp->attr))) &&
-		    (xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr),
-			xmlSchemaGetAttrTargetNsURI(tmp->attr)))) {
-		    /*
-		    * Duplicate attr uses.
-		    */
-		    xmlSchemaPAttrUseErr(pctxt,
-			XML_SCHEMAP_CT_PROPS_CORRECT_4,
-			type, cur->attr,
-			"Duplicate attribute use '%s' specified",
-			xmlSchemaFormatQName(&str,
-			xmlSchemaGetAttrTargetNsURI(tmp->attr),
-			xmlSchemaGetAttrName(tmp->attr)));
-		    FREE_AND_NULL(str)
-		    break;
-		}
-		tmp = tmp->next;
 	    }
-	    cur = cur->next;
+	    if (!found) {
+		xmlChar *strA = NULL, *strB = NULL;
+		
+		xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+		    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3,
+		    NULL, item,
+		    "A matching attribute use for the "
+		    "'required' %s of the %s %s is missing",
+		    xmlSchemaGetComponentDesignation(&strA, bcur),
+		    WXS_ACTION_STR(action),
+		    xmlSchemaGetComponentDesignation(&strB, baseItem),
+		    NULL);
+		FREE_AND_NULL(strA);
+		FREE_AND_NULL(strB);
+	    }
 	}
     }
-
     /*
-    * Inherit the attribute uses of the base type, but leave out
-    * prohibited ones.
-    * NOTE: It is allowed to "extend" the anyType complex type.
-    */    
-    if (baseType->attributeUses != NULL) {	
-	base = baseType->attributeUses;
-inherit_start:
-	while (base != NULL) {		
-	    /*
-	    * Check if prohibited.
-	    */
-	    if (hasProhibitions) {
-		cur = localUses;
-		while (cur != NULL) {
-		    if ((cur->attr->occurs ==
-			    XML_SCHEMAS_ATTR_USE_PROHIBITED) &&
-			xmlStrEqual(xmlSchemaGetAttrName(cur->attr),
-			    xmlSchemaGetAttrName(base->attr)) &&
-			xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr),
-			    xmlSchemaGetAttrTargetNsURI(base->attr)))			
-		    {
-			/*
-			* Don't inherit prohibited attr uses.
-			*/
-			if (base->attr->occurs ==
-			    XML_SCHEMAS_ATTR_USE_REQUIRED) {
-			    /*
-			    * derivation-ok-restriction 3
-			    * There won't be an attr use left if
-			    * prohibiting the inherited one, so this
-			    * will automatically violate required
-			    * attr uses.
-			    */
-			    xmlSchemaPCustomErr(pctxt,
-				XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3,
-				NULL, type, NULL,
-				"A matching attribute use for the "
-				"'required' attribute use '%s' of the "
-				"base type is missing",
-				xmlSchemaFormatQName(&str,
-				xmlSchemaGetAttrTargetNsURI(base->attr),
-				xmlSchemaGetAttrName(base->attr)));
-			    FREE_AND_NULL(str)				
-			}
-			base = base->next;
-			goto inherit_start;
-		    }
-		    cur = cur->next;
-		}		
-	    }	   
-	    tmp = (xmlSchemaAttributeLinkPtr)
-		xmlMalloc(sizeof(xmlSchemaAttributeLink));
-	    if (tmp == NULL) {
-		xmlSchemaPErrMemory(pctxt,
-		    "allocating attribute uses", NULL);
-		return (-1);
-	    }
-	    tmp->attr = base->attr;
-	    tmp->next = NULL;
-	    if (type->attributeUses == NULL) {
-		type->attributeUses = tmp;
-	    } else
-		lastBaseUse->next = tmp;
-	    lastBaseUse = tmp;
-	    /* next */
-	    base = base->next;
-	}
-    }    
+    * derivation-ok-restriction (4)
+    */
+    if (wild != NULL) {
+	/*
+	* (4) "If there is an {attribute wildcard}, all of the
+	* following must be true:"
+	*/   
+	if (baseWild == NULL) {
+	    xmlChar *str = NULL;
 
-    if ((WXS_IS_EXTENSION(type)) &&
-	((IS_ANYTYPE(baseType)) ||
-	 ((baseType != NULL) &&
-	  (baseType->type == XML_SCHEMA_TYPE_COMPLEX) &&
-	  (baseType->attributeWildcard != NULL)))) {
-	if (type->attributeWildcard != NULL) {
 	    /*
-	    * Union the complete wildcard with the base wildcard.
-	    */
-	    if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard,
-		baseType->attributeWildcard) == -1)
-		return (-1);
-	} else {
+	    * (4.1) "The {base type definition} must also have one."
+	    */	    
+	    xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+		XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1,
+		NULL, item,
+		"The %s has an attribute wildcard, "
+		"but the %s %s '%s' does not have one",
+		WXS_ITEM_TYPE_NAME(item),		    
+		WXS_ACTION_STR(action),
+		WXS_ITEM_TYPE_NAME(baseItem),
+		xmlSchemaGetComponentQName(&str, baseItem));
+	    FREE_AND_NULL(str);
+	    return(pctxt->err);
+	} else if ((baseWild->any == 0) &&
+		xmlSchemaCheckCOSNSSubset(wild, baseWild))
+	{
+	    xmlChar *str = NULL;
 	    /*
-	    * Just inherit the wildcard.
+	    * (4.2) "The complex type definition's {attribute wildcard}'s
+	    * {namespace constraint} must be a subset of the {base type
+	    * definition}'s {attribute wildcard}'s {namespace constraint},
+	    * as defined by Wildcard Subset (§3.10.6)."
 	    */
-	    /*
-	    * NOTE: This is the only case where an attribute
-            * wildcard is shared.
-            */
-	    type->attributeWildcard = baseType->attributeWildcard;
+	    xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+		XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2,
+		NULL, item,
+		"The attribute wildcard is not a valid "
+		"subset of the wildcard in the %s %s '%s'",
+		WXS_ACTION_STR(action),
+		WXS_ITEM_TYPE_NAME(baseItem),
+		xmlSchemaGetComponentQName(&str, baseItem),
+		NULL);
+	    FREE_AND_NULL(str);
+	    return(pctxt->err);
 	}
+	/* 4.3 Unless the {base type definition} is the ·ur-type
+	* definition·, the complex type definition's {attribute
+	* wildcard}'s {process contents} must be identical to or
+	* stronger than the {base type definition}'s {attribute
+	* wildcard}'s {process contents}, where strict is stronger
+	* than lax is stronger than skip.
+	*/
+	if ((! WXS_IS_ANYTYPE(baseItem)) &&
+	    (wild->processContents < baseWild->processContents)) {
+	    xmlChar *str = NULL;
+	    xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+		XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3,
+		NULL, baseItem,
+		"The {process contents} of the attribute wildcard is "
+		"weaker than the one in the %s %s '%s'",
+		WXS_ACTION_STR(action),
+		WXS_ITEM_TYPE_NAME(baseItem),
+		xmlSchemaGetComponentQName(&str, baseItem),
+		NULL);
+	    FREE_AND_NULL(str)
+		return(pctxt->err);
+	}
     }
+    return(0);
+}
 
-    if (WXS_IS_RESTRICTION(type)) {
-	if (type->attributeWildcard != NULL) {
+
+static int
+xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
+				  xmlSchemaBasicItemPtr item,
+				  xmlSchemaWildcardPtr *completeWild,
+				  xmlSchemaItemListPtr list,
+				  xmlSchemaItemListPtr prohibs);
+/**
+ * xmlSchemaFixupTypeAttributeUses:
+ * @ctxt:  the schema parser context
+ * @type:  the complex type definition
+ *
+ *
+ * Builds the wildcard and the attribute uses on the given complex type.
+ * Returns -1 if an internal error occurs, 0 otherwise.
+ *
+ * ATTENTION TODO: Experimantally this uses pointer comparisons for
+ * strings, so recheck this if we start to hardcode some schemata, since
+ * they might not be in the same dict.
+ * NOTE: It is allowed to "extend" the xs:anyType type.
+ */
+static int
+xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt,
+				  xmlSchemaTypePtr type)
+{
+    xmlSchemaTypePtr baseType = NULL;
+    xmlSchemaAttributeUsePtr use;    
+    xmlSchemaItemListPtr uses, baseUses, prohibs = NULL;
+
+    if (type->baseType == NULL) {
+	PERROR_INT("xmlSchemaFixupTypeAttributeUses",
+	    "no base type");
+        return (-1);
+    }
+    baseType = type->baseType;        
+    if (WXS_IS_TYPE_NOT_FIXED(baseType))
+	if (xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt) == -1)
+	    return(-1);
+
+    uses = type->attrUses;
+    baseUses = baseType->attrUses;
+    /*
+    * Expand attribute group references. And build the 'complete'
+    * wildcard, i.e. intersect multiple wildcards.
+    * Move attribute prohibitions into a separate list.
+    */
+    if (uses != NULL) {	
+	if (WXS_IS_RESTRICTION(type)) {
 	    /*
-	    * Derivation Valid (Restriction, Complex)
-	    * 4.1 The {base type definition} must also have one.
+	    * This one will transfer all attr. prohibitions
+	    * into pctxt->attrProhibs.
 	    */
-	    if (baseType->attributeWildcard == NULL) {
-		xmlSchemaPCustomErr(pctxt,
-		    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1,
-		    NULL, type, NULL,
-		    "The type has an attribute wildcard, "
-		    "but the base type %s does not have one",
-		    xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL));
-		FREE_AND_NULL(str)
-		return (1);
-	    } else if (xmlSchemaCheckCOSNSSubset(
-		type->attributeWildcard, baseType->attributeWildcard)) {
-		/* 4.2 */
-		xmlSchemaPCustomErr(pctxt,
-		    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2,
-		    NULL, type, NULL,
-		    "The attribute wildcard is not a valid "
-		    "subset of the wildcard in the base type %s",
-		    xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL));
-		FREE_AND_NULL(str)
-		return (1);
+	    if (xmlSchemaExpandAttributeGroupRefs(pctxt,
+		WXS_BASIC_CAST type, &(type->attributeWildcard), uses,
+		pctxt->attrProhibs) == -1)
+	    {
+		PERROR_INT("xmlSchemaFixupTypeAttributeUses",
+		"failed to expand attributes");
 	    }
-	    /* 4.3 Unless the {base type definition} is the ·ur-type
-	    * definition·, the complex type definition's {attribute
-	    * wildcard}'s {process contents} must be identical to or
-	    * stronger than the {base type definition}'s {attribute
-	    * wildcard}'s {process contents}, where strict is stronger
-	    * than lax is stronger than skip.
-	    */
-	    if ((! IS_ANYTYPE(baseType)) &&
-		(type->attributeWildcard->processContents <
-		baseType->attributeWildcard->processContents)) {
-		xmlSchemaPCustomErr(pctxt,
-		    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3,
-		    NULL, type, NULL,
-		    "The 'process contents' of the attribute wildcard is "
-		    "weaker than the one in the base type %s",
-		    xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL));
-		FREE_AND_NULL(str)
-		return (1);
+	    if (pctxt->attrProhibs->nbItems != 0)
+		prohibs = pctxt->attrProhibs;
+	} else {
+	    if (xmlSchemaExpandAttributeGroupRefs(pctxt,
+		WXS_BASIC_CAST type, &(type->attributeWildcard), uses,
+		NULL) == -1)
+	    {
+		PERROR_INT("xmlSchemaFixupTypeAttributeUses",
+		"failed to expand attributes");
 	    }
 	}
-    } else if (WXS_IS_EXTENSION(type)) {
-	/*
-	* Derivation Valid (Extension)
-	* At this point the type and the base have both, either
-	* no wildcard or a wildcard.
-	*/
-	if ((baseType->attributeWildcard != NULL) &&
-	    (baseType->attributeWildcard != type->attributeWildcard)) {
-	    /* 1.3 */
-	    if (xmlSchemaCheckCOSNSSubset(
-		baseType->attributeWildcard, type->attributeWildcard)) {
-		xmlSchemaPCustomErr(pctxt,
-		    XML_SCHEMAP_COS_CT_EXTENDS_1_3,
-		    NULL, type, NULL,
-		    "The attribute wildcard is not a valid "
-		    "superset of the one in the base type %s",
-		    xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL));
-		FREE_AND_NULL(str)
-		return (1);
-	    }
-	}
     }
-    
-    if (localUses == NULL) {
-	/* PASS */
-    } else if (WXS_IS_RESTRICTION(type)) {
-	/*
-	 * Derive by restriction. At this point prohibited uses are already
-	 * filtered out.
-	 */
-	if (IS_ANYTYPE(baseType)) {
-	    type->attributeUses = localUses;
-	} else {
-	    int found, valid;
-	    const xmlChar *bEffValue;
-	    int effFixed;
+    /*
+    * Inherit the attribute uses of the base type.
+    */
+    if (baseUses != NULL) {
+	int i, j;
+	xmlSchemaAttributeUseProhibPtr pro;
 
-	    cur = localUses;
-	    while (cur != NULL) {
-		if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) {
-		    prev = cur;
-		    cur = cur->next;
-		    continue;
-		}
-		found = 0;
-		valid = 1;
-		base = type->attributeUses;
-		while (base != NULL) {
-		    if (xmlStrEqual(xmlSchemaGetAttrName(cur->attr),
-			    xmlSchemaGetAttrName(base->attr)) &&
-			xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr),
-			    xmlSchemaGetAttrTargetNsURI(base->attr))) {
+	if (WXS_IS_RESTRICTION(type)) {
+	    int usesCount;
+	    xmlSchemaAttributeUsePtr tmp; 
 
-			found = 1;
-			
-			if ((cur->attr->occurs ==
-			    XML_SCHEMAS_ATTR_USE_OPTIONAL) &&
-			    (base->attr->occurs ==
-			    XML_SCHEMAS_ATTR_USE_REQUIRED)) {
-			    /*
-			    * derivation-ok-restriction 2.1.1
-			    */
-			    xmlSchemaPAttrUseErr(pctxt,
-				XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1,
-				type, cur->attr,
-				"The 'optional' use is inconsistent with a "
-				"matching 'required' use of the base type",
-				NULL);
-			} else if (xmlSchemaCheckCOSSTDerivedOK(
-			    cur->attr->subtypes, base->attr->subtypes, 0) != 0) {
-			    			    
-			    /*
-			    * SPEC (2.1.2) "R's {attribute declaration}'s
-			    * {type definition} must be validly derived from
-			    * B's {type definition} given the empty set as
-			    * defined in Type Derivation OK (Simple) (§3.14.6)."
-			    */
-			    xmlSchemaPAttrUseErr(pctxt,
-				XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2,
-				type, cur->attr,
-				"The attribute declaration's type "
-				"definition is not validly derived from "
-				"the corresponding definition in the "
-				"base type", NULL);			    
-			} else {
-			    /*
-			    * 2.1.3 [Definition:]  Let the effective value
-			    * constraint of an attribute use be its {value
-			    * constraint}, if present, otherwise its {attribute
-			    * declaration}'s {value constraint} .
-			    */
-			    xmlSchemaGetEffectiveValueConstraint(base->attr,
-				&effFixed, &bEffValue, NULL);
-			    /*
-			    * 2.1.3 ... one of the following must be true
-			    *
-			    * 2.1.3.1 B's ·effective value constraint· is
-			    * ·absent· or default.
-			    */
-			    if ((bEffValue != NULL) &&
-				(effFixed == 1)) {
-				const xmlChar *rEffValue = NULL;
-				
-				xmlSchemaGetEffectiveValueConstraint(base->attr,
-				    &effFixed, &rEffValue, NULL);
-				    /*
-				    * 2.1.3.2 R's ·effective value constraint· is
-				    * fixed with the same string as B's.
-				    * TODO: Compare the computed values.
-				*/
-				if ((effFixed == 0) ||
-				    (! xmlStrEqual(rEffValue, bEffValue))) {
-				    xmlSchemaPAttrUseErr(pctxt,
-					XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3,
-					type, cur->attr,
-					"The effective value constraint of the "
-					"attribute use is inconsistent with "
-					"its correspondent of the base type",
-					NULL);
-				} else {
-				    /*
-				    * Override the attribute use.
-				    */
-				    base->attr = cur->attr;
-				}
-			    } else				
-				base->attr = cur->attr;
+	    if (uses != NULL)
+		usesCount = uses->nbItems;
+	    else
+		usesCount = 0;
+
+	    /* Restriction. */
+	    for (i = 0; i < baseUses->nbItems; i++) {
+		use = baseUses->items[i];
+		if (prohibs) {
+		    /*
+		    * Filter out prohibited uses.
+		    */
+		    for (j = 0; j < prohibs->nbItems; j++) {
+			pro = prohibs->items[j];
+			if ((WXS_ATTRUSE_DECL_NAME(use) == pro->name) &&
+			    (WXS_ATTRUSE_DECL_TNS(use) ==
+				pro->targetNamespace))
+			{
+			    goto inherit_next;
 			}
-
-			break;
 		    }
-		    base = base->next;
 		}
-
-		if (!found) {
+		if (usesCount) {
 		    /*
-		    * derivation-ok-restriction  2.2
+		    * Filter out existing uses.
 		    */
-		    if ((baseType->attributeWildcard == NULL) ||
-			(xmlSchemaCheckCVCWildcardNamespace(
-			baseType->attributeWildcard,
-			cur->attr->targetNamespace) != 1)) {
-			xmlSchemaPAttrUseErr(pctxt,
-			    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2,
-			    type, cur->attr,
-			    "Neither a matching attribute use, "
-			    "nor a matching wildcard in the base type does exist",
-			    NULL);
-		    } else {
-			/*
-			* Add the attribute use.
-			*
-			* Note that this may lead to funny derivation error reports, if
-			* multiple equal attribute uses exist; but this is not
-			* allowed anyway, and it will be reported beforehand.
-			*/
-			tmp = cur;
-			if (prev != NULL)
-			    prev->next = cur->next;
-			else
-			    localUses = cur->next;
-			cur = cur->next;
-			tmp->next = NULL;
-			if (type->attributeUses == NULL) {
-			    type->attributeUses = tmp;
-			} else
-			    lastBaseUse->next = tmp;
-			lastBaseUse = tmp;
-			
-			continue;
+		    for (j = 0; j < usesCount; j++) {
+			tmp = uses->items[j];
+			if ((WXS_ATTRUSE_DECL_NAME(use) ==
+				WXS_ATTRUSE_DECL_NAME(tmp)) &&
+			    (WXS_ATTRUSE_DECL_TNS(use) ==
+				WXS_ATTRUSE_DECL_TNS(tmp)))
+			{
+			    goto inherit_next;
+			}
 		    }
 		}
-		prev = cur;
-		cur = cur->next;
+		if (uses == NULL) {
+		    type->attrUses = xmlSchemaItemListCreate();
+		    if (type->attrUses == NULL)
+			goto exit_failure;
+		    uses = type->attrUses;
+		}
+		xmlSchemaItemListAddSize(uses, 2, use);
+inherit_next: {}
 	    }
-	    if (localUses != NULL)
-		xmlSchemaFreeAttributeUseList(localUses);
+	} else {
+	    /* Extension. */
+	    for (i = 0; i < baseUses->nbItems; i++) {	    
+		use = baseUses->items[i];		
+		if (uses == NULL) {
+		    type->attrUses = xmlSchemaItemListCreate();
+		    if (type->attrUses == NULL)
+			goto exit_failure;
+		    uses = type->attrUses;
+		}
+		xmlSchemaItemListAddSize(uses, baseUses->nbItems, use); 
+	    }
 	}
-    } else if (WXS_IS_EXTENSION(type)) {
+    }
+    /*
+    * Shrink attr. uses.
+    */
+    if (uses) {
+	if (uses->nbItems == 0) {
+	    xmlSchemaItemListFree(uses);
+	    type->attrUses = NULL;
+	}
 	/*
-	 * The spec allows only appending, and not other kinds of extensions.
-	 *
-	 * This ensures: Schema Component Constraint: Derivation Valid (Extension) : 1.2
-	 */
-	if (localUses != NULL) {
-	    if (type->attributeUses == NULL) {
-		type->attributeUses = localUses;
-	    } else
-		lastBaseUse->next = localUses;
-	}
-    } else {
-	PERROR_INT("xmlSchemaBuildAttributeValidation",
-	    "no derivation method");
-	return (-1);
+	* TODO: We could shrink the size of the array
+	* to fit the actual number of items.
+	*/
     }
     /*
-     * 3.4.6 -> Complex Type Definition Properties Correct
-     */
-    if (type->attributeUses != NULL) {
-	cur = type->attributeUses;
-	prev = NULL;
-	while (cur != NULL) {
-	    if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) {
+    * Compute the complete wildcard.
+    */
+    if (WXS_IS_EXTENSION(type)) {	
+	if (baseType->attributeWildcard != NULL) {
+	    /*
+	    * (3.2.2.1) "If the ·base wildcard· is non-·absent·, then
+	    * the appropriate case among the following:"
+	    */
+	    if (type->attributeWildcard != NULL) {
 		/*
-		* Remove "prohibited" attribute uses. The reason this is
-		* done at this late stage is to be able to catch
-		* dublicate attribute uses. So we had to keep prohibited
-		* uses in the list as well.
+		* Union the complete wildcard with the base wildcard.
+		* SPEC {attribute wildcard}
+		* (3.2.2.1.2) "otherwise a wildcard whose {process contents}
+		* and {annotation} are those of the ·complete wildcard·,
+		* and whose {namespace constraint} is the intensional union
+		* of the {namespace constraint} of the ·complete wildcard·
+		* and of the ·base wildcard·, as defined in Attribute
+		* Wildcard Union (§3.10.6)."
 		*/
-		tmp = cur;
-		if (prev == NULL)
-		    type->attributeUses = cur->next;
-		else
-		    prev->next = cur->next;
-		cur = cur->next;
-		xmlFree(tmp);
-		continue;
-	    }
+		if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard,
+		    baseType->attributeWildcard) == -1)
+		    goto exit_failure;		
+	    } else {
+		/*
+		* (3.2.2.1.1) "If the ·complete wildcard· is ·absent·,
+		* then the ·base wildcard·."
+		*/
+		type->attributeWildcard = baseType->attributeWildcard;
+	    }	 
+	} else {
 	    /*
-	    * 4. Two distinct attribute declarations in the {attribute uses} must
-	    * not have identical {name}s and {target namespace}s.
-	    *
-	    * Note that this was already done for "restriction" and types derived from
-	    * the ur-type.
+	    * (3.2.2.2) "otherwise (the ·base wildcard· is ·absent·) the
+	    * ·complete wildcard"
+	    * NOOP
 	    */
-	    if (WXS_IS_EXTENSION(type)) {
-		tmp = cur->next;
-		while (tmp != NULL) {
-		    if ((xmlStrEqual(xmlSchemaGetAttrName(cur->attr),
-			xmlSchemaGetAttrName(tmp->attr))) &&
-			(xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr ),
-			xmlSchemaGetAttrTargetNsURI(tmp->attr)))) {
-
-			xmlSchemaPAttrUseErr(pctxt,
-			    XML_SCHEMAP_CT_PROPS_CORRECT_4,
-			    type, tmp->attr,
-			    "Duplicate attribute use specified", NULL);
-			break;
-		    }
-		    tmp = tmp->next;
-		}
-	    }	    
-	    
-	    /*
-	    * 5. Two distinct attribute declarations in the
-	    * {attribute uses} must not have {type definition}s which
-	    * are or are derived from ID.
-	    */
-	    if ((cur->attr->subtypes != NULL) &&
-		(xmlSchemaIsDerivedFromBuiltInType(cur->attr->subtypes,
-		XML_SCHEMAS_ID))) {
-		if (id != NULL) {
-		    xmlSchemaPAttrUseErr(pctxt,
-			XML_SCHEMAP_CT_PROPS_CORRECT_5,
-			type, cur->attr,
-			"There must not exist more than one attribute "
-			"use, declared of type 'ID' or derived from it",
-			NULL);
-		    FREE_AND_NULL(str)
-		}
-		id = cur;
-	    }			    
-	    prev = cur;
-	    cur = cur->next;	    
 	}
+    } else {
+	/*
+	* SPEC {attribute wildcard}
+	* (3.1) "If the <restriction> alternative is chosen, then the
+	* ·complete wildcard·;"
+	* NOOP
+	*/
     }
-    /*
-     * TODO: This check should be removed if we are 100% sure of
-     * the base type attribute uses already being built.
-     */
-    if ((baseType != NULL) && (! IS_ANYTYPE(baseType)) &&
-	(baseType->type == XML_SCHEMA_TYPE_COMPLEX) &&
-	(IS_NOT_TYPEFIXED(baseType))) {
-	PERROR_INT("xmlSchemaBuildAttributeValidation",
-	    "attribute uses not builded on base type");
-    }
+    
     return (0);
+
+exit_failure:
+    return(-1);
 }
 
 /**
@@ -13963,7 +14626,7 @@
     * SPEC (2) "Its {term} is a group and the minimum part of the
     * effective total range of that group, [...] is 0."
     */
-    if (IS_MODEL_GROUP(particle->children)) {
+    if (WXS_IS_MODEL_GROUP(particle->children)) {
 	if (xmlSchemaGetParticleTotalRangeMin(particle) == 0)
 	    return (1);
     }
@@ -13972,8 +14635,10 @@
 
 /**
  * xmlSchemaCheckCOSSTDerivedOK:
+ * @actxt: a context
  * @type:  the derived simple type definition
  * @baseType:  the base type definition
+ * @subset: the subset of ('restriction', ect.)
  *
  * Schema Component Constraint:
  * Type Derivation OK (Simple) (cos-st-derived-OK)
@@ -13984,7 +14649,8 @@
  * Returns 0 on success, an positive error code otherwise.
  */
 static int
-xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type,
+xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
+			     xmlSchemaTypePtr type,
 			     xmlSchemaTypePtr baseType,
 			     int subset)
 {
@@ -13997,7 +14663,18 @@
     /*
     * 2.1 restriction is not in the subset, or in the {final}
     * of its own {base type definition};
+    *
+    * NOTE that this will be used also via "xsi:type".
+    *
+    * TODO: Revise this, it looks strange. How can the "type"
+    * not be fixed or *in* fixing?
     */
+    if (WXS_IS_TYPE_NOT_FIXED(type))
+	if (xmlSchemaTypeFixup(type, actxt) == -1)
+	    return(-1);
+    if (WXS_IS_TYPE_NOT_FIXED(baseType))
+	if (xmlSchemaTypeFixup(baseType, actxt) == -1)
+	    return(-1);
     if ((subset & SUBSET_RESTRICTION) ||
 	(xmlSchemaTypeFinalContains(type->baseType,
 	    XML_SCHEMAS_TYPE_FINAL_RESTRICTION))) {
@@ -14015,8 +14692,8 @@
     * and is validly derived from B given the subset, as defined by this
     * constraint.
     */
-    if ((! IS_ANYTYPE(type->baseType)) &&
-	(xmlSchemaCheckCOSSTDerivedOK(type->baseType,
+    if ((! WXS_IS_ANYTYPE(type->baseType)) &&
+	(xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType,
 	    baseType, subset) == 0)) {
 	return (0);
     }
@@ -14024,8 +14701,8 @@
     * 2.2.3 D's {variety} is list or union and B is the ·simple ur-type
     * definition·.
     */
-    if (IS_ANY_SIMPLE_TYPE(baseType) &&
-	(VARIETY_LIST(type) || VARIETY_UNION(type))) {
+    if (WXS_IS_ANY_SIMPLE_TYPE(baseType) &&
+	(WXS_IS_LIST(type) || WXS_IS_UNION(type))) {
 	return (0);
     }
     /*
@@ -14036,17 +14713,26 @@
     * NOTE: This seems not to involve built-in types, since there is no
     * built-in Union Simple Type.
     */
-    if (VARIETY_UNION(baseType)) {
+    if (WXS_IS_UNION(baseType)) {
 	xmlSchemaTypeLinkPtr cur;
 
 	cur = baseType->memberTypes;
 	while (cur != NULL) {
-	    if (xmlSchemaCheckCOSSTDerivedOK(type, cur->type, subset) == 0)
+	    if (WXS_IS_TYPE_NOT_FIXED(cur->type))
+		if (xmlSchemaTypeFixup(cur->type, actxt) == -1)
+		    return(-1);
+	    if (xmlSchemaCheckCOSSTDerivedOK(actxt,
+		    type, cur->type, subset) == 0)
+	    {
+		/*
+		* It just has to be validly derived from at least one
+		* member-type.
+		*/
 		return (0);
+	    }
 	    cur = cur->next;
 	}
     }
-
     return (XML_SCHEMAP_COS_ST_DERIVED_OK_2_2);
 }
 
@@ -14075,7 +14761,7 @@
     if (ctxtType == ancestor) {
 	xmlSchemaPCustomErr(pctxt,
 	    XML_SCHEMAP_ST_PROPS_CORRECT_2,
-	    NULL, ctxtType, GET_NODE(ctxtType),
+	    WXS_BASIC_CAST ctxtType, WXS_ITEM_NODE(ctxtType),
 	    "The definition is circular", NULL);
 	return (XML_SCHEMAP_ST_PROPS_CORRECT_2);
     }
@@ -14105,17 +14791,11 @@
 			      xmlSchemaParserCtxtPtr ctxt)
 {
     if ((item == NULL) ||
-	((item->type != XML_SCHEMA_TYPE_COMPLEX) &&
-	(item->type != XML_SCHEMA_TYPE_SIMPLE)))
+	(item->type == XML_SCHEMA_TYPE_BASIC) ||
+	(item->baseType == NULL))
 	return;
-    if (item->redef != NULL) {
-	xmlSchemaTypePtr cur = item;
-	do {
-	    xmlSchemaCheckTypeDefCircularInternal(ctxt, cur, cur->baseType);
-	    cur = cur->redef;
-	} while (cur != NULL);
-    } else
-	xmlSchemaCheckTypeDefCircularInternal(ctxt, item, item->baseType);
+    xmlSchemaCheckTypeDefCircularInternal(ctxt, item,
+	item->baseType);
 }
 
 /*
@@ -14147,11 +14827,11 @@
 	    if (memberType == ctxType) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_SRC_SIMPLE_TYPE_4,
-		    NULL, ctxType, NULL,
+		    WXS_BASIC_CAST ctxType, NULL,
 		    "The union type definition is circular", NULL);
 		return (XML_SCHEMAP_SRC_SIMPLE_TYPE_4);
 	    }
-	    if ((VARIETY_UNION(memberType)) &&
+	    if ((WXS_IS_UNION(memberType)) &&
 		((memberType->flags & XML_SCHEMAS_TYPE_MARKED) == 0))
 	    {
 		int res;
@@ -14174,7 +14854,7 @@
 xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt,
 				   xmlSchemaTypePtr type)
 {
-    if (! VARIETY_UNION(type))
+    if (! WXS_IS_UNION(type))
 	return(0);
     return(xmlSchemaCheckUnionTypeDefCircularRecur(pctxt, type,
 	type->memberTypes));
@@ -14190,8 +14870,7 @@
  */
 static void
 xmlSchemaResolveTypeReferences(xmlSchemaTypePtr typeDef,
-			 xmlSchemaParserCtxtPtr ctxt,
-			 const xmlChar * name ATTRIBUTE_UNUSED)
+			 xmlSchemaParserCtxtPtr ctxt)
 {
     if (typeDef == NULL)
 	return;
@@ -14205,38 +14884,103 @@
 	if (typeDef->baseType == NULL) {
 	    xmlSchemaPResCompAttrErr(ctxt,
 		XML_SCHEMAP_SRC_RESOLVE,
-		typeDef, typeDef->node,
+		WXS_BASIC_CAST typeDef, typeDef->node,
 		"base", typeDef->base, typeDef->baseNs,
 		XML_SCHEMA_TYPE_SIMPLE, NULL);
 	    return;
 	}
     }
-    if (IS_SIMPLE_TYPE(typeDef)) {
-	if (VARIETY_UNION(typeDef)) {
+    if (WXS_IS_SIMPLE(typeDef)) {
+	if (WXS_IS_UNION(typeDef)) {
 	    /*
 	    * Resolve the memberTypes.
 	    */
 	    xmlSchemaResolveUnionMemberTypes(ctxt, typeDef);
 	    return;
-	} else if (VARIETY_LIST(typeDef)) {
+	} else if (WXS_IS_LIST(typeDef)) {
 	    /*
 	    * Resolve the itemType.
 	    */
-	    if ((typeDef->subtypes == NULL) && (typeDef->ref != NULL)) {
+	    if ((typeDef->subtypes == NULL) && (typeDef->base != NULL)) {
+
 		typeDef->subtypes = xmlSchemaGetType(ctxt->schema,
-		    typeDef->ref, typeDef->refNs);
+		    typeDef->base, typeDef->baseNs);
+
 		if ((typeDef->subtypes == NULL) ||
-		    (! IS_SIMPLE_TYPE(typeDef->subtypes))) {
+		    (! WXS_IS_SIMPLE(typeDef->subtypes)))
+		{
 		    typeDef->subtypes = NULL;
 		    xmlSchemaPResCompAttrErr(ctxt,
 			XML_SCHEMAP_SRC_RESOLVE,
-			typeDef, typeDef->node,
-			"itemType", typeDef->ref, typeDef->refNs,
+			WXS_BASIC_CAST typeDef, typeDef->node,
+			"itemType", typeDef->base, typeDef->baseNs,
 			XML_SCHEMA_TYPE_SIMPLE, NULL);
 		}
 	    }
 	    return;
 	}
+    } 
+    /*
+    * The ball of letters below means, that if we have a particle
+    * which has a QName-helper component as its {term}, we want
+    * to resolve it...
+    */
+    else if ((WXS_TYPE_CONTENTTYPE(typeDef) != NULL) &&
+	((WXS_TYPE_CONTENTTYPE(typeDef))->type ==
+	    XML_SCHEMA_TYPE_PARTICLE) &&
+	(WXS_TYPE_PARTICLE_TERM(typeDef) != NULL) &&
+	((WXS_TYPE_PARTICLE_TERM(typeDef))->type ==
+	    XML_SCHEMA_EXTRA_QNAMEREF))
+    {
+	xmlSchemaQNameRefPtr ref =
+	    WXS_QNAME_CAST WXS_TYPE_PARTICLE_TERM(typeDef);
+	xmlSchemaModelGroupDefPtr groupDef;
+
+	/*
+	* URGENT TODO: Test this.
+	*/
+	WXS_TYPE_PARTICLE_TERM(typeDef) = NULL;
+	/*
+	* Resolve the MG definition reference.
+	*/
+	groupDef =
+	    WXS_MODEL_GROUPDEF_CAST xmlSchemaGetNamedComponent(ctxt->schema,
+		ref->itemType, ref->name, ref->targetNamespace);
+	if (groupDef == NULL) {
+	    xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE,
+		NULL, WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)),
+		"ref", ref->name, ref->targetNamespace, ref->itemType,
+		NULL);
+	    /* Remove the particle. */
+	    WXS_TYPE_CONTENTTYPE(typeDef) = NULL;
+	} else if (WXS_MODELGROUPDEF_MODEL(groupDef) == NULL)
+	    /* Remove the particle. */
+	    WXS_TYPE_CONTENTTYPE(typeDef) = NULL;
+	else {
+	    /*
+	    * Assign the MG definition's {model group} to the
+	    * particle's {term}.
+	    */
+	    WXS_TYPE_PARTICLE_TERM(typeDef) = WXS_MODELGROUPDEF_MODEL(groupDef);
+	    
+	    if (WXS_MODELGROUPDEF_MODEL(groupDef)->type == XML_SCHEMA_TYPE_ALL) {
+		/*
+		* SPEC cos-all-limited (1.2)
+		* "1.2 the {term} property of a particle with
+		* {max occurs}=1 which is part of a pair which constitutes
+		* the {content type} of a complex type definition."
+		*/
+		if ((WXS_TYPE_PARTICLE(typeDef))->maxOccurs != 1) {
+		    xmlSchemaCustomErr(ACTXT_CAST ctxt,
+			/* TODO: error code */
+			XML_SCHEMAP_COS_ALL_LIMITED,
+			WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)), NULL,
+			"The particle's {max occurs} must be 1, since the "
+			"reference resolves to an 'all' model group",
+			NULL, NULL);
+		}
+	    }
+	}
     }
 }
 
@@ -14278,26 +15022,26 @@
 	*/
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_ST_PROPS_CORRECT_1,
-	    NULL, type, NULL,
+	    WXS_BASIC_CAST type, NULL,
 	    "No base type existent", NULL);
 	return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
 
     }
-    if (! IS_SIMPLE_TYPE(baseType)) {
+    if (! WXS_IS_SIMPLE(baseType)) {
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_ST_PROPS_CORRECT_1,
-	    NULL, type, NULL,
+	    WXS_BASIC_CAST type, NULL,
 	    "The base type '%s' is not a simple type",
 	    xmlSchemaGetComponentQName(&str, baseType));
 	FREE_AND_NULL(str)
 	return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
     }
-    if ( (VARIETY_LIST(type) || VARIETY_UNION(type)) &&
+    if ( (WXS_IS_LIST(type) || WXS_IS_UNION(type)) &&
 	 (WXS_IS_RESTRICTION(type) == 0) &&
-	 (! IS_ANY_SIMPLE_TYPE(baseType))) {
+	 (! WXS_IS_ANY_SIMPLE_TYPE(baseType))) {
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_ST_PROPS_CORRECT_1,
-	    NULL, type, NULL,
+	    WXS_BASIC_CAST type, NULL,
 	    "A type, derived by list or union, must have"
 	    "the simple ur-type definition as base type, not '%s'",
 	    xmlSchemaGetComponentQName(&str, baseType));
@@ -14307,11 +15051,11 @@
     /*
     * Variety: One of {atomic, list, union}.
     */
-    if ((! VARIETY_ATOMIC(type)) && (! VARIETY_UNION(type)) &&
-	(! VARIETY_LIST(type))) {
+    if ((! WXS_IS_ATOMIC(type)) && (! WXS_IS_UNION(type)) &&
+	(! WXS_IS_LIST(type))) {
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_ST_PROPS_CORRECT_1,
-	    NULL, type, NULL,
+	    WXS_BASIC_CAST type, NULL,
 	    "The variety is absent", NULL);
 	return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
     }
@@ -14324,7 +15068,7 @@
 	XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
 	xmlSchemaPCustomErr(ctxt,
 	    XML_SCHEMAP_ST_PROPS_CORRECT_3,
-	    NULL, type, NULL,
+	    WXS_BASIC_CAST type, NULL,
 	    "The 'final' of its base type '%s' must not contain "
 	    "'restriction'",
 	    xmlSchemaGetComponentQName(&str, baseType));
@@ -14369,16 +15113,16 @@
 	return (-1);
     }
 
-    if (VARIETY_ATOMIC(type)) {
+    if (WXS_IS_ATOMIC(type)) {
 	xmlSchemaTypePtr primitive;
 	/*
 	* 1.1 The {base type definition} must be an atomic simple
 	* type definition or a built-in primitive datatype.
 	*/
-	if (! VARIETY_ATOMIC(type->baseType)) {
+	if (! WXS_IS_ATOMIC(type->baseType)) {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_COS_ST_RESTRICTS_1_1,
-		NULL, type, NULL,
+		WXS_BASIC_CAST type, NULL,
 		"The base type '%s' is not an atomic simple type",
 		xmlSchemaGetComponentQName(&str, type->baseType));
 	    FREE_AND_NULL(str)
@@ -14392,7 +15136,7 @@
 	    XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_COS_ST_RESTRICTS_1_2,
-		NULL, type, NULL,
+		WXS_BASIC_CAST type, NULL,
 		"The final of its base type '%s' must not contain 'restriction'",
 		xmlSchemaGetComponentQName(&str, type->baseType));
 	    FREE_AND_NULL(str)
@@ -14420,7 +15164,7 @@
 		    ok = 0;
 		    xmlSchemaPIllegalFacetAtomicErr(pctxt,
 			XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1,
-			NULL, type, primitive, facet);
+			type, primitive, facet);
 		}
 		facet = facet->next;
 	    } while (facet != NULL);
@@ -14436,40 +15180,40 @@
 	* NOTE (1.3.2) Facet derivation constraints are currently handled in
 	* xmlSchemaDeriveAndValidateFacets()
 	*/
-    } else if (VARIETY_LIST(type)) {
+    } else if (WXS_IS_LIST(type)) {
 	xmlSchemaTypePtr itemType = NULL;
 
 	itemType = type->subtypes;
-	if ((itemType == NULL) || (! IS_SIMPLE_TYPE(itemType))) {
+	if ((itemType == NULL) || (! WXS_IS_SIMPLE(itemType))) {
 	    PERROR_INT("xmlSchemaCheckCOSSTRestricts",
 		"failed to evaluate the item type");
 	    return (-1);
 	}
-	if (IS_NOT_TYPEFIXED(itemType))
-	    xmlSchemaTypeFixup(itemType, pctxt);
+	if (WXS_IS_TYPE_NOT_FIXED(itemType))
+	    xmlSchemaTypeFixup(itemType, ACTXT_CAST pctxt);
 	/*
 	* 2.1 The {item type definition} must have a {variety} of atomic or
 	* union (in which case all the {member type definitions}
 	* must be atomic).
 	*/
-	if ((! VARIETY_ATOMIC(itemType)) &&
-	    (! VARIETY_UNION(itemType))) {
+	if ((! WXS_IS_ATOMIC(itemType)) &&
+	    (! WXS_IS_UNION(itemType))) {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_COS_ST_RESTRICTS_2_1,
-		NULL, type, NULL,
+		WXS_BASIC_CAST type, NULL,
 		"The item type '%s' does not have a variety of atomic or union",
 		xmlSchemaGetComponentQName(&str, itemType));
 	    FREE_AND_NULL(str)
 	    return (XML_SCHEMAP_COS_ST_RESTRICTS_2_1);
-	} else if (VARIETY_UNION(itemType)) {
+	} else if (WXS_IS_UNION(itemType)) {
 	    xmlSchemaTypeLinkPtr member;
 
 	    member = itemType->memberTypes;
 	    while (member != NULL) {
-		if (! VARIETY_ATOMIC(member->type)) {
+		if (! WXS_IS_ATOMIC(member->type)) {
 		    xmlSchemaPCustomErr(pctxt,
 			XML_SCHEMAP_COS_ST_RESTRICTS_2_1,
-			NULL, type, NULL,
+			WXS_BASIC_CAST type, NULL,
 			"The item type is a union type, but the "
 			"member type '%s' of this item type is not atomic",
 			xmlSchemaGetComponentQName(&str, member->type));
@@ -14480,7 +15224,7 @@
 	    }
 	}
 
-	if (IS_ANY_SIMPLE_TYPE(type->baseType)) {
+	if (WXS_IS_ANY_SIMPLE_TYPE(type->baseType)) {
 	    xmlSchemaFacetPtr facet;
 	    /*
 	    * This is the case if we have: <simpleType><list ..
@@ -14494,7 +15238,7 @@
 		XML_SCHEMAS_TYPE_FINAL_LIST)) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "The final of its item type '%s' must not contain 'list'",
 		    xmlSchemaGetComponentQName(&str, itemType));
 		FREE_AND_NULL(str)
@@ -14512,7 +15256,7 @@
 		    if (facet->type != XML_SCHEMA_FACET_WHITESPACE) {
 			xmlSchemaPIllegalFacetListUnionErr(pctxt,
 			    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2,
-			    NULL, type, facet);
+			    type, facet);
 			return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2);
 		    }
 		    facet = facet->next;
@@ -14534,10 +15278,10 @@
 	    * 2.3.2
 	    * 2.3.2.1 The {base type definition} must have a {variety} of list.
 	    */
-	    if (! VARIETY_LIST(type->baseType)) {
+	    if (! WXS_IS_LIST(type->baseType)) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "The base type '%s' must be a list type",
 		    xmlSchemaGetComponentQName(&str, type->baseType));
 		FREE_AND_NULL(str)
@@ -14551,7 +15295,7 @@
 		XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "The 'final' of the base type '%s' must not contain 'restriction'",
 		    xmlSchemaGetComponentQName(&str, type->baseType));
 		FREE_AND_NULL(str)
@@ -14566,18 +15310,18 @@
 		xmlSchemaTypePtr baseItemType;
 
 		baseItemType = type->baseType->subtypes;
-		if ((baseItemType == NULL) || (! IS_SIMPLE_TYPE(baseItemType))) {
+		if ((baseItemType == NULL) || (! WXS_IS_SIMPLE(baseItemType))) {
 		    PERROR_INT("xmlSchemaCheckCOSSTRestricts",
 			"failed to eval the item type of a base type");
 		    return (-1);
 		}
 		if ((itemType != baseItemType) &&
-		    (xmlSchemaCheckCOSSTDerivedOK(itemType,
+		    (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, itemType,
 			baseItemType, 0) != 0)) {
 		    xmlChar *strBIT = NULL, *strBT = NULL;
 		    xmlSchemaPCustomErrExt(pctxt,
 			XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3,
-			NULL, type, NULL,
+			WXS_BASIC_CAST type, NULL,
 			"The item type '%s' is not validly derived from "
 			"the item type '%s' of the base type '%s'",
 			xmlSchemaGetComponentQName(&str, itemType),
@@ -14615,7 +15359,7 @@
 			default: {
 			    xmlSchemaPIllegalFacetListUnionErr(pctxt,
 				XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4,
-				NULL, type, facet);
+				type, facet);
 			    /*
 			    * We could return, but it's nicer to report all
 			    * invalid facets.
@@ -14635,7 +15379,7 @@
 		*/
 	    }
 	}
-    } else if (VARIETY_UNION(type)) {
+    } else if (WXS_IS_UNION(type)) {
 	/*
 	* 3.1 The {member type definitions} must all have {variety} of
 	* atomic or list.
@@ -14644,14 +15388,14 @@
 
 	member = type->memberTypes;
 	while (member != NULL) {
-	    if (IS_NOT_TYPEFIXED(member->type))
-		xmlSchemaTypeFixup(member->type, pctxt);
+	    if (WXS_IS_TYPE_NOT_FIXED(member->type))
+		xmlSchemaTypeFixup(member->type, ACTXT_CAST pctxt);
 
-	    if ((! VARIETY_ATOMIC(member->type)) &&
-		(! VARIETY_LIST(member->type))) {
+	    if ((! WXS_IS_ATOMIC(member->type)) &&
+		(! WXS_IS_LIST(member->type))) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_COS_ST_RESTRICTS_3_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "The member type '%s' is neither an atomic, nor a list type",
 		    xmlSchemaGetComponentQName(&str, member->type));
 		FREE_AND_NULL(str)
@@ -14674,7 +15418,7 @@
 		    XML_SCHEMAS_TYPE_FINAL_UNION)) {
 		    xmlSchemaPCustomErr(pctxt,
 			XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1,
-			NULL, type, NULL,
+			WXS_BASIC_CAST type, NULL,
 			"The 'final' of member type '%s' contains 'union'",
 			xmlSchemaGetComponentQName(&str, member->type));
 		    FREE_AND_NULL(str)
@@ -14688,7 +15432,7 @@
 	    if (type->facetSet != NULL) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "No facets allowed", NULL);
 		return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2);
 	    }
@@ -14697,10 +15441,10 @@
 	    * 3.3.2.1 The {base type definition} must have a {variety} of union.
 	    * I.e. the variety of "list" is inherited.
 	    */
-	    if (! VARIETY_UNION(type->baseType)) {
+	    if (! WXS_IS_UNION(type->baseType)) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "The base type '%s' is not a union type",
 		    xmlSchemaGetComponentQName(&str, type->baseType));
 		FREE_AND_NULL(str)
@@ -14713,7 +15457,7 @@
 		XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "The 'final' of its base type '%s' must not contain 'restriction'",
 		    xmlSchemaGetComponentQName(&str, type->baseType));
 		FREE_AND_NULL(str)
@@ -14753,13 +15497,13 @@
 			    "different number of member types in base");
 			}
 			if ((member->type != baseMember->type) &&
-			    (xmlSchemaCheckCOSSTDerivedOK(
+			    (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt,
 				member->type, baseMember->type, 0) != 0)) {
 			    xmlChar *strBMT = NULL, *strBT = NULL;
 
 			    xmlSchemaPCustomErrExt(pctxt,
 				XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3,
-				NULL, type, NULL,
+				WXS_BASIC_CAST type, NULL,
 				"The member type %s is not validly "
 				"derived from its corresponding member "
 				"type %s of the base type %s",
@@ -14790,7 +15534,7 @@
 			(facet->type != XML_SCHEMA_FACET_ENUMERATION)) {
 			xmlSchemaPIllegalFacetListUnionErr(pctxt,
 				XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4,
-				NULL, type, facet);
+				type, facet);
 			ok = 0;
 		    }
 		    facet = facet->next;
@@ -14842,14 +15586,14 @@
 	/*
 	* 
 	*/
-    } else if (VARIETY_LIST(type)) {
+    } else if (WXS_IS_LIST(type)) {
 	/* src-simple-type.3 "If the <list> alternative is chosen, either it must have
 	* an itemType [attribute] or a <simpleType> among its [children],
 	* but not both."
 	*
 	* NOTE: This is checked in the parse function of <list>.
 	*/
-    } else if (VARIETY_UNION(type)) {	
+    } else if (WXS_IS_UNION(type)) {	
 	/* 
 	* src-simple-type.4 is checked in xmlSchemaCheckUnionTypeDefCircular().
 	*/
@@ -14873,7 +15617,9 @@
 	}
 	/* TODO: Pass user data. */
 	xmlSchemaSetValidErrors(ctxt->vctxt,
-	    ctxt->error, ctxt->warning, ctxt->userData);
+	    ctxt->error, ctxt->warning, ctxt->errCtxt);
+	xmlSchemaSetValidStructuredErrors(ctxt->vctxt,
+	    ctxt->serror, ctxt->errCtxt);
     }
     return (0);
 }
@@ -14919,7 +15665,7 @@
     * For a string to be a valid default with respect to a type
     * definition the appropriate case among the following must be true:
     */
-    if IS_COMPLEX_TYPE(type) {
+    if WXS_IS_COMPLEX(type) {
 	/*
 	* Complex type.
 	*
@@ -14929,12 +15675,12 @@
 	* type}'s particle must be ·emptiable· as defined by
 	* Particle Emptiable (§3.9.6)."
 	*/
-	if ((! HAS_SIMPLE_CONTENT(type)) &&
-	    ((! HAS_MIXED_CONTENT(type)) || (! IS_PARTICLE_EMPTIABLE(type)))) {
+	if ((! WXS_HAS_SIMPLE_CONTENT(type)) &&
+	    ((! WXS_HAS_MIXED_CONTENT(type)) || (! WXS_EMPTIABLE(type)))) {
 	    /* NOTE that this covers (2.2.2) as well. */
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_COS_VALID_DEFAULT_2_1,
-		NULL, type, type->node,
+		WXS_BASIC_CAST type, type->node,
 		"For a string to be a valid default, the type definition "
 		"must be a simple type or a complex type with mixed content "
 		"and a particle emptiable", NULL);
@@ -14952,10 +15698,10 @@
     * string must be ·valid· with respect to that simple type definition
     * as defined by String Valid (§3.14.4).
     */
-    if (IS_SIMPLE_TYPE(type))
+    if (WXS_IS_SIMPLE(type))
 	ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
 	    type, value, val, 1, 1, 0);
-    else if (HAS_SIMPLE_CONTENT(type))
+    else if (WXS_HAS_SIMPLE_CONTENT(type))
 	ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
 	    type->contentTypeDef, value, val, 1, 1, 0);
     else
@@ -14995,17 +15741,17 @@
     * Sub-components (§5.3)."
     */
     if ((type->baseType != NULL) &&
-	(IS_SIMPLE_TYPE(type->baseType)) &&
+	(WXS_IS_SIMPLE(type->baseType)) &&
 	(WXS_IS_EXTENSION(type) == 0)) {
 	/*
 	* SPEC (2) "If the {base type definition} is a simple type definition,
 	* the {derivation method} must be extension."
 	*/
-	xmlSchemaPCustomErr(pctxt,
+	xmlSchemaCustomErr(ACTXT_CAST pctxt,
 	    XML_SCHEMAP_SRC_CT_1,
-	    NULL, type, NULL,
+	    NULL, WXS_BASIC_CAST type, 
 	    "If the base type is a simple type, the derivation method must be "
-	    "'extension'", NULL);
+	    "'extension'", NULL, NULL);
 	return (XML_SCHEMAP_SRC_CT_1);
     }
     /*
@@ -15014,15 +15760,91 @@
     * definition by repeatedly following the {base type definition}."
     *
     * NOTE (3) is done in xmlSchemaCheckTypeDefCircular().
-    *
-    * SPEC (4) "Two distinct attribute declarations in the {attribute uses}
-    * must not have identical {name}s and {target namespace}s."
-    * SPEC (5) "Two distinct attribute declarations in the {attribute uses}
-    * must not have {type definition}s which are or are derived from ID."
-    *
-    * NOTE (4) and (5) are done in xmlSchemaBuildAttributeValidation().
     */
+    /*
+    * NOTE that (4) and (5) need the following:
+    *   - attribute uses need to be already inherited (apply attr. prohibitions)
+    *   - attribute group references need to be expanded already
+    *   - simple types need to be typefixed already
+    */    
+    if (type->attrUses &&
+	(((xmlSchemaItemListPtr) type->attrUses)->nbItems > 1))
+    {
+	xmlSchemaItemListPtr uses = (xmlSchemaItemListPtr) type->attrUses;
+	xmlSchemaAttributeUsePtr use, tmp;
+	int i, j, hasId = 0;
+
+	for (i = uses->nbItems -1; i >= 0; i--) {
+	    use = uses->items[i];
+	    
+	    /* 
+	    * SPEC ct-props-correct
+	    * (4) "Two distinct attribute declarations in the
+	    * {attribute uses} must not have identical {name}s and
+	    * {target namespace}s."
+	    */
+	    if (i > 0) {
+		for (j = i -1; j >= 0; j--) {
+		    tmp = uses->items[j];
+		    if ((WXS_ATTRUSE_DECL_NAME(use) ==
+			WXS_ATTRUSE_DECL_NAME(tmp)) &&
+			(WXS_ATTRUSE_DECL_TNS(use) ==
+			WXS_ATTRUSE_DECL_TNS(tmp)))
+		    {
+			xmlChar *str = NULL;
+
+			xmlSchemaCustomErr(ACTXT_CAST pctxt,
+			    XML_SCHEMAP_AG_PROPS_CORRECT,
+			    NULL, WXS_BASIC_CAST type,
+			    "Duplicate %s",
+			    xmlSchemaGetComponentDesignation(&str, use),
+			    NULL);
+			FREE_AND_NULL(str);
+			/*
+			* Remove the duplicate.
+			*/
+			if (xmlSchemaItemListRemove(uses, i) == -1)
+			    goto exit_failure;
+			goto next_use;
+		    }
+		}
+	    }
+	    /*
+	    * SPEC ct-props-correct
+	    * (5) "Two distinct attribute declarations in the
+	    * {attribute uses} must not have {type definition}s which
+	    * are or are derived from ID."
+	    */
+	    if (WXS_ATTRUSE_TYPEDEF(use) != NULL) {
+		if (xmlSchemaIsDerivedFromBuiltInType(
+		    WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID))
+		{		
+		    if (hasId) {
+			xmlChar *str = NULL;
+			
+			xmlSchemaCustomErr(ACTXT_CAST pctxt,
+			    XML_SCHEMAP_AG_PROPS_CORRECT,
+			    NULL, WXS_BASIC_CAST type,
+			    "There must not exist more than one attribute "
+			    "declaration of type 'xs:ID' "
+			    "(or derived from 'xs:ID'). The %s violates this "
+			    "constraint",
+			    xmlSchemaGetComponentDesignation(&str, use),
+			    NULL);
+			FREE_AND_NULL(str);
+			if (xmlSchemaItemListRemove(uses, i) == -1)
+			    goto exit_failure;
+		    }
+		    
+		    hasId = 1;
+		}
+	    }
+next_use: {}
+	}
+    }
     return (0);
+exit_failure:
+    return(-1);
 }
 
 static int
@@ -15054,7 +15876,8 @@
  * if not.
  */
 static int
-xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type,
+xmlSchemaCheckCOSCTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
+			     xmlSchemaTypePtr type,
 			     xmlSchemaTypePtr baseType,
 			     int set)
 {
@@ -15089,16 +15912,16 @@
     * SPEC (2.3.1) "D's {base type definition} must not be the ·ur-type
     * definition·."
     */
-    if (IS_ANYTYPE(type->baseType))
+    if (WXS_IS_ANYTYPE(type->baseType))
 	return (1);
 
-    if (IS_COMPLEX_TYPE(type->baseType)) {
+    if (WXS_IS_COMPLEX(type->baseType)) {
 	/*
 	* SPEC (2.3.2.1) "If D's {base type definition} is complex, then it
 	* must be validly derived from B given the subset as defined by this
 	* constraint."
 	*/
-	return (xmlSchemaCheckCOSCTDerivedOK(type->baseType,
+	return (xmlSchemaCheckCOSCTDerivedOK(actxt, type->baseType,
 	    baseType, set));
     } else {
 	/*
@@ -15106,7 +15929,8 @@
 	* must be validly derived from B given the subset as defined in Type
 	* Derivation OK (Simple) (§3.14.6).
 	*/
-	return (xmlSchemaCheckCOSSTDerivedOK(type->baseType, baseType, set));
+	return (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType,
+	    baseType, set));
     }
 }
 
@@ -15123,14 +15947,15 @@
  * Returns 0 on success, an positive error code otherwise.
  */
 static int
-xmlSchemaCheckCOSDerivedOK(xmlSchemaTypePtr type,
+xmlSchemaCheckCOSDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
+			   xmlSchemaTypePtr type,
 			   xmlSchemaTypePtr baseType,
 			   int set)
 {
-    if (IS_SIMPLE_TYPE(type))
-	return (xmlSchemaCheckCOSSTDerivedOK(type, baseType, set));
+    if (WXS_IS_SIMPLE(type))
+	return (xmlSchemaCheckCOSSTDerivedOK(actxt, type, baseType, set));
     else
-	return (xmlSchemaCheckCOSCTDerivedOK(type, baseType, set));
+	return (xmlSchemaCheckCOSCTDerivedOK(actxt, type, baseType, set));
 }
 
 /**
@@ -15145,7 +15970,7 @@
  * STATUS:
  *   missing:
  *     (1.5)
- *     (1.4.3.2.2.2) "Particle Valid (Extension)", which is not really needed.
+ *     (1.4.3.2.2.2) "Particle Valid (Extension)"
  *
  * Returns 0 if the constraints are satisfied, a positive
  * error code if not and -1 if an internal error occured.
@@ -15163,7 +15988,7 @@
     * SPEC (1) "If the {base type definition} is a complex type definition,
     * then all of the following must be true:"
     */
-    if (IS_COMPLEX_TYPE(base)) {
+    if (WXS_IS_COMPLEX(base)) {	
 	/*
 	* SPEC (1.1) "The {final} of the {base type definition} must not
 	* contain extension."
@@ -15171,12 +15996,21 @@
 	if (base->flags & XML_SCHEMAS_TYPE_FINAL_EXTENSION) {
 	    xmlSchemaPCustomErr(ctxt,
 		XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-		NULL, type, NULL,
+		WXS_BASIC_CAST type, NULL,
 		"The 'final' of the base type definition "
 		"contains 'extension'", NULL);
 	    return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
 	}
+	
 	/*
+	* ATTENTION: The constrains (1.2) and (1.3) are not applied,
+	* since they are automatically satisfied through the
+	* inheriting mechanism.
+	* Note that even if redefining components, the inheriting mechanism
+	* is used.
+	*/
+#if 0
+	/*
 	* SPEC (1.2) "Its {attribute uses} must be a subset of the {attribute
 	* uses}
 	* of the complex type definition itself, that is, for every attribute
@@ -15185,22 +16019,89 @@
 	* type definition itself whose {attribute declaration} has the same
 	* {name}, {target namespace} and {type definition} as its attribute
 	* declaration"
-	*
-	* NOTE (1.2): This will be already satisfied by the way the attribute
-	* uses are extended in xmlSchemaBuildAttributeValidation(); thus this
-	* check is not needed.
 	*/
+	if (base->attrUses != NULL) {
+	    int i, j, found;
+	    xmlSchemaAttributeUsePtr use, buse;
 
+	    for (i = 0; i < (WXS_LIST_CAST base->attrUses)->nbItems; i ++) {
+		buse = (WXS_LIST_CAST base->attrUses)->items[i];
+		found = 0;
+		if (type->attrUses != NULL) {
+		    use = (WXS_LIST_CAST type->attrUses)->items[j];
+		    for (j = 0; j < (WXS_LIST_CAST type->attrUses)->nbItems; j ++)
+		    {
+			if ((WXS_ATTRUSE_DECL_NAME(use) ==
+				WXS_ATTRUSE_DECL_NAME(buse)) &&
+			    (WXS_ATTRUSE_DECL_TNS(use) ==
+				WXS_ATTRUSE_DECL_TNS(buse)) &&
+			    (WXS_ATTRUSE_TYPEDEF(use) ==
+				WXS_ATTRUSE_TYPEDEF(buse))
+			{
+			    found = 1;
+			    break;
+			}
+		    }
+		}
+		if (! found) {
+		    xmlChar *str = NULL;
+		
+		    xmlSchemaCustomErr(ACTXT_CAST ctxt,
+			XML_SCHEMAP_COS_CT_EXTENDS_1_2,
+			NULL, WXS_BASIC_CAST type,
+			/* 
+			* TODO: The report does not indicate that also the
+			* type needs to be the same.
+			*/
+			"This type is missing a matching correspondent "
+			"for its {base type}'s %s in its {attribute uses}",
+			xmlSchemaGetComponentDesignation(&str,
+			    buse->children),
+			NULL);
+		    FREE_AND_NULL(str)
+		}
+	    }
+	}
 	/*
 	* SPEC (1.3) "If it has an {attribute wildcard}, the complex type
 	* definition must also have one, and the base type definition's
 	* {attribute  wildcard}'s {namespace constraint} must be a subset
 	* of the complex  type definition's {attribute wildcard}'s {namespace
 	* constraint}, as defined by Wildcard Subset (§3.10.6)."
-	*
-	* NOTE (1.3) This is already checked in
-	* xmlSchemaBuildAttributeValidation; thus this check is not needed.
-	*
+	*/
+  
+	/*
+	* MAYBE TODO: Enable if ever needed. But this will be needed only
+	* if created the type via a schema construction API.
+	*/
+	if (base->attributeWildcard != NULL) {
+	    if (type->attributeWilcard == NULL) {
+		xmlChar *str = NULL;
+		
+		xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		    XML_SCHEMAP_COS_CT_EXTENDS_1_3,
+		    NULL, type,
+		    "The base %s has an attribute wildcard, "
+		    "but this type is missing an attribute wildcard",
+		    xmlSchemaGetComponentDesignation(&str, base));
+		FREE_AND_NULL(str)
+
+	    } else if (xmlSchemaCheckCOSNSSubset(
+		base->attributeWildcard, type->attributeWildcard))
+	    {
+		xmlChar *str = NULL;
+		
+		xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		    XML_SCHEMAP_COS_CT_EXTENDS_1_3,
+		    NULL, type,
+		    "The attribute wildcard is not a valid "
+		    "superset of the one in the base %s",
+		    xmlSchemaGetComponentDesignation(&str, base));
+		FREE_AND_NULL(str)
+	    }
+	}
+#endif
+	/*
 	* SPEC (1.4) "One of the following must be true:"
 	*/
 	if ((type->contentTypeDef != NULL) &&
@@ -15230,7 +16131,7 @@
 		*/
 		xmlSchemaPCustomErr(ctxt,
 		    XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "The content type must specify a particle", NULL);
 		return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
 	    }
@@ -15256,13 +16157,13 @@
 		    */
 		    xmlSchemaPCustomErr(ctxt,
 			XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-			NULL, type, NULL,
+			WXS_BASIC_CAST type, NULL,
 			"The content type of both, the type and its base "
 			"type, must either 'mixed' or 'element-only'", NULL);
 		    return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
 		}
 		/*
-		* FUTURE TODO SPEC (1.4.3.2.2.2) "The particle of the
+		* URGENT TODO SPEC (1.4.3.2.2.2) "The particle of the
 		* complex type definition must be a ·valid extension·
 		* of the {base type definition}'s particle, as defined
 		* in Particle Valid (Extension) (§3.9.6)."
@@ -15271,10 +16172,11 @@
 		* since it is ensured by the derivation process in
 		* xmlSchemaTypeFixup(). We need to implement this when heading
 		* for a construction API
+		* TODO: !! This is needed to be checked if redefining a type !!
 		*/
 	    }
 	    /*
-	    * TODO (1.5)
+	    * URGENT TODO (1.5)
 	    */
 	}
     } else {
@@ -15289,7 +16191,7 @@
 	    */
 	    xmlSchemaPCustomErr(ctxt,
 		XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-		NULL, type, NULL,
+		WXS_BASIC_CAST type, NULL,
 		"The content type must be the simple base type", NULL);
 	    return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
 	}
@@ -15301,7 +16203,7 @@
 	    */
 	    xmlSchemaPCustomErr(ctxt,
 		XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-		NULL, type, NULL,
+		WXS_BASIC_CAST type, NULL,
 		"The 'final' of the base type definition "
 		"contains 'extension'", NULL);
 	    return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
@@ -15321,8 +16223,12 @@
  *
  * STATUS:
  *   missing:
- *     (5.4.2), (5.2.2.1)
+ *     (5.4.2) ???
  *
+ * ATTENTION:
+ * In XML Schema 1.1 this will be:
+ * Validation Rule: Checking complex type subsumption
+ *
  * Returns 0 if the constraints are satisfied, a positive
  * error code if not and -1 if an internal error occured.
  */
@@ -15333,25 +16239,45 @@
     xmlSchemaTypePtr base;
 
     /*
-    * TODO: Correct the error code; XML_SCHEMAP_COS_CT_EXTENDS_1_1 is used
+    * TODO: Correct the error code; XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 is used
     * temporarily only.
     */
     base = type->baseType;
+    if (! WXS_IS_COMPLEX(base)) {
+	xmlSchemaCustomErr(ACTXT_CAST ctxt,	    
+	    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+	    type->node, WXS_BASIC_CAST type,
+	    "The base type must be a complex type", NULL, NULL);
+	return(ctxt->err);
+    }
     if (base->flags & XML_SCHEMAS_TYPE_FINAL_RESTRICTION) {
 	/*
 	* SPEC (1) "The {base type definition} must be a complex type
 	* definition whose {final} does not contain restriction."
 	*/
-	xmlSchemaPCustomErr(ctxt,
-	    XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-	    NULL, type, NULL,
+	xmlSchemaCustomErr(ACTXT_CAST ctxt,	    
+	    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+	    type->node, WXS_BASIC_CAST type,
 	    "The 'final' of the base type definition "
-	    "contains 'restriction'", NULL);
-	return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+	    "contains 'restriction'", NULL, NULL);
+	return (ctxt->err);
     }
     /*
-    * NOTE (3) and (4) are done in xmlSchemaBuildAttributeValidation().
-    *
+    * SPEC (2), (3) and (4)
+    * Those are handled in a separate function, since the
+    * same constraints are needed for redefinition of
+    * attribute groups as well.
+    */
+    if (xmlSchemaCheckDerivationOKRestriction2to4(ctxt,
+	XML_SCHEMA_ACTION_DERIVE,
+	WXS_BASIC_CAST type, WXS_BASIC_CAST base,
+	type->attrUses, base->attrUses,
+	type->attributeWildcard,
+	base->attributeWildcard) == -1)
+    {
+	return(-1);
+    }
+    /*
     * SPEC (5) "One of the following must be true:"
     */
     if (base->builtInType == XML_SCHEMAS_ANYTYPE) {
@@ -15369,14 +16295,39 @@
 	* SPEC (5.2.2) "One of the following must be true:"
 	*/
 	if ((base->contentType == XML_SCHEMA_CONTENT_SIMPLE) ||
-	    (base->contentType == XML_SCHEMA_CONTENT_BASIC)) {
+	    (base->contentType == XML_SCHEMA_CONTENT_BASIC))
+	{
+	    int err;
 	    /*
 	    * SPEC (5.2.2.1) "The {content type} of the {base type
 	    * definition} must be a simple type definition from which
 	    * the {content type} is validly derived given the empty
 	    * set as defined in Type Derivation OK (Simple) (§3.14.6)."
-	    * URGENT TODO
+	    *
+	    * ATTENTION TODO: This seems not needed if the type implicitely
+	    * derived from the base type.
+	    * 
 	    */
+	    err = xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST ctxt,
+		type->contentTypeDef, base->contentTypeDef, 0);
+	    if (err != 0) {
+		xmlChar *strA = NULL, *strB = NULL;
+
+		if (err == -1)
+		    return(-1);
+		xmlSchemaCustomErr(ACTXT_CAST ctxt,
+		    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+		    NULL, WXS_BASIC_CAST type,
+		    "The {content type} %s is not validly derived from the "
+		    "base type's {content type} %s",
+		    xmlSchemaGetComponentDesignation(&strA,
+			type->contentTypeDef),
+		    xmlSchemaGetComponentDesignation(&strB,
+			base->contentTypeDef));
+		FREE_AND_NULL(strA);
+		FREE_AND_NULL(strB);
+		return(ctxt->err);
+	    }
 	} else if ((base->contentType == XML_SCHEMA_CONTENT_MIXED) &&
 	    (xmlSchemaIsParticleEmptiable(
 		(xmlSchemaParticlePtr) base->subtypes))) {
@@ -15388,11 +16339,11 @@
 	    */
 	} else {
 	    xmlSchemaPCustomErr(ctxt,
-		XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-		NULL, type, NULL,
+		XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+		WXS_BASIC_CAST type, NULL,
 		"The content type of the base type must be either "
 		"a simple type or 'mixed' and an emptiable particle", NULL);
-	    return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+	    return (ctxt->err);
 	}
     } else if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) {
 	/*
@@ -15417,31 +16368,31 @@
 	    */
 	} else {
 	    xmlSchemaPCustomErr(ctxt,
-		XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-		NULL, type, NULL,
+		XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+		WXS_BASIC_CAST type, NULL,
 		"The content type of the base type must be either "
 		"empty or 'mixed' (or 'elements-only') and an emptiable "
 		"particle", NULL);
-	    return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+	    return (ctxt->err);
 	}
     } else if ((type->contentType == XML_SCHEMA_CONTENT_ELEMENTS) ||
-	HAS_MIXED_CONTENT(type)) {
+	WXS_HAS_MIXED_CONTENT(type)) {
 	/*
 	* SPEC (5.4.1.1) "The {content type} of the complex type definition
 	* itself must be element-only"
 	*/	 
-	if (HAS_MIXED_CONTENT(type) && (! HAS_MIXED_CONTENT(base))) {
+	if (WXS_HAS_MIXED_CONTENT(type) && (! WXS_HAS_MIXED_CONTENT(base))) {
 	    /*
 	    * SPEC (5.4.1.2) "The {content type} of the complex type
 	    * definition itself and of the {base type definition} must be
 	    * mixed"
 	    */
 	    xmlSchemaPCustomErr(ctxt,
-		XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-		NULL, type, NULL,
+		XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+		WXS_BASIC_CAST type, NULL,
 		"If the content type is 'mixed', then the content type of the "
 		"base type must also be 'mixed'", NULL);
-	    return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+	    return (ctxt->err);
 	}
 	/*
 	* SPEC (5.4.2) "The particle of the complex type definition itself
@@ -15453,10 +16404,10 @@
 	*/
     } else {
 	xmlSchemaPCustomErr(ctxt,
-	    XML_SCHEMAP_COS_CT_EXTENDS_1_1,
-	    NULL, type, NULL,
+	    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+	    WXS_BASIC_CAST type, NULL,
 	    "The type is not a valid restriction of its base type", NULL);
-	return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+	return (ctxt->err);
     }
     return (0);
 }
@@ -15513,17 +16464,17 @@
     * XML_SCHEMAP_SRC_CT_1 only yet.
     */
     base = type->baseType;
-    if (! HAS_SIMPLE_CONTENT(type)) {
+    if (! WXS_HAS_SIMPLE_CONTENT(type)) {
 	/*
 	* 1 If the <complexContent> alternative is chosen, the type definition
 	* ·resolved· to by the ·actual value· of the base [attribute]
 	* must be a complex type definition;
 	*/
-	if (! IS_COMPLEX_TYPE(base)) {
+	if (! WXS_IS_COMPLEX(base)) {
 	    xmlChar *str = NULL;
 	    xmlSchemaPCustomErr(ctxt,
 		XML_SCHEMAP_SRC_CT_1,
-		NULL, type, type->node,
+		WXS_BASIC_CAST type, type->node,
 		"If using <complexContent>, the base type is expected to be "
 		"a complex type. The base type '%s' is a simple type",
 		xmlSchemaFormatQName(&str, base->targetNamespace,
@@ -15539,7 +16490,7 @@
 	* 2.1 The type definition ·resolved· to by the ·actual value· of the
 	* base [attribute] must be one of the following:
 	*/
-	if (IS_SIMPLE_TYPE(base)) {
+	if (WXS_IS_SIMPLE(base)) {
 	    if (WXS_IS_EXTENSION(type) == 0) {
 		xmlChar *str = NULL;
 		/*
@@ -15549,7 +16500,7 @@
 		/* TODO: Change error code to ..._SRC_CT_2_1_3. */
 		xmlSchemaPCustomErr(ctxt,
 		    XML_SCHEMAP_SRC_CT_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "If using <simpleContent> and <restriction>, the base "
 		    "type must be a complex type. The base type '%s' is "
 		    "a simple type",
@@ -15569,7 +16520,7 @@
 		*/
 		if (base->contentTypeDef == NULL) {
 		    xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL,
-			NULL, type, NULL,
+			WXS_BASIC_CAST type, NULL,
 			"Internal error: xmlSchemaCheckSRCCT, "
 			"'%s', base type has no content type",
 			type->name);
@@ -15601,7 +16552,7 @@
 		    /* TODO: Change error code to ..._SRC_CT_2_2. */
 		    xmlSchemaPCustomErr(ctxt,
 			XML_SCHEMAP_SRC_CT_1,
-			NULL, type, NULL,
+			WXS_BASIC_CAST type, NULL,
 			"A <simpleType> is expected among the children "
 			"of <restriction>, if <simpleContent> is used and "
 			"the base type '%s' is a complex type",
@@ -15619,7 +16570,7 @@
 	    if (WXS_IS_RESTRICTION(type)) {
 		xmlSchemaPCustomErr(ctxt,
 		    XML_SCHEMAP_SRC_CT_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "If <simpleContent> and <restriction> is used, the "
 		    "base type must be a simple type or a complex type with "
 		    "mixed content and particle emptiable. The base type "
@@ -15629,7 +16580,7 @@
 	    } else {
 		xmlSchemaPCustomErr(ctxt,
 		    XML_SCHEMAP_SRC_CT_1,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "If <simpleContent> and <extension> is used, the "
 		    "base type must be a simple type. The base type '%s' "
 		    "is a complex type",
@@ -15650,7 +16601,7 @@
     * above for {attribute wildcard} is satisfied, the intensional
     * intersection must be expressible, as defined in Attribute Wildcard
     * Intersection (§3.10.6).
-    * NOTE (4) is done in xmlSchemaBuildAttributeValidation().
+    * NOTE (4) is done in xmlSchemaFixupTypeAttributeUses().
     */
     return (ret);
 }
@@ -15782,7 +16733,7 @@
 	set |= SUBSET_EXTENSION;
 	set |= SUBSET_LIST;
 	set |= SUBSET_UNION;
-	if (xmlSchemaCheckCOSDerivedOK(elemR->subtypes,
+	if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST ctxt, elemR->subtypes,
 	    elemB->subtypes, set) != 0)
 	    return (1);
     }
@@ -15932,8 +16883,8 @@
 {
     int ret = 0;
 
-    /*part = GET_PARTICLE(type);
-    basePart = GET_PARTICLE(base);
+    /*part = WXS_TYPE_PARTICLE(type);
+    basePart = WXS_TYPE_PARTICLE(base);
     */
 
     TODO
@@ -16049,7 +17000,7 @@
 #define FACET_RESTR_MUTUAL_ERR(fac1, fac2) \
     xmlSchemaPCustomErrExt(pctxt,      \
 	XML_SCHEMAP_INVALID_FACET_VALUE, \
-	NULL, (xmlSchemaTypePtr) fac1, fac1->node, \
+	WXS_BASIC_CAST fac1, fac1->node, \
 	"It is an error for both '%s' and '%s' to be specified on the "\
 	"same type definition", \
 	BAD_CAST xmlSchemaFacetTypeToString(fac1->type), \
@@ -16058,13 +17009,13 @@
 #define FACET_RESTR_ERR(fac1, msg) \
     xmlSchemaPCustomErr(pctxt,      \
 	XML_SCHEMAP_INVALID_FACET_VALUE, \
-	NULL, (xmlSchemaTypePtr) fac1, fac1->node, \
+	WXS_BASIC_CAST fac1, fac1->node, \
 	msg, NULL);
 
 #define FACET_RESTR_FIXED_ERR(fac) \
     xmlSchemaPCustomErr(pctxt, \
 	XML_SCHEMAP_INVALID_FACET_VALUE, \
-	NULL, (xmlSchemaTypePtr) fac, fac->node, \
+	WXS_BASIC_CAST fac, fac->node, \
 	"The base type's facet is 'fixed', thus the value must not " \
 	"differ", NULL);
 
@@ -16099,7 +17050,7 @@
 
     xmlSchemaPCustomErr(pctxt,
 	XML_SCHEMAP_INVALID_FACET_VALUE,
-	NULL, (xmlSchemaTypePtr) facet1, facet1->node,
+	WXS_BASIC_CAST facet1, NULL,
 	(const char *) msg, NULL);
 
     if (msg != NULL)
@@ -16127,7 +17078,7 @@
 	bfmaxlen = NULL, bfminlen = NULL, /* facets of the base type */
 	bfmininc = NULL, bfmaxinc = NULL,
 	bfminexc = NULL, bfmaxexc = NULL;
-    int res, err = 0, fixedErr;
+    int res; /* err = 0, fixedErr; */
 
     /*
     * SPEC st-restrict-facets 1:
@@ -16211,7 +17162,6 @@
 		break;
 	}
     }
-    err = 0;
     /*
     * length and minLength or maxLength (2.2) + (3.2)
     */
@@ -16593,8 +17543,8 @@
 	* Search for a duplicate facet in the current type.
 	*/
 	link = type->facetSet;
-	err = 0;
-	fixedErr = 0;
+	/* err = 0; */
+	/* fixedErr = 0; */
 	while (link != NULL) {
 	    facet = link->facet;
 	    if (facet->type == bfacet->type) {
@@ -16661,14 +17611,18 @@
     * The actual value is then formed by replacing any union type
     * definition in the ·explicit members· with the members of their
     * {member type definitions}, in order.
+    *
+    * TODO: There's a bug entry at
+    * "http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0287.html"
+    * which indicates that we'll keep the union types the future.
     */
     link = type->memberTypes;
     while (link != NULL) {
 
-	if (IS_NOT_TYPEFIXED(link->type))
-	    xmlSchemaTypeFixup(link->type, pctxt);
+	if (WXS_IS_TYPE_NOT_FIXED(link->type))
+	    xmlSchemaTypeFixup(link->type, ACTXT_CAST pctxt);
 
-	if (VARIETY_UNION(link->type)) {
+	if (WXS_IS_UNION(link->type)) {
 	    subLink = xmlSchemaGetUnionSimpleTypeMemberTypes(link->type);
 	    if (subLink != NULL) {
 		link->type = subLink->type;
@@ -16740,7 +17694,7 @@
     if (has)
 	type->flags |= XML_SCHEMAS_TYPE_HAS_FACETS;
 
-    if (has && (! needVal) && VARIETY_ATOMIC(type)) {
+    if (has && (! needVal) && WXS_IS_ATOMIC(type)) {
 	xmlSchemaTypePtr prim = xmlSchemaGetPrimitiveType(type);
 	/*
 	* OPTIMIZE VAL TODO: Some facets need a computed value.
@@ -16760,10 +17714,10 @@
     /*
     * Evaluate the whitespace-facet value.
     */    
-    if (VARIETY_LIST(type)) {
+    if (WXS_IS_LIST(type)) {
 	type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE;
 	return (0);
-    } else if (VARIETY_UNION(type))
+    } else if (WXS_IS_UNION(type))
 	return (0);
     
     if (type->facetSet != NULL) {
@@ -16813,7 +17767,6 @@
 		break;
 	    }
 	}
-	return (0);
     }
     return (0);
 }
@@ -16824,11 +17777,11 @@
 {
     if (type->type != XML_SCHEMA_TYPE_SIMPLE)
 	return(0);
-    if (! TYPE_IS_NOT_FIXEDUP_1(type))
+    if (! WXS_IS_TYPE_NOT_FIXED_1(type))
 	return(0);
     type->flags |= XML_SCHEMAS_TYPE_FIXUP_1;
 
-    if (VARIETY_LIST(type)) {
+    if (WXS_IS_LIST(type)) {
 	/*
 	* Corresponds to <simpleType><list>...
 	*/
@@ -16840,7 +17793,7 @@
 		"list type has no item-type assigned");
 	    return(-1);
 	}
-    } else if (VARIETY_UNION(type)) {
+    } else if (WXS_IS_UNION(type)) {
 	/*
 	* Corresponds to <simpleType><union>...
 	*/	
@@ -16861,7 +17814,7 @@
 		"type has no base-type assigned");
 	    return(-1);
 	}
-	if (TYPE_IS_NOT_FIXEDUP_1(type->baseType))
+	if (WXS_IS_TYPE_NOT_FIXED_1(type->baseType))
 	    if (xmlSchemaFixupSimpleTypeStageOne(pctxt, type->baseType) == -1)
 		return(-1);
 	/*
@@ -16869,15 +17822,15 @@
 	* If the <restriction> alternative is chosen, then the
 	* {variety} of the {base type definition}.
 	*/
-	if (VARIETY_ATOMIC(type->baseType))
+	if (WXS_IS_ATOMIC(type->baseType))
 	    type->flags |= XML_SCHEMAS_TYPE_VARIETY_ATOMIC;
-	else if (VARIETY_LIST(type->baseType)) {
+	else if (WXS_IS_LIST(type->baseType)) {
 	    type->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST;
 	    /*
 	    * Inherit the itemType.
 	    */
 	    type->subtypes = type->baseType->subtypes;
-	} else if (VARIETY_UNION(type->baseType)) {
+	} else if (WXS_IS_UNION(type->baseType)) {
 	    type->flags |= XML_SCHEMAS_TYPE_VARIETY_UNION;
 	    /*
 	    * NOTE that we won't assign the memberTypes of the base,
@@ -16902,7 +17855,7 @@
     } else {
         xmlGenericError(xmlGenericErrorContext, "Type of %s :", name);
     }
-    if ((IS_SIMPLE_TYPE(type)) || (IS_COMPLEX_TYPE(type))) {
+    if ((WXS_IS_SIMPLE(type)) || (WXS_IS_COMPLEX(type))) {
 	switch (type->contentType) {
 	    case XML_SCHEMA_CONTENT_SIMPLE:
 		xmlGenericError(xmlGenericErrorContext, "simple\n");
@@ -16954,7 +17907,7 @@
     if (type->type != XML_SCHEMA_TYPE_SIMPLE)
 	return(-1);
 
-    if (! IS_NOT_TYPEFIXED(type))
+    if (! WXS_IS_TYPE_NOT_FIXED(type))
 	return(0);
 
     type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED;
@@ -16965,11 +17918,13 @@
 	    "missing baseType");
 	goto exit_failure;
     }
-    if (IS_NOT_TYPEFIXED(type->baseType))
-	xmlSchemaTypeFixup(type->baseType, pctxt);
+    if (WXS_IS_TYPE_NOT_FIXED(type->baseType))
+	xmlSchemaTypeFixup(type->baseType, ACTXT_CAST pctxt);
     /* 
     * If a member type of a union is a union itself, we need to substitute
     * that member type for its member types.
+    * NOTE that this might change in WXS 1.1; i.e. we will keep the union
+    * types in WXS 1.1.
     */
     if ((type->memberTypes != NULL) &&
 	(xmlSchemaFinishMemberTypeDefinitionsProperty(pctxt, type) == -1))
@@ -17043,19 +17998,19 @@
     int res = 0, olderrs = pctxt->nberrors;
     xmlSchemaTypePtr baseType = type->baseType;
 
-    if (! IS_NOT_TYPEFIXED(type))
+    if (! WXS_IS_TYPE_NOT_FIXED(type))
 	return(0);
     type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED;
     if (baseType == NULL) {
-	PERROR_INT("xmlSchemaFixupSimpleTypeStageTwo",
+	PERROR_INT("xmlSchemaFixupComplexType",
 	    "missing baseType");
 	goto exit_failure;
     }    
     /*
     * Fixup the base type.
     */
-    if (IS_NOT_TYPEFIXED(baseType))
-	xmlSchemaTypeFixup(baseType, pctxt);
+    if (WXS_IS_TYPE_NOT_FIXED(baseType))
+	xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt);
     if (baseType->flags & XML_SCHEMAS_TYPE_INTERNAL_INVALID) {
 	/*
 	* Skip fixup if the base type is invalid.
@@ -17075,7 +18030,7 @@
 	/*
 	* Corresponds to <complexType><simpleContent>...
 	*/
-	if ((IS_COMPLEX_TYPE(baseType)) &&
+	if ((WXS_IS_COMPLEX(baseType)) &&
 	    (baseType->contentTypeDef != NULL) &&
 	    (WXS_IS_RESTRICTION(type))) {
 	    xmlSchemaTypePtr contentBase, content;
@@ -17117,12 +18072,12 @@
 #ifdef ENABLE_NAMED_LOCALS
 	    snprintf(buf, 29, "#scST%d", ++(pctxt->counter));
 	    tmpname = xmlDictLookup(pctxt->dict, BAD_CAST buf, -1);
-	    content = xmlSchemaAddType(pctxt,
-		pctxt->schema, tmpname, type->targetNamespace,
+	    content = xmlSchemaAddType(pctxt, pctxt->schema,
+		XML_SCHEMA_TYPE_SIMPLE, tmpname, type->targetNamespace,
 		type->node, 0);
 #else
-	    content = xmlSchemaAddType(pctxt,
-		pctxt->schema, NULL, type->targetNamespace,
+	    content = xmlSchemaAddType(pctxt, pctxt->schema,
+		XML_SCHEMA_TYPE_SIMPLE, NULL, type->targetNamespace,
 		type->node, 0);
 #endif
 	    if (content == NULL)
@@ -17143,8 +18098,8 @@
 	    type->facetSet = NULL;
 	    
 	    type->contentTypeDef = content;
-	    if (IS_NOT_TYPEFIXED(contentBase))
-		xmlSchemaTypeFixup(contentBase, pctxt);
+	    if (WXS_IS_TYPE_NOT_FIXED(contentBase))
+		xmlSchemaTypeFixup(contentBase, ACTXT_CAST pctxt);
 	    /*
 	    * Fixup the newly created type. We don't need to check
 	    * for circularity here.
@@ -17154,7 +18109,7 @@
 	    res = xmlSchemaFixupSimpleTypeStageTwo(pctxt, content);
 	    HFAILURE HERROR 
 		
-	} else if ((IS_COMPLEX_TYPE(baseType)) &&
+	} else if ((WXS_IS_COMPLEX(baseType)) &&
 	    (baseType->contentType == XML_SCHEMA_CONTENT_MIXED) &&
 	    (WXS_IS_RESTRICTION(type))) {
 	    /*
@@ -17169,14 +18124,14 @@
 		*/
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_INTERNAL,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "Internal error: xmlSchemaTypeFixup, "
 		    "complex type '%s': the <simpleContent><restriction> "
 		    "is missing a <simpleType> child, but was not catched "
 		    "by xmlSchemaCheckSRCCT()", type->name);
 		goto exit_failure;
 	    }
-	} else if ((IS_COMPLEX_TYPE(baseType)) && WXS_IS_EXTENSION(type)) {
+	} else if ((WXS_IS_COMPLEX(baseType)) && WXS_IS_EXTENSION(type)) {
 	    /*
 	    * SPEC (3) If <extension> + base is <complexType> with
 	    * <simpleType> content, "...then the {content type} of that
@@ -17189,7 +18144,7 @@
 		*/
 		xmlSchemaPCustomErr(pctxt,
 		    XML_SCHEMAP_INTERNAL,
-		    NULL, type, NULL,
+		    WXS_BASIC_CAST type, NULL,
 		    "Internal error: xmlSchemaTypeFixup, "
 		    "complex type '%s': the <extension>ed base type is "
 		    "a complex type with no simple content type",
@@ -17197,7 +18152,7 @@
 		goto exit_failure;
 	    }
 	    type->contentTypeDef = baseType->contentTypeDef;
-	} else if ((IS_SIMPLE_TYPE(baseType)) && WXS_IS_EXTENSION(type)) {
+	} else if ((WXS_IS_SIMPLE(baseType)) && WXS_IS_EXTENSION(type)) {
 	    /*
 	    * SPEC (4) <extension> + base is <simpleType>
 	    * "... then that simple type definition"
@@ -17209,7 +18164,7 @@
 	    */
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_INTERNAL,
-		NULL, type, NULL,
+		WXS_BASIC_CAST type, NULL,
 		"Internal error: xmlSchemaTypeFixup, "
 		"complex type '%s' with <simpleContent>: unhandled "
 		"derivation case", type->name);
@@ -17257,7 +18212,7 @@
 			goto exit_failure;
 		    /*
 		    * Create the model group.
-		    */
+		    */ /* URGENT TODO: avoid adding to pending items. */
 		    particle->children = (xmlSchemaTreeItemPtr)
 			xmlSchemaAddModelGroup(pctxt, pctxt->schema,
 			XML_SCHEMA_TYPE_SEQUENCE, type->node);
@@ -17322,7 +18277,47 @@
 		    * "A model group whose {compositor} is sequence and whose
 		    * {particles} are..."
 		    */
-		if (! dummySequence) {
+		if ((WXS_TYPE_PARTICLE(type) != NULL) &&
+		    (WXS_TYPE_PARTICLE_TERM(type) != NULL) &&
+		    ((WXS_TYPE_PARTICLE_TERM(type))->type ==
+			XML_SCHEMA_TYPE_ALL))
+		{
+		    /*
+		    * SPEC cos-all-limited (1)
+		    */
+		    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+			/* TODO: error code */
+			XML_SCHEMAP_COS_ALL_LIMITED,
+			WXS_ITEM_NODE(type), NULL,
+			"The type has an 'all' model group in its "
+			"{content type} and thus cannot be derived from "
+			"a non-empty type, since this would produce a "
+			"'sequence' model group containing the 'all' "
+			"model group; 'all' model groups are not "
+			"allowed to appear inside other model groups",
+			NULL, NULL);
+
+		} else if ((WXS_TYPE_PARTICLE(baseType) != NULL) &&
+		    (WXS_TYPE_PARTICLE_TERM(baseType) != NULL) &&
+		    ((WXS_TYPE_PARTICLE_TERM(baseType))->type ==
+			XML_SCHEMA_TYPE_ALL))
+		{
+		    /*
+		    * SPEC cos-all-limited (1)
+		    */
+		    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+			/* TODO: error code */
+			XML_SCHEMAP_COS_ALL_LIMITED,
+			WXS_ITEM_NODE(type), NULL,
+			"A type cannot be derived by extension from a type "
+			"which has an 'all' model group in its "
+			"{content type}, since this would produce a "
+			"'sequence' model group containing the 'all' "
+			"model group; 'all' model groups are not "
+			"allowed to appear inside other model groups",
+			NULL, NULL);
+
+		} else if (! dummySequence) {
 		    xmlSchemaTreeItemPtr effectiveContent =
 			(xmlSchemaTreeItemPtr) type->subtypes;
 		    /*
@@ -17340,7 +18335,7 @@
 			XML_SCHEMA_TYPE_SEQUENCE, type->node);
 		    if (particle->children == NULL)
 			goto exit_failure;
-		    type->subtypes = (xmlSchemaTypePtr) particle;
+		    WXS_TYPE_CONTENTTYPE(type) = (xmlSchemaTypePtr) particle;
 		    /*
 		    * SPEC "the particle of the {content type} of
 		    * the ... base ..."
@@ -17362,6 +18357,16 @@
 		    * SPEC "followed by the ·effective content·."
 		    */
 		    particle->next = effectiveContent;
+		    /*
+		    * This all will result in:
+		    * new-particle
+		    *   --> new-sequence(
+		    *         new-particle
+		    *           --> base-model,
+		    *         this-particle
+		    *	        --> this-model
+		    *	    )
+		    */
 		} else {
 		    /*
 		    * This is the case when there is already an empty
@@ -17379,17 +18384,22 @@
 	}
     }
     /*
+    * Now fixup attribute uses:
+    *   - expand attr. group references
+    *     - intersect attribute wildcards
+    *   - inherit attribute uses of the base type
+    *   - inherit or union attr. wildcards if extending
+    *   - apply attr. use prohibitions if restricting
+    */
+    res = xmlSchemaFixupTypeAttributeUses(pctxt, type);
+    HFAILURE HERROR
+    /*
     * Apply the complex type component constraints; this will not
     * check attributes, since this is done in
-    * xmlSchemaBuildAttributeValidation().
+    * xmlSchemaFixupTypeAttributeUses().
     */
     res = xmlSchemaCheckCTComponent(pctxt, type);
     HFAILURE HERROR
-    /*
-    * Inherit & check constraints for attributes.
-    */
-    res = xmlSchemaBuildAttributeValidation(pctxt, type);
-    HFAILURE HERROR
 
 #ifdef DEBUG_TYPE
     xmlSchemaDebugFixedType(pctxt, type);
@@ -17425,16 +18435,21 @@
  */
 static int
 xmlSchemaTypeFixup(xmlSchemaTypePtr type,
-                   xmlSchemaParserCtxtPtr pctxt)
+                   xmlSchemaAbstractCtxtPtr actxt)
 {
     if (type == NULL)
         return(0);
-    if (! IS_NOT_TYPEFIXED(type))
+    if (actxt->type != XML_SCHEMA_CTXT_PARSER) {
+	AERROR_INT("xmlSchemaTypeFixup",
+	    "this function needs a parser context");
+	return(-1);
+    }
+    if (! WXS_IS_TYPE_NOT_FIXED(type))
 	return(0);
     if (type->type == XML_SCHEMA_TYPE_COMPLEX)
-	return(xmlSchemaFixupComplexType(pctxt, type));
+	return(xmlSchemaFixupComplexType(PCTXT_CAST actxt, type));
     else if (type->type == XML_SCHEMA_TYPE_SIMPLE)
-	return(xmlSchemaFixupSimpleTypeStageTwo(pctxt, type));
+	return(xmlSchemaFixupSimpleTypeStageTwo(PCTXT_CAST actxt, type));
     return(0);
 }
 
@@ -17546,7 +18561,7 @@
 			xmlChar *str = NULL;
 
 			xmlSchemaCustomErr(ACTXT_CAST pctxt,
-			    ret, facet->node, (xmlSchemaTypePtr) facet,
+			    ret, facet->node, WXS_BASIC_CAST facet,
 			    "The value '%s' of the facet does not validate "
 			    "against the base type '%s'",
 			    facet->value,
@@ -17571,7 +18586,7 @@
 		/* No error message for RelaxNG. */
 		if (ctxtGiven) {
 		    xmlSchemaCustomErr(ACTXT_CAST pctxt,
-			ret, facet->node, typeDecl,
+			ret, facet->node, WXS_BASIC_CAST typeDecl,
 			"The value '%s' of the facet 'pattern' is not a "
 			"valid regular expression",
 			facet->value, NULL);
@@ -17582,33 +18597,43 @@
         case XML_SCHEMA_FACET_FRACTIONDIGITS:
         case XML_SCHEMA_FACET_LENGTH:
         case XML_SCHEMA_FACET_MAXLENGTH:
-        case XML_SCHEMA_FACET_MINLENGTH:{
+        case XML_SCHEMA_FACET_MINLENGTH:
+
+	    if (facet->type == XML_SCHEMA_FACET_TOTALDIGITS) {
 		ret = xmlSchemaValidatePredefinedType(
+		    xmlSchemaGetBuiltInType(XML_SCHEMAS_PINTEGER),
+		    facet->value, &(facet->val));
+	    } else {
+		ret = xmlSchemaValidatePredefinedType(
 		    xmlSchemaGetBuiltInType(XML_SCHEMAS_NNINTEGER),
 		    facet->value, &(facet->val));
-                if (ret != 0) {
-		    if (ret < 0) {
-			/* No error message for RelaxNG. */
-			if (ctxtGiven) {
-			    PERROR_INT("xmlSchemaCheckFacet",
-				"validating facet value");
-			}
-			goto internal_error;
-		    }
-		    ret = XML_SCHEMAP_INVALID_FACET_VALUE;
+	    }
+	    if (ret != 0) {
+		if (ret < 0) {
 		    /* No error message for RelaxNG. */
 		    if (ctxtGiven) {
-			/* error code */
-                        xmlSchemaCustomErr(ACTXT_CAST pctxt,
-			    ret, facet->node, typeDecl,
-			    "The value '%s' of the facet '%s' is not a valid "
-			    "'nonNegativeInteger'",
-			    facet->value,
-			    xmlSchemaFacetTypeToString(facet->type));
-                    }
-                }
-                break;
-            }
+			PERROR_INT("xmlSchemaCheckFacet",
+			    "validating facet value");
+		    }
+		    goto internal_error;
+		}
+		ret = XML_SCHEMAP_INVALID_FACET_VALUE;
+		/* No error message for RelaxNG. */
+		if (ctxtGiven) {
+		    /* error code */
+		    xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+			ret, facet->node, WXS_BASIC_CAST typeDecl,
+			"The value '%s' of the facet '%s' is not a valid '%s'",			
+			facet->value,
+			xmlSchemaFacetTypeToString(facet->type),
+			(facet->type != XML_SCHEMA_FACET_TOTALDIGITS) ? 
+			    BAD_CAST "nonNegativeInteger" :
+			    BAD_CAST "positiveInteger",
+			NULL);
+		}
+	    }
+	    break;
+            
         case XML_SCHEMA_FACET_WHITESPACE:{
                 if (xmlStrEqual(facet->value, BAD_CAST "preserve")) {
                     facet->whitespace = XML_SCHEMAS_FACET_PRESERVE;
@@ -17622,7 +18647,7 @@
 		    if (ctxtGiven) {
 			/* error was previously: XML_SCHEMAP_INVALID_WHITE_SPACE */
 			xmlSchemaCustomErr(ACTXT_CAST pctxt,
-			    ret, facet->node, typeDecl,
+			    ret, facet->node, WXS_BASIC_CAST typeDecl,
 			    "The value '%s' of the facet 'whitespace' is not "
 			    "valid", facet->value, NULL);
                     }
@@ -17779,7 +18804,7 @@
 	    */
 	    xmlSchemaPCustomErr(ctxt,
 		XML_SCHEMAP_MG_PROPS_CORRECT_2,
-		NULL, NULL, GET_NODE(circ),
+		NULL, WXS_ITEM_NODE(circ),
 		"Circular reference to the model group definition '%s' "
 		"defined", xmlSchemaFormatQName(&str,
 		    item->targetNamespace, item->name));
@@ -17794,114 +18819,115 @@
 }
 
 /**
- * xmlSchemaGroupDefReferenceTermFixup:
- * @item:  the particle with a model group definition as term
+ * xmlSchemaModelGroupToModelGroupDefFixup:
  * @ctxt:  the parser context
- * @name:  the name
+ * @mg:  the model group
  *
- * Checks cos-all-limited.
- *
  * Assigns the model group of model group definitions to the "term"
  * of the referencing particle.
- * In xmlSchemaResolveParticleReferences the model group definitions was assigned
- * to the "term", since needed for the circularity check. 
+ * In xmlSchemaResolveModelGroupParticleReferences the model group
+ * definitions were assigned to the "term", since needed for the
+ * circularity check.
+ *
+ * Schema Component Constraint:
+ *     All Group Limited (cos-all-limited) (1.2)
  */
 static void
-xmlSchemaGroupDefReferenceTermFixup(xmlSchemaParticlePtr item,
-			   xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
-			   const xmlChar * name ATTRIBUTE_UNUSED)
+xmlSchemaModelGroupToModelGroupDefFixup(
+    xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+    xmlSchemaModelGroupPtr mg)
 {
-    if ((item == NULL) ||
-	(item->type != XML_SCHEMA_TYPE_PARTICLE) ||
-	(item->children == NULL) ||
-	(item->children->type != XML_SCHEMA_TYPE_GROUP) ||
-	(item->children->children == NULL))
-	return;
-    item->children = item->children->children;
-    /*
-    * TODO: Not nice, but we will anchor cos-all-limited here.
-    */
-    if ((item->children->type == XML_SCHEMA_TYPE_ALL) &&
-	(item->maxOccurs != 1)) {
+    xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg);
+
+    while (particle != NULL) {
+	if ((WXS_PARTICLE_TERM(particle) == NULL) ||
+	    ((WXS_PARTICLE_TERM(particle))->type !=
+		XML_SCHEMA_TYPE_GROUP))
+	{
+	    particle = WXS_PTC_CAST particle->next;
+	    continue;
+	} 
+	if (WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle)) == NULL) {
+	    /*
+	    * TODO: Remove the particle.
+	    */
+	    WXS_PARTICLE_TERM(particle) = NULL;
+	    particle = WXS_PTC_CAST particle->next;
+	    continue;
+	}
 	/*
-	* SPEC (1.2) "the {term} property of a particle with
-	* {max occurs}=1which is part of a pair which constitutes the
-	* {content type} of a complex type definition."
+	* Assign the model group to the {term} of the particle.
 	*/
-	xmlSchemaPCustomErr(ctxt,
-	    XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3,
-	    NULL, (xmlSchemaTypePtr) item, item->node,
-	    "The particle's 'maxOccurs' must be 1, since an xs:all model "
-	    "group is its term", NULL);
+	WXS_PARTICLE_TERM(particle) =
+	    WXS_TREE_CAST WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle));
+
+	particle = WXS_PTC_CAST particle->next;
     }
 }
 
 /**
- * xmlSchemaGetCircAttrGrRef:
+ * xmlSchemaCheckAttrGroupCircularRecur:
  * @ctxtGr: the searched attribute group
  * @attr: the current attribute list to be processed
  *
  * This one is intended to be used by
- * xmlSchemaCheckSRCAttributeGroupCircular only.
+ * xmlSchemaCheckAttrGroupCircular only.
  *
  * Returns the circular attribute grou reference, otherwise NULL.
  */
-static xmlSchemaAttributeGroupPtr
-xmlSchemaGetCircAttrGrRef(xmlSchemaAttributeGroupPtr ctxtGr,
-			  xmlSchemaAttributePtr attr)
+static xmlSchemaQNameRefPtr
+xmlSchemaCheckAttrGroupCircularRecur(xmlSchemaAttributeGroupPtr ctxtGr,
+				     xmlSchemaItemListPtr list)
 {
-    xmlSchemaAttributeGroupPtr circ = NULL, gr;
-    int marked;
+    xmlSchemaAttributeGroupPtr gr;
+    xmlSchemaQNameRefPtr ref, circ;
+    int i;
     /*
     * We will search for an attribute group reference which
     * references the context attribute group.
     */
-    while (attr != NULL) {
-	marked = 0;
-	if (attr->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) {
-	    gr = (xmlSchemaAttributeGroupPtr) attr;
-	    if (gr->refItem != NULL)  {
-		if (gr->refItem == ctxtGr)
-		    return (gr);
-		else if (gr->refItem->flags &
-		    XML_SCHEMAS_ATTRGROUP_MARKED) {
-		    attr = attr->next;
-		    continue;
-		} else {
-		    /*
-		    * Mark as visited to avoid infinite recursion on
-		    * circular references not yet examined.
-		    */
-		    gr->refItem->flags |= XML_SCHEMAS_ATTRGROUP_MARKED;
-		    marked = 1;
-		}
-	    }
-	    if (gr->attributes != NULL)
-		circ = xmlSchemaGetCircAttrGrRef(ctxtGr, gr->attributes);
+    for (i = 0; i < list->nbItems; i++) {
+	ref = list->items[i];
+	if ((ref->type == XML_SCHEMA_EXTRA_QNAMEREF) &&
+	    (ref->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) &&
+	    (ref->item != NULL))
+	{
+	    gr = WXS_ATTR_GROUP_CAST ref->item;
+	    if (gr == ctxtGr)
+		return(ref);
+	    if (gr->flags & XML_SCHEMAS_ATTRGROUP_MARKED)
+		continue;	    
 	    /*
-	    * Unmark the visited group's attributes.
+	    * Mark as visited to avoid infinite recursion on
+	    * circular references not yet examined.
 	    */
-	    if (marked)
-		gr->refItem->flags ^= XML_SCHEMAS_ATTRGROUP_MARKED;
-	    if (circ != NULL)
-		return (circ);
+	    if ((gr->attrUses) &&
+		(gr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS))
+	    {
+		gr->flags |= XML_SCHEMAS_ATTRGROUP_MARKED;
+		circ = xmlSchemaCheckAttrGroupCircularRecur(ctxtGr,
+		    (xmlSchemaItemListPtr) gr->attrUses);		
+		gr->flags ^= XML_SCHEMAS_ATTRGROUP_MARKED;
+		if (circ != NULL)
+		    return (circ);
+	    }
+	    
 	}
-	attr = attr->next;
     }
     return (NULL);
 }
 
 /**
- * xmlSchemaCheckSRCAttributeGroupCircular:
+ * xmlSchemaCheckAttrGroupCircular:
  * attrGr:  the attribute group definition
  * @ctxt:  the parser context
  * @name:  the name
  *
  * Checks for circular references of attribute groups.
  */
-static void
+static int
 xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr,
-					xmlSchemaParserCtxtPtr ctxt)
+				xmlSchemaParserCtxtPtr ctxt)
 {
     /*
     * Schema Representation Constraint:
@@ -17917,124 +18943,451 @@
     * it must not be the case that a ·QName· is encountered at any depth
     * which resolves to the component corresponding to this <attributeGroup>.
     */
-    /*
-    * Only global components can be referenced.
-    */
-    if (((attrGr->flags & XML_SCHEMAS_ATTRGROUP_GLOBAL) == 0) ||
-	(attrGr->attributes == NULL))
-	return;
+    if (attrGr->attrUses == NULL)
+	return(0);
+    else if ((attrGr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS) == 0)
+	return(0);
     else {
-	xmlSchemaAttributeGroupPtr circ;
-
-	circ = xmlSchemaGetCircAttrGrRef(attrGr, attrGr->attributes);
+	xmlSchemaQNameRefPtr circ;
+	
+	circ = xmlSchemaCheckAttrGroupCircularRecur(attrGr,
+	    (xmlSchemaItemListPtr) attrGr->attrUses);	
 	if (circ != NULL) {
+	    xmlChar *str = NULL;
 	    /*
 	    * TODO: Report the referenced attr group as QName.
 	    */
 	    xmlSchemaPCustomErr(ctxt,
 		XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3,
-		NULL, NULL, circ->node,
+		NULL, WXS_ITEM_NODE(WXS_BASIC_CAST circ),
 		"Circular reference to the attribute group '%s' "
-		"defined", attrGr->name);
+		"defined", xmlSchemaGetComponentQName(&str, attrGr));
+	    FREE_AND_NULL(str);
 	    /*
 	    * NOTE: We will cut the reference to avoid further
 	    * confusion of the processor.
-	    * BADSPEC: The spec should define how to process in this case.
+	    * BADSPEC TODO: The spec should define how to process in this case.
 	    */
-	    circ->attributes = NULL;
-	    circ->refItem = NULL;
+	    circ->item = NULL;
+	    return(ctxt->err);
 	}
     }
+    return(0);
 }
 
+static int
+xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
+				  xmlSchemaAttributeGroupPtr attrGr);
+
 /**
+ * xmlSchemaExpandAttributeGroupRefs:
+ * @pctxt: the parser context
+ * @node: the node of the component holding the attribute uses
+ * @completeWild: the intersected wildcard to be returned 
+ * @list: the attribute uses
+ *
+ * Substitutes contained attribute group references
+ * for their attribute uses. Wilcards are intersected.
+ * Attribute use prohibitions are removed from the list
+ * and returned via the @prohibs list.
+ * Pointlessness of attr. prohibs, if a matching attr. decl
+ * is existent a well, are checked.
+ */
+static int
+xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
+				  xmlSchemaBasicItemPtr item,
+				  xmlSchemaWildcardPtr *completeWild,
+				  xmlSchemaItemListPtr list,
+				  xmlSchemaItemListPtr prohibs)
+{
+    xmlSchemaAttributeGroupPtr gr;
+    xmlSchemaAttributeUsePtr use;
+    xmlSchemaItemListPtr sublist;
+    int i, j;
+    int created = (*completeWild == NULL) ? 0 : 1;
+
+    if (prohibs)
+	prohibs->nbItems = 0;
+
+    for (i = 0; i < list->nbItems; i++) {
+	use = list->items[i];
+
+	if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) {	    
+	    if (prohibs == NULL) {
+		PERROR_INT("xmlSchemaExpandAttributeGroupRefs",
+		    "unexpected attr prohibition found");
+		return(-1);
+	    }
+	    /*
+	    * Remove from attribute uses.
+	    */
+	    if (xmlSchemaItemListRemove(list, i) == -1)
+		return(-1);
+	    i--;
+	    /*
+	    * Note that duplicate prohibitions were already
+	    * handled at parsing time.
+	    */	    
+	    /*
+	    * Add to list of prohibitions.
+	    */
+	    xmlSchemaItemListAddSize(prohibs, 2, use);
+	    continue;
+	}
+	if ((use->type == XML_SCHEMA_EXTRA_QNAMEREF) &&
+	    ((WXS_QNAME_CAST use)->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP))
+	{
+	    if ((WXS_QNAME_CAST use)->item == NULL)
+		return(-1);
+	    gr = WXS_ATTR_GROUP_CAST (WXS_QNAME_CAST use)->item;
+	    /*
+	    * Expand the referenced attr. group.
+	    * TODO: remove this, this is done in a previous step, so
+	    * already done here.
+	    */
+	    if ((gr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) == 0) {
+		if (xmlSchemaAttributeGroupExpandRefs(pctxt, gr) == -1)
+		    return(-1);
+	    }
+	    /*
+	    * Build the 'complete' wildcard; i.e. intersect multiple
+	    * wildcards.
+	    */
+	    if (gr->attributeWildcard != NULL) {
+		if (*completeWild == NULL) {
+		    *completeWild = gr->attributeWildcard;
+		} else {
+		    if (! created) {
+			xmlSchemaWildcardPtr tmpWild;
+
+			 /*
+			* Copy the first encountered wildcard as context,
+			* except for the annotation.
+			*
+			* Although the complete wildcard might not correspond
+			* to any node in the schema, we will anchor it on
+			* the node of the owner component.
+			*/
+			tmpWild =  xmlSchemaAddWildcard(pctxt, pctxt->schema,
+			    XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
+			    WXS_ITEM_NODE(item));
+			if (tmpWild == NULL)
+			    return(-1);
+			if (xmlSchemaCloneWildcardNsConstraints(pctxt,
+			    tmpWild, *completeWild) == -1)
+			    return (-1);
+			tmpWild->processContents = (*completeWild)->processContents;
+			*completeWild = tmpWild;
+			created = 1;
+		    }
+		    
+		    if (xmlSchemaIntersectWildcards(pctxt, *completeWild,
+			gr->attributeWildcard) == -1)
+			return(-1);
+		}
+	    }
+	    /*
+	    * Just remove the reference if the referenced group does not
+	    * contain any attribute uses.
+	    */
+	    if (gr->attrUses == NULL) {
+		if (xmlSchemaItemListRemove(list, i) == -1)
+		    return(-1);
+		i--;
+		continue;
+	    }
+	    /*
+	    * Add the attribute uses.
+	    */
+	    sublist = ((xmlSchemaItemListPtr) gr->attrUses);
+	    if (sublist->nbItems != 0) {
+		list->items[i] = sublist->items[0];
+		if (sublist->nbItems != 1) {
+		    for (j = 1; j < sublist->nbItems; j++) {
+			i++;
+			if (xmlSchemaItemListInsert(list,
+				sublist->items[j], i) == -1)
+			    return(-1);
+		    }
+		}
+	    }	      
+	}
+
+    }
+    /*
+    * Handle pointless prohibitions of declared attributes.
+    */
+    if (prohibs && (prohibs->nbItems != 0) && (list->nbItems != 0)) {
+	xmlSchemaAttributeUseProhibPtr prohib;
+
+	for (i = prohibs->nbItems -1; i >= 0; i--) {
+	    prohib = prohibs->items[i];
+	    for (j = 0; j < list->nbItems; j++) {
+		use = list->items[j];
+
+		if ((prohib->name == WXS_ATTRUSE_DECL_NAME(use)) &&
+		    (prohib->targetNamespace == WXS_ATTRUSE_DECL_TNS(use)))
+		{
+		    xmlChar *str = NULL;
+
+		    xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+			XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+			prohib->node, NULL,
+			"Skipping pointless attribute use prohibition "
+			"'%s', since a corresponding attribute use "
+			"exists already in the type definition",
+			xmlSchemaFormatQName(&str,
+			    prohib->targetNamespace, prohib->name),
+			NULL, NULL);
+		    FREE_AND_NULL(str);
+		    /*
+		    * Remove the prohibition.
+		    */
+		    if (xmlSchemaItemListRemove(prohibs, i) == -1)
+			return(-1);
+		    break;
+		}
+	    }
+	}
+    }
+    return(0);
+}
+
+/**
+ * xmlSchemaAttributeGroupExpandRefs:
+ * @pctxt:  the parser context
+ * @attrGr:  the attribute group definition 
+ *
+ * Computation of:
+ * {attribute uses} property
+ * {attribute wildcard} property
+ *
+ * Substitutes contained attribute group references
+ * for their attribute uses. Wilcards are intersected.
+ */
+static int
+xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
+				  xmlSchemaAttributeGroupPtr attrGr)
+{  
+    if ((attrGr->attrUses == NULL) ||
+	(attrGr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED))
+	return(0);
+
+    attrGr->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED;
+    if (xmlSchemaExpandAttributeGroupRefs(pctxt, WXS_BASIC_CAST attrGr,
+	&(attrGr->attributeWildcard), attrGr->attrUses, NULL) == -1)
+	return(-1);    
+    return(0);
+}
+
+/**
+ * xmlSchemaAttributeGroupExpandRefs:
+ * @pctxt:  the parser context
+ * @attrGr:  the attribute group definition 
+ *
+ * Substitutes contained attribute group references
+ * for their attribute uses. Wilcards are intersected.
+ * 
+ * Schema Component Constraint:
+ *    Attribute Group Definition Properties Correct (ag-props-correct) 
+ */
+static int
+xmlSchemaCheckAGPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
+				  xmlSchemaAttributeGroupPtr attrGr)
+{  
+    /*
+    * SPEC ag-props-correct
+    * (1) "The values of the properties of an attribute group definition
+    * must be as described in the property tableau in The Attribute
+    * Group Definition Schema Component (§3.6.1), modulo the impact of
+    * Missing Sub-components (§5.3);"
+    */
+    
+    if ((attrGr->attrUses != NULL) &&
+	(WXS_LIST_CAST attrGr->attrUses)->nbItems > 1)
+    {
+	xmlSchemaItemListPtr uses = WXS_LIST_CAST attrGr->attrUses;
+	xmlSchemaAttributeUsePtr use, tmp;
+	int i, j, hasId = 0;
+
+	for (i = uses->nbItems -1; i >= 0; i--) {
+	    use = uses->items[i];	    
+	    /*
+	    * SPEC ag-props-correct
+	    * (2) "Two distinct members of the {attribute uses} must not have
+	    * {attribute declaration}s both of whose {name}s match and whose
+	    * {target namespace}s are identical."
+	    */
+	    if (i > 0) {
+		for (j = i -1; j >= 0; j--) {
+		    tmp = uses->items[j];
+		    if ((WXS_ATTRUSE_DECL_NAME(use) ==
+			WXS_ATTRUSE_DECL_NAME(tmp)) &&
+			(WXS_ATTRUSE_DECL_TNS(use) ==
+			WXS_ATTRUSE_DECL_TNS(tmp)))
+		    {
+			xmlChar *str = NULL;
+			
+			xmlSchemaCustomErr(ACTXT_CAST pctxt,
+			    XML_SCHEMAP_AG_PROPS_CORRECT,
+			    attrGr->node, WXS_BASIC_CAST attrGr,
+			    "Duplicate %s",
+			    xmlSchemaGetComponentDesignation(&str, use),
+			    NULL);
+			FREE_AND_NULL(str);
+			/*
+			* Remove the duplicate.
+			*/
+			if (xmlSchemaItemListRemove(uses, i) == -1)
+			    return(-1);
+			goto next_use;
+		    }
+		}
+	    }
+	    /*
+	    * SPEC ag-props-correct
+	    * (3) "Two distinct members of the {attribute uses} must not have
+	    * {attribute declaration}s both of whose {type definition}s are or
+	    * are derived from ID."
+	    * TODO: Does 'derived' include member-types of unions?
+	    */
+	    if (WXS_ATTRUSE_TYPEDEF(use) != NULL) {		
+		if (xmlSchemaIsDerivedFromBuiltInType(
+		    WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID))
+		{		
+		    if (hasId) {
+			xmlChar *str = NULL;
+			
+			xmlSchemaCustomErr(ACTXT_CAST pctxt,
+			    XML_SCHEMAP_AG_PROPS_CORRECT,
+			    attrGr->node, WXS_BASIC_CAST attrGr,
+			    "There must not exist more than one attribute "
+			    "declaration of type 'xs:ID' "
+			    "(or derived from 'xs:ID'). The %s violates this "
+			    "constraint",
+			    xmlSchemaGetComponentDesignation(&str, use),
+			    NULL);
+			FREE_AND_NULL(str);
+			if (xmlSchemaItemListRemove(uses, i) == -1)
+			    return(-1);
+		    }		    
+		    hasId = 1;
+		}
+	    }
+next_use: {}
+	}
+    }
+    return(0);
+}
+
+/**
  * xmlSchemaResolveAttrGroupReferences:
  * @attrgrpDecl:  the schema attribute definition
  * @ctxt:  the schema parser context
  * @name:  the attribute name
  *
- * Fixes finish doing the computations on the attributes definitions
+ * Resolves references to attribute group definitions.
  */
-static void
-xmlSchemaResolveAttrGroupReferences(xmlSchemaAttributeGroupPtr attrgrp,
-                      xmlSchemaParserCtxtPtr ctxt, const xmlChar * name)
+static int
+xmlSchemaResolveAttrGroupReferences(xmlSchemaQNameRefPtr ref,
+				    xmlSchemaParserCtxtPtr ctxt)
 {
-    if (name == NULL)
-        name = attrgrp->name;
-    if (attrgrp->attributes != NULL)
-        return;
-    if (attrgrp->ref != NULL) {
-        xmlSchemaAttributeGroupPtr ref;
+    xmlSchemaAttributeGroupPtr group;
 
-        ref = xmlSchemaGetAttributeGroup(ctxt->schema, attrgrp->ref,
-	    attrgrp->refNs);
-        if (ref == NULL) {
-	    xmlSchemaPResCompAttrErr(ctxt,
-		XML_SCHEMAP_SRC_RESOLVE,
-		(xmlSchemaTypePtr) attrgrp, attrgrp->node,
-		"ref", attrgrp->ref, attrgrp->refNs,
-		XML_SCHEMA_TYPE_ATTRIBUTEGROUP, NULL);
-            return;
-        }
-	attrgrp->refItem = ref;
-	/*
-	* URGENT TODO: Do we need to resolve refs of the
-	* referenced attr. group itself first? I don't think so.
-	* If we need this, then check for circularity first!
-	* REMOVED: xmlSchemaResolveAttrGroupReferences(ref, ctxt, NULL);
-	*/        
-        attrgrp->attributes = ref->attributes;
-	attrgrp->attributeWildcard = ref->attributeWildcard;
+    if (ref->item != NULL)
+        return(0);
+    group = xmlSchemaGetAttributeGroup(ctxt->schema,
+	ref->name,
+	ref->targetNamespace);
+    if (group == NULL) {
+	xmlSchemaPResCompAttrErr(ctxt,
+	    XML_SCHEMAP_SRC_RESOLVE,
+	    NULL, ref->node,
+	    "ref", ref->name, ref->targetNamespace,
+	    ref->itemType, NULL);
+	return(ctxt->err);
     }
+    ref->item = WXS_BASIC_CAST group;
+    return(0);
 }
 
 /**
- * xmlSchemaAttrCheckValConstr:
+ * xmlSchemaCheckAttrPropsCorrect:
  * @item:  an schema attribute declaration/use
  * @ctxt:  a schema parser context
  * @name:  the name of the attribute
  *
  *
- * Schema Component Constraint: Attribute Declaration Properties Correct
- *   (a-props-correct)
+ * Schema Component Constraint:
+ *    Attribute Declaration Properties Correct (a-props-correct)
+ *
  * Validates the value constraints of an attribute declaration/use.
- *
- * Fixes finish doing the computations on the attributes definitions
+ * NOTE that this needs the simle type definitions to be already
+ *   builded and checked.
  */
-static void
-xmlSchemaCheckAttrValConstr(xmlSchemaAttributePtr item,
-			    xmlSchemaParserCtxtPtr pctxt)
+static int
+xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
+			       xmlSchemaAttributePtr attr)
 {
 
     /*
-    * 2 if there is a {value constraint}, the canonical lexical
-    * representation of its value must be ·valid· with respect
-    * to the {type definition} as defined in String Valid (§3.14.4).
+    * SPEC a-props-correct (1)
+    * "The values of the properties of an attribute declaration must
+    * be as described in the property tableau in The Attribute
+    * Declaration Schema Component (§3.2.1), modulo the impact of
+    * Missing Sub-components (§5.3)."
     */
-    if (item->defValue != NULL) {
+    
+    if (WXS_ATTR_TYPEDEF(attr) == NULL)
+	return(0);
+
+    if (attr->defValue != NULL) {
 	int ret;
 
-	if (item->subtypes == NULL) {
-	    PERROR_INT("xmlSchemaCheckAttrValConstr",
-		"type is missing");
-	    return;
+	/*
+	* SPEC a-props-correct (3)
+	* "If the {type definition} is or is derived from ID then there
+	* must not be a {value constraint}."
+	*/
+	if (xmlSchemaIsDerivedFromBuiltInType(
+	    WXS_ATTR_TYPEDEF(attr), XML_SCHEMAS_ID))
+	{
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		XML_SCHEMAP_A_PROPS_CORRECT_3,
+		NULL, WXS_BASIC_CAST attr,
+		"Value constraints are not allowed if the type definition "
+		"is or is derived from xs:ID",
+		NULL, NULL);
+	    return(pctxt->err);
 	}
+	/*
+	* SPEC a-props-correct (2)
+	* "if there is a {value constraint}, the canonical lexical
+	* representation of its value must be ·valid· with respect
+	* to the {type definition} as defined in String Valid (§3.14.4)."
+	* TODO: Don't care about the *cononical* stuff here, this requirement
+	* will be removed in WXS 1.1 anyway.
+	*/
 	ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt,
-	    item->node, item->subtypes, item->defValue, &(item->defVal),
+	    attr->node, WXS_ATTR_TYPEDEF(attr),
+	    attr->defValue, &(attr->defVal),
 	    1, 1, 0);
 	if (ret != 0) {
 	    if (ret < 0) {
-		PERROR_INT("xmlSchemaAttrCheckValConstr",
+		PERROR_INT("xmlSchemaCheckAttrPropsCorrect",
 		    "calling xmlSchemaVCheckCVCSimpleType()");
-		return;
+		return(-1);
 	    }
-	    ret = XML_SCHEMAP_A_PROPS_CORRECT_2;
 	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
-		ret, item->node, (xmlSchemaTypePtr) item,
-		"The value of the value constraint is not valid", NULL, NULL);
-	    return;
+		XML_SCHEMAP_A_PROPS_CORRECT_2,
+		NULL, WXS_BASIC_CAST attr,
+		"The value of the value constraint is not valid",
+		NULL, NULL);
+	    return(pctxt->err);
 	}
     }
+   
+    return(0);
 }
 
 static xmlSchemaElementPtr
@@ -18043,17 +19396,17 @@
 {
     xmlSchemaElementPtr ret;
 
-    if (SUBST_GROUP_AFF(ancestor) == NULL)
+    if (WXS_SUBST_HEAD(ancestor) == NULL)
 	return (NULL);
-    if (SUBST_GROUP_AFF(ancestor) == elemDecl)
+    if (WXS_SUBST_HEAD(ancestor) == elemDecl)
 	return (ancestor);
 
-    if (SUBST_GROUP_AFF(ancestor)->flags & XML_SCHEMAS_ELEM_CIRCULAR)
+    if (WXS_SUBST_HEAD(ancestor)->flags & XML_SCHEMAS_ELEM_CIRCULAR)
 	return (NULL);
-    SUBST_GROUP_AFF(ancestor)->flags |= XML_SCHEMAS_ELEM_CIRCULAR;
+    WXS_SUBST_HEAD(ancestor)->flags |= XML_SCHEMAS_ELEM_CIRCULAR;
     ret = xmlSchemaCheckSubstGroupCircular(elemDecl,
-	SUBST_GROUP_AFF(ancestor));
-    SUBST_GROUP_AFF(ancestor)->flags ^= XML_SCHEMAS_ELEM_CIRCULAR;
+	WXS_SUBST_HEAD(ancestor));
+    WXS_SUBST_HEAD(ancestor)->flags ^= XML_SCHEMAS_ELEM_CIRCULAR;
 
     return (ret);
 }
@@ -18075,15 +19428,15 @@
 			       xmlSchemaElementPtr elemDecl)
 {
     int ret = 0;
-    xmlSchemaTypePtr typeDef = ELEM_TYPE(elemDecl);
+    xmlSchemaTypePtr typeDef = WXS_ELEM_TYPEDEF(elemDecl);
     /*
     * SPEC (1) "The values of the properties of an element declaration
     * must be as described in the property tableau in The Element
     * Declaration Schema Component (§3.3.1), modulo the impact of Missing
     * Sub-components (§5.3)."
     */
-    if (SUBST_GROUP_AFF(elemDecl) != NULL) {
-	xmlSchemaElementPtr head = SUBST_GROUP_AFF(elemDecl), circ;
+    if (WXS_SUBST_HEAD(elemDecl) != NULL) {
+	xmlSchemaElementPtr head = WXS_SUBST_HEAD(elemDecl), circ;
 
 	xmlSchemaCheckElementDeclComponent(head, pctxt);
 	/*
@@ -18093,7 +19446,7 @@
 	if ((elemDecl->flags & XML_SCHEMAS_ELEM_GLOBAL) == 0) {
 	    xmlSchemaPCustomErr(pctxt,
 		XML_SCHEMAP_E_PROPS_CORRECT_3,
-		NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node,
+		WXS_BASIC_CAST elemDecl, NULL,
 		"Only global element declarations can have a "
 		"substitution group affiliation", NULL);
 	    ret = XML_SCHEMAP_E_PROPS_CORRECT_3;
@@ -18106,7 +19459,7 @@
 	*/
 	if (head == elemDecl)
 	    circ = head;
-	else if (SUBST_GROUP_AFF(head) != NULL)
+	else if (WXS_SUBST_HEAD(head) != NULL)
 	    circ = xmlSchemaCheckSubstGroupCircular(head, head);
 	else
 	    circ = NULL;
@@ -18115,7 +19468,7 @@
 
 	    xmlSchemaPCustomErrExt(pctxt,
 		XML_SCHEMAP_E_PROPS_CORRECT_6,
-		NULL, (xmlSchemaTypePtr) circ, circ->node,
+		WXS_BASIC_CAST circ, NULL,
 		"The element declaration '%s' defines a circular "
 		"substitution group to element declaration '%s'",
 		xmlSchemaGetComponentQName(&strA, circ),
@@ -18140,7 +19493,7 @@
 	* attribute "final".
 	*/
 
-	if (typeDef != ELEM_TYPE(SUBST_GROUP_AFF(elemDecl))) {
+	if (typeDef != WXS_ELEM_TYPEDEF(WXS_SUBST_HEAD(elemDecl))) {
 	    int set = 0;
 
 	    if (head->flags & XML_SCHEMAS_ELEM_FINAL_EXTENSION)
@@ -18148,21 +19501,21 @@
 	    if (head->flags & XML_SCHEMAS_ELEM_FINAL_RESTRICTION)
 		set |= SUBSET_RESTRICTION;
 
-	    if (xmlSchemaCheckCOSDerivedOK(typeDef,
-		ELEM_TYPE(head), set) != 0) {
+	    if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST pctxt, typeDef,
+		WXS_ELEM_TYPEDEF(head), set) != 0) {
 		xmlChar *strA = NULL, *strB = NULL, *strC = NULL;
 
 		ret = XML_SCHEMAP_E_PROPS_CORRECT_4;
 		xmlSchemaPCustomErrExt(pctxt,
 		    XML_SCHEMAP_E_PROPS_CORRECT_4,
-		    NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node,
+		    WXS_BASIC_CAST elemDecl, NULL,
 		    "The type definition '%s' was "
 		    "either rejected by the substitution group "
 		    "affiliation '%s', or not validly derived from its type "
 		    "definition '%s'",
 		    xmlSchemaGetComponentQName(&strA, typeDef),
 		    xmlSchemaGetComponentQName(&strB, head),
-		    xmlSchemaGetComponentQName(&strC, ELEM_TYPE(head)));
+		    xmlSchemaGetComponentQName(&strC, WXS_ELEM_TYPEDEF(head)));
 		FREE_AND_NULL(strA)
 		FREE_AND_NULL(strB)
 		FREE_AND_NULL(strC)
@@ -18177,17 +19530,17 @@
     * XML 1.0, and should be avoided if backwards compatibility is desired"
     */
     if ((elemDecl->value != NULL) &&
-	((IS_SIMPLE_TYPE(typeDef) &&
+	((WXS_IS_SIMPLE(typeDef) &&
 	  xmlSchemaIsDerivedFromBuiltInType(typeDef, XML_SCHEMAS_ID)) ||
-	 (IS_COMPLEX_TYPE(typeDef) &&
-	  HAS_SIMPLE_CONTENT(typeDef) &&
+	 (WXS_IS_COMPLEX(typeDef) &&
+	  WXS_HAS_SIMPLE_CONTENT(typeDef) &&
 	  xmlSchemaIsDerivedFromBuiltInType(typeDef->contentTypeDef,
 	    XML_SCHEMAS_ID)))) {
 
 	ret = XML_SCHEMAP_E_PROPS_CORRECT_5;
 	xmlSchemaPCustomErr(pctxt,
 	    XML_SCHEMAP_E_PROPS_CORRECT_5,
-	    NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node,
+	    WXS_BASIC_CAST elemDecl, NULL,
 	    "The type definition (or type definition's content type) is or "
 	    "is derived from ID; value constraints are not allowed in "
 	    "conjunction with such a type definition", NULL);
@@ -18256,7 +19609,7 @@
 xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt,
 			     xmlSchemaElementPtr elemDecl)
 {
-    if ((SUBST_GROUP_AFF(elemDecl) == NULL) ||
+    if ((WXS_SUBST_HEAD(elemDecl) == NULL) ||
 	/* SPEC (1) "Its {abstract} is false." */
 	(elemDecl->flags & XML_SCHEMAS_ELEM_ABSTRACT))
 	return;
@@ -18269,8 +19622,8 @@
 	* {disallowed substitutions} as the blocking constraint, as defined in
 	* Substitution Group OK (Transitive) (§3.3.6)."
 	*/
-	for (head = SUBST_GROUP_AFF(elemDecl); head != NULL;
-	    head = SUBST_GROUP_AFF(head)) {
+	for (head = WXS_SUBST_HEAD(elemDecl); head != NULL;
+	    head = WXS_SUBST_HEAD(head)) {
 	    set = 0;
 	    methSet = 0;
 	    /*
@@ -18321,7 +19674,7 @@
 	    */
 	    type = elemDecl->subtypes->baseType;
 	    while (type != NULL) {
-		if (IS_COMPLEX_TYPE(type)) {
+		if (WXS_IS_COMPLEX(type)) {
 		    if ((type->flags &
 			    XML_SCHEMAS_TYPE_BLOCK_EXTENSION) &&
 			((set & XML_SCHEMAS_TYPE_BLOCK_EXTENSION) == 0))
@@ -18375,47 +19728,92 @@
 }
 
 /**
- * xmlSchemaResolveParticleReferences:
- * @item:  an schema component
- * @ctxt:  a schema parser context
- * @name:  the internal name of the component
+ * xmlSchemaResolveModelGroupParticleReferences:
+ * @particle:  a particle component
+ * @ctxt:  a parser context
  *
- * Resolves references of misc. schema components.
+ * Resolves references of a model group's {particles} to
+ * model group definitions and to element declarations.
  */
 static void
-xmlSchemaResolveParticleReferences(xmlSchemaTreeItemPtr item,
-                   xmlSchemaParserCtxtPtr ctxt,
-		   const xmlChar * name ATTRIBUTE_UNUSED)
+xmlSchemaResolveModelGroupParticleReferences(
+    xmlSchemaParserCtxtPtr ctxt,
+    xmlSchemaModelGroupPtr mg)
 {
-    if (item->type != XML_SCHEMA_TYPE_PARTICLE)
-	return;
-    if ((item->children != NULL) &&
-	(item->children->type == XML_SCHEMA_EXTRA_QNAMEREF)) {
-	xmlSchemaQNameRefPtr ref = (xmlSchemaQNameRefPtr) item->children;
-	xmlSchemaBasicItemPtr refItem;
+    xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg);
+    xmlSchemaQNameRefPtr ref;
+    xmlSchemaBasicItemPtr refItem;
+
+    /*
+    * URGENT TODO: Test this.
+    */
+    while (particle != NULL) {
+	if ((WXS_PARTICLE_TERM(particle) == NULL) ||
+	    ((WXS_PARTICLE_TERM(particle))->type !=
+		XML_SCHEMA_EXTRA_QNAMEREF))
+	{
+	    goto next_particle;
+	} 
+	ref = WXS_QNAME_CAST WXS_PARTICLE_TERM(particle);
 	/*
 	* Resolve the reference.
+	* NULL the {term} by default.
 	*/
-	item->children = NULL;
+	particle->children = NULL;
+
 	refItem = xmlSchemaGetNamedComponent(ctxt->schema,
 	    ref->itemType, ref->name, ref->targetNamespace);
 	if (refItem == NULL) {
 	    xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE,
-		NULL, GET_NODE(item), "ref", ref->name,
+		NULL, WXS_ITEM_NODE(particle), "ref", ref->name,
 		ref->targetNamespace, ref->itemType, NULL);
-	} else {
-	    if (refItem->type == XML_SCHEMA_TYPE_GROUP) {
+	    /* TODO: remove the particle. */
+	    goto next_particle;
+	} 
+	if (refItem->type == XML_SCHEMA_TYPE_GROUP) {
+	    if (WXS_MODELGROUPDEF_MODEL(refItem) == NULL)
+		/* TODO: remove the particle. */
+		goto next_particle;
+	    /*
+	    * NOTE that we will assign the model group definition
+	    * itself to the "term" of the particle. This will ease
+	    * the check for circular model group definitions. After
+	    * that the "term" will be assigned the model group of the
+	    * model group definition.
+	    */
+	    if ((WXS_MODELGROUPDEF_MODEL(refItem))->type ==
+		    XML_SCHEMA_TYPE_ALL) {
 		/*
-		* NOTE that we will assign the model group definition
-		* itself to the "term" of the particle. This will ease
-		* the check for circular model group definitions. After
-		* that the "term" will be assigned the model group of the
-		* model group definition.
+		* SPEC cos-all-limited (1)
+		* SPEC cos-all-limited (1.2)
+		* "It appears only as the value of one or both of the
+		* following properties:"
+		* (1.1) "the {model group} property of a model group
+		*        definition."
+		* (1.2) "the {term} property of a particle [... of] the "
+		* {content type} of a complex type definition."
 		*/
-		item->children = (xmlSchemaTreeItemPtr) refItem;
-	    } else
-		item->children = (xmlSchemaTreeItemPtr) refItem;
+		xmlSchemaCustomErr(ACTXT_CAST ctxt,
+		    /* TODO: error code */
+		    XML_SCHEMAP_COS_ALL_LIMITED,
+		    WXS_ITEM_NODE(particle), NULL,
+		    "A model group definition is referenced, but "
+		    "it contains an 'all' model group, which "
+		    "cannot be contained by model groups",
+		    NULL, NULL);
+		/* TODO: remove the particle. */
+		goto next_particle;
+	    }
+	    particle->children = (xmlSchemaTreeItemPtr) refItem;
+	} else {
+	    /*
+	    * TODO: Are referenced element declarations the only
+	    * other components we expect here?
+	    */
+	    particle->children = (xmlSchemaTreeItemPtr) refItem;
 	}
+next_particle:
+	particle = WXS_PTC_CAST particle->next;
     }
 }
 
@@ -18448,7 +19846,7 @@
 	* string comparison for string based types.
 	*/
 	if ((ptx->builtInType == XML_SCHEMAS_STRING) ||
-	    IS_ANY_SIMPLE_TYPE(ptx)) {
+	    WXS_IS_ANY_SIMPLE_TYPE(ptx)) {
 	    if (! xmlStrEqual(
 		xmlSchemaValueGetAsString(x),
 		xmlSchemaValueGetAsString(y)))
@@ -18479,108 +19877,198 @@
 }
 
 /**
- * xmlSchemaResolveAttrReferences:
- * @item:  an schema attribute declaration/use.
- * @ctxt:  a schema parser context
- * @name:  the name of the attribute
+ * xmlSchemaResolveAttrUseReferences:
+ * @item:  an attribute use
+ * @ctxt:  a parser context
  *
- * Fixes finish doing the computations on attribute declarations/uses.
+ * Resolves the referenced attribute declaration.
  */
-static void
-xmlSchemaResolveAttrReferences(xmlSchemaAttributePtr item,
-                   xmlSchemaParserCtxtPtr ctxt,
-		   const xmlChar * name ATTRIBUTE_UNUSED)
+static int
+xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause,
+				  xmlSchemaParserCtxtPtr ctxt)
 {
+    if ((ctxt == NULL) || (ause == NULL))
+	return(-1);
+    if ((ause->attrDecl == NULL) ||
+	(ause->attrDecl->type != XML_SCHEMA_EXTRA_QNAMEREF))
+	return(0);
+
+    {
+	xmlSchemaQNameRefPtr ref = WXS_QNAME_CAST ause->attrDecl;
+
+	/*
+	* TODO: Evaluate, what errors could occur if the declaration is not
+	* found.
+	*/
+	ause->attrDecl = xmlSchemaGetAttributeDecl(ctxt->schema,
+	    ref->name, ref->targetNamespace);
+        if (ause->attrDecl == NULL) {
+	    xmlSchemaPResCompAttrErr(ctxt,
+	    	XML_SCHEMAP_SRC_RESOLVE,
+		WXS_BASIC_CAST ause, ause->node,
+		"ref", ref->name, ref->targetNamespace,
+		XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
+            return(ctxt->err);;
+        }
+    }
+    return(0);
+}
+
+/**
+ * xmlSchemaCheckAttrUsePropsCorrect:
+ * @ctxt:  a parser context
+ * @use:  an attribute use 
+ *
+ * Schema Component Constraint:
+ * Attribute Use Correct (au-props-correct)
+ * 
+ */
+static int
+xmlSchemaCheckAttrUsePropsCorrect(xmlSchemaParserCtxtPtr ctxt,
+			     xmlSchemaAttributeUsePtr use)
+{
+    if ((ctxt == NULL) || (use == NULL))
+	return(-1);
+    if ((use->defValue == NULL) || (WXS_ATTRUSE_DECL(use) == NULL) ||
+	((WXS_ATTRUSE_DECL(use))->type != XML_SCHEMA_TYPE_ATTRIBUTE))
+	return(0);	
+
     /*
-    * TODO: If including this is done twice (!) for every attribute.
-    *       -> Hmm, check if this is still done.
+    * SPEC au-props-correct (1)
+    * "The values of the properties of an attribute use must be as
+    * described in the property tableau in The Attribute Use Schema
+    * Component (§3.5.1), modulo the impact of Missing
+    * Sub-components (§5.3)."
     */
+    
+    if (((WXS_ATTRUSE_DECL(use))->defValue != NULL) &&
+	((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMAS_ATTR_FIXED) &&
+        ((use->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0))
+    {
+	xmlSchemaPCustomErr(ctxt,
+	    XML_SCHEMAP_AU_PROPS_CORRECT_2,
+	    WXS_BASIC_CAST use, NULL,
+	    "The attribute declaration has a 'fixed' value constraint "
+	    ", thus the attribute use must also have a 'fixed' value "
+	    "constraint",
+	    NULL);
+	return(ctxt->err);
+    }
     /*
+    * Compute and check the value constraint's value.
+    */
+    if ((use->defVal != NULL) && (WXS_ATTRUSE_TYPEDEF(use) != NULL)) {
+	int ret;
+	/*
+	* TODO: The spec seems to be missing a check of the 
+	* value constraint of the attribute use. We will do it here.
+	*/
+	/*
+	* SPEC a-props-correct (3)
+	*/
+	if (xmlSchemaIsDerivedFromBuiltInType(
+	    WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID))
+	{
+	    xmlSchemaCustomErr(ACTXT_CAST ctxt,
+		XML_SCHEMAP_AU_PROPS_CORRECT,
+		NULL, WXS_BASIC_CAST use,
+		"Value constraints are not allowed if the type definition "
+		"is or is derived from xs:ID",
+		NULL, NULL);
+	    return(ctxt->err);
+	}
+	
+	ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST ctxt,
+	    use->node, WXS_ATTRUSE_TYPEDEF(use),
+	    use->defValue, &(use->defVal),
+	    1, 1, 0);
+	if (ret != 0) {
+	    if (ret < 0) {
+		PERROR_INT2("xmlSchemaCheckAttrUsePropsCorrect",
+		    "calling xmlSchemaVCheckCVCSimpleType()");
+		return(-1);
+	    }
+	    xmlSchemaCustomErr(ACTXT_CAST ctxt,
+		XML_SCHEMAP_AU_PROPS_CORRECT,
+		NULL, WXS_BASIC_CAST use,
+		"The value of the value constraint is not valid",
+		NULL, NULL);
+	    return(ctxt->err);
+	}
+    }
+    /*
+    * SPEC au-props-correct (2)
+    * "If the {attribute declaration} has a fixed
+    * {value constraint}, then if the attribute use itself has a
+    * {value constraint}, it must also be fixed and its value must match
+    * that of the {attribute declaration}'s {value constraint}."
+    */
+    if (((WXS_ATTRUSE_DECL(use))->defVal != NULL) &&
+	(((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0))
+    {
+	if (! xmlSchemaAreValuesEqual(use->defVal,
+		(WXS_ATTRUSE_DECL(use))->defVal))
+	{
+	    xmlSchemaPCustomErr(ctxt,
+		XML_SCHEMAP_AU_PROPS_CORRECT_2,
+		WXS_BASIC_CAST use, NULL,
+		"The 'fixed' value constraint of the attribute use "
+		"must match the attribute declaration's value "
+		"constraint '%s'",
+		(WXS_ATTRUSE_DECL(use))->defValue);
+	}
+	return(ctxt->err);
+    }
+    return(0);
+}
+
+
+
+
+/**
+ * xmlSchemaResolveAttrTypeReferences:
+ * @item:  an attribute declaration
+ * @ctxt:  a parser context 
+ *
+ * Resolves the referenced type definition component.
+ */
+static int
+xmlSchemaResolveAttrTypeReferences(xmlSchemaAttributePtr item,
+				   xmlSchemaParserCtxtPtr ctxt)
+{
+    /*
     * The simple type definition corresponding to the <simpleType> element
     * information item in the [children], if present, otherwise the simple
     * type definition ·resolved· to by the ·actual value· of the type
     * [attribute], if present, otherwise the ·simple ur-type definition·.
     */
     if (item->flags & XML_SCHEMAS_ATTR_INTERNAL_RESOLVED)
-	return;
+	return(0);
     item->flags |= XML_SCHEMAS_ATTR_INTERNAL_RESOLVED;
     if (item->subtypes != NULL)
-        return;
+        return(0);
     if (item->typeName != NULL) {
         xmlSchemaTypePtr type;
 
 	type = xmlSchemaGetType(ctxt->schema, item->typeName,
 	    item->typeNs);
-	if ((type == NULL) || (! IS_SIMPLE_TYPE(type))) {
+	if ((type == NULL) || (! WXS_IS_SIMPLE(type))) {
 	    xmlSchemaPResCompAttrErr(ctxt,
 		XML_SCHEMAP_SRC_RESOLVE,
-		(xmlSchemaTypePtr) item, item->node,
+		WXS_BASIC_CAST item, item->node,
 		"type", item->typeName, item->typeNs,
 		XML_SCHEMA_TYPE_SIMPLE, NULL);
+	    return(ctxt->err);
 	} else
 	    item->subtypes = type;
 
-    } else if (item->ref != NULL) {
-        xmlSchemaAttributePtr decl;
-
+    } else {
 	/*
-	* We have an attribute use here; assign the referenced
-	* attribute declaration.
+	* The type defaults to the xs:anySimpleType.
 	*/
-	/*
-	* TODO: Evaluate, what errors could occur if the declaration is not
-	* found. It might be possible that the "typefixup" might crash if
-	* no ref declaration was found.
-	*/
-	decl = xmlSchemaGetAttributeDecl(ctxt->schema, item->ref, item->refNs);
-        if (decl == NULL) {
-	    xmlSchemaPResCompAttrErr(ctxt,
-	    	XML_SCHEMAP_SRC_RESOLVE,
-		(xmlSchemaTypePtr) item, item->node,
-		"ref", item->ref, item->refNs,
-		XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
-            return;
-        }
-	item->refDecl = decl;
-        xmlSchemaResolveAttrReferences(decl, ctxt, NULL);
-        item->subtypes = decl->subtypes;
-	/*
-	* Attribute Use Correct
-	* au-props-correct.2: If the {attribute declaration} has a fixed
-	* {value constraint}, then if the attribute use itself has a
-	* {value constraint}, it must also be fixed and its value must match
-	* that of the {attribute declaration}'s {value constraint}.
-	*/
-	if ((decl->flags & XML_SCHEMAS_ATTR_FIXED) &&
-	    (item->defValue != NULL)) {
-	    if ((item->flags & XML_SCHEMAS_ATTR_FIXED) == 0) {
-		xmlSchemaPCustomErr(ctxt,
-		    XML_SCHEMAP_AU_PROPS_CORRECT_2,
-		    NULL, NULL, item->node,
-		    "The attribute declaration has a 'fixed' value constraint "
-		    ", thus it must be 'fixed' in attribute use as well",
-		    NULL);
-	    } else {
-		if (! xmlSchemaAreValuesEqual(item->defVal, decl->defVal)) {
-		    xmlSchemaPCustomErr(ctxt,
-			XML_SCHEMAP_AU_PROPS_CORRECT_2,
-			NULL, NULL, item->node,
-			"The 'fixed' value constraint of the attribute use "
-			"must match the attribute declaration's value "
-			"constraint '%s'",
-			decl->defValue);
-		}
-	    }
-	    /*
-	    * FUTURE: One should change the values of the attr. use
-	    * if ever validation should be attempted even if the
-	    * schema itself was not fully valid.
-	    */
-	}
-    } else {
-	/* The type of this attribute is the xs:anySimpleType. */
 	item->subtypes = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE);
     }
+    return(0);
 }
 
 /**
@@ -18590,14 +20078,15 @@
  * @name:  the attribute name
  *
  * Resolve keyRef references to key/unique IDCs.
+ * Schema Component Constraint:
+ *   Identity-constraint Definition Properties Correct (c-props-correct)
  */
-static void
+static int
 xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc,
-			  xmlSchemaParserCtxtPtr pctxt,
-			  const xmlChar * name ATTRIBUTE_UNUSED)
+			  xmlSchemaParserCtxtPtr pctxt)
 {
     if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF)
-        return;
+        return(0);
     if (idc->ref->name != NULL) {
 	idc->ref->item = (xmlSchemaBasicItemPtr)
 	    xmlSchemaGetIDC(pctxt->schema, idc->ref->name,
@@ -18609,11 +20098,22 @@
 	    */
 	    xmlSchemaPResCompAttrErr(pctxt,
 		XML_SCHEMAP_SRC_RESOLVE,
-		(xmlSchemaTypePtr) idc, idc->node,
+		WXS_BASIC_CAST idc, idc->node,
 		"refer", idc->ref->name,
 		idc->ref->targetNamespace,
 		XML_SCHEMA_TYPE_IDC_KEY, NULL);
-            return;
+            return(pctxt->err);
+	} else if (idc->ref->item->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
+	    /*
+	    * SPEC c-props-correct (1)
+	    */
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		XML_SCHEMAP_C_PROPS_CORRECT,
+		NULL, WXS_BASIC_CAST idc,
+		"The keyref references a keyref",
+		NULL, NULL);
+	    idc->ref->item = NULL;
+	    return(pctxt->err);
 	} else {
 	    if (idc->nbFields !=
 		((xmlSchemaIDCPtr) idc->ref->item)->nbFields) {
@@ -18627,22 +20127,419 @@
 		* the cardinality of the {fields} must equal that of
 		* the {fields} of the {referenced key}.
 		*/
-		xmlSchemaPCustomErr(pctxt,
+		xmlSchemaCustomErr(ACTXT_CAST pctxt,
 		    XML_SCHEMAP_C_PROPS_CORRECT,
-		    NULL, (xmlSchemaTypePtr) idc, idc->node,
+		    NULL, WXS_BASIC_CAST idc,
 		    "The cardinality of the keyref differs from the "
-		    "cardinality of the referenced key '%s'",
+		    "cardinality of the referenced key/unique '%s'",
 		    xmlSchemaFormatQName(&str, refer->targetNamespace,
-			refer->name) 
-		);
+			refer->name),
+		    NULL);
 		FREE_AND_NULL(str)
+		return(pctxt->err);
 	    }
 	}
     }
+    return(0);
 }
 
+static int
+xmlSchemaResolveAttrUseProhibReferences(xmlSchemaAttributeUseProhibPtr prohib,
+				       xmlSchemaParserCtxtPtr pctxt)
+{
+    if (xmlSchemaGetAttributeDecl(pctxt->schema, prohib->name,
+	prohib->targetNamespace) == NULL) {
 
+	xmlSchemaPResCompAttrErr(pctxt,
+	    XML_SCHEMAP_SRC_RESOLVE,
+	    NULL, prohib->node,
+	    "ref", prohib->name, prohib->targetNamespace,
+	    XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
+	return(XML_SCHEMAP_SRC_RESOLVE);
+    }
+    return(0);
+}
+
+#define WXS_REDEFINED_TYPE(c) \
+(((xmlSchemaTypePtr) item)->flags & XML_SCHEMAS_TYPE_REDEFINED)
+
+#define WXS_REDEFINED_MODEL_GROUP_DEF(c) \
+(((xmlSchemaModelGroupDefPtr) item)->flags & XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED)
+
+#define WXS_REDEFINED_ATTR_GROUP(c) \
+(((xmlSchemaAttributeGroupPtr) item)->flags & XML_SCHEMAS_ATTRGROUP_REDEFINED)
+
 static int
+xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt)
+{
+    int err = 0;
+    xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs;
+    xmlSchemaBasicItemPtr prev, item;
+    int wasRedefined;
+
+    if (redef == NULL)
+	return(0);   	
+
+    do {
+	item = redef->item;
+	/*
+	* First try to locate the redefined component in the
+	* schema graph starting with the redefined schema.
+	* NOTE: According to this schema bug entry:
+	*   http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005OctDec/0019.html
+	*   it's not clear if the referenced component needs to originate
+	*   from the <redefine>d schema _document_ or the schema; the latter
+	*   would include all imported and included sub-schemas of the
+	*   <redefine>d schema. Currenlty we latter approach is used.
+	*   SUPPLEMENT: It seems that the WG moves towards the latter
+	*   approach, so we are doing it right.
+	*   
+	*/
+	prev = xmlSchemaFindRedefCompInGraph(
+	    redef->targetBucket, item->type,
+	    redef->refName, redef->refTargetNs);
+	if (prev == NULL) {
+	    xmlChar *str = NULL;
+	    xmlNodePtr node;
+
+	    /*
+	    * SPEC src-redefine:
+	    * (6.2.1) "The ·actual value· of its own name attribute plus
+	    * target namespace must successfully ·resolve· to a model
+	    * group definition in I."
+	    * (7.2.1) "The ·actual value· of its own name attribute plus
+	    * target namespace must successfully ·resolve· to an attribute
+	    * group definition in I."
+
+	    *
+	    * Note that, if we are redefining with the use of references
+	    * to components, the spec assumes the src-resolve to be used;
+	    * but this won't assure that we search only *inside* the
+	    * redefined schema.
+	    */
+	    if (redef->reference)
+		node = WXS_ITEM_NODE(redef->reference);
+	    else
+		node = WXS_ITEM_NODE(item);
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		/*
+		* TODO: error code.
+		* Probably XML_SCHEMAP_SRC_RESOLVE, if this is using the
+		* reference kind.		
+		*/
+		XML_SCHEMAP_SRC_REDEFINE, node, NULL,
+		"The %s '%s' to be redefined could not be found in "
+		"the redefined schema",
+		WXS_ITEM_TYPE_NAME(item),
+		xmlSchemaFormatQName(&str, redef->refTargetNs,
+		    redef->refName));
+	    FREE_AND_NULL(str);	    
+	    err = pctxt->err;
+	    redef = redef->next;
+	    continue;
+	}
+	/*
+	* TODO: Obtaining and setting the redefinition state is really
+	* clumsy.
+	*/
+	wasRedefined = 0;
+	switch (item->type) {
+	    case XML_SCHEMA_TYPE_COMPLEX:
+	    case XML_SCHEMA_TYPE_SIMPLE:
+		if ((WXS_TYPE_CAST prev)->flags &
+		    XML_SCHEMAS_TYPE_REDEFINED)
+		{
+		    wasRedefined = 1;
+		    break;
+		}
+		/* Mark it as redefined. */
+		(WXS_TYPE_CAST prev)->flags |= XML_SCHEMAS_TYPE_REDEFINED;
+		/*
+		* Assign the redefined type to the
+		* base type of the redefining type.
+		* TODO: How
+		*/
+		((xmlSchemaTypePtr) item)->baseType = 
+		    (xmlSchemaTypePtr) prev;
+		break;
+	    case XML_SCHEMA_TYPE_GROUP:
+		if ((WXS_MODEL_GROUPDEF_CAST prev)->flags &
+		    XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED)
+		{
+		    wasRedefined = 1;
+		    break;
+		}
+		/* Mark it as redefined. */
+		(WXS_MODEL_GROUPDEF_CAST prev)->flags |=
+		    XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED;
+		if (redef->reference != NULL) {
+		    /*
+		    * Overwrite the QName-reference with the
+		    * referenced model group def.
+		    */
+		    (WXS_PTC_CAST redef->reference)->children =
+			WXS_TREE_CAST prev;
+		}
+		redef->target = prev;
+		break;
+	    case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+		if ((WXS_ATTR_GROUP_CAST prev)->flags &
+		    XML_SCHEMAS_ATTRGROUP_REDEFINED)
+		{
+		    wasRedefined = 1;
+		    break;
+		}
+		(WXS_ATTR_GROUP_CAST prev)->flags |=
+		    XML_SCHEMAS_ATTRGROUP_REDEFINED;
+		if (redef->reference != NULL) {
+		    /*
+		    * Assign the redefined attribute group to the
+		    * QName-reference component.
+		    * This is the easy case, since we will just
+		    * expand the redefined group.
+		    */
+		    (WXS_QNAME_CAST redef->reference)->item = prev;
+		    redef->target = NULL;
+		} else {
+		    /*
+		    * This is the complicated case: we need
+		    * to apply src-redefine (7.2.2) at a later
+		    * stage, i.e. when attribute group references
+		    * have beed expanded and simple types have
+		    * beed fixed.
+		    */
+		    redef->target = prev;
+		}
+		break;
+	    default:
+		PERROR_INT("xmlSchemaResolveRedefReferences",
+		    "Unexpected redefined component type");
+		return(-1);	
+	}
+	if (wasRedefined) {
+	    xmlChar *str = NULL;
+	    xmlNodePtr node;
+
+	    if (redef->reference)
+		node = WXS_ITEM_NODE(redef->reference);
+	    else
+		node = WXS_ITEM_NODE(redef->item);
+	    
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		/* TODO: error code. */
+		XML_SCHEMAP_SRC_REDEFINE,
+		node, NULL,
+		"The referenced %s was already redefined. Multiple "
+		"redefinition of the same component is not supported",
+		xmlSchemaGetComponentDesignation(&str, prev),
+		NULL);
+	    FREE_AND_NULL(str)	    
+	    err = pctxt->err;
+	    redef = redef->next;
+	    continue;
+	}
+	redef = redef->next;	
+    } while (redef != NULL);
+
+    return(err);
+}
+
+static int
+xmlSchemaCheckSRCRedefineSecond(xmlSchemaParserCtxtPtr pctxt)
+{
+    int err = 0;
+    xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs;
+    xmlSchemaBasicItemPtr item;
+
+    if (redef == NULL)
+	return(0);   	
+
+    do {
+	if (redef->target == NULL) {
+	    redef = redef->next;
+	    continue;
+	}
+	item = redef->item;
+		
+	switch (item->type) {
+	    case XML_SCHEMA_TYPE_SIMPLE:
+	    case XML_SCHEMA_TYPE_COMPLEX:
+		/*
+		* Since the spec wants the {name} of the redefined
+		* type to be 'absent', we'll NULL it.
+		*/
+		(WXS_TYPE_CAST redef->target)->name = NULL;
+		
+		/*
+		* TODO: Seems like there's nothing more to do. The normal
+		* inheritance mechanism is used. But not 100% sure.
+		*/
+		break;
+	    case XML_SCHEMA_TYPE_GROUP:
+		/*
+		* URGENT TODO:
+		* SPEC src-redefine:
+		* (6.2.2) "The {model group} of the model group definition
+		* which corresponds to it per XML Representation of Model
+		* Group Definition Schema Components (§3.7.2) must be a
+		* ·valid restriction· of the {model group} of that model
+		* group definition in I, as defined in Particle Valid
+		* (Restriction) (§3.9.6)."
+		*/
+		break;
+	    case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+		/*
+		* SPEC src-redefine:
+		* (7.2.2) "The {attribute uses} and {attribute wildcard} of
+		* the attribute group definition which corresponds to it
+		* per XML Representation of Attribute Group Definition Schema
+		* Components (§3.6.2) must be ·valid restrictions· of the
+		* {attribute uses} and {attribute wildcard} of that attribute
+		* group definition in I, as defined in clause 2, clause 3 and
+		* clause 4 of Derivation Valid (Restriction, Complex)
+		* (§3.4.6) (where references to the base type definition are
+		* understood as references to the attribute group definition
+		* in I)."
+		*/
+		err = xmlSchemaCheckDerivationOKRestriction2to4(pctxt,
+		    XML_SCHEMA_ACTION_REDEFINE,
+		    item, redef->target,
+		    (WXS_ATTR_GROUP_CAST item)->attrUses,
+		    (WXS_ATTR_GROUP_CAST redef->target)->attrUses,
+		    (WXS_ATTR_GROUP_CAST item)->attributeWildcard,
+		    (WXS_ATTR_GROUP_CAST redef->target)->attributeWildcard);
+		if (err == -1)
+		    return(-1);
+		break;
+	    default:
+		break;
+	}
+	redef = redef->next;
+    } while (redef != NULL);
+    return(0);
+}
+	
+
+static int
+xmlSchemaAddComponents(xmlSchemaParserCtxtPtr pctxt,
+		       xmlSchemaBucketPtr bucket)
+{
+    xmlSchemaBasicItemPtr item;
+    int err;
+    xmlHashTablePtr *table;
+    const xmlChar *name;
+    int i;
+
+#define WXS_GET_GLOBAL_HASH(c, s, slot) { \
+    if (WXS_IS_BUCKET_IMPMAIN((c)->type)) \
+	table = &(WXS_IMPBUCKET((c))->schema->slot); \
+    else \
+	table = &(WXS_INCBUCKET((c))->ownerImport->schema->slot); }
+
+    /*
+    * Add global components to the schema's hash tables.
+    * This is the place where duplicate components will be
+    * detected.
+    * TODO: I think normally we should support imports of the
+    *   same namespace from multiple locations. We don't do currently,
+    *   but if we do then according to:
+    *   http://www.w3.org/Bugs/Public/show_bug.cgi?id=2224
+    *   we would need, if imported directly, to import redefined
+    *   components as well to be able to catch clashing components.
+    *   (I hope I'll still know what this means after some months :-()
+    */
+    if (bucket == NULL)
+	return(-1);
+    if (bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED)
+	return(0);
+    bucket->flags |= XML_SCHEMA_BUCKET_COMPS_ADDED; 
+    
+    for (i = 0; i < bucket->globals->nbItems; i++) {
+	item = bucket->globals->items[i];
+	table = NULL;
+	switch (item->type) {
+	    case XML_SCHEMA_TYPE_COMPLEX:
+	    case XML_SCHEMA_TYPE_SIMPLE:
+		if (WXS_REDEFINED_TYPE(item))
+		    continue;
+		name = (WXS_TYPE_CAST item)->name;
+		WXS_GET_GLOBAL_HASH(bucket, schema, typeDecl)
+		break;
+	    case XML_SCHEMA_TYPE_ELEMENT:
+		name = (WXS_ELEM_CAST item)->name;
+		WXS_GET_GLOBAL_HASH(bucket, schema, elemDecl)
+		break;
+	    case XML_SCHEMA_TYPE_ATTRIBUTE:
+		name = (WXS_ATTR_CAST item)->name;
+		WXS_GET_GLOBAL_HASH(bucket, schema, attrDecl)
+		break;
+	    case XML_SCHEMA_TYPE_GROUP:
+		if (WXS_REDEFINED_MODEL_GROUP_DEF(item))
+		    continue;
+		name = (WXS_MODEL_GROUPDEF_CAST item)->name;
+		WXS_GET_GLOBAL_HASH(bucket, schema, groupDecl)
+		break;
+	    case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+		if (WXS_REDEFINED_ATTR_GROUP(item))
+		    continue;
+		name = (WXS_ATTR_GROUP_CAST item)->name;
+		WXS_GET_GLOBAL_HASH(bucket, schema, attrgrpDecl)
+		break;
+	    case XML_SCHEMA_TYPE_IDC_KEY:
+	    case XML_SCHEMA_TYPE_IDC_UNIQUE:
+	    case XML_SCHEMA_TYPE_IDC_KEYREF:
+		name = (WXS_IDC_CAST item)->name;
+		WXS_GET_GLOBAL_HASH(bucket, schema, idcDef)
+		break;
+	    case XML_SCHEMA_TYPE_NOTATION:
+		name = ((xmlSchemaNotationPtr) item)->name;
+		WXS_GET_GLOBAL_HASH(bucket, schema, notaDecl)
+		break;	    
+	    default:
+		PERROR_INT("xmlSchemaAddComponents",
+		    "Unexpected global component type");
+		continue;    		
+	}	
+	if (*table == NULL) {
+	    *table = xmlHashCreateDict(10, pctxt->dict);
+	    if (*table == NULL) {
+		PERROR_INT("xmlSchemaAddComponents",
+		    "failed to create a component hash table");
+		return(-1);
+	    }
+	}	
+	err = xmlHashAddEntry(*table, name, item);
+	if (err != 0) {	
+	    xmlChar *str = NULL;
+	    
+	    xmlSchemaCustomErr(ACTXT_CAST pctxt,
+		XML_SCHEMAP_REDEFINED_TYPE,
+		WXS_ITEM_NODE(item),
+		WXS_BASIC_CAST item,
+		"A global %s '%s' does already exist",
+		WXS_ITEM_TYPE_NAME(item),
+		xmlSchemaGetComponentQName(&str, item));
+	    FREE_AND_NULL(str);	 
+	}
+    }
+    /*
+    * Process imported/included schemas.
+    */
+    if (bucket->relations != NULL) {
+	xmlSchemaSchemaRelationPtr rel = bucket->relations;
+	do {
+	    if ((rel->bucket != NULL) &&
+		((rel->bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED) == 0)) {
+		if (xmlSchemaAddComponents(pctxt, rel->bucket) == -1)
+		    return(-1);
+	    }
+	    rel = rel->next;
+	} while (rel != NULL);
+    }
+    return(0);
+}
+
+static int
 xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt)
 {
     xmlSchemaConstructionCtxtPtr con = pctxt->constructor;
@@ -18653,10 +20550,27 @@
 
     if ((con->pending == NULL) ||
 	(con->pending->nbItems == 0))
-	return(0);
+	return(0);    
 
+    /* TODO:
+    * SPEC (src-redefine):
+    * (6.2) "If it has no such self-reference, then all of the
+    * following must be true:"
+    
+    * (6.2.2) The {model group} of the model group definition which
+    * corresponds to it per XML Representation of Model Group
+    * Definition Schema Components (§3.7.2) must be a ·valid
+    * restriction· of the {model group} of that model group definition
+    * in I, as defined in Particle Valid (Restriction) (§3.9.6)."
+    */
+    xmlSchemaCheckSRCRedefineFirst(pctxt);
+
+    /*
+    * Add global components to the schemata's hash tables.
+    */
+    xmlSchemaAddComponents(pctxt, WXS_CONSTRUCTOR(pctxt)->mainBucket);
+
     pctxt->ctxtType = NULL;
-    pctxt->parentItem = NULL;
     items = (xmlSchemaTreeItemPtr *) con->pending->items;
     nbItems = con->pending->nbItems;
     /*
@@ -18683,6 +20597,7 @@
     *   - the term of the particle (e.g. a model group)
     * 6. IDC key-references:
     *   - the referenced IDC 'key' or 'unique' definition
+    * 7. Attribute prohibitions which had a "ref" attribute.
     */        
     for (i = 0; i < nbItems; i++) {
 	item = items[i];
@@ -18695,31 +20610,51 @@
 	    case XML_SCHEMA_TYPE_COMPLEX:
 	    case XML_SCHEMA_TYPE_SIMPLE:
 		xmlSchemaResolveTypeReferences(
-		    (xmlSchemaTypePtr) item, pctxt, NULL);
+		    (xmlSchemaTypePtr) item, pctxt);
 		FIXHFAILURE;
 		break;
 	    case XML_SCHEMA_TYPE_ATTRIBUTE:
-		xmlSchemaResolveAttrReferences(
-		    (xmlSchemaAttributePtr) item, pctxt, NULL);
+		xmlSchemaResolveAttrTypeReferences(
+		    (xmlSchemaAttributePtr) item, pctxt);
 		FIXHFAILURE;
 		break;
-	    case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
-		xmlSchemaResolveAttrGroupReferences(
-		    (xmlSchemaAttributeGroupPtr) item, pctxt, NULL);
+	    case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+		xmlSchemaResolveAttrUseReferences(
+		    (xmlSchemaAttributeUsePtr) item, pctxt);
 		FIXHFAILURE;
 		break;
-	    case XML_SCHEMA_TYPE_PARTICLE:
-		xmlSchemaResolveParticleReferences(
-		    (xmlSchemaTreeItemPtr) item, pctxt, NULL);
+	    case XML_SCHEMA_EXTRA_QNAMEREF:
+		if ((WXS_QNAME_CAST item)->itemType == 
+		    XML_SCHEMA_TYPE_ATTRIBUTEGROUP)
+		{
+		    xmlSchemaResolveAttrGroupReferences(
+			WXS_QNAME_CAST item, pctxt);
+		}
 		FIXHFAILURE;
 		break;
+	    case XML_SCHEMA_TYPE_SEQUENCE:
+	    case XML_SCHEMA_TYPE_CHOICE:
+	    case XML_SCHEMA_TYPE_ALL:
+		xmlSchemaResolveModelGroupParticleReferences(pctxt,
+		    WXS_MODEL_GROUP_CAST item);
+		FIXHFAILURE;
+		break;
 	    case XML_SCHEMA_TYPE_IDC_KEY:
 	    case XML_SCHEMA_TYPE_IDC_UNIQUE:
 	    case XML_SCHEMA_TYPE_IDC_KEYREF:
 		xmlSchemaResolveIDCKeyReferences(
-		    (xmlSchemaIDCPtr) item, pctxt, NULL);
+		    (xmlSchemaIDCPtr) item, pctxt);
 		FIXHFAILURE;
 		break;
+	    case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB:
+		/*
+		* Handle attribue prohibition which had a
+		* "ref" attribute.
+		*/
+		xmlSchemaResolveAttrUseProhibReferences(
+		    WXS_ATTR_PROHIB_CAST item, pctxt);
+		FIXHFAILURE;
+		break;
 	    default:
 		break;
 	}
@@ -18767,6 +20702,8 @@
 		break;
 	}	
     }
+    if (pctxt->nberrors != 0)
+	goto exit_error;
     /*
     * Model group definition references:
     * Such a reference is reflected by a particle at the component
@@ -18777,26 +20714,39 @@
     */
     for (i = 0; i < nbItems; i++) {
 	item = items[i];
-	if ((item->type == XML_SCHEMA_TYPE_PARTICLE) &&
-	    (item->children != NULL) &&
-	    (item->children->type == XML_SCHEMA_TYPE_GROUP)) {
-	    xmlSchemaGroupDefReferenceTermFixup(
-		(xmlSchemaParticlePtr) item, pctxt, NULL);
-	    FIXHFAILURE;
+	switch (item->type) {
+	    case XML_SCHEMA_TYPE_SEQUENCE:
+	    case XML_SCHEMA_TYPE_CHOICE:	
+		xmlSchemaModelGroupToModelGroupDefFixup(pctxt,
+		    WXS_MODEL_GROUP_CAST item);
+		break;
+	    default:
+		break;
 	}
     }
     if (pctxt->nberrors != 0)
 	goto exit_error;
     /*
-    * Now that all references are resolved, no circularity occured
-    * and the 'term's of particles was fixed we can:
-    * 1. finish computation of properties of types
-    * 2. restrict type definitions and check those restrictions
-    * 3. extend type definitions and check those extensions
-    *
-    * This is the most complex part during schema construction.
-    * TODO: Maybe it would be better to stop at the first error here.
+    * Expand attribute group references of attribute group definitions.
     */
+    for (i = 0; i < nbItems; i++) {
+	item = items[i];
+	switch (item->type) {
+            case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+		if ((! WXS_ATTR_GROUP_EXPANDED(item)) &&
+		    WXS_ATTR_GROUP_HAS_REFS(item))
+		{
+		    xmlSchemaAttributeGroupExpandRefs(pctxt,
+			WXS_ATTR_GROUP_CAST item);
+		    FIXHFAILURE;
+		}
+		break;
+	    default:
+		break;
+	}
+    }
+    if (pctxt->nberrors != 0)
+	goto exit_error;
     /* 
     * First compute the variety of simple types. This is needed as
     * a seperate step, since otherwise we won't be able to detect
@@ -18806,7 +20756,7 @@
 	item = items[i];
 	switch (item->type) {
             case XML_SCHEMA_TYPE_SIMPLE:
-		if (TYPE_IS_NOT_FIXEDUP_1((xmlSchemaTypePtr) item)) {
+		if (WXS_IS_TYPE_NOT_FIXED_1((xmlSchemaTypePtr) item)) {
 		    xmlSchemaFixupSimpleTypeStageOne(pctxt,
 			(xmlSchemaTypePtr) item);
 		    FIXHFAILURE;
@@ -18816,6 +20766,8 @@
 		break;
 	}
     }
+    if (pctxt->nberrors != 0)
+	goto exit_error;
     /*
     * Detect circular union types. Note that this needs the variety to
     * be already computed.
@@ -18836,39 +20788,130 @@
     }
     if (pctxt->nberrors != 0)
 	goto exit_error;
-    /* Now do the complete type fixup. */
+    
+    /*
+    * Do the complete type fixup for simple types.
+    */
     for (i = 0; i < nbItems; i++) {
 	item = items[i];
 	switch (item->type) {
             case XML_SCHEMA_TYPE_SIMPLE:
-	    case XML_SCHEMA_TYPE_COMPLEX:
-		xmlSchemaTypeFixup((xmlSchemaTypePtr) item, pctxt);
+		if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) {
+		    xmlSchemaFixupSimpleTypeStageTwo(pctxt, WXS_TYPE_CAST item);
+		    FIXHFAILURE;
+		}
+		break;
+	    default:
+		break;
+	}
+    }
+    if (pctxt->nberrors != 0)
+	goto exit_error;
+    /*
+    * At this point we need all simple types to be builded and checked.
+    */
+    /*
+    * Apply contraints for attribute declarations.
+    */
+    for (i = 0; i < nbItems; i++) {
+	item = items[i];
+	switch (item->type) {
+	    case XML_SCHEMA_TYPE_ATTRIBUTE:		
+		xmlSchemaCheckAttrPropsCorrect(pctxt, WXS_ATTR_CAST item);
 		FIXHFAILURE;
+		break;	    
+	    default:
 		break;
+	}
+    }
+    if (pctxt->nberrors != 0)
+	goto exit_error;
+    /*
+    * Apply constraints for attribute uses.
+    */    
+    for (i = 0; i < nbItems; i++) {
+	item = items[i];
+	switch (item->type) {
+	    case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+		if (((xmlSchemaAttributeUsePtr)item)->defValue != NULL) {
+		    xmlSchemaCheckAttrUsePropsCorrect(pctxt,
+			WXS_ATTR_USE_CAST item);
+		    FIXHFAILURE;
+		}
+		break;
 	    default:
 		break;
 	}
     }
     if (pctxt->nberrors != 0)
 	goto exit_error;
-    
+
     /*
-    * Now that we are sure the type definitions are finally constructed,
-    * we can:
-    * 1. check value contraint values of attribute declarations
-    * 2. apply various constraints to element declarations
+    * Apply constraints for attribute group definitions.
     */
     for (i = 0; i < nbItems; i++) {
 	item = items[i];
 	switch (item->type) {
-	    case XML_SCHEMA_TYPE_ATTRIBUTE:
-		if (((xmlSchemaAttributePtr)item)->defValue != NULL) {
-		    xmlSchemaCheckAttrValConstr(
-			(xmlSchemaAttributePtr) item, pctxt);
+	case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+	    if (( (WXS_ATTR_GROUP_CAST item)->attrUses != NULL) &&
+		( (WXS_LIST_CAST (WXS_ATTR_GROUP_CAST item)->attrUses)->nbItems > 1))
+	    {
+		xmlSchemaCheckAGPropsCorrect(pctxt, WXS_ATTR_GROUP_CAST item);
+		FIXHFAILURE;
+	    }
+	    break;
+	default:
+	    break;
+	}
+    }
+    if (pctxt->nberrors != 0)
+	goto exit_error;
+
+    /*
+    * Apply constraints for redefinitions.
+    */
+    if (WXS_CONSTRUCTOR(pctxt)->redefs != NULL)
+	xmlSchemaCheckSRCRedefineSecond(pctxt);
+    if (pctxt->nberrors != 0)
+	goto exit_error;
+
+    /*
+    * Fixup complex types.
+    */
+    for (i = 0; i < nbItems; i++) {
+	item = con->pending->items[i];
+	switch (item->type) {
+	    case XML_SCHEMA_TYPE_COMPLEX:
+		if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) {
+		    xmlSchemaFixupComplexType(pctxt, WXS_TYPE_CAST item);
 		    FIXHFAILURE;
 		}
 		break;
+	    default:
+		break;
+	}
+    }
+    if (pctxt->nberrors != 0)
+	goto exit_error;
+
+    /*
+    * The list could have changed, since xmlSchemaFixupComplexType()
+    * will create particles and model groups in some cases.
+    */
+    items = (xmlSchemaTreeItemPtr *) con->pending->items;
+    nbItems = con->pending->nbItems;
+
+    /*
+    * At this point all complex types need to be builded and checked.
+    */
+    /*
+    * Apply some constraints for element declarations.
+    */
+    for (i = 0; i < nbItems; i++) {
+	item = items[i];
+	switch (item->type) {
 	    case XML_SCHEMA_TYPE_ELEMENT:
+		
 		if ((((xmlSchemaElementPtr) item)->flags & 
 		    XML_SCHEMAS_ELEM_INTERNAL_CHECKED) == 0) {
 		    xmlSchemaCheckElementDeclComponent(
@@ -18886,12 +20929,13 @@
     * Finally we can build the automaton from the content model of
     * complex types.
     */
+
     for (i = 0; i < nbItems; i++) {
 	item = items[i];
 	switch (item->type) {
 	    case XML_SCHEMA_TYPE_COMPLEX:
 		xmlSchemaBuildContentModel((xmlSchemaTypePtr) item, pctxt);
-		FIXHFAILURE;
+		/* FIXHFAILURE; */
 		break;
 	    default:
 		break;
@@ -18899,9 +20943,8 @@
     }
     if (pctxt->nberrors != 0)
 	goto exit_error;
-
     /*
-    * URGENT TODO: cos-element-consistent, cos-all-limited
+    * URGENT TODO: cos-element-consistent
     */    
     con->pending->nbItems = 0;
     return(0);
@@ -18918,7 +20961,6 @@
  *
  * 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
  *
  * Returns the internal XML Schema structure built from the resource or
  *         NULL in case of error
@@ -18959,7 +21001,7 @@
 	/* Take ownership of the constructor to be able to free it. */
 	ctxt->ownsConstructor = 1;
     }
-    ctxt->constructor->schema = schema;
+    ctxt->constructor->mainSchema = schema;
     /*
     * Locate and add the schema document.
     */
@@ -18969,7 +21011,7 @@
     if (res == -1)
 	goto exit_failure;
     if (res != 0)
-	goto exit;
+	goto exit;   
 
     if (bucket == NULL) {
 	/* TODO: Error code, actually we failed to *locate* the schema. */
@@ -19060,10 +21102,33 @@
         return;
     ctxt->error = err;
     ctxt->warning = warn;
-    ctxt->userData = ctx;
+    ctxt->errCtxt = ctx;
+    if (ctxt->vctxt != NULL)
+	xmlSchemaSetValidErrors(ctxt->vctxt, err, warn, ctx);
 }
 
 /**
+ * xmlSchemaSetParserStructuredErrors:
+ * @ctxt:  a schema parser context
+ * @serror:  the structured error function
+ * @ctx: the functions context
+ *
+ * Set the structured error callback
+ */
+void
+xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
+				   xmlStructuredErrorFunc serror,
+				   void *ctx)
+{
+    if (ctxt == NULL)
+	return;
+    ctxt->serror = serror;
+    ctxt->errCtxt = ctx;
+    if (ctxt->vctxt != NULL)
+	xmlSchemaSetValidStructuredErrors(ctxt->vctxt, serror, ctx);
+}
+
+/**
  * xmlSchemaGetParserErrors:
  * @ctxt:  a XMl-Schema parser context
  * @err: the error callback result
@@ -19076,8 +21141,8 @@
  */
 int
 xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
-							 xmlSchemaValidityErrorFunc * err,
-							 xmlSchemaValidityWarningFunc * warn, void **ctx)
+			 xmlSchemaValidityErrorFunc * err,
+			 xmlSchemaValidityWarningFunc * warn, void **ctx)
 {
 	if (ctxt == NULL)
 		return(-1);
@@ -19086,7 +21151,7 @@
 	if (warn != NULL)
 		*warn = ctxt->warning;
 	if (ctx != NULL)
-		*ctx = ctxt->userData;
+		*ctx = ctxt->errCtxt;
 	return(0);
 }
 
@@ -19158,14 +21223,14 @@
 	    */
 	    return(XML_SCHEMA_WHITESPACE_COLLAPSE);
 	}
-    } else if (VARIETY_LIST(type)) {
+    } else if (WXS_IS_LIST(type)) {
 	/*
 	* For list types the facet "whiteSpace" is fixed to "collapse".
 	*/
 	return (XML_SCHEMA_WHITESPACE_COLLAPSE);
-    } else if (VARIETY_UNION(type)) {
+    } else if (WXS_IS_UNION(type)) {
 	return (XML_SCHEMA_WHITESPACE_UNKNOWN);
-    } else if (VARIETY_ATOMIC(type)) {
+    } else if (WXS_IS_ATOMIC(type)) {
 	if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE)
 	    return (XML_SCHEMA_WHITESPACE_PRESERVE);
 	else if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_REPLACE)
@@ -19245,7 +21310,7 @@
 	return(ret);
     if (bucket == NULL) {
 	PERROR_INT("xmlSchemaAssembleByLocation",
-	    "no schema bucket aquired");
+	    "no schema bucket acquired");
 	return(-1);
     } 
     /*
@@ -19283,6 +21348,13 @@
 	* no error yet.
 	*/
 	xmlSchemaFixupComponents(pctxt);
+	ret = pctxt->err;
+	/*
+	* Not nice, but we need somehow to channel the schema parser
+	* error to the validation context.
+	*/
+	if ((ret != 0) && (vctxt->err == 0))
+	    vctxt->err = ret;
 	vctxt->nberrors += pctxt->nberrors;
     } else {
 	/* Add to validation error sum. */ 
@@ -19339,11 +21411,15 @@
     /*
     * Parse the value; we will assume an even number of values
     * to be given (this is how Xerces and XSV work).
+    *
+    * URGENT TODO: !! This needs to work for both
+    * @noNamespaceSchemaLocation AND @schemaLocation on the same
+    * element !!
     */
     iattr = xmlSchemaGetMetaAttrInfo(vctxt,
 	XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC);
     if (iattr == NULL)
-	xmlSchemaGetMetaAttrInfo(vctxt,
+	iattr = xmlSchemaGetMetaAttrInfo(vctxt,
 	XML_SCHEMA_ATTR_INFO_META_XSI_NO_NS_SCHEMA_LOC);
     if (iattr == NULL)
 	return (0);
@@ -19572,7 +21648,7 @@
 	    NULL);
 	return;
     }
-    aidc->bubbleDepth = -1;
+    aidc->keyrefDepth = -1;
     aidc->def = idcDef;
     aidc->next = NULL;
     if (vctxt->aidcs == NULL)
@@ -19581,6 +21657,12 @@
 	aidc->next = vctxt->aidcs;
 	vctxt->aidcs = aidc;
     }
+    /*
+    * Save if we have keyrefs at all.
+    */
+    if ((vctxt->hasKeyrefs == 0) &&
+	(idcDef->type == XML_SCHEMA_TYPE_IDC_KEYREF))
+	vctxt->hasKeyrefs = 1;
 }
 
 /**
@@ -19589,7 +21671,7 @@
  *
  * Creates a new IDC binding.
  *
- * Returns the new binding in case of succeeded, NULL on internal errors.
+ * Returns the new IDC binding, NULL on internal errors.
  */
 static xmlSchemaPSVIIDCBindingPtr
 xmlSchemaIDCNewBinding(xmlSchemaIDCPtr idcDef)
@@ -19613,7 +21695,7 @@
  * @vctxt: the WXS validation context
  * @item: the IDC node table item
  *
- * The validation context is used to store an IDC node table items.
+ * The validation context is used to store IDC node table items.
  * They are stored to avoid copying them if IDC node-tables are merged
  * with corresponding parent IDC node-tables (bubbling).
  *
@@ -19730,7 +21812,7 @@
 }
 
 /**
- * xmlSchemaIDCAquireBinding:
+ * xmlSchemaIDCAcquireBinding:
  * @vctxt: the WXS validation context
  * @matcher: the IDC matcher
  *
@@ -19741,22 +21823,22 @@
  * Returns an IDC binding or NULL on internal errors.
  */
 static xmlSchemaPSVIIDCBindingPtr
-xmlSchemaIDCAquireBinding(xmlSchemaValidCtxtPtr vctxt,
+xmlSchemaIDCAcquireBinding(xmlSchemaValidCtxtPtr vctxt,
 			  xmlSchemaIDCMatcherPtr matcher)
 {
-    xmlSchemaNodeInfoPtr info;
+    xmlSchemaNodeInfoPtr ielem;
 
-    info = vctxt->elemInfos[matcher->depth];
+    ielem = vctxt->elemInfos[matcher->depth];
 
-    if (info->idcTable == NULL) {
-	info->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def);
-	if (info->idcTable == NULL)
+    if (ielem->idcTable == NULL) {
+	ielem->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def);
+	if (ielem->idcTable == NULL)
 	    return (NULL);
-	return(info->idcTable);
+	return(ielem->idcTable);
     } else {
 	xmlSchemaPSVIIDCBindingPtr bind = NULL;
 
-	bind = info->idcTable;
+	bind = ielem->idcTable;
 	do {
 	    if (bind->definition == matcher->aidc->def)
 		return(bind);
@@ -19772,6 +21854,15 @@
     return (NULL);
 }
 
+static xmlSchemaItemListPtr
+xmlSchemaIDCAcquireTargetList(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED,
+			     xmlSchemaIDCMatcherPtr matcher)
+{
+    if (matcher->targets == NULL)
+	matcher->targets = xmlSchemaItemListCreate();
+    return(matcher->targets);
+}
+
 /**
  * xmlSchemaIDCFreeKey:
  * @key: the IDC key
@@ -19795,21 +21886,10 @@
 static void
 xmlSchemaIDCFreeBinding(xmlSchemaPSVIIDCBindingPtr bind)
 {
-    if (bind->nodeTable != NULL) {
-	if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
-	    int i;
-	    /*
-	    * Node-table items for keyrefs are not stored globally
-	    * to the validation context, since they are not bubbled.
-	    * We need to free them here.
-	    */
-	    for (i = 0; i < bind->nbNodes; i++) {
-		xmlFree(bind->nodeTable[i]->keys);
-		xmlFree(bind->nodeTable[i]);
-	    }
-	}
+    if (bind->nodeTable != NULL)
 	xmlFree(bind->nodeTable);
-    }
+    if (bind->dupls != NULL)
+	xmlSchemaItemListFree(bind->dupls);	
     xmlFree(bind);
 }
 
@@ -19849,8 +21929,26 @@
 	    for (i = 0; i < matcher->sizeKeySeqs; i++)
 		if (matcher->keySeqs[i] != NULL)
 		    xmlFree(matcher->keySeqs[i]);
-	    xmlFree(matcher->keySeqs);
+	    xmlFree(matcher->keySeqs);	    
 	}
+	if (matcher->targets != NULL) {
+	    if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) {
+		int i;
+		xmlSchemaPSVIIDCNodePtr idcNode;
+		/*
+		* Node-table items for keyrefs are not stored globally
+		* to the validation context, since they are not bubbled.
+		* We need to free them here.
+		*/
+		for (i = 0; i < matcher->targets->nbItems; i++) {
+		    idcNode =
+			(xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i];
+		    xmlFree(idcNode->keys);
+		    xmlFree(idcNode);
+		}
+	    }
+	    xmlSchemaItemListFree(matcher->targets);
+	}
 	xmlFree(matcher);
 	matcher = next;
     }
@@ -19926,7 +22024,7 @@
     sto->sel = sel;
     sto->nbHistory = 0;
     
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
     xmlGenericError(xmlGenericErrorContext, "IDC:   STO push '%s'\n",
 	sto->sel->xpath);
 #endif
@@ -19955,7 +22053,7 @@
 
     if (nodeType == XML_ATTRIBUTE_NODE)
 	depth++;
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
     {
 	xmlChar *str = NULL;
 	xmlGenericError(xmlGenericErrorContext, 
@@ -19971,7 +22069,7 @@
     first = vctxt->xpathStates;
     sto = first;
     while (sto != head) {
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
 	if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR)
 	    xmlGenericError(xmlGenericErrorContext, "IDC:   ['%s'] selector '%s'\n", 
 		sto->matcher->aidc->def->name, sto->sel->xpath);
@@ -19996,7 +22094,7 @@
 	/*
 	* Full match.
 	*/
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
 	xmlGenericError(xmlGenericErrorContext, "IDC:     "
 	    "MATCH\n");
 #endif
@@ -20034,7 +22132,7 @@
 	    * Activate state objects for the IDC fields of
 	    * the IDC selector.
 	    */
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
 	    xmlGenericError(xmlGenericErrorContext, "IDC:     "
 		"activating field states\n");
 #endif
@@ -20049,7 +22147,7 @@
 	    /*
 	    * An IDC key node was found by the IDC field.
 	    */
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
 	    xmlGenericError(xmlGenericErrorContext,
 		"IDC:     key found\n");
 #endif
@@ -20084,15 +22182,16 @@
 			      int count)
 {
     int i, res;
-    const xmlChar *value = NULL;
+    xmlChar *value = NULL;
 
     *buf = xmlStrdup(BAD_CAST "[");
     for (i = 0; i < count; i++) {
 	*buf = xmlStrcat(*buf, BAD_CAST "'");
-	res = xmlSchemaGetCanonValueWhtsp(seq[i]->val, &value,
-	    xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type));
+	res = xmlSchemaGetCanonValueWhtspExt(seq[i]->val, 
+	    xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type),
+	    &value);
 	if (res == 0)
-	    *buf = xmlStrcat(*buf, value);
+	    *buf = xmlStrcat(*buf, BAD_CAST value);
 	else {
 	    VERROR_INT("xmlSchemaFormatIDCKeySequence",
 		"failed to compute a canonical value");
@@ -20103,7 +22202,7 @@
 	else
 	    *buf = xmlStrcat(*buf, BAD_CAST "'");
 	if (value != NULL) {
-	    xmlFree((xmlChar *) value);
+	    xmlFree(value);
 	    value = NULL;
 	}
     }
@@ -20156,13 +22255,13 @@
     xmlSchemaIDCStateObjPtr sto, nextsto;
     int res, matchDepth;
     xmlSchemaPSVIIDCKeyPtr key = NULL;
-    xmlSchemaTypePtr type = vctxt->inode->typeDef;
+    xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL;
 
     if (vctxt->xpathStates == NULL)
 	return (0);
     sto = vctxt->xpathStates;
 
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
     {
 	xmlChar *str = NULL;
 	xmlGenericError(xmlGenericErrorContext, 
@@ -20182,7 +22281,7 @@
 		"calling xmlStreamPop()");
 	    return (-1);
 	}
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
 	xmlGenericError(xmlGenericErrorContext, "IDC:   stream pop '%s'\n",
 	    sto->sel->xpath);
 #endif
@@ -20199,16 +22298,39 @@
 	    continue;
 	}	
 	if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_FIELD) {
-	    if (! IS_SIMPLE_TYPE(type)) {
+	    /*
+	    * NOTE: According to
+	    *   http://www.w3.org/Bugs/Public/show_bug.cgi?id=2198
+	    *   ... the simple-content of complex types is also allowed.
+	    */
+	    
+	    if (WXS_IS_COMPLEX(type)) {
+		if (WXS_HAS_SIMPLE_CONTENT(type)) {
+		    /*
+		    * Sanity check for complex types with simple content.
+		    */
+		    simpleType = type->contentTypeDef;
+		    if (simpleType == NULL) {
+			VERROR_INT("xmlSchemaXPathProcessHistory",
+			    "field resolves to a CT with simple content "
+			    "but the CT is missing the ST definition");
+			return (-1);
+		    }
+		} else
+		    simpleType = NULL;
+	    } else 
+		simpleType = type;
+	    if (simpleType == NULL) {
 		xmlChar *str = NULL;
+	
 		/*
 		* Not qualified if the field resolves to a node of non
 		* simple type.
 		*/	
 		xmlSchemaCustomErr(ACTXT_CAST vctxt,
 		    XML_SCHEMAV_CVC_IDC, NULL,		    
-		    (xmlSchemaTypePtr) sto->matcher->aidc->def,
-		    "The field '%s' of %s does evaluate to a node of "
+		    WXS_BASIC_CAST sto->matcher->aidc->def,
+		    "The XPath '%s' of a field of %s does evaluate to a node of "
 		    "non-simple type",
 		    sto->sel->xpath,
 		    xmlSchemaGetIDCDesignation(&str, sto->matcher->aidc->def));
@@ -20216,13 +22338,14 @@
 		sto->nbHistory--;
 		goto deregister_check;
 	    }
+	    
 	    if ((key == NULL) && (vctxt->inode->val == NULL)) {
 		/*
 		* Failed to provide the normalized value; maybe
 		* the value was invalid.
 		*/
 		VERROR(XML_SCHEMAV_CVC_IDC,
-		    (xmlSchemaTypePtr) sto->matcher->aidc->def,
+		    WXS_BASIC_CAST sto->matcher->aidc->def,
 		    "Warning: No precomputed value available, the value "
 		    "was either invalid or something strange happend");
 		sto->nbHistory--;
@@ -20237,6 +22360,18 @@
 		* key-sequences. The position in this list is determined
 		* by the target node's depth relative to the matcher's
 		* depth of creation (i.e. the depth of the scope element).
+		* 
+		* Element        Depth    Pos   List-entries
+		* <scope>          0              NULL
+		*   <bar>          1              NULL
+		*     <target/>    2       2      target
+		*   <bar>
+                * </scope>
+		*
+		* The size of the list is only dependant on the depth of
+		* the tree.
+		* An entry will be NULLed in selector_leave, i.e. when
+		* we hit the target's 
 		*/		    
 		pos = sto->depth - matcher->depth;
 		idx = sto->sel->index;
@@ -20289,33 +22424,30 @@
 		keySeq = matcher->keySeqs[pos];		    
 		if (keySeq == NULL) {	
 		    goto create_sequence;
-		} else {
-		    if (keySeq[idx] != NULL) {
-			xmlChar *str = NULL;
-			/*
-			* cvc-identity-constraint:
-			* 3 For each node in the ·target node set· all
-			* of the {fields}, with that node as the context
-			* node, evaluate to either an empty node-set or
-			* a node-set with exactly one member, which must
-			* have a simple type.
-			* 
-			* The key was already set; report an error.
-			*/
-			xmlSchemaCustomErr(ACTXT_CAST vctxt, 
-			    XML_SCHEMAV_CVC_IDC, NULL,
-			    (xmlSchemaTypePtr) matcher->aidc->def,
-			    "The field '%s' of %s evaluates to a node-set "
-			    "with more than one member",
-			    sto->sel->xpath,
-			    xmlSchemaGetIDCDesignation(&str, matcher->aidc->def));
-			FREE_AND_NULL(str);
-			sto->nbHistory--;
-			goto deregister_check;
-		    } else {
-			goto create_key;
-		    }
-		}
+		} else if (keySeq[idx] != NULL) {
+		    xmlChar *str = NULL;
+		    /*
+		    * cvc-identity-constraint:
+		    * 3 For each node in the ·target node set· all
+		    * of the {fields}, with that node as the context
+		    * node, evaluate to either an empty node-set or
+		    * a node-set with exactly one member, which must
+		    * have a simple type.
+		    * 
+		    * The key was already set; report an error.
+		    */
+		    xmlSchemaCustomErr(ACTXT_CAST vctxt, 
+			XML_SCHEMAV_CVC_IDC, NULL,
+			WXS_BASIC_CAST matcher->aidc->def,
+			"The XPath '%s' of a field of %s evaluates to a "
+			"node-set with more than one member",
+			sto->sel->xpath,
+			xmlSchemaGetIDCDesignation(&str, matcher->aidc->def));
+		    FREE_AND_NULL(str);
+		    sto->nbHistory--;
+		    goto deregister_check;
+		} else
+		    goto create_key;		
 		
 create_sequence:
 		/*
@@ -20334,7 +22466,7 @@
 		matcher->keySeqs[pos] = keySeq;
 create_key:
 		/*
-		* Created a key once per node only.
+		* Create a key once per node only.
 		*/  
 		if (key == NULL) {
 		    key = (xmlSchemaPSVIIDCKeyPtr) xmlMalloc(
@@ -20349,7 +22481,7 @@
 		    /*
 		    * Consume the compiled value.
 		    */
-		    key->type = type;
+		    key->type = simpleType;
 		    key->val = vctxt->inode->val;
 		    vctxt->inode->val = NULL;
 		    /*
@@ -20365,10 +22497,11 @@
 	} else if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) {
 		
 	    xmlSchemaPSVIIDCKeyPtr **keySeq = NULL;
-	    xmlSchemaPSVIIDCBindingPtr bind;
+	    /* xmlSchemaPSVIIDCBindingPtr bind; */
 	    xmlSchemaPSVIIDCNodePtr ntItem;
 	    xmlSchemaIDCMatcherPtr matcher;
 	    xmlSchemaIDCPtr idc;
+	    xmlSchemaItemListPtr targets;
 	    int pos, i, j, nbKeys;
 	    /*
 	    * Here we have the following scenario:
@@ -20432,9 +22565,12 @@
 	    * Get the IDC binding from the matcher and check for
 	    * duplicate key-sequences.
 	    */
-	    bind = xmlSchemaIDCAquireBinding(vctxt, matcher);
+#if 0
+	    bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
+#endif
+	    targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher);
 	    if ((idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) && 
-		(bind->nbNodes != 0)) {
+		(targets->nbItems != 0)) {
 		xmlSchemaPSVIIDCKeyPtr ckey, bkey, *bkeySeq;
 		
 		i = 0;
@@ -20443,32 +22579,38 @@
 		* Compare the key-sequences, key by key.
 		*/
 		do {
-		    bkeySeq = bind->nodeTable[i]->keys;		    
+		    bkeySeq =
+			((xmlSchemaPSVIIDCNodePtr) targets->items[i])->keys;
 		    for (j = 0; j < nbKeys; j++) {
 			ckey = (*keySeq)[j];
 			bkey = bkeySeq[j];							
 			res = xmlSchemaAreValuesEqual(ckey->val, bkey->val);
 			if (res == -1) {
 			    return (-1);
-			} else if (res == 0)
+			} else if (res == 0) {
+			    /*
+			    * One of the keys differs, so the key-sequence
+			    * won't be equal; get out.
+			    */
 			    break;
+			}
 		    }
 		    if (res == 1) {
 			/*
-			* Duplicate found.
+			* Duplicate key-sequence found.
 			*/
 			break;
 		    }
 		    i++;
-		} while (i < bind->nbNodes);
-		if (i != bind->nbNodes) {
+		} while (i < targets->nbItems);
+		if (i != targets->nbItems) {
 		    xmlChar *str = NULL, *strB = NULL;
 		    /*   
 		    * TODO: Try to report the key-sequence.
 		    */
 		    xmlSchemaCustomErr(ACTXT_CAST vctxt, 
 			XML_SCHEMAV_CVC_IDC, NULL,
-			(xmlSchemaTypePtr) idc,
+			WXS_BASIC_CAST idc,
 			"Duplicate key-sequence %s in %s",
 			xmlSchemaFormatIDCKeySequence(vctxt, &str,
 			    (*keySeq), nbKeys),
@@ -20493,7 +22635,7 @@
 	    memset(ntItem, 0, sizeof(xmlSchemaPSVIIDCNode));
 	    
 	    /* 
-	    * Store the node-table item on global list.
+	    * Store the node-table item in a global list.
 	    */
 	    if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) {
 		if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) {
@@ -20525,7 +22667,10 @@
 	    ntItem->nodeLine = vctxt->inode->nodeLine;
 	    ntItem->keys = *keySeq;
 	    *keySeq = NULL;
-	    if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1) {		    
+#if 0
+	    if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1) {
+#endif
+	    if (xmlSchemaItemListAdd(targets, ntItem) == -1) {
 		if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
 		    /* 
 		    * Free the item, since keyref items won't be
@@ -20549,7 +22694,7 @@
 		*/
 		xmlSchemaCustomErr(ACTXT_CAST vctxt, 
 		    XML_SCHEMAV_CVC_IDC, NULL,
-		    (xmlSchemaTypePtr) idc,
+		    WXS_BASIC_CAST idc,
 		    "Not all fields of %s evaluate to a node",
 		    xmlSchemaGetIDCDesignation(&str, idc), NULL);
 		FREE_AND_NULL(str);
@@ -20571,7 +22716,7 @@
 	* Deregister state objects if they reach the depth of creation.
 	*/
 	if ((sto->nbHistory == 0) && (sto->depth == depth)) {
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
 	    xmlGenericError(xmlGenericErrorContext, "IDC:   STO pop '%s'\n",
 		sto->sel->xpath);
 #endif
@@ -20619,7 +22764,7 @@
     if (idc == NULL)
 	return (0);
     
-#if DEBUG_IDC
+#ifdef DEBUG_IDC
     {
 	xmlChar *str = NULL;
 	xmlGenericError(xmlGenericErrorContext, 
@@ -20640,14 +22785,18 @@
 	    * Since IDCs bubbles are expensive we need to know the
 	    * depth at which the bubbles should stop; this will be
 	    * the depth of the top-most keyref IDC. If no keyref
-	    * references a key/unique IDC, the bubbleDepth will
+	    * references a key/unique IDC, the keyrefDepth will
 	    * be -1, indicating that no bubbles are needed.
 	    */
 	    refIdc = (xmlSchemaIDCPtr) idc->ref->item;
 	    if (refIdc != NULL) {
 		/*
-		* Lookup the augmented IDC.
+		* Remember that we have keyrefs on this node.
 		*/
+		vctxt->inode->hasKeyrefs = 1;
+		/*
+		* Lookup the referenced augmented IDC info.
+		*/
 		aidc = vctxt->aidcs;
 		while (aidc != NULL) {
 		    if (aidc->def == refIdc)
@@ -20660,9 +22809,9 @@
 			"definition");
 		    return (-1);
 		}		
-		if ((aidc->bubbleDepth == -1) ||
-		    (vctxt->depth < aidc->bubbleDepth))
-		    aidc->bubbleDepth = vctxt->depth;
+		if ((aidc->keyrefDepth == -1) ||
+		    (vctxt->depth < aidc->keyrefDepth))
+		    aidc->keyrefDepth = vctxt->depth;
 	    }
 	}
 	/*
@@ -20699,7 +22848,8 @@
 	matcher->type = IDC_MATCHER;
 	matcher->depth = vctxt->depth;	
 	matcher->aidc = aidc;
-#if DEBUG_IDC	
+	matcher->idcType = aidc->def->type;
+#ifdef DEBUG_IDC	
 	xmlGenericError(xmlGenericErrorContext, "IDC:   register matcher\n");
 #endif 
 	/*
@@ -20714,6 +22864,191 @@
     return (0);
 }
 
+static int
+xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt,
+			   xmlSchemaNodeInfoPtr ielem)
+{
+    xmlSchemaPSVIIDCBindingPtr bind;
+    int res, i, j, k, nbTargets, nbFields, nbDupls, nbNodeTable;
+    xmlSchemaPSVIIDCKeyPtr *keys, *ntkeys;
+    xmlSchemaPSVIIDCNodePtr *targets, *dupls;
+    
+    xmlSchemaIDCMatcherPtr matcher = ielem->idcMatchers;
+    /* vctxt->createIDCNodeTables */
+    while (matcher != NULL) {
+	/*
+	* Skip keyref IDCs and empty IDC target-lists.
+	*/
+	if ((matcher->aidc->def->type == XML_SCHEMA_TYPE_IDC_KEYREF) ||
+	    WXS_ILIST_IS_EMPTY(matcher->targets))
+	{
+	    matcher = matcher->next;
+	    continue;
+	}
+	/*
+	* If we _want_ the IDC node-table to be created in any case
+	* then do so. Otherwise create them only if keyrefs need them.
+	*/
+	if ((! vctxt->createIDCNodeTables) &&
+	    ((matcher->aidc->keyrefDepth == -1) ||
+	     (matcher->aidc->keyrefDepth > vctxt->depth)))
+	{
+	    matcher = matcher->next;
+	    continue;
+	}
+	/*
+	* Get/create the IDC binding on this element for the IDC definition.
+	*/
+	bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
+
+	if (! WXS_ILIST_IS_EMPTY(bind->dupls)) {
+	    dupls = (xmlSchemaPSVIIDCNodePtr *) bind->dupls->items;
+	    nbDupls = bind->dupls->nbItems;
+	} else {
+	    dupls = NULL;
+	    nbDupls = 0;	    
+	}
+	if (bind->nodeTable != NULL) {
+	    nbNodeTable = bind->nbNodes;
+	} else {
+	    nbNodeTable = 0;
+	}
+
+	if ((nbNodeTable == 0) && (nbDupls == 0)) {
+	    /*
+	    * Transfer all IDC target-nodes to the IDC node-table.
+	    */
+	    bind->nodeTable =
+		(xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;		
+	    bind->sizeNodes = matcher->targets->sizeItems;
+	    bind->nbNodes = matcher->targets->nbItems;
+
+	    matcher->targets->items = NULL;
+	    matcher->targets->sizeItems = 0;
+	    matcher->targets->nbItems = 0;	    
+	} else {
+	    /*
+	    * Compare the key-sequences and add to the IDC node-table.
+	    */
+	    nbTargets = matcher->targets->nbItems;
+	    targets = (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;	
+	    nbFields = matcher->aidc->def->nbFields;
+	    i = 0;
+	    do {
+		keys = targets[i]->keys;
+		if (nbDupls) {			
+		    /*
+		    * Search in already found duplicates first.
+		    */
+		    j = 0;
+		    do {						
+			if (nbFields == 1) {
+			    res = xmlSchemaAreValuesEqual(keys[0]->val,
+				dupls[j]->keys[0]->val);
+			    if (res == -1)
+				goto internal_error;
+			    if (res == 1) {
+				/*
+				* Equal key-sequence.
+				*/
+				goto next_target;
+			    }
+			} else {
+			    res = 0;
+			    ntkeys = dupls[j]->keys;
+			    for (k = 0; k < nbFields; k++) {
+				res = xmlSchemaAreValuesEqual(keys[k]->val,
+				    ntkeys[k]->val);
+				if (res == -1)
+				    goto internal_error;
+				if (res == 0) {
+				    /*
+				    * One of the keys differs.
+				    */
+				    break;
+				}
+			    }
+			    if (res == 1) {
+				/*
+				* Equal key-sequence found.
+				*/
+				goto next_target;
+			    }
+			}
+			j++;
+		    } while (j < nbDupls);		    
+		}
+		if (nbNodeTable) {
+		    j = 0;
+		    do {						
+			if (nbFields == 1) {
+			    res = xmlSchemaAreValuesEqual(keys[0]->val,
+				bind->nodeTable[j]->keys[0]->val);
+			    if (res == -1)
+				goto internal_error;
+			    if (res == 0) {
+				/*
+				* The key-sequence differs.
+				*/
+				goto next_node_table_entry;
+			    }
+			} else {
+			    res = 0;
+			    ntkeys = bind->nodeTable[j]->keys;
+			    for (k = 0; k < nbFields; k++) {
+				res = xmlSchemaAreValuesEqual(keys[k]->val,
+				    ntkeys[k]->val);
+				if (res == -1)
+				    goto internal_error;
+				if (res == 0) {
+				    /*
+				    * One of the keys differs.
+				    */
+				    goto next_node_table_entry;
+				}
+			    }
+			}			
+			/*
+			* Add the duplicate to the list of duplicates.
+			*/
+			if (bind->dupls == NULL) {
+			    bind->dupls = xmlSchemaItemListCreate();
+			    if (bind->dupls == NULL)
+				goto internal_error;
+			}		    
+			if (xmlSchemaItemListAdd(bind->dupls, bind->nodeTable[j]) == -1)
+			    goto internal_error;
+			/*
+			* Remove the duplicate entry from the IDC node-table.
+			*/
+			bind->nodeTable[j] = bind->nodeTable[bind->nbNodes -1];
+			bind->nbNodes--;
+
+			goto next_target;
+
+next_node_table_entry:
+			j++;
+		    } while (j < nbNodeTable);
+		}
+		/*
+		* If everything is fine, then add the IDC target-node to
+		* the IDC node-table.
+		*/
+		if (xmlSchemaIDCAppendNodeTableItem(bind, targets[i]) == -1)
+		    goto internal_error;
+
+next_target:
+		i++;
+	    } while (i < nbTargets);
+	}
+	matcher = matcher->next;
+    }
+    return(0);
+
+internal_error:
+    return(-1);
+}
+
 /**
  * xmlSchemaBubbleIDCNodeTables: 
  * @depth: the current tree depth
@@ -20729,26 +23064,11 @@
 xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt)
 {
     xmlSchemaPSVIIDCBindingPtr bind; /* IDC bindings of the current node. */
-    xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL, lastParBind = NULL; /* parent IDC bindings. */
-    xmlSchemaPSVIIDCNodePtr node, parNode = NULL; /* node-table entries. */
-    xmlSchemaPSVIIDCKeyPtr key, parKey; /* keys of in a key-sequence. */
+    xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL; /* parent IDC bindings. */
+    xmlSchemaPSVIIDCNodePtr node, parNode = NULL, *dupls, *parNodes; /* node-table entries. */
     xmlSchemaIDCAugPtr aidc;
-    int i, j, k, ret = 0, oldNum, newDupls;
-    int duplTop;
+    int i, j, k, ret = 0, nbFields, oldNum, oldDupls;
 
-    /*
-    * The node table has the following sections:
-    *
-    *  O --> old node-table entries (first)
-    *  O 
-    *  + --> new node-table entries
-    *  + 
-    *  % --> new duplicate node-table entries    
-    *  % 
-    *  # --> old duplicate node-table entries    
-    *  # (last)
-    *
-    */
     bind = vctxt->inode->idcTable;        
     if (bind == NULL) {
 	/* Fine, no table, no bubbles. */
@@ -20760,136 +23080,160 @@
     * Walk all bindings; create new or add to existing bindings.
     * Remove duplicate key-sequences.
     */
-start_binding:
     while (bind != NULL) {
+	
+	if ((bind->nbNodes == 0) && WXS_ILIST_IS_EMPTY(bind->dupls))
+	    goto next_binding;
 	/*
-	* Skip keyref IDCs.
+	* Check if the key/unique IDC table needs to be bubbled.
 	*/
-	if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
-	    bind = bind->next;
-	    continue;
+	if (! vctxt->createIDCNodeTables) {
+	    aidc = vctxt->aidcs;
+	    do {
+		if (aidc->def == bind->definition) {
+		    if ((aidc->keyrefDepth == -1) || 
+			(aidc->keyrefDepth >= vctxt->depth)) {
+			goto next_binding;
+		    }
+		    break;
+		}
+		aidc = aidc->next;
+	    } while (aidc != NULL);
 	}
+
+	if (parTable != NULL)
+	    parBind = *parTable;
 	/*
-	* Check if the key/unique IDC table needs to be bubbled.
+	* Search a matching parent binding for the
+	* IDC definition.
 	*/
-	aidc = vctxt->aidcs;
-	do {
-	    if (aidc->def == bind->definition) {
-		if ((aidc->bubbleDepth == -1) || 
-		    (aidc->bubbleDepth >= vctxt->depth)) {
-		    bind = bind->next;
-		    goto start_binding;
-		}
+	while (parBind != NULL) {	    
+	    if (parBind->definition == bind->definition)
 		break;
-	    }
-	    aidc = aidc->next;
-	} while (aidc != NULL);
+	    parBind = parBind->next;
+	}
 
-	if (parTable != NULL)
-	    parBind = *parTable;
-	while (parBind != NULL) {
+	if (parBind != NULL) {
 	    /*
-	    * Search a matching parent binding for the
-	    * IDC definition.
+	    * Compare every node-table entry of the child node, 
+	    * i.e. the key-sequence within, ...
 	    */
-	    if (parBind->definition == bind->definition) {
+	    oldNum = parBind->nbNodes; /* Skip newly added items. */
 
+	    if (! WXS_ILIST_IS_EMPTY(parBind->dupls)) {
+		oldDupls = parBind->dupls->nbItems;
+		dupls = (xmlSchemaPSVIIDCNodePtr *) parBind->dupls->items;
+	    } else {
+		dupls = NULL;
+		oldDupls = 0;		
+	    }
+	    
+	    parNodes = parBind->nodeTable;
+	    nbFields = bind->definition->nbFields;
+	    
+	    for (i = 0; i < bind->nbNodes; i++) {
+		node = bind->nodeTable[i];
+		if (node == NULL)
+		    continue;
 		/*
-		* Compare every node-table entry of the child node, 
-		* i.e. the key-sequence within, ...
+		* ...with every key-sequence of the parent node, already
+		* evaluated to be a duplicate key-sequence.
 		*/
-		oldNum = parBind->nbNodes; /* Skip newly added items. */
-		duplTop = oldNum + parBind->nbDupls;
-		newDupls = 0;
-
-		for (i = 0; i < bind->nbNodes; i++) {
-		    node = bind->nodeTable[i];
-		    if (node == NULL)
-			continue;
-		    /*
-		    * ...with every key-sequence of the parent node, already
-		    * evaluated to be a duplicate key-sequence.
-		    */
-		    if (parBind->nbDupls != 0) {
-			j = bind->nbNodes + newDupls; 
-			while (j < duplTop) {
-			    parNode = parBind->nodeTable[j];
-			    for (k = 0; k < bind->definition->nbFields; k++) {
-				key = node->keys[k];
-				parKey = parNode->keys[k];
-				ret = xmlSchemaAreValuesEqual(key->val,
-				    parKey->val);
-				if (ret == -1) {
-				    /* TODO: Internal error */
-				    return(-1);
-				} else if (ret == 0)
+		if (oldDupls) {
+		    j = 0; 
+		    while (j < oldDupls) {
+			if (nbFields == 1) {
+			    ret = xmlSchemaAreValuesEqual(
+				node->keys[0]->val,
+				dupls[j]->keys[0]->val);
+			    if (ret == -1)
+				goto internal_error;
+			    if (ret == 0) {
+				j++;
+				continue;
+			    }
+			} else {
+			    parNode = dupls[j];
+			    for (k = 0; k < nbFields; k++) {
+				ret = xmlSchemaAreValuesEqual(
+				    node->keys[k]->val,
+				    parNode->keys[k]->val);
+				if (ret == -1)
+				    goto internal_error;
+				if (ret == 0)
 				    break;
-
 			    }
-			    if (ret == 1)
-				/* Duplicate found. */
-				break;
-			    j++;
 			}
-			if (j != duplTop) {
+			if (ret == 1)
 			    /* Duplicate found. */
-			    continue;
-			}
-		    }		    
-		    /*
-		    * ... and with every key-sequence of the parent node.
-		    */		    		    
-		    j = 0;
+			    break;
+			j++;
+		    }
+		    if (j != oldDupls) {
+			/* Duplicate found. Skip this entry. */
+			continue;
+		    }
+		}		    
+		/*
+		* ... and with every key-sequence of the parent node.
+		*/
+		if (oldNum) {
+		    j = 0; 
 		    while (j < oldNum) {
-			parNode = parBind->nodeTable[j];
-			/*
-			* Compare key by key. 
-			*/
-			for (k = 0; k < parBind->definition->nbFields; k++) {
-			    key = node->keys[k];
-			    parKey = parNode->keys[k];			
-
-			    ret = xmlSchemaAreValuesEqual(key->val,
-				parKey->val);
-			    if (ret == -1) {
-				/* TODO: Internal error */
-			    } else if (ret == 0)
-				break;
-
+			parNode = parNodes[j];
+			if (nbFields == 1) {
+			    ret = xmlSchemaAreValuesEqual(
+				node->keys[0]->val,
+				parNode->keys[0]->val);
+			    if (ret == -1)
+				goto internal_error;
+			    if (ret == 0) {
+				j++;
+				continue;
+			    }
+			} else {			    
+			    for (k = 0; k < nbFields; k++) {
+				ret = xmlSchemaAreValuesEqual(
+				    node->keys[k]->val,
+				    parNode->keys[k]->val);
+				if (ret == -1)
+				    goto internal_error;
+				if (ret == 0)
+				    break;
+			    }
 			}
 			if (ret == 1)
-			    /*
-			    * The key-sequences are equal.
-			    */
+			    /* Duplicate found. */
 			    break;
 			j++;
 		    }
 		    if (j != oldNum) {
 			/*
-			* Handle duplicates.
-			*/
-			newDupls++;
+			* Handle duplicates. Move the duplicate in
+			* the parent's node-table to the list of
+			* duplicates.
+			*/			
 			oldNum--;
 			parBind->nbNodes--;
 			/*
 			* Move last old item to pos of duplicate.
 			*/
-			parBind->nodeTable[j] = 
-			    parBind->nodeTable[oldNum];
+			parNodes[j] = parNodes[oldNum];
 			
 			if (parBind->nbNodes != oldNum) {
 			    /*
 			    * If new items exist, move last new item to 
 			    * last of old items.
 			    */
-			    parBind->nodeTable[oldNum] = 
-				parBind->nodeTable[parBind->nbNodes];
+			    parNodes[oldNum] = 
+				parNodes[parBind->nbNodes];
 			}
-			/*
-			* Move duplicate to last pos of new/old items.
-			*/
-			parBind->nodeTable[parBind->nbNodes] = parNode;			
-			
+			if (parBind->dupls == NULL) {
+			    parBind->dupls = xmlSchemaItemListCreate();
+			    if (parBind->dupls == NULL)
+				goto internal_error;
+			}
+			xmlSchemaItemListAdd(parBind->dupls, parNode);			
 		    } else {
 			/*
 			* Add the node-table entry (node and key-sequence) of 
@@ -20901,10 +23245,10 @@
 			    if (parBind->nodeTable == NULL) {
 				xmlSchemaVErrMemory(NULL, 
 				    "allocating IDC list of node-table items", NULL);
-				return(-1);
+				goto internal_error;
 			    }
 			    parBind->sizeNodes = 1;
-			} else if (duplTop >= parBind->sizeNodes) {
+			} else if (parBind->nbNodes >= parBind->sizeNodes) {
 			    parBind->sizeNodes *= 2;
 			    parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) 
 				xmlRealloc(parBind->nodeTable, parBind->sizeNodes * 
@@ -20912,71 +23256,94 @@
 			    if (parBind->nodeTable == NULL) {
 				xmlSchemaVErrMemory(NULL, 
 				    "re-allocating IDC list of node-table items", NULL);
-				return(-1);
-			    }
+				goto internal_error;
+			    }			    
 			}
-			
+			parNodes = parBind->nodeTable;
 			/*
-			* Move first old duplicate to last position
-			* of old duplicates +1.
-			*/
-			if (parBind->nbDupls != 0) {
-			    parBind->nodeTable[duplTop] =
-				parBind->nodeTable[parBind->nbNodes + newDupls];
-			}
-			/*
-			* Move first new duplicate to last position of
-			* new duplicates +1.
-			*/
-			if (newDupls != 0) {
-			    parBind->nodeTable[parBind->nbNodes + newDupls] =
-				parBind->nodeTable[parBind->nbNodes];
-			}
-			/*
 			* Append the new node-table entry to the 'new node-table
 			* entries' section.
 			*/
-			parBind->nodeTable[parBind->nbNodes] = node;
-			parBind->nbNodes++;
-			duplTop++;
+			parNodes[parBind->nbNodes++] = node;
 		    }
-		}
-		parBind->nbDupls += newDupls;
-		break;
-	    }
-	    if (parBind->next == NULL)
-		lastParBind = parBind;
-	    parBind = parBind->next;
-	}
-	if ((parBind == NULL) && (bind->nbNodes != 0)) {
+
+		}	
+		
+	    }	
+	} else {
 	    /*
 	    * No binding for the IDC was found: create a new one and
 	    * copy all node-tables.
 	    */
 	    parBind = xmlSchemaIDCNewBinding(bind->definition);
 	    if (parBind == NULL)
-		return(-1);
-
-	    parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) 
-		xmlMalloc(bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr));
-	    if (parBind->nodeTable == NULL) {
-		xmlSchemaVErrMemory(NULL, 
-		    "allocating an array of IDC node-table items", NULL);
-		xmlSchemaIDCFreeBinding(parBind);
-		return(-1);
+		goto internal_error;
+	    
+	    /*
+	    * TODO: Hmm, how to optimize the initial number of
+	    * allocated entries?
+	    */
+	    if (bind->nbNodes != 0) {
+		/*
+		* Add all IDC node-table entries.
+		*/
+		if (! vctxt->psviExposeIDCNodeTables) {
+		    /*
+		    * Just move the entries.
+		    * NOTE: this is quite save here, since
+		    * all the keyref lookups have already been
+		    * performed.
+		    */
+		    parBind->nodeTable = bind->nodeTable;
+		    bind->nodeTable = NULL;
+		    parBind->sizeNodes = bind->sizeNodes;
+		    bind->sizeNodes = 0;
+		    parBind->nbNodes = bind->nbNodes;
+		    bind->nbNodes = 0;
+		} else {
+		    /*
+		    * Copy the entries.
+		    */
+		    parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) 
+			xmlMalloc(bind->nbNodes *
+			sizeof(xmlSchemaPSVIIDCNodePtr));
+		    if (parBind->nodeTable == NULL) {
+			xmlSchemaVErrMemory(NULL, 
+			    "allocating an array of IDC node-table "
+			    "items", NULL);
+			xmlSchemaIDCFreeBinding(parBind);
+			goto internal_error;
+		    }
+		    parBind->sizeNodes = bind->nbNodes;
+		    parBind->nbNodes = bind->nbNodes;
+		    memcpy(parBind->nodeTable, bind->nodeTable,
+			bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr));
+		}
 	    }
-	    parBind->sizeNodes = bind->nbNodes;
-	    parBind->nbNodes = bind->nbNodes;
-	    memcpy(parBind->nodeTable, bind->nodeTable,
-		bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr));
+	    if (bind->dupls) {
+		/*
+		* Move the duplicates.
+		*/
+		if (parBind->dupls != NULL)
+		    xmlSchemaItemListFree(parBind->dupls);
+		parBind->dupls = bind->dupls;
+		bind->dupls = NULL;		
+	    }
 	    if (*parTable == NULL)
 		*parTable = parBind;
-	    else
-		lastParBind->next = parBind;
-	}
+	    else {
+		parBind->next = *parTable;
+		*parTable = parBind;
+	    }	   
+	}	
+
+next_binding:
 	bind = bind->next;
-    }  
+    }
     return (0);
+
+internal_error:
+    return(-1);
 }
 
 /**
@@ -20989,45 +23356,48 @@
 static int
 xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt)
 {
-    xmlSchemaPSVIIDCBindingPtr refbind, bind;
-
-    refbind = vctxt->inode->idcTable;
+    xmlSchemaIDCMatcherPtr matcher;
+    xmlSchemaPSVIIDCBindingPtr bind;
+    
+    matcher = vctxt->inode->idcMatchers;
     /*
     * Find a keyref.
     */
-    while (refbind != NULL) {
-	if (refbind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
-	    int i, j, k, res;
+    while (matcher != NULL) {
+	if ((matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) &&
+	    matcher->targets &&
+	    matcher->targets->nbItems)
+	{
+	    int i, j, k, res, nbFields, hasDupls;
 	    xmlSchemaPSVIIDCKeyPtr *refKeys, *keys;
-	    xmlSchemaPSVIIDCKeyPtr refKey, key;
 	    xmlSchemaPSVIIDCNodePtr refNode = NULL;
 
+	    nbFields = matcher->aidc->def->nbFields;
+
 	    /*
-	    * Find the referred key/unique.
+	    * Find the IDC node-table for the referenced IDC key/unique.
 	    */
 	    bind = vctxt->inode->idcTable;
-	    do {
-		if ((xmlSchemaIDCPtr) refbind->definition->ref->item == 
+	    while (bind != NULL) {
+		if ((xmlSchemaIDCPtr) matcher->aidc->def->ref->item == 
 		    bind->definition)
 		    break;
 		bind = bind->next;
-	    } while (bind != NULL);
-
+	    }
+	    hasDupls = (bind && bind->dupls && bind->dupls->nbItems) ? 1 : 0;
 	    /*
 	    * Search for a matching key-sequences.
 	    */
-	    for (i = 0; i < refbind->nbNodes; i++) {
+	    for (i = 0; i < matcher->targets->nbItems; i++) {
 		res = 0;
-		refNode = refbind->nodeTable[i];
+		refNode = matcher->targets->items[i];
 		if (bind != NULL) {
 		    refKeys = refNode->keys;
 		    for (j = 0; j < bind->nbNodes; j++) {
 			keys = bind->nodeTable[j]->keys;
-			for (k = 0; k < bind->definition->nbFields; k++) {
-			    refKey = refKeys[k];
-			    key = keys[k];
-			    res = xmlSchemaAreValuesEqual(key->val,
-				refKey->val);
+			for (k = 0; k < nbFields; k++) {
+			    res = xmlSchemaAreValuesEqual(keys[k]->val,
+				refKeys[k]->val);
 			    if (res == 0)
 				break;
 			    else if (res == -1) {
@@ -21041,27 +23411,61 @@
 			    break;
 			}
 		    }
+		    if ((res == 0) && hasDupls) {
+			/*
+			* Search in duplicates
+			*/
+			for (j = 0; j < bind->dupls->nbItems; j++) {
+			    keys = ((xmlSchemaPSVIIDCNodePtr)
+				bind->dupls->items[j])->keys;
+			    for (k = 0; k < nbFields; k++) {
+				res = xmlSchemaAreValuesEqual(keys[k]->val,
+				    refKeys[k]->val);
+				if (res == 0)
+				    break;
+				else if (res == -1) {
+				    return (-1);
+				}
+			    }
+			    if (res == 1) {
+				/*
+				* Match in duplicates found.
+				*/
+				xmlChar *str = NULL, *strB = NULL;
+				xmlSchemaKeyrefErr(vctxt,
+				    XML_SCHEMAV_CVC_IDC, refNode,
+				    (xmlSchemaTypePtr) matcher->aidc->def,
+				    "More than one match found for "
+				    "key-sequence %s of keyref '%s'",
+				    xmlSchemaFormatIDCKeySequence(vctxt, &str,
+					refNode->keys, nbFields),
+				    xmlSchemaGetComponentQName(&strB,
+					matcher->aidc->def));
+				FREE_AND_NULL(str);
+				FREE_AND_NULL(strB);
+				break;
+			    }
+			}
+		    }
 		}
+		
 		if (res == 0) {
 		    xmlChar *str = NULL, *strB = NULL;
 		    xmlSchemaKeyrefErr(vctxt,
 			XML_SCHEMAV_CVC_IDC, refNode,
-			(xmlSchemaTypePtr) refbind->definition,
-			"No match found for key-sequence %s of key "
-			"reference '%s'",
+			(xmlSchemaTypePtr) matcher->aidc->def,
+			"No match found for key-sequence %s of keyref '%s'",
 			xmlSchemaFormatIDCKeySequence(vctxt, &str,
-			    refbind->nodeTable[i]->keys,
-			    refbind->definition->nbFields),
-			xmlSchemaFormatQName(&strB,
-			    refbind->definition->targetNamespace,
-			    refbind->definition->name));
+			    refNode->keys, nbFields),
+			xmlSchemaGetComponentQName(&strB, matcher->aidc->def));
 		    FREE_AND_NULL(str);
 		    FREE_AND_NULL(strB);
 		}
 	    }
 	}
-	refbind = refbind->next;
+	matcher = matcher->next;
     }
+    /* TODO: Return an error if any error encountered. */
     return (0);
 }
 
@@ -21183,6 +23587,8 @@
 static void
 xmlSchemaClearElemInfo(xmlSchemaNodeInfoPtr ielem)
 {
+    ielem->hasKeyrefs = 0;
+    ielem->appliedXPath = 0;
     if (ielem->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES) {
 	FREE_AND_NULL(ielem->localName);
 	FREE_AND_NULL(ielem->nsName);
@@ -21196,14 +23602,24 @@
 	ielem->value = NULL;
     }
     if (ielem->val != NULL) {
+	/*
+	* PSVI TODO: Be careful not to free it when the value is
+	* exposed via PSVI.
+	*/
 	xmlSchemaFreeValue(ielem->val);
 	ielem->val = NULL;
     }
     if (ielem->idcMatchers != NULL) {
+	/*
+	* URGENT OPTIMIZE TODO: Use a pool of IDC matchers.
+	*/
 	xmlSchemaIDCFreeMatcherList(ielem->idcMatchers);
 	ielem->idcMatchers = NULL;
     }
     if (ielem->idcTable != NULL) {
+	/*
+	* OPTIMIZE TODO: Use a pool of IDC tables??.
+	*/
 	xmlSchemaIDCFreeIDCTable(ielem->idcTable);
 	ielem->idcTable = NULL;
     }
@@ -21328,9 +23744,9 @@
     if (type->facetSet == NULL)
 	goto pattern_and_enum;
 
-    if (! VARIETY_ATOMIC(type)) {
-	if (VARIETY_LIST(type))
-	    goto variety_list;
+    if (! WXS_IS_ATOMIC(type)) {
+	if (WXS_IS_LIST(type))
+	    goto WXS_IS_LIST;
 	else
 	    goto pattern_and_enum;
     }
@@ -21340,7 +23756,7 @@
     */
     tmpType = xmlSchemaGetPrimitiveType(type);
     if ((tmpType->builtInType == XML_SCHEMAS_STRING) ||
-	IS_ANY_SIMPLE_TYPE(tmpType)) {
+	WXS_IS_ANY_SIMPLE_TYPE(tmpType)) {
 	ws = xmlSchemaGetWhiteSpaceFacetValue(type);
     } else
 	ws = XML_SCHEMA_WHITESPACE_COLLAPSE;
@@ -21393,8 +23809,8 @@
 	ret = 0;
     }
 
-variety_list:
-    if (! VARIETY_LIST(type))
+WXS_IS_LIST:
+    if (! WXS_IS_LIST(type))
 	goto pattern_and_enum;
     /*
     * "length", "minLength" and "maxLength" of list types.
@@ -21579,7 +23995,7 @@
 	if (nsName == NULL) {
 	    ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;
 	    xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL,
-		xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
+		WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
 		"The QName value '%s' has no "
 		"corresponding namespace declaration in "
 		"scope", value, NULL);
@@ -21615,7 +24031,7 @@
 {
     int ret = 0, valNeeded = (retVal) ? 1 : 0;
     xmlSchemaValPtr val = NULL;
-    xmlSchemaWhitespaceValueType ws;
+    /* xmlSchemaWhitespaceValueType ws; */
     xmlChar *normValue = NULL;
 
 #define NORMALIZE(atype) \
@@ -21657,7 +24073,7 @@
 	valNeeded = 1;
     if (value == NULL)
 	value = BAD_CAST "";
-    if (IS_ANY_SIMPLE_TYPE(type) || VARIETY_ATOMIC(type)) {
+    if (WXS_IS_ANY_SIMPLE_TYPE(type) || WXS_IS_ATOMIC(type)) {
 	xmlSchemaTypePtr biType; /* The built-in type. */
 	/*
 	* SPEC (1.2.1) "if {variety} is ·atomic· then the string must ·match·
@@ -21700,7 +24116,7 @@
 			value, &val, valNeeded);
 		    break;
 		default:
-		    ws = xmlSchemaGetWhiteSpaceFacetValue(type);
+		    /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */
 		    if (valNeeded)
 			ret = xmlSchemaValPredefTypeNodeNoNorm(biType,
 			    value, &val, NULL);
@@ -21717,7 +24133,7 @@
 			value, &val, valNeeded);
 		    break;
 		default:
-		    ws = xmlSchemaGetWhiteSpaceFacetValue(type);
+		    /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */
 		    if (valNeeded)
 			ret = xmlSchemaValPredefTypeNodeNoNorm(biType,
 			    value, &val, node);
@@ -21739,7 +24155,7 @@
 		    "validating against a built-in type");
 		goto internal_error;
 	    }
-	    if (VARIETY_LIST(type))
+	    if (WXS_IS_LIST(type))
 		ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
 	    else
 		ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;	    
@@ -21757,7 +24173,7 @@
 			"validating facets of atomic simple type");
 		    goto internal_error;
 		}
-		if (VARIETY_LIST(type)) 
+		if (WXS_IS_LIST(type)) 
 		    ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
 		else
 		    ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;		
@@ -21765,7 +24181,7 @@
 	}
 	if (fireErrors && (ret > 0))
 	    xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1);
-    } else if (VARIETY_LIST(type)) {
+    } else if (WXS_IS_LIST(type)) {
 
 	xmlSchemaTypePtr itemType;
 	const xmlChar *cur, *end;
@@ -21785,7 +24201,7 @@
 	* VAL TODO: Optimize validation of empty values.
 	* VAL TODO: We do not have computed values for lists.
 	*/
-	itemType = GET_LIST_ITEM_TYPE(type);	
+	itemType = WXS_LIST_ITEMTYPE(type);	
 	cur = value;
 	do {
 	    while (IS_BLANK_CH(*cur))
@@ -21852,7 +24268,7 @@
 	    NORMALIZE(type);
 	    xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1);
 	}
-    } else if (VARIETY_UNION(type)) {
+    } else if (WXS_IS_UNION(type)) {
 	xmlSchemaTypeLinkPtr memberLink;
 	/*
 	* TODO: For all datatypes ·derived· by ·union·  whiteSpace does
@@ -21993,7 +24409,7 @@
 	    if (*nsName == NULL) {
 		xmlSchemaCustomErr(ACTXT_CAST vctxt,
 		    XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, NULL,
-		    xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
+		    WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
 		    "The QName value '%s' has no "
 		    "corresponding namespace declaration in scope",
 		    value, NULL);
@@ -22055,7 +24471,7 @@
 
 	    xmlSchemaCustomErr(ACTXT_CAST vctxt,
 		XML_SCHEMAV_CVC_ELT_4_2, NULL,
-		xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
+		WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
 		"The QName value '%s' of the xsi:type attribute does not "
 		"resolve to a type definition",
 		xmlSchemaFormatQName(&str, nsName, local), NULL);
@@ -22081,6 +24497,11 @@
 	    * {disallowed substitutions}: the "block" on the element decl.
 	    * {prohibited substitutions}: the "block" on the type def.
 	    */
+	    /*
+	    * OPTIMIZE TODO: We could map types already evaluated
+	    * to be validly derived from other types to avoid checking
+	    * this over and over for the same types.
+	    */
 	    if ((elemDecl->flags & XML_SCHEMAS_ELEM_BLOCK_EXTENSION) ||
 		(elemDecl->subtypes->flags &
 		    XML_SCHEMAS_TYPE_BLOCK_EXTENSION))
@@ -22091,7 +24512,18 @@
 		    XML_SCHEMAS_TYPE_BLOCK_RESTRICTION))
 		set |= SUBSET_RESTRICTION;
 
-	    if (xmlSchemaCheckCOSDerivedOK(*localType,
+	    /*
+	    * REMOVED and CHANGED since this produced a parser context
+	    * which adds to the string dict of the schema. So this would
+	    * change the schema and we don't want this. We don't need
+	    * the parser context anymore.
+	    *
+	    * if ((vctxt->pctxt == NULL) &&
+	    *	(xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1))
+	    *	    return (-1);
+	    */
+
+	    if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST vctxt, *localType,
 		elemDecl->subtypes, set) != 0) {
 		xmlChar *str = NULL;
 
@@ -22122,7 +24554,7 @@
 xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
 {
     xmlSchemaElementPtr elemDecl = vctxt->inode->decl;
-    xmlSchemaTypePtr actualType = ELEM_TYPE(elemDecl);
+    xmlSchemaTypePtr actualType = WXS_ELEM_TYPEDEF(elemDecl);
 
     /*
     * cvc-elt (3.3.4) : 1
@@ -22318,11 +24750,12 @@
 static int
 xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
 {
-    xmlSchemaTypePtr type = vctxt->inode->typeDef;
-    xmlSchemaAttributeLinkPtr attrUseLink;
-    xmlSchemaAttributePtr attrUse = NULL, attrDecl = NULL;
-    xmlSchemaAttrInfoPtr attr, tmpAttr;
-    int i, found, nbAttrs;
+    xmlSchemaTypePtr type = vctxt->inode->typeDef;    
+    xmlSchemaItemListPtr attrUseList;
+    xmlSchemaAttributeUsePtr attrUse = NULL;
+    xmlSchemaAttributePtr attrDecl = NULL;
+    xmlSchemaAttrInfoPtr iattr, tmpiattr;
+    int i, j, found, nbAttrs, nbUses;
     int xpathRes = 0, res, wildIDs = 0, fixed;
 
     /*
@@ -22343,33 +24776,33 @@
     * noNamespaceSchemaLocation, the appropriate case among the following
     * must be true:
     *
-    */  
+    */
+    attrUseList = (xmlSchemaItemListPtr) type->attrUses;
+    /*
+    * @nbAttrs is the number of attributes present in the instance.
+    */
     nbAttrs = vctxt->nbAttrInfos;
-    for (attrUseLink = type->attributeUses; attrUseLink != NULL;
-	attrUseLink = attrUseLink->next) {
-
+    if (attrUseList != NULL)
+	nbUses = attrUseList->nbItems;
+    else
+	nbUses = 0;
+    for (i = 0; i < nbUses; i++) {
         found = 0;
-	attrUse = attrUseLink->attr;
-	/*
-	* VAL TODO: Implement a real "attribute use" component.
-	*/
-	if (attrUse->refDecl != NULL)
-	    attrDecl = attrUse->refDecl;
-	else
-	    attrDecl = attrUse;
-        for (i = 0; i < nbAttrs; i++) {
-	    attr = vctxt->attrInfos[i];
+	attrUse = attrUseList->items[i];
+	attrDecl = WXS_ATTRUSE_DECL(attrUse);
+        for (j = 0; j < nbAttrs; j++) {
+	    iattr = vctxt->attrInfos[j];
 	    /*
 	    * SPEC (cvc-complex-type) (3)
 	    * Skip meta attributes.
 	    */
-	    if (attr->metaType)
+	    if (iattr->metaType)
 		continue;
-	    if (attr->localName[0] != attrDecl->name[0])
+	    if (iattr->localName[0] != attrDecl->name[0])
 		continue;
-	    if (!xmlStrEqual(attr->localName, attrDecl->name))
+	    if (!xmlStrEqual(iattr->localName, attrDecl->name))
 		continue;
-	    if (!xmlStrEqual(attr->nsName, attrDecl->targetNamespace))
+	    if (!xmlStrEqual(iattr->nsName, attrDecl->targetNamespace))
 		continue;
 	    found = 1;
 	    /*
@@ -22388,13 +24821,13 @@
 	    * Assessment (Attribute) (§3.2.4) and
 	    * Assessment Outcome (Attribute) (§3.2.5).
 	    */
-	    attr->state = XML_SCHEMAS_ATTR_ASSESSED;
-	    attr->use = attrUse;
+	    iattr->state = XML_SCHEMAS_ATTR_ASSESSED;
+	    iattr->use = attrUse;
 	    /*
 	    * Context-determined declaration.
 	    */
-	    attr->decl = attrDecl;
-	    attr->typeDef = attrDecl->subtypes;
+	    iattr->decl = attrDecl;
+	    iattr->typeDef = attrDecl->subtypes;
 	    break;
 	}
 
@@ -22411,39 +24844,41 @@
 	    * of the attribute information items in the element information
 	    * item's [attributes] as per clause 3.1 above."
 	    */
-	    tmpAttr = xmlSchemaGetFreshAttrInfo(vctxt);
-	    if (tmpAttr == NULL) {
+	    tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt);
+	    if (tmpiattr == NULL) {
 		VERROR_INT(
 		    "xmlSchemaVAttributesComplex",
 		    "calling xmlSchemaGetFreshAttrInfo()");
 		return (-1);
 	    }
-	    tmpAttr->state = XML_SCHEMAS_ATTR_ERR_MISSING;
-	    tmpAttr->use = attrUse;
-	    tmpAttr->decl = attrDecl;	    
+	    tmpiattr->state = XML_SCHEMAS_ATTR_ERR_MISSING;
+	    tmpiattr->use = attrUse;
+	    tmpiattr->decl = attrDecl;	    
 	} else if ((attrUse->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) &&
 	    ((attrUse->defValue != NULL) ||
 	     (attrDecl->defValue != NULL))) {
 	    /*
 	    * Handle non-existent, optional, default/fixed attributes.
 	    */
-	    tmpAttr = xmlSchemaGetFreshAttrInfo(vctxt);
-	    if (tmpAttr == NULL) {
+	    tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt);
+	    if (tmpiattr == NULL) {
 		VERROR_INT(
 		    "xmlSchemaVAttributesComplex",
 		    "calling xmlSchemaGetFreshAttrInfo()");
 		return (-1);
 	    }
-	    tmpAttr->state = XML_SCHEMAS_ATTR_DEFAULT;
-	    tmpAttr->use = attrUse;
-	    tmpAttr->decl = attrDecl;
-	    tmpAttr->typeDef = attrDecl->subtypes;
-	    tmpAttr->localName = attrDecl->name;
-	    tmpAttr->nsName = attrDecl->targetNamespace;
+	    tmpiattr->state = XML_SCHEMAS_ATTR_DEFAULT;
+	    tmpiattr->use = attrUse;
+	    tmpiattr->decl = attrDecl;
+	    tmpiattr->typeDef = attrDecl->subtypes;
+	    tmpiattr->localName = attrDecl->name;
+	    tmpiattr->nsName = attrDecl->targetNamespace;
 	}
     }
+
     if (vctxt->nbAttrInfos == 0)
 	return (0);
+    nbUses = vctxt->nbAttrInfos;
     /*
     * Validate against the wildcard.
     */
@@ -22453,12 +24888,12 @@
 	* (3.2.1) "There must be an {attribute wildcard}."
 	*/
 	for (i = 0; i < nbAttrs; i++) {
-	    attr = vctxt->attrInfos[i];
+	    iattr = vctxt->attrInfos[i];
 	    /*
 	    * SPEC (cvc-complex-type) (3)
 	    * Skip meta attributes.
 	    */
-	    if (attr->state != XML_SCHEMAS_ATTR_UNKNOWN)
+	    if (iattr->state != XML_SCHEMAS_ATTR_UNKNOWN)
 		continue;
 	    /*
 	    * SPEC (cvc-complex-type)
@@ -22471,7 +24906,7 @@
 	    * Namespace Name (§3.10.4)."
 	    */
 	    if (xmlSchemaCheckCVCWildcardNamespace(type->attributeWildcard,
-		    attr->nsName)) {
+		    iattr->nsName) == 0) {
 		/*
 		* Handle processContents.
 		*
@@ -22490,16 +24925,16 @@
 		    * [validity] = "notKnown"
 		    * [validation attempted] = "none"
 		    */
-		    attr->state = XML_SCHEMAS_ATTR_WILD_SKIP;
+		    iattr->state = XML_SCHEMAS_ATTR_WILD_SKIP;
 		    continue;
 		}
 		/*
 		* Find an attribute declaration.
 		*/
-		attr->decl = xmlSchemaGetAttributeDecl(vctxt->schema,
-		    attr->localName, attr->nsName);
-		if (attr->decl != NULL) {
-		    attr->state = XML_SCHEMAS_ATTR_ASSESSED;
+		iattr->decl = xmlSchemaGetAttributeDecl(vctxt->schema,
+		    iattr->localName, iattr->nsName);
+		if (iattr->decl != NULL) {
+		    iattr->state = XML_SCHEMAS_ATTR_ASSESSED;
 		    /*
 		    * SPEC (cvc-complex-type)
 		    * (5) "Let [Definition:]  the wild IDs be the set of
@@ -22513,16 +24948,16 @@
 		    * or is derived from ID. Then all of the following
 		    * must be true:"
 		    */
-		    attr->typeDef = attr->decl->subtypes;
+		    iattr->typeDef = WXS_ATTR_TYPEDEF(iattr->decl);
 		    if (xmlSchemaIsDerivedFromBuiltInType(
-			attr->typeDef, XML_SCHEMAS_ID)) {
+			iattr->typeDef, XML_SCHEMAS_ID)) {
 			/*
 			* SPEC (5.1) "There must be no more than one
 			* item in ·wild IDs·."
 			*/
 			if (wildIDs != 0) {
 			    /* VAL TODO */
-			    attr->state = XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID;
+			    iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID;
 			    TODO
 			    continue;
 			}
@@ -22534,34 +24969,32 @@
 			* whose {attribute declaration}'s {type definition}
 			* is or is derived from ID."
 			*/
-			for (attrUseLink = type->attributeUses;
-			    attrUseLink != NULL;
-			    attrUseLink = attrUseLink->next) {
+			for (j = 0; j < attrUseList->nbItems; j++) {
 			    if (xmlSchemaIsDerivedFromBuiltInType(
-				attrUseLink->attr->subtypes,
+				WXS_ATTRUSE_TYPEDEF(attrUseList->items[j]),
 				XML_SCHEMAS_ID)) {
-				/* VAL TODO */
-				attr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID;
+				/* URGENT VAL TODO: implement */
+				iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID;
 				TODO
+				break;
 			    }
 			}
 		    }
 		} else if (type->attributeWildcard->processContents ==
 		    XML_SCHEMAS_ANY_LAX) {
-		    attr->state = XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL;
+		    iattr->state = XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL;
 		    /*
 		    * SPEC PSVI Assessment Outcome (Attribute)
 		    * [validity] = "notKnown"
 		    * [validation attempted] = "none"
 		    */
 		} else {
-		    attr->state = XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL;
+		    iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL;
 		}
 	    }
 	}
     }
 
-
     if (vctxt->nbAttrInfos == 0)
 	return (0);
 
@@ -22569,24 +25002,24 @@
     * Validate values, create default attributes, evaluate IDCs.
     */
     for (i = 0; i < vctxt->nbAttrInfos; i++) {
-	attr = vctxt->attrInfos[i];
+	iattr = vctxt->attrInfos[i];
 	/*
 	* VAL TODO: Note that we won't try to resolve IDCs to
 	* "lax" and "skip" validated attributes. Check what to
 	* do in this case.
 	*/
-	if ((attr->state != XML_SCHEMAS_ATTR_ASSESSED) &&
-	    (attr->state != XML_SCHEMAS_ATTR_DEFAULT))
+	if ((iattr->state != XML_SCHEMAS_ATTR_ASSESSED) &&
+	    (iattr->state != XML_SCHEMAS_ATTR_DEFAULT))
 	    continue;
 	/*
 	* VAL TODO: What to do if the type definition is missing?
 	*/
-	if (attr->typeDef == NULL) {
-	    attr->state = XML_SCHEMAS_ATTR_ERR_NO_TYPE;
+	if (iattr->typeDef == NULL) {
+	    iattr->state = XML_SCHEMAS_ATTR_ERR_NO_TYPE;
 	    continue;
 	}
 
-	ACTIVATE_ATTRIBUTE(attr);
+	ACTIVATE_ATTRIBUTE(iattr);
 	fixed = 0;
 	xpathRes = 0;
 
@@ -22603,30 +25036,30 @@
 	    }
 	}
 
-	if (attr->state == XML_SCHEMAS_ATTR_DEFAULT) {
+	if (iattr->state == XML_SCHEMAS_ATTR_DEFAULT) {
 	    /*
 	    * Default/fixed attributes.
 	    */
 	    if (xpathRes) {
-		if (attr->use->defValue == NULL) {
-		    attr->value = (xmlChar *) attr->use->defValue;
-		    attr->val = attr->use->defVal;
+		if (iattr->use->defValue != NULL) {
+		    iattr->value = (xmlChar *) iattr->use->defValue;
+		    iattr->val = iattr->use->defVal;
 		} else {
-		    attr->value = (xmlChar *) attr->decl->defValue;
-		    attr->val = attr->decl->defVal;
+		    iattr->value = (xmlChar *) iattr->decl->defValue;
+		    iattr->val = iattr->decl->defVal;
 		}
 		/*
 		* IDCs will consume the precomputed default value,
 		* so we need to clone it.
 		*/
-		if (attr->val == NULL) {
+		if (iattr->val == NULL) {
 		    VERROR_INT("xmlSchemaVAttributesComplex",
 			"default/fixed value on an attribute use was "
 			"not precomputed");
 		    goto internal_error;
 		}
-		attr->val = xmlSchemaCopyValue(attr->val);
-		if (attr->val == NULL) {
+		iattr->val = xmlSchemaCopyValue(iattr->val);
+		if (iattr->val == NULL) {
 		    VERROR_INT("xmlSchemaVAttributesComplex",
 			"calling xmlSchemaCopyValue()");
 		    goto internal_error;
@@ -22638,22 +25071,22 @@
 	    *   uses the *initial* value.
 	    */
 	    if ((vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) &&
-		(attr->node != NULL) && (attr->node->doc != NULL)) {
+		(iattr->node != NULL) && (iattr->node->doc != NULL)) {
 		xmlChar *normValue;
 		const xmlChar *value;
 
-		value = attr->value;
+		value = iattr->value;
 		/*
 		* Normalize the value.
 		*/
-		normValue = xmlSchemaNormalizeValue(attr->typeDef,
-		    attr->value);
+		normValue = xmlSchemaNormalizeValue(iattr->typeDef,
+		    iattr->value);
 		if (normValue != NULL)
 		    value = BAD_CAST normValue;
 
-		if (attr->nsName == NULL) {
-		    if (xmlNewProp(attr->node->parent,
-			attr->localName, value) == NULL) {
+		if (iattr->nsName == NULL) {
+		    if (xmlNewProp(iattr->node->parent,
+			iattr->localName, value) == NULL) {
 			VERROR_INT("xmlSchemaVAttributesComplex",
 			    "callling xmlNewProp()");
 			if (normValue != NULL)
@@ -22663,8 +25096,8 @@
 		} else {
 		    xmlNsPtr ns;
 
-		    ns = xmlSearchNsByHref(attr->node->doc,
-			attr->node->parent, attr->nsName);
+		    ns = xmlSearchNsByHref(iattr->node->doc,
+			iattr->node->parent, iattr->nsName);
 		    if (ns == NULL) {
 			xmlChar prefix[12];
 			int counter = 0;
@@ -22675,8 +25108,8 @@
 			*/
 			do {
 			    snprintf((char *) prefix, 12, "p%d", counter++);
-			    ns = xmlSearchNs(attr->node->doc,
-				attr->node->parent, BAD_CAST prefix);
+			    ns = xmlSearchNs(iattr->node->doc,
+				iattr->node->parent, BAD_CAST prefix);
 			    if (counter > 1000) {
 				VERROR_INT(
 				    "xmlSchemaVAttributesComplex",
@@ -22688,10 +25121,16 @@
 			    }
 			} while (ns != NULL);
 			ns = xmlNewNs(vctxt->validationRoot,
-			    attr->nsName, BAD_CAST prefix);
+			    iattr->nsName, BAD_CAST prefix);
 		    }
-		    xmlNewNsProp(attr->node->parent, ns,
-			attr->localName, value);
+		    /*
+		    * TODO:
+		    * http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0406.html
+		    * If we have QNames: do we need to ensure there's a
+		    * prefix defined for the QName?
+		    */
+		    xmlNewNsProp(iattr->node->parent, ns,
+			iattr->localName, value);
 		}
 		if (normValue != NULL)
 		    xmlFree(normValue);
@@ -22715,9 +25154,9 @@
 	* Note that the attribute *use* can be unavailable, if
 	* the attribute was a wild attribute.
 	*/
-	if ((attr->decl->flags & XML_SCHEMAS_ATTR_FIXED) ||
-	    ((attr->use != NULL) &&
-	     (attr->use->flags & XML_SCHEMAS_ATTR_FIXED)))
+	if ((iattr->decl->flags & XML_SCHEMAS_ATTR_FIXED) ||
+	    ((iattr->use != NULL) &&
+	     (iattr->use->flags & XML_SCHEMAS_ATTR_FIXED)))
 	    fixed = 1;
 	else
 	    fixed = 0;
@@ -22731,18 +25170,18 @@
 	* "normalized attribute value" here?
 	*/
 	if (xpathRes || fixed) {
-	    attr->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED;
+	    iattr->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED;
 	    /*
 	    * Request a computed value.
 	    */
 	    res = xmlSchemaVCheckCVCSimpleType(
 		ACTXT_CAST vctxt,
-		attr->node, attr->typeDef, attr->value, &(attr->val),
+		iattr->node, iattr->typeDef, iattr->value, &(iattr->val),
 		1, 1, 0);
 	} else {
 	    res = xmlSchemaVCheckCVCSimpleType(
 		ACTXT_CAST vctxt,
-		attr->node, attr->typeDef, attr->value, NULL,
+		iattr->node, iattr->typeDef, iattr->value, NULL,
 		1, 0, 0);
 	}
 	    
@@ -22752,7 +25191,7 @@
 		    "calling xmlSchemaStreamValidateSimpleTypeValue()");
 		goto internal_error;
 	    }
-	    attr->state = XML_SCHEMAS_ATTR_INVALID_VALUE;
+	    iattr->state = XML_SCHEMAS_ATTR_INVALID_VALUE;
 	    /*
 	    * SPEC PSVI Assessment Outcome (Attribute)
 	    * [validity] = "invalid"
@@ -22760,8 +25199,7 @@
 	    goto eval_idcs;
 	}
 
-	if (fixed) {
-	    int ws;
+	if (fixed) {	    
 	    /*
 	    * SPEC Attribute Locally Valid (Use) (cvc-au)
 	    * "For an attribute information item to be·valid·
@@ -22778,43 +25216,42 @@
 	    * (4) "The item's *actual* value· must match the *value* of
 	    * the {value constraint}, if it is present and fixed."
 	    */
-	    ws = xmlSchemaGetWhiteSpaceFacetValue(attr->typeDef);
-	    if (attr->val == NULL) {
+	    if (iattr->val == NULL) {
 		/* VAL TODO: A value was not precomputed. */
 		TODO
 		goto eval_idcs;
 	    }
-	    if ((attr->use != NULL) &&
-		(attr->use->defValue != NULL)) {
-		if (attr->use->defVal == NULL) {
+	    if ((iattr->use != NULL) &&
+		(iattr->use->defValue != NULL)) {
+		if (iattr->use->defVal == NULL) {
 		    /* VAL TODO: A default value was not precomputed. */
 		    TODO
 		    goto eval_idcs;
 		}
-		attr->vcValue = attr->use->defValue;
+		iattr->vcValue = iattr->use->defValue;
 		/*
 		if (xmlSchemaCompareValuesWhtsp(attr->val,
 		    (xmlSchemaWhitespaceValueType) ws,
 		    attr->use->defVal,
 		    (xmlSchemaWhitespaceValueType) ws) != 0) {
 		*/
-		if (! xmlSchemaAreValuesEqual(attr->val, attr->use->defVal))
-		    attr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE;
+		if (! xmlSchemaAreValuesEqual(iattr->val, iattr->use->defVal))
+		    iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE;
 	    } else {
-		if (attr->decl->defVal == NULL) {
+		if (iattr->decl->defVal == NULL) {
 		    /* VAL TODO: A default value was not precomputed. */
 		    TODO
 		    goto eval_idcs;
 		}
-		attr->vcValue = attr->decl->defValue;
+		iattr->vcValue = iattr->decl->defValue;
 		/*
 		if (xmlSchemaCompareValuesWhtsp(attr->val,
 		    (xmlSchemaWhitespaceValueType) ws,
 		    attrDecl->defVal,
 		    (xmlSchemaWhitespaceValueType) ws) != 0) {
 		*/
-		if (! xmlSchemaAreValuesEqual(attr->val, attr->decl->defVal))
-		    attr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE;
+		if (! xmlSchemaAreValuesEqual(iattr->val, iattr->decl->defVal))
+		    iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE;
 	    }
 	    /*
 	    * [validity] = "valid"
@@ -22839,14 +25276,14 @@
     * Report errors.
     */
     for (i = 0; i < vctxt->nbAttrInfos; i++) {
-	attr = vctxt->attrInfos[i];
-	if ((attr->state == XML_SCHEMAS_ATTR_META) ||
-	    (attr->state == XML_SCHEMAS_ATTR_ASSESSED) ||
-	    (attr->state == XML_SCHEMAS_ATTR_WILD_SKIP) ||
-	    (attr->state == XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL))
+	iattr = vctxt->attrInfos[i];
+	if ((iattr->state == XML_SCHEMAS_ATTR_META) ||
+	    (iattr->state == XML_SCHEMAS_ATTR_ASSESSED) ||
+	    (iattr->state == XML_SCHEMAS_ATTR_WILD_SKIP) ||
+	    (iattr->state == XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL))
 	    continue;
-	ACTIVATE_ATTRIBUTE(attr);
-	switch (attr->state) {
+	ACTIVATE_ATTRIBUTE(iattr);
+	switch (iattr->state) {
 	    case XML_SCHEMAS_ATTR_ERR_MISSING: {
 		    xmlChar *str = NULL;
 		    ACTIVATE_ELEM;
@@ -22854,8 +25291,8 @@
 			XML_SCHEMAV_CVC_COMPLEX_TYPE_4, NULL, NULL,
 			"The attribute '%s' is required but missing",
 			xmlSchemaFormatQName(&str,
-			    attr->decl->targetNamespace,
-			    attr->decl->name),
+			    iattr->decl->targetNamespace,
+			    iattr->decl->name),
 			NULL);
 		    FREE_AND_NULL(str)
 		    break;
@@ -22869,7 +25306,7 @@
 		    XML_SCHEMAV_CVC_AU, NULL, NULL,
 		    "The value '%s' does not match the fixed "
 		    "value constraint '%s'", 
-		    attr->value, attr->vcValue);		
+		    iattr->value, iattr->vcValue);		
 		break;
 	    case XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL:
 		VERROR(XML_SCHEMAV_CVC_WILDCARD, NULL,
@@ -22877,7 +25314,7 @@
 		    "demanded by the strict wildcard");
 		break;
 	    case XML_SCHEMAS_ATTR_UNKNOWN:
-		if (attr->metaType)
+		if (iattr->metaType)
 		    break;
 		/*
 		* MAYBE VAL TODO: One might report different error messages
@@ -22885,10 +25322,10 @@
 		*/
 		if (type->attributeWildcard == NULL) {
 		    xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt,
-			XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, attr, NULL);
+			XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, iattr, NULL);
 		} else {
 		    xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt,
-			XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, attr, NULL);
+			XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, iattr, NULL);
 		}
 		break;
 	    default:
@@ -22939,7 +25376,7 @@
     }
     if (wild->processContents == XML_SCHEMAS_ANY_STRICT) {
 	/* VAL TODO: Change to proper error code. */
-	VERROR(XML_SCHEMAV_CVC_ELT_1, (xmlSchemaTypePtr) wild,
+	VERROR(XML_SCHEMAV_CVC_ELT_1, NULL, /* WXS_BASIC_CAST wild */
 	    "No matching global element declaration available, but "
 	    "demanded by the strict wildcard");
 	return (vctxt->err);
@@ -22999,7 +25436,7 @@
     * For a string to be a valid default with respect to a type 
     * definition the appropriate case among the following must be true:
     */    
-    if IS_COMPLEX_TYPE(inode->typeDef) {
+    if WXS_IS_COMPLEX(inode->typeDef) {
 	/*
 	* Complex type.
 	*
@@ -23009,9 +25446,9 @@
 	* type}'s particle must be ·emptiable· as defined by 
 	* Particle Emptiable (§3.9.6)."
 	*/
-	if ((! HAS_SIMPLE_CONTENT(inode->typeDef)) &&
-	    ((! HAS_MIXED_CONTENT(inode->typeDef)) ||
-	     (! IS_PARTICLE_EMPTIABLE(inode->typeDef)))) {
+	if ((! WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) &&
+	    ((! WXS_HAS_MIXED_CONTENT(inode->typeDef)) ||
+	     (! WXS_EMPTIABLE(inode->typeDef)))) {
 	    ret = XML_SCHEMAP_COS_VALID_DEFAULT_2_1;
 	    /* NOTE that this covers (2.2.2) as well. */
 	    VERROR(ret, NULL,
@@ -23032,12 +25469,12 @@
     * string must be ·valid· with respect to that simple type definition 
     * as defined by String Valid (§3.14.4).
     */  
-    if (IS_SIMPLE_TYPE(inode->typeDef)) {
+    if (WXS_IS_SIMPLE(inode->typeDef)) {
 
 	ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt,
 	    NULL, inode->typeDef, value, val, 1, 1, 0);
 
-    } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) {
+    } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
 
 	ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt,
 	    NULL, inode->typeDef->contentTypeDef, value, val, 1, 1, 0);
@@ -23224,10 +25661,10 @@
 	/*
 	* Speedup if no declaration exists.
 	*/
-	if (IS_SIMPLE_TYPE(inode->typeDef)) {	    
+	if (WXS_IS_SIMPLE(inode->typeDef)) {	    
 	    ret = xmlSchemaVCheckINodeDataType(vctxt,
 		inode, inode->typeDef, inode->value);
-	} else if (HAS_SIMPLE_CONTENT(inode->typeDef)) {
+	} else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
 	    ret = xmlSchemaVCheckINodeDataType(vctxt,
 		inode, inode->typeDef->contentTypeDef,
 		inode->value);
@@ -23260,7 +25697,7 @@
 	* defined in Element Default Valid (Immediate) (§3.3.6). 
 	*/
 	/* 
-	* NOTE: 'local' above means types aquired by xsi:type.
+	* NOTE: 'local' above means types acquired by xsi:type.
 	* NOTE: Although the *canonical* value is stated, it is not
 	* relevant if canonical or not. Additionally XML Schema 1.1
 	* will removed this requirement as well.
@@ -23291,10 +25728,10 @@
 	* ·actual type definition· as defined by Element Locally Valid (Type)
 	* (§3.3.4).
 	*/	    
-	if (IS_SIMPLE_TYPE(inode->typeDef)) {
+	if (WXS_IS_SIMPLE(inode->typeDef)) {
 	    ret = xmlSchemaVCheckINodeDataType(vctxt,
 		inode, inode->typeDef, inode->decl->value);
-	} else if (HAS_SIMPLE_CONTENT(inode->typeDef)) {
+	} else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
 	    ret = xmlSchemaVCheckINodeDataType(vctxt,
 		inode, inode->typeDef->contentTypeDef,
 		inode->decl->value);	    
@@ -23340,7 +25777,7 @@
 	* to the ·actual type definition· as defined by Element Locally 
 	* Valid (Type) (§3.3.4).
 	*/	
-	if (IS_SIMPLE_TYPE(inode->typeDef)) {
+	if (WXS_IS_SIMPLE(inode->typeDef)) {
 	     /*
 	    * SPEC (cvc-type) (3.1)
 	    * "If the type definition is a simple type definition, ..."
@@ -23351,7 +25788,7 @@
 	    */	    
 	    ret = xmlSchemaVCheckINodeDataType(vctxt,
 		    inode, inode->typeDef, inode->value);
-	} else if (HAS_SIMPLE_CONTENT(inode->typeDef)) {
+	} else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
 	    /*
 	    * SPEC (cvc-type) (3.2) "If the type definition is a complex type
 	    * definition, then the element information item must be
@@ -23402,7 +25839,7 @@
 		* 5.2.2.2 The appropriate case among the following must 
 		* be true:
 		*/		
-		if (HAS_MIXED_CONTENT(inode->typeDef)) {
+		if (WXS_HAS_MIXED_CONTENT(inode->typeDef)) {
 		    /*
 		    * 5.2.2.2.1 If the {content type} of the ·actual type 
 		    * definition· is mixed, then the *initial value* of the 
@@ -23427,7 +25864,7 @@
 			    inode->value, inode->decl->value);
 			goto end_elem;
 		    }
-		} else if (HAS_SIMPLE_CONTENT(inode->typeDef)) {
+		} else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
 		    /*
 		    * 5.2.2.2.2 If the {content type} of the ·actual type 
 		    * definition· is a simple type definition, then the 
@@ -23466,29 +25903,50 @@
     /*
     * Evaluate the history of XPath state objects.
     */    
-    if (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1)
+    if (inode->appliedXPath &&
+	(xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1))
 	goto internal_error;
     /*
-    * TODO: 6 The element information item must be ·valid· with respect to each of 
-    * the {identity-constraint definitions} as per Identity-constraint 
-    * Satisfied (§3.11.4).
+    * MAYBE TODO:
+    * SPEC (6) "The element information item must be ·valid· with
+    * respect to each of the {identity-constraint definitions} as per
+    * Identity-constraint Satisfied (§3.11.4)."
     */
     /*
+    * PSVI TODO: If we expose IDC node-tables via PSVI then the tables
+    *   need to be built in any case.
+    *   We will currently build IDC node-tables and bubble them only if
+    *   keyrefs do exist.
+    */
+    
+    /*
+    * Add the current IDC target-nodes to the IDC node-tables.
+    */
+    if ((inode->idcMatchers != NULL) &&
+	(vctxt->hasKeyrefs || vctxt->createIDCNodeTables))
+    {
+	if (xmlSchemaIDCFillNodeTables(vctxt, inode) == -1)
+	    goto internal_error;
+    }
+    /*
     * Validate IDC keyrefs.
     */
-    if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1)
-	goto internal_error;
+    if (vctxt->inode->hasKeyrefs)
+	if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1)
+	    goto internal_error;
     /*
     * Merge/free the IDC table.
     */
     if (inode->idcTable != NULL) {
-#ifdef DEBUG_IDC
+#ifdef DEBUG_IDC_NODE_TABLE
 	xmlSchemaDebugDumpIDCTable(stdout,
 	    inode->nsName,
 	    inode->localName,
 	    inode->idcTable);
 #endif
-	if (vctxt->depth > 0) {
+	if ((vctxt->depth > 0) &&
+	    (vctxt->hasKeyrefs || vctxt->createIDCNodeTables))
+	{
 	    /*
 	    * Merge the IDC node table with the table of the parent node.
 	    */
@@ -23511,18 +25969,18 @@
 	return (0);
     }
     /*
-    * Reset the bubbleDepth if needed.
+    * Reset the keyrefDepth if needed.
     */
     if (vctxt->aidcs != NULL) {
 	xmlSchemaIDCAugPtr aidc = vctxt->aidcs;
 	do {
-	    if (aidc->bubbleDepth == vctxt->depth) {
+	    if (aidc->keyrefDepth == vctxt->depth) {
 		/*
-		* A bubbleDepth of a key/unique IDC matches the current
+		* A 'keyrefDepth' of a key/unique IDC matches the current
 		* depth, this means that we are leaving the scope of the
-		* top-most keyref IDC.
+		* top-most keyref IDC which refers to this IDC.
 		*/
-		aidc->bubbleDepth = -1;
+		aidc->keyrefDepth = -1;
 	    }
 	    aidc = aidc->next;
 	} while (aidc != NULL);
@@ -23727,7 +26185,7 @@
 	case XML_SCHEMA_CONTENT_SIMPLE:
 	case XML_SCHEMA_CONTENT_BASIC:
 	    ACTIVATE_PARENT_ELEM
-	    if (IS_COMPLEX_TYPE(ptype)) {
+	    if (WXS_IS_COMPLEX(ptype)) {
 		/*
 		* SPEC (cvc-complex-type) (2.2)
 		* "If the {content type} is a simple type definition, then
@@ -23879,7 +26337,9 @@
 	    default:
 		break;
 	}
-    } else {	
+    } else {
+	if (len < 0)
+	    len = xmlStrlen(value);
 	/*
 	* Concat the value.
 	*/	
@@ -23909,11 +26369,22 @@
     }
     if (vctxt->xsiAssemble) {
 	/* 
-	* URGENT TODO: Better to fully stop validation
-	* if there was an error during dynamic schema construction.
+	* We will stop validation if there was an error during
+	* dynamic schema construction.
+	* Note that we simply set @skipDepth to 0, this could
+	* mean that a streaming document via SAX would be
+	* still read to the end but it won't be validated any more.
+	* TODO: If we are sure how to stop the validation at once
+	*   for all input scenarios, then this should be changed to
+	*   instantly stop the validation.
 	*/
-	if (xmlSchemaAssembleByXSI(vctxt) == -1)
-	    goto internal_error;
+	ret = xmlSchemaAssembleByXSI(vctxt);
+	if (ret != 0) {
+	    if (ret == -1)
+		goto internal_error;
+	    vctxt->skipDepth = 0;
+	    return(ret);
+	}
     }
     if (vctxt->depth > 0) {
 	/*
@@ -24025,6 +26496,7 @@
     */
     if (vctxt->xpathStates != NULL) {
 	ret = xmlSchemaXPathEvaluate(vctxt, XML_ELEMENT_NODE);
+	vctxt->inode->appliedXPath = 1;
 	if (ret == -1) {
 	    VERROR_INT("xmlSchemaValidateElem",
 		"calling xmlSchemaXPathEvaluate()");
@@ -24034,9 +26506,9 @@
     /*
     * Validate attributes.
     */
-    if (IS_COMPLEX_TYPE(vctxt->inode->typeDef)) {
+    if (WXS_IS_COMPLEX(vctxt->inode->typeDef)) {
 	if ((vctxt->nbAttrInfos != 0) ||
-	    (vctxt->inode->typeDef->attributeUses != NULL)) {
+	    (vctxt->inode->typeDef->attrUses != NULL)) {
 
 	    ret = xmlSchemaVAttributesComplex(vctxt);
 	}
@@ -24558,12 +27030,19 @@
     if (vctxt == NULL)
         return;
 
+    /*
+    * TODO: Should we clear the flags?
+    *   Might be problematic if one reuses the context
+    *   and assumes that the options remain the same.
+    */
     vctxt->flags = 0;
     vctxt->validationRoot = NULL;
     vctxt->doc = NULL;
 #ifdef LIBXML_READER_ENABLED
     vctxt->reader = NULL;
 #endif
+    vctxt->hasKeyrefs = 0;    
+
     if (vctxt->value != NULL) {
         xmlSchemaFreeValue(vctxt->value);
 	vctxt->value = NULL;
@@ -24622,6 +27101,10 @@
     xmlSchemaItemListClear(vctxt->nodeQNames);
     /* Recreate the dict. */
     xmlDictFree(vctxt->dict);
+    /*
+    * TODO: Is is save to recreate it? Do we have a scenario
+    * where the user provides the dict?
+    */
     vctxt->dict = xmlDictCreate();
 }
 
@@ -24742,7 +27225,7 @@
         return;
     ctxt->error = err;
     ctxt->warning = warn;
-    ctxt->userData = ctx;
+    ctxt->errCtxt = ctx;
     if (ctxt->pctxt != NULL)
 	xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx);
 }
@@ -24757,14 +27240,16 @@
  */
 void
 xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
-								  xmlStructuredErrorFunc serror, void *ctx)
+				  xmlStructuredErrorFunc serror, void *ctx)
 {
     if (ctxt == NULL)
         return;
 	ctxt->serror = serror;
     ctxt->error = NULL;
     ctxt->warning = NULL;
-    ctxt->userData = ctx;
+    ctxt->errCtxt = ctx;
+    if (ctxt->pctxt != NULL)
+	xmlSchemaSetParserStructuredErrors(ctxt->pctxt, serror, ctx);
 }
 
 /**
@@ -24780,8 +27265,8 @@
  */
 int
 xmlSchemaGetValidErrors(xmlSchemaValidCtxtPtr ctxt,
-						xmlSchemaValidityErrorFunc * err,
-						xmlSchemaValidityWarningFunc * warn, void **ctx)
+			xmlSchemaValidityErrorFunc * err,
+			xmlSchemaValidityWarningFunc * warn, void **ctx)
 {
 	if (ctxt == NULL)
 		return (-1);
@@ -24790,7 +27275,7 @@
 	if (warn != NULL)
 		*warn = ctxt->warning;
 	if (ctx != NULL)
-		*ctx = ctxt->userData;
+		*ctx = ctxt->errCtxt;
 	return (0);
 }
 
@@ -25009,12 +27494,18 @@
 xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) {
     /*
     * Some initialization.
-    */
+    */    
     vctxt->err = 0;
     vctxt->nberrors = 0;
     vctxt->depth = -1;
     vctxt->skipDepth = -1;
     vctxt->xsiAssemble = 0;
+    vctxt->hasKeyrefs = 0;
+#ifdef ENABLE_IDC_NODE_TABLES_TEST
+    vctxt->createIDCNodeTables = 1;
+#else
+    vctxt->createIDCNodeTables = 0;
+#endif
     /*
     * Create a schema + parser if necessary.
     */
@@ -25045,7 +27536,7 @@
 	pctxt->constructor = xmlSchemaConstructionCtxtCreate(pctxt->dict);
 	if (pctxt->constructor == NULL)
 	    return(-1);
-	pctxt->constructor->schema = vctxt->schema;
+	pctxt->constructor->mainSchema = vctxt->schema;
 	/*
 	* Take ownership of the constructor to be able to free it.
 	*/

Modified: packages/libxml2/branches/upstream/current/xmlschemastypes.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlschemastypes.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlschemastypes.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -434,9 +434,7 @@
 	}
 	memset(wild, 0, sizeof(xmlSchemaWildcard));
 	wild->type = XML_SCHEMA_TYPE_ANY;
-	wild->any = 1;
-	wild->minOccurs = 1;
-	wild->maxOccurs = 1;
+	wild->any = 1;	
 	wild->processContents = XML_SCHEMAS_ANY_LAX;	
 	particle->children = (xmlSchemaTreeItemPtr) wild;    
 	/*
@@ -450,9 +448,7 @@
 	}
 	memset(wild, 0, sizeof(xmlSchemaWildcard));
 	wild->any = 1;
-	wild->processContents = XML_SCHEMAS_ANY_LAX;
-	wild->minOccurs = 1;
-	wild->maxOccurs = 1;
+	wild->processContents = XML_SCHEMAS_ANY_LAX;	
 	xmlSchemaTypeAnyTypeDef->attributeWildcard = wild;
     }
     xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType", 
@@ -1700,7 +1696,7 @@
     ret = _xmlSchemaParseTimeZone(&(dt->value.date), &cur);
     if (collapse)
 	while IS_WSP_BLANK_CH(*cur) cur++;
-    if ((ret != 0) || (*cur != 0) || !VALID_DATETIME((&(dt->value.date))))
+    if ((ret != 0) || (*cur != 0) || (!(VALID_DATETIME((&(dt->value.date))))))
 	goto error;
 
 
@@ -2248,100 +2244,122 @@
             }
         case XML_SCHEMAS_DECIMAL:{
                 const xmlChar *cur = value;
-                unsigned int len, neg = 0;
+                unsigned int len, neg, integ, hasLeadingZeroes;
 		xmlChar cval[25];
-		xmlChar *cptr = cval;
-		unsigned int dec = ~0u;
+		xmlChar *cptr = cval;		
 
-                if (cur == NULL)
+                if ((cur == NULL) || (*cur == 0))
                     goto return1;
 
+		/*
+		* xs:decimal has a whitespace-facet value of 'collapse'.
+		*/
 		if (normOnTheFly)
 		    while IS_WSP_BLANK_CH(*cur) cur++;
 
-		/* First we handle an optional sign */
-                if (*cur == '+')
+		/*
+		* First we handle an optional sign.
+		*/
+		neg = 0;
+                if (*cur == '-') {
+		    neg = 1;
                     cur++;
-                else if (*cur == '-') {
-                    neg = 1;
+		} else if (*cur == '+')
                     cur++;
-                }
 		/*
+		* Disallow: "", "-", "- "
+		*/
+		if (*cur == 0)
+		    goto return1;
+		/*
 		 * Next we "pre-parse" the number, in preparation for calling
 		 * the common routine xmlSchemaParseUInt.  We get rid of any
 		 * leading zeroes (because we have reserved only 25 chars),
-		 * and note the position of any decimal point.
+		 * and note the position of a decimal point.
 		 */
 		len = 0;
+		integ = ~0u;
+		hasLeadingZeroes = 0;
 		/*
 		* Skip leading zeroes.
 		*/
-		while (*cur == '0')
+		while (*cur == '0') {
 		    cur++;
+		    hasLeadingZeroes = 1;
+		}
 		if (*cur != 0) {
-		    while (len < 24) {
+		    do {
 			if ((*cur >= '0') && (*cur <= '9')) {
 			    *cptr++ = *cur++;
 			    len++;
 			} else if (*cur == '.') {
-			    if (len == 0)
-			        len++;
-			    if (dec != ~0u)
-				goto return1;	/* multiple decimal points */
 			    cur++;
-			    if ((*cur == 0) && (cur -1 == value))
+			    integ = len;
+			    do {
+				if ((*cur >= '0') && (*cur <= '9')) {
+				    *cptr++ = *cur++;
+				    len++;
+				} else
+				    break;
+			    } while (len < 24);
+			    /*
+			    * Disallow "." but allow "00."
+			    */
+			    if ((len == 0) && (!hasLeadingZeroes))
 				goto return1;
-			    
-			    dec = len;
-			    while ((len < 24) && (*cur >= '0') &&
-				(*cur <= '9')) {
-				*cptr++ = *cur++;
-				len++;
-			    }
 			    break;
 			} else
 			    break;
-		    }
+		    } while (len < 24);
 		}
 		if (normOnTheFly)
 		    while IS_WSP_BLANK_CH(*cur) cur++;
 		if (*cur != 0)
-		    goto return1;	/* error if any extraneous chars */
+		    goto return1; /* error if any extraneous chars */
                 if (val != NULL) {
                     v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL);
                     if (v != NULL) {
 			/*
-		 	* If a mixed decimal, get rid of trailing zeroes
+		 	* Now evaluate the significant digits of the number
 		 	*/
-			if (dec != ~0u) {
-			    while ((len > dec) && (cptr > cval) &&
-				(*(cptr-1) == '0')) {
-				cptr--;
-				len--;
+			if (len != 0) {
+			    
+			    if (integ != ~0u) {
+				/*
+				* Get rid of trailing zeroes in the
+				* fractional part.
+				*/
+				while ((len != integ) && (*(cptr-1) == '0')) {
+				    cptr--;
+				    len--;
+				}
 			    }
+			    /*
+			    * Terminate the (preparsed) string.
+			    */
+			    if (len != 0) {
+				*cptr = 0; 
+				cptr = cval;
+				
+				xmlSchemaParseUInt((const xmlChar **)&cptr,
+				    &v->value.decimal.lo,
+				    &v->value.decimal.mi,
+				    &v->value.decimal.hi);
+			    }
 			}
-			*cptr = 0;	/* Terminate our (preparsed) string */
-			cptr = cval;
 			/*
-		 	* Now evaluate the significant digits of the number
-		 	*/
-			if (*cptr != 0) 
-			    xmlSchemaParseUInt((const xmlChar **)&cptr,
-					    &v->value.decimal.lo,
-					    &v->value.decimal.mi,
-					    &v->value.decimal.hi);
-			/*
 			* Set the total digits to 1 if a zero value.
 			*/
-			if (len == 0)
-			    len++;
                         v->value.decimal.sign = neg;
-			if (dec == ~0u) {
-			    v->value.decimal.frac = 0;
-			    v->value.decimal.total = len;
+			if (len == 0) {
+			    /* Speedup for zero values. */
+			    v->value.decimal.total = 1;
 			} else {
-			    v->value.decimal.frac = len - dec;
 			    v->value.decimal.total = len;
+			    if (integ == ~0u)
+				v->value.decimal.frac = 0;
+			    else
+				v->value.decimal.frac = len - integ;
 			}
                         *val = v;
                     }
@@ -3406,10 +3424,42 @@
      */
     integx = x->value.decimal.total - x->value.decimal.frac;
     integy = y->value.decimal.total - y->value.decimal.frac;
+    /*
+    * NOTE: We changed the "total" for values like "0.1"
+    *   (or "-0.1" or ".1") to be 1, which was 2 previously.
+    *   Therefore the special case, when such values are
+    *   compared with 0, needs to be handled separately;
+    *   otherwise a zero would be recognized incorrectly as
+    *   greater than those values. This has the nice side effect
+    *   that we gain an overall optimized comparison with zeroes.
+    * Note that a "0" has a "total" of 1 already.
+    */
+    if (integx == 1) {
+	if (x->value.decimal.lo == 0) {
+	    if (integy != 1)
+		return -order;
+	    else if (y->value.decimal.lo != 0)
+		return -order;
+	    else
+		return(0);
+	}
+    }
+    if (integy == 1) {
+	if (y->value.decimal.lo == 0) {
+	    if (integx != 1)
+		return order;
+	    else if (x->value.decimal.lo != 0)
+		return order;
+	    else
+		return(0);
+	}
+    }
+
     if (integx > integy)
 	return order;
     else if (integy > integx)
 	return -order;
+
     /*
      * If the number of integral digits is the same for both numbers,
      * then things get a little more complicated.  We need to "normalize"
@@ -3763,8 +3813,8 @@
 
     while (1) {
         if (tempdays < 1) {
-            long tmon = (long) MODULO_RANGE(r->mon-1, 1, 13);
-            long tyr  = r->year + (long)FQUOTIENT_RANGE(r->mon-1, 1, 13);
+            long tmon = (long) MODULO_RANGE((int)r->mon-1, 1, 13);
+            long tyr  = r->year + (long)FQUOTIENT_RANGE((int)r->mon-1, 1, 13);
             if (tyr == 0)
                 tyr--;
             tempdays += MAX_DAYINMONTH(tyr, tmon);
@@ -5377,7 +5427,7 @@
 	case XML_SCHEMA_FACET_FRACTIONDIGITS:
 
 	    if ((facet->val == NULL) ||
-		((facet->val->type != XML_SCHEMAS_DECIMAL) &&
+		((facet->val->type != XML_SCHEMAS_PINTEGER) &&
 		 (facet->val->type != XML_SCHEMAS_NNINTEGER)) ||
 		(facet->val->value.decimal.frac != 0)) {
 		return(-1);

Modified: packages/libxml2/branches/upstream/current/xmlstring.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlstring.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlstring.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -147,8 +147,8 @@
  * @str1:  the first xmlChar *
  * @str2:  the second xmlChar *
  *
- * Check if both string are equal of have same content
- * Should be a bit more readable and faster than xmlStrEqual()
+ * Check if both strings are equal of have same content.
+ * Should be a bit more readable and faster than xmlStrcmp()
  *
  * Returns 1 if they are equal, 0 if they are different
  */
@@ -437,7 +437,8 @@
  * @len:  the length of @add
  *
  * a strncat for array of xmlChar's, it will extend @cur with the len
- * first bytes of @add.
+ * first bytes of @add. Note that if @len < 0 then this is an API error
+ * and NULL will be returned.
  *
  * Returns a new xmlChar *, the original @cur is reallocated if needed
  * and should not be freed
@@ -450,6 +451,8 @@
 
     if ((add == NULL) || (len == 0))
         return(cur);
+    if (len < 0)
+	return(NULL);
     if (cur == NULL)
         return(xmlStrndup(add, len));
 
@@ -468,10 +471,11 @@
  * xmlStrncatNew:
  * @str1:  first xmlChar string
  * @str2:  second xmlChar string
- * @len:  the len of @str2
+ * @len:  the len of @str2 or < 0
  *
  * same as xmlStrncat, but creates a new string.  The original
- * two strings are not freed.
+ * two strings are not freed. If @len is < 0 then the length
+ * will be calculated automatically.
  *
  * Returns a new xmlChar * or NULL
  */

Modified: packages/libxml2/branches/upstream/current/xmlwriter.c
===================================================================
--- packages/libxml2/branches/upstream/current/xmlwriter.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xmlwriter.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -25,6 +25,25 @@
 #define B64CRLF "\r\n"
 
 /*
+ * The following VA_COPY was coded following an example in
+ * the Samba project.  It may not be sufficient for some
+ * esoteric implementations of va_list (i.e. it may need
+ * something involving a memcpy) but (hopefully) will be
+ * sufficient for libxml2.
+ */
+#ifndef VA_COPY
+  #ifdef HAVE_VA_COPY
+    #define VA_COPY(dest, src) va_copy(dest, src)
+  #else
+    #ifdef HAVE___VA_COPY
+      #define VA_COPY(dest,src) __va_copy(dest, src)
+    #else
+      #define VA_COPY(dest,src) (dest) = (src)
+    #endif
+  #endif
+#endif
+
+/*
  * Types are kept private
  */
 typedef enum {
@@ -80,9 +99,6 @@
 static void xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk);
 static int xmlCmpTextWriterNsStackEntry(const void *data0,
                                         const void *data1);
-static int xmlTextWriterWriteMemCallback(void *context,
-                                         const xmlChar * str, int len);
-static int xmlTextWriterCloseMemCallback(void *context);
 static int xmlTextWriterWriteDocCallback(void *context,
                                          const xmlChar * str, int len);
 static int xmlTextWriterCloseDocCallback(void *context);
@@ -256,11 +272,8 @@
     xmlOutputBufferPtr out;
 
 /*::todo handle compression */
-    out = xmlOutputBufferCreateIO((xmlOutputWriteCallback)
-                                  xmlTextWriterWriteMemCallback,
-                                  (xmlOutputCloseCallback)
-                                  xmlTextWriterCloseMemCallback,
-                                  (void *) buf, NULL);
+    out = xmlOutputBufferCreateBuffer(buf, NULL);
+
     if (out == NULL) {
         xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
                         "xmlNewTextWriterMemory : out of memory!\n");
@@ -2842,8 +2855,11 @@
             if (count < 0)
                 return -1;
             sum += count;
-        } else if (writer->indent) {
+        } else {
+			if (writer->indent)
             count = xmlOutputBufferWriteString(writer->out, "\n       ");
+            else
+                count = xmlOutputBufferWrite(writer->out, 1, " ");
             if (count < 0)
                 return -1;
             sum += count;
@@ -4275,40 +4291,6 @@
 }
 
 /**
- * xmlTextWriterWriteMemCallback:
- * @context:  the xmlBufferPtr
- * @str:  the data to write
- * @len:  the length of the data
- *
- * Write callback for the xmlOutputBuffer with target xmlBuffer
- *
- * Returns -1, 0, 1
- */
-static int
-xmlTextWriterWriteMemCallback(void *context, const xmlChar * str, int len)
-{
-    xmlBufferPtr buf = (xmlBufferPtr) context;
-
-    xmlBufferAdd(buf, str, len);
-
-    return len;
-}
-
-/**
- * xmlTextWriterCloseMemCallback:
- * @context:  the xmlBufferPtr
- *
- * Close callback for the xmlOutputBuffer with target xmlBuffer
- *
- * Returns -1, 0, 1
- */
-static int
-xmlTextWriterCloseMemCallback(void *context ATTRIBUTE_UNUSED)
-{
-    return 0;
-}
-
-/**
  * xmlTextWriterWriteDocCallback:
  * @context:  the xmlBufferPtr
  * @str:  the data to write
@@ -4373,6 +4355,7 @@
     int size;
     int count;
     xmlChar *buf;
+    va_list locarg;
 
     size = BUFSIZ;
     buf = (xmlChar *) xmlMalloc(size);
@@ -4382,8 +4365,10 @@
         return NULL;
     }
 
-    while (((count = vsnprintf((char *) buf, size, format, argptr)) < 0)
+    VA_COPY(locarg, argptr);
+    while (((count = vsnprintf((char *) buf, size, format, locarg)) < 0)
            || (count == size - 1) || (count == size) || (count > size)) {
+	va_end(locarg);
         xmlFree(buf);
         size += BUFSIZ;
         buf = (xmlChar *) xmlMalloc(size);
@@ -4392,7 +4377,9 @@
                             "xmlTextWriterVSprintf : out of memory!\n");
             return NULL;
         }
+	VA_COPY(locarg, argptr);
     }
+    va_end(locarg);
 
     return buf;
 }

Modified: packages/libxml2/branches/upstream/current/xpath.c
===================================================================
--- packages/libxml2/branches/upstream/current/xpath.c	2006-01-05 16:13:09 UTC (rev 500)
+++ packages/libxml2/branches/upstream/current/xpath.c	2006-01-06 18:12:46 UTC (rev 501)
@@ -65,12 +65,23 @@
             __FILE__, __LINE__);
 
 /*
+* XP_PATTERN_TO_ANY_NODE_ENABLED: when an XPath expression can be
+*   evaluated using the streaming mode (pattern.c) then this is used to
+*   enable resolution to nodes of type text-node, cdata-section-node,
+*   comment-node and pi-node. The only known scenario where this is
+*   needed is an expression like "foo//.", "//.", etc.; i.e. an expression
+*   where the final node to be selected can be of any type.
+*   Disabling this #define will result in an incorrect evaluation to
+*   only element-nodes and the document node.
+*/
+#define XP_PATTERN_TO_ANY_NODE_ENABLED
+/*
  * TODO:
  * There are a few spots where some tests are done which depend upon ascii
  * data.  These should be enhanced for full UTF8 support (see particularly
  * any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT)
  */
- 
+
 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
 /************************************************************************
  * 									*
@@ -808,8 +819,9 @@
         shift[2 * i] = shift[2 * i + 1] = ' ';
     shift[2 * i] = shift[2 * i + 1] = 0;
 
-    fprintf(output, shift);
 
+    fprintf(output, shift);    
+
     if (cur == NULL) {
         fprintf(output, "Object is empty (NULL)\n");
 	return;
@@ -10998,14 +11010,17 @@
 static xmlXPathObjectPtr
 xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) {
     int max_depth, min_depth;
-    int from_root;
+    int from_root;    
     int ret, depth;
+#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED
+    int eval_all_nodes;
+#endif
     xmlNodePtr cur = NULL, limit = NULL;
     xmlXPathObjectPtr retval;
     xmlStreamCtxtPtr patstream;
+    
+    int nb_nodes = 0;    
 
-    int nb_nodes = 0;
-
     if ((ctxt == NULL) || (comp == NULL))
         return(NULL);
     max_depth = xmlPatternMaxDepth(comp);
@@ -11082,6 +11097,10 @@
         return(retval);
     }
 
+#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED
+    eval_all_nodes = xmlStreamWantsAnyNode(patstream);
+#endif
+
     if (from_root) {
 	ret = xmlStreamPush(patstream, NULL, NULL);
 	if (ret < 0) {
@@ -11089,34 +11108,53 @@
 	    xmlXPathNodeSetAddUnique(retval->nodesetval, cur);
 	}
     }
-
     depth = 0;
     goto scan_children;
     do {
 next_node:
         nb_nodes++;
-	if (cur->type == XML_ELEMENT_NODE) {
-	    ret = xmlStreamPush(patstream, cur->name,
+
+	switch (cur->type) {
+	    case XML_ELEMENT_NODE:
+#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED
+	    case XML_TEXT_NODE:
+	    case XML_CDATA_SECTION_NODE:
+	    case XML_COMMENT_NODE:
+	    case XML_PI_NODE:		
+#endif	    
+		if (cur->type == XML_ELEMENT_NODE) {
+		    ret = xmlStreamPush(patstream, cur->name,
 				(cur->ns ? cur->ns->href : NULL));
-	    if (ret < 0) {
-	    } else if (ret == 1) {
-		xmlXPathNodeSetAddUnique(retval->nodesetval, cur);
-	    }
-	    if ((cur->children == NULL) || (depth >= max_depth)) {
-		ret = xmlStreamPop(patstream);
-		while (cur->next != NULL) {
-		    cur = cur->next;
-		    if ((cur->type != XML_ENTITY_DECL) &&
-			(cur->type != XML_DTD_NODE))
-			goto next_node;
 		}
-	    }
-	}
+#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED
+		else if (eval_all_nodes)		    
+		    ret = xmlStreamPushNode(patstream, NULL, NULL, cur->type);
+		else
+		    break;
+#endif
+		
+		if (ret < 0) {
+		    /* NOP. */
+		} else if (ret == 1) {
+		    xmlXPathNodeSetAddUnique(retval->nodesetval, cur);
+		}
+		if ((cur->children == NULL) || (depth >= max_depth)) {
+		    ret = xmlStreamPop(patstream);
+		    while (cur->next != NULL) {
+			cur = cur->next;
+			if ((cur->type != XML_ENTITY_DECL) &&
+			    (cur->type != XML_DTD_NODE))
+			    goto next_node;
+		    }
+		}
+	    default:
+		break;
+	}	    	
         
 scan_children:
 	if ((cur->children != NULL) && (depth < max_depth)) {
 	    /*
-	     * Do not descend on entities declarations
+	     * Do not descend on entities declarations	     
 	     */
 	    if (cur->children->type != XML_ENTITY_DECL) {
 		cur = cur->children;
@@ -11144,8 +11182,19 @@
 	    depth--;
 	    if ((cur == NULL) || (cur == limit))
 	        goto done;
-	    if (cur->type == XML_ELEMENT_NODE)
-	        ret = xmlStreamPop(patstream);
+	    if (cur->type == XML_ELEMENT_NODE) {
+		ret = xmlStreamPop(patstream);
+	    }
+#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED
+	    else if ((eval_all_nodes) &&
+		((cur->type == XML_TEXT_NODE) ||
+		 (cur->type == XML_CDATA_SECTION_NODE) ||
+		 (cur->type == XML_COMMENT_NODE) ||
+		 (cur->type == XML_PI_NODE)))
+	    {
+		ret = xmlStreamPop(patstream);
+	    }
+#endif
 	    if (cur->next != NULL) {
 		cur = cur->next;
 		break;




More information about the debian-xml-sgml-commit mailing list