From beb70bd39b74c8146c184857792730b139e7e16b Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 18 Dec 2002 14:53:54 +0000 Subject: [PATCH] more work on the xml reader interfaces. updated Igor's mail and the Web * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: more work on the xml reader interfaces. * AUTHORS MAINTAINERS doc/* win32/*: updated Igor's mail and the Web page for the Windows binaries. Daniel --- AUTHORS | 2 +- ChangeLog | 7 + MAINTAINERS | 4 +- doc/APIchunk0.html | 2 +- doc/APIchunk1.html | 2 +- doc/APIchunk10.html | 2 +- doc/APIchunk11.html | 2 +- doc/APIchunk12.html | 2 +- doc/APIchunk13.html | 2 +- doc/APIchunk14.html | 2 +- doc/APIchunk15.html | 2 +- doc/APIchunk16.html | 2 +- doc/APIchunk17.html | 2 +- doc/APIchunk18.html | 2 +- doc/APIchunk19.html | 2 +- doc/APIchunk2.html | 2 +- doc/APIchunk20.html | 2 +- doc/APIchunk21.html | 2 +- doc/APIchunk22.html | 2 +- doc/APIchunk23.html | 2 +- doc/APIchunk24.html | 2 +- doc/APIchunk3.html | 2 +- doc/APIchunk4.html | 2 +- doc/APIchunk5.html | 2 +- doc/APIchunk6.html | 2 +- doc/APIchunk7.html | 2 +- doc/APIchunk8.html | 2 +- doc/APIchunk9.html | 2 +- doc/APIconstructors.html | 2 +- doc/APIfiles.html | 2 +- doc/APIfunctions.html | 2 +- doc/APIsymbols.html | 2 +- doc/DOM.html | 2 +- doc/FAQ.html | 2 +- doc/XMLinfo.html | 2 +- doc/XSLT.html | 2 +- doc/architecture.html | 2 +- doc/bugs.html | 2 +- doc/catalog.html | 2 +- doc/contribs.html | 6 +- doc/docs.html | 2 +- doc/downloads.html | 6 +- doc/encoding.html | 2 +- doc/entities.html | 2 +- doc/example.html | 2 +- doc/help.html | 2 +- doc/index.html | 2 +- doc/interface.html | 2 +- doc/intro.html | 2 +- doc/library.html | 2 +- doc/libxml2-api.xml | 29 +++ doc/namespaces.html | 2 +- doc/news.html | 2 +- doc/python.html | 2 +- doc/search.php | 2 +- doc/site.xsl | 2 +- doc/threads.html | 2 +- doc/tree.html | 2 +- doc/upgrade.html | 2 +- doc/xml.html | 8 +- doc/xmldtd.html | 2 +- doc/xmlio.html | 2 +- doc/xmlmem.html | 2 +- include/libxml/xmlreader.h | 15 ++ python/libxml2class.txt | 3 + tree.c | 4 +- win32/Makefile.mingw | 2 +- win32/Makefile.msvc | 2 +- win32/Readme.txt | 2 +- win32/configure.js | 4 +- win32/libxml2.def.src | 2 +- xmlreader.c | 377 +++++++++++++++++++++++++++++++++++++ 72 files changed, 509 insertions(+), 76 deletions(-) diff --git a/AUTHORS b/AUTHORS index 77858fc5..cf2e9a6f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,5 @@ Daniel Veillard Bjorn Reese William Brack -Igor Zlatkovic for the Windows port +Igor Zlatkovic for the Windows port Aleksey Sanin diff --git a/ChangeLog b/ChangeLog index 5353d4be..75ca7eef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Dec 18 15:51:22 CET 2002 Daniel Veillard + + * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: more + work on the xml reader interfaces. + * AUTHORS MAINTAINERS doc/* win32/*: updated Igor's mail and the + Web page for the Windows binaries. + Tue Dec 17 19:31:07 CET 2002 Daniel Veillard * xmlIO.c: applied a patch for VMS following the report by diff --git a/MAINTAINERS b/MAINTAINERS index 27adc1e9..1f1a502d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1 +1,3 @@ -Email: Daniel.Veillard@imag.fr +See first http://xmlsoft.org/bugs.html and use the list please. +Email: daniel@redhat.com +Windows port: igor@zlatkovic.com diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html index da3be230..d2dbec0f 100644 --- a/doc/APIchunk0.html +++ b/doc/APIchunk0.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html index 756e6a84..7db41b99 100644 --- a/doc/APIchunk1.html +++ b/doc/APIchunk1.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index b9c8b2d9..f6c86fc5 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index 71c470a1..10fa0a05 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index 3fe8e056..085c7e90 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index ffdf4f01..828f5808 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index 1875c1ce..371ed5a7 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index faa3a08f..ca924b2d 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html index 6cc9a0ce..7e111a6b 100644 --- a/doc/APIchunk16.html +++ b/doc/APIchunk16.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html index fd60f180..a082bbf5 100644 --- a/doc/APIchunk17.html +++ b/doc/APIchunk17.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index 1b672d19..5c5d3c55 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index 4d5597e7..eeb64f7d 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html index b6438be2..d2204c97 100644 --- a/doc/APIchunk2.html +++ b/doc/APIchunk2.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index 6abd9860..dc0fe0d1 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index ace2585c..2fcbd263 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index b7a23e22..f3ebb330 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index f353c16b..b2e422d4 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html index 290517c3..b74f93c6 100644 --- a/doc/APIchunk24.html +++ b/doc/APIchunk24.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html index e6e2d2f3..69d093d7 100644 --- a/doc/APIchunk3.html +++ b/doc/APIchunk3.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html index 8a6801d0..b883e6dd 100644 --- a/doc/APIchunk4.html +++ b/doc/APIchunk4.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html index c241f9dd..876c89e5 100644 --- a/doc/APIchunk5.html +++ b/doc/APIchunk5.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html index a98e6c30..34493229 100644 --- a/doc/APIchunk6.html +++ b/doc/APIchunk6.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index f7eb51d8..51a67d86 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html index 744abf98..5b8ecbb2 100644 --- a/doc/APIchunk8.html +++ b/doc/APIchunk8.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index 71903594..34017fb8 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index 838bcc58..7077ea50 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIfiles.html b/doc/APIfiles.html index 209d6110..06106697 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index d2a3b7b2..2f0f5b44 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index c821d1e3..d0651842 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/DOM.html b/doc/DOM.html index 285c8e82..c56886dc 100644 --- a/doc/DOM.html +++ b/doc/DOM.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/FAQ.html b/doc/FAQ.html index 63ac2a2f..c1a6a919 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html index 994a0529..a1e799b0 100644 --- a/doc/XMLinfo.html +++ b/doc/XMLinfo.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/XSLT.html b/doc/XSLT.html index f1b70f17..f9d491e3 100644 --- a/doc/XSLT.html +++ b/doc/XSLT.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/architecture.html b/doc/architecture.html index 462c6158..9d3328fe 100644 --- a/doc/architecture.html +++ b/doc/architecture.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/bugs.html b/doc/bugs.html index d18ca276..5026d569 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/catalog.html b/doc/catalog.html index 49098dfa..a5ff2ba1 100644 --- a/doc/catalog.html +++ b/doc/catalog.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/contribs.html b/doc/contribs.html index 20b67214..a4010a10 100644 --- a/doc/contribs.html +++ b/doc/contribs.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • @@ -99,8 +99,8 @@ A:link, A:visited, A:active { text-decoration: underline } and Solaris port.
  • John Fleck helps maintaining the documentation and man pages.
  • -Igor Zlatkovic is now - the maintainer of the Windows port, he +Igor Zlatkovic is now + the maintainer of the Windows port, he provides binaries
  • diff --git a/doc/docs.html b/doc/docs.html index 4661a6b0..56b462c9 100644 --- a/doc/docs.html +++ b/doc/docs.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/downloads.html b/doc/downloads.html index 9483f2aa..9384ba35 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • @@ -98,8 +98,8 @@ as a source archive , Antonin Sprinzl also provide a mirror in Austria. (NOTE that you need both the libxml(2) and libxml(2)-devel -packages installed to compile applications using libxml.) Igor Zlatkovic is now the -maintainer of the Windows port, he +packages installed to compile applications using libxml.) Igor Zlatkovic is now the +maintainer of the Windows port, he provides binaries. Gary Pennington provides Solaris binaries. Steve Ball provides diff --git a/doc/encoding.html b/doc/encoding.html index 85d1c74e..d644c3bc 100644 --- a/doc/encoding.html +++ b/doc/encoding.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/entities.html b/doc/entities.html index b884e182..76561828 100644 --- a/doc/entities.html +++ b/doc/entities.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/example.html b/doc/example.html index 168c0d90..a7a801c3 100644 --- a/doc/example.html +++ b/doc/example.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/help.html b/doc/help.html index 53b665c1..776247b6 100644 --- a/doc/help.html +++ b/doc/help.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/index.html b/doc/index.html index 2037c265..c52c9032 100644 --- a/doc/index.html +++ b/doc/index.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/interface.html b/doc/interface.html index 738dd289..fb868ba6 100644 --- a/doc/interface.html +++ b/doc/interface.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/intro.html b/doc/intro.html index 1d2c55c1..81411c7c 100644 --- a/doc/intro.html +++ b/doc/intro.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/library.html b/doc/library.html index d4166765..e41d3e35 100644 --- a/doc/library.html +++ b/doc/library.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index ce8479c3..dbbf3475 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -1087,9 +1087,13 @@ + + + + @@ -1098,6 +1102,7 @@ + @@ -1119,10 +1124,12 @@ + + @@ -2357,6 +2364,7 @@ + @@ -2364,6 +2372,7 @@ + @@ -2371,6 +2380,7 @@ + @@ -2826,6 +2836,7 @@ actually an xmlCharEncoding'/> + @@ -7922,6 +7933,12 @@ actually an xmlCharEncoding'/> + + Read the parser internal property. + + + + 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. @@ -8027,6 +8044,11 @@ actually an xmlCharEncoding'/> + + Parses an attribute value into one or more Text and EntityReference nodes. + + + Reads the contents of the current node, including child nodes and markup. @@ -8047,6 +8069,13 @@ actually an xmlCharEncoding'/> + + Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done. + + + + + Provides the text value of the node if present diff --git a/doc/namespaces.html b/doc/namespaces.html index 46c2e370..9d2778ef 100644 --- a/doc/namespaces.html +++ b/doc/namespaces.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/news.html b/doc/news.html index ec056397..be256e26 100644 --- a/doc/news.html +++ b/doc/news.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/python.html b/doc/python.html index 83bfde23..6855a08b 100644 --- a/doc/python.html +++ b/doc/python.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/search.php b/doc/search.php index d5024ba3..d321cb40 100644 --- a/doc/search.php +++ b/doc/search.php @@ -79,7 +79,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/site.xsl b/doc/site.xsl index 7ed6688f..942c877d 100644 --- a/doc/site.xsl +++ b/doc/site.xsl @@ -153,7 +153,7 @@
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/threads.html b/doc/threads.html index 3cfae90b..e21cf76c 100644 --- a/doc/threads.html +++ b/doc/threads.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/tree.html b/doc/tree.html index 66cf0d4e..ccd9975a 100644 --- a/doc/tree.html +++ b/doc/tree.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/upgrade.html b/doc/upgrade.html index 13fd669f..c5df6787 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/xml.html b/doc/xml.html index 1cf3b327..9514fed8 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -541,9 +541,9 @@ mirror in Austria. (NOTE that you need both the libxml(2) and libxml(2)-devel packages installed to compile applications using libxml.) Igor Zlatkovic is now the +href="mailto:igor@zlatkovic.com">Igor Zlatkovic is now the maintainer of the Windows port, he +href="http://ww.zlatkovic.com/projects/libxml/index.html">he provides binaries. Gary Pennington provides Solaris binaries. Steve Ball provides @@ -3900,9 +3900,9 @@ Gnome CVS base under gnome-xml/example

    patches, Gary Pennington worked on the validation API, threading support and Solaris port.
  • John Fleck helps maintaining the documentation and man pages.
  • -
  • Igor Zlatkovic is now +
  • Igor Zlatkovic is now the maintainer of the Windows port, he + href="http://ww.zlatkovic.com/projects/libxml/index.html">he provides binaries
  • Gary Pennington provides Solaris binaries
  • diff --git a/doc/xmldtd.html b/doc/xmldtd.html index 84a11c66..d24665f8 100644 --- a/doc/xmldtd.html +++ b/doc/xmldtd.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/xmlio.html b/doc/xmlio.html index 196ba000..87e3d83a 100644 --- a/doc/xmlio.html +++ b/doc/xmlio.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/doc/xmlmem.html b/doc/xmlmem.html index 7fb6ce8f..03d8b05c 100644 --- a/doc/xmlmem.html +++ b/doc/xmlmem.html @@ -84,7 +84,7 @@ A:link, A:visited, A:active { text-decoration: underline }
  • DOM gdome2
  • XML-DSig xmlsec
  • FTP
  • -
  • Windows binaries
  • +
  • Windows binaries
  • Solaris binaries
  • MacOsX binaries
  • Pascal bindings
  • diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h index 0acd61b4..27c8ba3b 100644 --- a/include/libxml/xmlreader.h +++ b/include/libxml/xmlreader.h @@ -16,6 +16,12 @@ extern "C" { #endif +typedef enum { + XML_PARSER_LOADDTD = 1, + XML_PARSER_DEFAULTATTRS, + XML_PARSER_VALIDATE +} xmlParserProperties; + typedef struct _xmlTextReader xmlTextReader; typedef xmlTextReader *xmlTextReaderPtr; @@ -33,6 +39,7 @@ int xmlTextReaderRead (xmlTextReaderPtr reader); xmlChar * xmlTextReaderReadInnerXml (xmlTextReaderPtr reader); xmlChar * xmlTextReaderReadOuterXml (xmlTextReaderPtr reader); xmlChar * xmlTextReaderReadString (xmlTextReaderPtr reader); +int xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader); /* * Attributes of the node @@ -80,6 +87,14 @@ int xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader); int xmlTextReaderMoveToElement (xmlTextReaderPtr reader); int xmlTextReaderNormalization (xmlTextReaderPtr reader); +/* + * Extensions + */ +int xmlTextReaderSetParserProp (xmlTextReaderPtr reader, + int prop, + int value); +int xmlTextReaderGetParserProp (xmlTextReaderPtr reader, + int prop); #ifdef __cplusplus } #endif diff --git a/python/libxml2class.txt b/python/libxml2class.txt index 10155f6a..38a8a649 100644 --- a/python/libxml2class.txt +++ b/python/libxml2class.txt @@ -570,6 +570,7 @@ Class xmlTextReader() getAttribute() getAttributeNo() getAttributeNs() + getParserProp() getRemainder() hasAttributes() hasValue() @@ -590,10 +591,12 @@ Class xmlTextReader() prefix() quoteChar() read() + readAttributeValue() readInnerXml() readOuterXml() readState() readString() + setParserProp() value() xmlLang() Class xmlReg() diff --git a/tree.c b/tree.c index c3d30450..807189ef 100644 --- a/tree.c +++ b/tree.c @@ -6603,10 +6603,10 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, (cur->type == XML_ELEMENT_NODE) && (xmlStrEqual(cur->name, BAD_CAST "html"))) { if (encoding != NULL) - htmlSetMetaEncoding((htmlDocPtr) cur, + htmlSetMetaEncoding((htmlDocPtr) doc, (const xmlChar *) encoding); else - htmlSetMetaEncoding((htmlDocPtr) cur, BAD_CAST "UTF-8"); + htmlSetMetaEncoding((htmlDocPtr) doc, BAD_CAST "UTF-8"); } } diff --git a/win32/Makefile.mingw b/win32/Makefile.mingw index 2e49167c..2a7d5550 100644 --- a/win32/Makefile.mingw +++ b/win32/Makefile.mingw @@ -10,7 +10,7 @@ # a 'nmake clean' and then a 'nmake all'. # nmake install to install the library and its header files. # -# November 2002, Igor Zlatkovic +# November 2002, Igor Zlatkovic AUTOCONF = .\config.mingw diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc index 87064adf..a7237460 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc @@ -10,7 +10,7 @@ # a 'nmake clean' and then a 'nmake all'. # nmake install to install the library and its header files. # -# March 2002, Igor Zlatkovic +# March 2002, Igor Zlatkovic AUTOCONF = .\config.msvc diff --git a/win32/Readme.txt b/win32/Readme.txt index bd3f1732..ba909c0e 100644 --- a/win32/Readme.txt +++ b/win32/Readme.txt @@ -129,5 +129,5 @@ possible, and there is also a chance that support exists for IDEs which I have never seen. -November 2002, Igor Zlatkovic +November 2002, Igor Zlatkovic diff --git a/win32/configure.js b/win32/configure.js index c3eaaffa..14617fae 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -4,7 +4,7 @@ * Run it with an 'help', or an invalid option and it will tell you what options * it accepts. * - * March 2002, Igor Zlatkovic + * March 2002, Igor Zlatkovic */ /* The source directory, relative to the one where this file resides. */ @@ -330,7 +330,7 @@ function genReadme(bname, ver, file) f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using"); f.WriteLine("the address below."); f.WriteBlankLines(1); - f.WriteLine(" Igor Zlatkovic (igor@stud.fh-frankfurt.de)"); + f.WriteLine(" Igor Zlatkovic (igor@zlatkovic.com)"); f.Close(); } diff --git a/win32/libxml2.def.src b/win32/libxml2.def.src index 8bc13db1..01a4a093 100644 --- a/win32/libxml2.def.src +++ b/win32/libxml2.def.src @@ -13,7 +13,7 @@ from the libxml2.dll, its name is most certainly missing here. Add the name of the offending function to this file and rebuild. - 21.03.2001, Igor Zlatkovic (igor@stud.fh-frankfurt.de) + 21.03.2001, Igor Zlatkovic (igor@zlatkovic.com) */ #define LIBXML2_COMPILING_MSCCDEF diff --git a/xmlreader.c b/xmlreader.c index 68632c6a..254fd544 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -87,6 +87,7 @@ struct _xmlTextReader { xmlNodePtr node; /* current node */ xmlNodePtr curnode;/* current attribute node */ int depth; /* depth of the current node */ + xmlNodePtr faketext;/* fake xmlNs chld */ }; #ifdef DEBUG_READER @@ -436,6 +437,62 @@ xmlTextReaderReadString(xmlTextReaderPtr reader) { return(NULL); } +/** + * xmlTextReaderReadBase64: + * @reader: the xmlTextReaderPtr used + * @array: a byte array to store the content. + * @offset: the zero-based index into array where the method should + * begin to write. + * @len: the number of bytes to write. + * + * Reads and decodes the Base64 encoded contents of an element and + * stores the result in a byte buffer. + * + * Returns the number of bytes written to array, or zero if the current + * instance is not positioned on an element or -1 in case of error. + */ +int +xmlTextReaderReadBase64(xmlTextReaderPtr reader, unsigned char *array, + int offset, int len) { + if ((reader == NULL) || (reader->ctxt == NULL)) + return(-1); + if (reader->ctxt->wellFormed != 1) + return(-1); + + if ((reader->node == NULL) || (reader->node->type == XML_ELEMENT_NODE)) + return(0); + TODO + return(0); +} + +/** + * xmlTextReaderReadBinHex: + * @reader: the xmlTextReaderPtr used + * @array: a byte array to store the content. + * @offset: the zero-based index into array where the method should + * begin to write. + * @len: the number of bytes to write. + * + * Reads and decodes the BinHex encoded contents of an element and + * stores the result in a byte buffer. + * + * Returns the number of bytes written to array, or zero if the current + * instance is not positioned on an element or -1 in case of error. + */ +int +xmlTextReaderReadBinHex(xmlTextReaderPtr reader, unsigned char *array, + int offset, int len) { + if ((reader == NULL) || (reader->ctxt == NULL)) + return(-1); + if (reader->ctxt->wellFormed != 1) + return(-1); + + if ((reader->node == NULL) || (reader->node->type == XML_ELEMENT_NODE)) + return(0); + TODO + return(0); +} + /************************************************************************ * * * Constructor and destructors * @@ -544,6 +601,9 @@ xmlFreeTextReader(xmlTextReaderPtr reader) { xmlFree(reader->sax); if ((reader->input != NULL) && (reader->allocs & XML_TEXTREADER_INPUT)) xmlFreeParserInputBuffer(reader->input); + if (reader->faketext != NULL) { + xmlFreeNode(reader->faketext); + } xmlFree(reader); } @@ -1082,6 +1142,48 @@ xmlTextReaderMoveToElement(xmlTextReaderPtr reader) { return(0); } +/** + * xmlTextReaderReadAttributeValue: + * @reader: the xmlTextReaderPtr used + * + * Parses an attribute value into one or more Text and EntityReference nodes. + * + * Returns 1 in case of success, 0 if the reader was not positionned on an + * ttribute node or all the attribute values have been read, or -1 + * in case of error. + */ +int +xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) { + if (reader == NULL) + return(-1); + if (reader->node == NULL) + return(-1); + if (reader->curnode == NULL) + return(0); + if (reader->curnode->type == XML_ATTRIBUTE_NODE) { + if (reader->curnode->children == NULL) + return(0); + reader->curnode = reader->curnode->children; + } else if (reader->curnode->type == XML_NAMESPACE_DECL) { + xmlNsPtr ns = (xmlNsPtr) reader->curnode; + + if (reader->faketext == NULL) { + reader->faketext = xmlNewDocText(reader->node->doc, + ns->href); + } else { + if (reader->faketext->content != NULL) + xmlFree(reader->faketext->content); + reader->faketext->content = xmlStrdup(ns->href); + } + reader->curnode = reader->faketext; + } else { + if (reader->curnode->next == NULL) + return(0); + reader->curnode = reader->curnode->next; + } + return(1); +} + /************************************************************************ * * * Acces API to the current node * @@ -1412,6 +1514,12 @@ xmlTextReaderDepth(xmlTextReaderPtr reader) { if (reader->node == NULL) return(0); + if (reader->curnode != NULL) { + if ((reader->curnode->type == XML_ATTRIBUTE_NODE) || + (reader->curnode->type == XML_NAMESPACE_DECL)) + return(reader->depth + 1); + return(reader->depth + 2); + } return(reader->depth); } @@ -1589,3 +1697,272 @@ xmlTextReaderNormalization(xmlTextReaderPtr reader) { return(1); } +/************************************************************************ + * * + * Extensions to the base APIs * + * * + ************************************************************************/ + +/** + * xmlTextReaderSetParserProp: + * @reader: the xmlTextReaderPtr used + * @prop: the xmlParserProperties to set + * @value: usually 0 or 1 to (de)activate it + * + * Change the parser processing behaviour by changing some of its internal + * properties. Note that some properties can only be changed before any + * read has been done. + * + * Returns 0 if the call was successful, or -1 in case of error + */ +int +xmlTextReaderSetParserProp(xmlTextReaderPtr reader, int prop, int value) { + xmlParserProperties p = (xmlParserProperties) prop; + xmlParserCtxtPtr ctxt; + + if ((reader == NULL) || (reader->ctxt == NULL)) + return(-1); + ctxt = reader->ctxt; + + switch (p) { + case XML_PARSER_LOADDTD: + if (value != 0) { + if (ctxt->loadsubset == 0) { + if (reader->mode != XML_TEXTREADER_MODE_INITIAL) + return(-1); + ctxt->loadsubset = XML_DETECT_IDS; + } + } else { + ctxt->loadsubset = 0; + } + return(0); + case XML_PARSER_DEFAULTATTRS: + if (value != 0) { + ctxt->loadsubset |= XML_COMPLETE_ATTRS; + } else { + if (ctxt->loadsubset & XML_COMPLETE_ATTRS) + ctxt->loadsubset -= XML_COMPLETE_ATTRS; + } + return(0); + case XML_PARSER_VALIDATE: + if (value != 0) { + ctxt->validate = 1; + } else { + ctxt->validate = 0; + } + return(0); + } + return(-1); +} + +/** + * xmlTextReaderGetParserProp: + * @reader: the xmlTextReaderPtr used + * @prop: the xmlParserProperties to get + * + * Read the parser internal property. + * + * Returns the value, usually 0 or 1, or -1 in case of error. + */ +int +xmlTextReaderGetParserProp(xmlTextReaderPtr reader, int prop) { + xmlParserProperties p = (xmlParserProperties) prop; + xmlParserCtxtPtr ctxt; + + if ((reader == NULL) || (reader->ctxt == NULL)) + return(-1); + ctxt = reader->ctxt; + + switch (p) { + case XML_PARSER_LOADDTD: + if ((ctxt->loadsubset != 0) || (ctxt->validate != 0)) + return(1); + return(0); + case XML_PARSER_DEFAULTATTRS: + if (ctxt->loadsubset & XML_COMPLETE_ATTRS) + return(1); + return(0); + case XML_PARSER_VALIDATE: + return(ctxt->validate); + } + return(-1); +} + +/************************************************************************ + * * + * Utilities * + * * + ************************************************************************/ +/** + * xmlBase64Decode: + * @in: the input buffer + * @inlen: the size of the input (in), the size read from it (out) + * @to: the output buffer + * @tolen: the size of the output (in), the size written to (out) + * + * Base64 decoder, reads from @in and save in @to + * + * Returns 0 if all the input was consumer, 1 if the Base64 end was reached, + * 2 if there wasn't enough space on the output or -1 in case of error. + */ +static int +xmlBase64Decode(const unsigned char *in, unsigned long *inlen, + unsigned char *to, unsigned long *tolen) { + unsigned long incur; /* current index in in[] */ + unsigned long inblk; /* last block index in in[] */ + unsigned long outcur; /* current index in out[] */ + unsigned long inmax; /* size of in[] */ + unsigned long outmax; /* size of out[] */ + unsigned char cur; /* the current value read from in[] */ + unsigned char intmp[3], outtmp[4]; /* temporary buffers for the convert */ + int nbintmp; /* number of byte in intmp[] */ + int is_ignore; /* cur should be ignored */ + int is_end = 0; /* the end of the base64 was found */ + int retval = 1; + int i; + + if ((in == NULL) || (inlen == NULL) || (to == NULL) || (tolen == NULL)) + return(-1); + + incur = 0; + inblk = 0; + outcur = 0; + inmax = *inlen; + outmax = *tolen; + nbintmp = 0; + + while (1) { + if (incur >= inmax) + break; + cur = in[incur++]; + is_ignore = 0; + if ((cur >= 'A') && (cur <= 'Z')) + cur = cur - 'A'; + else if ((cur >= 'a') && (cur <= 'z')) + cur = cur - 'a' + 26; + else if ((cur >= '0') && (cur <= '9')) + cur = cur - '0' + 52; + else if (cur == '+') + cur = 62; + else if (cur == '/') + cur = 63; + else if (cur == '.') + cur = 0; + else if (cur == '=') /*no op , end of the base64 stream */ + is_end = 1; + else { + is_ignore = 1; + if (nbintmp == 0) + inblk = incur; + } + + if (!is_ignore) { + int nbouttmp = 3; + int is_break = 0; + + if (is_end) { + if (nbintmp == 0) + break; + if ((nbintmp == 1) || (nbintmp == 2)) + nbouttmp = 1; + else + nbouttmp = 2; + nbintmp = 3; + is_break = 1; + } + intmp[nbintmp++] = cur; + /* + * if intmp is full, push the 4byte sequence as a 3 byte + * sequence out + */ + if (nbintmp == 4) { + nbintmp = 0; + outtmp[0] = (intmp[0] << 2) | ((intmp[1] & 0x30) >> 4); + outtmp[1] = + ((intmp[1] & 0x0F) << 4) | ((intmp[2] & 0x3C) >> 2); + outtmp[2] = ((intmp[2] & 0x03) << 6) | (intmp[3] & 0x3F); + if (outcur + 3 >= outmax) { + retval = 2; + break; + } + + for (i = 0; i < nbouttmp; i++) + to[outcur++] = outtmp[i]; + inblk = incur; + } + + if (is_break) { + retval = 0; + break; + } + } + } + + *tolen = outcur; + *inlen = inblk; + return (retval); +} + +/* + * Test routine for the xmlBase64Decode function + */ +#if 0 +int main(int argc, char **argv) { + char *input = " VW4 gcGV0 \n aXQgdGVzdCAuCg== "; + char output[100]; + char output2[100]; + char output3[100]; + unsigned long inlen = strlen(input); + unsigned long outlen = 100; + int ret; + unsigned long cons, tmp, tmp2, prod; + + /* + * Direct + */ + ret = xmlBase64Decode(input, &inlen, output, &outlen); + + output[outlen] = 0; + printf("ret: %d, inlen: %ld , outlen: %ld, output: '%s'\n", ret, inlen, outlen, output); + + /* + * output chunking + */ + cons = 0; + prod = 0; + while (cons < inlen) { + tmp = 5; + tmp2 = inlen - cons; + + printf("%ld %ld\n", cons, prod); + ret = xmlBase64Decode(&input[cons], &tmp2, &output2[prod], &tmp); + cons += tmp2; + prod += tmp; + printf("%ld %ld\n", cons, prod); + } + output2[outlen] = 0; + printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons, prod, output2); + + /* + * input chunking + */ + cons = 0; + prod = 0; + while (cons < inlen) { + tmp = 100 - prod; + tmp2 = inlen - cons; + if (tmp2 > 5) + tmp2 = 5; + + printf("%ld %ld\n", cons, prod); + ret = xmlBase64Decode(&input[cons], &tmp2, &output3[prod], &tmp); + cons += tmp2; + prod += tmp; + printf("%ld %ld\n", cons, prod); + } + output3[outlen] = 0; + printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons, prod, output3); + return(0); + +} +#endif