summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-04-19 05:38:48 +0000
committerMike Hommey <mh@glandium.org>2004-04-19 05:38:48 +0000
commit81bcf076ea11e114a60e429338a15748066de163 (patch)
tree276010ab5d17f27a96c05f77004aa84a1763af7b
parentd09ab089457ae3c20cc98f9afa03379c6ebf9598 (diff)
downloadlibxml2-81bcf076ea11e114a60e429338a15748066de163.tar.gz
Load /tmp/tmp.LovooJ/libxml2-2.6.9 intoupstream/2.6.9
packages/libxml2/branches/upstream/current.
-rw-r--r--ChangeLog182
-rw-r--r--HTMLparser.c1
-rw-r--r--Makefile.am29
-rw-r--r--Makefile.in29
-rw-r--r--NEWS29
-rw-r--r--SAX2.c41
-rw-r--r--catalog.c4
-rwxr-xr-xconfigure2
-rw-r--r--configure.in2
-rw-r--r--debugXML.c2
-rw-r--r--doc/APIchunk0.html1
-rw-r--r--doc/APIchunk10.html7
-rw-r--r--doc/APIchunk11.html3
-rw-r--r--doc/APIchunk13.html2
-rw-r--r--doc/APIchunk14.html2
-rw-r--r--doc/APIchunk15.html5
-rw-r--r--doc/APIchunk19.html3
-rw-r--r--doc/APIchunk20.html4
-rw-r--r--doc/APIchunk21.html5
-rw-r--r--doc/APIchunk22.html1
-rw-r--r--doc/APIchunk23.html1
-rw-r--r--doc/APIchunk24.html1
-rw-r--r--doc/APIchunk25.html1
-rw-r--r--doc/APIchunk26.html2
-rw-r--r--doc/APIchunk7.html2
-rw-r--r--doc/APIchunk8.html1
-rw-r--r--doc/APIchunk9.html2
-rw-r--r--doc/APIfiles.html9
-rw-r--r--doc/APIsymbols.html9
-rw-r--r--doc/api.xsl2
-rw-r--r--doc/bugs.html6
-rw-r--r--doc/downloads.html17
-rw-r--r--doc/examples/Makefile.am55
-rw-r--r--doc/examples/Makefile.in100
-rw-r--r--doc/examples/examples.xml162
-rw-r--r--doc/examples/examples.xsl5
-rwxr-xr-xdoc/examples/index.py3
-rw-r--r--doc/examples/io2.c45
-rw-r--r--doc/examples/io2.res2
-rw-r--r--doc/examples/parse3.c60
-rw-r--r--doc/examples/parse4.c136
-rw-r--r--doc/examples/tst.xml7
-rw-r--r--doc/examples/xpath1.c1
-rw-r--r--doc/examples/xpath1.res5
-rw-r--r--doc/examples/xpath2.c189
-rw-r--r--doc/examples/xpath2.res30
-rw-r--r--doc/html/libxml-catalog.html4
-rw-r--r--doc/html/libxml-schemasInternals.html6
-rw-r--r--doc/html/libxml-tree.html3
-rw-r--r--doc/html/libxml-xmlerror.html5
-rw-r--r--doc/html/libxml-xmlreader.html2
-rw-r--r--doc/html/libxml-xmlsave.html4
-rw-r--r--doc/index.html364
-rwxr-xr-xdoc/index.py35
-rw-r--r--doc/libxml2-api.xml75
-rw-r--r--doc/libxml2.xsa2
-rw-r--r--doc/news.html24
-rw-r--r--doc/search.php53
-rw-r--r--doc/searches.html61
-rw-r--r--doc/searches.xsl97
-rw-r--r--doc/xml.html67
-rw-r--r--include/libxml/schemasInternals.h22
-rw-r--r--include/libxml/tree.h7
-rw-r--r--include/libxml/xmlerror.h5
-rw-r--r--include/libxml/xmlversion.h8
-rw-r--r--libxml.spec.in9
-rw-r--r--libxml2.spec15
-rw-r--r--nanohttp.c10
-rw-r--r--parser.c27
-rw-r--r--python/Makefile.am6
-rw-r--r--python/Makefile.in8
-rwxr-xr-xpython/setup.py2
-rw-r--r--python/tests/Makefile.am1
-rw-r--r--python/tests/Makefile.in1
-rwxr-xr-xpython/tests/reader8.py37
-rw-r--r--relaxng.c21
-rw-r--r--result/XInclude/fallback2.xml6
-rw-r--r--result/XInclude/fallback2.xml.err0
-rw-r--r--result/XInclude/fallback2.xml.rdr11
-rw-r--r--result/regexp/branch14
-rw-r--r--result/schemas/attruse_0_01
-rw-r--r--result/schemas/attruse_0_0.err0
-rw-r--r--result/schemas/attruse_0_11
-rw-r--r--result/schemas/attruse_0_1.err3
-rw-r--r--result/schemas/attruse_0_21
-rw-r--r--result/schemas/attruse_0_2.err3
-rw-r--r--result/schemas/union_0_01
-rw-r--r--result/schemas/union_0_0.err0
-rw-r--r--result/xmlid/id_err1.xml2
-rw-r--r--result/xmlid/id_err1.xml.err3
-rw-r--r--result/xmlid/id_err2.xml6
-rw-r--r--result/xmlid/id_err2.xml.err3
-rw-r--r--result/xmlid/id_tst1.xml6
-rw-r--r--result/xmlid/id_tst1.xml.err0
-rw-r--r--result/xmlid/id_tst2.xml6
-rw-r--r--result/xmlid/id_tst2.xml.err3
-rw-r--r--result/xmlid/id_tst3.xml6
-rw-r--r--result/xmlid/id_tst3.xml.err6
-rw-r--r--result/xmlid/id_tst4.xml6
-rw-r--r--result/xmlid/id_tst4.xml.err3
-rw-r--r--test/XInclude/docs/fallback2.xml10
-rw-r--r--test/regexp/branch14
-rw-r--r--test/schemas/attruse_0_0.xml8
-rw-r--r--test/schemas/attruse_0_0.xsd32
-rw-r--r--test/schemas/attruse_0_1.xml8
-rw-r--r--test/schemas/attruse_0_2.xml8
-rw-r--r--test/schemas/union_0_0.xml7
-rw-r--r--test/schemas/union_0_0.xsd50
-rw-r--r--test/xmlid/id_err1.xml1
-rw-r--r--test/xmlid/id_err2.xml5
-rw-r--r--test/xmlid/id_tst1.xml1
-rw-r--r--test/xmlid/id_tst2.xml1
-rw-r--r--test/xmlid/id_tst3.xml1
-rw-r--r--test/xmlid/id_tst4.xml4
-rw-r--r--testXPath.c4
-rw-r--r--uri.c4
-rw-r--r--valid.c8
-rw-r--r--win32/Makefile.bcb23
-rw-r--r--xinclude.c6
-rw-r--r--xmllint.c6
-rw-r--r--xmlreader.c23
-rw-r--r--xmlregexp.c69
-rw-r--r--xmlsave.c72
-rw-r--r--xmlschemas.c242
-rw-r--r--xmlschemastypes.c28
-rw-r--r--xmlwriter.c6
-rw-r--r--xpath.c34
127 files changed, 2551 insertions, 403 deletions
diff --git a/ChangeLog b/ChangeLog
index d18945d..09ed24a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,185 @@
+Sun Apr 18 23:45:46 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.6.9 release
+ * doc/* News: updated and rebuilt the docs
+
+Sun Apr 18 22:51:43 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: relaxed id() to not check taht the name(s) passed
+ are actually NCName, decided this in agreement with Aleksey Sanin
+ since existing specs like Visa3D broke that conformance checking
+ and other tools seems to not implement it sigh...
+ * SAX2.c: check attribute decls for xml:id and the value is an
+ NCName.
+ * test/xmlid/id_err* result/xmlid/id_err*: added error testing
+
+Sun Apr 18 21:46:17 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: work around Microsoft compiler NaN bug raise reported
+ by Mark Vakoc
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: fixed a recusive extention schemas
+ compilation error raised by taihei goi
+
+Sun Apr 18 16:57:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: keep the ChangeLog compressed
+ * xmlreader.c: fix a segfault when using Close()
+ * python/tests/Makefile.am python/tests/reader8.py: test for
+ the Close() reader API.
+
+Sat Apr 17 22:42:13 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c, xmlwriter.c, doc/examples/parse4.c,
+ doc/examples/io2.c: minor warning cleanup (no change to logic)
+ * xinclude: fixed return value for internal function
+ xmlXIncludeLoadFallback (now always 0 or -1)
+
+Sat Apr 17 21:32:32 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: small enhancement to fix bug 139791
+
+Fri Apr 16 18:44:47 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: applied patches from Kasimier Buchcik
+ for the attribute use support
+ * test/schemas/attruse* result/schemas/attruse*: added the
+ tests to the regression suite.
+
+Fri Apr 16 18:22:25 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: move the TODO as comments as the function while not
+ finished are usable as-is
+ * xmlschemas.c include/libxml/xmlerror.h: patch from Kasimier Buchcik
+ implementing union
+ * test/schemas/union_0_0.x* result/schemas/union_0_0*: added example
+ * python/Makefile.am: applied fix from Mike Hommey
+
+Fri Apr 16 23:58:42 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed problem with detecting external dtd
+ encoding (bug 135229).
+ * Makefile.am: minor change to test label
+
+Fri Apr 16 16:09:31 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed problem causing duplicate fallback
+ execution (bug 139520)
+ * test/XInclude/docs/fallback2.xml result/XInclude/fallback2.*:
+ added testcase
+
+Fri Apr 9 23:49:37 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c include/libxml/tree.h: adding xml:id draft support
+ * Makefile.am test/xmlid/id_tst* result/xmlid/id_tst*: adding
+ 4 first regression tests
+
+Fri Apr 9 11:56:08 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: fixing Red Hat bug #120482 , libxml2-python
+ should depend on the version of python used to compile it.
+
+Mon Apr 5 09:07:24 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied patch from James Bursa, frameset should
+ close head.
+
+Fri Apr 2 22:02:24 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: fixed problem in xmlRelaxNGCompareNameClasses
+ which was causing check-relaxng-test-suite.py test 351 to fail.
+
+Fri Apr 2 17:03:48 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: implemented fix for M$ IIS redirect provided
+ by Ian Hummel
+ * relaxng.c: fixed problem with notAllowed compilation
+ (bug 138793)
+
+Thu Apr 1 22:07:52 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: fix for xmlUriEscape on "http://user@somewhere.com"
+ from Mark Vakoc.
+
+2004-04-01 Johan Dahlin <johan@gnome.org>
+
+ * python/.cvsignore: Add generated files, to make cvs silent.
+
+Thu Apr 1 12:41:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: small signed-ness patch from Steve Little
+
+Wed Mar 31 17:47:28 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: patched a bug in parsing production 1 and 2 of
+ xmlschemas regexp that William pointed out while working on
+ #134120
+ * test/regexp/branch result/regexp/branch: added a specific
+ regression test
+
+Wed Mar 31 09:50:32 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * Makefile.am: added PYTHONPATH to python tests for Schemas
+ and RelaxNG
+ * test/xsdtest/xsdtestsuite.xml: added testfile for
+ SchemasPythonTests
+
+Mon Mar 29 16:56:49 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/examples.xsl doc/examples/index.html: added
+ information about compiling on Unix
+
+Mon Mar 29 14:18:12 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixes the comments for xmlCatalogDump and xmlDumpACatalog
+ * doc/*: rebuilt to update
+
+Sun Mar 28 18:11:41 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: optimize indentation based on the new context
+
+Sun Mar 28 14:17:10 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/xpath2.c doc/examples/xpath2.res: handle and explain
+ a very tricky problem when modifying the tree based on an XPath
+ result query.
+
+Sat Mar 27 09:56:14 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: fixed problem with IS_COMPILABLE flag
+ (bug 130216)
+
+Fri Mar 26 18:28:32 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Dave Beckett to correct line number
+ errors when using push with CDATA
+
+Fri Mar 26 14:53:58 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/xpath1.c: added a test template
+ * doc/examples/xpath2.c doc/examples/xpath2.res doc/examples/*:
+ added a new example, and make valgrind target
+
+Fri Mar 26 11:47:29 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: apply fix for #136693
+
+Thu Mar 25 20:21:01 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/examples/io2.c
+ * doc/examples/io2.res
+ add xmlDocDumpMemory example in response to mailing list FAQ
+ (rebuilt xml and html also)
+
+Thu Mar 25 10:33:05 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c testXPath.c xmllint.c xmlschemastypes.c: applied
+ patch from Mark Vakoc avoiding using xmlParse* option and use
+ xmlRead* instead
+ * win32/Makefile.bcb: patch to Borland C++ builder from Eric Zurcher
+ to avoid problems with some pathnames.
+
Tue Mar 23 12:35:08 CET 2004 Daniel Veillard <daniel@veillard.com>
* configure.in doc/* News: preparing 2.6.8 release, updated and rebuilt
diff --git a/HTMLparser.c b/HTMLparser.c
index 6cbe67e..bf671a1 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -880,6 +880,7 @@ static const char *htmlStartClose[] = {
"head", "p", NULL,
"title", "p", NULL,
"body", "head", "style", "link", "title", "p", NULL,
+"frameset", "head", "style", "link", "title", "p", NULL,
"li", "p", "h1", "h2", "h3", "h4", "h5", "h6", "dl", "address",
"pre", "listing", "xmp", "head", "li", NULL,
"hr", "p", "head", NULL,
diff --git a/Makefile.am b/Makefile.am
index e811f56..2dd69a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,7 +122,7 @@ check-local: tests
testall : tests SVGtests SAXtests
-tests: XMLtests XMLenttests NStests Errtests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@
+tests: XMLtests XMLenttests NStests IDtests Errtests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@
@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; $(MAKE) tests ; fi)
@(cd doc/examples ; $(MAKE) tests)
@@ -281,6 +281,27 @@ NStests : xmllint$(EXEEXT)
rm result.$$name error.$$name ; \
fi ; fi ; done)
+IDtests : xmllint$(EXEEXT) testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## xml:id regression tests"
+ -@(for i in $(srcdir)/test/xmlid/id_*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/xmlid/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" \
+ 2> $(srcdir)/result/xmlid/$$name.err \
+ > $(srcdir)/result/xmlid/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/xmlid/$$name result.$$name ; \
+ diff $(srcdir)/result/xmlid/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
Errtests : xmllint$(EXEEXT)
@(echo > .memdump)
@echo "## Error cases regression tests"
@@ -878,13 +899,15 @@ Relaxtests: xmllint$(EXEEXT)
diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
fi ; grep Unimplemented err.$$name`; \
- if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
rm res.$$name err.$$name ; \
fi ; fi ; \
done; done)
RelaxNGPythonTests:
@(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs ; \
+ export PYTHONPATH; \
echo "## Relax-NG Python based test suite 1" ; \
$(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
echo "## Relax-NG Python based test suite 2" ; \
@@ -893,6 +916,8 @@ RelaxNGPythonTests:
SchemasPythonTests:
@(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs; \
+ export PYTHONPATH; \
echo "## XML Schemas datatypes Python based test suite" ; \
$(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
fi)
diff --git a/Makefile.in b/Makefile.in
index 5692132..cace61f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1338,7 +1338,7 @@ check-local: tests
testall : tests SVGtests SAXtests
-tests: XMLtests XMLenttests NStests Errtests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@
+tests: XMLtests XMLenttests NStests IDtests Errtests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@
@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; $(MAKE) tests ; fi)
@(cd doc/examples ; $(MAKE) tests)
@@ -1497,6 +1497,27 @@ NStests : xmllint$(EXEEXT)
rm result.$$name error.$$name ; \
fi ; fi ; done)
+IDtests : xmllint$(EXEEXT) testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## xml:id regression tests"
+ -@(for i in $(srcdir)/test/xmlid/id_*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/xmlid/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" \
+ 2> $(srcdir)/result/xmlid/$$name.err \
+ > $(srcdir)/result/xmlid/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/xmlid/$$name result.$$name ; \
+ diff $(srcdir)/result/xmlid/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
Errtests : xmllint$(EXEEXT)
@(echo > .memdump)
@echo "## Error cases regression tests"
@@ -2094,13 +2115,15 @@ Relaxtests: xmllint$(EXEEXT)
diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
fi ; grep Unimplemented err.$$name`; \
- if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
rm res.$$name err.$$name ; \
fi ; fi ; \
done; done)
RelaxNGPythonTests:
@(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs ; \
+ export PYTHONPATH; \
echo "## Relax-NG Python based test suite 1" ; \
$(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
echo "## Relax-NG Python based test suite 2" ; \
@@ -2109,6 +2132,8 @@ RelaxNGPythonTests:
SchemasPythonTests:
@(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs; \
+ export PYTHONPATH; \
echo "## XML Schemas datatypes Python based test suite" ; \
$(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
fi)
diff --git a/NEWS b/NEWS
index e9e65ae..37c8b35 100644
--- a/NEWS
+++ b/NEWS
@@ -4,16 +4,31 @@
Note that this is automatically generated from the news webpage at:
http://xmlsoft.org/news.html
-
-CVS only : check the Changelog at
-http://cvs.gnome.org/lxr/source/gnome-xml/ChangeLog
- file
-for a really accurate description:
Items not finished and worked on, get in touch with the list if you want
-to test those - More testing on RelaxNG
+to help those - More testing on RelaxNG
- Finishing up XML
Schemas
+There is the list of public releases:
+2.6.9: Apr 18 2004:
+ - implement xml:id Working Draft, relaxed XPath id() checking
+ - bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
+ Beckett), Relax-NG compilation (William Brack), Regexp patches (with
+ William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
+ William), Relax-NG name classes compares (William), XInclude duplicate
+ fallback (William), external DTD encoding detection (William), a DTD
+ validation bug (William), xmlReader Close() fix, recusive extention
+ schemas
+ - improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting
+ save optimization, better handle IIS broken HTTP redirect behaviour (Ian
+ Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
+ dependancy, XML Schemas union support (Kasimier Buchcik), warning removal
+ clanup (William), keep ChangeLog compressed when installing from RPMs
+ - documentation: examples and xmlDocDumpMemory docs (John Fleck), new
+ example (load, xpath, modify, save), xmlCatalogDump() comments,
+ - Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
+ compiler NaN handling bug (Mark Vakoc)
+
2.6.8: Mar 23 2004:
- First step of the cleanup of the serialization code and APIs
@@ -31,7 +46,7 @@ to test those - More testing on RelaxNG
XInclude and XPointer fixes for entities (William), XML parser bug
reported by Holger Rauch, nanohttp fd leak (William), regexps char
groups '-' handling (William), dictionnary reference counting problems,
- do not close stderr.
+ do not close stderr.
- performance patches from Petr Pajas
- Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
- compilation and portability fixes: --without-valid, catalog cleanups
diff --git a/SAX2.c b/SAX2.c
index e6e310e..781a666 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -573,6 +573,16 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
"SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n",
elem, fullname, type, def, defaultValue);
#endif
+ if ((xmlStrEqual(fullname, BAD_CAST "xml:id")) &&
+ (type != XML_ATTRIBUTE_ID)) {
+ /*
+ * Raise the error but keep the validity flag
+ */
+ int tmp = ctxt->valid;
+ xmlErrValid(ctxt, XML_DTD_XMLID_TYPE,
+ "xml:id : attribute type should be ID\n", NULL, NULL);
+ ctxt->valid = tmp;
+ }
/* TODO: optimize name/prefix allocation */
name = xmlSplitQName(ctxt, fullname, &prefix);
ctxt->vctxt.valid = 1;
@@ -1204,6 +1214,19 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret))
xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ else if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
+ /*
+ * Add the xml:id value
+ *
+ * Open issue: normalization of the value.
+ */
+ if (xmlValidateNCName(value, 1) != 0) {
+ xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
+ "xml:id : attribute value %s is not an NCName\n",
+ (const char *) value, NULL);
+ }
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ }
}
error:
@@ -1925,7 +1948,23 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
if (dup == NULL)
dup = xmlStrndup(value, valueend - value);
xmlAddRef(&ctxt->vctxt, ctxt->myDoc, dup, ret);
- }
+ } else if ((prefix == ctxt->str_xml) &&
+ (localname[0] == 'i') && (localname[1] == 'd') &&
+ (localname[2] == 0)) {
+ /*
+ * Add the xml:id value
+ *
+ * Open issue: normalization of the value.
+ */
+ if (dup == NULL)
+ dup = xmlStrndup(value, valueend - value);
+ if (xmlValidateNCName(dup, 1) != 0) {
+ xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
+ "xml:id : attribute value %s is not an NCName\n",
+ (const char *) dup, NULL);
+ }
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
+ }
}
if (dup != NULL)
xmlFree(dup);
diff --git a/catalog.c b/catalog.c
index 602e16b..711761e 100644
--- a/catalog.c
+++ b/catalog.c
@@ -2731,7 +2731,7 @@ xmlACatalogResolveURI(xmlCatalogPtr catal, const xmlChar *URI) {
* @catal: a Catalog
* @out: the file.
*
- * Free up all the memory associated with catalogs
+ * Dump the given catalog to the given file.
*/
void
xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
@@ -3147,7 +3147,7 @@ xmlCatalogResolveURI(const xmlChar *URI) {
* xmlCatalogDump:
* @out: the file.
*
- * Free up all the memory associated with catalogs
+ * Dump all the global catalog content to the given file.
*/
void
xmlCatalogDump(FILE *out) {
diff --git a/configure b/configure
index c03f6f3..b6275ef 100755
--- a/configure
+++ b/configure
@@ -1615,7 +1615,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=8
+LIBXML_MICRO_VERSION=9
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
diff --git a/configure.in b/configure.in
index 391dda7..c8a1536 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=8
+LIBXML_MICRO_VERSION=9
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
diff --git a/debugXML.c b/debugXML.c
index cd87ddc..6886ee8 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -1806,7 +1806,7 @@ xmlShellLoad(xmlShellCtxtPtr ctxt, char *filename,
doc = NULL;
#endif /* LIBXML_HTML_ENABLED */
} else {
- doc = xmlParseFile(filename);
+ doc = xmlReadFile(filename,NULL,0);
}
if (doc != NULL) {
if (ctxt->loaded == 1) {
diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html
index d7a5ef0..c81d577 100644
--- a/doc/APIchunk0.html
+++ b/doc/APIchunk0.html
@@ -218,6 +218,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#IS_EXTENDER_CH">IS_EXTENDER_CH</a><br />
</dd><dt>Behaviour</dt><dd><a href="html/libxml-parserInternals.html#IS_BLANK_CH">IS_BLANK_CH</a><br />
</dd><dt>Bengali</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBengali">xmlUCSIsBengali</a><br />
+</dd><dt>Best</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>BinHex</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
</dd><dt>Bit</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html
index baeacb6..27c9383 100644
--- a/doc/APIchunk10.html
+++ b/doc/APIchunk10.html
@@ -151,10 +151,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#CAST_TO_STRING">CAST_TO_STRING</a><br />
<a href="html/libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a><br />
</dd><dt>cat</dt><dd><a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
-</dd><dt>catalogs</dt><dd><a href="html/libxml-catalog.html#xmlACatalogDump">xmlACatalogDump</a><br />
-<a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+</dd><dt>catalogs</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
<a href="html/libxml-catalog.html#xmlCatalogCleanup">xmlCatalogCleanup</a><br />
-<a href="html/libxml-catalog.html#xmlCatalogDump">xmlCatalogDump</a><br />
<a href="html/libxml-catalog.html#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a><br />
<a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
@@ -165,6 +163,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</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>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 />
</dd><dt>change</dt><dd><a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
@@ -731,6 +730,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
</dd><dt>count</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
<a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathCountFunction">xmlXPathCountFunction</a><br />
</dd><dt>counter</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html
index d8c2951..58ae8a3 100644
--- a/doc/APIchunk11.html
+++ b/doc/APIchunk11.html
@@ -359,6 +359,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
</dd><dt>differentiate</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>differently</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>digit</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
</dd><dt>digits</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
</dd><dt>dir</dt><dd><a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
@@ -453,6 +454,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html
index a1ce710..10788fd 100644
--- a/doc/APIchunk13.html
+++ b/doc/APIchunk13.html
@@ -319,6 +319,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
</dd><dt>fully</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
</dd><dt>func</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
</dd><dt>funcs</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
</dd><dt>function:</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html
index 8f43429..1a1351b 100644
--- a/doc/APIchunk14.html
+++ b/doc/APIchunk14.html
@@ -123,6 +123,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>global</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a><br />
<a href="html/libxml-tree.html#_xmlNs">_xmlNs</a><br />
<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogDump">xmlCatalogDump</a><br />
<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
@@ -133,6 +134,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
</dd><dt>globally</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
</dd><dt>good</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>grafted</dt><dd><a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
</dd><dt>grammar:</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html
index b82ce9a..26b8828 100644
--- a/doc/APIchunk15.html
+++ b/doc/APIchunk15.html
@@ -64,6 +64,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
</dd><dt>implementation-defined</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
@@ -72,6 +73,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
<a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
<a href="html/libxml-HTMLtree.html#HTML_TEXT_NODE">HTML_TEXT_NODE</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
</dd><dt>implicitly</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
@@ -372,6 +375,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
<a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
</dd><dt>instruction</dt><dd><a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html
index cbce12b..e92e295 100644
--- a/doc/APIchunk19.html
+++ b/doc/APIchunk19.html
@@ -196,7 +196,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
</dd><dt>optimized</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
</dd><dt>option</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
-</dd><dt>optional</dt><dd><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</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 />
<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
<a href="html/libxml-parser.html#xmlCtxtResetPush">xmlCtxtResetPush</a><br />
diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html
index b335510..62aa50c 100644
--- a/doc/APIchunk20.html
+++ b/doc/APIchunk20.html
@@ -102,6 +102,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>password</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
</dd><dt>past</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br />
<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>paste</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
</dd><dt>path</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
@@ -334,6 +335,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
@@ -371,6 +373,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>procgressed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>produce</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
@@ -397,6 +400,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+</dd><dt>prohibited</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
</dd><dt>projects</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
</dd><dt>prolog</dt><dd><a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html
index 84fe917..0c7d917 100644
--- a/doc/APIchunk21.html
+++ b/doc/APIchunk21.html
@@ -134,6 +134,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlreader.html#xmlTextReaderReadState">xmlTextReaderReadState</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</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>ready</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
@@ -422,7 +423,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
</dd><dt>requests</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
-</dd><dt>required</dt><dd><a href="html/libxml-HTMLparser.html#htmlRequiredAttrs">htmlRequiredAttrs</a><br />
+</dd><dt>required</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a><br />
+<a href="html/libxml-HTMLparser.html#htmlRequiredAttrs">htmlRequiredAttrs</a><br />
<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
</dd><dt>requires</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br />
@@ -526,6 +528,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+</dd><dt>rewrite</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>right</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html
index bac0673..ffde5f4 100644
--- a/doc/APIchunk22.html
+++ b/doc/APIchunk22.html
@@ -442,6 +442,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a><br />
</dd><dt>special</dt><dd><a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
<a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html
index 325cdae..fedd743 100644
--- a/doc/APIchunk23.html
+++ b/doc/APIchunk23.html
@@ -145,6 +145,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html
index d418a4f..bedd708 100644
--- a/doc/APIchunk24.html
+++ b/doc/APIchunk24.html
@@ -405,6 +405,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
</dd><dt>works</dt><dd><a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
</dd><dt>would</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>write</dt><dd><a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html
index 8dc92c9..a5c8bdf 100644
--- a/doc/APIchunk25.html
+++ b/doc/APIchunk25.html
@@ -82,6 +82,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>xml-name</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
</dd><dt>xml:</dt><dd><a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
</dd><dt>xml:base</dt><dd><a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+</dd><dt>xml:id</dt><dd><a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
</dd><dt>xml:lang</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html
index 6c22f43..808b2d8 100644
--- a/doc/APIchunk26.html
+++ b/doc/APIchunk26.html
@@ -47,6 +47,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a><br />
</dd><dt>yet</dt><dd><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</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 />
diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html
index a3a33f0..3375d64 100644
--- a/doc/APIchunk7.html
+++ b/doc/APIchunk7.html
@@ -64,6 +64,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html
index 210b466..c58e62a 100644
--- a/doc/APIchunk8.html
+++ b/doc/APIchunk8.html
@@ -420,6 +420,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
</dd><dt>allocations</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-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html
index a3fc71e..3db6e3e 100644
--- a/doc/APIchunk9.html
+++ b/doc/APIchunk9.html
@@ -245,7 +245,9 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
<a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
diff --git a/doc/APIfiles.html b/doc/APIfiles.html
index de3c270..e516165 100644
--- a/doc/APIfiles.html
+++ b/doc/APIfiles.html
@@ -920,6 +920,9 @@ A:link, A:visited, A:active { text-decoration: underline }
<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_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a><br />
<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a><br />
<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a><br />
<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a><br />
@@ -1076,6 +1079,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-tree.html#XML_TEXT_NODE">XML_TEXT_NODE</a><br />
<a href="html/libxml-tree.html#XML_XINCLUDE_END">XML_XINCLUDE_END</a><br />
<a href="html/libxml-tree.html#XML_XINCLUDE_START">XML_XINCLUDE_START</a><br />
+<a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
<a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
<a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
<a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
@@ -1555,6 +1559,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ENTITY">XML_DTD_UNKNOWN_ENTITY</a><br />
<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ID">XML_DTD_UNKNOWN_ID</a><br />
<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_NOTATION">XML_DTD_UNKNOWN_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_TYPE">XML_DTD_XMLID_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_VALUE">XML_DTD_XMLID_VALUE</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_ATTLIST_NOT_FINISHED">XML_ERR_ATTLIST_NOT_FINISHED</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_ATTLIST_NOT_STARTED">XML_ERR_ATTLIST_NOT_STARTED</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_NOT_FINISHED">XML_ERR_ATTRIBUTE_NOT_FINISHED</a><br />
@@ -1895,6 +1901,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI">XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_USE">XML_SCHEMAP_INVALID_ATTR_USE</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_BOOLEAN">XML_SCHEMAP_INVALID_BOOLEAN</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ENUM">XML_SCHEMAP_INVALID_ENUM</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_FACET">XML_SCHEMAP_INVALID_FACET</a><br />
@@ -1910,6 +1917,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTYPE_NOREF">XML_SCHEMAP_NOTYPE_NOREF</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOT_SCHEMA">XML_SCHEMAP_NOT_SCHEMA</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_PREFIX_UNDEFINED">XML_SCHEMAP_PREFIX_UNDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_RECURSIVE">XML_SCHEMAP_RECURSIVE</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTR">XML_SCHEMAP_REDEFINED_ATTR</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTRGROUP">XML_SCHEMAP_REDEFINED_ATTRGROUP</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ELEMENT">XML_SCHEMAP_REDEFINED_ELEMENT</a><br />
@@ -1938,6 +1946,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_IMPORT_CHILD">XML_SCHEMAP_UNKNOWN_IMPORT_CHILD</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD">XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_LIST_CHILD">XML_SCHEMAP_UNKNOWN_LIST_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_MEMBER_TYPE">XML_SCHEMAP_UNKNOWN_MEMBER_TYPE</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_NOTATION_CHILD">XML_SCHEMAP_UNKNOWN_NOTATION_CHILD</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PREFIX">XML_SCHEMAP_UNKNOWN_PREFIX</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD</a><br />
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html
index b3d570f..1486940 100644
--- a/doc/APIsymbols.html
+++ b/doc/APIsymbols.html
@@ -225,6 +225,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ENTITY">XML_DTD_UNKNOWN_ENTITY</a><br />
<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ID">XML_DTD_UNKNOWN_ID</a><br />
<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_NOTATION">XML_DTD_UNKNOWN_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_TYPE">XML_DTD_XMLID_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_VALUE">XML_DTD_XMLID_VALUE</a><br />
<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_ELEMENT">XML_ELEMENT_CONTENT_ELEMENT</a><br />
<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_MULT">XML_ELEMENT_CONTENT_MULT</a><br />
<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_ONCE">XML_ELEMENT_CONTENT_ONCE</a><br />
@@ -700,6 +702,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI">XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_USE">XML_SCHEMAP_INVALID_ATTR_USE</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_BOOLEAN">XML_SCHEMAP_INVALID_BOOLEAN</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ENUM">XML_SCHEMAP_INVALID_ENUM</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_FACET">XML_SCHEMAP_INVALID_FACET</a><br />
@@ -715,6 +718,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTYPE_NOREF">XML_SCHEMAP_NOTYPE_NOREF</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOT_SCHEMA">XML_SCHEMAP_NOT_SCHEMA</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_PREFIX_UNDEFINED">XML_SCHEMAP_PREFIX_UNDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_RECURSIVE">XML_SCHEMAP_RECURSIVE</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTR">XML_SCHEMAP_REDEFINED_ATTR</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTRGROUP">XML_SCHEMAP_REDEFINED_ATTRGROUP</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ELEMENT">XML_SCHEMAP_REDEFINED_ELEMENT</a><br />
@@ -743,6 +747,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_IMPORT_CHILD">XML_SCHEMAP_UNKNOWN_IMPORT_CHILD</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD">XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_LIST_CHILD">XML_SCHEMAP_UNKNOWN_LIST_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_MEMBER_TYPE">XML_SCHEMAP_UNKNOWN_MEMBER_TYPE</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_NOTATION_CHILD">XML_SCHEMAP_UNKNOWN_NOTATION_CHILD</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PREFIX">XML_SCHEMAP_UNKNOWN_PREFIX</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD</a><br />
@@ -758,6 +763,9 @@ A:link, A:visited, A:active { text-decoration: underline }
<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_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a><br />
<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a><br />
<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a><br />
<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a><br />
@@ -898,6 +906,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_XINCLUDE_UNKNOWN_ENCODING">XML_XINCLUDE_UNKNOWN_ENCODING</a><br />
<a href="html/libxml-xmlerror.html#XML_XINCLUDE_XPTR_FAILED">XML_XINCLUDE_XPTR_FAILED</a><br />
<a href="html/libxml-xmlerror.html#XML_XINCLUDE_XPTR_RESULT">XML_XINCLUDE_XPTR_RESULT</a><br />
+<a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
<a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
<a href="html/libxml-xmlerror.html#XML_XPATH_ENCODING_ERROR">XML_XPATH_ENCODING_ERROR</a><br />
<a href="html/libxml-xmlerror.html#XML_XPATH_EXPRESSION_OK">XML_XPATH_EXPRESSION_OK</a><br />
diff --git a/doc/api.xsl b/doc/api.xsl
index 2b7bd71..c16bc5b 100644
--- a/doc/api.xsl
+++ b/doc/api.xsl
@@ -7,7 +7,7 @@
extension-element-prefixes="exsl"
exclude-result-prefixes="exsl">
- <!-- Import the resto of the site stylesheets -->
+ <!-- Import the rest of the site stylesheets -->
<xsl:import href="site.xsl"/>
<!-- Generate XHTML-1.0 transitional -->
diff --git a/doc/bugs.html b/doc/bugs.html
index 270912b..b6feef9 100644
--- a/doc/bugs.html
+++ b/doc/bugs.html
@@ -18,7 +18,11 @@ irc.gnome.org (port 6667) usually have a few person subscribed which may help
mailing-list for archival).</p><p>There is also a mailing-list <a href="mailto:xml@gnome.org">xml@gnome.org</a> for libxml, with an <a href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a href="http://xmlsoft.org/messages">old</a>). To subscribe to this list,
please visit the <a href="http://mail.gnome.org/mailman/listinfo/xml">associated Web</a> page and
follow the instructions. <strong>Do not send code, I won't debug it</strong>
-(but patches are really appreciated!).</p><p>Check the following <strong><span style="color: #FF0000">before
+(but patches are really appreciated!).</p><p>Please note that with the current amount of virus and SPAM, sending mail
+to the list without being subscribed won't work. There is *far too many
+bounces* (in the order of a thousand a day !) I cannot approve them manually
+anymore. If your mail to the list bounced waiting for administrator approval,
+it is LOST ! Repost it and fix the problem triggering the error.</p><p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p><ul><li>Read the <a href="FAQ.html">FAQ</a> and <a href="search.php">use the
search engine</a> to get information related to your problem.</li>
<li>Make sure you are <a href="ftp://xmlsoft.org/">using a recent
diff --git a/doc/downloads.html b/doc/downloads.html
index dc418c1..158a9de 100644
--- a/doc/downloads.html
+++ b/doc/downloads.html
@@ -7,14 +7,11 @@ H1 {font-family: Verdana,Arial,Helvetica}
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="#000000" 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="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">News</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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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 <a href="ftp://xmlsoft.org/">xmlsoft.org</a> (<a href="ftp://speakeasy.rpmfind.net/pub/libxml/">Seattle</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> either
-as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source
-archive</a><!-- commenting this out because they seem to have disappeared or <a
-href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/">RPM
-packages</a> -->
- , Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a
+</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 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="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">News</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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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://speakeasy.rpmfind.net/pub/libxml/">Seattle</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>
-packages installed to compile applications using libxml.)</p><p>Binary ports:</p><ul><li>Red Hat RPMs for i386 are available directly on <a href="ftp://xmlsoft.org/">xmlsoft.org</a>, the source RPM will compile on
+packages installed to compile applications using libxml.)</p><p>You can find all the history of libxml(2) and libxslt releases in the <a href="http://xmlsoft.org/sources/old/">old</a> directory.</p><p>Binary ports:</p><ul><li>Red Hat RPMs for i386 are available directly on <a href="ftp://xmlsoft.org/">xmlsoft.org</a>, the source RPM will compile on
any architecture supported by Red Hat.</li>
<li><p><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a></p>
is now the maintainer of the Windows port, <a href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
@@ -27,10 +24,10 @@ packages installed to compile applications using libxml.)</p><p>Binary ports:</p
</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 gnome-xml <a href="ftp://xmlsoft.org/cvs-snapshot.tar.gz">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
-platform, get in touch with me to upload the package, wrappers for various
-languages have been provided, and can be found in the <a href="contribs.html">contrib section</a></p><p>Libxml2 is also available from CVS:</p><ul><li><p>The <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Gnome
+platform, get in touch with the list to upload the package, wrappers for
+various languages have been provided, and can be found in the <a href="python.html">bindings section</a></p><p>Libxml2 is also available from CVS:</p><ul><li><p>The <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Gnome
CVS base</a>. Check the <a href="http://developer.gnome.org/tools/cvs.html">Gnome CVS Tools</a>
- page; the CVS module is <b>gnome-xml</b>.</p>
+ page; the CVS module is <b>libxml2</b>.</p>
</li>
<li>The <strong>libxslt</strong> module is also present there</li>
</ul><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>
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 754e663..0d4bf13 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -15,9 +15,9 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
-EXTRA_DIST=examples.xsl index.py test1.xml examples.xml test2.xml writer.xml test3.xml reader1.res reader3.res tree1.res tree2.res io1.res
+EXTRA_DIST=examples.xsl index.py test1.xml examples.xml test2.xml writer.xml test3.xml tst.xml reader1.res reader3.res tree1.res tree2.res io1.res io2.res xpath1.res xpath2.res
-noinst_PROGRAMS=xpath1 parse1 parse2 tree1 tree2 testWriter reader1 reader2 reader3 io1
+noinst_PROGRAMS=xpath1 parse1 parse2 tree1 tree2 testWriter reader1 reader2 reader3 io1 parse3 parse4 io2 xpath2
xpath1_SOURCES=xpath1.c
xpath1_LDFLAGS=
@@ -69,25 +69,58 @@ io1_LDFLAGS=
io1_DEPENDENCIES= $(DEPS)
io1_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)
+
+io2_SOURCES=io2.c
+io2_LDFLAGS=
+io2_DEPENDENCIES= $(DEPS)
+io2_LDADD= @RDL_LIBS@ $(LDADDS)
+
+xpath2_SOURCES=xpath2.c
+xpath2_LDFLAGS=
+xpath2_DEPENDENCIES= $(DEPS)
+xpath2_LDADD= @RDL_LIBS@ $(LDADDS)
+
+valgrind:
+ $(MAKE) CHECKER='valgrind -q' tests
+
tests: $(noinst_PROGRAMS)
@(echo > .memdump)
- @(./parse1 test1.xml)
+ @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./parse1 test1.xml)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./parse2 test2.xml)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.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)
- @(./parse2 test2.xml)
+ @($(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)
- @(./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
+ @($(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)
- @(./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
+ @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
+ @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./parse3)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./parse4 test3.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+ @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
+ @($(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)
diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in
index 7c1478f..237a07a 100644
--- a/doc/examples/Makefile.in
+++ b/doc/examples/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-SOURCES = $(io1_SOURCES) $(parse1_SOURCES) $(parse2_SOURCES) $(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) $(testWriter_SOURCES) $(tree1_SOURCES) $(tree2_SOURCES) $(xpath1_SOURCES)
+SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) $(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) $(testWriter_SOURCES) $(tree1_SOURCES) $(tree2_SOURCES) $(xpath1_SOURCES) $(xpath2_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -40,7 +40,8 @@ host_triplet = @host@
noinst_PROGRAMS = xpath1$(EXEEXT) parse1$(EXEEXT) parse2$(EXEEXT) \
tree1$(EXEEXT) tree2$(EXEEXT) testWriter$(EXEEXT) \
reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \
- io1$(EXEEXT)
+ io1$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) io2$(EXEEXT) \
+ xpath2$(EXEEXT)
subdir = doc/examples
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -56,10 +57,16 @@ am_io1_OBJECTS = io1.$(OBJEXT)
io1_OBJECTS = $(am_io1_OBJECTS)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1)
+am_io2_OBJECTS = io2.$(OBJEXT)
+io2_OBJECTS = $(am_io2_OBJECTS)
am_parse1_OBJECTS = parse1.$(OBJEXT)
parse1_OBJECTS = $(am_parse1_OBJECTS)
am_parse2_OBJECTS = parse2.$(OBJEXT)
parse2_OBJECTS = $(am_parse2_OBJECTS)
+am_parse3_OBJECTS = parse3.$(OBJEXT)
+parse3_OBJECTS = $(am_parse3_OBJECTS)
+am_parse4_OBJECTS = parse4.$(OBJEXT)
+parse4_OBJECTS = $(am_parse4_OBJECTS)
am_reader1_OBJECTS = reader1.$(OBJEXT)
reader1_OBJECTS = $(am_reader1_OBJECTS)
am_reader2_OBJECTS = reader2.$(OBJEXT)
@@ -74,14 +81,18 @@ am_tree2_OBJECTS = tree2.$(OBJEXT)
tree2_OBJECTS = $(am_tree2_OBJECTS)
am_xpath1_OBJECTS = xpath1.$(OBJEXT)
xpath1_OBJECTS = $(am_xpath1_OBJECTS)
+am_xpath2_OBJECTS = xpath2.$(OBJEXT)
+xpath2_OBJECTS = $(am_xpath2_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/io1.Po ./$(DEPDIR)/parse1.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/parse2.Po ./$(DEPDIR)/reader1.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/reader2.Po ./$(DEPDIR)/reader3.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/testWriter.Po ./$(DEPDIR)/tree1.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/tree2.Po ./$(DEPDIR)/xpath1.Po
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/io1.Po ./$(DEPDIR)/io2.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/parse1.Po ./$(DEPDIR)/parse2.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/parse3.Po ./$(DEPDIR)/parse4.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/reader1.Po ./$(DEPDIR)/reader2.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/reader3.Po ./$(DEPDIR)/testWriter.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/tree1.Po ./$(DEPDIR)/tree2.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/xpath1.Po ./$(DEPDIR)/xpath2.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
@@ -90,14 +101,16 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(io1_SOURCES) $(parse1_SOURCES) $(parse2_SOURCES) \
+SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \
+ $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) \
$(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) \
$(testWriter_SOURCES) $(tree1_SOURCES) $(tree2_SOURCES) \
- $(xpath1_SOURCES)
-DIST_SOURCES = $(io1_SOURCES) $(parse1_SOURCES) $(parse2_SOURCES) \
+ $(xpath1_SOURCES) $(xpath2_SOURCES)
+DIST_SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \
+ $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) \
$(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) \
$(testWriter_SOURCES) $(tree1_SOURCES) $(tree2_SOURCES) \
- $(xpath1_SOURCES)
+ $(xpath1_SOURCES) $(xpath2_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -300,7 +313,7 @@ target_alias = @target_alias@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
DEPS = $(top_builddir)/libxml2.la
LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
-EXTRA_DIST = examples.xsl index.py test1.xml examples.xml test2.xml writer.xml test3.xml reader1.res reader3.res tree1.res tree2.res io1.res
+EXTRA_DIST = examples.xsl index.py test1.xml examples.xml test2.xml writer.xml test3.xml tst.xml reader1.res reader3.res tree1.res tree2.res io1.res io2.res xpath1.res xpath2.res
xpath1_SOURCES = xpath1.c
xpath1_LDFLAGS =
xpath1_DEPENDENCIES = $(DEPS)
@@ -341,6 +354,22 @@ io1_SOURCES = io1.c
io1_LDFLAGS =
io1_DEPENDENCIES = $(DEPS)
io1_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)
+io2_SOURCES = io2.c
+io2_LDFLAGS =
+io2_DEPENDENCIES = $(DEPS)
+io2_LDADD = @RDL_LIBS@ $(LDADDS)
+xpath2_SOURCES = xpath2.c
+xpath2_LDFLAGS =
+xpath2_DEPENDENCIES = $(DEPS)
+xpath2_LDADD = @RDL_LIBS@ $(LDADDS)
all: all-am
.SUFFIXES:
@@ -384,12 +413,21 @@ clean-noinstPROGRAMS:
io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES)
@rm -f io1$(EXEEXT)
$(LINK) $(io1_LDFLAGS) $(io1_OBJECTS) $(io1_LDADD) $(LIBS)
+io2$(EXEEXT): $(io2_OBJECTS) $(io2_DEPENDENCIES)
+ @rm -f io2$(EXEEXT)
+ $(LINK) $(io2_LDFLAGS) $(io2_OBJECTS) $(io2_LDADD) $(LIBS)
parse1$(EXEEXT): $(parse1_OBJECTS) $(parse1_DEPENDENCIES)
@rm -f parse1$(EXEEXT)
$(LINK) $(parse1_LDFLAGS) $(parse1_OBJECTS) $(parse1_LDADD) $(LIBS)
parse2$(EXEEXT): $(parse2_OBJECTS) $(parse2_DEPENDENCIES)
@rm -f parse2$(EXEEXT)
$(LINK) $(parse2_LDFLAGS) $(parse2_OBJECTS) $(parse2_LDADD) $(LIBS)
+parse3$(EXEEXT): $(parse3_OBJECTS) $(parse3_DEPENDENCIES)
+ @rm -f parse3$(EXEEXT)
+ $(LINK) $(parse3_LDFLAGS) $(parse3_OBJECTS) $(parse3_LDADD) $(LIBS)
+parse4$(EXEEXT): $(parse4_OBJECTS) $(parse4_DEPENDENCIES)
+ @rm -f parse4$(EXEEXT)
+ $(LINK) $(parse4_LDFLAGS) $(parse4_OBJECTS) $(parse4_LDADD) $(LIBS)
reader1$(EXEEXT): $(reader1_OBJECTS) $(reader1_DEPENDENCIES)
@rm -f reader1$(EXEEXT)
$(LINK) $(reader1_LDFLAGS) $(reader1_OBJECTS) $(reader1_LDADD) $(LIBS)
@@ -411,6 +449,9 @@ tree2$(EXEEXT): $(tree2_OBJECTS) $(tree2_DEPENDENCIES)
xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES)
@rm -f xpath1$(EXEEXT)
$(LINK) $(xpath1_LDFLAGS) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS)
+xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES)
+ @rm -f xpath2$(EXEEXT)
+ $(LINK) $(xpath2_LDFLAGS) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -419,8 +460,11 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse4.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader3.Po@am__quote@
@@ -428,6 +472,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath2.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -640,25 +685,38 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
+valgrind:
+ $(MAKE) CHECKER='valgrind -q' tests
+
tests: $(noinst_PROGRAMS)
@(echo > .memdump)
- @(./parse1 test1.xml)
+ @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./parse1 test1.xml)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./parse2 test2.xml)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.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)
- @(./parse2 test2.xml)
+ @($(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)
- @(./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
+ @($(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)
- @(./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
+ @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
+ @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./parse3)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./parse4 test3.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+ @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @(./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
+ @($(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)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml
index 9c14221..03f2db7 100644
--- a/doc/examples/examples.xml
+++ b/doc/examples/examples.xml
@@ -3,6 +3,7 @@
<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>
<usage>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; [&lt;known-ns-list&gt;]</usage>
+ <test>./xpath1 test3.xml &apos;//child2&apos; &gt; xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp</test>
<author>Aleksey Sanin</author>
<copy>see Copyright for the status of this software. </copy>
<section>XPath</section>
@@ -13,27 +14,27 @@
<include>&lt;libxml/tree.h&gt;</include>
</includes>
<uses>
- <enum line='228' file='tree' name='XML_ELEMENT_NODE'/>
- <typedef line='87' file='xpath' name='xmlXPathObjectPtr'/>
- <function line='53' file='xmlmemory' name='xmlMemoryDump'/>
- <function line='116' file='xpath' name='xmlXPathEvalExpression'/>
- <function line='185' file='xpathInternals' name='xmlXPathRegisterNs'/>
- <function line='128' file='xpath' name='xmlXPathFreeObject'/>
- <typedef line='85' file='tree' name='xmlDocPtr'/>
- <typedef line='217' file='tree' name='xmlNsPtr'/>
- <function line='100' file='xpath' name='xmlXPathNewContext'/>
- <typedef line='205' file='tree' name='xmlNodePtr'/>
- <function line='48' file='parser' name='xmlCleanupParser'/>
- <macro line='42' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <typedef line='86' file='xpath' name='xmlXPathContextPtr'/>
- <function line='129' file='xpath' name='xmlXPathFreeContext'/>
- <function line='38' file='parser' name='xmlInitParser'/>
- <function line='155' file='xmlstring' name='xmlStrdup'/>
- <function line='130' file='tree' name='xmlFreeDoc'/>
- <function line='179' file='xmlstring' name='xmlStrchr'/>
- <variable line='192' file='globals' name='xmlFree'/>
- <function line='93' file='parser' name='xmlParseFile'/>
- <enum line='216' file='tree' name='XML_NAMESPACE_DECL'/>
+ <enum line='229' file='tree' name='XML_ELEMENT_NODE'/>
+ <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
+ <function line='54' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='117' file='xpath' name='xmlXPathEvalExpression'/>
+ <function line='186' file='xpathInternals' name='xmlXPathRegisterNs'/>
+ <function line='129' file='xpath' name='xmlXPathFreeObject'/>
+ <typedef line='86' file='tree' name='xmlDocPtr'/>
+ <typedef line='218' file='tree' name='xmlNsPtr'/>
+ <function line='101' file='xpath' name='xmlXPathNewContext'/>
+ <typedef line='206' file='tree' name='xmlNodePtr'/>
+ <function line='49' file='parser' name='xmlCleanupParser'/>
+ <macro line='43' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
+ <function line='130' file='xpath' name='xmlXPathFreeContext'/>
+ <function line='39' file='parser' name='xmlInitParser'/>
+ <function line='156' file='xmlstring' name='xmlStrdup'/>
+ <function line='131' file='tree' name='xmlFreeDoc'/>
+ <function line='180' file='xmlstring' name='xmlStrchr'/>
+ <variable line='193' file='globals' name='xmlFree'/>
+ <function line='94' file='parser' name='xmlParseFile'/>
+ <enum line='217' file='tree' name='XML_NAMESPACE_DECL'/>
</uses>
</example>
<example filename='parse1.c'>
@@ -279,6 +280,90 @@
<typedef line='105' file='tree' name='xmlDocPtr'/>
</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'/>
+ </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='93' file='parser' name='xmlFreeParserCtxt'/>
+ <function line='85' file='parser' name='xmlParseChunk'/>
+ <function line='66' file='parser' name='xmlCreatePushParserCtxt'/>
+ <typedef line='44' file='tree' name='xmlParserCtxtPtr'/>
+ </uses>
+ </example>
+ <example filename='io2.c'>
+ <synopsis>Output to char buffer</synopsis>
+ <purpose>Demonstrate the use of xmlDocDumpMemory to output document to a character buffer</purpose>
+ <usage>io2</usage>
+ <test>io2 &gt; io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp</test>
+ <author>John Fleck</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>InputOutput</section>
+ <includes>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='27' file='tree' name='xmlNodeSetContent'/>
+ <function line='34' file='tree' name='xmlDocDumpFormatMemory'/>
+ <variable line='40' file='globals' name='xmlFree'/>
+ <function line='28' file='tree' name='xmlDocSetRootElement'/>
+ <typedef line='17' file='tree' name='xmlNodePtr'/>
+ <function line='25' file='tree' name='xmlNewDoc'/>
+ <function line='26' file='tree' name='xmlNewNode'/>
+ </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/xpath.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ <include>&lt;libxml/xpathInternals.h&gt;</include>
+ <include>&lt;libxml/tree.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='161' file='tree' name='xmlNodeSetContent'/>
+ <function line='126' file='tree' name='xmlDocDump'/>
+ <typedef line='87' file='xpath' name='xmlXPathObjectPtr'/>
+ <function line='109' file='xpath' name='xmlXPathEvalExpression'/>
+ <function line='122' file='xpath' name='xmlXPathFreeObject'/>
+ <function line='101' file='xpath' name='xmlXPathNewContext'/>
+ <typedef line='86' file='xpath' name='xmlXPathContextPtr'/>
+ <function line='123' file='xpath' name='xmlXPathFreeContext'/>
+ <function line='40' file='parser' name='xmlInitParser'/>
+ <enum line='179' file='tree' name='XML_NAMESPACE_DECL'/>
+ <function line='94' file='parser' name='xmlParseFile'/>
+ </uses>
+ </example>
<symbols>
<symbol name='LIBXML_TEST_VERSION'>
<ref filename='xpath1.c'/>
@@ -297,6 +382,7 @@
</symbol>
<symbol name='XML_NAMESPACE_DECL'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='XML_PARSE_DTDATTR'>
<ref filename='reader2.c'/>
@@ -334,12 +420,19 @@
<symbol name='xmlCreateIntSubset'>
<ref filename='tree2.c'/>
</symbol>
+ <symbol name='xmlCreatePushParserCtxt'>
+ <ref filename='parse4.c'/>
+ </symbol>
<symbol name='xmlCtxtReadFile'>
<ref filename='parse2.c'/>
</symbol>
<symbol name='xmlDocDump'>
<ref filename='reader3.c'/>
<ref filename='io1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlDocDumpFormatMemory'>
+ <ref filename='io2.c'/>
</symbol>
<symbol name='xmlDocGetRootElement'>
<ref filename='tree1.c'/>
@@ -355,6 +448,7 @@
<symbol name='xmlDocSetRootElement'>
<ref filename='tree2.c'/>
<ref filename='testWriter.c'/>
+ <ref filename='io2.c'/>
</symbol>
<symbol name='xmlFindCharEncodingHandler'>
<ref filename='testWriter.c'/>
@@ -362,6 +456,7 @@
<symbol name='xmlFree'>
<ref filename='xpath1.c'/>
<ref filename='testWriter.c'/>
+ <ref filename='io2.c'/>
</symbol>
<symbol name='xmlFreeDoc'>
<ref filename='xpath1.c'/>
@@ -373,6 +468,7 @@
</symbol>
<symbol name='xmlFreeParserCtxt'>
<ref filename='parse2.c'/>
+ <ref filename='parse4.c'/>
</symbol>
<symbol name='xmlFreeTextReader'>
<ref filename='reader1.c'/>
@@ -384,6 +480,7 @@
</symbol>
<symbol name='xmlInitParser'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlMalloc'>
<ref filename='testWriter.c'/>
@@ -402,12 +499,14 @@
<symbol name='xmlNewDoc'>
<ref filename='tree2.c'/>
<ref filename='testWriter.c'/>
+ <ref filename='io2.c'/>
</symbol>
<symbol name='xmlNewDocNode'>
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlNewNode'>
<ref filename='tree2.c'/>
+ <ref filename='io2.c'/>
</symbol>
<symbol name='xmlNewParserCtxt'>
<ref filename='parse2.c'/>
@@ -433,22 +532,33 @@
<symbol name='xmlNodePtr'>
<ref filename='xpath1.c'/>
<ref filename='testWriter.c'/>
+ <ref filename='io2.c'/>
+ </symbol>
+ <symbol name='xmlNodeSetContent'>
+ <ref filename='io2.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlNsPtr'>
<ref filename='xpath1.c'/>
</symbol>
+ <symbol name='xmlParseChunk'>
+ <ref filename='parse4.c'/>
+ </symbol>
<symbol name='xmlParseFile'>
<ref filename='xpath1.c'/>
<ref filename='tree1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlParserCtxtPtr'>
<ref filename='parse2.c'/>
+ <ref filename='parse4.c'/>
</symbol>
<symbol name='xmlReadFile'>
<ref filename='parse1.c'/>
</symbol>
<symbol name='xmlReadMemory'>
<ref filename='io1.c'/>
+ <ref filename='parse3.c'/>
</symbol>
<symbol name='xmlReaderForFile'>
<ref filename='reader1.c'/>
@@ -555,21 +665,27 @@
</symbol>
<symbol name='xmlXPathContextPtr'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlXPathEvalExpression'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlXPathFreeContext'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlXPathFreeObject'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlXPathNewContext'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlXPathObjectPtr'>
<ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlXPathRegisterNs'>
<ref filename='xpath1.c'/>
@@ -578,10 +694,13 @@
<sections>
<section name='InputOutput'>
<example filename='io1.c'/>
+ <example filename='io2.c'/>
</section>
<section name='Parsing'>
<example filename='parse1.c'/>
<example filename='parse2.c'/>
+ <example filename='parse3.c'/>
+ <example filename='parse4.c'/>
</section>
<section name='Tree'>
<example filename='tree1.c'/>
@@ -589,6 +708,7 @@
</section>
<section name='XPath'>
<example filename='xpath1.c'/>
+ <example filename='xpath2.c'/>
</section>
<section name='xmlReader'>
<example filename='reader1.c'/>
diff --git a/doc/examples/examples.xsl b/doc/examples/examples.xsl
index e4ccfd3..74aaaa2 100644
--- a/doc/examples/examples.xsl
+++ b/doc/examples/examples.xsl
@@ -99,6 +99,11 @@
<xsl:apply-templates select='.'/>
</xsl:for-each>
</ul>
+ <p> Getting the compilation options and libraries dependancies needed
+to generate binaries from the examples is best done on Linux/Unix by using
+the xml2-config script which should have been installed as part of <i>make
+install</i> step or when installing the libxml2 development package:</p>
+<pre>gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`</pre>
</xsl:template>
<xsl:template name="sections-list">
diff --git a/doc/examples/index.py b/doc/examples/index.py
index c3a85de..466cfc9 100755
--- a/doc/examples/index.py
+++ b/doc/examples/index.py
@@ -249,10 +249,11 @@ install-data-local:
for example in examples:
Makefile = Makefile + "%s_SOURCES=%s.c\n%s_LDFLAGS=\n%s_DEPENDENCIES= $(DEPS)\n%s_LDADD= @RDL_LIBS@ $(LDADDS)\n\n" % (example, example, example,
example, example)
+ Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind -q' tests\n\n"
Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n"
Makefile = Makefile + "\t@(echo > .memdump)\n"
for test in tests:
- Makefile = Makefile + "\t@(%s)\n" % (test)
+ Makefile = Makefile + "\t@($(CHECKER) %s)\n" % (test)
Makefile = Makefile + '\t@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)\n'
Makefile = Makefile + "\n\n"
try:
diff --git a/doc/examples/io2.c b/doc/examples/io2.c
new file mode 100644
index 0000000..59dede2
--- /dev/null
+++ b/doc/examples/io2.c
@@ -0,0 +1,45 @@
+/**
+ * section: InputOutput
+ * synopsis: Output to char buffer
+ * purpose: Demonstrate the use of xmlDocDumpMemory
+ * to output document to a character buffer
+ * usage: io2
+ * test: io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp
+ * author: John Fleck
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <libxml/parser.h>
+
+int
+main(void) {
+
+ xmlNodePtr n;
+ xmlDocPtr doc;
+ xmlChar *xmlbuff;
+ int buffersize;
+
+ /*
+ * Create the document.
+ */
+ doc = xmlNewDoc(BAD_CAST "1.0");
+ n = xmlNewNode(NULL, BAD_CAST "root");
+ xmlNodeSetContent(n, BAD_CAST "content");
+ xmlDocSetRootElement(doc,n);
+
+ /*
+ * Dump the document to a buffer and print it
+ * for demonstration purposes.
+ */
+ xmlDocDumpFormatMemory (doc, &xmlbuff, &buffersize, 1);
+ printf ((char *)xmlbuff);
+
+ /*
+ * Free associated memory.
+ */
+ xmlFree (xmlbuff);
+ xmlFreeDoc(doc);
+
+ return(0);
+
+}
diff --git a/doc/examples/io2.res b/doc/examples/io2.res
new file mode 100644
index 0000000..8737b87
--- /dev/null
+++ b/doc/examples/io2.res
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<root>content</root>
diff --git a/doc/examples/parse3.c b/doc/examples/parse3.c
new file mode 100644
index 0000000..a2d3a40
--- /dev/null
+++ b/doc/examples/parse3.c
@@ -0,0 +1,60 @@
+/**
+ * section: Parsing
+ * synopsis: Parse an XML document in memory to a tree and free it
+ * purpose: Demonstrate the use of xmlReadMemory() to read an XML file
+ * into a tree and and xmlFreeDoc() to free the resulting tree
+ * usage: parse3
+ * test: parse3
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+static const char *document = "<doc/>";
+
+/**
+ * example3Func:
+ * @content: the content of the document
+ * @length: the length in bytes
+ *
+ * Parse the in memory document and free the resulting tree
+ */
+static void
+example3Func(const char *content, int length) {
+ xmlDocPtr doc; /* the resulting document tree */
+
+ /*
+ * The document being in memory, it have no base per RFC 2396,
+ * and the "noname.xml" argument will serve as its base.
+ */
+ doc = xmlReadMemory(content, length, "noname.xml", NULL, 0);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse document\n");
+ return;
+ }
+ xmlFreeDoc(doc);
+}
+
+int main(void) {
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ example3Func(document, 6);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
diff --git a/doc/examples/parse4.c b/doc/examples/parse4.c
new file mode 100644
index 0000000..fe57894
--- /dev/null
+++ b/doc/examples/parse4.c
@@ -0,0 +1,136 @@
+/**
+ * section: Parsing
+ * synopsis: Parse an XML document chunk by chunk to a tree and free it
+ * 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
+ * usage: parse4 test3.xml
+ * test: parse4 test3.xml
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+static FILE *desc;
+
+/**
+ * readPacket:
+ * @mem: array to store the packet
+ * @size: the packet size
+ *
+ * read at most @size bytes from the document and store it in @mem
+ *
+ * Returns the number of bytes read
+ */
+static int
+readPacket(char *mem, int size) {
+ int res;
+
+ res = fread(mem, 1, size, desc);
+ return(res);
+}
+
+/**
+ * example4Func:
+ * @filename: a filename or an URL
+ *
+ * Parse the resource and free the resulting tree
+ */
+static void
+example4Func(const char *filename) {
+ xmlParserCtxtPtr ctxt;
+ char chars[4];
+ xmlDocPtr doc; /* the resulting document tree */
+ int res;
+
+ /*
+ * Read a few first byte to check the input used for the
+ * encoding detection at the parser level.
+ */
+ res = readPacket(chars, 4);
+ if (res <= 0) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return;
+ }
+
+ /*
+ * Create a progressive parsing context, the 2 first arguments
+ * are not used since we want to build a tree and not use a SAX
+ * parsing interface. We also pass the first bytes of the document
+ * to allow encoding detection when creating the parser but this
+ * is optional.
+ */
+ ctxt = xmlCreatePushParserCtxt(NULL, NULL,
+ chars, res, filename);
+ if (ctxt == NULL) {
+ fprintf(stderr, "Failed to create parser context !\n");
+ return;
+ }
+
+ /*
+ * loop on the input getting the document data, of course 4 bytes
+ * at a time is not realistic but allows to verify testing on small
+ * documents.
+ */
+ while ((res = readPacket(chars, 4)) > 0) {
+ xmlParseChunk(ctxt, chars, res, 0);
+ }
+
+ /*
+ * there is no more input, indicate the parsing is finished.
+ */
+ xmlParseChunk(ctxt, chars, 0, 1);
+
+ /*
+ * collect the document back and if it was wellformed
+ * and destroy the parser context.
+ */
+ doc = ctxt->myDoc;
+ res = ctxt->wellFormed;
+ xmlFreeParserCtxt(ctxt);
+
+ if (!res) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ }
+
+ /*
+ * since we don't use the document, destroy it now.
+ */
+ xmlFreeDoc(doc);
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2)
+ return(1);
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ /*
+ * simulate a progressive parsing using the input file.
+ */
+ desc = fopen(argv[1], "rb");
+ if (desc != NULL) {
+ example4Func(argv[1]);
+ fclose(desc);
+ } else {
+ fprintf(stderr, "Failed to parse %s\n", argv[1]);
+ }
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
diff --git a/doc/examples/tst.xml b/doc/examples/tst.xml
new file mode 100644
index 0000000..1cc6c95
--- /dev/null
+++ b/doc/examples/tst.xml
@@ -0,0 +1,7 @@
+<thing>
+ <thing1>hello</thing1>
+</thing>
+<thing>
+ <thing2>goodbye</thing2>
+</thing>
+
diff --git a/doc/examples/xpath1.c b/doc/examples/xpath1.c
index 0e49737..f014b7b 100644
--- a/doc/examples/xpath1.c
+++ b/doc/examples/xpath1.c
@@ -4,6 +4,7 @@
* purpose: Shows how to evaluate XPath expression and register
* known namespaces in XPath context.
* usage: xpath1 <xml-file> <xpath-expr> [<known-ns-list>]
+ * test: ./xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp
* author: Aleksey Sanin
* copy: see Copyright for the status of this software.
*/
diff --git a/doc/examples/xpath1.res b/doc/examples/xpath1.res
new file mode 100644
index 0000000..76af3a9
--- /dev/null
+++ b/doc/examples/xpath1.res
@@ -0,0 +1,5 @@
+Result (4 nodes):
+= element node "child2"
+= element node "child2"
+= element node "child2"
+= element node "child2"
diff --git a/doc/examples/xpath2.c b/doc/examples/xpath2.c
new file mode 100644
index 0000000..70e5e61
--- /dev/null
+++ b/doc/examples/xpath2.c
@@ -0,0 +1,189 @@
+/**
+ * section: XPath
+ * synopsis: Load a document, locate subelements with XPath, modify
+ * said elements and save the resulting document.
+ * purpose: Shows how to make a full round-trip from a load/edit/save
+ * usage: xpath2 <xml-file> <xpath-expr> <new-value>
+ * test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp
+ * author: Aleksey Sanin and Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+
+static void usage(const char *name);
+static int example4(const char *filename, const xmlChar * xpathExpr,
+ const xmlChar * value);
+static void update_xpath_nodes(xmlNodeSetPtr nodes, const xmlChar * value);
+
+
+int
+main(int argc, char **argv) {
+ /* Parse command line and process file */
+ if (argc != 4) {
+ fprintf(stderr, "Error: wrong number of arguments.\n");
+ usage(argv[0]);
+ return(-1);
+ }
+
+ /* Init libxml */
+ xmlInitParser();
+ LIBXML_TEST_VERSION
+
+ /* Do the main job */
+ if (example4(argv[1], BAD_CAST argv[2], BAD_CAST argv[3])) {
+ usage(argv[0]);
+ return(-1);
+ }
+
+ /* Shutdown libxml */
+ xmlCleanupParser();
+
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return 0;
+}
+
+/**
+ * usage:
+ * @name: the program name.
+ *
+ * Prints usage information.
+ */
+void
+usage(const char *name) {
+ assert(name);
+
+ fprintf(stderr, "Usage: %s <xml-file> <xpath-expr> <value>\n", name);
+}
+
+/**
+ * example4:
+ * @filename: the input XML filename.
+ * @xpathExpr: the xpath expression for evaluation.
+ * @value: the new node content.
+ *
+ * Parses input XML file, evaluates XPath expression and update the nodes
+ * then print the result.
+ *
+ * Returns 0 on success and a negative value otherwise.
+ */
+static int
+example4(const char* filename, const xmlChar* xpathExpr, const xmlChar* value) {
+ xmlDocPtr doc;
+ xmlXPathContextPtr xpathCtx;
+ xmlXPathObjectPtr xpathObj;
+
+ assert(filename);
+ assert(xpathExpr);
+ assert(value);
+
+ /* Load XML document */
+ doc = xmlParseFile(filename);
+ if (doc == NULL) {
+ fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename);
+ return(-1);
+ }
+
+ /* Create xpath evaluation context */
+ xpathCtx = xmlXPathNewContext(doc);
+ if(xpathCtx == NULL) {
+ fprintf(stderr,"Error: unable to create new XPath context\n");
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /* Evaluate xpath expression */
+ xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx);
+ if(xpathObj == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression \"%s\"\n", xpathExpr);
+ xmlXPathFreeContext(xpathCtx);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /* update selected nodes */
+ update_xpath_nodes(xpathObj->nodesetval, value);
+
+
+ /* Cleanup of XPath data */
+ xmlXPathFreeObject(xpathObj);
+ xmlXPathFreeContext(xpathCtx);
+
+ /* dump the resulting document */
+ xmlDocDump(stdout, doc);
+
+
+ /* free the document */
+ xmlFreeDoc(doc);
+
+ return(0);
+}
+
+/**
+ * update_xpath_nodes:
+ * @nodes: the nodes set.
+ * @value: the new value for the node(s)
+ *
+ * Prints the @nodes content to @output.
+ */
+static void
+update_xpath_nodes(xmlNodeSetPtr nodes, const xmlChar* value) {
+ int size;
+ int i;
+
+ assert(value);
+ size = (nodes) ? nodes->nodeNr : 0;
+
+ /*
+ * NOTE: the nodes are processed in reverse order, i.e. reverse document
+ * order because xmlNodeSetContent can actually free up descendant
+ * of the node and such nodes may have been selected too ! Handling
+ * in reverse order ensure that descendant are accessed first, before
+ * they get removed. Mixing XPath and modifications on a tree must be
+ * done carefully !
+ */
+ for(i = size - 1; i >= 0; i--) {
+ assert(nodes->nodeTab[i]);
+
+ xmlNodeSetContent(nodes->nodeTab[i], value);
+ /*
+ * All the elements returned by an XPath query are pointers to
+ * elements from the tree *except* namespace nodes where the XPath
+ * semantic is different from the implementation in libxml2 tree.
+ * As a result when a returned node set is freed when
+ * xmlXPathFreeObject() is called, that routine must check the
+ * element type. But node from the returned set may have been removed
+ * by xmlNodeSetContent() resulting in access to freed data.
+ * This can be exercised by running
+ * valgrind xpath2 test3.xml '//discarded' discarded
+ * There is 2 ways around it:
+ * - make a copy of the pointers to the nodes from the result set
+ * then call xmlXPathFreeObject() and then modify the nodes
+ * or
+ * - remove the reference to the modified nodes from the node set
+ * as they are processed, if they are not namespace nodes.
+ */
+ if (nodes->nodeTab[i]->type != XML_NAMESPACE_DECL)
+ nodes->nodeTab[i] = NULL;
+ }
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "XPath support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/xpath2.res b/doc/examples/xpath2.res
new file mode 100644
index 0000000..4e89699
--- /dev/null
+++ b/doc/examples/xpath2.res
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<doc>
+ <parent>
+ <discarded>discarded</discarded>
+ <preserved/>
+ This text node must be discarded
+ <discarded>discarded</discarded>
+ <preserved>
+ content1
+ <child1/>
+ <child2>content2</child2>
+ <preserved>too</preserved>
+ <child2>content3</child2>
+ <preserved/>
+ <child2>content4</child2>
+ <preserved/>
+ <child2>content5</child2>
+ content6
+ </preserved>
+ This text node must be discarded
+ <discarded>discarded</discarded>
+ This text node must be discarded
+ <preserved/>
+ This text node must be discarded
+ <preserved/>
+ This text node must be discarded
+ <discarded>discarded</discarded>
+ This text node must be discarded
+ </parent>
+</doc>
diff --git a/doc/html/libxml-catalog.html b/doc/html/libxml-catalog.html
index 59345bd..be75cc5 100644
--- a/doc/html/libxml-catalog.html
+++ b/doc/html/libxml-catalog.html
@@ -70,7 +70,7 @@ The content of this structure is not made public by the API.
</pre><h3><a name="xmlACatalogAdd" id="xmlACatalogAdd"></a>Function: xmlACatalogAdd</h3><pre class="programlisting">int xmlACatalogAdd (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * orig, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * replace)<br />
</pre><p>Add an entry in the catalog, it may overwrite existing but different entries.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlACatalogDump" id="xmlACatalogDump"></a>Function: xmlACatalogDump</h3><pre class="programlisting">void xmlACatalogDump (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> FILE * out)<br />
-</pre><p>Free up all the memory associated with catalogs</p>
+</pre><p>Dump the given catalog to the given file.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div><h3><a name="xmlACatalogRemove" id="xmlACatalogRemove"></a>Function: xmlACatalogRemove</h3><pre class="programlisting">int xmlACatalogRemove (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
</pre><p>Remove an entry from the catalog</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlACatalogResolve" id="xmlACatalogResolve"></a>Function: xmlACatalogResolve</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolve (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br />
@@ -90,7 +90,7 @@ The content of this structure is not made public by the API.
<h3><a name="xmlCatalogConvert" id="xmlCatalogConvert"></a>Function: xmlCatalogConvert</h3><pre class="programlisting">int xmlCatalogConvert (void)<br />
</pre><p>Convert all the SGML catalog entries as XML ones</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlCatalogDump" id="xmlCatalogDump"></a>Function: xmlCatalogDump</h3><pre class="programlisting">void xmlCatalogDump (FILE * out)<br />
-</pre><p>Free up all the memory associated with catalogs</p>
+</pre><p>Dump all the global catalog content to the given file.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div><h3><a name="xmlCatalogFreeLocal" id="xmlCatalogFreeLocal"></a>Function: xmlCatalogFreeLocal</h3><pre class="programlisting">void xmlCatalogFreeLocal (void * catalogs)<br />
</pre><p>Free up the memory associated to the catalog list</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr></tbody></table></div><h3><a name="xmlCatalogGetDefaults" id="xmlCatalogGetDefaults"></a>Function: xmlCatalogGetDefaults</h3><pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> xmlCatalogGetDefaults (void)<br />
diff --git a/doc/html/libxml-schemasInternals.html b/doc/html/libxml-schemasInternals.html
index 096373e..17eb775 100644
--- a/doc/html/libxml-schemasInternals.html
+++ b/doc/html/libxml-schemasInternals.html
@@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</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="#000000" 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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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-threads.html">threads</a></th><td><a accesskey="n" href="libxml-threads.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_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</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_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</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_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_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_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_MIXED">XML_SCHEMAS_TYPE_MIXED</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="#000000" 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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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-threads.html">threads</a></th><td><a accesskey="n" href="libxml-threads.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_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_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</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_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_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_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_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_MIXED">XML_SCHEMAS_TYPE_MIXED</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
@@ -35,6 +35,9 @@ The content of this structure is not made public by the API.
<h3><a name="XML_SCHEMAS_ANYATTR_SKIP" id="XML_SCHEMAS_ANYATTR_SKIP"></a>Macro: XML_SCHEMAS_ANYATTR_SKIP</h3><pre>#define XML_SCHEMAS_ANYATTR_SKIP</pre><p>Skip unknown <a href="libxml-SAX.html#attribute">attribute</a> from validation</p>
<h3><a name="XML_SCHEMAS_ANYATTR_STRICT" id="XML_SCHEMAS_ANYATTR_STRICT"></a>Macro: XML_SCHEMAS_ANYATTR_STRICT</h3><pre>#define XML_SCHEMAS_ANYATTR_STRICT</pre><p>Apply strict validation rules on attributes</p>
<h3><a name="XML_SCHEMAS_ATTR_NSDEFAULT" id="XML_SCHEMAS_ATTR_NSDEFAULT"></a>Macro: XML_SCHEMAS_ATTR_NSDEFAULT</h3><pre>#define XML_SCHEMAS_ATTR_NSDEFAULT</pre><p>allow elements in no namespace</p>
+<h3><a name="XML_SCHEMAS_ATTR_USE_OPTIONAL" id="XML_SCHEMAS_ATTR_USE_OPTIONAL"></a>Macro: XML_SCHEMAS_ATTR_USE_OPTIONAL</h3><pre>#define XML_SCHEMAS_ATTR_USE_OPTIONAL</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> is optional.</p>
+<h3><a name="XML_SCHEMAS_ATTR_USE_PROHIBITED" id="XML_SCHEMAS_ATTR_USE_PROHIBITED"></a>Macro: XML_SCHEMAS_ATTR_USE_PROHIBITED</h3><pre>#define XML_SCHEMAS_ATTR_USE_PROHIBITED</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> is prohibited.</p>
+<h3><a name="XML_SCHEMAS_ATTR_USE_REQUIRED" id="XML_SCHEMAS_ATTR_USE_REQUIRED"></a>Macro: XML_SCHEMAS_ATTR_USE_REQUIRED</h3><pre>#define XML_SCHEMAS_ATTR_USE_REQUIRED</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> is required.</p>
<h3><a name="XML_SCHEMAS_ELEM_ABSTRACT" id="XML_SCHEMAS_ELEM_ABSTRACT"></a>Macro: XML_SCHEMAS_ELEM_ABSTRACT</h3><pre>#define XML_SCHEMAS_ELEM_ABSTRACT</pre><p>the element is abstract</p>
<h3><a name="XML_SCHEMAS_ELEM_DEFAULT" id="XML_SCHEMAS_ELEM_DEFAULT"></a>Macro: XML_SCHEMAS_ELEM_DEFAULT</h3><pre>#define XML_SCHEMAS_ELEM_DEFAULT</pre><p>the element has a default value</p>
<h3><a name="XML_SCHEMAS_ELEM_FIXED" id="XML_SCHEMAS_ELEM_FIXED"></a>Macro: XML_SCHEMAS_ELEM_FIXED</h3><pre>#define XML_SCHEMAS_ELEM_FIXED</pre><p>the element has a fixed value</p>
@@ -150,6 +153,7 @@ The content of this structure is not made public by the API.
<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
}</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 name="XML_SCHEMA_TYPE_ANY" id="XML_SCHEMA_TYPE_ANY">XML_SCHEMA_TYPE_ANY</a> = 2
diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html
index b952919..0ab5af7 100644
--- a/doc/html/libxml-tree.html
+++ b/doc/html/libxml-tree.html
@@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</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 tree from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 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 tree 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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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-threads.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-threads.html">threads</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-uri.html">uri</a></th><td><a accesskey="n" href="libxml-uri.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a></pre><pre class="programlisting">#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a></pre><pre class="programlisting">#define <a href="#XML_GET_LINE">XML_GET_LINE</a></pre><pre class="programlisting">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a></pre><pre class="programlisting">#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a></pre><pre class="programlisting">#define <a href="#xmlChildrenNode">xmlChildrenNode</a></pre><pre class="programlisting">#define <a href="#xmlRootNode">xmlRootNode</a></pre><pre class="programlisting">Structure <a href="#xmlAttr">xmlAttr</a><br />struct _xmlAttr
+ </style><title>Module tree from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 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 tree 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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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-threads.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-threads.html">threads</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-uri.html">uri</a></th><td><a accesskey="n" href="libxml-uri.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a></pre><pre class="programlisting">#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a></pre><pre class="programlisting">#define <a href="#XML_GET_LINE">XML_GET_LINE</a></pre><pre class="programlisting">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a></pre><pre class="programlisting">#define <a href="#XML_XML_ID">XML_XML_ID</a></pre><pre class="programlisting">#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a></pre><pre class="programlisting">#define <a href="#xmlChildrenNode">xmlChildrenNode</a></pre><pre class="programlisting">#define <a href="#xmlRootNode">xmlRootNode</a></pre><pre class="programlisting">Structure <a href="#xmlAttr">xmlAttr</a><br />struct _xmlAttr
</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlAttr">xmlAttr</a> * <a name="xmlAttrPtr" id="xmlAttrPtr">xmlAttrPtr</a>
</pre><pre class="programlisting">Structure <a href="#xmlAttribute">xmlAttribute</a><br />struct _xmlAttribute
</pre><pre class="programlisting">Enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a>
@@ -207,6 +207,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<h3><a name="XML_GET_CONTENT" id="XML_GET_CONTENT"></a>Macro: XML_GET_CONTENT</h3><pre>#define XML_GET_CONTENT</pre><p>Macro to extract the content pointer of a node.</p>
<h3><a name="XML_GET_LINE" id="XML_GET_LINE"></a>Macro: XML_GET_LINE</h3><pre>#define XML_GET_LINE</pre><p>Macro to extract the line number of an element node.</p>
<h3><a name="XML_LOCAL_NAMESPACE" id="XML_LOCAL_NAMESPACE"></a>Macro: XML_LOCAL_NAMESPACE</h3><pre>#define XML_LOCAL_NAMESPACE</pre><p>A namespace declaration node.</p>
+<h3><a name="XML_XML_ID" id="XML_XML_ID"></a>Macro: XML_XML_ID</h3><pre>#define XML_XML_ID</pre><p>This is the name for the special xml:id <a href="libxml-SAX.html#attribute">attribute</a></p>
<h3><a name="XML_XML_NAMESPACE" id="XML_XML_NAMESPACE"></a>Macro: XML_XML_NAMESPACE</h3><pre>#define XML_XML_NAMESPACE</pre><p>This is the namespace for the special xml: prefix predefined in the XML Namespace specification.</p>
<h3><a name="xmlChildrenNode" id="xmlChildrenNode"></a>Macro: xmlChildrenNode</h3><pre>#define xmlChildrenNode</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children."</p>
<h3><a name="xmlRootNode" id="xmlRootNode"></a>Macro: xmlRootNode</h3><pre>#define xmlRootNode</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children".</p>
diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html
index f054620..0a347d9 100644
--- a/doc/html/libxml-xmlerror.html
+++ b/doc/html/libxml-xmlerror.html
@@ -229,6 +229,8 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD
<a name="XML_DTD_UNKNOWN_ID" id="XML_DTD_UNKNOWN_ID">XML_DTD_UNKNOWN_ID</a> = 536 : 536
<a name="XML_DTD_UNKNOWN_NOTATION" id="XML_DTD_UNKNOWN_NOTATION">XML_DTD_UNKNOWN_NOTATION</a> = 537 : 537
<a name="XML_DTD_STANDALONE_DEFAULTED" id="XML_DTD_STANDALONE_DEFAULTED">XML_DTD_STANDALONE_DEFAULTED</a> = 538 : 538
+ <a name="XML_DTD_XMLID_VALUE" id="XML_DTD_XMLID_VALUE">XML_DTD_XMLID_VALUE</a> = 539 : 539
+ <a name="XML_DTD_XMLID_TYPE" id="XML_DTD_XMLID_TYPE">XML_DTD_XMLID_TYPE</a> = 540 : 540
<a name="XML_HTML_STRUCURE_ERROR" id="XML_HTML_STRUCURE_ERROR">XML_HTML_STRUCURE_ERROR</a> = 800
<a name="XML_HTML_UNKNOWN_TAG" id="XML_HTML_UNKNOWN_TAG">XML_HTML_UNKNOWN_TAG</a> = 801 : 801
<a name="XML_RNGP_ANYNAME_ATTR_ANCESTOR" id="XML_RNGP_ANYNAME_ATTR_ANCESTOR">XML_RNGP_ANYNAME_ATTR_ANCESTOR</a> = 1000
@@ -538,6 +540,9 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD
<a name="XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI" id="XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI</a> = 1770 : 1769
<a name="XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI" id="XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI</a> = 1771 : 1770
<a name="XML_SCHEMAP_NOT_SCHEMA" id="XML_SCHEMAP_NOT_SCHEMA">XML_SCHEMAP_NOT_SCHEMA</a> = 1772 : 1771
+ <a name="XML_SCHEMAP_UNKNOWN_MEMBER_TYPE" id="XML_SCHEMAP_UNKNOWN_MEMBER_TYPE">XML_SCHEMAP_UNKNOWN_MEMBER_TYPE</a> = 1773 : 1772
+ <a name="XML_SCHEMAP_INVALID_ATTR_USE" id="XML_SCHEMAP_INVALID_ATTR_USE">XML_SCHEMAP_INVALID_ATTR_USE</a> = 1774 : 1723
+ <a name="XML_SCHEMAP_RECURSIVE" id="XML_SCHEMAP_RECURSIVE">XML_SCHEMAP_RECURSIVE</a> = 1775 : 1724
<a name="XML_SCHEMAV_NOROOT" id="XML_SCHEMAV_NOROOT">XML_SCHEMAV_NOROOT</a> = 1800
<a name="XML_SCHEMAV_UNDECLAREDELEM" id="XML_SCHEMAV_UNDECLAREDELEM">XML_SCHEMAV_UNDECLAREDELEM</a> = 1801 : 1801
<a name="XML_SCHEMAV_NOTTOPLEVEL" id="XML_SCHEMAV_NOTTOPLEVEL">XML_SCHEMAV_NOTTOPLEVEL</a> = 1802 : 1802
diff --git a/doc/html/libxml-xmlreader.html b/doc/html/libxml-xmlreader.html
index 5f98b1c..3449d4b 100644
--- a/doc/html/libxml-xmlreader.html
+++ b/doc/html/libxml-xmlreader.html
@@ -203,7 +203,7 @@ void xmlTextReaderErrorFunc (void * arg, <br /> const char * msg, <br />
<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 or NULL is no callback has been registered</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetParserProp" id="xmlTextReaderGetParserProp"></a>Function: xmlTextReaderGetParserProp</h3><pre class="programlisting">int xmlTextReaderGetParserProp (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int prop)<br />
</pre><p>Read the parser internal property.</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>prop</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlParserProperties">xmlParserProperties</a> to get</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value, usually 0 or 1, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetRemainder" id="xmlTextReaderGetRemainder"></a>Function: xmlTextReaderGetRemainder</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlTextReaderGetRemainder (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
-</pre><p>Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use.</p>
+</pre><p>Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly procgressed past what's left in reader-&gt;input, and there is an allocation problem. Best would be to rewrite it differently.</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>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> attached to the XML or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderHasAttributes" id="xmlTextReaderHasAttributes"></a>Function: xmlTextReaderHasAttributes</h3><pre class="programlisting">int xmlTextReaderHasAttributes (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
</pre><p>Whether the node has attributes.</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>Returns</tt></i>:</span></td><td>1 if true, 0 if false, and -1 in case or error</td></tr></tbody></table></div><h3><a name="xmlTextReaderHasValue" id="xmlTextReaderHasValue"></a>Function: xmlTextReaderHasValue</h3><pre class="programlisting">int xmlTextReaderHasValue (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html
index 9af9c19..0e64857 100644
--- a/doc/html/libxml-xmlsave.html
+++ b/doc/html/libxml-xmlsave.html
@@ -27,7 +27,7 @@ The content of this structure is not made public by the API.
}</pre><h3><a name="xmlSaveClose" id="xmlSaveClose"></a>Function: xmlSaveClose</h3><pre class="programlisting">int xmlSaveClose (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)<br />
</pre><p>Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.</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>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="xmlSaveDoc" id="xmlSaveDoc"></a>Function: xmlSaveDoc</h3><pre class="programlisting">long xmlSaveDoc (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
-</pre><p>Save a full document to a saving context</p>
+</pre><p>Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</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>doc</tt></i>:</span></td><td>a 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 error</td></tr></tbody></table></div><h3><a name="xmlSaveFlush" id="xmlSaveFlush"></a>Function: xmlSaveFlush</h3><pre class="programlisting">int xmlSaveFlush (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)<br />
</pre><p>Flush a document saving context, i.e. make sure that all bytes have been output.</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>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="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 />
@@ -39,5 +39,5 @@ The content of this structure is not made public by the API.
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file name or an URL</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="xmlSaveToIO" id="xmlSaveToIO"></a>Function: xmlSaveToIO</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToIO (<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)<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>iowrite</tt></i>:</span></td><td>an I/O write function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</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="xmlSaveTree" id="xmlSaveTree"></a>Function: xmlSaveTree</h3><pre class="programlisting">long xmlSaveTree (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
-</pre><p>Save a subtree starting at the node parameter to a saving context</p>
+</pre><p>Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</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>node</tt></i>:</span></td><td>a 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 error</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>
diff --git a/doc/index.html b/doc/index.html
index 263551d..fbefc3c 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -12,7 +12,8 @@ H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style>
- <title>The XML C parser and toolkit of Gnome</title>
+ <title>The XML C parser and toolkit of Gnome
+</title>
</head>
<body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="center">
@@ -45,8 +46,10 @@ A:link, A:visited, A:active { text-decoration: underline }
<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>libxml</h2>
+ <h1>The XML C parser and toolkit of Gnome
+</h1>
+ <h2>libxml
+</h2>
</td>
</tr>
</table>
@@ -69,7 +72,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<tr>
<td colspan="1" bgcolor="#eecfa1" align="center">
<center>
- <b>Main Menu</b>
+ <b>Main Menu
+</b>
</center>
</td>
</tr>
@@ -81,58 +85,76 @@ A:link, A:visited, A:active { text-decoration: underline }
</form>
<ul>
<li>
- <a href="index.html">Home</a>
+ <a href="index.html">Home
+</a>
</li>
<li>
- <a href="intro.html">Introduction</a>
+ <a href="intro.html">Introduction
+</a>
</li>
<li>
- <a href="FAQ.html">FAQ</a>
+ <a href="FAQ.html">FAQ
+</a>
</li>
<li>
- <a href="docs.html" style="font-weight:bold">Developer Menu</a>
+ <a href="docs.html" style="font-weight:bold">Developer Menu
+</a>
</li>
<li>
- <a href="bugs.html">Reporting bugs and getting help</a>
+ <a href="bugs.html">Reporting bugs and getting help
+</a>
</li>
<li>
- <a href="help.html">How to help</a>
+ <a href="help.html">How to help
+</a>
</li>
<li>
- <a href="downloads.html">Downloads</a>
+ <a href="downloads.html">Downloads
+</a>
</li>
<li>
- <a href="news.html">News</a>
+ <a href="news.html">News
+</a>
</li>
<li>
- <a href="XMLinfo.html">XML</a>
+ <a href="XMLinfo.html">XML
+</a>
</li>
<li>
- <a href="XSLT.html">XSLT</a>
+ <a href="XSLT.html">XSLT
+</a>
</li>
<li>
- <a href="xmldtd.html">Validation &amp; DTDs</a>
+ <a href="xmldtd.html">Validation &amp; DTDs
+</a>
</li>
<li>
- <a href="encoding.html">Encodings support</a>
+ <a href="encoding.html">Encodings support
+</a>
</li>
<li>
- <a href="catalog.html">Catalog support</a>
+ <a href="catalog.html">Catalog support
+</a>
</li>
<li>
- <a href="namespaces.html">Namespaces</a>
+ <a href="namespaces.html">Namespaces
+</a>
</li>
<li>
- <a href="contribs.html">Contributions</a>
+ <a href="contribs.html">Contributions
+</a>
</li>
<li>
- <a href="examples/index.html" style="font-weight:bold">Code Examples</a>
+ <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>
+ <a href="html/index.html" style="font-weight:bold">API Menu
+</a>
</li>
<li>
- <a href="guidelines.html">XML Guidelines</a>
+ <a href="guidelines.html">XML Guidelines
+</a>
</li>
</ul>
</td>
@@ -142,7 +164,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<tr>
<td colspan="1" bgcolor="#eecfa1" align="center">
<center>
- <b>Related links</b>
+ <b>Related links
+</b>
</center>
</td>
</tr>
@@ -150,34 +173,44 @@ A:link, A:visited, A:active { text-decoration: underline }
<td bgcolor="#fffacd">
<ul>
<li>
- <a href="http://mail.gnome.org/archives/xml/">Mail archive</a>
+ <a href="http://mail.gnome.org/archives/xml/">Mail archive
+</a>
</li>
<li>
- <a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a>
+ <a href="http://xmlsoft.org/XSLT/">XSLT libxslt
+</a>
</li>
<li>
- <a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a>
+ <a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2
+</a>
</li>
<li>
- <a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a>
+ <a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec
+</a>
</li>
<li>
- <a href="ftp://xmlsoft.org/">FTP</a>
+ <a href="ftp://xmlsoft.org/">FTP
+</a>
</li>
<li>
- <a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a>
+ <a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries
+</a>
</li>
<li>
- <a href="http://garypennington.net/libxml2/">Solaris binaries</a>
+ <a href="http://garypennington.net/libxml2/">Solaris binaries
+</a>
</li>
<li>
- <a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a>
+ <a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries
+</a>
</li>
<li>
- <a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a>
+ <a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings
+</a>
</li>
<li>
- <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a>
+ <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker
+</a>
</li>
</ul>
</td>
@@ -199,77 +232,232 @@ A:link, A:visited, A:active { text-decoration: underline }
<td bgcolor="#fffacd">
<p></p>
<p style="text-align: right; font-style: italic; font-size: 10pt">"Programming
-with libxml2 is like the thrilling embrace of an exotic stranger." <a href="http://diveintomark.org/archives/2004/02/18/libxml2">Mark
-Pilgrim</a></p>
+with libxml2 is like the thrilling embrace of an exotic stranger."
+ <a href="http://diveintomark.org/archives/2004/02/18/libxml2">Mark
+Pilgrim
+</a>
+</p>
<p>Libxml2 is the XML C parser and toolkit developed for the Gnome project
(but usable outside of the Gnome platform), it is free software available
-under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
-License</a>. XML itself is a metalanguage to design markup languages, i.e.
+under the
+ <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+License
+</a>
+. XML itself is a metalanguage to design markup languages, i.e.
text language where semantic and structure are added to the content using
extra "markup" information enclosed between angle brackets. HTML is the most
-well-known markup language. Though the library is written in C <a href="python.html">a variety of language bindings</a> make it available in
-other environments.</p>
+well-known markup language. Though the library is written in C
+ <a href="python.html">a variety of language bindings
+</a>
+ make it available in
+other environments.
+</p>
<p>Libxml2 is known to be very portable, the library should build and work
without serious troubles on a variety of systems (Linux, Unix, Windows,
-CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)</p>
+CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)
+</p>
<p>Libxml2 implements a number of existing standards related to markup
-languages:</p>
- <ul><li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
- <li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
- <li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li>
- <li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
- Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li>
- <li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li>
- <li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li>
- <li>XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li>
- <li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li>
- <li>ISO-8859-x encodings, as well as <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
- and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
- [UTF-16] Unicode encodings, and more if using iconv support</li>
- <li>part of SGML Open Technical Resolution TR9401:1997</li>
- <li>XML Catalogs Working Draft 06 August 2001: <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li>
- <li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
- and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
- <li>Relax NG, ISO/IEC 19757-2:2003, <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li>
- <li>W3C XML Schemas Part 2: Datatypes <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
- 2001</a></li>
+languages:
+</p>
+ <ul> <li>the XML standard:
+ <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml
+</a>
+</li>
+
+
+ <li>Namespaces in XML:
+ <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/
+</a>
+</li>
+
+
+ <li>XML Base:
+ <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/
+</a>
+</li>
+
+
+ <li> <a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396
+</a>
+ :
+ Uniform Resource Identifiers
+ <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt
+</a>
+</li>
+
+
+ <li>XML Path Language (XPath) 1.0:
+ <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath
+</a>
+</li>
+
+
+ <li>HTML4 parser:
+ <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/
+</a>
+</li>
+
+
+ <li>XML Pointer Language (XPointer) Version 1.0:
+ <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr
+</a>
+</li>
+
+
+ <li>XML Inclusions (XInclude) Version 1.0:
+ <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/
+</a>
+</li>
+
+
+ <li>ISO-8859-x encodings, as well as
+ <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044
+</a>
+ [UTF-8]
+ and
+ <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781
+</a>
+
+ [UTF-16] Unicode encodings, and more if using iconv support
+</li>
+
+
+ <li>part of SGML Open Technical Resolution TR9401:1997
+</li>
+
+
+ <li>XML Catalogs Working Draft 06 August 2001:
+ <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+</a>
+</li>
+
+
+ <li>Canonical XML Version 1.0:
+ <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n
+</a>
+
+ and the Exclusive XML Canonicalization CR draft
+ <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n
+</a>
+</li>
+
+
+ <li>Relax NG, ISO/IEC 19757-2:2003,
+ <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html
+</a>
+</li>
+
+
+ <li>W3C XML Schemas Part 2: Datatypes
+ <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
+ 2001
+</a>
+</li>
+
+
+ <li>W3C
+ <a href="http://www.w3.org/TR/xml-id/">xml:id
+</a>
+ Working Draft 7
+ April 2004
+</li>
+
+
</ul>
<p>In most cases libxml2 tries to implement the specifications in a
relatively strictly compliant way. As of release 2.4.16, libxml2 passes all
-1800+ tests from the <a href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
-Suite</a>.</p>
+1800+ tests from the
+ <a href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
+Suite
+</a>
+.
+</p>
<p>To some extent libxml2 provides support for the following additional
-specifications but doesn't claim to implement them completely:</p>
- <ul><li>Document Object Model (DOM) <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>
+specifications but doesn't claim to implement them completely:
+</p>
+ <ul> <li>Document Object Model (DOM)
+ <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/
+</a>
+
it doesn't implement the API itself, gdome2 does this on top of
- libxml2</li>
- <li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> :
- libxml2 implements a basic FTP client code</li>
- <li><a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> :
- HTTP/1.0, again a basic HTTP client code</li>
- <li>SAX: a minimal SAX implementation compatible with early expat
- versions</li>
- <li>DocBook SGML v4: libxml2 includes a hackish parser to transition to
- XML</li>
+ libxml2
+</li>
+
+
+ <li> <a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959
+</a>
+ :
+ libxml2 implements a basic FTP client code
+</li>
+
+
+ <li> <a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945
+</a>
+ :
+ HTTP/1.0, again a basic HTTP client code
+</li>
+
+
+ <li>SAX: a minimal SAX implementation compatible with early expat
+ versions
+</li>
+
+
+ <li>DocBook SGML v4: libxml2 includes a hackish parser to transition to
+ XML
+</li>
+
+
</ul>
- <p>A partial implementation of <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part
-1: Structure</a> is being worked on but it would be far too early to make any
-conformance statement about it at the moment.</p>
- <p>Separate documents:</p>
- <ul><li><a href="http://xmlsoft.org/XSLT/">the libxslt page</a> providing an
+ <p>A partial implementation of
+ <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part
+1: Structure
+</a>
+ is being worked on but it would be far too early to make any
+conformance statement about it at the moment.
+</p>
+ <p>Separate documents:
+</p>
+ <ul> <li> <a href="http://xmlsoft.org/XSLT/">the libxslt page
+</a>
+ providing an
implementation of XSLT 1.0 and common extensions like EXSLT for
- libxml2</li>
- <li><a href="http://www.cs.unibo.it/~casarini/gdome2/">the gdome2 page</a>
- : a standard DOM2 implementation for libxml2</li>
- <li><a href="http://www.aleksey.com/xmlsec/">the XMLSec page</a>: an
- implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
- Digital Signature</a> for libxml2</li>
- <li>also check the related links section below for more related and active
- projects.</li>
+ libxml2
+</li>
+
+
+ <li> <a href="http://www.cs.unibo.it/~casarini/gdome2/">the gdome2 page
+</a>
+
+ : a standard DOM2 implementation for libxml2
+</li>
+
+
+ <li> <a href="http://www.aleksey.com/xmlsec/">the XMLSec page
+</a>
+: an
+ implementation of
+ <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
+ Digital Signature
+</a>
+ for libxml2
+</li>
+
+
+ <li>also check the related links section below for more related and active
+ projects.
+</li>
+
+
</ul>
- <p>Logo designed by <a href="mailto:liyanage@access.ch">Marc Liyanage</a>.</p>
+ <p>Logo designed by
+ <a href="mailto:liyanage@access.ch">Marc Liyanage
+</a>
+.
+</p>
<p>
- <a href="bugs.html">Daniel Veillard</a>
+ <a href="bugs.html">Daniel Veillard
+</a>
</p>
</td>
</tr>
diff --git a/doc/index.py b/doc/index.py
index 470f1b2..578f288 100755
--- a/doc/index.py
+++ b/doc/index.py
@@ -99,6 +99,12 @@ TABLES={
Count int(11) NOT NULL,
UNIQUE KEY id (ID,Value(35)),
INDEX (ID))""",
+ "AllQueries" : """CREATE TABLE AllQueries (
+ ID int(11) NOT NULL auto_increment,
+ Value varchar(50) NOT NULL,
+ Count int(11) NOT NULL,
+ UNIQUE KEY id (ID,Value(35)),
+ INDEX (ID))""",
}
#
@@ -132,14 +138,15 @@ def createTable(db, name):
return -1
return ret
-def checkTables(db):
+def checkTables(db, verbose = 1):
global TABLES
if db == None:
return -1
c = db.cursor()
nbtables = c.execute("show tables")
- print "Found %d tables" % (nbtables)
+ if verbose:
+ print "Found %d tables" % (nbtables)
tables = {}
i = 0
while i < nbtables:
@@ -155,7 +162,8 @@ def checkTables(db):
try:
ret = c.execute("SELECT count(*) from %s" % table);
row = c.fetchone()
- print "Table %s contains %d records" % (table, row[0])
+ if verbose:
+ print "Table %s contains %d records" % (table, row[0])
except:
print "Troubles with table %s : repairing" % (table)
ret = c.execute("repair table %s" % table);
@@ -163,7 +171,8 @@ def checkTables(db):
ret = c.execute("SELECT count(*) from %s" % table);
row = c.fetchone()
print "Table %s contains %d records" % (table, row[0])
- print "checkTables finished"
+ if verbose:
+ print "checkTables finished"
# make sure apache can access the tables read-only
try:
@@ -173,7 +182,7 @@ def checkTables(db):
pass
return 0
-def openMySQL(db="xmlsoft", passwd=None):
+def openMySQL(db="xmlsoft", passwd=None, verbose = 1):
global DB
if passwd == None:
@@ -186,7 +195,7 @@ def openMySQL(db="xmlsoft", passwd=None):
DB = MySQLdb.connect(passwd=passwd, db=db)
if DB == None:
return -1
- ret = checkTables(DB)
+ ret = checkTables(DB, verbose)
return ret
def updateWord(name, symbol, relevance):
@@ -1121,13 +1130,6 @@ def scanXMLDateArchive(t = None, force = 0):
# Main code: open the DB, the API XML and analyze it #
# #
#########################################################################
-try:
- openMySQL()
-except:
- print "Failed to open the database"
- print sys.exc_type, sys.exc_value
- sys.exit(1)
-
def analyzeArchives(t = None, force = 0):
global wordsDictArchive
@@ -1201,6 +1203,13 @@ def usage():
sys.exit(1)
def main():
+ try:
+ openMySQL()
+ except:
+ print "Failed to open the database"
+ print sys.exc_type, sys.exc_value
+ sys.exit(1)
+
args = sys.argv[1:]
force = 0
if args:
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index 3546b0c..44607b8 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -1020,25 +1020,28 @@
<summary>internal interfaces for XML Schemas</summary>
<description>internal interfaces for the XML Schemas handling and schema validity checking </description>
<author>Daniel Veillard </author>
- <exports symbol='XML_SCHEMAS_FACET_UNKNOWN' type='macro'/>
<exports symbol='XML_SCHEMAS_ANYATTR_LAX' type='macro'/>
- <exports symbol='XML_SCHEMAS_ELEM_TOPLEVEL' type='macro'/>
- <exports symbol='XML_SCHEMAS_ELEM_ABSTRACT' type='macro'/>
<exports symbol='XML_SCHEMAS_ANYATTR_STRICT' type='macro'/>
<exports symbol='XML_SCHEMAS_QUALIF_ATTR' type='macro'/>
- <exports symbol='XML_SCHEMAS_ELEM_FIXED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_USE_REQUIRED' type='macro'/>
<exports symbol='XML_SCHEMAS_FACET_COLLAPSE' type='macro'/>
- <exports symbol='XML_SCHEMAS_QUALIF_ELEM' type='macro'/>
<exports symbol='XML_SCHEMAS_ELEM_NSDEFAULT' type='macro'/>
<exports symbol='XML_SCHEMAS_ELEM_GLOBAL' type='macro'/>
- <exports symbol='XML_SCHEMAS_ATTR_NSDEFAULT' type='macro'/>
- <exports symbol='XML_SCHEMAS_ANYATTR_SKIP' type='macro'/>
- <exports symbol='XML_SCHEMAS_ELEM_DEFAULT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_NILLABLE' type='macro'/>
<exports symbol='XML_SCHEMAS_TYPE_MIXED' type='macro'/>
- <exports symbol='XML_SCHEMAS_FACET_REPLACE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_USE_PROHIBITED' type='macro'/>
<exports symbol='XML_SCHEMAS_FACET_PRESERVE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FACET_UNKNOWN' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_TOPLEVEL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_ABSTRACT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_FIXED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_QUALIF_ELEM' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ANYATTR_SKIP' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_USE_OPTIONAL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_NSDEFAULT' type='macro'/>
<exports symbol='XML_SCHEMAS_ELEM_REF' type='macro'/>
- <exports symbol='XML_SCHEMAS_ELEM_NILLABLE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_DEFAULT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FACET_REPLACE' type='macro'/>
<exports symbol='XML_SCHEMA_TYPE_SIMPLE' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_GROUP' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_SEQUENCE' type='enum'/>
@@ -1138,9 +1141,10 @@
<exports symbol='XML_LOCAL_NAMESPACE' type='macro'/>
<exports symbol='XML_GET_CONTENT' type='macro'/>
<exports symbol='XML_XML_NAMESPACE' type='macro'/>
- <exports symbol='BASE_BUFFER_SIZE' type='macro'/>
- <exports symbol='xmlRootNode' type='macro'/>
+ <exports symbol='XML_XML_ID' type='macro'/>
<exports symbol='xmlChildrenNode' type='macro'/>
+ <exports symbol='xmlRootNode' type='macro'/>
+ <exports symbol='BASE_BUFFER_SIZE' type='macro'/>
<exports symbol='XML_GET_LINE' type='macro'/>
<exports symbol='XML_ATTRIBUTE_IMPLIED' type='enum'/>
<exports symbol='XML_ATTRIBUTE_IDREF' type='enum'/>
@@ -1657,6 +1661,7 @@
<description>the API used to report errors </description>
<author>Daniel Veillard </author>
<exports symbol='XML_DTD_CONTENT_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_MEMBER_TYPE' type='enum'/>
<exports symbol='XML_SCHEMAV_NOROOT' type='enum'/>
<exports symbol='XML_DTD_ATTRIBUTE_VALUE' type='enum'/>
<exports symbol='XML_ERR_INVALID_DEC_CHARREF' type='enum'/>
@@ -1700,7 +1705,7 @@
<exports symbol='XML_HTTP_UNKNOWN_HOST' type='enum'/>
<exports symbol='XML_XPTR_EXTRA_OBJECTS' type='enum'/>
<exports symbol='XML_ERR_ENTITY_NOT_FINISHED' type='enum'/>
- <exports symbol='XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_ATTR_USE' type='enum'/>
<exports symbol='XML_IO_UNKNOWN' type='enum'/>
<exports symbol='XML_RNGP_PAT_ONEMORE_GROUP_ATTR' type='enum'/>
<exports symbol='XML_ERR_VALUE_REQUIRED' type='enum'/>
@@ -1741,7 +1746,7 @@
<exports symbol='XML_ERR_NMTOKEN_REQUIRED' type='enum'/>
<exports symbol='XML_RNGP_ANYNAME_ATTR_ANCESTOR' type='enum'/>
<exports symbol='XML_ERR_ENTITY_IS_EXTERNAL' type='enum'/>
- <exports symbol='XML_WAR_UNDECLARED_ENTITY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD' type='enum'/>
<exports symbol='XML_ERR_PI_NOT_STARTED' type='enum'/>
<exports symbol='XML_RNGP_START_CONTENT' type='enum'/>
<exports symbol='XML_RNGP_GROUP_ATTR_CONFLICT' type='enum'/>
@@ -1779,7 +1784,7 @@
<exports symbol='XML_DTD_EMPTY_NOTATION' type='enum'/>
<exports symbol='XML_RNGP_ELEMENT_EMPTY' type='enum'/>
<exports symbol='XML_RNGP_PAT_LIST_TEXT' type='enum'/>
- <exports symbol='XML_XPATH_START_LITERAL_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_ALL_CHILD' type='enum'/>
<exports symbol='XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI' type='enum'/>
<exports symbol='XML_ERR_ELEMCONTENT_NOT_STARTED' type='enum'/>
<exports symbol='XML_RNGP_INCLUDE_FAILURE' type='enum'/>
@@ -1791,7 +1796,7 @@
<exports symbol='XML_FROM_CATALOG' type='enum'/>
<exports symbol='XML_SCHEMAV_ATTRINVALID' type='enum'/>
<exports symbol='XML_SCHEMAV_VALUE' type='enum'/>
- <exports symbol='XML_IO_LOAD_ERROR' type='enum'/>
+ <exports symbol='XML_DTD_NOT_EMPTY' type='enum'/>
<exports symbol='XML_FROM_HTML' type='enum'/>
<exports symbol='XML_RNGP_PAT_START_LIST' type='enum'/>
<exports symbol='XML_ERR_LT_REQUIRED' type='enum'/>
@@ -1917,6 +1922,7 @@
<exports symbol='XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE' type='enum'/>
<exports symbol='XML_RNGP_ATTRIBUTE_CONTENT' type='enum'/>
<exports symbol='XML_RNGP_REF_NOT_EMPTY' type='enum'/>
+ <exports symbol='XML_DTD_XMLID_TYPE' type='enum'/>
<exports symbol='XML_XPATH_VARIABLE_REF_ERROR' type='enum'/>
<exports symbol='XML_RNGP_INTERLEAVE_ADD' type='enum'/>
<exports symbol='XML_SCHEMAP_UNKNOWN_CHOICE_CHILD' type='enum'/>
@@ -1943,6 +1949,7 @@
<exports symbol='XML_FROM_XSLT' type='enum'/>
<exports symbol='XML_RNGP_PAT_LIST_ATTR' type='enum'/>
<exports symbol='XML_IO_EIO' type='enum'/>
+ <exports symbol='XML_XPATH_START_LITERAL_ERROR' type='enum'/>
<exports symbol='XML_IO_EACCES' type='enum'/>
<exports symbol='XML_DTD_NOT_PCDATA' type='enum'/>
<exports symbol='XML_SCHEMAP_PREFIX_UNDEFINED' type='enum'/>
@@ -1950,7 +1957,7 @@
<exports symbol='XML_RNGP_PARAM_FORBIDDEN' type='enum'/>
<exports symbol='XML_ERR_OK' type='enum'/>
<exports symbol='XML_SCHEMAP_NOTHING_TO_PARSE' type='enum'/>
- <exports symbol='XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_RECURSIVE' type='enum'/>
<exports symbol='XML_ERR_UNSUPPORTED_ENCODING' type='enum'/>
<exports symbol='XML_SCHEMAP_GROUP_NONAME_NOREF' type='enum'/>
<exports symbol='XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME' type='enum'/>
@@ -1998,7 +2005,7 @@
<exports symbol='XML_RNGP_ATTRIBUTE_EMPTY' type='enum'/>
<exports symbol='XML_SCHEMAV_ISABSTRACT' type='enum'/>
<exports symbol='XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP' type='enum'/>
- <exports symbol='XML_DTD_NOT_EMPTY' type='enum'/>
+ <exports symbol='XML_IO_LOAD_ERROR' type='enum'/>
<exports symbol='XML_RNGP_PAT_LIST_ELEM' type='enum'/>
<exports symbol='XML_SCHEMAV_UNDECLAREDELEM' type='enum'/>
<exports symbol='XML_RNGP_CREATE_FAILURE' type='enum'/>
@@ -2052,6 +2059,7 @@
<exports symbol='XML_RNGP_PAT_DATA_EXCEPT_EMPTY' type='enum'/>
<exports symbol='XML_IO_EFBIG' type='enum'/>
<exports symbol='XML_ERR_NS_DECL_ERROR' type='enum'/>
+ <exports symbol='XML_WAR_UNDECLARED_ENTITY' type='enum'/>
<exports symbol='XML_RNGP_PAT_START_DATA' type='enum'/>
<exports symbol='XML_ERR_ERROR' type='enum'/>
<exports symbol='XML_DTD_MISSING_ATTRIBUTE' type='enum'/>
@@ -2111,7 +2119,7 @@
<exports symbol='XML_ERR_TAG_NOT_FINISHED' type='enum'/>
<exports symbol='XML_RNGP_XMLNS_NAME' type='enum'/>
<exports symbol='XML_ERR_LTSLASH_REQUIRED' type='enum'/>
- <exports symbol='XML_SCHEMAP_UNKNOWN_ALL_CHILD' type='enum'/>
+ <exports symbol='XML_DTD_XMLID_VALUE' type='enum'/>
<exports symbol='XML_DTD_MIXED_CORRUPT' type='enum'/>
<exports symbol='XML_RNGP_DEFINE_CREATE_FAILED' type='enum'/>
<exports symbol='XML_ERR_ENTITY_BOUNDARY' type='enum'/>
@@ -2144,6 +2152,7 @@
<exports symbol='XML_RNGP_PARENTREF_NOT_EMPTY' type='enum'/>
<exports symbol='XML_ERR_PEREF_NO_NAME' type='enum'/>
<exports symbol='XML_ERR_ENTITYREF_AT_EOF' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD' type='enum'/>
<exports symbol='XML_NS_ERR_ATTRIBUTE_REDEFINED' type='enum'/>
<exports symbol='XML_ERR_NAME_REQUIRED' type='enum'/>
<exports symbol='XML_IO_ETIMEDOUT' type='enum'/>
@@ -3403,6 +3412,15 @@
<macro name='XML_SCHEMAS_ATTR_NSDEFAULT' file='schemasInternals'>
<info>allow elements in no namespace</info>
</macro>
+ <macro name='XML_SCHEMAS_ATTR_USE_OPTIONAL' file='schemasInternals'>
+ <info>The attribute is optional.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_USE_PROHIBITED' file='schemasInternals'>
+ <info>The attribute is prohibited.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_USE_REQUIRED' file='schemasInternals'>
+ <info>The attribute is required.</info>
+ </macro>
<macro name='XML_SCHEMAS_ELEM_ABSTRACT' file='schemasInternals'>
<info>the element is abstract</info>
</macro>
@@ -3463,6 +3481,9 @@
<macro name='XML_SUBSTITUTE_REF' file='parserInternals'>
<info>Whether general entities need to be substituted.</info>
</macro>
+ <macro name='XML_XML_ID' file='tree'>
+ <info>This is the name for the special xml:id attribute</info>
+ </macro>
<macro name='XML_XML_NAMESPACE' file='tree'>
<info>This is the namespace for the special xml: prefix predefined in the XML Namespace specification.</info>
</macro>
@@ -3778,6 +3799,8 @@
<enum name='XML_DTD_UNKNOWN_ENTITY' file='xmlerror' value='535' type='xmlParserErrors' info='535'/>
<enum name='XML_DTD_UNKNOWN_ID' file='xmlerror' value='536' type='xmlParserErrors' info='536'/>
<enum name='XML_DTD_UNKNOWN_NOTATION' file='xmlerror' value='537' type='xmlParserErrors' info='537'/>
+ <enum name='XML_DTD_XMLID_TYPE' file='xmlerror' value='540' type='xmlParserErrors' info='540'/>
+ <enum name='XML_DTD_XMLID_VALUE' file='xmlerror' value='539' type='xmlParserErrors' info='539'/>
<enum name='XML_ELEMENT_CONTENT_ELEMENT' file='tree' value='2' type='xmlElementContentType'/>
<enum name='XML_ELEMENT_CONTENT_MULT' file='tree' value='3' type='xmlElementContentOccur'/>
<enum name='XML_ELEMENT_CONTENT_ONCE' file='tree' value='1' type='xmlElementContentOccur'/>
@@ -4248,6 +4271,7 @@
<enum name='XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI' file='xmlerror' value='1713' type='xmlParserErrors' info='1713'/>
<enum name='XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI' file='xmlerror' value='1770' type='xmlParserErrors' info='1769'/>
<enum name='XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI' file='xmlerror' value='1771' type='xmlParserErrors' info='1770'/>
+ <enum name='XML_SCHEMAP_INVALID_ATTR_USE' file='xmlerror' value='1774' type='xmlParserErrors' info='1723'/>
<enum name='XML_SCHEMAP_INVALID_BOOLEAN' file='xmlerror' value='1714' type='xmlParserErrors' info='1714'/>
<enum name='XML_SCHEMAP_INVALID_ENUM' file='xmlerror' value='1715' type='xmlParserErrors' info='1715'/>
<enum name='XML_SCHEMAP_INVALID_FACET' file='xmlerror' value='1716' type='xmlParserErrors' info='1716'/>
@@ -4263,6 +4287,7 @@
<enum name='XML_SCHEMAP_NOTYPE_NOREF' file='xmlerror' value='1724' type='xmlParserErrors' info='1724'/>
<enum name='XML_SCHEMAP_NOT_SCHEMA' file='xmlerror' value='1772' type='xmlParserErrors' info='1771'/>
<enum name='XML_SCHEMAP_PREFIX_UNDEFINED' file='xmlerror' value='1700' type='xmlParserErrors'/>
+ <enum name='XML_SCHEMAP_RECURSIVE' file='xmlerror' value='1775' type='xmlParserErrors' info='1724'/>
<enum name='XML_SCHEMAP_REDEFINED_ATTR' file='xmlerror' value='1764' type='xmlParserErrors' info='1763'/>
<enum name='XML_SCHEMAP_REDEFINED_ATTRGROUP' file='xmlerror' value='1763' type='xmlParserErrors' info='1762'/>
<enum name='XML_SCHEMAP_REDEFINED_ELEMENT' file='xmlerror' value='1762' type='xmlParserErrors' info='1761'/>
@@ -4291,6 +4316,7 @@
<enum name='XML_SCHEMAP_UNKNOWN_IMPORT_CHILD' file='xmlerror' value='1743' type='xmlParserErrors' info='1743'/>
<enum name='XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD' file='xmlerror' value='1769' type='xmlParserErrors' info='1768'/>
<enum name='XML_SCHEMAP_UNKNOWN_LIST_CHILD' file='xmlerror' value='1744' type='xmlParserErrors' info='1744'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_MEMBER_TYPE' file='xmlerror' value='1773' type='xmlParserErrors' info='1772'/>
<enum name='XML_SCHEMAP_UNKNOWN_NOTATION_CHILD' file='xmlerror' value='1745' type='xmlParserErrors' info='1745'/>
<enum name='XML_SCHEMAP_UNKNOWN_PREFIX' file='xmlerror' value='1767' type='xmlParserErrors' info='1766'/>
<enum name='XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD' file='xmlerror' value='1746' type='xmlParserErrors' info='1746'/>
@@ -5231,6 +5257,7 @@ actually an xmlCharEncoding'/>
<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=''/>
</struct>
<typedef name='xmlSchemaTypePtr' file='schemasInternals' type='xmlSchemaType *'/>
<typedef name='xmlSchemaTypeType' file='schemasInternals' type='enum'/>
@@ -6508,7 +6535,7 @@ actually an xmlCharEncoding'/>
<arg name='replace' type='const xmlChar *' info='the replacement value for the match'/>
</function>
<function name='xmlACatalogDump' file='catalog'>
- <info>Free up all the memory associated with catalogs</info>
+ <info>Dump the given catalog to the given file.</info>
<return type='void'/>
<arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
<arg name='out' type='FILE *' info='the file.'/>
@@ -6979,7 +7006,7 @@ actually an xmlCharEncoding'/>
<return type='int' info='the number of entries converted if successful, -1 otherwise'/>
</function>
<function name='xmlCatalogDump' file='catalog'>
- <info>Free up all the memory associated with catalogs</info>
+ <info>Dump all the global catalog content to the given file.</info>
<return type='void'/>
<arg name='out' type='FILE *' info='the file.'/>
</function>
@@ -10935,7 +10962,7 @@ actually an xmlCharEncoding'/>
<arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
</function>
<function name='xmlSaveDoc' file='xmlsave'>
- <info>Save a full document to a saving context</info>
+ <info>Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</info>
<return type='long' info='the number of byte written or -1 in case of error'/>
<arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
<arg name='doc' type='xmlDocPtr' info='a document'/>
@@ -11019,7 +11046,7 @@ actually an xmlCharEncoding'/>
<arg name='options' type='int' info='a set of xmlSaveOptions'/>
</function>
<function name='xmlSaveTree' file='xmlsave'>
- <info>Save a subtree starting at the node parameter to a saving context</info>
+ <info>Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</info>
<return type='long' info='the number of byte written or -1 in case of error'/>
<arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
<arg name='node' type='xmlNodePtr' info='a document'/>
@@ -11778,7 +11805,7 @@ actually an xmlCharEncoding'/>
<arg name='prop' type='int' info='the xmlParserProperties to get'/>
</function>
<function name='xmlTextReaderGetRemainder' file='xmlreader'>
- <info>Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use.</info>
+ <info>Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly procgressed past what&apos;s left in reader-&gt;input, and there is an allocation problem. Best would be to rewrite it differently.</info>
<return type='xmlParserInputBufferPtr' info='the xmlParserInputBufferPtr attached to the XML or NULL in case of error.'/>
<arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function>
diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa
index 814f516..790d729 100644
--- a/doc/libxml2.xsa
+++ b/doc/libxml2.xsa
@@ -26,7 +26,7 @@
XInclude and XPointer fixes for entities (William), XML parser bug
reported by Holger Rauch, nanohttp fd leak (William), regexps char
groups '-' handling (William), dictionnary reference counting problems,
- do not close stderr.
+ do not close stderr.
- performance patches from Petr Pajas
- Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
- compilation and portability fixes: --without-valid, catalog cleanups
diff --git a/doc/news.html b/doc/news.html
index c383ea6..a1e19f3 100644
--- a/doc/news.html
+++ b/doc/news.html
@@ -7,11 +7,27 @@ H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
-</style><title>News</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 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>News</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="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">News</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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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"><h3>CVS only : check the <a href="http://cvs.gnome.org/lxr/source/gnome-xml/ChangeLog">Changelog</a> file
-for a really accurate description</h3><p>Items not finished and worked on, get in touch with the list if you want
-to test those</p><ul><li>More testing on RelaxNG</li>
+</style><title>News</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 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>News</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="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">News</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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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>There is the list of public releases:</p><h3>2.6.9: Apr 18 2004</h3><ul><li>implement xml:id Working Draft, relaxed XPath id() checking</li>
+ <li>bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
+ Beckett), Relax-NG compilation (William Brack), Regexp patches (with
+ William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
+ William), Relax-NG name classes compares (William), XInclude duplicate
+ fallback (William), external DTD encoding detection (William), a DTD
+ validation bug (William), xmlReader Close() fix, recusive extention
+ schemas</li>
+ <li>improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting
+ save optimization, better handle IIS broken HTTP redirect behaviour (Ian
+ Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
+ dependancy, XML Schemas union support (Kasimier Buchcik), warning removal
+ clanup (William), keep ChangeLog compressed when installing from RPMs</li>
+ <li>documentation: examples and xmlDocDumpMemory docs (John Fleck), new
+ example (load, xpath, modify, save), xmlCatalogDump() comments, </li>
+ <li>Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
+ compiler NaN handling bug (Mark Vakoc)</li>
</ul><h3>2.6.8: Mar 23 2004</h3><ul><li>First step of the cleanup of the serialization code and APIs</li>
<li>XML Schemas: mixed content (Adam Dickmeiss), QName handling fixes (Adam
Dickmeiss), anyURI for "" (John Belmonte)</li>
@@ -27,7 +43,7 @@ to test those</p><ul><li>More testing on RelaxNG</li>
XInclude and XPointer fixes for entities (William), XML parser bug
reported by Holger Rauch, nanohttp fd leak (William), regexps char
groups '-' handling (William), dictionnary reference counting problems,
- do not close stderr. </li>
+ do not close stderr.</li>
<li>performance patches from Petr Pajas</li>
<li>Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)</li>
<li>compilation and portability fixes: --without-valid, catalog cleanups
diff --git a/doc/search.php b/doc/search.php
index 82ae003..7b332c2 100644
--- a/doc/search.php
+++ b/doc/search.php
@@ -390,6 +390,59 @@ A:link, A:visited, A:active { text-decoration: underline }
}
}
}
+ if ((count($results) == 0) && (count($list) == 1)) {
+ $word = $list[0];
+ if (($scope == 'any') || ($scope == 'XML') ||
+ ($scope == 'API') || ($scope == 'XMLAPI')) {
+ list($result, $j) = queryWord("xml$word");
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($name, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$name];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $url = "html/libxml-$module.html#$id";
+ $results[$name] = array($relevance,$type,
+ $module, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ if (($scope == 'any') || ($scope == 'XSLT') ||
+ ($scope == 'API') || ($scope == 'XSLTAPI')) {
+ list($result, $j) = XSLTqueryWord("xslt$word");
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($name, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$name];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $url = "XSLT/html/libxslt-$module.html#$id";
+ $results[$name] = array($relevance,$type,
+ $module, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ }
mysql_close($link);
$nb = count($results);
echo "<h3 align='center'>Found $nb results for query $query</h3>\n";
diff --git a/doc/searches.html b/doc/searches.html
new file mode 100644
index 0000000..4a1e126
--- /dev/null
+++ b/doc/searches.html
@@ -0,0 +1,61 @@
+<?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" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Search statistics for 20040408</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 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>Search statistics for 20040408</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="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></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://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal 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"><h2> weekly statistics: </h2><p>416435 total words,
+ 9875 uniq words.</p><p> Top 50 queries:</p><p><br /><a href="search.php?query=libxml2">libxml2</a> 11812 times.
+ <br /><a href="search.php?query=libxml">libxml</a> 10170 times.
+ <br /><a href="search.php?query=xpath">xpath</a> 6172 times.
+ <br /><a href="search.php?query=schema">schema</a> 5798 times.
+ <br /><a href="search.php?query=xmllint">xmllint</a> 5472 times.
+ <br /><a href="search.php?query=XML">XML</a> 5435 times.
+ <br /><a href="search.php?query=xmlParseFile">xmlParseFile</a> 4219 times.
+ <br /><a href="search.php?query=php">php</a> 3935 times.
+ <br /><a href="search.php?query=DTD">DTD</a> 3270 times.
+ <br /><a href="search.php?query=encoding">encoding</a> 3101 times.
+ <br /><a href="search.php?query=xmlGetProp">xmlGetProp</a> 3084 times.
+ <br /><a href="search.php?query=xsltproc">xsltproc</a> 3074 times.
+ <br /><a href="search.php?query=download">download</a> 2971 times.
+ <br /><a href="search.php?query=xmlNodeListGetString">xmlNodeListGetString</a> 2917 times.
+ <br /><a href="search.php?query=python">python</a> 2789 times.
+ <br /><a href="search.php?query=SAX">SAX</a> 2621 times.
+ <br /><a href="search.php?query=xmlParseMemory">xmlParseMemory</a> 2472 times.
+ <br /><a href="search.php?query=perl">perl</a> 2385 times.
+ <br /><a href="search.php?query=iconv">iconv</a> 2318 times.
+ <br /><a href="search.php?query=error">error</a> 2298 times.
+ <br /><a href="search.php?query=html">html</a> 2255 times.
+ <br /><a href="search.php?query=xmlChar">xmlChar</a> 2136 times.
+ <br /><a href="search.php?query=libxslt">libxslt</a> 2055 times.
+ <br /><a href="search.php?query=c++">c++</a> 2020 times.
+ <br /><a href="search.php?query=xmlNodePtr">xmlNodePtr</a> 1928 times.
+ <br /><a href="search.php?query=windows">windows</a> 1918 times.
+ <br /><a href="search.php?query=to">to</a> 1891 times.
+ <br /><a href="search.php?query=node">node</a> 1860 times.
+ <br /><a href="search.php?query=xmlFree">xmlFree</a> 1854 times.
+ <br /><a href="search.php?query=example">example</a> 1784 times.
+ <br /><a href="search.php?query=install">install</a> 1763 times.
+ <br /><a href="search.php?query=parser">parser</a> 1715 times.
+ <br /><a href="search.php?query=xmlNewDoc">xmlNewDoc</a> 1695 times.
+ <br /><a href="search.php?query=namespace">namespace</a> 1693 times.
+ <br /><a href="search.php?query=xmlStrcmp">xmlStrcmp</a> 1564 times.
+ <br /><a href="search.php?query=xmlnode">xmlnode</a> 1558 times.
+ <br /><a href="search.php?query=parse">parse</a> 1517 times.
+ <br /><a href="search.php?query=memory">memory</a> 1484 times.
+ <br /><a href="search.php?query=dom">dom</a> 1457 times.
+ <br /><a href="search.php?query=XInclude">XInclude</a> 1444 times.
+ <br /><a href="search.php?query=entity">entity</a> 1423 times.
+ <br /><a href="search.php?query=xmlSaveFormatFile">xmlSaveFormatFile</a> 1390 times.
+ <br /><a href="search.php?query=xslt">xslt</a> 1361 times.
+ <br /><a href="search.php?query=attribute">attribute</a> 1360 times.
+ <br /><a href="search.php?query=xmlDocPtr">xmlDocPtr</a> 1350 times.
+ <br /><a href="search.php?query=xsd">xsd</a> 1319 times.
+ <br /><a href="search.php?query=xmlDocGetRootElement">xmlDocGetRootElement</a> 1285 times.
+ <br /><a href="search.php?query=validate">validate</a> 1270 times.
+ <br /><a href="search.php?query=validation">validation</a> 1234 times.
+ <br /><a href="search.php?query=tutorial">tutorial</a> 1140 times.
+ </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>
diff --git a/doc/searches.xsl b/doc/searches.xsl
new file mode 100644
index 0000000..3726632
--- /dev/null
+++ b/doc/searches.xsl
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!-- this stylesheet builds the API*.html , it works based on libxml2-refs.xml
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ extension-element-prefixes="exsl"
+ exclude-result-prefixes="exsl">
+
+ <!-- Import the rest of the site stylesheets -->
+ <xsl:import href="site.xsl"/>
+
+ <!-- Generate XHTML-1.0 transitional -->
+ <xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+ <xsl:variable name="href_base" select="''"/>
+
+ <xsl:template name="statistics">
+ <h2> weekly statistics: </h2>
+ <p><xsl:value-of select="@total"/> total words,
+ <xsl:value-of select="@uniq"/> uniq words.</p>
+ <p> Top <xsl:value-of select="@nr"/> queries:</p>
+ </xsl:template>
+
+ <xsl:template match="query">
+ <br/><a href="search.php?query={string(.)}"><xsl:value-of
+ select="string(.)"/></a>
+ <xsl:text> </xsl:text><xsl:value-of select="@count"/> times.
+ </xsl:template>
+
+ <xsl:template match="queries">
+ <xsl:variable name="date" select="@date"/>
+ <xsl:variable name="title">Search statistics for <xsl:value-of select="$date"/></xsl:variable>
+ <xsl:document href="searches.html" method="xml" encoding="ISO-8859-1"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <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">
+ <xsl:call-template name="toc"/>
+ </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">
+ <xsl:call-template name="statistics"/>
+ <p>
+ <xsl:apply-templates select="query"/>
+ </p>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="queries"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/xml.html b/doc/xml.html
index 909f76a..1105002 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -73,6 +73,8 @@ languages:</p>
<li>W3C XML Schemas Part 2: Datatypes <a
href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
2001</a></li>
+ <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
+ April 2004</li>
</ul>
<p>In most cases libxml2 tries to implement the specifications in a
@@ -515,6 +517,12 @@ href="http://mail.gnome.org/mailman/listinfo/xml">associated Web</a> page and
follow the instructions. <strong>Do not send code, I won't debug it</strong>
(but patches are really appreciated!).</p>
+<p>Please note that with the current amount of virus and SPAM, sending mail
+to the list without being subscribed won't work. There is *far too many
+bounces* (in the order of a thousand a day !) I cannot approve them manually
+anymore. If your mail to the list bounced waiting for administrator approval,
+it is LOST ! Repost it and fix the problem triggering the error.</p>
+
<p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p>
<ul>
@@ -593,21 +601,23 @@ database</a>:</p>
<h2><a name="Downloads">Downloads</a></h2>
-<p>The latest versions of libxml2 can be found on <a
-href="ftp://xmlsoft.org/">xmlsoft.org</a> (<a
-href="ftp://speakeasy.rpmfind.net/pub/libxml/">Seattle</a>, <a
+<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://speakeasy.rpmfind.net/pub/libxml/">Seattle</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> either
-as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source
-archive</a><!-- commenting this out because they seem to have disappeared or <a
-href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/">RPM
-packages</a> -->
- , Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">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>
packages installed to compile applications using libxml.)</p>
+<p>You can find all the history of libxml(2) and libxslt releases in the <a
+href="http://xmlsoft.org/sources/old/">old</a> directory.</p>
+
<p>Binary ports:</p>
<ul>
<li>Red Hat RPMs for i386 are available directly on <a
@@ -640,9 +650,9 @@ href="http://veillard.com/">contact me</a>.</p>
<p><a name="Contribs">Contributions:</a></p>
<p>I do accept external contributions, especially if compiling on another
-platform, get in touch with me to upload the package, wrappers for various
-languages have been provided, and can be found in the <a
-href="contribs.html">contrib section</a></p>
+platform, get in touch with the list to upload the package, wrappers for
+various languages have been provided, and can be found in the <a
+href="python.html">bindings section</a></p>
<p>Libxml2 is also available from CVS:</p>
<ul>
@@ -650,25 +660,44 @@ href="contribs.html">contrib section</a></p>
href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Gnome
CVS base</a>. Check the <a
href="http://developer.gnome.org/tools/cvs.html">Gnome CVS Tools</a>
- page; the CVS module is <b>gnome-xml</b>.</p>
+ page; the CVS module is <b>libxml2</b>.</p>
</li>
<li>The <strong>libxslt</strong> module is also present there</li>
</ul>
<h2><a name="News">News</a></h2>
-<h3>CVS only : check the <a
-href="http://cvs.gnome.org/lxr/source/gnome-xml/ChangeLog">Changelog</a> file
-for a really accurate description</h3>
-
<p>Items not finished and worked on, get in touch with the list if you want
-to test those</p>
+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>There is the list of public releases:</p>
+
+<h3>2.6.9: Apr 18 2004</h3>
+<ul>
+ <li>implement xml:id Working Draft, relaxed XPath id() checking</li>
+ <li>bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
+ Beckett), Relax-NG compilation (William Brack), Regexp patches (with
+ William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
+ William), Relax-NG name classes compares (William), XInclude duplicate
+ fallback (William), external DTD encoding detection (William), a DTD
+ validation bug (William), xmlReader Close() fix, recusive extention
+ schemas</li>
+ <li>improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting
+ save optimization, better handle IIS broken HTTP redirect behaviour (Ian
+ Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
+ dependancy, XML Schemas union support (Kasimier Buchcik), warning removal
+ clanup (William), keep ChangeLog compressed when installing from RPMs</li>
+ <li>documentation: examples and xmlDocDumpMemory docs (John Fleck), new
+ example (load, xpath, modify, save), xmlCatalogDump() comments, </li>
+ <li>Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
+ compiler NaN handling bug (Mark Vakoc)</li>
+</ul>
+
<h3>2.6.8: Mar 23 2004</h3>
<ul>
<li>First step of the cleanup of the serialization code and APIs</li>
@@ -686,7 +715,7 @@ to test those</p>
XInclude and XPointer fixes for entities (William), XML parser bug
reported by Holger Rauch, nanohttp fd leak (William), regexps char
groups '-' handling (William), dictionnary reference counting problems,
- do not close stderr. </li>
+ do not close stderr.</li>
<li>performance patches from Petr Pajas</li>
<li>Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)</li>
<li>compilation and portability fixes: --without-valid, catalog cleanups
diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h
index e2907d8..740747b 100644
--- a/include/libxml/schemasInternals.h
+++ b/include/libxml/schemasInternals.h
@@ -113,6 +113,27 @@ struct _xmlSchemaAnnot {
#define XML_SCHEMAS_ANYATTR_STRICT 3
/**
+ * XML_SCHEMAS_ATTR_USE_PROHIBITED:
+ *
+ * The attribute is prohibited.
+ */
+#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
+
+/**
+ * XML_SCHEMAS_ATTR_USE_REQUIRED:
+ *
+ * The attribute is required.
+ */
+#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
+
+/**
+ * XML_SCHEMAS_ATTR_USE_OPTIONAL:
+ *
+ * The attribute is optional.
+ */
+#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
+
+/**
* XML_SCHEMAS_ATTR_NSDEFAULT:
*
* allow elements in no namespace
@@ -201,6 +222,7 @@ struct _xmlSchemaType {
xmlSchemaTypePtr baseType;
xmlSchemaFacetPtr facets;
struct _xmlSchemaType *redef;/* possible redefinitions for the type */
+ int recurse;
};
/*
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index bc4dbe3..470151d 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -63,6 +63,13 @@ typedef xmlEntity *xmlEntityPtr;
#define XML_XML_NAMESPACE \
(const xmlChar *) "http://www.w3.org/XML/1998/namespace"
+/**
+ * XML_XML_ID:
+ *
+ * This is the name for the special xml:id attribute
+ */
+#define XML_XML_ID (const xmlChar *) "xml:id"
+
/*
* The different element types carried by an XML tree.
*
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index 46d93c4..777cd0d 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -235,6 +235,8 @@ typedef enum {
XML_DTD_UNKNOWN_ID, /* 536 */
XML_DTD_UNKNOWN_NOTATION, /* 537 */
XML_DTD_STANDALONE_DEFAULTED, /* 538 */
+ XML_DTD_XMLID_VALUE, /* 539 */
+ XML_DTD_XMLID_TYPE, /* 540 */
XML_HTML_STRUCURE_ERROR = 800,
XML_HTML_UNKNOWN_TAG, /* 801 */
XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
@@ -544,6 +546,9 @@ typedef enum {
XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1769 */
XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1770 */
XML_SCHEMAP_NOT_SCHEMA, /* 1771 */
+ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1772 */
+ XML_SCHEMAP_INVALID_ATTR_USE, /* 1723 */
+ XML_SCHEMAP_RECURSIVE, /* 1724 */
XML_SCHEMAV_NOROOT = 1800,
XML_SCHEMAV_UNDECLAREDELEM, /* 1801 */
XML_SCHEMAV_NOTTOPLEVEL, /* 1802 */
diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h
index 8e1c0b0..cd7b26d 100644
--- a/include/libxml/xmlversion.h
+++ b/include/libxml/xmlversion.h
@@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
-#define LIBXML_DOTTED_VERSION "2.6.8"
+#define LIBXML_DOTTED_VERSION "2.6.9"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 1002003
*/
-#define LIBXML_VERSION 20608
+#define LIBXML_VERSION 20609
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "1002003"
*/
-#define LIBXML_VERSION_STRING "20608"
+#define LIBXML_VERSION_STRING "20609"
/**
* LIBXML_TEST_VERSION:
@@ -51,7 +51,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* 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(20608);
+#define LIBXML_TEST_VERSION xmlCheckVersion(20609);
#ifndef VMS
#if 0
diff --git a/libxml.spec.in b/libxml.spec.in
index 24a70d0..27d9752 100644
--- a/libxml.spec.in
+++ b/libxml.spec.in
@@ -44,7 +44,7 @@ URI library.
Summary: Python bindings for the libxml2 library
Group: Development/Libraries
Requires: libxml2 = %{version}
-Requires: python
+Requires: %{_libdir}/python%(echo `python -c "import sys; print sys.version[0:3]"`)
%description python
The libxml2-python package contains a module that permits applications
@@ -63,6 +63,7 @@ at parse time or later once the document has been modified.
%configure
make
(cd doc/examples ; make clean)
+gzip -9 ChangeLog
%install
rm -fr %{buildroot}
@@ -81,7 +82,7 @@ rm -fr %{buildroot}
%files
%defattr(-, root, root)
-%doc AUTHORS ChangeLog NEWS README Copyright TODO
+%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
%doc %{_mandir}/man1/xmllint.1*
%doc %{_mandir}/man1/xmlcatalog.1*
%doc %{_mandir}/man3/libxml.3*
@@ -94,7 +95,7 @@ rm -fr %{buildroot}
%defattr(-, root, root)
%doc %{_mandir}/man1/xml2-config.1*
-%doc AUTHORS ChangeLog NEWS README Copyright TODO
+%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
%doc doc/*.html doc/html doc/*.gif doc/*.png
%doc doc/tutorial doc/libxml2-api.xml
%doc doc/examples
@@ -109,7 +110,7 @@ rm -fr %{buildroot}
%files python
%defattr(-, root, root)
-%doc AUTHORS ChangeLog NEWS README Copyright
+%doc AUTHORS ChangeLog.gz NEWS README Copyright
%{_libdir}/python*/site-packages/libxml2.py
%{_libdir}/python*/site-packages/drv_libxml2.py
%{_libdir}/python*/site-packages/libxml2mod*
diff --git a/libxml2.spec b/libxml2.spec
index 2893ee1..946eed0 100644
--- a/libxml2.spec
+++ b/libxml2.spec
@@ -1,6 +1,6 @@
Summary: Library providing XML and HTML support
Name: libxml2
-Version: 2.6.8
+Version: 2.6.9
Release: 1
License: MIT
Group: Development/Libraries
@@ -44,7 +44,7 @@ URI library.
Summary: Python bindings for the libxml2 library
Group: Development/Libraries
Requires: libxml2 = %{version}
-Requires: python
+Requires: %{_libdir}/python%(echo `python -c "import sys; print sys.version[0:3]"`)
%description python
The libxml2-python package contains a module that permits applications
@@ -63,6 +63,7 @@ at parse time or later once the document has been modified.
%configure
make
(cd doc/examples ; make clean)
+gzip -9 ChangeLog
%install
rm -fr %{buildroot}
@@ -81,7 +82,7 @@ rm -fr %{buildroot}
%files
%defattr(-, root, root)
-%doc AUTHORS ChangeLog NEWS README Copyright TODO
+%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
%doc %{_mandir}/man1/xmllint.1*
%doc %{_mandir}/man1/xmlcatalog.1*
%doc %{_mandir}/man3/libxml.3*
@@ -94,7 +95,7 @@ rm -fr %{buildroot}
%defattr(-, root, root)
%doc %{_mandir}/man1/xml2-config.1*
-%doc AUTHORS ChangeLog NEWS README Copyright TODO
+%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
%doc doc/*.html doc/html doc/*.gif doc/*.png
%doc doc/tutorial doc/libxml2-api.xml
%doc doc/examples
@@ -109,7 +110,7 @@ rm -fr %{buildroot}
%files python
%defattr(-, root, root)
-%doc AUTHORS ChangeLog NEWS README Copyright
+%doc AUTHORS ChangeLog.gz NEWS README Copyright
%{_libdir}/python*/site-packages/libxml2.py
%{_libdir}/python*/site-packages/drv_libxml2.py
%{_libdir}/python*/site-packages/libxml2mod*
@@ -120,8 +121,8 @@ rm -fr %{buildroot}
%doc doc/python.html
%changelog
-* Tue Mar 23 2004 Daniel Veillard <veillard@redhat.com>
-- upstream release 2.6.8 see http://xmlsoft.org/news.html
+* Mon Apr 19 2004 Daniel Veillard <veillard@redhat.com>
+- upstream release 2.6.9 see http://xmlsoft.org/news.html
* Thu Jan 2 2003 Daniel Veillard <veillard@redhat.com>
- integrated drv_libxml2 xml.sax driver from Stéphane Bidoul
diff --git a/nanohttp.c b/nanohttp.c
index 7cd036f..9f3c75a 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -840,7 +840,15 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) {
while ((*cur == ' ') || (*cur == '\t')) cur++;
if (ctxt->location != NULL)
xmlFree(ctxt->location);
- ctxt->location = xmlMemStrdup(cur);
+ if (*cur == '/') {
+ xmlChar *tmp_http = xmlStrdup(BAD_CAST "http://");
+ xmlChar *tmp_loc =
+ xmlStrcat(tmp_http, (const xmlChar *) ctxt->hostname);
+ ctxt->location =
+ (char *) xmlStrcat (tmp_loc, (const xmlChar *) cur);
+ } else {
+ ctxt->location = xmlMemStrdup(cur);
+ }
} else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"WWW-Authenticate:", 17)) {
cur += 17;
while ((*cur == ' ') || (*cur == '\t')) cur++;
diff --git a/parser.c b/parser.c
index 49ed857..7662929 100644
--- a/parser.c
+++ b/parser.c
@@ -1260,6 +1260,21 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
xmlPopInput(ctxt); \
} while (0)
+#define SKIPL(val) do { \
+ int skipl; \
+ for(skipl=0; skipl<val; skipl++) { \
+ if (*(ctxt->input->cur) == '\n') { \
+ ctxt->input->line++; ctxt->input->col = 1; \
+ } else ctxt->input->col++; \
+ ctxt->nbChars++; \
+ ctxt->input->cur++; \
+ } \
+ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
+ if ((*ctxt->input->cur == 0) && \
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) \
+ xmlPopInput(ctxt); \
+ } while (0)
+
#define SHRINK if ((ctxt->progressive == 0) && \
(ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \
(ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \
@@ -1810,9 +1825,13 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
* Get the 4 first bytes and decode the charset
* if enc != XML_CHAR_ENCODING_NONE
* plug some encoding conversion routines.
+ * Note that, since we may have some non-UTF8
+ * encoding (like UTF16, bug 135229), the 'length'
+ * is not known, but we can calculate based upon
+ * the amount of data in the buffer.
*/
GROW
- if (entity->length >= 4) {
+ if ((ctxt->input->end - ctxt->input->cur)>=4) {
start[0] = RAW;
start[1] = NXT(1);
start[2] = NXT(2);
@@ -9250,7 +9269,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
ctxt->input->cur,
XML_PARSER_BIG_BUFFER_SIZE);
}
- SKIP(XML_PARSER_BIG_BUFFER_SIZE);
+ SKIPL(XML_PARSER_BIG_BUFFER_SIZE);
ctxt->checkIndex = 0;
}
goto done;
@@ -9264,7 +9283,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
ctxt->sax->characters(ctxt->userData,
ctxt->input->cur, base);
}
- SKIP(base + 3);
+ SKIPL(base + 3);
ctxt->checkIndex = 0;
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
@@ -11760,9 +11779,11 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt)
ctxt->nsWellFormed = 1;
ctxt->disableSAX = 0;
ctxt->valid = 1;
+#if 0
ctxt->vctxt.userData = ctxt;
ctxt->vctxt.error = xmlParserValidityError;
ctxt->vctxt.warning = xmlParserValidityWarning;
+#endif
ctxt->record_info = 0;
ctxt->nbChars = 0;
ctxt->checkIndex = 0;
diff --git a/python/Makefile.am b/python/Makefile.am
index 8782efb..f473421 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -51,9 +51,12 @@ GENERATE = generator.py
API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
GENERATED= $(srcdir)/libxml2class.py \
$(srcdir)/libxml2-export.c \
+ $(srcdir)/libxml2class.txt \
$(srcdir)/libxml2-py.c \
$(srcdir)/libxml2-py.h
+CLEANFILES= $(GENERATED) gen_prog libxml2.py
+
$(GENERATED): gen_prog
gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
@@ -68,6 +71,3 @@ endif
tests test: all
cd tests && $(MAKE) tests
-clean:
- rm -f $(GENERATED) *.o _libxml.so *.pyc libxml2.py gen_prog
-
diff --git a/python/Makefile.in b/python/Makefile.in
index c6684bd..25d2039 100644
--- a/python/Makefile.in
+++ b/python/Makefile.in
@@ -310,9 +310,11 @@ libxml2mod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/.libs
@WITH_PYTHON_TRUE@API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
@WITH_PYTHON_TRUE@GENERATED = $(srcdir)/libxml2class.py \
@WITH_PYTHON_TRUE@ $(srcdir)/libxml2-export.c \
+@WITH_PYTHON_TRUE@ $(srcdir)/libxml2class.txt \
@WITH_PYTHON_TRUE@ $(srcdir)/libxml2-py.c \
@WITH_PYTHON_TRUE@ $(srcdir)/libxml2-py.h
+@WITH_PYTHON_TRUE@CLEANFILES = $(GENERATED) gen_prog libxml2.py
all: all-recursive
.SUFFIXES:
@@ -602,6 +604,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
@@ -609,6 +612,8 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
clean-am: clean-generic clean-libtool clean-pythonLTLIBRARIES \
mostlyclean-am
@@ -701,9 +706,6 @@ uninstall-info: uninstall-info-recursive
@WITH_PYTHON_FALSE@all:
tests test: all
cd tests && $(MAKE) tests
-
-clean:
- rm -f $(GENERATED) *.o _libxml.so *.pyc libxml2.py gen_prog
# 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:
diff --git a/python/setup.py b/python/setup.py
index 170c7c9..1d342ac 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -226,7 +226,7 @@ else:
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.8",
+ version = "2.6.9",
description = descr,
author = "Daniel Veillard",
author_email = "veillard@redhat.com",
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index a07497e..584ddbc 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -27,6 +27,7 @@ PYTESTS= \
reader5.py \
reader6.py \
reader7.py \
+ reader8.py \
walker.py \
ctxterror.py\
readererr.py\
diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in
index eebc526..cd259be 100644
--- a/python/tests/Makefile.in
+++ b/python/tests/Makefile.in
@@ -269,6 +269,7 @@ PYTESTS = \
reader5.py \
reader6.py \
reader7.py \
+ reader8.py \
walker.py \
ctxterror.py\
readererr.py\
diff --git a/python/tests/reader8.py b/python/tests/reader8.py
new file mode 100755
index 0000000..53b7f27
--- /dev/null
+++ b/python/tests/reader8.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import StringIO
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Parse a document testing the Close() API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+
+reader = libxml2.readerForDoc(docstr, "test1", None, 0)
+ret = reader.Read()
+ret = reader.Read()
+ret = reader.Close()
+
+if ret != 0:
+ print "Error closing the document test1"
+ sys.exit(1)
+
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()
diff --git a/relaxng.c b/relaxng.c
index 1fd46e9..6bf62ee 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -2340,7 +2340,8 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
/*
* generate the error directly
*/
- if (((ctxt->flags & 1) == 0) || (ctxt->flags & 2)) {
+ if (((ctxt->flags & FLAGS_IGNORABLE) == 0) ||
+ (ctxt->flags & FLAGS_NEGATIVE)) {
xmlNodePtr node, seq;
/*
@@ -2880,9 +2881,15 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
break;
list = list->next;
}
- if (ret == 0)
+ /*
+ * Because the routine is recursive, we must guard against
+ * discovering both COMPILABLE and NOT_COMPILABLE
+ */
+ if (ret == 0) {
+ def->dflags &= ~IS_COMPILABLE;
def->dflags |= IS_NOT_COMPILABLE;
- if (ret == 1)
+ }
+ if ((ret == 1) && !(def->dflags &= IS_NOT_COMPILABLE))
def->dflags |= IS_COMPILABLE;
#ifdef DEBUG_COMPILE
if (ret == 1) {
@@ -2952,10 +2959,8 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
case XML_RELAXNG_LIST:
case XML_RELAXNG_PARAM:
case XML_RELAXNG_VALUE:
- ret = 0;
- break;
case XML_RELAXNG_NOT_ALLOWED:
- ret = -1;
+ ret = 0;
break;
}
if (ret == 0)
@@ -3746,15 +3751,15 @@ xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
} else {
node.name = invalidName;
}
- node.ns = &ns;
if (def1->ns != NULL) {
if (def1->ns[0] == 0) {
node.ns = NULL;
} else {
+ node.ns = &ns;
ns.href = def1->ns;
}
} else {
- ns.href = invalidName;
+ node.ns = NULL;
}
if (xmlRelaxNGElementMatch(&ctxt, def2, &node)) {
if (def1->nameClass != NULL) {
diff --git a/result/XInclude/fallback2.xml b/result/XInclude/fallback2.xml
new file mode 100644
index 0000000..d91b0a1
--- /dev/null
+++ b/result/XInclude/fallback2.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<a>
+ There is no b.xml ...
+ There is no c.xml ...
+
+</a>
diff --git a/result/XInclude/fallback2.xml.err b/result/XInclude/fallback2.xml.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/XInclude/fallback2.xml.err
diff --git a/result/XInclude/fallback2.xml.rdr b/result/XInclude/fallback2.xml.rdr
new file mode 100644
index 0000000..2fca4f0
--- /dev/null
+++ b/result/XInclude/fallback2.xml.rdr
@@ -0,0 +1,11 @@
+0 1 a 0 0
+1 14 #text 0 1
+
+1 3 #text 0 1 There is no b.xml ...
+1 14 #text 0 1
+
+1 3 #text 0 1 There is no c.xml ...
+1 14 #text 0 1
+
+
+0 15 a 0 0
diff --git a/result/regexp/branch b/result/regexp/branch
new file mode 100644
index 0000000..dd703ac
--- /dev/null
+++ b/result/regexp/branch
@@ -0,0 +1,14 @@
+Regexp: a|b(d|e(g|h|i)|f)|c
+a: Ok
+c: Ok
+bd: Ok
+bf: Ok
+beg: Ok
+beh: Ok
+bei: Ok
+b: Fail
+be: Fail
+bi: Fail
+f: Fail
+ab: Fail
+ac: Fail
diff --git a/result/schemas/attruse_0_0 b/result/schemas/attruse_0_0
new file mode 100644
index 0000000..c645bc5
--- /dev/null
+++ b/result/schemas/attruse_0_0
@@ -0,0 +1 @@
+./test/schemas/attruse_0_0.xml validates
diff --git a/result/schemas/attruse_0_0.err b/result/schemas/attruse_0_0.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/schemas/attruse_0_0.err
diff --git a/result/schemas/attruse_0_1 b/result/schemas/attruse_0_1
new file mode 100644
index 0000000..dd23d0b
--- /dev/null
+++ b/result/schemas/attruse_0_1
@@ -0,0 +1 @@
+./test/schemas/attruse_0_1.xml fails to validate
diff --git a/result/schemas/attruse_0_1.err b/result/schemas/attruse_0_1.err
new file mode 100644
index 0000000..ad0290b
--- /dev/null
+++ b/result/schemas/attruse_0_1.err
@@ -0,0 +1,3 @@
+./test/schemas/attruse_0_1.xml:3: element barA: Schemas validity error : required attribute attr on barA is missing
+./test/schemas/attruse_0_1.xml:3: element barA: Schemas validity error : required attribute attr on barA is missing
+./test/schemas/attruse_0_1.xml:3: element barA: Schemas validity error : required attribute attr on barA is missing
diff --git a/result/schemas/attruse_0_2 b/result/schemas/attruse_0_2
new file mode 100644
index 0000000..0ea3301
--- /dev/null
+++ b/result/schemas/attruse_0_2
@@ -0,0 +1 @@
+./test/schemas/attruse_0_2.xml fails to validate
diff --git a/result/schemas/attruse_0_2.err b/result/schemas/attruse_0_2.err
new file mode 100644
index 0000000..e34fe66
--- /dev/null
+++ b/result/schemas/attruse_0_2.err
@@ -0,0 +1,3 @@
+./test/schemas/attruse_0_2.xml:6: element barC: Schemas validity error : attribute attr on barC is prohibited
+./test/schemas/attruse_0_2.xml:6: element barC: Schemas validity error : attribute attr on barC is prohibited
+./test/schemas/attruse_0_2.xml:6: element barC: Schemas validity error : attribute attr on barC is prohibited
diff --git a/result/schemas/union_0_0 b/result/schemas/union_0_0
new file mode 100644
index 0000000..3dbc861
--- /dev/null
+++ b/result/schemas/union_0_0
@@ -0,0 +1 @@
+./test/schemas/union_0_0.xml validates
diff --git a/result/schemas/union_0_0.err b/result/schemas/union_0_0.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/schemas/union_0_0.err
diff --git a/result/xmlid/id_err1.xml b/result/xmlid/id_err1.xml
new file mode 100644
index 0000000..2e47afd
--- /dev/null
+++ b/result/xmlid/id_err1.xml
@@ -0,0 +1,2 @@
+Object is a Node Set :
+Set contains 0 nodes:
diff --git a/result/xmlid/id_err1.xml.err b/result/xmlid/id_err1.xml.err
new file mode 100644
index 0000000..9efeb47
--- /dev/null
+++ b/result/xmlid/id_err1.xml.err
@@ -0,0 +1,3 @@
+./test/xmlid/id_err1.xml:1: validity error : xml:id : attribute value 0bar is not an NCName
+<foo xml:id="0bar"/>
+ ^
diff --git a/result/xmlid/id_err2.xml b/result/xmlid/id_err2.xml
new file mode 100644
index 0000000..33ee896
--- /dev/null
+++ b/result/xmlid/id_err2.xml
@@ -0,0 +1,6 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1 ELEMENT foo
+ ATTRIBUTE id
+ TEXT
+ content=bar
diff --git a/result/xmlid/id_err2.xml.err b/result/xmlid/id_err2.xml.err
new file mode 100644
index 0000000..9e974d4
--- /dev/null
+++ b/result/xmlid/id_err2.xml.err
@@ -0,0 +1,3 @@
+./test/xmlid/id_err2.xml:3: validity error : xml:id : attribute type should be ID
+<!ATTLIST foo xml:id CDATA #IMPLIED>
+ ^
diff --git a/result/xmlid/id_tst1.xml b/result/xmlid/id_tst1.xml
new file mode 100644
index 0000000..33ee896
--- /dev/null
+++ b/result/xmlid/id_tst1.xml
@@ -0,0 +1,6 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1 ELEMENT foo
+ ATTRIBUTE id
+ TEXT
+ content=bar
diff --git a/result/xmlid/id_tst1.xml.err b/result/xmlid/id_tst1.xml.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/xmlid/id_tst1.xml.err
diff --git a/result/xmlid/id_tst2.xml b/result/xmlid/id_tst2.xml
new file mode 100644
index 0000000..33ee896
--- /dev/null
+++ b/result/xmlid/id_tst2.xml
@@ -0,0 +1,6 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1 ELEMENT foo
+ ATTRIBUTE id
+ TEXT
+ content=bar
diff --git a/result/xmlid/id_tst2.xml.err b/result/xmlid/id_tst2.xml.err
new file mode 100644
index 0000000..390d48d
--- /dev/null
+++ b/result/xmlid/id_tst2.xml.err
@@ -0,0 +1,3 @@
+./test/xmlid/id_tst2.xml:1: namespace error : Namespace prefix n on foo is not defined
+<n:foo xml:id="bar"/>
+ ^
diff --git a/result/xmlid/id_tst3.xml b/result/xmlid/id_tst3.xml
new file mode 100644
index 0000000..e2f8228
--- /dev/null
+++ b/result/xmlid/id_tst3.xml
@@ -0,0 +1,6 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1 ELEMENT o:o
+ ATTRIBUTE id
+ TEXT
+ content=bar
diff --git a/result/xmlid/id_tst3.xml.err b/result/xmlid/id_tst3.xml.err
new file mode 100644
index 0000000..7aa3e1c
--- /dev/null
+++ b/result/xmlid/id_tst3.xml.err
@@ -0,0 +1,6 @@
+./test/xmlid/id_tst3.xml:1: namespace error : Failed to parse QName 'f:o:'
+<f:o:o xml:id="bar"/>
+ ^
+./test/xmlid/id_tst3.xml:1: namespace error : Namespace prefix f on o:o is not defined
+<f:o:o xml:id="bar"/>
+ ^
diff --git a/result/xmlid/id_tst4.xml b/result/xmlid/id_tst4.xml
new file mode 100644
index 0000000..33ee896
--- /dev/null
+++ b/result/xmlid/id_tst4.xml
@@ -0,0 +1,6 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1 ELEMENT foo
+ ATTRIBUTE id
+ TEXT
+ content=bar
diff --git a/result/xmlid/id_tst4.xml.err b/result/xmlid/id_tst4.xml.err
new file mode 100644
index 0000000..36c78c8
--- /dev/null
+++ b/result/xmlid/id_tst4.xml.err
@@ -0,0 +1,3 @@
+./test/xmlid/id_tst4.xml:3: element err: validity error : ID bar already defined
+<err xml:id="bar"/>
+ ^
diff --git a/test/XInclude/docs/fallback2.xml b/test/XInclude/docs/fallback2.xml
new file mode 100644
index 0000000..dac71f9
--- /dev/null
+++ b/test/XInclude/docs/fallback2.xml
@@ -0,0 +1,10 @@
+<a>
+ <xi:include href="b.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:fallback>There is no b.xml ... </xi:fallback>
+ </xi:include>
+ <xi:include href="c.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:fallback>There is no c.xml ... </xi:fallback>
+ </xi:include>
+
+</a>
+
diff --git a/test/regexp/branch b/test/regexp/branch
new file mode 100644
index 0000000..6a728e6
--- /dev/null
+++ b/test/regexp/branch
@@ -0,0 +1,14 @@
+=>a|b(d|e(g|h|i)|f)|c
+a
+c
+bd
+bf
+beg
+beh
+bei
+b
+be
+bi
+f
+ab
+ac
diff --git a/test/schemas/attruse_0_0.xml b/test/schemas/attruse_0_0.xml
new file mode 100644
index 0000000..241ab27
--- /dev/null
+++ b/test/schemas/attruse_0_0.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo>
+ <barA attr="bar"/>
+ <barB attr="bar"/>
+ <barB />
+ <barC/>
+</foo>
+
diff --git a/test/schemas/attruse_0_0.xsd b/test/schemas/attruse_0_0.xsd
new file mode 100644
index 0000000..bc9ccef
--- /dev/null
+++ b/test/schemas/attruse_0_0.xsd
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="foo">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+
+ <xs:element name="barA" >
+ <xs:complexType>
+ <xs:attribute name="attr" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="barB" >
+ <xs:complexType>
+ <xs:attribute name="attr" type="xs:string" use="optional" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="barC" >
+ <xs:complexType>
+ <xs:attribute name="attr" type="xs:string" use="prohibited" />
+ </xs:complexType>
+ </xs:element>
+
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
diff --git a/test/schemas/attruse_0_1.xml b/test/schemas/attruse_0_1.xml
new file mode 100644
index 0000000..b857c6d
--- /dev/null
+++ b/test/schemas/attruse_0_1.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo>
+ <barA />
+ <barB attr="bar"/>
+ <barB />
+ <barC/>
+</foo>
+
diff --git a/test/schemas/attruse_0_2.xml b/test/schemas/attruse_0_2.xml
new file mode 100644
index 0000000..f55ccdc
--- /dev/null
+++ b/test/schemas/attruse_0_2.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo>
+ <barA attr="bar" />
+ <barB attr="bar"/>
+ <barB />
+ <barC attr="bar" />
+</foo>
+
diff --git a/test/schemas/union_0_0.xml b/test/schemas/union_0_0.xml
new file mode 100644
index 0000000..79078f9
--- /dev/null
+++ b/test/schemas/union_0_0.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://foo"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
+ <em>EMP0090</em>
+ <em>EMP0099</em>
+</foo>
+
diff --git a/test/schemas/union_0_0.xsd b/test/schemas/union_0_0.xsd
new file mode 100644
index 0000000..a6dfad0
--- /dev/null
+++ b/test/schemas/union_0_0.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://foo"
+ xmlns="http://foo"
+ xmlns:a="http://foo">
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="em" type="emType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="emp0001_3Type">
+ <xsd:restriction base="xsd:ID">
+ <xsd:enumeration value="EMP0040"/>
+ <xsd:enumeration value="EMP0003"/>
+ <xsd:enumeration value="EMP0004"/>
+ <xsd:enumeration value="EMP0005"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="emp0004_5Type">
+ <xsd:restriction base="xsd:ID">
+ <xsd:enumeration value="EMP0002"/>
+ <xsd:enumeration value="EMP0090"/>
+ <xsd:enumeration value="EMP0007"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="unboundedEmType">
+ <xsd:union memberTypes="a:emp0001_3Type emp0004_5Type">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:ID">
+ <xsd:enumeration value="EMP0099"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="emType">
+ <xsd:restriction base="unboundedEmType">
+ <xsd:pattern value="EMP[0-9]*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+
+</xsd:schema>
diff --git a/test/xmlid/id_err1.xml b/test/xmlid/id_err1.xml
new file mode 100644
index 0000000..d8c47cc
--- /dev/null
+++ b/test/xmlid/id_err1.xml
@@ -0,0 +1 @@
+<foo xml:id="0bar"/>
diff --git a/test/xmlid/id_err2.xml b/test/xmlid/id_err2.xml
new file mode 100644
index 0000000..99010a7
--- /dev/null
+++ b/test/xmlid/id_err2.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE foo [
+<!ELEMENT foo EMPTY>
+<!ATTLIST foo xml:id CDATA #IMPLIED>
+]>
+<foo xml:id="bar"/>
diff --git a/test/xmlid/id_tst1.xml b/test/xmlid/id_tst1.xml
new file mode 100644
index 0000000..7c3249c
--- /dev/null
+++ b/test/xmlid/id_tst1.xml
@@ -0,0 +1 @@
+<foo xml:id="bar"/>
diff --git a/test/xmlid/id_tst2.xml b/test/xmlid/id_tst2.xml
new file mode 100644
index 0000000..2bf5861
--- /dev/null
+++ b/test/xmlid/id_tst2.xml
@@ -0,0 +1 @@
+<n:foo xml:id="bar"/>
diff --git a/test/xmlid/id_tst3.xml b/test/xmlid/id_tst3.xml
new file mode 100644
index 0000000..7316a13
--- /dev/null
+++ b/test/xmlid/id_tst3.xml
@@ -0,0 +1 @@
+<f:o:o xml:id="bar"/>
diff --git a/test/xmlid/id_tst4.xml b/test/xmlid/id_tst4.xml
new file mode 100644
index 0000000..ea057a3
--- /dev/null
+++ b/test/xmlid/id_tst4.xml
@@ -0,0 +1,4 @@
+<doc>
+<foo xml:id="bar"/>
+<err xml:id="bar"/>
+</doc>
diff --git a/testXPath.c b/testXPath.c
index bdb7358..8086a81 100644
--- a/testXPath.c
+++ b/testXPath.c
@@ -178,9 +178,9 @@ int main(int argc, char **argv) {
}
if (document == NULL) {
if (filename == NULL)
- document = xmlParseDoc(buffer);
+ document = xmlReadDoc(buffer,NULL,NULL,0);
else
- document = xmlParseFile(filename);
+ document = xmlReadFile(filename,NULL,0);
}
for (i = 1; i < argc ; i++) {
if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input"))) {
diff --git a/uri.c b/uri.c
index 13c875b..b89603c 100644
--- a/uri.c
+++ b/uri.c
@@ -980,6 +980,7 @@ xmlURIEscape(const xmlChar * str)
if (uri->user) {
segment = xmlURIEscapeStr(BAD_CAST uri->user, BAD_CAST ";:&=+$,");
NULLCHK(segment)
+ ret = xmlStrcat(ret,BAD_CAST "//");
ret = xmlStrcat(ret, segment);
ret = xmlStrcat(ret, BAD_CAST "@");
xmlFree(segment);
@@ -988,7 +989,8 @@ xmlURIEscape(const xmlChar * str)
if (uri->server) {
segment = xmlURIEscapeStr(BAD_CAST uri->server, BAD_CAST "/?;:@");
NULLCHK(segment)
- ret = xmlStrcat(ret, BAD_CAST "//");
+ if (uri->user == NULL)
+ ret = xmlStrcat(ret, BAD_CAST "//");
ret = xmlStrcat(ret, segment);
xmlFree(segment);
}
diff --git a/valid.c b/valid.c
index b2eb375..378338b 100644
--- a/valid.c
+++ b/valid.c
@@ -661,10 +661,10 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
ctxt->state, fullname, NULL);
break;
case XML_ELEMENT_CONTENT_MULT:
- xmlAutomataNewTransition(ctxt->am, ctxt->state,
- ctxt->state, fullname, NULL);
- ctxt->state = xmlAutomataNewEpsilon(ctxt->am, ctxt->state,
- NULL);
+ ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
+ ctxt->state, NULL);
+ xmlAutomataNewTransition(ctxt->am,
+ ctxt->state, ctxt->state, fullname, NULL);
break;
}
if ((fullname != fn) && (fullname != content->name))
diff --git a/win32/Makefile.bcb b/win32/Makefile.bcb
index 0d50137..ab4d080 100644
--- a/win32/Makefile.bcb
+++ b/win32/Makefile.bcb
@@ -43,7 +43,7 @@ UTILS_INTDIR = int.utils.bcb
# The preprocessor and its options.
CPP = cpp32.exe -P- -DWIN32
-CPPFLAGS = -I$(XML_SRCDIR)\include
+CPPFLAGS = -I"$(XML_SRCDIR)\include"
!if "$(WITH_THREADS)" != "no"
CPPFLAGS = $(CPPFLAGS) -D_REENTRANT -D__MT__
!endif
@@ -51,7 +51,7 @@ CPPFLAGS = $(CPPFLAGS) -D_REENTRANT -D__MT__
# The compiler and its options.
CC = bcc32.exe
CFLAGS = -q -DWIN32 -D_NO_VCL -D_WINDOWS -D_MBCS -DEILSEQ=2 -w-
-CFLAGS = $(CFLAGS) -I$(XML_SRCDIR) -I$(XML_SRCDIR)\include -I$(INCPREFIX) -I$(INCLUDE)
+CFLAGS = $(CFLAGS) -I"$(XML_SRCDIR)" -I"$(XML_SRCDIR)\include" -I"$(INCPREFIX)" -I"$(INCLUDE)"
!if "$(WITH_THREADS)" != "no"
CFLAGS = $(CFLAGS) -D_REENTRANT -tWM
!endif
@@ -72,7 +72,7 @@ CFLAGS = $(CFLAGS) -DHAVE_ZLIB_H
# The linker and its options.
LD = ilink32.exe
LDFLAGS = -q -U$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
-LDFLAGS = $(LDFLAGS) -L$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib\PSdk
+LDFLAGS = $(LDFLAGS) -L"$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib\PSdk"
LIBS = import32.lib
!if "$(WITH_THREADS)" != "no" && "$(DYNRUNTIME)" == "1"
LIBS = $(LIBS) cw32mti.lib
@@ -239,15 +239,14 @@ distclean : clean
rebuild : clean all
install : all
- if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml
- if not exist $(BINPREFIX) mkdir $(BINPREFIX)
- if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)
- copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml
- copy $(BINDIR)\$(XML_SO) $(SOPREFIX)
- copy $(BINDIR)\$(XML_A) $(LIBPREFIX)
- copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)
- copy $(BINDIR)\*.exe $(BINPREFIX)
- -copy $(BINDIR)\*.pdb $(BINPREFIX)
+ if not exist "$(INCPREFIX)\libxml" mkdir "$(INCPREFIX)\libxml"
+ if not exist "$(BINPREFIX)" mkdir "$(BINPREFIX)"
+ if not exist "$(LIBPREFIX)" mkdir "$(LIBPREFIX)"
+ copy $(XML_SRCDIR)\include\libxml\*.h "$(INCPREFIX)\libxml"
+ copy $(BINDIR)\$(XML_SO) "$(SOPREFIX)"
+ copy $(BINDIR)\$(XML_A) "$(LIBPREFIX)"
+ copy $(BINDIR)\$(XML_IMP) "$(LIBPREFIX)"
+ copy $(BINDIR)\*.exe "$(BINPREFIX)"
# This is a target for me, to make a binary distribution. Not for the public use,
# keep your hands off :-)
diff --git a/xinclude.c b/xinclude.c
index 8f8b818..484cd6d 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -1816,8 +1816,10 @@ xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) {
return (-1);
xmlXIncludeSetFlags(newctxt, ctxt->parseFlags);
ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);
- if ((ret >=0) && (ctxt->nbErrors > 0))
+ if (ctxt->nbErrors > 0)
ret = -1;
+ else if (ret > 0)
+ ret = 0; /* xmlXIncludeDoProcess can return +ve number */
xmlXIncludeFreeContext(newctxt);
ctxt->incTab[nr]->inc = xmlCopyNodeList(fallback->children);
@@ -2206,6 +2208,8 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
if (xmlXIncludeTestNode(ctxt, cur))
xmlXIncludePreProcessNode(ctxt, cur);
} else {
+ if (cur == tree)
+ break;
do {
cur = cur->parent;
if (cur == NULL) break; /* do */
diff --git a/xmllint.c b/xmllint.c
index fd2eb8f..31fc262 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -1873,7 +1873,11 @@ main(int argc, char **argv) {
if (timing) {
endTimer("Compiling the schemas");
}
- } else if ((schema != NULL) && (stream == 0)) {
+ } else if ((schema != NULL)
+#ifdef LIBXML_READER_ENABLED
+ && (stream == 0)
+#endif
+ ) {
xmlSchemaParserCtxtPtr ctxt;
if (timing) {
diff --git a/xmlreader.c b/xmlreader.c
index e1c2ef8..41083ad 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -2053,19 +2053,12 @@ xmlTextReaderClose(xmlTextReaderPtr reader) {
reader->curnode = NULL;
reader->mode = XML_TEXTREADER_MODE_CLOSED;
if (reader->ctxt != NULL) {
+ xmlStopParser(reader->ctxt);
if (reader->ctxt->myDoc != NULL) {
if (reader->preserve == 0)
xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
reader->ctxt->myDoc = NULL;
}
- if (reader->allocs & XML_TEXTREADER_CTXT) {
- xmlFreeParserCtxt(reader->ctxt);
- reader->allocs -= XML_TEXTREADER_CTXT;
- }
- }
- if (reader->sax != NULL) {
- xmlFree(reader->sax);
- reader->sax = NULL;
}
if ((reader->input != NULL) && (reader->allocs & XML_TEXTREADER_INPUT)) {
xmlFreeParserInputBuffer(reader->input);
@@ -2204,6 +2197,10 @@ xmlTextReaderGetAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName,
* parser, set its state to End Of File and return the input stream with
* what is left that the parser did not use.
*
+ * The implementation is not good, the parser certainly procgressed past
+ * what's left in reader->input, and there is an allocation problem. Best
+ * would be to rewrite it differently.
+ *
* Returns the xmlParserInputBufferPtr attached to the XML or NULL
* in case of error.
*/
@@ -2220,22 +2217,16 @@ xmlTextReaderGetRemainder(xmlTextReaderPtr reader) {
reader->curnode = NULL;
reader->mode = XML_TEXTREADER_MODE_EOF;
if (reader->ctxt != NULL) {
+ xmlStopParser(reader->ctxt);
if (reader->ctxt->myDoc != NULL) {
if (reader->preserve == 0)
xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
reader->ctxt->myDoc = NULL;
}
- if (reader->allocs & XML_TEXTREADER_CTXT) {
- xmlFreeParserCtxt(reader->ctxt);
- reader->allocs -= XML_TEXTREADER_CTXT;
- }
- }
- if (reader->sax != NULL) {
- xmlFree(reader->sax);
- reader->sax = NULL;
}
if (reader->allocs & XML_TEXTREADER_INPUT) {
ret = reader->input;
+ reader->input = NULL;
reader->allocs -= XML_TEXTREADER_INPUT;
} else {
/*
diff --git a/xmlregexp.c b/xmlregexp.c
index 057458b..d1e6f38 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -1214,14 +1214,15 @@ xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
#ifdef DEBUG_REGEXP_GRAPH
printf("Add trans from %d to %d ", state->no, target->no);
if (count == REGEXP_ALL_COUNTER)
- printf("all transition");
+ printf("all transition\n");
else if (count >= 0)
- printf("count based %d", count);
+ printf("count based %d\n", count);
else if (counter >= 0)
- printf("counted %d", counter);
+ printf("counted %d\n", counter);
else if (atom == NULL)
- printf("epsilon transition");
- printf("\n");
+ printf("epsilon transition\n");
+ else if (atom != NULL)
+ xmlRegPrintAtom(stdout, atom);
#endif
state->trans[state->nbTrans].atom = atom;
@@ -3862,50 +3863,33 @@ xmlFAParsePiece(xmlRegParserCtxtPtr ctxt) {
/**
* xmlFAParseBranch:
* @ctxt: a regexp parser context
- * @first: is taht the first
*
* [2] branch ::= piece*
8
*/
static int
-xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, int first) {
+xmlFAParseBranch(xmlRegParserCtxtPtr ctxt) {
xmlRegStatePtr previous;
- xmlRegAtomPtr prevatom = NULL;
int ret;
previous = ctxt->state;
ret = xmlFAParsePiece(ctxt);
if (ret != 0) {
- if (first) {
- if (xmlFAGenerateTransitions(ctxt, previous, NULL, ctxt->atom) < 0)
- return(-1);
- previous = ctxt->state;
- } else {
- prevatom = ctxt->atom;
- }
+ if (xmlFAGenerateTransitions(ctxt, previous, NULL, ctxt->atom) < 0)
+ return(-1);
+ previous = ctxt->state;
ctxt->atom = NULL;
}
while ((ret != 0) && (ctxt->error == 0)) {
ret = xmlFAParsePiece(ctxt);
if (ret != 0) {
- if (first) {
- if (xmlFAGenerateTransitions(ctxt, previous, NULL,
- ctxt->atom) < 0)
+ if (xmlFAGenerateTransitions(ctxt, previous, NULL,
+ ctxt->atom) < 0)
return(-1);
- } else {
- if (xmlFAGenerateTransitions(ctxt, previous, NULL,
- prevatom) < 0)
- return(-1);
- prevatom = ctxt->atom;
- }
previous = ctxt->state;
ctxt->atom = NULL;
}
}
- if (!first) {
- if (xmlFAGenerateTransitions(ctxt, previous, ctxt->end, prevatom) < 0)
- return(-1);
- }
return(0);
}
@@ -3918,12 +3902,21 @@ xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, int first) {
*/
static void
xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top) {
- xmlRegStatePtr start, end, oldend;
+ xmlRegStatePtr start, end, oldend, oldstart;
oldend = ctxt->end;
+ oldstart = ctxt->state;
+ /* if not top start should have been generated by an epsilon trans */
start = ctxt->state;
- xmlFAParseBranch(ctxt, (ctxt->end == NULL));
+ ctxt->end = NULL;
+ xmlFAParseBranch(ctxt);
+ if (top) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("State %d is final\n", ctxt->state->no);
+#endif
+ ctxt->state->type = XML_REGEXP_FINAL_STATE;
+ }
if (CUR != '|') {
ctxt->end = ctxt->state;
return;
@@ -3932,11 +3925,21 @@ xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top) {
while ((CUR == '|') && (ctxt->error == 0)) {
NEXT;
ctxt->state = start;
+ ctxt->end = NULL;
+ xmlFAParseBranch(ctxt);
+ if (top) {
+ ctxt->state->type = XML_REGEXP_FINAL_STATE;
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("State %d is final\n", ctxt->state->no);
+#endif
+ } else {
+ xmlFAGenerateEpsilonTransition(ctxt, ctxt->state, end);
+ }
+ }
+ if (!top) {
+ ctxt->state = end;
ctxt->end = end;
- xmlFAParseBranch(ctxt, 0);
}
- if (!top)
- ctxt->end = oldend;
}
/************************************************************************
diff --git a/xmlsave.c b/xmlsave.c
index 2f8afcf..1a60a31 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -17,6 +17,8 @@
#ifdef LIBXML_HTML_ENABLED
#include <libxml/HTMLtree.h>
+#define MAX_INDENT 60
+
/************************************************************************
* *
* XHTML detection *
@@ -83,6 +85,9 @@ struct _xmlSaveCtxt {
int options;
int level;
int format;
+ char indent[MAX_INDENT + 1];
+ int indent_nr;
+ int indent_size;
};
/************************************************************************
@@ -139,6 +144,29 @@ xmlSaveErr(int code, xmlNodePtr node, const char *extra)
* Allocation and deallocation *
* *
************************************************************************/
+/**
+ * xmlSaveCtxtInit:
+ * @ctxt: the saving context
+ *
+ * Initialize a saving context
+ */
+static void
+xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
+{
+ int i;
+
+ if (ctxt == NULL) return;
+ if (xmlTreeIndentString == NULL) {
+ memset(&ctxt->indent[0], 0, MAX_INDENT + 1);
+ } else {
+ ctxt->indent_size = xmlStrlen((const xmlChar *) xmlTreeIndentString);
+ ctxt->indent_nr = MAX_INDENT / ctxt->indent_size;
+ for (i = 0;i < ctxt->indent_nr;i++)
+ memcpy(&ctxt->indent[i * ctxt->indent_size], xmlTreeIndentString,
+ ctxt->indent_size);
+ ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0;
+ }
+}
/**
* xmlFreeSaveCtxt:
@@ -182,6 +210,8 @@ xmlNewSaveCtxt(const char *encoding, int options)
}
ret->encoding = xmlStrdup((const xmlChar *)encoding);
}
+ xmlSaveCtxtInit(ret);
+
return(ret);
}
@@ -378,7 +408,6 @@ xmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
*/
static void
xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
- int i;
xmlOutputBufferPtr buf;
if (cur == NULL) return;
@@ -386,8 +415,10 @@ xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
while (cur != NULL) {
if ((ctxt->format) && (xmlIndentTreeOutput) &&
(cur->type == XML_ELEMENT_NODE))
- for (i = 0;i < ctxt->level;i++)
- xmlOutputBufferWriteString(buf, xmlTreeIndentString);
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
xmlNodeDumpOutputInternal(ctxt, cur);
if (ctxt->format) {
xmlOutputBufferWriteString(buf, "\n");
@@ -404,7 +435,7 @@ xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
*/
static void
xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
- int i, format;
+ int format;
xmlNodePtr tmp;
xmlChar *start, *end;
xmlOutputBufferPtr buf;
@@ -568,8 +599,10 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xmlNodeListDumpOutput(ctxt, cur->children);
if (ctxt->level > 0) ctxt->level--;
if ((xmlIndentTreeOutput) && (ctxt->format))
- for (i = 0;i < ctxt->level;i++)
- xmlOutputBufferWriteString(buf, xmlTreeIndentString);
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
}
xmlOutputBufferWriteString(buf, "</");
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
@@ -830,7 +863,6 @@ xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
*/
static void
xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
- int i;
xmlOutputBufferPtr buf;
if (cur == NULL) return;
@@ -838,8 +870,10 @@ xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
while (cur != NULL) {
if ((ctxt->format) && (xmlIndentTreeOutput) &&
(cur->type == XML_ELEMENT_NODE))
- for (i = 0;i < ctxt->level;i++)
- xmlOutputBufferWriteString(buf, xmlTreeIndentString);
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
xhtmlNodeDumpOutput(ctxt, cur);
if (ctxt->format) {
xmlOutputBufferWriteString(buf, "\n");
@@ -861,7 +895,7 @@ xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
*/
static void
xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
- int i, format;
+ int format;
xmlNodePtr tmp;
xmlChar *start, *end;
xmlOutputBufferPtr buf;
@@ -1098,8 +1132,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xhtmlNodeListDumpOutput(ctxt, cur->children);
if (ctxt->level > 0) ctxt->level--;
if ((xmlIndentTreeOutput) && (format))
- for (i = 0;i < ctxt->level;i++)
- xmlOutputBufferWriteString(buf, xmlTreeIndentString);
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
}
xmlOutputBufferWriteString(buf, "</");
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
@@ -1229,6 +1265,8 @@ xmlSaveToIO(xmlOutputWriteCallback iowrite,
* @doc: a document
*
* Save a full document to a saving context
+ * TODO: The function is not fully implemented yet as it does not return the
+ * byte count but 0 instead
*
* Returns the number of byte written or -1 in case of error
*/
@@ -1238,7 +1276,6 @@ xmlSaveDoc(xmlSaveCtxtPtr ctxt, xmlDocPtr doc)
long ret = 0;
xmlDocContentDumpOutput(ctxt, doc);
- TODO /* compute ret */
return(ret);
}
@@ -1248,6 +1285,8 @@ xmlSaveDoc(xmlSaveCtxtPtr ctxt, xmlDocPtr doc)
* @node: a document
*
* Save a subtree starting at the node parameter to a saving context
+ * TODO: The function is not fully implemented yet as it does not return the
+ * byte count but 0 instead
*
* Returns the number of byte written or -1 in case of error
*/
@@ -1257,7 +1296,6 @@ xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr node)
long ret = 0;
xmlNodeDumpOutputInternal(ctxt, node);
- TODO /* compute ret */
return(ret);
}
@@ -1570,6 +1608,7 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
ctxt.level = level;
ctxt.format = format;
ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
#ifdef LIBXML_HTML_ENABLED
dtd = xmlGetIntSubset(doc);
@@ -1663,6 +1702,7 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
ctxt.level = 0;
ctxt.format = format;
ctxt.encoding = (const xmlChar *) txt_encoding;
+ xmlSaveCtxtInit(&ctxt);
xmlDocContentDumpOutput(&ctxt, out_doc);
xmlOutputBufferFlush(out_buff);
if (out_buff->conv != NULL) {
@@ -1779,6 +1819,7 @@ xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
ctxt.level = 0;
ctxt.format = format;
ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
xmlDocContentDumpOutput(&ctxt, cur);
ret = xmlOutputBufferClose(buf);
@@ -1821,6 +1862,7 @@ xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
ctxt.level = 0;
ctxt.format = 0;
ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
xmlDocContentDumpOutput(&ctxt, cur);
ret = xmlOutputBufferClose(buf);
return(ret);
@@ -1853,6 +1895,7 @@ xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
ctxt.level = 0;
ctxt.format = format;
ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
xmlDocContentDumpOutput(&ctxt, cur);
ret = xmlOutputBufferClose(buf);
return (ret);
@@ -1906,6 +1949,7 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
ctxt.level = 0;
ctxt.format = format;
ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
xmlDocContentDumpOutput(&ctxt, cur);
diff --git a/xmlschemas.c b/xmlschemas.c
index 192cfe8..25f9400 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -183,6 +183,12 @@ static int xmlSchemaValidateSimpleValue(xmlSchemaValidCtxtPtr ctxt,
static int xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaPtr schema,
xmlNodePtr node);
+static int
+xmlSchemaValidateSimpleValueInternal(xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaTypePtr type,
+ const xmlChar * value,
+ int fireErrors);
+
/************************************************************************
* *
* Datatype error handlers *
@@ -1492,7 +1498,7 @@ xmlGetQNameProp(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
if (val == NULL)
return (NULL);
- if (!strchr(val, ':')) {
+ if (!strchr((char *) val, ':')) {
ns = xmlSearchNs(node->doc, node, 0);
if (ns) {
*namespace = xmlDictLookup(ctxt->dict, ns->href, -1);
@@ -1996,7 +2002,7 @@ static xmlSchemaAttributePtr
xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
xmlNodePtr node)
{
- const xmlChar *name, *refNs = NULL, *ref = NULL;
+ const xmlChar *name, *refNs = NULL, *ref = NULL, *attrVal;
xmlSchemaAttributePtr ret;
xmlNodePtr child = NULL;
char buf[100];
@@ -2025,6 +2031,23 @@ xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
if (ret == NULL) {
return (NULL);
}
+
+ /* Read the "use" attribute. */
+ attrVal = xmlSchemaGetProp(ctxt, node, "use");
+ if (attrVal != NULL) {
+ if (xmlStrEqual(attrVal, BAD_CAST "optional"))
+ ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
+ else if (xmlStrEqual(attrVal, BAD_CAST "prohibited"))
+ ret->occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED;
+ else if (xmlStrEqual(attrVal, BAD_CAST "required"))
+ ret->occurs = XML_SCHEMAS_ATTR_USE_REQUIRED;
+ else
+ xmlSchemaPErr(ctxt, node,
+ XML_SCHEMAP_INVALID_ATTR_USE,
+ "attribute %s has an invalid value for \"use\"\n", name, NULL);
+ } else
+ ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
+
ret->ref = ref;
ret->refNs = refNs;
if ((ret->targetNamespace != NULL) &&
@@ -2279,7 +2302,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
if (type == NULL)
return (NULL);
type->node = node;
- type->type = XML_SCHEMA_TYPE_LIST;
+ type->type = XML_SCHEMA_TYPE_UNION;
type->id = xmlSchemaGetProp(ctxt, node, "id");
type->ref = xmlSchemaGetProp(ctxt, node, "memberTypes");
@@ -4358,6 +4381,58 @@ xmlSchemaRefFixupCallback(xmlSchemaElementPtr elem,
}
}
+static void
+xmlSchemaParseUnionRefCheck(xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ const xmlChar *cur, *end, *prefix, *ncName, *namespace;
+ xmlChar *tmp;
+ xmlSchemaTypePtr subtype;
+ xmlNsPtr ns;
+ int len;
+
+ if ((typeDecl->type != XML_SCHEMA_TYPE_UNION) || (typeDecl->ref == NULL))
+ return;
+
+ cur = typeDecl->ref;
+ do {
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur)
+ break;
+ tmp = xmlStrndup(cur, end - cur);
+ ncName = xmlSplitQName3(tmp, &len);
+ if (ncName != NULL) {
+ prefix = xmlDictLookup(ctxt->dict, tmp, len);
+ } else {
+ prefix = NULL;
+ ncName = tmp;
+ }
+ ns = xmlSearchNs(typeDecl->node->doc, typeDecl->node, prefix);
+ if (ns == NULL) {
+ xmlSchemaPErr(ctxt, typeDecl->node, XML_SCHEMAP_PREFIX_UNDEFINED,
+ "Union %s: the namespace of member type %s is undefined\n",
+ typeDecl->name, (const xmlChar *) tmp);
+ namespace = NULL;
+ } else {
+ namespace = xmlDictLookup(ctxt->dict, ns->href, -1);
+ }
+ /* Lookup the referenced type */
+ subtype = xmlSchemaGetType(ctxt->schema, ncName, namespace);
+ if (subtype == NULL) {
+ xmlSchemaPErr(ctxt, typeDecl->node, XML_SCHEMAP_UNKNOWN_MEMBER_TYPE,
+ "Union %s references an unknown member type >%s<\n",
+ typeDecl->name, (const xmlChar *) tmp);
+ }
+ xmlFree(tmp);
+ cur = end;
+ } while (*cur != 0);
+
+}
+
/**
* xmlSchemaTypeFixup:
* @typeDecl: the schema type definition
@@ -4473,7 +4548,16 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr typeDecl,
typeDecl->base, name);
return;
}
+ if (typeDecl->recurse) {
+ xmlSchemaPErr(ctxt, typeDecl->node,
+ XML_SCHEMAP_UNKNOWN_BASE_TYPE,
+ "Schemas: extension type %s is recursive\n",
+ name, NULL);
+ return;
+ }
+ typeDecl->recurse = 1;
xmlSchemaTypeFixup(base, ctxt, NULL);
+ typeDecl->recurse = 0;
if (explicitContentType == XML_SCHEMA_CONTENT_EMPTY) {
/* 2.1 */
typeDecl->contentType = base->contentType;
@@ -4553,6 +4637,7 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr typeDecl,
case XML_SCHEMA_TYPE_NOTATION:
case XML_SCHEMA_TYPE_LIST:
case XML_SCHEMA_TYPE_UNION:
+ xmlSchemaParseUnionRefCheck(typeDecl, ctxt);
case XML_SCHEMA_FACET_MININCLUSIVE:
case XML_SCHEMA_FACET_MINEXCLUSIVE:
case XML_SCHEMA_FACET_MAXINCLUSIVE:
@@ -5060,12 +5145,13 @@ xmlSchemaFacetTypeToString(xmlSchemaTypeType type)
}
/**
- * xmlSchemaValidateFacets:
+ * xmlSchemaValidateFacetsInternal:
* @ctxt: a schema validation context
* @base: the base type
* @facets: the list of facets to check
* @value: the lexical repr of the value to validate
* @val: the precomputed value
+ * @fireErrors: if 0, only internal errors will be fired; otherwise all errors will be fired.
*
* Check a value against all facet conditions
*
@@ -5073,9 +5159,9 @@ xmlSchemaFacetTypeToString(xmlSchemaTypeType type)
* number otherwise and -1 in case of internal or API error.
*/
static int
-xmlSchemaValidateFacets(xmlSchemaValidCtxtPtr ctxt,
+xmlSchemaValidateFacetsInternal(xmlSchemaValidCtxtPtr ctxt,
xmlSchemaTypePtr base,
- xmlSchemaFacetPtr facets, const xmlChar * value)
+ xmlSchemaFacetPtr facets, const xmlChar * value, int fireErrors)
{
int ret = 0;
int tmp = 0;
@@ -5101,7 +5187,8 @@ xmlSchemaValidateFacets(xmlSchemaValidCtxtPtr ctxt,
if (tmp != 0) {
ret = tmp;
- xmlSchemaVErr(ctxt, ctxt->cur, XML_SCHEMAS_ERR_FACET, "Failed to validate type with facet %s\n", (const xmlChar *) xmlSchemaFacetTypeToString(type), NULL);
+ if (fireErrors)
+ xmlSchemaVErr(ctxt, ctxt->cur, XML_SCHEMAS_ERR_FACET, "Failed to validate type with facet %s\n", (const xmlChar *) xmlSchemaFacetTypeToString(type), NULL);
}
if (facet != NULL)
facet = facet->next;
@@ -5109,6 +5196,27 @@ xmlSchemaValidateFacets(xmlSchemaValidCtxtPtr ctxt,
return (ret);
}
+/**
+ * xmlSchemaValidateFacets:
+ * @ctxt: a schema validation context
+ * @base: the base type
+ * @facets: the list of facets to check
+ * @value: the lexical repr of the value to validate
+ * @val: the precomputed value
+ *
+ * Check a value against all facet conditions
+ *
+ * Returns 0 if the element is schemas valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+static int
+xmlSchemaValidateFacets(xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaTypePtr base,
+ xmlSchemaFacetPtr facets, const xmlChar * value)
+{
+ return(xmlSchemaValidateFacetsInternal(ctxt, base, facets, value, 1));
+}
+
/************************************************************************
* *
* Simple type validation *
@@ -5116,6 +5224,76 @@ xmlSchemaValidateFacets(xmlSchemaValidCtxtPtr ctxt,
************************************************************************/
/**
+ * xmlSchemaValidateSimpleValueUnion:
+ * @ctxt: a schema validation context
+ * @type: the type declaration
+ * @value: the value to validate
+ *
+ * Validates a value against a union.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+static int
+xmlSchemaValidateSimpleValueUnion(xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaTypePtr type, const xmlChar * value)
+{
+ int ret = 0;
+ const xmlChar *cur, *end, *prefix, *ncName;
+ xmlChar *tmp;
+ xmlSchemaTypePtr subtype;
+ xmlNsPtr ns;
+ int len;
+
+
+ /* Process referenced memberTypes. */
+ cur = type->ref;
+ do {
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur)
+ break;
+ tmp = xmlStrndup(cur, end - cur);
+ ncName = xmlSplitQName3(tmp, &len);
+ if (ncName != NULL) {
+ prefix = xmlStrndup(tmp, len);
+ /* prefix = xmlDictLookup(ctxt->doc->dict, tmp, len); */
+ } else {
+ prefix = NULL;
+ ncName = tmp;
+ }
+ /* We won't do additional checks here, since they have been performed during parsing. */
+ ns = xmlSearchNs(type->node->doc, type->node, prefix);
+ /* namespace = xmlDictLookup(ctxt->doc->dict, ns->href, -1); */
+ subtype = xmlSchemaGetType(ctxt->schema, ncName, ns->href);
+ if (tmp != NULL)
+ xmlFree(tmp);
+ if (prefix != NULL)
+ xmlFree((void *)prefix);
+ ret = xmlSchemaValidateSimpleValueInternal(ctxt, subtype, value, 0);
+ if ((ret == 0) || (ret == -1)) {
+ return (ret);
+ }
+ cur = end;
+ } while (*cur != 0);
+
+ if (type->subtypes != NULL) {
+ subtype = type->subtypes;
+ do {
+ ret = xmlSchemaValidateSimpleValueInternal(ctxt, subtype, value, 0);
+ if ((ret == 0) || (ret == -1)) {
+ return (ret);
+ }
+ subtype = subtype->next;
+ } while (subtype != NULL);
+ }
+ return (ret);
+}
+
+/**
* xmlSchemaValidateSimpleValue:
* @ctxt: a schema validation context
* @type: the type declaration
@@ -5130,6 +5308,25 @@ static int
xmlSchemaValidateSimpleValue(xmlSchemaValidCtxtPtr ctxt,
xmlSchemaTypePtr type, const xmlChar * value)
{
+ return (xmlSchemaValidateSimpleValueInternal(ctxt, type, value, 1));
+}
+
+/**
+ * xmlSchemaValidateSimpleValue:
+ * @ctxt: a schema validation context
+ * @type: the type declaration
+ * @value: the value to validate
+ * @fireErrors: if 0, only internal errors will be fired; otherwise all errors will be fired.
+ *
+ * Validate a value against a simple type
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+static int
+xmlSchemaValidateSimpleValueInternal(xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaTypePtr type, const xmlChar * value, int fireErrors)
+{
int ret = 0;
/*
@@ -5147,7 +5344,7 @@ xmlSchemaValidateSimpleValue(xmlSchemaValidCtxtPtr ctxt,
}
ret = xmlSchemaValPredefTypeNode(type, value, &(ctxt->value),
ctxt->cur);
- if (ret != 0) {
+ if ((fireErrors) && (ret != 0)) {
xmlSchemaVErr(ctxt, ctxt->cur, XML_SCHEMAS_ERR_VALUE, "Failed to validate basic type %s\n", type->name, NULL);
}
} else if (type->type == XML_SCHEMA_TYPE_RESTRICTION) {
@@ -5156,7 +5353,7 @@ xmlSchemaValidateSimpleValue(xmlSchemaValidCtxtPtr ctxt,
base = type->baseType;
if (base != NULL) {
- ret = xmlSchemaValidateSimpleValue(ctxt, base, value);
+ ret = xmlSchemaValidateSimpleValueInternal(ctxt, base, value, fireErrors);
} else if (type->subtypes != NULL) {
TODO
}
@@ -5168,7 +5365,7 @@ xmlSchemaValidateSimpleValue(xmlSchemaValidCtxtPtr ctxt,
if (ctxt->schema != NULL) {
if (ret == 0) {
facet = type->facets;
- ret = xmlSchemaValidateFacets(ctxt, base, facet, value);
+ ret = xmlSchemaValidateFacetsInternal(ctxt, base, facet, value, fireErrors);
}
}
} else if (type->type == XML_SCHEMA_TYPE_SIMPLE) {
@@ -5176,7 +5373,7 @@ xmlSchemaValidateSimpleValue(xmlSchemaValidCtxtPtr ctxt,
base = type->subtypes;
if (base != NULL) {
- ret = xmlSchemaValidateSimpleValue(ctxt, base, value);
+ ret = xmlSchemaValidateSimpleValueInternal(ctxt, base, value, fireErrors);
} else {
TODO}
} else if (type->type == XML_SCHEMA_TYPE_LIST) {
@@ -5202,12 +5399,17 @@ xmlSchemaValidateSimpleValue(xmlSchemaValidCtxtPtr ctxt,
if (end == cur)
break;
tmp = xmlStrndup(cur, end - cur);
- ret2 = xmlSchemaValidateSimpleValue(ctxt, base, tmp);
+ ret2 = xmlSchemaValidateSimpleValueInternal(ctxt, base, tmp, fireErrors);
xmlFree(tmp);
if (ret2 != 0)
ret = 1;
cur = end;
} while (*cur != 0);
+ } else if (type->type == XML_SCHEMA_TYPE_UNION) {
+ ret = xmlSchemaValidateSimpleValueUnion(ctxt, type, value);
+ if ((fireErrors) && (ret != 0)) {
+ xmlSchemaVErr(ctxt, ctxt->cur, XML_SCHEMAS_ERR_VALUE, "Failed to validate type %s\n", type->name, NULL);
+ }
} else {
TODO
}
@@ -6045,10 +6247,12 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem,
xmlAttrPtr attr;
xmlChar *value;
xmlSchemaAttributeGroupPtr group = NULL;
+ int found;
if (attributes == NULL)
return (0);
while (attributes != NULL) {
+ found = 0;
/*
* Handle attribute groups
*/
@@ -6094,11 +6298,22 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem,
continue;
}
}
+ found = 1;
ctxt->cur = (xmlNodePtr) attributes;
+
if (attributes->subtypes == NULL) {
xmlSchemaVErr(ctxt, (xmlNodePtr) attr, XML_SCHEMAS_ERR_INTERNAL, "Internal error: attribute %s type not resolved\n", attr->name, NULL);
continue;
}
+
+ if (attributes->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) {
+ xmlSchemaVErr(ctxt, elem, XML_SCHEMAS_ERR_INVALIDATTR, "attribute %s on %s is prohibited\n", attributes->name, elem->name);
+ /* Setting the state to XML_SCHEMAS_ATTR_CHECKED seems not very logical but it
+ surpresses the "attribute is unknown" error report. Please change this if you know better */
+ ctxt->attr[i].state = XML_SCHEMAS_ATTR_CHECKED;
+ break;
+ }
+
value = xmlNodeListGetString(elem->doc, attr->children, 1);
ret = xmlSchemaValidateSimpleValue(ctxt, attributes->subtypes,
value);
@@ -6111,6 +6326,9 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem,
xmlFree(value);
}
}
+ if ((!found) && (attributes->occurs == XML_SCHEMAS_ATTR_USE_REQUIRED)) {
+ xmlSchemaVErr(ctxt, elem, XML_SCHEMAS_ERR_MISSING, "required attribute %s on %s is missing\n", attributes->name, elem->name);
+ }
attributes = attributes->next;
}
return (ctxt->err);
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 91e34b8..9ed7fb0 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -506,9 +506,9 @@ xmlSchemaGetPredefinedType(const xmlChar *name, const xmlChar *ns) {
#define IS_LEAP(y) \
(((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0))
-static const long daysInMonth[12] =
+static const unsigned int daysInMonth[12] =
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
-static const long daysInMonthLeap[12] =
+static const unsigned int daysInMonthLeap[12] =
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
#define MAX_DAYINMONTH(yr,mon) \
@@ -2651,8 +2651,8 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
/* month */
carry = d->mon + u->mon;
- r->mon = MODULO_RANGE(carry, 1, 13);
- carry = FQUOTIENT_RANGE(carry, 1, 13);
+ r->mon = (unsigned int) MODULO_RANGE(carry, 1, 13);
+ carry = (long) FQUOTIENT_RANGE(carry, 1, 13);
/* year (may be modified later) */
r->year = d->year + carry;
@@ -2669,20 +2669,20 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
/* seconds */
r->sec = d->sec + u->sec;
- carry = FQUOTIENT((long)r->sec, 60);
+ carry = (long) FQUOTIENT((long)r->sec, 60);
if (r->sec != 0.0) {
r->sec = MODULO(r->sec, 60.0);
}
/* minute */
carry += d->min;
- r->min = MODULO(carry, 60);
- carry = FQUOTIENT(carry, 60);
+ r->min = (unsigned int) MODULO(carry, 60);
+ carry = (long) FQUOTIENT(carry, 60);
/* hours */
carry += d->hour;
- r->hour = MODULO(carry, 24);
- carry = FQUOTIENT(carry, 24);
+ r->hour = (unsigned int) MODULO(carry, 24);
+ carry = (long)FQUOTIENT(carry, 24);
/*
* days
@@ -2701,21 +2701,21 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
while (1) {
if (tempdays < 1) {
- long tmon = MODULO_RANGE(r->mon-1, 1, 13);
- long tyr = r->year + FQUOTIENT_RANGE(r->mon-1, 1, 13);
+ long tmon = (long) MODULO_RANGE(r->mon-1, 1, 13);
+ long tyr = r->year + (long)FQUOTIENT_RANGE(r->mon-1, 1, 13);
if (tyr == 0)
tyr--;
tempdays += MAX_DAYINMONTH(tyr, tmon);
carry = -1;
- } else if (tempdays > MAX_DAYINMONTH(r->year, r->mon)) {
+ } else if (tempdays > (long) MAX_DAYINMONTH(r->year, r->mon)) {
tempdays = tempdays - MAX_DAYINMONTH(r->year, r->mon);
carry = 1;
} else
break;
temp = r->mon + carry;
- r->mon = MODULO_RANGE(temp, 1, 13);
- r->year = r->year + FQUOTIENT_RANGE(temp, 1, 13);
+ r->mon = (unsigned int) MODULO_RANGE(temp, 1, 13);
+ r->year = r->year + (unsigned int) FQUOTIENT_RANGE(temp, 1, 13);
if (r->year == 0) {
if (temp < 1)
r->year--;
diff --git a/xmlwriter.c b/xmlwriter.c
index e5c7e5f..fc2b066 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -44,7 +44,7 @@ typedef enum {
XML_TEXTWRITER_DTD_ENTY, /* entity */
XML_TEXTWRITER_DTD_ENTY_TEXT,
XML_TEXTWRITER_DTD_PENT, /* parameter entity */
- XML_TEXTWRITER_COMMENT,
+ XML_TEXTWRITER_COMMENT
} xmlTextWriterState;
typedef struct _xmlTextWriterStackEntry xmlTextWriterStackEntry;
@@ -1326,7 +1326,6 @@ xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content)
switch (p->state) {
case XML_TEXTWRITER_NAME:
case XML_TEXTWRITER_TEXT:
- encode:
buf = xmlEncodeSpecialChars(NULL, content);
break;
case XML_TEXTWRITER_ATTRIBUTE:
@@ -1334,6 +1333,8 @@ xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content)
xmlAttrSerializeTxtContent(writer->out->buffer, NULL,
NULL, content);
break;
+ default:
+ break;
}
}
}
@@ -3556,7 +3557,6 @@ xmlTextWriterEndDTDEntity(xmlTextWriterPtr writer)
sum += count;
case XML_TEXTWRITER_DTD_ENTY:
case XML_TEXTWRITER_DTD_PENT:
- enddtd:
count = xmlOutputBufferWriteString(writer->out, ">");
if (count < 0)
return -1;
diff --git a/xpath.c b/xpath.c
index 881e936..554350d 100644
--- a/xpath.c
+++ b/xpath.c
@@ -6089,18 +6089,23 @@ xmlXPathGetElementsByIds (xmlDocPtr doc, const xmlChar *ids) {
ID = xmlStrndup(ids, cur - ids);
if (ID != NULL) {
- if (xmlValidateNCName(ID, 1) == 0) {
- attr = xmlGetID(doc, ID);
- if (attr != NULL) {
- if (attr->type == XML_ATTRIBUTE_NODE)
- elem = attr->parent;
- else if (attr->type == XML_ELEMENT_NODE)
- elem = (xmlNodePtr) attr;
- else
- elem = NULL;
- if (elem != NULL)
- xmlXPathNodeSetAdd(ret, elem);
- }
+ /*
+ * We used to check the fact that the value passed
+ * was an NCName, but this generated much troubles for
+ * me and Aleksey Sanin, people blatantly violated that
+ * constaint, like Visa3D spec.
+ * if (xmlValidateNCName(ID, 1) == 0)
+ */
+ attr = xmlGetID(doc, ID);
+ if (attr != NULL) {
+ if (attr->type == XML_ATTRIBUTE_NODE)
+ elem = attr->parent;
+ else if (attr->type == XML_ELEMENT_NODE)
+ elem = (xmlNodePtr) attr;
+ else
+ elem = NULL;
+ if (elem != NULL)
+ xmlXPathNodeSetAdd(ret, elem);
}
xmlFree(ID);
}
@@ -10917,7 +10922,12 @@ xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt,
case XPATH_BOOLEAN:
return(res->boolval);
case XPATH_NUMBER:
+#ifdef WIN32
+ return(((res->floatval == ctxt->context->proximityPosition) &&
+ (!xmlXPathIsNaN(res->floatval)) /* MSC pbm Mark Vadoc !*/);
+#else
return(res->floatval == ctxt->context->proximityPosition);
+#endif
case XPATH_NODESET:
case XPATH_XSLT_TREE:
if (res->nodesetval == NULL)