From 17049f05f9ef09b3dc2a9c5d1de3f21de7c03193 Mon Sep 17 00:00:00 2001
From: Mike Hommey
Date: Tue, 13 Sep 2005 09:58:33 +0000
Subject: Load /tmp/tmp.2Zlqcz/libxml2-2.6.22 into
packages/libxml2/branches/upstream/current.
---
doc/devhelp/libxml2-schematron.html | 160 ++++++++++++++++++++++++++++++++++++
1 file changed, 160 insertions(+)
create mode 100644 doc/devhelp/libxml2-schematron.html
(limited to 'doc/devhelp/libxml2-schematron.html')
diff --git a/doc/devhelp/libxml2-schematron.html b/doc/devhelp/libxml2-schematron.html
new file mode 100644
index 0000000..995d96a
--- /dev/null
+++ b/doc/devhelp/libxml2-schematron.html
@@ -0,0 +1,160 @@
+
+
+
+
+ schematron: XML Schemastron implementation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ libxml2 Reference Manual
+
+
+
+ schematron
+
+ schematron - XML Schemastron implementation
+ interface to the XML Schematron validity checking.
+ Author(s): Daniel Veillard
+
+
+
Description
+
+
+
Details
+
+
struct _xmlSchematron {
+The content of this structure is not made public by the API.
+} xmlSchematron;
+
+
+
+
Structure xmlSchematronParserCtxtstruct _xmlSchematronParserCtxt {
+The content of this structure is not made public by the API.
+} xmlSchematronParserCtxt;
+
+
+
+
+
+
+
+
Structure xmlSchematronValidCtxtstruct _xmlSchematronValidCtxt {
+The content of this structure is not made public by the API.
+} xmlSchematronValidCtxt;
+
+
+
+
+
+
+
+
Function type xmlSchematronValidityErrorFuncvoid xmlSchematronValidityErrorFunc (void * ctx, const char * msg, ... ...)
+
+
+
+
Function type xmlSchematronValidityWarningFuncvoid xmlSchematronValidityWarningFunc (void * ctx, const char * msg, ... ...)
+
+
+
+
xmlSchematronFree ()void xmlSchematronFree (xmlSchematronPtr schema)
+ Deallocate a Schematron structure.
+
schema :a schema structure
+
+
xmlSchematronFreeParserCtxt ()void xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt)
+ Free the resources associated to the schema parser context
+
ctxt :the schema parser context
+
+
xmlSchematronFreeValidCtxt ()void xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt)
+ Free the resources associated to the schema validation context
+
ctxt :the schema validation context
+
+
xmlSchematronNewDocParserCtxt ()xmlSchematronParserCtxtPtr xmlSchematronNewDocParserCtxt (xmlDocPtr doc)
+Create an XML Schematrons parse context for that document. NB. The document may be modified during the parsing process.
+
doc :a preparsed document tree Returns :the parser context or NULL in case of error
+
+
xmlSchematronNewMemParserCtxt ()xmlSchematronParserCtxtPtr xmlSchematronNewMemParserCtxt (const char * buffer, int size)
+Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file.
+
buffer :a pointer to a char array containing the schemas size :the size of the array Returns :the parser context or NULL in case of error
+
+
xmlSchematronNewParserCtxt ()xmlSchematronParserCtxtPtr xmlSchematronNewParserCtxt (const char * URL)
+Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file.
+
URL :the location of the schema Returns :the parser context or NULL in case of error
+
+
+
+
xmlSchematronParse ()xmlSchematronPtr xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt)
+parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.
+
ctxt :a schema validation context Returns :the internal XML Schematron structure built from the resource or NULL in case of error
+
+
xmlSchematronValidateDoc ()int xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
+ Validate a tree instance against the schematron
+
ctxt :the schema validation context instance :the document instace tree Returns :0 in case of success, -1 in case of internal error and an error count otherwise.
+
+
+
+
+
--
cgit v1.2.3
From 88f9c7ca80bfbc9a5429fc632b90d6c4a2a2787d Mon Sep 17 00:00:00 2001
From: Mike Hommey
Date: Wed, 9 Apr 2008 10:33:41 +0200
Subject: Load /tmp/libxml2-2.6.32 into libxml2/branches/upstream/current.
---
ChangeLog | 301 +
HTMLparser.c | 39 +-
SAX2.c | 4 +-
config.h.in | 3 +
configure | 76 +-
configure.in | 25 +-
debugXML.c | 4 +-
dict.c | 9 +-
doc/APIchunk1.html | 4 +-
doc/APIchunk10.html | 7 +-
doc/APIchunk11.html | 3 -
doc/APIchunk12.html | 5 +-
doc/APIchunk13.html | 3 +-
doc/APIchunk14.html | 1 +
doc/APIchunk15.html | 2 +
doc/APIchunk16.html | 1 +
doc/APIchunk17.html | 1 +
doc/APIchunk19.html | 3 +-
doc/APIchunk21.html | 2 +
doc/APIchunk22.html | 2 +-
doc/APIchunk23.html | 3 +-
doc/APIchunk24.html | 5 +
doc/APIchunk25.html | 2 +
doc/APIchunk27.html | 1 +
doc/APIchunk28.html | 1 +
doc/APIchunk5.html | 1 +
doc/APIchunk7.html | 4 +-
doc/APIfiles.html | 6 +
doc/APIfunctions.html | 3 +
doc/APIsymbols.html | 6 +
doc/devhelp/libxml2-parser.html | 16 +-
doc/devhelp/libxml2-schematron.html | 6 +
doc/devhelp/libxml2-xmlerror.html | 6 +-
doc/devhelp/libxml2-xmlreader.html | 2 +-
doc/devhelp/libxml2-xmlwriter.html | 4 +-
doc/devhelp/libxml2.devhelp | 6 +
doc/elfgcchack.xsl | 2 +-
doc/examples/Makefile.am | 121 +-
doc/examples/Makefile.in | 121 +-
doc/examples/examples.xml | 787 +-
doc/html/book1.html | 2 +-
doc/html/index.html | 2 +-
doc/html/libxml-DOCBparser.html | 2 +-
doc/html/libxml-HTMLparser.html | 2 +-
doc/html/libxml-HTMLtree.html | 2 +-
doc/html/libxml-SAX.html | 2 +-
doc/html/libxml-SAX2.html | 2 +-
doc/html/libxml-c14n.html | 2 +-
doc/html/libxml-catalog.html | 2 +-
doc/html/libxml-chvalid.html | 2 +-
doc/html/libxml-debugXML.html | 2 +-
doc/html/libxml-dict.html | 2 +-
doc/html/libxml-encoding.html | 2 +-
doc/html/libxml-entities.html | 2 +-
doc/html/libxml-globals.html | 2 +-
doc/html/libxml-hash.html | 2 +-
doc/html/libxml-lib.html | 2 +-
doc/html/libxml-list.html | 2 +-
doc/html/libxml-nanoftp.html | 2 +-
doc/html/libxml-nanohttp.html | 2 +-
doc/html/libxml-parser.html | 18 +-
doc/html/libxml-parserInternals.html | 2 +-
doc/html/libxml-pattern.html | 2 +-
doc/html/libxml-relaxng.html | 2 +-
doc/html/libxml-schemasInternals.html | 2 +-
doc/html/libxml-schematron.html | 8 +-
doc/html/libxml-threads.html | 2 +-
doc/html/libxml-tree.html | 2 +-
doc/html/libxml-uri.html | 2 +-
doc/html/libxml-valid.html | 2 +-
doc/html/libxml-xinclude.html | 2 +-
doc/html/libxml-xlink.html | 2 +-
doc/html/libxml-xmlIO.html | 2 +-
doc/html/libxml-xmlautomata.html | 2 +-
doc/html/libxml-xmlerror.html | 6 +-
doc/html/libxml-xmlexports.html | 2 +-
doc/html/libxml-xmlmemory.html | 2 +-
doc/html/libxml-xmlmodule.html | 2 +-
doc/html/libxml-xmlreader.html | 4 +-
doc/html/libxml-xmlregexp.html | 2 +-
doc/html/libxml-xmlsave.html | 2 +-
doc/html/libxml-xmlschemas.html | 2 +-
doc/html/libxml-xmlschemastypes.html | 2 +-
doc/html/libxml-xmlstring.html | 2 +-
doc/html/libxml-xmlunicode.html | 2 +-
doc/html/libxml-xmlversion.html | 2 +-
doc/html/libxml-xmlwriter.html | 6 +-
doc/html/libxml-xpath.html | 2 +-
doc/html/libxml-xpathInternals.html | 2 +-
doc/html/libxml-xpointer.html | 2 +-
doc/libxml2-api.xml | 43 +-
doc/libxml2.xsa | 31 +-
doc/newapi.xsl | 4 +-
doc/news.html | 35 +-
doc/xml.html | 72 +-
doc/xmlmem.html | 33 +-
elfgcchack.h | 12 +
encoding.c | 11 +-
error.c | 2 +-
globals.c | 2 +-
include/libxml/schematron.h | 3 +-
include/libxml/threads.h | 30 +-
include/libxml/xmlerror.h | 6 +-
include/libxml/xmlversion.h | 8 +-
include/libxml/xpath.h | 3 +
include/win32config.h | 6 +
libxml2.spec | 6 +-
macos/src/XMLTestPrefix.h.orig | 1 +
nanohttp.c | 10 +
parser.c | 490 +-
python/Makefile.am | 46 +-
python/Makefile.in | 162 +-
python/generator.py | 3 +
python/libxml2-py.c | 14572 --------------------------------
python/setup.py | 2 +-
python/tests/Makefile.am | 18 +-
python/tests/Makefile.in | 71 +-
python/tests/xpathns.py | 29 +
python/types.c | 32 +-
schematron.c | 76 +-
testModule.c | 9 +
testRegexp.c | 19 +-
testapi.c | 13 +-
threads.c | 460 +-
tree.c | 42 +-
uri.c | 29 +
vms/build_libxml.com | 45 +-
win32/Makefile.msvc | 14 +-
win32/Makefile.msvc.orig | 462 +
win32/libxml2.def.src | 2 +
xinclude.c | 23 +-
xmlIO.c | 11 +
xmlmodule.c | 2 +-
xmlreader.c | 7 +-
xmlregexp.c | 25 +-
xmlsave.c | 32 +-
xmlschemas.c | 14 +-
xmlschemastypes.c | 13 +-
xmlwriter.c | 9 +-
xpath.c | 32 +-
xstc/Makefile.am | 5 +-
xstc/Makefile.in | 12 +-
142 files changed, 3174 insertions(+), 15655 deletions(-)
create mode 100644 macos/src/XMLTestPrefix.h.orig
delete mode 100644 python/libxml2-py.c
create mode 100755 python/tests/xpathns.py
create mode 100644 win32/Makefile.msvc.orig
(limited to 'doc/devhelp/libxml2-schematron.html')
diff --git a/ChangeLog b/ChangeLog
index bacb7a8..4da35e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,304 @@
+Tue Apr 8 10:19:01 CEST 2008 Daniel Veillard
+
+ * tree.c: fix a bug introduced when fixing #438208 and reported by
+ Ashwin
+ * python/generator.py: fix an infinite loop bug
+
+Mon Apr 7 14:44:51 CEST 2008 Daniel Veillard
+
+ * xmlreader.c: fix a link to XmlNodeType doc reported by Martijn Arts
+ * docs/*: rebuilt
+
+Fri Apr 4 18:09:50 CEST 2008 Daniel Veillard
+
+ * parser.c: improve the *Recover* functions documentation
+
+Thu Apr 3 14:57:15 CEST 2008 Daniel Veillard
+
+ * parser.c: patch from Mark Rowe fixing BOM or encoding detection
+ in external parsed entities, should fix #440415
+
+Thu Apr 3 13:16:01 CEST 2008 Daniel Veillard
+
+ * tree.c: fix some problems with the *EatName functions when
+ running out of memory raised by Eric Schrock , should fix #438208
+
+Thu Apr 3 12:41:29 CEST 2008 Daniel Veillard
+
+ * xmlschemastypes.c: horror around the definition of the lexical
+ values for decimal and derived types, fixing to reject empty
+ values, should fix #503268
+
+Thu Apr 3 11:44:57 CEST 2008 Daniel Veillard
+
+ * encoding.c: buffer may not be large enough to convert to
+ UCS4, patch from Christian Fruth , fixes #504015
+
+Thu Apr 3 11:02:02 CEST 2008 Daniel Veillard
+
+ * HTMLparser.c: apparently it's okay to forget the semicolumn after
+ entity refs in HTML, fixing char refs parsing accordingly based on
+ T. Manske patch, this should fix #517653
+
+Thu Apr 3 09:30:29 CEST 2008 Daniel Veillard
+
+ * error.c: avoid a scary realloc() loop should fix #520383
+
+Thu Apr 3 08:22:52 CEST 2008 Daniel Veillard
+
+ * parser.c: more realloc problems pointed out by Ashwin
+
+Thu Apr 3 07:40:13 CEST 2008 Daniel Veillard
+
+ * xstc/Makefile.am: applied patch from Mike Hommey fixing distclean,
+ fixes #520387
+
+Thu Apr 3 06:52:32 CEST 2008 Daniel Veillard
+
+ * include/libxml/xpath.h: small doc improvement for xmlXPathContext
+ from Jack Jansen, fixes #524759
+ * doc/newapi.xsl doc/*: fixed a problem and regenerated the docs
+
+Tue Apr 1 09:59:22 CEST 2008 Daniel Veillard
+
+ * xpath.c: two patches from Alvaro Herrera to avoid problem when
+ running out of memory in XPath evaluations.
+
+Mon Mar 31 11:23:19 CEST 2008 Daniel Veillard
+
+ * parser.c: lot of out of memory handling fixes from Ashwin
+ * elfgcchack.h doc/elfgcchack.xsl: work around a problem with xmlDllMain
+ * include/libxml/threads.h: indenting cleanups
+
+Mon Mar 31 10:25:37 CEST 2008 Daniel Veillard
+
+ * parser.c docs/*: trying to clarify even more the xmlCleanupParser()
+ use and the memory documentation
+
+Wed Mar 26 18:39:58 CET 2008 Daniel Veillard
+
+ * parser.c: changes based on Alex Khesin patch where xmlParseCharRef
+ seems to not be checked correctly, fixes #520198
+
+Wed Mar 26 15:03:49 CET 2008 Daniel Veillard
+
+ * parser.c: patch from Ashwin to avoid a problem of attribute
+ redefinition in the DTD. Remove a warning too.
+
+Wed Mar 26 14:38:31 CET 2008 Daniel Veillard
+
+ * xmlschemas.c: fix a problem in externalSubsetSplit with a patch
+ from Ashwin
+
+Tue Mar 25 17:48:02 CET 2008 Daniel Veillard
+
+ * parser.c: fix various attribute normalisation problems reported
+ by Ashwin
+ * result/c14n/without-comments/example-4
+ result/c14n/with-comments/example-4: this impacted the result of
+ two c14n tests :-\
+ * test/att9 test/att10 test/att11 result//att9* result//att10*
+ result//att11*: added 3 specific regression tests coming from the
+ XML spec revision and from Ashwin
+
+Tue Mar 25 14:20:49 CET 2008 Daniel Veillard
+
+ * uri.c: fix saving for file:///X:/ URI embedding Windows file paths
+ should fix #524253
+
+Mon Mar 24 21:42:33 CET 2008 Daniel Veillard
+
+ * parser.c: fix a problem reported by Ashwin for system parameter
+ entities referenced from entities in external subset, add a
+ specific loading routine.
+ * test/valid/dtds/external.ent test/valid/dtds/external2.ent
+ test/valid/t11.xml result/valid/t11.xml*: added the test to
+ the regression suite
+
+Mon Mar 24 15:04:54 CET 2008 Daniel Veillard
+
+ * xmlschemas.c: fix an XML Schemas crash raised by Stefan Behnel
+ when testing with W3C test suite
+
+Mon Mar 24 12:12:00 CET 2008 Daniel Veillard
+
+ * threads.c: check some allocation with Ashwin patch
+
+Wed Mar 19 16:41:52 CET 2008 Daniel Veillard
+
+ * vms/build_libxml.com: update from Tycho Hilhorst, should fix #523378
+
+Tue Mar 18 09:23:05 CET 2008 Daniel Veillard
+
+ * threads.c: check some malloc returns with Ashwin patch, add
+ error messages and reindent the module.
+
+Fri Mar 14 15:28:43 CET 2008 Daniel Veillard
+
+ * xmlreader.c: patch from Ashwin removing duplicate tests
+
+Fri Mar 14 13:44:29 CET 2008 Daniel Veillard
+
+ * include/libxml/schematron.h include/libxml/xmlerror.h schematron.c:
+ applied patch from Tobias Minich to allow plugin schematron error
+ reporting in the normal error system, should fix #513998
+
+Fri Mar 14 11:52:09 CET 2008 Daniel Veillard
+
+ * parser.c xinclude.c: patch from Vasily Chekalkin fixes memory
+ leaks, should fix 512647
+
+Thu Mar 13 08:17:58 CET 2008 Daniel Veillard
+
+ * xmlregexp.c: found a nasty bug in regexp automata build,
+ reported by Ashwin and Bjorn Reese
+
+Wed Mar 12 18:56:22 CET 2008 Daniel Veillard
+
+ * HTMLparser.c: patch from Arnold Hendriks improving parsing of
+ html within html bogus data, still not a complete fix though
+
+Wed Mar 12 10:22:01 CET 2008 Daniel Veillard
+
+ * python/types.c: fix a memory errro when using namespace nodes
+ returned from XPath queries, should fix #521699
+ * python/tests/Makefile.am python/tests/xpathns.py: add a specific
+ regression test for it
+
+Mon Mar 10 16:25:32 CET 2008 Rob Richards
+
+ * include/win32config.h: add ICONV_CONST define for win32 build
+ to satisfy encoding.c change in rev 3693
+
+Fri Mar 7 17:45:27 CET 2008 Daniel Veillard
+
+ * xmlsave.c parser.c: fix handling of empty CDATA nodes as
+ reported and discussed around #514181 and associated patches
+ * test/emptycdata.xml result/emptycdata.xml*
+ result/noent/emptycdata.xml: added a specific test in the
+ regression suite.
+
+Thu Mar 6 15:23:10 CET 2008 Daniel Veillard
+
+ * encoding.c: poblem with encoding detection for UTF-16 reported by
+ Ashwin and found by Bill
+ * test/valid/dtds/utf16b.ent test/valid/dtds/utf16l.ent
+ test/valid/UTF16Entity.xml result/valid/UTF16Entity.xml*: added
+ the example to the regression tests
+
+Tue Mar 4 14:16:38 CET 2008 Daniel Veillard
+
+ * xmlwriter.c: patch from Alex Khesin fixing CDATA output after
+ a text node.
+ * parser.c: fixed the comment for xmlParserCleanup
+ * globals.c: fixed indentation
+
+Mon Feb 25 16:42:19 CET 2008 Daniel Veillard
+
+ * testModule.c: patch from Florent Guiliani to fix build on
+ SCO OpenServer
+
+Thu Feb 21 22:46:08 CET 2008 Daniel Veillard
+
+ * debugXML.c: made one of the changes suggested by Brian Krahmer
+ * testRegexp.c: allow to pass '--' on the command line to allow
+ regexps starting with the character '-'
+
+Tue Feb 19 08:49:32 CET 2008 Daniel Veillard
+
+ * python/Makefile.am python/tests/Makefile.am: applied cleanup
+ patches for cross compilation and MinGW from Roumen Petrov
+
+Sat Feb 16 11:06:54 CET 2008 Daniel Veillard
+
+ * xmlIO.c: fix output bug reported by Petr Pajas and analyzed by
+ Bill
+
+Fri Feb 15 09:32:11 CET 2008 Daniel Veillard
+
+ * include/libxml/xmlerror.h tree.c: patch from Julien Charbon
+ to simplify the processing of xmlSetProp()
+
+Fri Feb 15 08:45:32 CET 2008 Daniel Veillard
+
+ * config.h.in configure.in encoding.c: patch from Roumen Petrov
+ to detect if iconv() needs a const for the second parameter
+
+Fri Feb 15 08:41:31 CET 2008 Daniel Veillard
+
+ * macos/src/XMLTestPrefix2.h win32/Makefile.msvc: EOL cleanups
+ from Florent Guiliani
+
+Wed Feb 13 10:56:38 CET 2008 Daniel Veillard
+
+ * xmlwriter.c: applied patch from Alfred Mickautsch to flush the
+ output at the end of document.
+
+Fri Feb 8 11:57:03 CET 2008 Daniel Veillard
+
+ * doc/examples/examples.xml: regenerated, it was truncated.
+
+Fri Feb 8 11:47:18 CET 2008 Daniel Veillard
+
+ * xmlmodule.c: apply simple patch from Carlo Bramini to avoid
+ compilation problems with Mingw32
+
+Fri Feb 8 11:33:15 CET 2008 Daniel Veillard
+
+ * xmlregexp.c: apply patch from Andrew Tosh to fix behaviour
+ when '.' is used in a posCharGroup
+ * test/schemas/poschargrp0_0.* result/schemas/poschargrp0_0_0*:
+ added the test to the regression suite
+
+Fri Feb 8 10:54:09 CET 2008 Daniel Veillard
+
+ * dict.c: applied patch from Florent Guilian to remove an
+ useless mutex in the xmlDict structure.
+
+Wed Feb 6 17:00:20 CET 2008 Daniel Veillard
+
+ * SAX2.c: another leak reported by Ashwin
+ * xinclude.c: fixed the behaviour when XIncluding a fragment
+ of the current document, patch from Chris Ryan
+
+Wed Feb 6 12:10:08 HKT 2008 William Brack
+
+ * nanohttp.c: added space for port number (when not 80) in
+ xmlNanoHTTPMethodRedir, plus a few more comments. Should
+ fix #514521.
+
+Tue Feb 5 09:41:46 CET 2008 Daniel Veillard
+
+ * schemas.c: apply fix suggested by Ashwin correcting a cut-n-paste
+ error about the SAX callback in cdataBlockSplit when streaming
+ XSD validation
+
+Tue Feb 5 09:36:46 CET 2008 Daniel Veillard
+
+ * uri.c: applied a patch based on Petr Sumbera one to avoid a
+ problem with paths starting with //
+
+Mon Feb 4 17:48:30 CET 2008 Daniel Veillard
+
+ * doc/xml.html doc/xmlmem.html: added a small section on returning
+ memory to the kernel by compacting the heap provided by Wolfram Sang
+
+Fri Jan 25 20:01:42 CET 2007 Rob Richards
+
+ * include/win32config.h win32/Makefile.msvc: fix build under VS 2008.
+ patch by David Wimsey
+
+Thu Jan 24 15:37:04 CET 2008 Daniel Veillard
+
+ * parser.c: fix a memeory leak in internal subset parsing with
+ a fix from Ashwin
+ * test/errors/content1.xml result/errors/content1.xml*:
+ add test to regressions
+
+Fri Jan 11 09:00:09 CET 2008 Daniel Veillard
+
+ * configure.in doc/*: preparing release of 2.6.31
+
Fri Jan 11 08:58:49 CET 2008 Daniel Veillard
* parser.c: avoid a warning on 64bits introduced earlier
diff --git a/HTMLparser.c b/HTMLparser.c
index 38af5e3..92503a1 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3115,9 +3115,9 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
val = val * 16 + (CUR - 'A') + 10;
else {
htmlParseErr(ctxt, XML_ERR_INVALID_HEX_CHARREF,
- "htmlParseCharRef: invalid hexadecimal value\n",
+ "htmlParseCharRef: missing semicolumn\n",
NULL, NULL);
- return(0);
+ break;
}
NEXT;
}
@@ -3130,9 +3130,9 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
val = val * 10 + (CUR - '0');
else {
htmlParseErr(ctxt, XML_ERR_INVALID_DEC_CHARREF,
- "htmlParseCharRef: invalid decimal value\n",
+ "htmlParseCharRef: missing semicolumn\n",
NULL, NULL);
- return(0);
+ break;
}
NEXT;
}
@@ -3423,7 +3423,7 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) {
*
* [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'
*
- * Returns 0 in case of success and -1 in case of error.
+ * Returns 0 in case of success, -1 in case of error and 1 if discarded
*/
static int
@@ -3436,6 +3436,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
int maxatts;
int meta = 0;
int i;
+ int discardtag = 0;
if ((ctxt == NULL) || (ctxt->input == NULL)) {
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
@@ -3480,14 +3481,14 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
"htmlParseStartTag: misplaced tag\n",
name, NULL);
- return 0;
+ discardtag = 1;
}
if ((ctxt->nameNr != 1) &&
(xmlStrEqual(name, BAD_CAST"head"))) {
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
"htmlParseStartTag: misplaced tag\n",
name, NULL);
- return 0;
+ discardtag = 1;
}
if (xmlStrEqual(name, BAD_CAST"body")) {
int indx;
@@ -3496,9 +3497,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
"htmlParseStartTag: misplaced tag\n",
name, NULL);
- while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
- NEXT;
- return 0;
+ discardtag = 1;
}
}
}
@@ -3597,12 +3596,14 @@ failed:
/*
* SAX: Start of Element !
*/
- htmlnamePush(ctxt, name);
- if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL)) {
- if (nbatts != 0)
- ctxt->sax->startElement(ctxt->userData, name, atts);
- else
- ctxt->sax->startElement(ctxt->userData, name, NULL);
+ if (!discardtag) {
+ htmlnamePush(ctxt, name);
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL)) {
+ if (nbatts != 0)
+ ctxt->sax->startElement(ctxt->userData, name, atts);
+ else
+ ctxt->sax->startElement(ctxt->userData, name, NULL);
+ }
}
if (atts != NULL) {
@@ -3612,7 +3613,7 @@ failed:
}
}
- return 0;
+ return(discardtag);
}
/**
@@ -3991,7 +3992,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
failed = htmlParseStartTag(ctxt);
name = ctxt->name;
- if (failed || (name == NULL)) {
+ if ((failed == -1) || (name == NULL)) {
if (CUR == '>')
NEXT;
return;
@@ -4893,7 +4894,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
failed = htmlParseStartTag(ctxt);
name = ctxt->name;
- if (failed ||
+ if ((failed == -1) ||
(name == NULL)) {
if (CUR == '>')
NEXT;
diff --git a/SAX2.c b/SAX2.c
index 9739831..7dbc2b2 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -2366,7 +2366,9 @@ xmlSAX2Reference(void *ctx, const xmlChar *name)
xmlGenericError(xmlGenericErrorContext,
"add xmlSAX2Reference %s to %s \n", name, ctxt->node->name);
#endif
- xmlAddChild(ctxt->node, ret);
+ if (xmlAddChild(ctxt->node, ret) == NULL) {
+ xmlFreeNode(ret);
+ }
}
/**
diff --git a/config.h.in b/config.h.in
index 1dafc10..f8435d4 100644
--- a/config.h.in
+++ b/config.h.in
@@ -246,6 +246,9 @@
/* Whether __va_copy() is available */
#undef HAVE___VA_COPY
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
/* Name of package */
#undef PACKAGE
diff --git a/configure b/configure
index d02721f..e80c4a9 100755
--- a/configure
+++ b/configure
@@ -2190,7 +2190,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=31
+LIBXML_MICRO_VERSION=32
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
@@ -29049,6 +29049,80 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
fi
+
+ if test "$WITH_ICONV" = "1" ; then
+ { echo "$as_me:$LINENO: checking for iconv declaration" >&5
+echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; }
+ if test "${xml_cv_iconv_arg2+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xml_cv_iconv_arg2=""
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xml_cv_iconv_arg2="const"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+ { echo "$as_me:$LINENO: result: ${xml_xxx:-
+ }$xml_cv_iconv_decl" >&5
+echo "${ECHO_T}${xml_xxx:-
+ }$xml_cv_iconv_decl" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $xml_cv_iconv_arg2
+_ACEOF
+
+ fi
fi
case "$host" in
*mingw*) M_LIBS=""
diff --git a/configure.in b/configure.in
index 699232f..8fc76e5 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=31
+LIBXML_MICRO_VERSION=32
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
@@ -1224,6 +1224,29 @@ iconv (cd, NULL, NULL, NULL, NULL);],[
AC_MSG_RESULT(no)
LIBS="${_libs}"
LDFLAGS="${_ldflags}"])]))
+
+ if test "$WITH_ICONV" = "1" ; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(xml_cv_iconv_arg2, [
+ AC_TRY_COMPILE([#include
+#include
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")])
+
+ xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+ AC_MSG_RESULT([${xml_xxx:-
+ }$xml_cv_iconv_decl])
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $xml_cv_iconv_arg2,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
fi
case "$host" in
*mingw*) M_LIBS=""
diff --git a/debugXML.c b/debugXML.c
index 3985ad3..de6fd6c 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -320,7 +320,8 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
}
if (node->next == NULL) {
if ((node->parent != NULL) && (node->type != XML_ATTRIBUTE_NODE) &&
- (node->parent->last != node))
+ (node->parent->last != node) &&
+ (node->parent->type == XML_ELEMENT_NODE))
xmlDebugErr(ctxt, XML_CHECK_NO_NEXT,
"Node has no next and not last of parent list\n");
} else {
@@ -3244,6 +3245,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
"Unknown command %s\n", command);
}
free(cmdline); /* not xmlFree here ! */
+ cmdline = NULL;
}
#ifdef LIBXML_XPATH_ENABLED
xmlXPathFreeContext(ctxt->pctxt);
diff --git a/dict.c b/dict.c
index 3b4054f..c071887 100644
--- a/dict.c
+++ b/dict.c
@@ -60,7 +60,6 @@ struct _xmlDictStrings {
*/
struct _xmlDict {
int ref_counter;
- xmlRMutexPtr mutex;
struct _xmlDictEntry *dict;
int size;
@@ -337,11 +336,8 @@ xmlDictCreate(void) {
dict->strings = NULL;
dict->subdict = NULL;
if (dict->dict) {
- if ((dict->mutex = xmlNewRMutex()) != NULL) {
- memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry));
- return(dict);
- }
- xmlFree(dict->dict);
+ memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry));
+ return(dict);
}
xmlFree(dict);
}
@@ -545,7 +541,6 @@ xmlDictFree(xmlDictPtr dict) {
xmlFree(pool);
pool = nextp;
}
- xmlFreeRMutex(dict->mutex);
xmlFree(dict);
}
diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html
index 881aedf..bedf943 100644
--- a/doc/APIchunk1.html
+++ b/doc/APIchunk1.html
@@ -119,8 +119,7 @@ A:link, A:visited, A:active { text-decoration: underline }
referenceSAXFunc
startDocumentSAXFunc
startElementSAXFunc
-Calling xmlCleanupParser
-xmlRegisterHTTPPostCallbacks
+Calling xmlRegisterHTTPPostCallbacks
Canonical xmlC14NDocDumpMemory
xmlC14NDocSave
xmlC14NDocSaveTo
@@ -200,7 +199,6 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlParseChunk
xmlParseInNodeContext
Cleanup xmlCleanupCharEncodingHandlers
-xmlCleanupParser
xmlCleanupPredefinedEntities
xmlCtxtResetLastError
xmlNanoFTPCleanup
diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html
index 49042c0..cbcc86b 100644
--- a/doc/APIchunk10.html
+++ b/doc/APIchunk10.html
@@ -374,6 +374,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXPtrLocationSetAdd
also xmlCharEncodingOutputFunc
xmlCheckHTTPInput
+xmlCleanupParser
xmlHasProp
xmlKeepBlanksDefault
xmlNanoFTPProxy
@@ -534,7 +535,8 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlStrdup
assumed xmlCheckUTF8
assumes xmlBuildRelativeURI
-assuming xmlSaveFileTo
+assuming xmlParseBalancedChunkMemoryRecover
+xmlSaveFileTo
xmlSaveFormatFileTo
assure xmlGetUTF8Char
atom xmlExpNewAtom
@@ -544,6 +546,9 @@ A:link, A:visited, A:active { text-decoration: underline }
atomic xmlGcMemGet
xmlGcMemSetup
attached xmlTextReaderGetRemainder
+attempt xmlRecoverDoc
+xmlRecoverMemory
+attempts xmlRecoverFile
attr XML_SCHEMAS_ATTRGROUP_HAS_REFS
XML_SCHEMAS_ATTRGROUP_MARKED
XML_SCHEMAS_ATTRGROUP_REDEFINED
diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html
index 342ed29..bcb58cf 100644
--- a/doc/APIchunk11.html
+++ b/doc/APIchunk11.html
@@ -253,9 +253,6 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlParseNotationType
xmlParseURI
xmlParseURIRaw
-xmlRecoverDoc
-xmlRecoverFile
-xmlRecoverMemory
xmlRelaxNGParse
xmlSchemaGetBuiltInType
xmlSchemaGetCanonValue
diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html
index d65e701..769619b 100644
--- a/doc/APIchunk12.html
+++ b/doc/APIchunk12.html
@@ -259,10 +259,13 @@ A:link, A:visited, A:active { text-decoration: underline }
circular XML_SCHEMAS_ATTRGROUP_MARKED
XML_SCHEMAS_ELEM_CIRCULAR
XML_SCHEMAS_TYPE_MARKED
+clean xmlCleanupParser
cleanly xmlCheckHTTPInput
-cleans xmlNanoFTPScanProxy
+cleans xmlCleanupParser
+xmlNanoFTPScanProxy
xmlNanoHTTPScanProxy
cleanup xmlCleanupGlobals
+xmlCleanupParser
xmlCleanupThreads
xmlNanoFTPCleanup
clear xmlListMerge
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html
index 00da28b..c86ff16 100644
--- a/doc/APIchunk13.html
+++ b/doc/APIchunk13.html
@@ -495,7 +495,8 @@ A:link, A:visited, A:active { text-decoration: underline }
docs xmlBuildRelativeURI
doctypedecl xmlParseDocTypeDecl
xmlParseDocument
-documents xmlIsID
+documents xmlCleanupParser
+xmlIsID
xmlParseEntityRef
xmlParserHandleReference
xmlSAXParseDoc
diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html
index 1005453..61e35fc 100644
--- a/doc/APIchunk14.html
+++ b/doc/APIchunk14.html
@@ -419,6 +419,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION
XML_SCHEMAS_TYPE_FINAL_EXTENSION
extensions _xmlSAXHandler
+extent xmlParseBalancedChunkMemoryRecover
extract XML_GET_CONTENT
XML_GET_LINE
xmlBufferContent
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html
index 2f0774e..03616a5 100644
--- a/doc/APIchunk15.html
+++ b/doc/APIchunk15.html
@@ -231,6 +231,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlStringLenGetNodeList
floor xmlXPathFloorFunction
flow xmlScanName
+flushed xmlTextWriterEndDocument
flushes xmlOutputBufferClose
xmlOutputBufferFlush
follow xmlAutomataNewNegTrans
@@ -393,6 +394,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlRelaxNGSetValidStructuredErrors
xmlSchemaSetParserErrors
xmlSchemaSetParserStructuredErrors
+xmlSchematronSetValidStructuredErrors
xmlShellCmd
xmlSwitchEncoding
xmlSwitchInputEncoding
diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html
index b83d8e4..788a439 100644
--- a/doc/APIchunk16.html
+++ b/doc/APIchunk16.html
@@ -151,6 +151,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlInitializeGlobalState
xmlResetLastError
globally xmlSAXDefaultVersion
+gnu xmlTextReaderNodeType
good xmlTextReaderGetRemainder
grafted xmlCopyProp
xmlCopyPropList
diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html
index f09d9bf..548d945 100644
--- a/doc/APIchunk17.html
+++ b/doc/APIchunk17.html
@@ -516,6 +516,7 @@ A:link, A:visited, A:active { text-decoration: underline }
itself _xmlDoc
xlinkIsLink
xmlCharEncFirstLine
+xmlCleanupParser
xmlParsePEReference
xmlParserHandlePEReference
xmlXPathNextSelf
diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html
index 7264dff..a5db809 100644
--- a/doc/APIchunk19.html
+++ b/doc/APIchunk19.html
@@ -242,7 +242,8 @@ A:link, A:visited, A:active { text-decoration: underline }
minus xmlXPathStringFunction
minute ftpListCallback
misc xmlXPathContextSetCache
-misleading xmlParsePEReference
+misleading xmlCleanupParser
+xmlParsePEReference
xmlParserHandlePEReference
missing xmlParseSDDecl
mixed XML_SCHEMAS_TYPE_MIXED
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html
index 16d268c..05eab1d 100644
--- a/doc/APIchunk21.html
+++ b/doc/APIchunk21.html
@@ -214,6 +214,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXPathSubValues
xmlXPathValueFlipSign
operations _xmlDOMWrapCtxt
+xmlCleanupParser
xmlModuleClose
xmlModuleFree
xmlReconciliateNs
@@ -226,6 +227,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXPathMultValues
xmlXPathSubValues
xmlXPathValueFlipSign
+opposite xmlCleanupParser
optimized xmlXPathNodeSetAddUnique
option xmlDOMWrapAdoptNode
xmlDOMWrapCloneNode
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html
index 4d1c296..1fcc6c9 100644
--- a/doc/APIchunk22.html
+++ b/doc/APIchunk22.html
@@ -320,6 +320,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlDOMWrapAdoptNode
xmlDOMWrapCloneNode
xmlDOMWrapReconcileNamespaces
+preparing xmlCleanupParser
preparsed xmlReaderNewWalker
xmlReaderWalker
xmlRelaxNGNewDocParserCtxt
@@ -352,7 +353,6 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlNodeSetSpacePreserve
prev xmlValidGetValidElements
prevent _xmlParserCtxt
-xmlCleanupParser
previous _xmlAttr
_xmlAttribute
_xmlDoc
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html
index bbf1165..4d76cc6 100644
--- a/doc/APIchunk23.html
+++ b/doc/APIchunk23.html
@@ -573,8 +573,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlReaderNewIO
xmlReaderNewMemory
xmlReaderNewWalker
-reusing xmlCleanupParser
-xmlXIncludeProcessNode
+reusing xmlXIncludeProcessNode
reverse xmlListReverseSearch
xmlListReverseWalk
xmlXPathNextAncestor
diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html
index 5f563c6..0a798e6 100644
--- a/doc/APIchunk24.html
+++ b/doc/APIchunk24.html
@@ -399,6 +399,7 @@ A:link, A:visited, A:active { text-decoration: underline }
socket xmlCheckFilename
xmlNanoFTPGetSocket
software LIBXML_TEST_VERSION
+xmlTextReaderNodeType
solution xmlNormalizeWindowsPath
some XML_SKIP_IDS
characters
@@ -410,6 +411,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlHandleEntity
xmlMemSetup
xmlParseAttributeType
+xmlParseBalancedChunkMemoryRecover
xmlParserInputDeallocate
xmlRelaxNGValidatePushCData
xmlSAX2Characters
@@ -424,6 +426,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXIncludeProcessTreeFlags
sometimes xmlExpExpDerive
somewhat xmlCheckLanguageID
+xmlCleanupParser
sorted xmlParserAddNodeInfo
xmlParserFindNodeInfoIndex
xmlXPathDistinct
@@ -718,6 +721,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchemaNewStringValue
structured xmlRelaxNGSetValidStructuredErrors
xmlSchemaSetParserStructuredErrors
+xmlSchematronSetValidStructuredErrors
xmlSetStructuredErrorFunc
structures xmlFreeDoc
xmlFreeNs
@@ -811,6 +815,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlHashUpdateEntry
xmlHashUpdateEntry2
xmlHashUpdateEntry3
+xmlParseBalancedChunkMemoryRecover
xmlSchemaValueAppend
xmlXPathCompareValues
xmlXPathContextSetCache
diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html
index cf24741..aa590d2 100644
--- a/doc/APIchunk25.html
+++ b/doc/APIchunk25.html
@@ -333,6 +333,8 @@ A:link, A:visited, A:active { text-decoration: underline }
traverse xmlXPathAxisFunc
treaming _xmlParserCtxt
treated xmlParseAttValue
+tried xmlRecoverDoc
+xmlRecoverMemory
tries INPUT_CHUNK
xlinkIsLink
xmlCleanupParser
diff --git a/doc/APIchunk27.html b/doc/APIchunk27.html
index 1d0c9ae..d2272eb 100644
--- a/doc/APIchunk27.html
+++ b/doc/APIchunk27.html
@@ -293,6 +293,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlParserHandleReference
xmlSAX2GetSystemId
xmlSchemaGetPredefinedType
+xmlTextReaderNodeType
XML_SCHEMATRON_OUT_BUFFER
+XML_SCHEMATRON_OUT_ERROR
XML_SCHEMATRON_OUT_FILE
XML_SCHEMATRON_OUT_IO
XML_SCHEMATRON_OUT_QUIET
@@ -1235,6 +1236,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchematronParserCtxt
xmlSchematronParserCtxtPtr
xmlSchematronPtr
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidCtxt
xmlSchematronValidCtxtPtr
xmlSchematronValidOptions
@@ -1991,6 +1993,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_FROM_RELAXNGV
XML_FROM_SCHEMASP
XML_FROM_SCHEMASV
+XML_FROM_SCHEMATRONV
XML_FROM_TREE
XML_FROM_VALID
XML_FROM_WRITER
@@ -2397,6 +2400,8 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_SCHEMAP_WARN_SKIP_SCHEMA
XML_SCHEMAP_WARN_UNLOCATED_SCHEMA
XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER
+XML_SCHEMATRONV_ASSERT
+XML_SCHEMATRONV_REPORT
XML_SCHEMAV_ATTRINVALID
XML_SCHEMAV_ATTRUNKNOWN
XML_SCHEMAV_CONSTRUCT
@@ -2478,6 +2483,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_SCHEMAV_WRONGELEM
XML_TREE_INVALID_DEC
XML_TREE_INVALID_HEX
+XML_TREE_NOT_UTF8
XML_TREE_UNTERMINATED_ENTITY
XML_WAR_CATALOG_PI
XML_WAR_ENTITY_REDEFINED
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html
index 80b0a88..9e83889 100644
--- a/doc/APIfunctions.html
+++ b/doc/APIfunctions.html
@@ -852,6 +852,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
xmlSchemaValidityWarningFunc
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidityErrorFunc
xmlSchematronValidityWarningFunc
xmlSetFeature
@@ -1956,6 +1957,7 @@ A:link, A:visited, A:active { text-decoration: underline }
Type xmlSchematronPtr: xmlSchematronFree
xmlSchematronNewValidCtxt
Type xmlSchematronValidCtxtPtr: xmlSchematronFreeValidCtxt
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidateDoc
Type xmlShellCtxtPtr: xmlShellBase
xmlShellCat
@@ -1983,6 +1985,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlRelaxNGSetValidStructuredErrors
xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidStructuredErrors
+xmlSchematronSetValidStructuredErrors
xmlSetStructuredErrorFunc
xmlTextReaderSetStructuredErrorHandler
xmlThrDefSetStructuredErrorFunc
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html
index 12a0b5d..af09644 100644
--- a/doc/APIsymbols.html
+++ b/doc/APIsymbols.html
@@ -435,6 +435,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_FROM_RELAXNGV
XML_FROM_SCHEMASP
XML_FROM_SCHEMASV
+XML_FROM_SCHEMATRONV
XML_FROM_TREE
XML_FROM_VALID
XML_FROM_WRITER
@@ -1128,7 +1129,10 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_SCHEMAS_UNKNOWN
XML_SCHEMAS_USHORT
XML_SCHEMAS_WILDCARD_COMPLETE
+XML_SCHEMATRONV_ASSERT
+XML_SCHEMATRONV_REPORT
XML_SCHEMATRON_OUT_BUFFER
+XML_SCHEMATRON_OUT_ERROR
XML_SCHEMATRON_OUT_FILE
XML_SCHEMATRON_OUT_IO
XML_SCHEMATRON_OUT_QUIET
@@ -1280,6 +1284,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_TEXT_NODE
XML_TREE_INVALID_DEC
XML_TREE_INVALID_HEX
+XML_TREE_NOT_UTF8
XML_TREE_UNTERMINATED_ENTITY
XML_WAR_CATALOG_PI
XML_WAR_ENTITY_REDEFINED
@@ -2779,6 +2784,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchematronParserCtxt
xmlSchematronParserCtxtPtr
xmlSchematronPtr
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidCtxt
xmlSchematronValidCtxtPtr
xmlSchematronValidOptions
diff --git a/doc/devhelp/libxml2-parser.html b/doc/devhelp/libxml2-parser.html
index c12cd02..76b4967 100644
--- a/doc/devhelp/libxml2-parser.html
+++ b/doc/devhelp/libxml2-parser.html
@@ -477,7 +477,7 @@ void xmlSetExternalEntityLoader (
ctxt :an XML parser context Returns :the index in bytes from the beginning of the entity or -1 in case the index could not be computed.
xmlCleanupParser ()void xmlCleanupParser (void)
- Cleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it.
+
This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations.
xmlClearNodeInfoSeq ()void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq)
@@ -594,7 +594,7 @@ void xmlSetExternalEntityLoader (
xmlParseBalancedChunkMemoryRecover ()int xmlParseBalancedChunkMemoryRecover (xmlDocPtr doc, xmlSAXHandlerPtr sax, void * user_data, int depth, const xmlChar * string, xmlNodePtr * lst, int recover)
Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
-
doc :the document the chunk pertains to sax :the SAX handler bloc (possibly NULL) user_data :The user data returned on SAX callbacks (possibly NULL) depth :Used for loop detection, use 0 string :the input string in UTF8 or ISO-Latin (zero terminated) lst :the return value for the set of parsed nodes recover :return nodes even if the data is broken (use 0) Returns :0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise In case recover is set to 1, the nodelist will not be empty even if the parsed chunk is not well balanced.
+doc :the document the chunk pertains to sax :the SAX handler bloc (possibly NULL) user_data :The user data returned on SAX callbacks (possibly NULL) depth :Used for loop detection, use 0 string :the input string in UTF8 or ISO-Latin (zero terminated) lst :the return value for the set of parsed nodes recover :return nodes even if the data is broken (use 0) Returns :0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise In case recover is set to 1, the nodelist will not be empty even if the parsed chunk is not well balanced, assuming the parsing succeeded to some extent.
xmlParseChunk ()int xmlParseChunk (xmlParserCtxtPtr ctxt, const char * chunk, int size, int terminate)
Parse a Chunk of memory
@@ -685,16 +685,16 @@ void
xmlSetExternalEntityLoader (
buffer :a pointer to a char array size :the size of the array URL :the base URL to use for the document encoding :the document encoding, or NULL options :a combination of xmlParserOption Returns :the resulting document tree
xmlRecoverDoc ()xmlDocPtr xmlRecoverDoc (xmlChar * cur)
-parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a tree is built anyway
-
cur :a pointer to an array of xmlChar Returns :the resulting document tree
+parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway
+cur :a pointer to an array of xmlChar Returns :the resulting document tree or NULL in case of failure
xmlRecoverFile ()xmlDocPtr xmlRecoverFile (const char * filename)
-parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, a tree is built anyway
-
filename :the filename Returns :the resulting document tree
+parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway
+filename :the filename Returns :the resulting document tree or NULL in case of failure
xmlRecoverMemory ()xmlDocPtr xmlRecoverMemory (const char * buffer, int size)
-parse an XML in-memory block and build a tree. In the case the document is not Well Formed, a tree is built anyway
-
buffer :an pointer to a char array size :the size of the array Returns :the resulting document tree
+parse an XML in-memory block and build a tree. In the case the document is not Well Formed, an attempt to build a tree is tried anyway
+buffer :an pointer to a char array size :the size of the array Returns :the resulting document tree or NULL in case of error
xmlSAXParseDTD ()xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax, const xmlChar * ExternalID, const xmlChar * SystemID)
Load and parse an external subset.
diff --git a/doc/devhelp/libxml2-schematron.html b/doc/devhelp/libxml2-schematron.html
index 995d96a..bdcb944 100644
--- a/doc/devhelp/libxml2-schematron.html
+++ b/doc/devhelp/libxml2-schematron.html
@@ -57,6 +57,7 @@ typedef void
xmlSchematronValidityErro
xmlSchematronParserCtxtPtr xmlSchematronNewParserCtxt (const char * URL);
typedef void
xmlSchematronValidityWarningFunc (void * ctx,
const char * msg,
... ...);
void
xmlSchematronFree (
xmlSchematronPtr schema);
+void
xmlSchematronSetValidStructuredErrors (
xmlSchematronValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx);
void
xmlSchematronFreeValidCtxt (
xmlSchematronValidCtxtPtr ctxt);
xmlSchematronPtr xmlSchematronParse (
xmlSchematronParserCtxtPtr ctxt);
xmlSchematronParserCtxtPtr xmlSchematronNewDocParserCtxt (
xmlDocPtr doc);
@@ -103,6 +104,7 @@ The content of this structure is not made public by the API.
XML_SCHEMATRON_OUT_QUIET = 1 /* quiet no report */
XML_SCHEMATRON_OUT_TEXT = 2 /* build a textual report */
XML_SCHEMATRON_OUT_XML = 4 /* output SVRL */
+
XML_SCHEMATRON_OUT_ERROR = 8 /* output via xmlStructuredErrorFunc */
XML_SCHEMATRON_OUT_FILE = 256 /* output to a file descriptor */
XML_SCHEMATRON_OUT_BUFFER = 512 /* output to a buffer */
XML_SCHEMATRON_OUT_IO = 1024 /* output to I/O mechanism */
@@ -149,6 +151,10 @@ The content of this structure is not made public by the API.
xmlSchematronParse ()xmlSchematronPtr xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt)
parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.
ctxt :a schema validation context Returns :the internal XML Schematron structure built from the resource or NULL in case of error
+
+
xmlSchematronSetValidStructuredErrors ()void xmlSchematronSetValidStructuredErrors (xmlSchematronValidCtxtPtr ctxt, xmlStructuredErrorFunc serror, void * ctx)
+ Set the structured error callback
+
ctxt :a Schematron validation context serror :the structured error function ctx :the functions context
xmlSchematronValidateDoc ()int xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
Validate a tree instance against the schematron
diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html
index 7545da4..eaacd0b 100644
--- a/doc/devhelp/libxml2-xmlerror.html
+++ b/doc/devhelp/libxml2-xmlerror.html
@@ -119,7 +119,8 @@ void
xmlResetError (
XML_FROM_CHECK = 24 /* The error checking module */
XML_FROM_WRITER = 25 /* The xmlwriter module */
XML_FROM_MODULE = 26 /* The dynamically loaded module modul */
-
XML_FROM_I18N = 27 /* The module handling character conversion */
+
XML_FROM_I18N = 27 /* The module handling character conversion */
+
XML_FROM_SCHEMATRONV = 28 /* The Schematron validator module */
};
@@ -442,6 +443,7 @@ void
xmlResetError (
XML_TREE_INVALID_HEX = 1300
XML_TREE_INVALID_DEC = 1301 /* 1301 */
XML_TREE_UNTERMINATED_ENTITY = 1302 /* 1302 */
+
XML_TREE_NOT_UTF8 = 1303 /* 1303 */
XML_SAVE_NOT_UTF8 = 1400
XML_SAVE_CHAR_INVALID = 1401 /* 1401 */
XML_SAVE_NO_DOCTYPE = 1402 /* 1402 */
@@ -817,6 +819,8 @@ void
xmlResetError (
XML_SCHEMAP_AU_PROPS_CORRECT = 3089 /* 3088 */
XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090 /* 3089 */
XML_SCHEMAP_COS_ALL_LIMITED = 3091 /* 3090 */
+
XML_SCHEMATRONV_ASSERT = 4000 /* 4000 */
+
XML_SCHEMATRONV_REPORT = 4001
XML_MODULE_OPEN = 4900 /* 4900 */
XML_MODULE_CLOSE = 4901 /* 4901 */
XML_CHECK_FOUND_ELEMENT = 5000
diff --git a/doc/devhelp/libxml2-xmlreader.html b/doc/devhelp/libxml2-xmlreader.html
index e422f1d..1609a96 100644
--- a/doc/devhelp/libxml2-xmlreader.html
+++ b/doc/devhelp/libxml2-xmlreader.html
@@ -459,7 +459,7 @@ The content of this structure is not made public by the API.
reader :the xmlTextReaderPtr used Returns :1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error
xmlTextReaderNodeType ()int xmlTextReaderNodeType (xmlTextReaderPtr reader)
- Get the node type of the current node Reference: http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html
+
Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html
reader :the xmlTextReaderPtr used Returns :the xmlNodeType of the current node or -1 in case of error
xmlTextReaderNormalization ()int xmlTextReaderNormalization (xmlTextReaderPtr reader)
diff --git a/doc/devhelp/libxml2-xmlwriter.html b/doc/devhelp/libxml2-xmlwriter.html
index e453daf..358c9e6 100644
--- a/doc/devhelp/libxml2-xmlwriter.html
+++ b/doc/devhelp/libxml2-xmlwriter.html
@@ -209,8 +209,8 @@ The content of this structure is not made public by the API.
writer :the xmlTextWriterPtr Returns :the bytes written (may be 0 because of buffering) or -1 in case of error
xmlTextWriterEndDocument ()int xmlTextWriterEndDocument (xmlTextWriterPtr writer)
- End an xml document. All open elements are closed
-
writer :the xmlTextWriterPtr Returns :the bytes written (may be 0 because of buffering) or -1 in case of error
+End an xml document. All open elements are closed, and the content is flushed to the output.
+
xmlTextWriterEndElement ()int xmlTextWriterEndElement (xmlTextWriterPtr writer)
End the current xml element.
diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp
index a932cdf..499bcb9 100644
--- a/doc/devhelp/libxml2.devhelp
+++ b/doc/devhelp/libxml2.devhelp
@@ -620,6 +620,7 @@
+
@@ -1226,7 +1227,10 @@
+
+
+
@@ -1373,6 +1377,7 @@
+
@@ -2853,6 +2858,7 @@
+
diff --git a/doc/elfgcchack.xsl b/doc/elfgcchack.xsl
index 11169f9..1adf340 100644
--- a/doc/elfgcchack.xsl
+++ b/doc/elfgcchack.xsl
@@ -106,7 +106,7 @@ extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_al
-
+
#ifdef bottom_
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index ea23621..d1beee5 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -9,127 +9,126 @@ examples.xml: index.py *.c
-@($(srcdir)/index.py)
index.html: examples.xml examples.xsl
- -@(touch index.html)
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
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 examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res
+EXTRA_DIST=examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res
-noinst_PROGRAMS=io1 io2 parse1 parse2 parse3 parse4 reader1 reader2 reader3 reader4 testWriter tree1 tree2 xpath1 xpath2
+noinst_PROGRAMS=xpath2 reader1 reader4 parse2 reader2 parse3 reader3 tree2 parse4 io2 testWriter io1 xpath1 parse1 tree1
-io1_SOURCES=io1.c
-io1_LDFLAGS=
-io1_DEPENDENCIES= $(DEPS)
-io1_LDADD= @RDL_LIBS@ $(LDADDS)
+xpath2_SOURCES=xpath2.c
+xpath2_LDFLAGS=
+xpath2_DEPENDENCIES= $(DEPS)
+xpath2_LDADD= @RDL_LIBS@ $(LDADDS)
-io2_SOURCES=io2.c
-io2_LDFLAGS=
-io2_DEPENDENCIES= $(DEPS)
-io2_LDADD= @RDL_LIBS@ $(LDADDS)
+reader1_SOURCES=reader1.c
+reader1_LDFLAGS=
+reader1_DEPENDENCIES= $(DEPS)
+reader1_LDADD= @RDL_LIBS@ $(LDADDS)
-parse1_SOURCES=parse1.c
-parse1_LDFLAGS=
-parse1_DEPENDENCIES= $(DEPS)
-parse1_LDADD= @RDL_LIBS@ $(LDADDS)
+reader4_SOURCES=reader4.c
+reader4_LDFLAGS=
+reader4_DEPENDENCIES= $(DEPS)
+reader4_LDADD= @RDL_LIBS@ $(LDADDS)
parse2_SOURCES=parse2.c
parse2_LDFLAGS=
parse2_DEPENDENCIES= $(DEPS)
parse2_LDADD= @RDL_LIBS@ $(LDADDS)
-parse3_SOURCES=parse3.c
-parse3_LDFLAGS=
-parse3_DEPENDENCIES= $(DEPS)
-parse3_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse4_SOURCES=parse4.c
-parse4_LDFLAGS=
-parse4_DEPENDENCIES= $(DEPS)
-parse4_LDADD= @RDL_LIBS@ $(LDADDS)
-
-reader1_SOURCES=reader1.c
-reader1_LDFLAGS=
-reader1_DEPENDENCIES= $(DEPS)
-reader1_LDADD= @RDL_LIBS@ $(LDADDS)
-
reader2_SOURCES=reader2.c
reader2_LDFLAGS=
reader2_DEPENDENCIES= $(DEPS)
reader2_LDADD= @RDL_LIBS@ $(LDADDS)
+parse3_SOURCES=parse3.c
+parse3_LDFLAGS=
+parse3_DEPENDENCIES= $(DEPS)
+parse3_LDADD= @RDL_LIBS@ $(LDADDS)
+
reader3_SOURCES=reader3.c
reader3_LDFLAGS=
reader3_DEPENDENCIES= $(DEPS)
reader3_LDADD= @RDL_LIBS@ $(LDADDS)
-reader4_SOURCES=reader4.c
-reader4_LDFLAGS=
-reader4_DEPENDENCIES= $(DEPS)
-reader4_LDADD= @RDL_LIBS@ $(LDADDS)
+tree2_SOURCES=tree2.c
+tree2_LDFLAGS=
+tree2_DEPENDENCIES= $(DEPS)
+tree2_LDADD= @RDL_LIBS@ $(LDADDS)
+
+parse4_SOURCES=parse4.c
+parse4_LDFLAGS=
+parse4_DEPENDENCIES= $(DEPS)
+parse4_LDADD= @RDL_LIBS@ $(LDADDS)
+
+io2_SOURCES=io2.c
+io2_LDFLAGS=
+io2_DEPENDENCIES= $(DEPS)
+io2_LDADD= @RDL_LIBS@ $(LDADDS)
testWriter_SOURCES=testWriter.c
testWriter_LDFLAGS=
testWriter_DEPENDENCIES= $(DEPS)
testWriter_LDADD= @RDL_LIBS@ $(LDADDS)
-tree1_SOURCES=tree1.c
-tree1_LDFLAGS=
-tree1_DEPENDENCIES= $(DEPS)
-tree1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-tree2_SOURCES=tree2.c
-tree2_LDFLAGS=
-tree2_DEPENDENCIES= $(DEPS)
-tree2_LDADD= @RDL_LIBS@ $(LDADDS)
+io1_SOURCES=io1.c
+io1_LDFLAGS=
+io1_DEPENDENCIES= $(DEPS)
+io1_LDADD= @RDL_LIBS@ $(LDADDS)
xpath1_SOURCES=xpath1.c
xpath1_LDFLAGS=
xpath1_DEPENDENCIES= $(DEPS)
xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
-xpath2_SOURCES=xpath2.c
-xpath2_LDFLAGS=
-xpath2_DEPENDENCIES= $(DEPS)
-xpath2_LDADD= @RDL_LIBS@ $(LDADDS)
+parse1_SOURCES=parse1.c
+parse1_LDFLAGS=
+parse1_DEPENDENCIES= $(DEPS)
+parse1_LDADD= @RDL_LIBS@ $(LDADDS)
+
+tree1_SOURCES=tree1.c
+tree1_LDFLAGS=
+tree1_DEPENDENCIES= $(DEPS)
+tree1_LDADD= @RDL_LIBS@ $(LDADDS)
valgrind:
- $(MAKE) CHECKER='valgrind -q' tests
+ $(MAKE) CHECKER='valgrind' tests
tests: $(noinst_PROGRAMS)
@(echo '## examples regression tests')
@(echo > .memdump)
- @($(CHECKER) ./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)
- @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
+ @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse1 test1.xml)
+ @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./parse2 test2.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse3)
+ @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse4 test3.xml)
+ @($(CHECKER) ./parse3)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+ @($(CHECKER) ./parse4 test3.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
+ @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./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)
+ @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
+ @($(CHECKER) ./parse1 test1.xml)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in
index 314343a..14681b4 100644
--- a/doc/examples/Makefile.in
+++ b/doc/examples/Makefile.in
@@ -32,11 +32,11 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \
- parse2$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) \
- reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \
- reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \
- tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT)
+noinst_PROGRAMS = xpath2$(EXEEXT) reader1$(EXEEXT) reader4$(EXEEXT) \
+ parse2$(EXEEXT) reader2$(EXEEXT) parse3$(EXEEXT) \
+ reader3$(EXEEXT) tree2$(EXEEXT) parse4$(EXEEXT) io2$(EXEEXT) \
+ testWriter$(EXEEXT) io1$(EXEEXT) xpath1$(EXEEXT) \
+ parse1$(EXEEXT) tree1$(EXEEXT)
subdir = doc/examples
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -370,67 +370,67 @@ top_srcdir = @top_srcdir@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
DEPS = $(top_builddir)/libxml2.la
LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
-EXTRA_DIST = examples.xsl index.py examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res
-io1_SOURCES = io1.c
-io1_LDFLAGS =
-io1_DEPENDENCIES = $(DEPS)
-io1_LDADD = @RDL_LIBS@ $(LDADDS)
-io2_SOURCES = io2.c
-io2_LDFLAGS =
-io2_DEPENDENCIES = $(DEPS)
-io2_LDADD = @RDL_LIBS@ $(LDADDS)
-parse1_SOURCES = parse1.c
-parse1_LDFLAGS =
-parse1_DEPENDENCIES = $(DEPS)
-parse1_LDADD = @RDL_LIBS@ $(LDADDS)
-parse2_SOURCES = parse2.c
-parse2_LDFLAGS =
-parse2_DEPENDENCIES = $(DEPS)
-parse2_LDADD = @RDL_LIBS@ $(LDADDS)
-parse3_SOURCES = parse3.c
-parse3_LDFLAGS =
-parse3_DEPENDENCIES = $(DEPS)
-parse3_LDADD = @RDL_LIBS@ $(LDADDS)
-parse4_SOURCES = parse4.c
-parse4_LDFLAGS =
-parse4_DEPENDENCIES = $(DEPS)
-parse4_LDADD = @RDL_LIBS@ $(LDADDS)
+EXTRA_DIST = examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res
+xpath2_SOURCES = xpath2.c
+xpath2_LDFLAGS =
+xpath2_DEPENDENCIES = $(DEPS)
+xpath2_LDADD = @RDL_LIBS@ $(LDADDS)
reader1_SOURCES = reader1.c
reader1_LDFLAGS =
reader1_DEPENDENCIES = $(DEPS)
reader1_LDADD = @RDL_LIBS@ $(LDADDS)
+reader4_SOURCES = reader4.c
+reader4_LDFLAGS =
+reader4_DEPENDENCIES = $(DEPS)
+reader4_LDADD = @RDL_LIBS@ $(LDADDS)
+parse2_SOURCES = parse2.c
+parse2_LDFLAGS =
+parse2_DEPENDENCIES = $(DEPS)
+parse2_LDADD = @RDL_LIBS@ $(LDADDS)
reader2_SOURCES = reader2.c
reader2_LDFLAGS =
reader2_DEPENDENCIES = $(DEPS)
reader2_LDADD = @RDL_LIBS@ $(LDADDS)
+parse3_SOURCES = parse3.c
+parse3_LDFLAGS =
+parse3_DEPENDENCIES = $(DEPS)
+parse3_LDADD = @RDL_LIBS@ $(LDADDS)
reader3_SOURCES = reader3.c
reader3_LDFLAGS =
reader3_DEPENDENCIES = $(DEPS)
reader3_LDADD = @RDL_LIBS@ $(LDADDS)
-reader4_SOURCES = reader4.c
-reader4_LDFLAGS =
-reader4_DEPENDENCIES = $(DEPS)
-reader4_LDADD = @RDL_LIBS@ $(LDADDS)
-testWriter_SOURCES = testWriter.c
-testWriter_LDFLAGS =
-testWriter_DEPENDENCIES = $(DEPS)
-testWriter_LDADD = @RDL_LIBS@ $(LDADDS)
-tree1_SOURCES = tree1.c
-tree1_LDFLAGS =
-tree1_DEPENDENCIES = $(DEPS)
-tree1_LDADD = @RDL_LIBS@ $(LDADDS)
tree2_SOURCES = tree2.c
tree2_LDFLAGS =
tree2_DEPENDENCIES = $(DEPS)
tree2_LDADD = @RDL_LIBS@ $(LDADDS)
+parse4_SOURCES = parse4.c
+parse4_LDFLAGS =
+parse4_DEPENDENCIES = $(DEPS)
+parse4_LDADD = @RDL_LIBS@ $(LDADDS)
+io2_SOURCES = io2.c
+io2_LDFLAGS =
+io2_DEPENDENCIES = $(DEPS)
+io2_LDADD = @RDL_LIBS@ $(LDADDS)
+testWriter_SOURCES = testWriter.c
+testWriter_LDFLAGS =
+testWriter_DEPENDENCIES = $(DEPS)
+testWriter_LDADD = @RDL_LIBS@ $(LDADDS)
+io1_SOURCES = io1.c
+io1_LDFLAGS =
+io1_DEPENDENCIES = $(DEPS)
+io1_LDADD = @RDL_LIBS@ $(LDADDS)
xpath1_SOURCES = xpath1.c
xpath1_LDFLAGS =
xpath1_DEPENDENCIES = $(DEPS)
xpath1_LDADD = @RDL_LIBS@ $(LDADDS)
-xpath2_SOURCES = xpath2.c
-xpath2_LDFLAGS =
-xpath2_DEPENDENCIES = $(DEPS)
-xpath2_LDADD = @RDL_LIBS@ $(LDADDS)
+parse1_SOURCES = parse1.c
+parse1_LDFLAGS =
+parse1_DEPENDENCIES = $(DEPS)
+parse1_LDADD = @RDL_LIBS@ $(LDADDS)
+tree1_SOURCES = tree1.c
+tree1_LDFLAGS =
+tree1_DEPENDENCIES = $(DEPS)
+tree1_LDADD = @RDL_LIBS@ $(LDADDS)
all: all-am
.SUFFIXES:
@@ -750,7 +750,6 @@ examples.xml: index.py *.c
-@($(srcdir)/index.py)
index.html: examples.xml examples.xsl
- -@(touch index.html)
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
install-data-local:
@@ -758,40 +757,40 @@ install-data-local:
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
valgrind:
- $(MAKE) CHECKER='valgrind -q' tests
+ $(MAKE) CHECKER='valgrind' tests
tests: $(noinst_PROGRAMS)
@(echo '## examples regression tests')
@(echo > .memdump)
- @($(CHECKER) ./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)
- @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
+ @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse1 test1.xml)
+ @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./parse2 test2.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse3)
+ @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse4 test3.xml)
+ @($(CHECKER) ./parse3)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+ @($(CHECKER) ./parse4 test3.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
+ @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./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)
+ @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
+ @($(CHECKER) ./parse1 test1.xml)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml
index 31b8525..2a0827b 100644
--- a/doc/examples/examples.xml
+++ b/doc/examples/examples.xml
@@ -1,53 +1,4 @@
-
- Parse an XML file to a tree and free it
- Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree
- parse1 test1.xml
- parse1 test1.xml
- Daniel Veillard
- see Copyright for the status of this software.
-
-
- <libxml/tree.h>
- <libxml/parser.h>
-
-
-
-
-
-
-
-
-
-
-
- Parse an XML file with an xmlReader
- Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)
- reader1 <filename>
- reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp
- Daniel Veillard
- see Copyright for the status of this software.
-
-
- <libxml/xmlreader.h>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Load a document, locate subelements with XPath, modify said elements and save the resulting document.
Shows how to make a full round-trip from a load/edit/save
@@ -81,148 +32,57 @@
-
- Example of custom Input/Output
- Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.
- io1
- io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp
+
+ Parse an XML file with an xmlReader
+ Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)
+ reader1 <filename>
+ reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp
Daniel Veillard
see Copyright for the status of this software.
-
+
- <libxml/parser.h>
- <libxml/xmlIO.h>
- <libxml/xinclude.h>
- <libxml/tree.h>
+ <libxml/xmlreader.h>
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Show how to extract subdocuments with xmlReader
- Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)
- reader3
- reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp
- Daniel Veillard
+
+ Parse multiple XML files reusing an xmlReader
+ Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)
+ reader4 <filename> [ filename ... ]
+ reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp
+ Graham Bennett
see Copyright for the status of this software.
<libxml/xmlreader.h>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- use various APIs for the xmlWriter
- tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized.
- testWriter
- testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res
- Alfred Mickautsch
- see Copyright for the status of this software.
-
-
- <libxml/encoding.h>
- <libxml/xmlwriter.h>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Navigates a tree to print element names
- Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.
- tree1 filename_or_URL
- tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp
- Dodji Seketeli
- see Copyright for the status of this software.
-
-
- <libxml/tree.h>
- <libxml/parser.h>
-
-
-
-
-
-
-
-
-
- Creates a tree
- Shows how to create document, nodes and dump it to stdout or file.
- tree2 <filename> -Default output: stdout
- tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp
- Lucas Brasilino <brasilino@recife.pe.gov.br>
- see Copyright for the status of this software
-
-
- <libxml/tree.h>
- <libxml/parser.h>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -243,7 +103,11 @@
+
+
+
+
@@ -259,14 +123,17 @@
+
+
+
@@ -275,24 +142,73 @@
-
- Parse multiple XML files reusing an xmlReader
- Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)
- reader4 <filename> [ filename ... ]
- reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp
- Graham Bennett
+
+ Parse an XML document in memory to a tree and free it
+ Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree
+ parse3
+ parse3
+ Daniel Veillard
+ see Copyright for the status of this software.
+
+
+ <libxml/tree.h>
+ <libxml/parser.h>
+
+
+
+
+
+
+
+
+
+
+
+ Show how to extract subdocuments with xmlReader
+ Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)
+ reader3
+ reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp
+ Daniel Veillard
see Copyright for the status of this software.
<libxml/xmlreader.h>
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates a tree
+ Shows how to create document, nodes and dump it to stdout or file.
+ tree2 <filename> -Default output: stdout
+ tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp
+ Lucas Brasilino <brasilino@recife.pe.gov.br>
+ see Copyright for the status of this software
+
+
+ <libxml/tree.h>
+ <libxml/parser.h>
+
+
+
+
+
+
+
+
+
+
+
+
@@ -312,22 +228,93 @@
+
-
- Parse an XML document in memory to a tree and free it
- Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree
- parse3
- parse3
+
+ Output to char buffer
+ Demonstrate the use of xmlDocDumpMemory to output document to a character buffer
+ io2
+ io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp
+ John Fleck
+ see Copyright for the status of this software.
+
+
+ <libxml/parser.h>
+
+
+
+
+
+
+
+
+
+
+
+
+ use various APIs for the xmlWriter
+ tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized.
+ testWriter
+ testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res
+ Alfred Mickautsch
+ see Copyright for the status of this software.
+
+
+ <libxml/encoding.h>
+ <libxml/xmlwriter.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example of custom Input/Output
+ Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.
+ io1
+ io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp
Daniel Veillard
see Copyright for the status of this software.
-
+
- <libxml/tree.h>
<libxml/parser.h>
+ <libxml/xmlIO.h>
+ <libxml/xinclude.h>
+ <libxml/tree.h>
-
+
+
+
+
@@ -363,24 +350,402 @@
-
- Output to char buffer
- Demonstrate the use of xmlDocDumpMemory to output document to a character buffer
- io2
- io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp
- John Fleck
+
+ Parse an XML file to a tree and free it
+ Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree
+ parse1 test1.xml
+ parse1 test1.xml
+ Daniel Veillard
see Copyright for the status of this software.
-
+
+ <libxml/tree.h>
<libxml/parser.h>
-
-
-
-
-
-
-
+
+
+
+
+ Navigates a tree to print element names
+ Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.
+ tree1 filename_or_URL
+ tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp
+ Dodji Seketeli
+ see Copyright for the status of this software.
+
+
+ <libxml/tree.h>
+ <libxml/parser.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/html/book1.html b/doc/html/book1.html
index 4a4962a..70263a1 100644
--- a/doc/html/book1.html
+++ b/doc/html/book1.html
@@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline }
Reference Manual for libxml2 Reference Manual for libxml2
Table of Contents DOCBparser : old DocBook SGML parserHTMLparser : interface for an HTML 4.0 non-verifying parserHTMLtree : specific APIs to process HTML tree, especially serializationSAX : Old SAX version 1 handler, deprecatedSAX2 : SAX2 parser interface used to build the DOM treec14n : Provide Canonical XML and Exclusive XML Canonicalizationcatalog : interfaces to the Catalog handling systemchvalid : Unicode character range checkingdebugXML : Tree debugging APIsdict : string dictionnaryencoding : interface for the encoding conversion functionsentities : interface for the XML entities handlingglobals : interface for all global variables of the libraryhash : Chained hash tableslist : lists interfacesnanoftp : minimal FTP implementationnanohttp : minimal HTTP implementationparser : the core parser moduleparserInternals : internals routines exported by the parser.pattern : pattern expression handlingrelaxng : implementation of the Relax-NG validationschemasInternals : internal interfaces for XML Schemasschematron : XML Schemastron implementationthreads : interfaces for thread handlingtree : interfaces for tree manipulationuri : library of generic URI related routinesvalid : The DTD validationxinclude : implementation of XIncludexlink : unfinished XLink detection modulexmlIO : interface for the I/O interfaces used by the parserxmlautomata : API to build regexp automataxmlerror : error handlingxmlexports : macros for marking symbols as exportable/importable.xmlmemory : interface for the memory allocatorxmlmodule : dynamic module loadingxmlreader : the XMLReader implementationxmlregexp : regular expressions handlingxmlsave : the XML document serializerxmlschemas : incomplete XML Schemas structure implementationxmlschemastypes : implementation of XML Schema Datatypesxmlstring : set of routines to process stringsxmlunicode : Unicode character APIsxmlversion : compile-time version informationsxmlwriter : text writing API for XMLxpath : XML Path Language implementationxpathInternals : internal interfaces for XML Path Language implementationxpointer : API to handle XML PointersDaniel Veillard
+ Reference Manual for libxml2 Reference Manual for libxml2
Table of Contents DOCBparser : old DocBook SGML parserHTMLparser : interface for an HTML 4.0 non-verifying parserHTMLtree : specific APIs to process HTML tree, especially serializationSAX : Old SAX version 1 handler, deprecatedSAX2 : SAX2 parser interface used to build the DOM treec14n : Provide Canonical XML and Exclusive XML Canonicalizationcatalog : interfaces to the Catalog handling systemchvalid : Unicode character range checkingdebugXML : Tree debugging APIsdict : string dictionnaryencoding : interface for the encoding conversion functionsentities : interface for the XML entities handlingglobals : interface for all global variables of the libraryhash : Chained hash tableslist : lists interfacesnanoftp : minimal FTP implementationnanohttp : minimal HTTP implementationparser : the core parser moduleparserInternals : internals routines exported by the parser.pattern : pattern expression handlingrelaxng : implementation of the Relax-NG validationschemasInternals : internal interfaces for XML Schemasschematron : XML Schemastron implementationthreads : interfaces for thread handlingtree : interfaces for tree manipulationuri : library of generic URI related routinesvalid : The DTD validationxinclude : implementation of XIncludexlink : unfinished XLink detection modulexmlIO : interface for the I/O interfaces used by the parserxmlautomata : API to build regexp automataxmlerror : error handlingxmlexports : macros for marking symbols as exportable/importable.xmlmemory : interface for the memory allocatorxmlmodule : dynamic module loadingxmlreader : the XMLReader implementationxmlregexp : regular expressions handlingxmlsave : the XML document serializerxmlschemas : incomplete XML Schemas structure implementationxmlschemastypes : implementation of XML Schema Datatypesxmlstring : set of routines to process stringsxmlunicode : Unicode character APIsxmlversion : compile-time version informationsxmlwriter : text writing API for XMLxpath : XML Path Language implementationxpathInternals : internal interfaces for XML Path Language implementationxpointer : API to handle XML PointersDaniel Veillard