diff options
179 files changed, 14484 insertions, 2292 deletions
@@ -1,3 +1,444 @@ +Sun Mar 13 19:32:03 CET 2005 Daniel Veillard <daniel@veillard.com> + + * NEWS configure.in testapi.c doc/*: preparing release of 2.6.18 + updated docs and rebuilt + * libxml.spec.in: reactivated gcc profiling for gcc >= 4.0.0 + +Sat Mar 12 19:50:22 CET 2005 Daniel Veillard <daniel@veillard.com> + + * encoding.c: removed a static buffer in xmlByteConsumed(), + as pointed by Ben Maurer, fixes #170086 + * xmlschemas.c: remove a potentially uninitialized pointer warning + +Fri Mar 11 23:53:13 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * xmlschemastypes.c: enhanced the parsing of XML_SCHEMAS_DECIMAL + and much of the routine xmlSchemaCompareDecimals. The + changes were necessary to fix a problem reported on the + mailing list by John Hockaday. + +Fri Mar 11 13:22:52 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: The schema parser will stop if components could + not be resolved. This is not conforming to the spec but for now + will avoid internal errors during type fixup and content model + creation. Restructured inclusion/import of schemata: this avoids + duplicate, self and circular inclusion. Chameleon includes are + still workarounded. Added restriction to disallow references to + non-imported namespaces. Corrected parsing of <group>. + * result/schemas/bug167754_0_0*: Added a missing test result. + +Thu Mar 10 16:02:17 CET 2005 Daniel Veillard <daniel@veillard.com> + + * doc/xml.html doc/encoding.html: Enriched encoding.html with more + link and foreword warning to avoid problem with ignorant + programmers, c.f #169721 + +Thu Mar 10 15:01:34 CET 2005 Daniel Veillard <daniel@veillard.com> + + * python/tests/Makefile.am python/tests/readernext.py: added + a regression test from Rob Richards for the previous bug + +Thu Mar 10 13:22:36 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlreader.c: applied fix for xmlTextReaderNext() bug from + Rob Richards + +Thu Mar 10 11:35:57 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlmodule.c: second patch from Rick Jones, portability fix for + HP-UX + * doc/examples/xpath1.c doc/examples/xpath2.c: first fix from Rick Jones + to avoid warnings. + +Thu Mar 10 10:20:23 CET 2005 Daniel Veillard <daniel@veillard.com> + + * include/libxml/hash.h libxml.h libxml.spec.in: some gcc4 portability + patches, including a serious aliasing bug exposed in s390 + when trying to convert data pointer to code pointer. + +Mon Mar 7 18:34:00 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Tiny restructuring of the validation start-up + functions. Added cleanup of the validation context at the + end of validation. This takes care of the validation context + being reused. + +Mon Mar 7 12:12:01 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemastypes.c: Tiny changes in the comparison functions + I forgot to commit last time. + +Fri Mar 4 22:51:42 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Added IDC validation of anySimpleType attribute + values; anyway the IDC key comparison is restricted to + anySimpleType <--> string based types. For other types we + would possibly need the canonical lexical representation of + them; this sounds not performant, since we would need to + build such a representation each time we want to compare against + anySimpleType. TODO: think about buffering the canonical values + somewhere. Fixed error reports for default attributes to work + without a node being specified. This all and the enabling of IDC + validation fixes bug #165346 (reported by Benoit Gr?goire - could + not read his last name correctly from bugzilla). + +Fri Mar 4 18:57:44 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Enabled IDC parsing and validation. + * xmlschemastypes.c include/libxml/xmlschemastypes.h: + Added xmlSchemaCopyValue to the API; this was done due to + validation of default attributes against IDCs: since IDC keys + consume the precomputed value, one needs a copy. + * pattern.c: Enabled IDC support; this is currently done + via calling xmlPatterncompile with a flag arg of 1. + +Wed Mar 2 11:45:18 CET 2005 Daniel Veillard <daniel@veillard.com> + + * Makefile.am doc/examples/Makefile.am python/tests/Makefile.am + xstc/Makefile.am: try to fix a problem with valgrind. + * python/generator.py python/libxml.c python/tests/Makefile.am + python/tests/tstmem.py: applied memory leak fix from Brent Hendricks + c.f. bug #165349 + +Mon Feb 28 11:18:24 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * tree.c: Changed xmlSearchNsByHref to call xmlNsInScope with + the prefix instead of the namespace name. + * test/schemas/annot-err_0.xsd test/schemas/element-err_0.xsd: + Adapted invalid values of the "id" attribute, since they are + validated now. + +Fri Feb 25 08:31:16 CET 2005 Daniel Veillard <daniel@veillard.com> + + * threads.c: new version with fixes from Rob Richards + +Thu Feb 24 16:37:51 CET 2005 Daniel Veillard <daniel@veillard.com> + + * threads.c: applied patch from Rich Salz for multithreading on + Windows. + +Wed Feb 23 15:04:46 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlwriter.c: applied a patch from Rob Richards fixing a couple + of bugs in the writer + +Mon Feb 21 21:51:03 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * xmlsave.c: fixed problem when XMLLINT_INDENT was empty (bug 168033). + * xpath.c: fixed compilation warning, no change to logic. + * xmlschemastypes.c: fixed compilation warning, no change to logic. + +Mon Feb 21 14:48:27 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlwriter.c: applied patch from Rob Richards to fix a problem with + xmlTextWriterStartAttributeNS + +Mon Feb 21 11:41:41 CET 2005 Daniel Veillard <daniel@veillard.com> + + * pattern.c xpath.c: fixed remaining known bugs in the XPath streaming, + and switched XPath to use it by default when possible + +Sat Feb 19 19:25:14 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlschemastypes.c: a bit of cleanup + * elfgcchack.h testapi.c doc/*: rebuilt the API the tests and + the documentation as a result. + +Fri Feb 18 20:34:03 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlreader.c include/libxml/xmlreader.h: applied patch from + Aron Stansvik to add xmlTextReaderByteConsumed() + * testReader.c: added a test option + * xmlschemastypes.c: fix a lack of pointer checking in APIs + +Fri Feb 18 12:41:10 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * test/schemas/bug167754_0*: Added the regression test of Frans + Englich for bug #167754. + +Fri Feb 18 12:31:49 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Started support for IDC resolution to default + attributes. If building the content model for <all>: ensured + to put element declarations and not the particles into the + content model automaton (this was bug #167754, reported by + Frans Englich). + +Thu Feb 17 22:31:58 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * pattern.c pattern.h: Some experimental addition for parsing + of expressions and streamable validation. + Added xmlStreamPushAttr to the API. + +Thu Feb 17 19:57:35 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Added validation for the attribute "id" in the + schemata; doing this needed error report fixes for notations, + facets and group. Changed NOTATION validation to work with the + declared NOTATIONs in the schema; this does have no impact on + the validation via the relaxng module. + * xmlschemastypes.c include/libxml/xmlschemastypes.h: + Added xmlSchemaNewNOTATIONValue to the API to be able to do + the NOTATION validation described above. + * test/schemas/element-err_0.xsd test/schemas/annot-err_0.xsd: + Fixed the values of the "id" attributes, which were not validated + previously. + +Thu Feb 17 12:03:46 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Fixed comparison for default/fixed attribute + values, if the type was 'xsd:string'. Changed the comparison + for IDCs to use the whitespace aware comparison function. + * xmlschemastypes.c include/libxml/xmlschemastypes.h: + Added xmlSchemaGetCanonValue, xmlSchemaNewStringValue and + xmlSchemaCompareValuesWhtsp to the API. Added functions + to compare strings with whitespace combinations of "preserve", + "replace" and "collapse". + +Wed Feb 16 13:24:35 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Further work on IDCs, especially evaluation for + attribute nodes. + +Wed Feb 16 01:19:27 CET 2005 Daniel Veillard <daniel@veillard.com> + + * encoding.c: fix the comment to describe the real return values + * pattern.c xpath.c include/libxml/pattern.h: lot of work on + the patterns, pluggin in the XPath default evaluation, but + disabled right now because it's not yet good enough for XSLT. + pattern.h streaming API are likely to be changed to handle + relative and absolute paths in the same expression. + +Tue Feb 15 15:33:32 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Added IDC evaluation for attribute nodes. + Made 'nil'ed elements work. Added a specific error message + for 'strict' attribute wildcards. + * include/libxml/xmlerror.h: Added an error code for + wildcards. + * result/schemas/anyAttr-processContents-err1_0_0.err: Adapted. + +Sun Feb 13 16:15:03 HKT 2005 William Brack <wbrack@mmm.com.hk> + + This change started out as a simple desire to speed up the + execution time of testapi.c, which was being delayed by + nameserver requests for non-existent URL's. From there it + just sort of grew, and grew.... + * nanohttp.c, nanoftp.c: changed the processing of URL's + to use the uri.c routines instead of custom code. + * include/libxml/xmlerror.h: added code XML_FTP_URL_SYNTAX + * uri.c: added accepting ipV6 addresses, in accordance with + RFC's 2732 and 2373 (TODO: allow ipV4 within ipV6) + * gentest.py, testapi.c: fixed a few problems with the + testing of the nanoftp and nanohttp routines. + * include/libxml/xmlversion.h: minor change to fix a + warning on the docs generation + * regenerated the docs + +Sat Feb 12 09:07:11 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * xinclude.c: fixed xmlXIncludeParseFile to prevent + overwriting XML_COMPLETE_ATTRS when setting pctxt->loadsubset + (bug 166199) + * Makefile.am, python/tests/Makefile.am, xstc/Makefile.am: added + code to add $(top_builddir)/.libs to LD_LIBRARY_PATH whenever + PYTHONPATH is set, to assure new libxml2 routines are used. + +Fri Feb 11 22:20:41 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * parser.c: fixed problem when no initial "chunk" was + given to xmlCreatePushParser (bug 162613) + +Fri Feb 11 18:37:22 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * dict.c: fixed compilation warning + * parser.c: changed xmlWarningMsg so ctxt->errNo is not set + * xmllint.c: changed to return non-zero status if error + on xinclude processing + * xmlsave.c: minor deletion of a redundant condition statement + +Wed Feb 9 17:47:40 CET 2005 Daniel Veillard <daniel@veillard.com> + + * tree.c: applied patch to xmlSetNsProp from Mike Hommey + +Sun Feb 6 00:17:57 CET 2005 Daniel Veillard <daniel@veillard.com> + + * pattern.c xmllint.c: fixed implementation for | + * test/pattern/conj.* result/pattern/conj: added a specific regression + test + +Sat Feb 5 18:36:56 CET 2005 Daniel Veillard <daniel@veillard.com> + + * pattern.c: first implementation for | support + +Sat Feb 5 14:58:46 CET 2005 Daniel Veillard <daniel@veillard.com> + + * pattern.c: fixed the namespaces support + * tree.c: fixed xmlGetNodePath when namespaces are used + * result/pattern/multiple result/pattern/namespaces + test/pattern/multiple.* test/pattern/namespaces.*: added + more regression tests + +Fri Feb 4 18:26:43 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlschemas.c: fixed one internal function + * doc/Makefile.am doc/wiki.xsl: applied patch from Joel Reed + * testapi.c doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated + +Fri Feb 4 00:25:43 CET 2005 Daniel Veillard <daniel@veillard.com> + + * Makefile.am: use the walker to test the patterns instead of + the normal reader + * pattern.c xmllint.c: bug fixes in the train including fixing the + stupid build break. + +Tue Feb 1 18:15:52 CET 2005 Daniel Veillard <daniel@veillard.com> + + * pattern.c: more bug fixes for the XPath streaming code. + +Mon Jan 31 17:59:24 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Integrated the streaming pattern from the + pattern module. Fixed some IDC code bugs. Changed + fallback for attribute declaration addition to work like for + element declarations. + +Mon Jan 31 01:27:22 CET 2005 Daniel Veillard <daniel@veillard.com> + + * pattern.c xmllint.c: bugfixes around the streaming patterns + +Sun Jan 30 23:35:19 CET 2005 Daniel Veillard <daniel@veillard.com> + + * Makefile.am configure.in result/pattern/simple + test/pattern/simple.*: added first test for the patterns + * pattern.c xmllint.c: a few fixes + +Sun Jan 30 19:27:23 CET 2005 Daniel Veillard <daniel@veillard.com> + + * pattern.c include/libxml/pattern.h xmllint.c: added a + streaming pattern detector for a subset of XPath, should + help Kasimier for identity constraints + * python/generator.py: applied Stephane Bidoul patch to find + paths without breaking. + +Fri Jan 28 18:53:40 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlschemas.c: fixed an untested pointer dereference and a & vs && + +Fri Jan 28 18:37:18 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlreader.c: implementation of xmlTextReaderReadString by + Bjorn Reese + +Fri Jan 28 16:51:47 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Corrected an ambigious symbol-space for + local attribute declarations. IFDEFed more IDC code to + surpress compiler warnings. + +Fri Jan 28 00:57:04 CET 2005 Daniel Veillard <daniel@veillard.com> + + * bakefile/Readme.txt bakefile/Bakefiles.bkgen bakefile/libxml2.bkl: + files for the Bakefile generator for Makefiles from Francesco + Montorsi + * win32/configure.js: fixes for Windows compilation with non-default + flags by Joel Reed + +Thu Jan 27 18:23:50 CET 2005 Daniel Veillard <daniel@veillard.com> + + * tree.c: fixed xmlCopyDoc to also copy the doc->URL as pointed + by Martijn Faassen + +Thu Jan 27 13:39:04 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c include/libxml/schemasInternals.h: + Added an initial skeleton for indentity-constraints. This is all + defined out, since not complete, plus it needs support from other + modules. + Added machanism to store element information for the + ancestor-or-self axis; this is needed for identity-constraints + and should be helpfull for a future streamable validation. + * include/libxml/xmlerror.h: Added an error code for + identity-constraints. + +Wed Jan 26 01:03:37 CET 2005 Daniel Veillard <daniel@veillard.com> + + * gentest.py testapi.c: had to fix generation and rebuild. + * valid.c: the testapi found a bug in the last code of course ! + +Wed Jan 26 00:43:05 CET 2005 Daniel Veillard <daniel@veillard.com> + + * Makefile.am testapi.c doc/Makefile.am: fixing the way testapi.c + is generated, fixes bug #161386 + * dict.c: fix a comment typo + * elfgcchack.h doc/*: regenerated + +Tue Jan 25 22:39:33 CET 2005 Daniel Veillard <daniel@veillard.com> + + * parser.c: found and fixed 2 problems in the internal subset scanning + code affecting the push parser (and the reader), fixes #165126 + * test/intsubset2.xml result//intsubset2.xml*: added the test case + to the regression tests. + +Tue Jan 25 01:20:11 CET 2005 Daniel Veillard <daniel@veillard.com> + + * testdso.c xmlregexp.c: warning patches from Peter Breitenlohner + * include/libxml/valid.h valid.c parser.c: serious DTD parsing + speedups, start to deprecate 3 ElementDef related entry point + and replace them with better ones. + +Mon Jan 24 00:47:41 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlschemas.c: more hash dictionary interning changes + +Sun Jan 23 23:54:39 CET 2005 Daniel Veillard <daniel@veillard.com> + + * hash.c include/libxml/hash.h: added xmlHashCreateDict where + the hash reuses the dictionnary for internal strings + * entities.c valid.c parser.c: reuse that new API, leads to a decent + speedup when parsing for example DocBook documents. + +Sun Jan 23 21:14:20 CET 2005 Daniel Veillard <daniel@veillard.com> + + * parser.c: small speedup in skipping blanks characters + * entities.c: interning the entities strings + +Sun Jan 23 18:35:00 CET 2005 Daniel Veillard <daniel@veillard.com> + + * parser.c: boosting common commnent parsing code, it was really + slow. + * test/comment[3-5].xml result//comment[3-5].xml*: added sprecific + regression tests + +Sun Jan 23 01:00:09 CET 2005 Daniel Veillard <daniel@veillard.com> + + * parser.c: small optimization back. + +Sat Jan 22 00:40:31 CET 2005 Daniel Veillard <daniel@veillard.com> + + * dict.c parser.c include/libxml/dict.h: a single lock version + mostly avoid the cost penalty of the lock in case of low + parallelism, so applying that version instead. + +Fri Jan 21 17:54:06 CET 2005 Daniel Veillard <daniel@veillard.com> + + * dict.c: patch from Gary Coady to fix a race in dict reference + counting in multithreaded apps. + +Fri Jan 21 16:08:21 CET 2005 Daniel Veillard <daniel@veillard.com> + + * parser.c: fixed bug #164556 where non-fatal errors stopped + push parsing and xmlreader. + * Makefile.am: fixup + * test/errors/webdav.xml result/errors/webdav*: adding regression + test for this problem. + +Wed Jan 19 17:24:34 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Corrected targetNamespace in + xmlSchemaElementDump. Cosmetic changes to the dump output. + Sun Jan 16 21:00:53 CET 2005 Daniel Veillard <daniel@veillard.com> * configure.in NEWS doc/*: preparing release of 2.6.17, @@ -314,23 +755,30 @@ Wed Nov 24 13:41:52 CET 2004 Daniel Veillard <daniel@veillard.com> Wed Nov 17 13:54:37 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net> - * xmlschemas.c: tiny enhancement for content model error reports (#157190, #143948). - Removed abbreviations: CT, ST and WC (#157190, reported by Frans Englich). + * xmlschemas.c: tiny enhancement for content model error reports + (#157190, #143948). Removed abbreviations: CT, ST and WC + (#157190, reported by Frans Englich). Initial: no report of local components. - * result/schemas/all* result/schemas/any3_0_0.err result/schemas/choice* - result/schemas/cos-st-restricts-1-2-err_0_0.err result/schemas/derivation-ok-extension-err_0_0.err - result/schemas/derivation-ok-extension_0_0.err result/schemas/derivation-ok-restriction-2-1-1_0_0.err - result/schemas/derivation-ok-restriction-4-1-err_0_0.err result/schemas/deter0_0_0.err - result/schemas/extension1_0_2.err result/schemas/facet-unionST-err1_0_0.err - result/schemas/hexbinary_0_1.err result/schemas/list* result/schemas/restriction-attr1_0_0.err - result/schemas/vdv-first4_0_1.err result/schemas/vdv-first4_0_2.err: Adapted output. + * result/schemas/all* result/schemas/any3_0_0.err + result/schemas/choice* + result/schemas/cos-st-restricts-1-2-err_0_0.err + result/schemas/derivation-ok-extension-err_0_0.err + result/schemas/derivation-ok-extension_0_0.err + result/schemas/derivation-ok-restriction-2-1-1_0_0.err + result/schemas/derivation-ok-restriction-4-1-err_0_0.err + result/schemas/deter0_0_0.err result/schemas/extension1_0_2.err + result/schemas/facet-unionST-err1_0_0.err + result/schemas/hexbinary_0_1.err + result/schemas/list* result/schemas/restriction-attr1_0_0.err + result/schemas/vdv-first4_0_1.err result/schemas/vdv-first4_0_2.err: + Adapted output. Mon Nov 15 13:04:28 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net> * xmlschemas.c: Moved execution of xmlSchemaCheckDefaults to - xmlSchemaTypeFixup; this ensures facets of inherited types to be checked - prior to facets of derived types - which caused a seg fault otherwise - (bug #158216, reported by Frans Englich). + xmlSchemaTypeFixup; this ensures facets of inherited types to be + checked prior to facets of derived types - which caused a seg + fault otherwise (bug #158216, reported by Frans Englich). Sun Nov 14 22:23:18 HKT 2004 William Brack <wbrack@mmm.com.hk> diff --git a/Makefile.am b/Makefile.am index 92dd8b9..c857b62 100644 --- a/Makefile.am +++ b/Makefile.am @@ -123,7 +123,14 @@ noinst_LTLIBRARIES = testdso.la testdso_la_SOURCES = testdso.c testdso_la_LDFLAGS = -module -rpath $(libdir) -testapi.c: $(srcdir)/gentest.py doc/libxml2-api.xml +# that one forces the rebuild when "make rebuild" is run on doc/ +rebuild_testapi: + -@(if [ "$(PYTHON)" != "" ] ; then \ + $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) + +# that one is just to make sure it is rebuilt if missing +# but adding the dependances generate mess +testapi.c: -@(if [ "$(PYTHON)" != "" ] ; then \ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) @@ -141,7 +148,7 @@ check-local: all tests testall : tests SVGtests SAXtests -tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ +tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ $(MAKE) MAKEFLAGS+=--silent tests ; fi) @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests) @@ -149,7 +156,7 @@ tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TES valgrind: @echo '## Running the regression tests under Valgrind' @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' tests + $(MAKE) CHECKER='valgrind' tests APItests: testapi$(EXEEXT) @echo "## Running the API regression tests this may take a little while" @@ -354,15 +361,14 @@ Errtests : xmllint$(EXEEXT) echo New test file $$name ; \ $(CHECKER) $(top_builddir)/xmllint --stream $$i \ 2> $(srcdir)/result/errors/$$name.str \ - > $(srcdir)/result/errors/$$name ; \ + > /dev/null ; \ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ else \ - log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > result.$$name ; \ + log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ - diff $(srcdir)/result/errors/$$name result.$$name ; \ diff $(srcdir)/result/errors/$$name.str error.$$name` ; \ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ - rm result.$$name error.$$name ; \ + rm error.$$name ; \ fi ; fi ; done) Docbtests : xmllint$(EXEEXT) @@ -979,6 +985,8 @@ RelaxNGPythonTests: @(if [ -x $(PYTHON) ] ; then \ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ echo "## Relax-NG Python based test suite 1" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \ echo "## Relax-NG Python based test suite 2" ; \ @@ -989,12 +997,38 @@ SchemasPythonTests: @(if [ -x $(PYTHON) ] ; then \ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ echo "## XML Schemas datatypes Python based test suite" ; \ echo "## It is normal to see 6 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) +Patterntests: xmllint$(EXEEXT) + @(echo > .memdump) + @echo "## Pattern regression tests" + -@(for i in $(srcdir)/test/pattern/*.pat ; do \ + name=`basename $$i .pat`; \ + if [ -f $(srcdir)/test/pattern/$$name.xml ] ; then \ + if [ ! -f $(srcdir)/result/pattern/$$name ] ; then \ + rm -f result.$$name ; \ + echo New test file $$name ; \ + for pat in `cat $$i` ; do \ + $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml >> $(srcdir)/result/pattern/$$name ; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ + done ;\ + else \ + rm -f result.$$name ; \ + lst=`cat $$i` ; \ + log=`for pat in $$lst ; do $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml 2>&1 >> result.$$name ; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ + done ;\ + diff $(srcdir)/result/pattern/$$name result.$$name` ; \ + if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ + rm result.$$name ; \ + fi ; fi ; done ;) + ModuleTests: testModule$(EXEEXT) testdso.la @echo "## Module tests" @(./testModule$(EXEEXT)) @@ -1004,7 +1038,7 @@ cleanup: dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) - (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms bakefile test result SAXresult ) | (cd $(distdir); tar xf -) dist-source: distdir $(AMTAR) -chof - --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz diff --git a/Makefile.in b/Makefile.in index 32ac192..3c199aa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -285,7 +285,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -308,6 +307,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ @@ -1369,7 +1369,14 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man1 uninstall-man3 uninstall-pkgconfigDATA -testapi.c: $(srcdir)/gentest.py doc/libxml2-api.xml +# that one forces the rebuild when "make rebuild" is run on doc/ +rebuild_testapi: + -@(if [ "$(PYTHON)" != "" ] ; then \ + $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) + +# that one is just to make sure it is rebuilt if missing +# but adding the dependances generate mess +testapi.c: -@(if [ "$(PYTHON)" != "" ] ; then \ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) @@ -1382,7 +1389,7 @@ check-local: all tests testall : tests SVGtests SAXtests -tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ +tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ $(MAKE) MAKEFLAGS+=--silent tests ; fi) @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests) @@ -1390,7 +1397,7 @@ tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TES valgrind: @echo '## Running the regression tests under Valgrind' @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' tests + $(MAKE) CHECKER='valgrind' tests APItests: testapi$(EXEEXT) @echo "## Running the API regression tests this may take a little while" @@ -1595,15 +1602,14 @@ Errtests : xmllint$(EXEEXT) echo New test file $$name ; \ $(CHECKER) $(top_builddir)/xmllint --stream $$i \ 2> $(srcdir)/result/errors/$$name.str \ - > $(srcdir)/result/errors/$$name ; \ + > /dev/null ; \ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ else \ - log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > result.$$name ; \ + log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ - diff $(srcdir)/result/errors/$$name result.$$name ; \ diff $(srcdir)/result/errors/$$name.str error.$$name` ; \ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ - rm result.$$name error.$$name ; \ + rm error.$$name ; \ fi ; fi ; done) Docbtests : xmllint$(EXEEXT) @@ -2220,6 +2226,8 @@ RelaxNGPythonTests: @(if [ -x $(PYTHON) ] ; then \ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ echo "## Relax-NG Python based test suite 1" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \ echo "## Relax-NG Python based test suite 2" ; \ @@ -2230,12 +2238,38 @@ SchemasPythonTests: @(if [ -x $(PYTHON) ] ; then \ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ echo "## XML Schemas datatypes Python based test suite" ; \ echo "## It is normal to see 6 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) +Patterntests: xmllint$(EXEEXT) + @(echo > .memdump) + @echo "## Pattern regression tests" + -@(for i in $(srcdir)/test/pattern/*.pat ; do \ + name=`basename $$i .pat`; \ + if [ -f $(srcdir)/test/pattern/$$name.xml ] ; then \ + if [ ! -f $(srcdir)/result/pattern/$$name ] ; then \ + rm -f result.$$name ; \ + echo New test file $$name ; \ + for pat in `cat $$i` ; do \ + $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml >> $(srcdir)/result/pattern/$$name ; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ + done ;\ + else \ + rm -f result.$$name ; \ + lst=`cat $$i` ; \ + log=`for pat in $$lst ; do $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml 2>&1 >> result.$$name ; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ + done ;\ + diff $(srcdir)/result/pattern/$$name result.$$name` ; \ + if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ + rm result.$$name ; \ + fi ; fi ; done ;) + ModuleTests: testModule$(EXEEXT) testdso.la @echo "## Module tests" @(./testModule$(EXEEXT)) @@ -2245,7 +2279,7 @@ cleanup: dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) - (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms bakefile test result SAXresult ) | (cd $(distdir); tar xf -) dist-source: distdir $(AMTAR) -chof - --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz @@ -15,6 +15,33 @@ ChangeLog.html to the CVS at http://cvs.gnome.org/viewcvs/libxml2/ code base.There is the list of public releases: +2.6.18: Mar 13 2005: + - build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones). + - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, + URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python + paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, + xmlSetNsProp fix (Mike Hommey), warning should not count as error + (William Brack), xmlCreatePushParser empty chunk, XInclude parser + flags (William), cleanup FTP and HTTP code to reuse the uri parsing + and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), + XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), + multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), + Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 + on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type + fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer). + - improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik), + - Documentation: Wiki support (Joel Reed) + + + 2.6.17: Jan 16 2005: - build fixes: Windows, warnings removal (William Brack), maintainer-clean dependency(William), build in a different directory diff --git a/bakefile/Bakefiles.bkgen b/bakefile/Bakefiles.bkgen new file mode 100644 index 0000000..f258ae5 --- /dev/null +++ b/bakefile/Bakefiles.bkgen @@ -0,0 +1,15 @@ +<?xml version="1.0" ?>
+<!-- $Id: Bakefiles.bkgen,v 1.1 2005/01/27 23:59:14 veillard Exp $ -->
+
+<bakefile-gen>
+
+ <disable-formats>gnu,dmars,cbx_unix,cbuilderx</disable-formats>
+ <input>libxml2.bkl</input>
+
+ <!-- List of output formats to generate: -->
+ <add-formats>
+ borland,dmars,mingw,msvc,msvc6prj,watcom,cbuilderx,cbx_unix,gnu
+ </add-formats>
+
+
+</bakefile-gen>
\ No newline at end of file diff --git a/bakefile/Readme.txt b/bakefile/Readme.txt new file mode 100644 index 0000000..98a9ca8 --- /dev/null +++ b/bakefile/Readme.txt @@ -0,0 +1,92 @@ +
+ LIBXML2 build system for Win32 README
+ -------------------------------------
+
+ In this folder are stored all the files required to compile LIBXML2 with win32 compilers.
+ Bakefile (http://bakefile.sourceforge.net) is used as makefile generator.
+
+ Supported makefiles:
+ - makefile.vc for Microsoft NMAKE
+ - makefile.bcc for Borland MAKE
+ - makefile.wat for OpenWatcom MAKE
+ - makefile.gcc for MinGW MINGW32-MAKE
+ - all DSP & DSW for Microsoft VisualC++ 6.0 (can be used also with VS.NET AFAIK)
+
+ This readme is organized as:
+ 1.0 HOWTO compile LIBXML2 using makefiles <-- for users who want to build the library using *command-line*
+ 1.1 HOWTO compile LIBXML2 using an IDE <-- for users who want to build the library using an *IDE*
+ 1.2 HOWTO regenerate makefiles for LIBXML2 <-- for libxml2 mantainers/developers/advanced users
+
+ If you just want to compile the library (and the test programs) you should definitely avoid the
+ section 1.1 and focus on the 1.0.
+
+
+
+
+
+
+ 1.0 HOWTO compile LIBXML2 using makefiles
+ -----------------------------------------
+
+ Choose your preferred compiler among those actually supported (see above) and then run
+
+ mycompilermake -fmakefile.makefileext [options]
+
+ for a full list of the available options you should open with a notepad (or something like that)
+ the makefile you want to use; at the beginning you should see a section which starts as:
+
+ # -------------------------------------------------------------------------
+ # These are configurable options:
+ # -------------------------------------------------------------------------
+
+ here you can find all the options actually used by that makefile.
+ They can be customized when running the makefile writing something like:
+
+ nmake -fmakefile.vc BUILD=release
+ mingw32-make -fmakefile.gcc BUILD=debug ICONV_DIR=c:\myiconv
+
+ or they can be permanently changed modifying the makefile.
+ That's all: for any problem/compile-error/suggestion, write to
+ frm@users.sourceforge.net with the word "libxml2" in the subject.
+
+
+
+
+
+ 1.1 HOWTO compile LIBXML2 using an IDE
+ --------------------------------------
+
+ Actually only the Microsoft VisualC++ 6.0 project files are generated.
+ In future other Integrated Development Environments (IDEs) will be supported as well.
+
+ With MSVC++ 6.0, you should open the DSW file and then set as the active project the
+ "libxml2" project, if you want to build the library or one of the test projects if you
+ want to run them.
+ Using the command "Build->Set Active Configuration" you can choose one of the predefined
+ configuration.
+
+
+
+
+
+ 1.2 HOWTO regenerate makefiles for LIBXML2
+ ------------------------------------------
+
+ Be sure to have installed Bakefile (http://bakefile.sourceforge.net).
+ Just run the "bakefile_gen" command inside the folder containing the "libxml2.bkl" file.
+ NOTE: if you want to remove all the makefiles, you can use the "bakefile_gen -c" command.
+
+ The template files used to generate all makefiles are only two:
+ - libxml2.bkl (the main one)
+ - Bakefiles.bkgen
+ All the other files can be dinamically regenerated.
+
+
+
+
+
+ If you have problems with the compilation of LIBXML2 under windows (using one of the supported compiler)
+ please write to:
+
+ Francesco Montorsi <frm@users.sourceforge.net>
+
diff --git a/bakefile/libxml2.bkl b/bakefile/libxml2.bkl new file mode 100644 index 0000000..8efe472 --- /dev/null +++ b/bakefile/libxml2.bkl @@ -0,0 +1,749 @@ +<?xml version="1.0" ?>
+
+<!-- Author: Francesco Montorsi <frm@users.sourceforge.net> -->
+<!-- Date: 30/8/2004 -->
+<!-- Last revision: 26/1/2005 -->
+
+
+<!-- LIBXML2 BAKEFILE -->
+<!-- -->
+<!-- The bakefile used to build the library and the test -->
+<!-- programs. The makefiles output is put: -->
+<!-- -->
+<!-- - in the ..\LIB folder -->
+<!-- - in the ..\BIN folder -->
+<!-- -->
+
+<makefile>
+
+ <using module="datafiles"/>
+ <requires version="0.1.5"/>
+
+
+ <!-- This is a bakefile, that is, a generic template used to -->
+ <!-- generate makefiles ALL supported compilers. -->
+ <!-- To use this project file you need Bakefile installed. -->
+ <!-- With the command "bakefile_gen" you can regen all the -->
+ <!-- makefiles and project files. -->
+ <!-- See http://bakefile.sourceforge.net for more info. -->
+
+
+ <!--
+ This file is divided in:
+ - generic options
+ - generic variables
+ - libxml2 options
+ - libxml2 variables
+ - about config.h creation
+ - templates
+ - libxml2 library target
+ - libxml2 test program targets
+ -->
+
+
+
+ <!-- -->
+ <!-- GENERIC OPTIONS -->
+ <!-- -->
+
+
+ <!-- This is a standard option that determines -->
+ <!-- whether the user wants to build this library as -->
+ <!-- a dll or as a static library. -->
+ <option name="SHARED">
+ <values>0,1</values>
+ <values-description>,DLL</values-description>
+ <default-value>0</default-value>
+ <description>If set to zero a STATIC libxml library will be built</description>
+ </option>
+
+ <!-- Configuration for building the bakefile with -->
+ <!-- unicode strings or not (unicode or ansi). -->
+ <option name="UNICODE">
+ <values>0,1</values>
+ <values-description>,Unicode</values-description>
+ <default-value>0</default-value>
+ <description>Compile Unicode build?</description>
+ </option>
+
+
+ <!-- There are several options that deal with build -->
+ <!-- types. First, there's this one, BUILD. -->
+ <!-- -->
+ <!-- BUILD determines whether or not we want to build -->
+ <!-- in release or debug mode. Note that in practice -->
+ <!-- this means modifying the optimize tag, which by -->
+ <!-- default is set to off. In this case debug means -->
+ <!-- off (no optimizations), and release means speed -->
+ <!-- (fast with inlining). There is also a size option -->
+ <!-- that is not addressed in this example bakefile. -->
+ <option name="BUILD">
+ <values>debug,release</values>
+ <values-description>Debug,Release</values-description>
+ <default-value>release</default-value>
+ <description>
+ Type of compiled binaries
+ </description>
+ </option>
+
+
+
+ <!-- -->
+ <!-- GENERIC VARIABLES -->
+ <!-- -->
+
+ <!-- Set the ISDLL variable, so that we can use it -->
+ <!-- inside an if statement later on (options not -->
+ <!-- allowed in if statements). -->
+ <set var="ISDLL" cond="SHARED=='1'">1</set>
+ <set var="ISDLL" cond="SHARED=='0'">0</set>
+
+ <!-- The unicode define we want. By default bakefile -->
+ <!-- makes variables an empty string, so if unicode -->
+ <!-- is not defined $(UNICODE_DEFINE) would expand -->
+ <!-- to nothing (literally). -->
+ <set var="UNICODE_DEFINE">
+ <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
+ </set>
+
+ <!-- The debug define we need with win32 compilers -->
+ <!-- (on Linux, the wx-config program is used). -->
+ <set var="DEBUG_DEFINE">
+ <if cond="FORMAT!='autoconf' and BUILD=='debug'">
+ __WXDEBUG__
+ </if>
+ </set>
+
+ <!-- Value we will use later on for the debug-info -->
+ <!-- tag inside our templates. -->
+ <set var="DEBUGINFO">
+ <if cond="BUILD=='debug'">on</if>
+ <if cond="BUILD=='release'">off</if>
+ </set>
+
+ <!-- Value we will use later on for the debug-runtime -->
+ <!-- tag inside our templates. -->
+ <set var="DEBUGRUNTIME">
+ <if cond="BUILD=='debug'">on</if>
+ <if cond="BUILD=='release'">off</if>
+ </set>
+
+ <!-- Value for optimize tag. -->
+ <set var="OPTIMIZEFLAG">
+ <if cond="BUILD=='debug'">off</if>
+ <if cond="BUILD=='release'">speed</if>
+ </set>
+
+ <!-- Level of warnings. Here we max it out in debug -->
+ <!-- mode, and turn them off in release mode. -->
+ <set var="WARNINGS">
+ <if cond="BUILD=='debug'">max</if>
+ <if cond="BUILD=='release'">no</if>
+ </set>
+
+ <!-- Set MYCPPFLAGS as empty; maybe it will be filled later... -->
+ <set var="MYCPPFLAGS"></set>
+ <if cond="FORMAT=='mingw' or FORMAT=='autoconf'">
+
+ <!-- With GCC, settings warnings to MAX would force -->
+ <!-- Bakefile to call GCC with "-W -Wall" which generates -->
+ <!-- a *lot* of warnings about wxWidgets headers... -->
+ <!-- this is why "-W -Wall" is here replaced by "-Wall". -->
+ <set var="WARNINGS">default</set>
+ <set var="MYCPPFLAGS">-Wall</set>
+ </if>
+
+
+
+
+
+
+ <!-- -->
+ <!-- LIBXML2 OPTIONS -->
+ <!-- -->
+ <!-- Note #1: not all of them are used by win32 makefiles -->
+ <!-- -->
+ <!-- Note #2: since all combinations of non-path options are -->
+ <!-- translated into different 'configurations' by -->
+ <!-- Bakefile when using the MSVC6PRJ output, we must -->
+ <!-- avoid to create a 10 MB libxml2.dsp file forcing -->
+ <!-- some options to their default values... this -->
+ <!-- behaviour can be overridden by the -->
+ <!-- FULL_OPTIONS_SUPPORT -->
+ <!-- variable defined below... -->
+
+ <set var="FULL_OPTIONS_SUPPORT">
+ <if cond="FORMAT=='msvc6prj'">0</if>
+ <if cond="FORMAT!='msvc6prj'">1</if>
+ </set>
+
+ <option name="ICONV_DIR" category="path">
+ <default-value>c:\iconv</default-value>
+ <description>The iconv library main folder</description>
+ </option>
+
+ <option name="WITH_TRIO">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Enable TRIO string manipulator</description>
+ </option>
+
+ <!-- see the note #2 -->
+ <if cond="FULL_OPTIONS_SUPPORT=='0'">
+ <set var="WITH_THREADS">native</set>
+ </if>
+ <if cond="FULL_OPTIONS_SUPPORT=='1'">
+ <option name="WITH_THREADS">
+ <values>no,ctls,native,posix</values>
+ <default-value>native</default-value>
+ <description>Enable thread safety</description>
+ </option>
+ </if>
+
+ <option name="WITH_FTP">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable FTP client</description>
+ </option>
+
+ <option name="WITH_HTTP">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable HTTP client</description>
+ </option>
+
+ <option name="WITH_C14N">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable C14N support</description>
+ </option>
+
+ <option name="WITH_CATALOG">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable catalog support</description>
+ </option>
+
+ <option name="WITH_DOCB">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable DocBook support</description>
+ </option>
+
+ <option name="WITH_XPATH">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XPath support</description>
+ </option>
+
+ <option name="WITH_XPTR">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XPointer support</description>
+ </option>
+
+ <option name="WITH_XINCLUDE">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XInclude support</description>
+ </option>
+
+ <!-- see the note #2 -->
+ <if cond="FULL_OPTIONS_SUPPORT=='0'">
+ <set var="WITH_ICONV">1</set>
+ </if>
+ <if cond="FULL_OPTIONS_SUPPORT=='1'">
+ <option name="WITH_ICONV">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable iconv support</description>
+ </option>
+ </if>
+
+ <option name="WITH_ISO8859X">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Enable iso8859x support</description>
+ </option>
+
+ <!-- see the note #2 -->
+ <if cond="FULL_OPTIONS_SUPPORT=='0'">
+ <set var="WITH_ZLIB">0</set>
+ </if>
+ <if cond="FULL_OPTIONS_SUPPORT=='1'">
+ <option name="WITH_ZLIB">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Enable ZLIB support</description>
+ </option>
+ </if>
+
+ <option name="WITH_REGEXPS">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable regular expressions</description>
+ </option>
+
+ <option name="WITH_TREE">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable tree api</description>
+ </option>
+
+ <option name="WITH_READER">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlReader api</description>
+ </option>
+
+ <option name="WITH_WRITER">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlWriter api</description>
+ </option>
+
+ <option name="WITH_WALKER">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlDocWalker api</description>
+ </option>
+
+ <option name="WITH_PATTERN">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlPattern api</description>
+ </option>
+
+ <option name="WITH_PUSH">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable push api</description>
+ </option>
+
+ <option name="WITH_VALID">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable DTD validation support</description>
+ </option>
+
+ <option name="WITH_SAX1">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable SAX1 api</description>
+ </option>
+
+ <option name="WITH_SCHEMAS">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XML Schema support</description>
+ </option>
+
+ <option name="WITH_LEGACY">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable deprecated APIs</description>
+ </option>
+
+ <option name="WITH_OUTPUT">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable serialization support</description>
+ </option>
+
+ <option name="WITH_PYTHON">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Build Python bindings</description>
+ </option>
+
+
+
+
+ <!-- -->
+ <!-- LIBXML2 VARIABLES -->
+ <!-- -->
+
+ <!-- Put all the objects files generated by -->
+ <!-- the compilation in a subfolder of BUILD -->
+ <set var="BUILDDIR">$(FORMAT)</set>
+
+ <!-- This variable is set to 1 when the current output writer supports -->
+ <!-- the __DEFINE_ARG variable. Otherwise it's set to zero. -->
+ <set var="HAS_DEFINE_ARG">
+ <if cond="FORMAT!='msvc6prj'">1</if>
+ <if cond="FORMAT=='msvc6prj'">0</if>
+ </set>
+
+ <!-- The root directory of libxml2 -->
+ <set var="XMLBASEDIR">..</set>
+
+ <!-- The directory where libxml2' tests will be put -->
+ <set var="XMLTESTDIR">$(XMLBASEDIR)$(DIRSEP)bin</set>
+
+ <set var="LIBXML_MAJOR_VERSION">2</set>
+ <set var="LIBXML_MINOR_VERSION">6</set>
+ <set var="LIBXML_MICRO_VERSION">16</set>
+
+ <!-- some defines related to threads -->
+ <set var="THREADS_DEF">
+ <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='native'">
+ $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS
+ </if>
+ <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='ctls'">
+ $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS $(__DEFINE_ARG)HAVE_COMPILER_TLS
+ </if>
+ <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='posix'">
+ $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_PTHREAD_H
+ </if>
+ </set>
+ <if cond="FORMAT=='borland'">
+ <set var="THREADS_DEF">
+ <if cond="WITH_THREADS=='native'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
+ <if cond="WITH_THREADS=='ctls'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
+ <if cond="WITH_THREADS=='posix'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
+ </set>
+ </if>
+
+
+ <!-- some other conditional defines -->
+ <set var="ZLIB_DEF"><if cond="WITH_ZLIB=='1'">HAVE_ZLIB_H</if></set>
+ <set var="DEBUG_DEF"><if cond="BUILD=='debug'">_DEBUG</if></set>
+ <set var="DEBUG_DEF"><if cond="BUILD=='release'">NDEBUG</if></set>
+
+ <!-- this is very very important when compiling with MINGW: without this line,
+ the test programs (and all the programs built with libxml2 which use xmlFree)
+ won't build because of "undefined references to __xmlFree" -->
+ <set var="STATIC_DEF"><if cond="SHARED=='0'">LIBXML_STATIC</if></set>
+
+ <!-- some conditional libraries dependencies -->
+ <set var="ICONV_LIB"><if cond="WITH_ICONV=='1'">iconv</if></set>
+ <set var="WSOCK32_LIB"><if cond="WITH_THREADS=='native'">wsock32</if></set>
+ <set var="ZLIB_LIB"><if cond="WITH_ZLIB=='1'">zdll</if></set>
+ <set var="POSIX_LIB"><if cond="WITH_THREADS=='posix'">pthreadVC</if></set>
+
+ <set var="XMLINCLUDEDIR">$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)libxml$(DIRSEP)</set>
+
+
+
+
+ <!-- -->
+ <!-- ABOUT CONFIG.H HEADER CREATION -->
+ <!-- -->
+
+ <set var="CONFIG_SRCNAME">win32config.h</set>
+ <set var="CONFIG_DSTNAME">config.h</set>
+
+ <if cond="FORMAT!='msvc6prj' and FORMAT!='autoconf' and FORMAT!='gnu'">
+ <copy-file-to-file id="setup">
+ <!-- On win32 we need to manually copy a default config.h file -->
+ <!-- from the include/mc/msw folder to include/mc -->
+ <src>../include/$(CONFIG_SRCNAME)</src>
+ <dst>../$(CONFIG_DSTNAME)</dst>
+ <dependency-of>all</dependency-of>
+
+ <!-- With autoconf, we will use the configure script to translate -->
+ <!-- include/mc/config.h.in to include/mc/config.h and thus we do -->
+ <!-- not need to do anything here... -->
+ </copy-file-to-file>
+ </if>
+
+ <if cond="FORMAT!='msvc6prj'">
+
+ <mkdir id="setuplibdir"><dir>$(XMLBASEDIR)$(DIRSEP)lib</dir></mkdir>
+ <mkdir id="setupbindir"><dir>$(XMLBASEDIR)$(DIRSEP)bin</dir></mkdir>
+
+ <!-- Creates all output folders -->
+ <phony id="setupdirs">
+ <dependency-of>all</dependency-of>
+ <depends>setuplibdir</depends>
+ <depends>setupbindir</depends>
+ </phony>
+ </if>
+
+ <!-- This defines a tag which includes headers on MSVC -->
+ <!-- Note that $(value) is stuck in there by bakefile, -->
+ <!-- and is the value between the beginning and end tag. -->
+ <define-tag name="headers" rules="dll,lib,exe">
+ <if cond="FORMAT=='msvc6prj'">
+ <msvc-project-files>
+ $(value)
+ </msvc-project-files>
+ </if>
+ </define-tag>
+
+ <!-- Creates the following custom build rule for MSVC6PRJ file:
+ copies ..\include\win32config.h into ..\config.h
+ NOTE: this tag must be used before the <sources> tag if you want that the configuration
+ file will be created before any other source file is compiled... -->
+ <define-tag name="msvc-copy-setup-h" rules="dll,lib,action">
+ <if cond="FORMAT=='msvc6prj'">
+ <headers>$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</headers>
+ <set var="__subdir">$(value)</set>
+ <set var="_custom_build_files" append="1">$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</set>
+ <set var="_custom_build____include_win32config_h">
+Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\win32\$(CONFIG_SRCNAME)
+InputPath=..\include\$(CONFIG_SRCNAME)
+
+"..\include\$(CONFIG_SRCNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
+$(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME)
+ </set>
+ </if>
+ </define-tag>
+
+
+
+
+
+ <!-- -->
+ <!-- TEMPLATES -->
+ <!-- -->
+
+ <!-- The basic template: used by all the targets -->
+ <template id="base">
+ <if cond="FORMAT=='mingw'">
+ <define>HAVE_W32API_H</define>
+ <ldflags>-mthreads</ldflags>
+ </if>
+
+ <cxxflags>$(MYCPPFLAGS)</cxxflags>
+ <warnings>$(WARNINGS)</warnings>
+ <define>$(UNICODE_DEFINE)</define>
+ <optimize>$(OPTIMIZEFLAG)</optimize>
+ <debug-info>$(DEBUGINFO)</debug-info>
+ <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
+ </template>
+
+ <!-- The template used both by the library and by the test programs -->
+ <template id="xml2" template="base">
+
+ <!-- -I & -L equivalents -->
+ <include>$(XMLBASEDIR)$(DIRSEP)include</include>
+ <include>$(ICONV_DIR)$(DIRSEP)include</include>
+ <lib-path>$(ICONV_DIR)$(DIRSEP)lib</lib-path>
+
+ <!-- some conditional define flags -->
+ <cflags>$(THREADS_DEF)</cflags>
+ <define>$(ZLIB_DEF)</define>
+ <define>$(DEBUG_DEF)</define>
+ <define>$(STATIC_DEF)</define>
+
+ <if cond="HAS_DEFINE_ARG=='0'">
+
+ <!-- we are probably using an IDE output: defaults to WITH_THREADS=='native' -->
+ <define>_REENTRANT</define>
+ <define>HAVE_WIN32_THREADS</define>
+ </if>
+
+
+ <!-- these must always be defined on win32 -->
+ <define>WIN32</define>
+ <define>_WINDOWS</define>
+ <define>_MBCS</define>
+
+ <if cond="FORMAT=='borland'">
+ <define>_NO_VCL</define>
+ <define>EILSEQ=2</define>
+ </if>
+ </template>
+
+ <!-- The template used by libxml2 test programs -->
+ <template id="xml2test" template="xml2">
+ <dirname>$(XMLTESTDIR)</dirname>
+ <app-type>console</app-type>
+
+ <library>libxml2</library>
+
+ <sys-lib>$(ICONV_LIB)</sys-lib>
+ <sys-lib>$(WSOCK32_LIB)</sys-lib>
+ <sys-lib>$(ZLIB_LIB)</sys-lib>
+ <sys-lib>$(POSIX_LIB)</sys-lib>
+ </template>
+
+
+
+
+
+
+ <!-- -->
+ <!-- LIBXML2 LIBRARY TARGET -->
+ <!-- -->
+
+ <lib id="libxml2" template="xml2">
+
+ <!-- this is useful only when using MSVC6PRJ -->
+ <if cond="FORMAT=='msvc6prj'">
+ <msvc-copy-setup-h/>
+ <msvc-file-group>Config headers:*config.h</msvc-file-group>
+ </if>
+ <if cond="FORMAT!='msvc6prj'">
+ <depends>setup</depends>
+ <depends>setuplibdir</depends>
+ </if>
+
+ <!-- output folder -->
+ <dirname>$(XMLBASEDIR)$(DIRSEP)lib</dirname>
+
+ <!-- The output name must be "libxml2.lib" with all compilers.
+ Since mingw format autoadds the "lib" prefix to the library
+ name, we must intercept that case to avoid to get "liblibxml2.a" -->
+ <if cond="FORMAT!='mingw'">
+ <libname>libxml2</libname>
+ </if>
+ <if cond="FORMAT=='mingw'">
+ <libname>xml2</libname>
+ </if>
+
+ <!-- the list of source files to compile -->
+ <sources>
+ $(XMLBASEDIR)$(DIRSEP)c14n.c
+ $(XMLBASEDIR)$(DIRSEP)catalog.c
+ $(XMLBASEDIR)$(DIRSEP)chvalid.c
+ $(XMLBASEDIR)$(DIRSEP)debugXML.c
+ $(XMLBASEDIR)$(DIRSEP)dict.c
+ $(XMLBASEDIR)$(DIRSEP)DOCBparser.c
+ $(XMLBASEDIR)$(DIRSEP)encoding.c
+ $(XMLBASEDIR)$(DIRSEP)entities.c
+ $(XMLBASEDIR)$(DIRSEP)error.c
+ $(XMLBASEDIR)$(DIRSEP)globals.c
+ $(XMLBASEDIR)$(DIRSEP)hash.c
+ $(XMLBASEDIR)$(DIRSEP)HTMLparser.c
+ $(XMLBASEDIR)$(DIRSEP)HTMLtree.c
+ $(XMLBASEDIR)$(DIRSEP)legacy.c
+ $(XMLBASEDIR)$(DIRSEP)list.c
+ $(XMLBASEDIR)$(DIRSEP)nanoftp.c
+ $(XMLBASEDIR)$(DIRSEP)nanohttp.c
+ $(XMLBASEDIR)$(DIRSEP)parser.c
+ $(XMLBASEDIR)$(DIRSEP)parserInternals.c
+ $(XMLBASEDIR)$(DIRSEP)pattern.c
+ $(XMLBASEDIR)$(DIRSEP)relaxng.c
+ $(XMLBASEDIR)$(DIRSEP)SAX2.c
+ $(XMLBASEDIR)$(DIRSEP)SAX.c
+ $(XMLBASEDIR)$(DIRSEP)threads.c
+ $(XMLBASEDIR)$(DIRSEP)tree.c
+ $(XMLBASEDIR)$(DIRSEP)uri.c
+ $(XMLBASEDIR)$(DIRSEP)valid.c
+ $(XMLBASEDIR)$(DIRSEP)xinclude.c
+ $(XMLBASEDIR)$(DIRSEP)xlink.c
+ $(XMLBASEDIR)$(DIRSEP)xmlIO.c
+ $(XMLBASEDIR)$(DIRSEP)xmlmemory.c
+ $(XMLBASEDIR)$(DIRSEP)xmlreader.c
+ $(XMLBASEDIR)$(DIRSEP)xmlregexp.c
+ $(XMLBASEDIR)$(DIRSEP)xmlsave.c
+ $(XMLBASEDIR)$(DIRSEP)xmlschemas.c
+ $(XMLBASEDIR)$(DIRSEP)xmlschemastypes.c
+ $(XMLBASEDIR)$(DIRSEP)xmlunicode.c
+ $(XMLBASEDIR)$(DIRSEP)xmlwriter.c
+ $(XMLBASEDIR)$(DIRSEP)xpath.c
+ $(XMLBASEDIR)$(DIRSEP)xpointer.c
+ $(XMLBASEDIR)$(DIRSEP)xmlstring.c
+ </sources>
+
+ <!-- the list of header files (for IDE projects) -->
+ <headers>
+ $(XMLINCLUDEDIR)c14n.h
+ $(XMLINCLUDEDIR)catalog.h
+ $(XMLINCLUDEDIR)chvalid.h
+ $(XMLINCLUDEDIR)debugXML.h
+ $(XMLINCLUDEDIR)dict.h
+ $(XMLINCLUDEDIR)DOCBparser.h
+ $(XMLINCLUDEDIR)encoding.h
+ $(XMLINCLUDEDIR)entities.h
+ $(XMLINCLUDEDIR)globals.h
+ $(XMLINCLUDEDIR)hash.h
+ $(XMLINCLUDEDIR)HTMLparser.h
+ $(XMLINCLUDEDIR)HTMLtree.h
+ $(XMLINCLUDEDIR)list.h
+ $(XMLINCLUDEDIR)nanoftp.h
+ $(XMLINCLUDEDIR)nanohttp.h
+ $(XMLINCLUDEDIR)parser.h
+ $(XMLINCLUDEDIR)parserInternals.h
+ $(XMLINCLUDEDIR)pattern.h
+ $(XMLINCLUDEDIR)relaxng.h
+ $(XMLINCLUDEDIR)SAX.h
+ $(XMLINCLUDEDIR)SAX2.h
+ $(XMLINCLUDEDIR)schemasInternals.h
+ $(XMLINCLUDEDIR)threads.h
+ $(XMLINCLUDEDIR)tree.h
+ $(XMLINCLUDEDIR)uri.h
+ $(XMLINCLUDEDIR)valid.h
+ $(XMLINCLUDEDIR)xinclude.h
+ $(XMLINCLUDEDIR)xlink.h
+ $(XMLINCLUDEDIR)xmlautomata.h
+ $(XMLINCLUDEDIR)xmlerror.h
+ $(XMLINCLUDEDIR)xmlexports.h
+ $(XMLINCLUDEDIR)xmlIO.h
+ $(XMLINCLUDEDIR)xmlmemory.h
+ $(XMLINCLUDEDIR)xmlmodule.h
+ $(XMLINCLUDEDIR)xmlreader.h
+ $(XMLINCLUDEDIR)xmlregexp.h
+ $(XMLINCLUDEDIR)xmlsave.h
+ $(XMLINCLUDEDIR)xmlschemas.h
+ $(XMLINCLUDEDIR)xmlschemastypes.h
+ $(XMLINCLUDEDIR)xmlstring.h
+ $(XMLINCLUDEDIR)xmlunicode.h
+ $(XMLINCLUDEDIR)xmlversion.h
+ $(XMLINCLUDEDIR)xmlwriter.h
+ $(XMLINCLUDEDIR)xpath.h
+ $(XMLINCLUDEDIR)xpathInternals.h
+ $(XMLINCLUDEDIR)xpointer.h
+ </headers>
+
+ <!-- these ones are not inside the include/libxml folder -->
+ <headers>
+ $(XMLBASEDIR)$(DIRSEP)libxml.h
+ $(XMLBASEDIR)$(DIRSEP)triodef.h
+ $(XMLBASEDIR)$(DIRSEP)trionan.h
+ $(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)wsockcompat.h
+ </headers>
+ </lib>
+
+
+
+ <!-- -->
+ <!-- LIBXML2 test programs -->
+ <!-- -->
+
+ <set var="BUILD_ALL_TESTS">
+
+ <!-- when using full options support with MSVC6PRJ we should
+ avoid to create all the DSP files required for the test
+ programs: they would take a _lot_ of space !! -->
+ <if cond="FORMAT=='msvc6prj' and FULL_OPTIONS_SUPPORT=='1'">0</if>
+
+ <!-- when creating a makefile or using MSVC6PRJ with limited
+ options support, then we can build all the tests safely -->
+ <if cond="FORMAT!='msvc6prj' or FULL_OPTIONS_SUPPORT=='0'">1</if>
+
+ </set>
+
+ <if cond="BUILD_ALL_TESTS=='1'">
+
+ <exe id="testAutomata" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testAutomata.c</sources></exe>
+ <exe id="testC14N" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testC14N.c</sources></exe>
+ <exe id="testHTML" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testHTML.c</sources></exe>
+ <exe id="testReader" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testReader.c</sources></exe>
+ <exe id="testRegexp" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRegexp.c</sources></exe>
+ <exe id="testRelax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRelax.c</sources></exe>
+ <exe id="testSax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSax.c</sources></exe>
+ <exe id="testSchemas" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSchemas.c</sources></exe>
+ <exe id="testURI" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testURI.c</sources></exe>
+ <exe id="testXPath" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testXPath.c</sources></exe>
+ <exe id="xmllint" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)xmllint.c</sources></exe>
+
+ <if cond="FORMAT=='autoconf'">
+ <exe id="testdso" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testdso.c</sources></exe>
+ </if>
+
+ <!-- FIXME:
+ <exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
+
+ <if cond="WITH_THREADS=='posix'">
+ <exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
+ </if>
+ <if cond="WITH_THREADS=='ctls' or WITH_THREADS=='native'">
+ <exe id="testThreadsWin32" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreadsWin32.c</sources></exe>
+ </if>
+ -->
+ </if>
+
+</makefile>
@@ -463,7 +463,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os LIBXML_MAJOR_VERSION LIBXML_MINOR_VERSION LIBXML_MICRO_VERSION LIBXML_VERSION LIBXML_VERSION_INFO LIBXML_VERSION_NUMBER LIBXML_VERSION_EXTRA INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RM MV TAR PERL XMLLINT XSLTPROC EGREP U ANSI2KNR LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL HTML_DIR Z_CFLAGS Z_LIBS PYTHON WITH_PYTHON_TRUE WITH_PYTHON_FALSE pythondir PYTHON_SUBDIR WITH_MODULES MODULE_PLATFORM_LIBS MODULE_EXTENSION TEST_MODULES STATIC_BINARIES WITH_TRIO_SOURCES_TRUE WITH_TRIO_SOURCES_FALSE WITH_TRIO THREAD_LIBS WITH_THREADS THREAD_CFLAGS TEST_THREADS THREADS_W32 WITH_TREE WITH_FTP FTP_OBJ WITH_HTTP HTTP_OBJ WITH_LEGACY WITH_READER READER_TEST WITH_WRITER WITH_PATTERN PATTERN_TEST WITH_SAX1 TEST_SAX WITH_PUSH TEST_PUSH WITH_HTML HTML_OBJ TEST_HTML TEST_PHTML WITH_VALID TEST_VALID TEST_VTIME WITH_CATALOG CATALOG_OBJ TEST_CATALOG WITH_DOCB DOCB_OBJ WITH_XPTR XPTR_OBJ TEST_XPTR WITH_C14N C14N_OBJ TEST_C14N WITH_XINCLUDE XINCLUDE_OBJ TEST_XINCLUDE WITH_XPATH XPATH_OBJ TEST_XPATH WITH_OUTPUT WITH_ICONV WITH_ISO8859X WITH_SCHEMAS TEST_SCHEMAS WITH_REGEXPS TEST_REGEXPS WITH_DEBUG DEBUG_OBJ TEST_DEBUG WITH_MEM_DEBUG WITH_RUN_DEBUG WIN32_EXTRA_LIBADD WIN32_EXTRA_LDFLAGS CYGWIN_EXTRA_LDFLAGS CYGWIN_EXTRA_PYTHON_LIBADD XML_CFLAGS XML_LIBDIR XML_LIBS XML_LIBTOOLLIBS ICONV_LIBS XML_INCLUDEDIR HAVE_ISNAN HAVE_ISINF PYTHON_VERSION PYTHON_INCLUDES PYTHON_SITE_PACKAGES M_LIBS RDL_LIBS RELDATE PYTHON_TESTS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os LIBXML_MAJOR_VERSION LIBXML_MINOR_VERSION LIBXML_MICRO_VERSION LIBXML_VERSION LIBXML_VERSION_INFO LIBXML_VERSION_NUMBER LIBXML_VERSION_EXTRA INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RM MV TAR PERL XMLLINT XSLTPROC EGREP U ANSI2KNR LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL HTML_DIR Z_CFLAGS Z_LIBS PYTHON WITH_PYTHON_TRUE WITH_PYTHON_FALSE pythondir PYTHON_SUBDIR WITH_MODULES MODULE_PLATFORM_LIBS MODULE_EXTENSION TEST_MODULES STATIC_BINARIES WITH_TRIO_SOURCES_TRUE WITH_TRIO_SOURCES_FALSE WITH_TRIO THREAD_LIBS WITH_THREADS THREAD_CFLAGS TEST_THREADS THREADS_W32 WITH_TREE WITH_FTP FTP_OBJ WITH_HTTP HTTP_OBJ WITH_LEGACY WITH_READER READER_TEST WITH_WRITER WITH_PATTERN TEST_PATTERN WITH_SAX1 TEST_SAX WITH_PUSH TEST_PUSH WITH_HTML HTML_OBJ TEST_HTML TEST_PHTML WITH_VALID TEST_VALID TEST_VTIME WITH_CATALOG CATALOG_OBJ TEST_CATALOG WITH_DOCB DOCB_OBJ WITH_XPTR XPTR_OBJ TEST_XPTR WITH_C14N C14N_OBJ TEST_C14N WITH_XINCLUDE XINCLUDE_OBJ TEST_XINCLUDE WITH_XPATH XPATH_OBJ TEST_XPATH WITH_OUTPUT WITH_ICONV WITH_ISO8859X WITH_SCHEMAS TEST_SCHEMAS WITH_REGEXPS TEST_REGEXPS WITH_DEBUG DEBUG_OBJ TEST_DEBUG WITH_MEM_DEBUG WITH_RUN_DEBUG WIN32_EXTRA_LIBADD WIN32_EXTRA_LDFLAGS CYGWIN_EXTRA_LDFLAGS CYGWIN_EXTRA_PYTHON_LIBADD XML_CFLAGS XML_LIBDIR XML_LIBS XML_LIBTOOLLIBS ICONV_LIBS XML_INCLUDEDIR HAVE_ISNAN HAVE_ISINF PYTHON_VERSION PYTHON_INCLUDES PYTHON_SITE_PACKAGES M_LIBS RDL_LIBS RELDATE PYTHON_TESTS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1617,7 +1617,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=6 -LIBXML_MICRO_VERSION=17 +LIBXML_MICRO_VERSION=18 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 @@ -28657,10 +28657,10 @@ fi if test "$with_pattern" = "no" ; then echo Disabling the xmlPattern parsing interface WITH_PATTERN=0 - PATTERN_TEST= + TEST_PATTERN= else WITH_PATTERN=1 - PATTERN_TEST=Patterntests + TEST_PATTERN=Patterntests fi @@ -30039,7 +30039,7 @@ s,@WITH_READER@,$WITH_READER,;t t s,@READER_TEST@,$READER_TEST,;t t s,@WITH_WRITER@,$WITH_WRITER,;t t s,@WITH_PATTERN@,$WITH_PATTERN,;t t -s,@PATTERN_TEST@,$PATTERN_TEST,;t t +s,@TEST_PATTERN@,$TEST_PATTERN,;t t s,@WITH_SAX1@,$WITH_SAX1,;t t s,@TEST_SAX@,$TEST_SAX,;t t s,@WITH_PUSH@,$WITH_PUSH,;t t diff --git a/configure.in b/configure.in index b3cd424..d270ef9 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=17 +LIBXML_MICRO_VERSION=18 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 @@ -866,13 +866,13 @@ AC_SUBST(WITH_WRITER) if test "$with_pattern" = "no" ; then echo Disabling the xmlPattern parsing interface WITH_PATTERN=0 - PATTERN_TEST= + TEST_PATTERN= else WITH_PATTERN=1 - PATTERN_TEST=Patterntests + TEST_PATTERN=Patterntests fi AC_SUBST(WITH_PATTERN) -AC_SUBST(PATTERN_TEST) +AC_SUBST(TEST_PATTERN) if test "$with_sax1" = "no" ; then echo Disabling the older SAX1 interface @@ -60,6 +60,7 @@ struct _xmlDictStrings { */ struct _xmlDict { int ref_counter; + xmlRMutexPtr mutex; struct _xmlDictEntry *dict; int size; @@ -70,6 +71,50 @@ struct _xmlDict { }; /* + * A mutex for modifying the reference counter for shared + * dictionaries. + */ +static xmlRMutexPtr xmlDictMutex = NULL; + +/* + * Whether the dictionary mutex was initialized. + */ +static int xmlDictInitialized = 0; + +/** + * xmlInitializeDict: + * + * Do the dictionary mutex initialization. + * this function is not thread safe, initialization should + * preferably be done once at startup + */ +static int xmlInitializeDict(void) { + if (xmlDictInitialized) + return(1); + + if ((xmlDictMutex = xmlNewRMutex()) == NULL) + return(0); + + xmlDictInitialized = 1; + return(1); +} + +/** + * xmlDictCleanup: + * + * Free the dictionary mutex. + */ +void +xmlDictCleanup(void) { + if (!xmlDictInitialized) + return; + + xmlFreeRMutex(xmlDictMutex); + + xmlDictInitialized = 0; +} + +/* * xmlDictAddString: * @dict: the dictionnary * @name: the name of the userdata @@ -277,7 +322,11 @@ xmlDictComputeQKey(const xmlChar *prefix, const xmlChar *name, int len) xmlDictPtr xmlDictCreate(void) { xmlDictPtr dict; - + + if (!xmlDictInitialized) + if (!xmlInitializeDict()) + return(NULL); + dict = xmlMalloc(sizeof(xmlDict)); if (dict) { dict->ref_counter = 1; @@ -288,8 +337,11 @@ xmlDictCreate(void) { dict->strings = NULL; dict->subdict = NULL; if (dict->dict) { - memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry)); - return(dict); + if ((dict->mutex = xmlNewRMutex()) != NULL) { + memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry)); + return(dict); + } + xmlFree(dict->dict); } xmlFree(dict); } @@ -328,8 +380,14 @@ xmlDictCreateSub(xmlDictPtr sub) { */ int xmlDictReference(xmlDictPtr dict) { + if (!xmlDictInitialized) + if (!xmlInitializeDict()) + return(-1); + if (dict == NULL) return -1; + xmlRMutexLock(xmlDictMutex); dict->ref_counter++; + xmlRMutexUnlock(xmlDictMutex); return(0); } @@ -445,9 +503,19 @@ xmlDictFree(xmlDictPtr dict) { if (dict == NULL) return; + if (!xmlDictInitialized) + if (!xmlInitializeDict()) + return; + /* decrement the counter, it may be shared by a parser and docs */ + xmlRMutexLock(xmlDictMutex); dict->ref_counter--; - if (dict->ref_counter > 0) return; + if (dict->ref_counter > 0) { + xmlRMutexUnlock(xmlDictMutex); + return; + } + + xmlRMutexUnlock(xmlDictMutex); if (dict->subdict != NULL) { xmlDictFree(dict->subdict); @@ -477,6 +545,7 @@ xmlDictFree(xmlDictPtr dict) { xmlFree(pool); pool = nextp; } + xmlFreeRMutex(dict->mutex); xmlFree(dict); } diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html index c0d3fe3..89cf637 100644 --- a/doc/APIchunk0.html +++ b/doc/APIchunk0.html @@ -58,6 +58,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br /> @@ -121,10 +122,13 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br /> </dd><dt>Allocate</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> <a href="html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a><br /> <a href="html/libxml-valid.html#xmlNewValidCtxt">xmlNewValidCtxt</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>Allows</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br /> </dd><dt>AlphabeticPresentationForms</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsAlphabeticPresentationForms">xmlUCSIsAlphabeticPresentationForms</a><br /> </dd><dt>Also</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> @@ -241,12 +245,15 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Bopomofo</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofo">xmlUCSIsBopomofo</a><br /> </dd><dt>BopomofoExtended</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofoExtended">xmlUCSIsBopomofoExtended</a><br /> </dd><dt>Both</dt><dd><a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>BoxDrawing</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a><br /> </dd><dt>BraillePatterns</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a><br /> </dd><dt>Buffer</dt><dd><a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br /> </dd><dt>Bugs:</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>Buhid</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBuhid">xmlUCSIsBuhid</a><br /> </dd><dt>Build</dt><dd><a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br /> +<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> <a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br /> <a href="html/libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a><br /> diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html index 28b0038..eb14d20 100644 --- a/doc/APIchunk1.html +++ b/doc/APIchunk1.html @@ -237,6 +237,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br /> </dd><dt>Compare</dt><dd><a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br /> <a href="html/libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a><br /> </dd><dt>Compile</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> @@ -291,6 +292,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br /> <a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br /> <a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br /> +</dd><dt>Copies</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> </dd><dt>Copy</dt><dd><a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br /> <a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br /> <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index 4b7b59d..b1c4503 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -37,31 +37,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="APIchunk27.html">y-z</a> </h2><h2>Letter c:</h2><dl><dt>cae</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> </dd><dt>calculates</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br /> -</dd><dt>call</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> -<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br /> -<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br /> -<a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br /> -<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> -<a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br /> -<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br /> -<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br /> -<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br /> -<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br /> -<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br /> -<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br /> -<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br /> -<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br /> -<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br /> -<a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br /> -<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br /> -<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br /> -<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br /> -<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br /> </dd><dt>calling</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> @@ -331,6 +306,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br /> </dd><dt>combining</dt><dd><a href="html/libxml-parserInternals.html#IS_COMBINING_CH">IS_COMBINING_CH</a><br /> +</dd><dt>come</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>coment</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br /> </dd><dt>comes</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br /> <a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br /> @@ -505,12 +482,14 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>comprising</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br /> </dd><dt>computation</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> </dd><dt>compute</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br /> -</dd><dt>computed</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br /> +</dd><dt>computed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> +<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br /> <a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> </dd><dt>concat</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathConcatFunction">xmlXPathConcatFunction</a><br /> </dd><dt>concatenated</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br /> </dd><dt>concatenation</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathConcatFunction">xmlXPathConcatFunction</a><br /> @@ -566,6 +545,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br /> </dd><dt>connector</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br /> +</dd><dt>cononical</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> </dd><dt>consequent</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br /> </dd><dt>consideration</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> </dd><dt>considered</dt><dd><a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br /> @@ -737,6 +717,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>copied</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br /> <a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br /> <a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br /> </dd><dt>copier</dt><dd><a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br /> </dd><dt>copying</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br /> @@ -756,6 +737,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br /> </dd><dt>could</dt><dd><a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br /> <a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br /> diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index f48ee2a..f56e347 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -36,6 +36,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="APIchunk26.html">x-x</a> <a href="APIchunk27.html">y-z</a> </h2><h2>Letter d:</h2><dl><dt>dangerous</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br /> +</dd><dt>data-type</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> </dd><dt>datatype</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> </dd><dt>day</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br /> </dd><dt>day:minute</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br /> @@ -108,6 +109,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>decimal</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> </dd><dt>decl</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> <a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> </dd><dt>declarations</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-HTMLparser.html#htmlParseCharRef">htmlParseCharRef</a><br /> @@ -161,6 +163,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br /> </dd><dt>define</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br /> +<a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> <a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br /> </dd><dt>defined</dt><dd><a href="html/libxml-xmlversion.html#WITHOUT_TRIO">WITHOUT_TRIO</a><br /> <a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br /> @@ -223,11 +226,13 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br /> <a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br /> <a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br /> +<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br /> <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> <a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br /> </dd><dt>depth</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a><br /> </dd><dt>deregistration</dt><dd><a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br /> </dd><dt>derivation</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br /> @@ -266,6 +271,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>description</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> <a href="html/libxml-HTMLparser.html#_htmlEntityDesc">_htmlEntityDesc</a><br /> <a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br /> +<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> <a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br /> <a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br /> @@ -350,9 +356,13 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br /> </dd><dt>dict</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br /> </dd><dt>dictionary</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> +<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br /> <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br /> <a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br /> <a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br /> +<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>dictionnary</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br /> @@ -365,6 +375,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br /> <a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>did</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br /> @@ -421,7 +433,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlIO.html#xmlParserGetDirectory">xmlParserGetDirectory</a><br /> <a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br /> </dd><dt>disable</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br /> -</dd><dt>disabled</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> +</dd><dt>disabled</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> </dd><dt>disabling</dt><dd><a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br /> </dd><dt>disallowed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a><br /> @@ -497,6 +510,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>doesn</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> <a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br /> <a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br /> +<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br /> <a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br /> <a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br /> <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br /> @@ -580,6 +594,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>duplicate</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br /> </dd><dt>duplicated</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br /> +</dd><dt>duplicates</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> </dd><dt>during</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index fd7812d..5e8902b 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -259,6 +259,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> <a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br /> @@ -354,6 +355,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br /> </dd><dt>expand</dt><dd><a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br /> </dd><dt>expanded</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br /> </dd><dt>expected</dt><dd><a href="">x</a><br /> <a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br /> @@ -363,6 +365,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>explicitly</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br /> </dd><dt>explored</dt><dd><a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br /> </dd><dt>exposing</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br /> diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index 81e2cd8..999fd9c 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -48,7 +48,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br /> -</dd><dt>facets</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> +</dd><dt>facets</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> </dd><dt>fail</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br /> @@ -99,6 +100,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br /> <a href="html/libxml-xmlautomata.html#xmlNewAutomata">xmlNewAutomata</a><br /> +<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> <a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br /> <a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br /> @@ -127,6 +129,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br /> </dd><dt>fatal</dt><dd><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br /> </dd><dt>fatalError</dt><dd><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br /> +</dd><dt>favor</dt><dd><a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> </dd><dt>feature</dt><dd><a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br /> <a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br /> <a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br /> @@ -309,6 +312,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br /> <a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br /> <a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br /> +</dd><dt>fptr</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> </dd><dt>fragment</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br /> <a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br /> <a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br /> diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index a100117..ea81366 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -39,6 +39,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>garbage</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br /> <a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br /> </dd><dt>gcc</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +</dd><dt>gcc4</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> </dd><dt>genChRanges</dt><dd><a href="html/libxml-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a><br /> <a href="html/libxml-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a><br /> <a href="html/libxml-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a><br /> diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index afdadd1..a52bda6 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -79,6 +79,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br /> </dd><dt>implicitly</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br /> <a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br /> @@ -195,6 +196,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br /> <a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br /> <a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br /> @@ -211,7 +213,10 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br /> -</dd><dt>indicates</dt><dd><a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +</dd><dt>indicates</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> +<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br /> @@ -276,6 +281,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> </dd><dt>informations</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br /> <a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br /> @@ -382,6 +388,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br /> <a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br /> <a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br /> +<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> +<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br /> <a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br /> <a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br /> @@ -411,6 +419,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> +</dd><dt>intended</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>interact</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br /> </dd><dt>interface</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br /> <a href="html/libxml-xmlversion.html#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a><br /> diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html index 53bb918..4a485bd 100644 --- a/doc/APIchunk16.html +++ b/doc/APIchunk16.html @@ -47,6 +47,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br /> <a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br /> @@ -176,6 +177,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br /> <a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br /> <a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br /> </dd><dt>lexical</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br /> @@ -253,6 +255,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br /> </dd><dt>limit</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br /> <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> </dd><dt>limited</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>linear</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br /> <a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br /> @@ -347,6 +350,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>lookahead</dt><dd><a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br /> <a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br /> </dd><dt>looked</dt><dd><a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br /> +<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> </dd><dt>looks</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br /> <a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br /> <a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br /> diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html index 7f05a0c..1d2a178 100644 --- a/doc/APIchunk17.html +++ b/doc/APIchunk17.html @@ -36,7 +36,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="APIchunk26.html">x-x</a> <a href="APIchunk27.html">y-z</a> </h2><h2>Letter m:</h2><dl><dt>machine</dt><dd><a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br /> -</dd><dt>macro</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a><br /> +</dd><dt>macro</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a><br /> </dd><dt>made</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br /> <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> @@ -48,7 +49,8 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>maintained</dt><dd><a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br /> <a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br /> </dd><dt>major</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> -</dd><dt>make</dt><dd><a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br /> +</dd><dt>make</dt><dd><a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br /> +<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br /> </dd><dt>makes</dt><dd><a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br /> @@ -137,8 +139,11 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br /> <a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> </dd><dt>means</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br /> <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>mechanism</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br /> @@ -265,6 +270,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br /> <a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br /> @@ -285,7 +291,8 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>multiply</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br /> </dd><dt>multithreaded</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br /> <a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br /> -</dd><dt>mutex</dt><dd><a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br /> +</dd><dt>mutex</dt><dd><a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br /> +<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br /> <a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br /> <a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br /> <a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br /> diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index 44a5101..d8174c9 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -81,6 +81,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> <a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br /> </dd><dt>need</dt><dd><a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> <a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br /> <a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a><br /> <a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a><br /> @@ -95,6 +96,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br /> <a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br /> </dd><dt>needed</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> @@ -243,7 +245,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br /> </dd><dt>note</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> <a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br /> -</dd><dt>now</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> +</dd><dt>now</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> <a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index 1c0d247..424ee85 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -59,6 +59,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br /> <a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br /> <a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br /> +<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br /> <a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br /> <a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br /> </dd><dt>occurences</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br /> @@ -146,6 +147,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br /> </dd><dt>ononymous</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> </dd><dt>onto</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>opaque</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> <a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br /> </dd><dt>open</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br /> @@ -283,6 +286,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br /> <a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br /> <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br /> <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br /> @@ -331,7 +335,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br /> </dd><dt>owner</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br /> </dd><dt>ownership</dt><dd><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br /> -</dd><dt>owning</dt><dd><a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br /> +</dd><dt>owning</dt><dd><a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> +<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> +<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br /> </dd><dt>owns</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a> <a href="APIchunk1.html">C-C</a> diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html index 7c69017..a37dcda 100644 --- a/doc/APIchunk2.html +++ b/doc/APIchunk2.html @@ -126,7 +126,10 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Deletes</dt><dd><a href="html/libxml-list.html#xmlListDelete">xmlListDelete</a><br /> </dd><dt>Deprecated</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br /> <a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br /> +<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> +<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br /> +<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> <a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br /> <a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br /> </dd><dt>Depth</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index d690d5a..40b8dcb 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -124,7 +124,11 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br /> <a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> -</dd><dt>pattern</dt><dd><a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br /> +</dd><dt>pattern</dt><dd><a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> +<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> +<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> </dd><dt>pcdata</dt><dd><a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br /> @@ -254,13 +258,19 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>preceding-sibling</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br /> </dd><dt>precisely</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> </dd><dt>precompiled</dt><dd><a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br /> +<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> +<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> <a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> +<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br /> -</dd><dt>precomputed</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> +</dd><dt>precomputed</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br /> </dd><dt>predefined</dt><dd><a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br /> <a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br /> @@ -484,6 +494,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> </dd><dt>providing</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br /> </dd><dt>provoked</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> </dd><dt>proximity</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> @@ -505,6 +516,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br /> <a href="html/libxml-parser.html#xmlCtxtResetPush">xmlCtxtResetPush</a><br /> <a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br /> </dd><dt>pushed</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br /> diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index 7b403a0..1c8a997 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -106,6 +106,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>re-entrant</dt><dd><a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br /> <a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br /> <a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br /> +</dd><dt>reachable</dt><dd><a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> </dd><dt>reached</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br /> </dd><dt>read-only</dt><dd><a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br /> @@ -133,6 +134,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br /> <a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br /> <a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> +<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br /> </dd><dt>reasonable</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> </dd><dt>received</dt><dd><a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a><br /> @@ -193,7 +195,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br /> <a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br /> <a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br /> -<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a><br /> <a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br /> <a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br /> @@ -312,6 +313,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>relationships</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>relative</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> <a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br /> <a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br /> @@ -354,6 +356,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br /> <a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br /> <a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br /> +<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> +<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br /> <a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br /> <a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br /> @@ -403,6 +407,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br /> </dd><dt>representation</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> </dd><dt>representations</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> </dd><dt>represented</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> @@ -448,6 +453,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br /> <a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br /> <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>resides</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br /> </dd><dt>resize</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br /> @@ -499,6 +506,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br /> </dd><dt>results</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br /> +</dd><dt>retValue</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> </dd><dt>retrieve</dt><dd><a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br /> @@ -556,9 +564,12 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br /> <a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br /> +<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br /> <a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br /> @@ -579,7 +590,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br /> </dd><dt>rule</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br /> <a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br /> -</dd><dt>rules</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br /> +</dd><dt>rules</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> </dd><dt>run</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index 267fd23..9ad2caf 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -35,7 +35,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="APIchunk25.html">w-w</a> <a href="APIchunk26.html">x-x</a> <a href="APIchunk27.html">y-z</a> -</h2><h2>Letter s:</h2><dl><dt>safe</dt><dd><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br /> +</h2><h2>Letter s:</h2><dl><dt>s390</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +</dd><dt>safe</dt><dd><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br /> <a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br /> <a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br /> <a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br /> @@ -167,6 +168,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>selects</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br /> </dd><dt>self</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br /> </dd><dt>semantic</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br /> +</dd><dt>sense</dt><dd><a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br /> </dd><dt>separated</dt><dd><a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br /> </dd><dt>separately</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br /> <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> @@ -315,6 +317,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br /> <a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br /> </dd><dt>simpleType</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a><br /> @@ -503,6 +506,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartDocument">xmlSAX2StartDocument</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br /> <a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br /> <a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br /> @@ -610,24 +614,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br /> <a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br /> <a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br /> -</dd><dt>stream</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> -<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br /> -<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br /> -<a href="html/libxml-parserInternals.html#xmlFreeInputStream">xmlFreeInputStream</a><br /> -<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br /> -<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br /> -<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br /> -<a href="html/libxml-parserInternals.html#xmlNewInputFromFile">xmlNewInputFromFile</a><br /> -<a href="html/libxml-parserInternals.html#xmlNewInputStream">xmlNewInputStream</a><br /> -<a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br /> -<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br /> -<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br /> -<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> -<a href="html/libxml-uri.html#xmlPrintURI">xmlPrintURI</a><br /> -<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br /> -<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br /> +</dd><dt>streamable</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> +</dd><dt>streaming</dt><dd><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> </dd><dt>streams</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br /> </dd><dt>strict</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br /> @@ -646,6 +634,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> <a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br /> </dd><dt>stripping</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br /> </dd><dt>strncasecmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br /> @@ -676,6 +666,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>sub-elements</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>subelement</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> <a href="html/libxml-HTMLparser.html#htmlDefaultSubelement">htmlDefaultSubelement</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> </dd><dt>subelements</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>subject</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> @@ -721,6 +712,8 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>subtraction</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br /> </dd><dt>subtree</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br /> <a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br /> +<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> +<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br /> @@ -793,6 +786,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>supplied</dt><dd><a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br /> </dd><dt>supported</dt><dd><a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br /> </dd><dt>supposed</dt><dd><a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br /> <a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br /> diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index 6afc676..ab4b35c 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -418,6 +418,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br /> <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>typo</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a> <a href="APIchunk1.html">C-C</a> diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html index 8e3a79d..3ae3272 100644 --- a/doc/APIchunk24.html +++ b/doc/APIchunk24.html @@ -247,8 +247,10 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br /> </dd><dt>view</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br /> +</dd><dt>violated</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> </dd><dt>visible</dt><dd><a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br /> -</dd><dt>void</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br /> +</dd><dt>void</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br /> <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a> <a href="APIchunk1.html">C-C</a> diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index a9fbc93..c982169 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -93,6 +93,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br /> <a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>well-balanced</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br /> <a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br /> <a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br /> @@ -150,12 +151,15 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br /> </dd><dt>whitespace</dt><dd><a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br /> <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br /> </dd><dt>whitespace-separated</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br /> </dd><dt>whitespaces</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br /> <a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br /> +</dd><dt>whole</dt><dd><a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> +<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> </dd><dt>whose</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br /> @@ -192,6 +196,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> <a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br /> <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> <a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br /> @@ -221,6 +226,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>words</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br /> </dd><dt>work</dt><dd><a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br /> +<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> <a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br /> <a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br /> <a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br /> @@ -235,6 +241,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>would</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br /> <a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br /> +</dd><dt>wraps</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> </dd><dt>write</dt><dd><a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br /> <a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br /> <a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br /> diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html index f3d9bc1..45c4c01 100644 --- a/doc/APIchunk26.html +++ b/doc/APIchunk26.html @@ -109,6 +109,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> </dd><dt>xmlBufferPtr</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br /> </dd><dt>xmlBuildURI</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> +</dd><dt>xmlBytesConsumed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> </dd><dt>xmlCatalogAllow</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br /> </dd><dt>xmlCatalogPtr</dt><dd><a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br /> </dd><dt>xmlCatalogResolvePublic</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br /> @@ -127,6 +128,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br /> </dd><dt>xmlCleanupParser</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br /> </dd><dt>xmlCleanupThreads</dt><dd><a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br /> +</dd><dt>xmlCopyDocElementContent</dt><dd><a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> </dd><dt>xmlCreateIntSubset</dt><dd><a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br /> </dd><dt>xmlDefaultSAXLocator</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br /> <a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br /> @@ -142,7 +144,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br /> <a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br /> <a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br /> -</dd><dt>xmlElementContentPtr</dt><dd><a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> +</dd><dt>xmlElementContentPtr</dt><dd><a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> +<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br /> </dd><dt>xmlElementPtr</dt><dd><a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br /> @@ -183,13 +186,16 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br /> </dd><dt>xmlFreeDoc</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br /> +</dd><dt>xmlFreeDocElementContent</dt><dd><a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> </dd><dt>xmlFreeMutex</dt><dd><a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br /> +</dd><dt>xmlFreeStreamCtxt</dt><dd><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> </dd><dt>xmlGetGlobalState</dt><dd><a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br /> </dd><dt>xmlGetNoNsProp</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br /> </dd><dt>xmlGetNsProp</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br /> </dd><dt>xmlGetProp</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br /> </dd><dt>xmlGetThreadId</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br /> </dd><dt>xmlHashTablePtr</dt><dd><a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br /> +<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br /> </dd><dt>xmlIDPtr</dt><dd><a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br /> </dd><dt>xmlIndentTreeOutput</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br /> <a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br /> @@ -243,6 +249,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>xmlNanoFTPGet</dt><dd><a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br /> </dd><dt>xmlNanoFTPList</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br /> </dd><dt>xmlNewChild</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> +</dd><dt>xmlNewDocElementContent</dt><dd><a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> </dd><dt>xmlNewDocRawNode</dt><dd><a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br /> <a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br /> </dd><dt>xmlNewMutex</dt><dd><a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br /> @@ -319,6 +326,9 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>xmlParserProperties</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> </dd><dt>xmlPattern</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br /> +</dd><dt>xmlPatternGetStreamCtxt</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> +</dd><dt>xmlPatterncompile</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>xmlPopInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br /> </dd><dt>xmlPushInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br /> </dd><dt>xmlRFreeMutex</dt><dd><a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br /> diff --git a/doc/APIchunk27.html b/doc/APIchunk27.html index 7c9a254..6291d65 100644 --- a/doc/APIchunk27.html +++ b/doc/APIchunk27.html @@ -51,6 +51,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> </dd><dt>you</dt><dd><a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br /> <a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br /> <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html index a2146cc..d8b0673 100644 --- a/doc/APIchunk3.html +++ b/doc/APIchunk3.html @@ -200,6 +200,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br /> </dd><dt>IPAExtensions</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsIPAExtensions">xmlUCSIsIPAExtensions</a><br /> </dd><dt>ISO</dt><dd><a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br /> +<a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> <a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br /> </dd><dt>ISO-8859-</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br /> </dd><dt>ISO-Latin</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br /> diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html index 0ddc010..885faa4 100644 --- a/doc/APIchunk4.html +++ b/doc/APIchunk4.html @@ -184,6 +184,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>NMToken</dt><dd><a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br /> </dd><dt>NOTATION</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br /> <a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br /> <a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br /> </dd><dt>NOTE</dt><dd><a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br /> <a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br /> @@ -205,6 +206,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br /> <a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br /> </dd><dt>NRK</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>NSDef</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br /> diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html index 6dc25db..82be4d8 100644 --- a/doc/APIchunk6.html +++ b/doc/APIchunk6.html @@ -344,6 +344,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br /> </dd><dt>See</dt><dd><a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br /> <a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> </dd><dt>Seems</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br /> </dd><dt>Semi</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br /> </dd><dt>Send</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br /> diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index f401538..eed7024 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -235,6 +235,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br /> <a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br /> <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> +<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> </dd><dt>Used</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br /> diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html index 76e4e7a..434fa69 100644 --- a/doc/APIchunk8.html +++ b/doc/APIchunk8.html @@ -72,6 +72,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br /> </dd></dl><h2>Letter W:</h2><dl><dt>WARNING</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> +</dd><dt>WARNING:</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>WFC:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br /> <a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br /> <a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br /> @@ -163,6 +164,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br /> </dd><dt>XML_BUFFER_ALLOC_EXACT</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br /> <a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br /> +</dd><dt>XML_CAST_FPTR</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> </dd><dt>XML_CATA_PREFER_PUBLIC</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br /> </dd><dt>XML_CATA_PREFER_SYSTEM</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br /> </dd><dt>XML_CHAR_ENCODING_</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br /> @@ -176,6 +178,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>XML_ENTITY_DECL</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br /> </dd><dt>XML_ERR_OK</dt><dd><a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br /> </dd><dt>XML_SCHEMAS_ELEM_GLOBAL</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br /> +</dd><dt>XML_SCHEMAS_STRING</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>XML_SUBSTITUTE_PEREF</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br /> <a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br /> @@ -289,6 +292,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> <a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br /> +</dd><dt>act</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>activate</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> </dd><dt>activated</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br /> @@ -319,6 +324,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br /> <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> </dd><dt>actuate</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br /> </dd><dt>add</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br /> @@ -428,7 +434,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br /> </dd><dt>aliases</dt><dd><a href="html/libxml-encoding.html#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a><br /> <a href="html/libxml-encoding.html#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a><br /> -</dd><dt>aliasing</dt><dd><a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br /> +</dd><dt>aliasing</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> +<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br /> </dd><dt>allocate</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br /> <a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br /> <a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br /> @@ -525,6 +532,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br /> <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br /> @@ -571,6 +580,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br /> <a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br /> +</dd><dt>anySimpleType</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>anymore</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br /> diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index e5b7033..3804369 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlNewInputFromFile">xmlNewInputFromFile</a><br /> <a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> <a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br /> <a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br /> @@ -98,6 +99,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br /> <a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br /> <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br /> </dd><dt>begins</dt><dd><a href="html/libxml-parser.html#_xmlParserNodeInfo">_xmlParserNodeInfo</a><br /> </dd><dt>behaves</dt><dd><a href="html/libxml-parserInternals.html#IS_LETTER_CH">IS_LETTER_CH</a><br /> @@ -187,6 +189,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br /> </dd><dt>breaking</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br /> </dd><dt>breaks</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br /> +</dd><dt>broke</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> </dd><dt>broken</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br /> </dd><dt>buf</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br /> @@ -243,6 +246,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br /> </dd><dt>built-in</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index a1856c8..9372c05 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -85,6 +85,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> </p><h2>Type unsigned long:</h2><p><a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br /> @@ -290,7 +291,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br /> <a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br /> <a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br /> -</p><h2>Type xmlElementContentPtr:</h2><p><a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> +</p><h2>Type xmlElementContentPtr:</h2><p><a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> +<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br /> @@ -323,6 +326,7 @@ A:link, A:visited, A:active { text-decoration: underline } </p><h2>Type xmlGlobalStatePtr:</h2><p><a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br /> </p><h2>Type xmlHashTablePtr:</h2><p><a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br /> <a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br /> +<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br /> </p><h2>Type xmlIDPtr:</h2><p><a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br /> </p><h2>Type xmlLinkPtr:</h2><p><a href="html/libxml-list.html#xmlListEnd">xmlListEnd</a><br /> <a href="html/libxml-list.html#xmlListFront">xmlListFront</a><br /> @@ -477,7 +481,11 @@ A:link, A:visited, A:active { text-decoration: underline } </p><h2>Type xmlSchemaTypePtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br /> +</p><h2>Type xmlSchemaValPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </p><h2>Type xmlSchemaValidCtxtPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> +</p><h2>Type xmlStreamCtxtPtr:</h2><p><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> </p><h2>Type xmlTextReaderPtr:</h2><p><a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br /> <a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br /> <a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br /> diff --git a/doc/APIfiles.html b/doc/APIfiles.html index 017b653..33bd419 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -315,6 +315,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br /> <a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br /> </p><h2><a name="dict" id="dict">Module dict</a>:</h2><p><a href="html/libxml-dict.html#xmlDict">xmlDict</a><br /> +<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br /> <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br /> <a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br /> <a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br /> @@ -472,6 +473,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br /> <a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br /> <a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br /> +<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br /> <a href="html/libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a><br /> <a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br /> <a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br /> @@ -856,10 +858,20 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br /> </p><h2><a name="pattern" id="pattern">Module pattern</a>:</h2><p><a href="html/libxml-pattern.html#xmlFreePattern">xmlFreePattern</a><br /> <a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br /> +<a href="html/libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a><br /> <a href="html/libxml-pattern.html#xmlPattern">xmlPattern</a><br /> +<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> +<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> <a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> <a href="html/libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a><br /> +<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> +<a href="html/libxml-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a><br /> +<a href="html/libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </p><h2><a name="relaxng" id="relaxng">Module relaxng</a>:</h2><p><a href="html/libxml-relaxng.html#XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a><br /> <a href="html/libxml-relaxng.html#XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a><br /> <a href="html/libxml-relaxng.html#XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a><br /> @@ -1031,6 +1043,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a><br /> @@ -1083,6 +1096,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_EXTENSION">XML_SCHEMA_TYPE_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_FACET">XML_SCHEMA_TYPE_FACET</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_GROUP">XML_SCHEMA_TYPE_GROUP</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_UNIQUE">XML_SCHEMA_TYPE_IDC_UNIQUE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_LIST">XML_SCHEMA_TYPE_LIST</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_NOTATION">XML_SCHEMA_TYPE_NOTATION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_RESTRICTION">XML_SCHEMA_TYPE_RESTRICTION</a><br /> @@ -1447,6 +1463,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlAttributeTable">xmlAttributeTable</a><br /> <a href="html/libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a><br /> <a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br /> +<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> <a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br /> <a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br /> @@ -1461,6 +1478,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlElementTable">xmlElementTable</a><br /> <a href="html/libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a><br /> <a href="html/libxml-valid.html#xmlFreeAttributeTable">xmlFreeAttributeTable</a><br /> +<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-valid.html#xmlFreeElementTable">xmlFreeElementTable</a><br /> <a href="html/libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a><br /> @@ -1480,6 +1498,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br /> <a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br /> <a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> <a href="html/libxml-valid.html#xmlNewValidCtxt">xmlNewValidCtxt</a><br /> <a href="html/libxml-valid.html#xmlNotationTable">xmlNotationTable</a><br /> @@ -1870,6 +1889,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#XML_FTP_ACCNT">XML_FTP_ACCNT</a><br /> <a href="html/libxml-xmlerror.html#XML_FTP_EPSV_ANSWER">XML_FTP_EPSV_ANSWER</a><br /> <a href="html/libxml-xmlerror.html#XML_FTP_PASV_ANSWER">XML_FTP_PASV_ANSWER</a><br /> +<a href="html/libxml-xmlerror.html#XML_FTP_URL_SYNTAX">XML_FTP_URL_SYNTAX</a><br /> <a href="html/libxml-xmlerror.html#XML_HTML_STRUCURE_ERROR">XML_HTML_STRUCURE_ERROR</a><br /> <a href="html/libxml-xmlerror.html#XML_HTML_UNKNOWN_TAG">XML_HTML_UNKNOWN_TAG</a><br /> <a href="html/libxml-xmlerror.html#XML_HTTP_UNKNOWN_HOST">XML_HTTP_UNKNOWN_HOST</a><br /> @@ -2288,6 +2308,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ENUMERATION_VALID">XML_SCHEMAV_CVC_ENUMERATION_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FACET_VALID">XML_SCHEMAV_CVC_FACET_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID">XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_IDC">XML_SCHEMAV_CVC_IDC</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_LENGTH_VALID">XML_SCHEMAV_CVC_LENGTH_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID</a><br /> @@ -2301,6 +2322,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_2">XML_SCHEMAV_CVC_TYPE_2</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_1">XML_SCHEMAV_CVC_TYPE_3_1_1</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_2">XML_SCHEMAV_CVC_TYPE_3_1_2</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_WILDCARD">XML_SCHEMAV_CVC_WILDCARD</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING">XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMCONT">XML_SCHEMAV_ELEMCONT</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMENT_CONTENT">XML_SCHEMAV_ELEMENT_CONTENT</a><br /> @@ -2495,6 +2517,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReader">xmlTextReader</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br /> @@ -2646,19 +2669,28 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br /> -</p><h2><a name="xmlschemastypes" id="xmlschemastypes">Module xmlschemastypes</a>:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> +</p><h2><a name="xmlschemastypes" id="xmlschemastypes">Module xmlschemastypes</a>:</h2><p><a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a><br /> +<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a><br /> +<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a><br /> +<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaInitTypes">xmlSchemaInitTypes</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> @@ -2666,6 +2698,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a><br /> </p><h2><a name="xmlstring" id="xmlstring">Module xmlstring</a>:</h2><p><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br /> <a href="html/libxml-xmlstring.html#xmlChar">xmlChar</a><br /> <a href="html/libxml-xmlstring.html#xmlCharStrdup">xmlCharStrdup</a><br /> diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index c8012a9..c96a8d0 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -260,6 +260,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br /> <a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br /> <a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br /> <a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br /> <a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br /> @@ -331,6 +332,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> @@ -356,6 +359,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br /> <a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br /> <a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br /> <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br /> <a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br /> @@ -485,6 +490,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> <a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br /> <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br /> @@ -1039,6 +1045,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br /> <a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br /> <a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br /> +<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br /> </p><h2>Type xmlDocPtr:</h2><p><a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br /> @@ -1062,6 +1069,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br /> <a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br /> <a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br /> +<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> <a href="html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a><br /> <a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br /> <a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br /> @@ -1082,6 +1090,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br /> <a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br /> <a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br /> +<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> <a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br /> <a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br /> <a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br /> @@ -1096,6 +1105,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br /> <a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br /> <a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br /> <a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br /> <a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br /> @@ -1183,13 +1193,16 @@ A:link, A:visited, A:active { text-decoration: underline } </p><h2>Type xmlElementContentPtr:</h2><p><a href="html/libxml-SAX.html#elementDecl">elementDecl</a><br /> <a href="html/libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a><br /> <a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br /> +<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> +<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a><br /> <a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br /> <a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br /> </p><h2>Type xmlElementContentPtr *:</h2><p><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br /> -</p><h2>Type xmlElementContentType:</h2><p><a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> +</p><h2>Type xmlElementContentType:</h2><p><a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> +<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> </p><h2>Type xmlElementPtr:</h2><p><a href="html/libxml-valid.html#xmlDumpElementDecl">xmlDumpElementDecl</a><br /> <a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br /> <a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br /> @@ -1690,7 +1703,11 @@ A:link, A:visited, A:active { text-decoration: underline } </p><h2>Type xmlParserSeverities:</h2><p><a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br /> </p><h2>Type xmlPatternPtr:</h2><p><a href="html/libxml-pattern.html#xmlFreePattern">xmlFreePattern</a><br /> <a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br /> +<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> +<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> <a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> +<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> </p><h2>Type xmlRMutexPtr:</h2><p><a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br /> <a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br /> <a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br /> @@ -1795,13 +1812,17 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br /> </p><h2>Type xmlSchemaValPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br /> </p><h2>Type xmlSchemaValPtr *:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br /> </p><h2>Type xmlSchemaValType:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </p><h2>Type xmlSchemaValidCtxtPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> @@ -1818,6 +1839,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> </p><h2>Type xmlSchemaValidityWarningFunc *:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br /> +</p><h2>Type xmlSchemaWhitespaceValueType:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br /> </p><h2>Type xmlSchemaWildcardPtr:</h2><p><a href="html/libxml-schemasInternals.html#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a><br /> </p><h2>Type xmlShellCtxtPtr:</h2><p><a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br /> <a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br /> @@ -1835,6 +1857,10 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br /> </p><h2>Type xmlStrdupFunc *:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br /> <a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br /> +</p><h2>Type xmlStreamCtxtPtr:</h2><p><a href="html/libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </p><h2>Type xmlStructuredErrorFunc:</h2><p><a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br /> <a href="html/libxml-globals.html#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a><br /> @@ -1852,6 +1878,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br /> diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index f62c93f..7dbc146 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -427,6 +427,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#XML_FTP_ACCNT">XML_FTP_ACCNT</a><br /> <a href="html/libxml-xmlerror.html#XML_FTP_EPSV_ANSWER">XML_FTP_EPSV_ANSWER</a><br /> <a href="html/libxml-xmlerror.html#XML_FTP_PASV_ANSWER">XML_FTP_PASV_ANSWER</a><br /> +<a href="html/libxml-xmlerror.html#XML_FTP_URL_SYNTAX">XML_FTP_URL_SYNTAX</a><br /> <a href="html/libxml-tree.html#XML_GET_CONTENT">XML_GET_CONTENT</a><br /> <a href="html/libxml-tree.html#XML_GET_LINE">XML_GET_LINE</a><br /> <a href="html/libxml-tree.html#XML_HTML_DOCUMENT_NODE">XML_HTML_DOCUMENT_NODE</a><br /> @@ -1050,6 +1051,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a><br /> @@ -1110,6 +1112,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ENUMERATION_VALID">XML_SCHEMAV_CVC_ENUMERATION_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FACET_VALID">XML_SCHEMAV_CVC_FACET_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID">XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_IDC">XML_SCHEMAV_CVC_IDC</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_LENGTH_VALID">XML_SCHEMAV_CVC_LENGTH_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID</a><br /> @@ -1123,6 +1126,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_2">XML_SCHEMAV_CVC_TYPE_2</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_1">XML_SCHEMAV_CVC_TYPE_3_1_1</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_2">XML_SCHEMAV_CVC_TYPE_3_1_2</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_WILDCARD">XML_SCHEMAV_CVC_WILDCARD</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING">XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMCONT">XML_SCHEMAV_ELEMCONT</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMENT_CONTENT">XML_SCHEMAV_ELEMENT_CONTENT</a><br /> @@ -1178,6 +1182,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_EXTENSION">XML_SCHEMA_TYPE_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_FACET">XML_SCHEMA_TYPE_FACET</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_GROUP">XML_SCHEMA_TYPE_GROUP</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_UNIQUE">XML_SCHEMA_TYPE_IDC_UNIQUE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_LIST">XML_SCHEMA_TYPE_LIST</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_NOTATION">XML_SCHEMA_TYPE_NOTATION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_RESTRICTION">XML_SCHEMA_TYPE_RESTRICTION</a><br /> @@ -1187,6 +1194,10 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_UNION">XML_SCHEMA_TYPE_UNION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_UR">XML_SCHEMA_TYPE_UR</a><br /> <a href="html/libxml-xmlschemas.html#XML_SCHEMA_VAL_VC_I_CREATE">XML_SCHEMA_VAL_VC_I_CREATE</a><br /> +<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a><br /> +<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a><br /> +<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a><br /> +<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a><br /> <a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br /> <a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br /> <a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a><br /> @@ -1691,6 +1702,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlCopyChar">xmlCopyChar</a><br /> <a href="html/libxml-parserInternals.html#xmlCopyCharMultiByte">xmlCopyCharMultiByte</a><br /> <a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br /> +<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br /> <a href="html/libxml-tree.html#xmlCopyDtd">xmlCopyDtd</a><br /> <a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> <a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br /> @@ -1748,6 +1760,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a><br /> <a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br /> <a href="html/libxml-dict.html#xmlDict">xmlDict</a><br /> +<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br /> <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br /> <a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br /> <a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br /> @@ -1819,6 +1832,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlautomata.html#xmlFreeAutomata">xmlFreeAutomata</a><br /> <a href="html/libxml-catalog.html#xmlFreeCatalog">xmlFreeCatalog</a><br /> <a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br /> +<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br /> <a href="html/libxml-tree.html#xmlFreeDtd">xmlFreeDtd</a><br /> <a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> <a href="html/libxml-valid.html#xmlFreeElementTable">xmlFreeElementTable</a><br /> @@ -1841,6 +1855,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlFreePropList">xmlFreePropList</a><br /> <a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br /> <a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br /> +<a href="html/libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a><br /> <a href="html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a><br /> <a href="html/libxml-uri.html#xmlFreeURI">xmlFreeURI</a><br /> @@ -1894,6 +1909,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br /> <a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br /> <a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br /> +<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br /> <a href="html/libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a><br /> <a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br /> <a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br /> @@ -2111,6 +2127,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br /> <a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br /> <a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br /> +<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br /> <a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br /> <a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br /> @@ -2312,8 +2329,12 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-globals.html#xmlParserVersion">xmlParserVersion</a><br /> <a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br /> <a href="html/libxml-pattern.html#xmlPattern">xmlPattern</a><br /> +<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> +<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> <a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br /> +<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> <a href="html/libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a><br /> +<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br /> <a href="html/libxml-globals.html#xmlPedanticParserDefaultValue">xmlPedanticParserDefaultValue</a><br /> @@ -2502,7 +2523,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaElement">xmlSchemaElement</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaElementPtr">xmlSchemaElementPtr</a><br /> @@ -2519,6 +2542,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br /> @@ -2528,7 +2552,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaNotation">xmlSchemaNotation</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaNotationPtr">xmlSchemaNotationPtr</a><br /> @@ -2564,6 +2590,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaWildcard">xmlSchemaWildcard</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a><br /> <a href="html/libxml-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a><br /> @@ -2620,6 +2647,11 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br /> <a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br /> <a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br /> +<a href="html/libxml-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a><br /> +<a href="html/libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> <a href="html/libxml-parserInternals.html#xmlStringComment">xmlStringComment</a><br /> <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br /> <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br /> @@ -2648,6 +2680,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReader">xmlTextReader</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br /> diff --git a/doc/FAQ.html b/doc/FAQ.html index 9087448..04b913d 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li> +</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li> <li><a href="FAQ.html#Installati">Installation</a></li> <li><a href="FAQ.html#Compilatio">Compilation</a></li> <li><a href="FAQ.html#Developer">Developer corner</a></li> diff --git a/doc/Makefile.am b/doc/Makefile.am index 1bdcb79..8c96a7b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -75,6 +75,11 @@ $(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl echo "Validating the resulting XHTML pages" ; \ $(XMLLINT) --nonet --valid --noout html/*.html ; fi ); +wiki: libxml2-api.xml $(srcdir)/wiki.xsl + -@(if [ -x $(XSLTPROC) ] ; then \ + echo "Rebuilding the wiki HTML pages from the XML API" ; \ + $(XSLTPROC) --nonet $(srcdir)/wiki.xsl libxml2-api.xml; fi ) + $(WIN32_DIR)/libxml2.def.src: libxml2-api.xml -@(if [ -x $(XSLTPROC) ] ; then \ $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \ @@ -82,6 +87,8 @@ $(WIN32_DIR)/libxml2.def.src: libxml2-api.xml libxml2-api.xml libxml2-refs.xml: apibuild.py ../include/libxml/*.h ../*.c -(./apibuild.py) + -@(cd .. ; $(MAKE) rebuild_testapi) + xmllint.1: xmllint.xml -@($(XSLTPROC) --nonet xmllint.xml) diff --git a/doc/Makefile.in b/doc/Makefile.in index 19fe3c8..a3d9757 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -136,7 +136,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -159,6 +158,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ @@ -694,6 +694,11 @@ $(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl echo "Validating the resulting XHTML pages" ; \ $(XMLLINT) --nonet --valid --noout html/*.html ; fi ); +wiki: libxml2-api.xml $(srcdir)/wiki.xsl + -@(if [ -x $(XSLTPROC) ] ; then \ + echo "Rebuilding the wiki HTML pages from the XML API" ; \ + $(XSLTPROC) --nonet $(srcdir)/wiki.xsl libxml2-api.xml; fi ) + $(WIN32_DIR)/libxml2.def.src: libxml2-api.xml -@(if [ -x $(XSLTPROC) ] ; then \ $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \ @@ -701,6 +706,7 @@ $(WIN32_DIR)/libxml2.def.src: libxml2-api.xml libxml2-api.xml libxml2-refs.xml: apibuild.py ../include/libxml/*.h ../*.c -(./apibuild.py) + -@(cd .. ; $(MAKE) rebuild_testapi) xmllint.1: xmllint.xml -@($(XSLTPROC) --nonet xmllint.xml) diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html index 3c21e36..aa05e3e 100644 --- a/doc/XMLinfo.html +++ b/doc/XMLinfo.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for +</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for markup-based structured documents. Here is <a name="example" id="example">an example XML document</a>:</p><pre><?xml version="1.0"?> <EXAMPLE prop1="gnome is great" prop2="&amp; linux too"> diff --git a/doc/XSLT.html b/doc/XSLT.html index 97f414b..40473c5 100644 --- a/doc/XSLT.html +++ b/doc/XSLT.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a +</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a language for transforming XML documents into other XML documents (or HTML/textual output).</p><p>A separate library called libxslt is available implementing XSLT-1.0 for libxml2. This module "libxslt" too can be found in the Gnome CVS base.</p><p>You can check the <a href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a> diff --git a/doc/bugs.html b/doc/bugs.html index f3cef65..ed3abf9 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a +</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a point of fixing them in a timely fashion. The best way to report a bug is to use the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome bug tracking database</a> (make sure to use the "libxml2" module name). I diff --git a/doc/catalog.html b/doc/catalog.html index 5921d61..bdcbdc1 100644 --- a/doc/catalog.html +++ b/doc/catalog.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="General2">General overview</a></li> +</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="General2">General overview</a></li> <li><a href="#definition">The definition</a></li> <li><a href="#Simple">Using catalogs</a></li> <li><a href="#Some">Some examples</a></li> diff --git a/doc/contribs.html b/doc/contribs.html index b8a9192..4b727d9 100644 --- a/doc/contribs.html +++ b/doc/contribs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul><li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of +</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul><li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of patches, Gary Pennington worked on the validation API, threading support and Solaris port.</li> <li>John Fleck helps maintaining the documentation and man pages.</li> diff --git a/doc/downloads.html b/doc/downloads.html index da84284..80ef6eb 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libxml2 can be found on the <a href="ftp://xmlsoft.org/">xmlsoft.org</a> server ( <a href="http://xmlsoft.org/sources/">HTTP</a>, <a href="ftp://xmlsoft.org/">FTP</a> and rsync are available), there is also +</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libxml2 can be found on the <a href="ftp://xmlsoft.org/">xmlsoft.org</a> server ( <a href="http://xmlsoft.org/sources/">HTTP</a>, <a href="ftp://xmlsoft.org/">FTP</a> and rsync are available), there is also mirrors (<a href="ftp://ftp.planetmirror.com/pub/xmlsoft/">Australia</a>( <a href="http://xmlsoft.planetmirror.com/">Web</a>), <a href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a> as <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source archive</a> , Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a mirror in Austria</a>. (NOTE that you need both the <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a> diff --git a/doc/encoding.html b/doc/encoding.html index 9adfe6f..642681c 100644 --- a/doc/encoding.html +++ b/doc/encoding.html @@ -7,7 +7,14 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Encodings support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Encodings support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="encoding.html#What">What does internationalization support +</style><title>Encodings support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Encodings support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>If you are not really familiar with Internationalization (usual shortcut +is I18N) , Unicode, characters and glyphs, I suggest you read a <a href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a> +by Tim Bray on Unicode and why you should care about it.</p><p>If you don't understand why <b>it does not make sense to have a string +without knowing what encoding it uses</b>, then as Joel Spolsky said +<a href="http://www.joelonsoftware.com/articles/Unicode.html">please do +not write another line of code until you finish reading that article.</a>. +It is a prerequisite to understand this page, and avoid a lot of problems +with libxml2, XML or text processing in general.</p><p>Table of Content:</p><ol><li><a href="encoding.html#What">What does internationalization support mean ?</a></li> <li><a href="encoding.html#internal">The internal encoding, how and why</a></li> @@ -15,9 +22,7 @@ A:link, A:visited, A:active { text-decoration: underline } <li><a href="encoding.html#Default">Default supported encodings</a></li> <li><a href="encoding.html#extend">How to extend the existing support</a></li> -</ol><h3><a name="What" id="What">What does internationalization support mean ?</a></h3><p>If you are not really familiar with Internationalization (usual shortcut -is I18N) , Unicode, characters and glyphs, I suggest you read a <a href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a> -by Tim Bray on Unicode and why you should care about it.</p><p>XML was designed from the start to allow the support of any character set +</ol><h3><a name="What" id="What">What does internationalization support mean ?</a></h3><p>XML was designed from the start to allow the support of any character set by using Unicode. Any conformant XML parser has to support the UTF-8 and UTF-16 default encodings which can both express the full unicode ranges. UTF8 is a variable length encoding whose greatest points are to reuse the same diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index a3ef18f..97edc55 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -95,7 +95,7 @@ reader3_DEPENDENCIES= $(DEPS) reader3_LDADD= @RDL_LIBS@ $(LDADDS) valgrind: - $(MAKE) CHECKER='valgrind -q' tests + $(MAKE) CHECKER='valgrind' tests tests: $(noinst_PROGRAMS) @(echo '## examples regression tests') diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in index 78d6d6a..4e50e30 100644 --- a/doc/examples/Makefile.in +++ b/doc/examples/Makefile.in @@ -185,7 +185,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -208,6 +207,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ @@ -702,7 +702,7 @@ 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') diff --git a/doc/examples/index.py b/doc/examples/index.py index db41165..11df6f0 100755 --- a/doc/examples/index.py +++ b/doc/examples/index.py @@ -249,7 +249,7 @@ install-data-local: for example in examples: Makefile = Makefile + "%s_SOURCES=%s.c\n%s_LDFLAGS=\n%s_DEPENDENCIES= $(DEPS)\n%s_LDADD= @RDL_LIBS@ $(LDADDS)\n\n" % (example, example, example, example, example) - Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind -q' tests\n\n" + Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind' tests\n\n" Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n" Makefile = Makefile + "\t@(echo '## examples regression tests')\n" Makefile = Makefile + "\t@(echo > .memdump)\n" diff --git a/doc/examples/xpath1.c b/doc/examples/xpath1.c index be1dd2a..f2f7406 100644 --- a/doc/examples/xpath1.c +++ b/doc/examples/xpath1.c @@ -21,7 +21,7 @@ #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_SAX1_ENABLED) -void usage(const char *name); +static void usage(const char *name); int execute_xpath_expression(const char* filename, const xmlChar* xpathExpr, const xmlChar* nsList); int register_namespaces(xmlXPathContextPtr xpathCtx, const xmlChar* nsList); void print_xpath_nodes(xmlNodeSetPtr nodes, FILE* output); @@ -61,7 +61,7 @@ main(int argc, char **argv) { * * Prints usage information. */ -void +static void usage(const char *name) { assert(name); diff --git a/doc/examples/xpath2.c b/doc/examples/xpath2.c index eee771a..6ff4008 100644 --- a/doc/examples/xpath2.c +++ b/doc/examples/xpath2.c @@ -63,7 +63,7 @@ main(int argc, char **argv) { * * Prints usage information. */ -void +static void usage(const char *name) { assert(name); diff --git a/doc/help.html b/doc/help.html index 649629c..f7b1382 100644 --- a/doc/help.html +++ b/doc/help.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>How to help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>How to help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>You can help the project in various ways, the best thing to do first is to +</style><title>How to help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>How to help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>You can help the project in various ways, the best thing to do first is to subscribe to the mailing-list as explained before, check the <a href="http://mail.gnome.org/archives/xml/">archives </a>and the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome bug database</a>:</p><ol><li>Provide patches when you find problems.</li> <li>Provide the diffs when you port libxml2 to a new platform. They may not diff --git a/doc/html/libxml-dict.html b/doc/html/libxml-dict.html index f480d76..a944ed1 100644 --- a/doc/html/libxml-dict.html +++ b/doc/html/libxml-dict.html @@ -13,7 +13,8 @@ A:link, A:visited, A:active { text-decoration: underline } </style><title>Module dict from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module dict from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-debugXML.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-debugXML.html">debugXML</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-encoding.html">encoding</a></th><td><a accesskey="n" href="libxml-encoding.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>dictionary of reusable strings, just used to avoid allocation and freeing operations. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlDict">xmlDict</a><br />struct _xmlDict The content of this structure is not made public by the API. </pre><pre class="programlisting">Typedef <a href="libxml-dict.html#xmlDict">xmlDict</a> * <a name="xmlDictPtr" id="xmlDictPtr">xmlDictPtr</a> -</pre><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> <a href="#xmlDictCreate">xmlDictCreate</a> (void)</pre> +</pre><pre class="programlisting">void <a href="#xmlDictCleanup">xmlDictCleanup</a> (void)</pre> +<pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> <a href="#xmlDictCreate">xmlDictCreate</a> (void)</pre> <pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> <a href="#xmlDictCreateSub">xmlDictCreateSub</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> sub)</pre> <pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDictExists">xmlDictExists</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)</pre> <pre class="programlisting">void <a href="#xmlDictFree">xmlDictFree</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre> @@ -25,7 +26,9 @@ The content of this structure is not made public by the API. <h2>Description</h2> <h3><a name="xmlDict" id="xmlDict">Structure xmlDict</a></h3><pre class="programlisting">Structure xmlDict<br />struct _xmlDict { The content of this structure is not made public by the API. -}</pre><h3><a name="xmlDictCreate" id="xmlDictCreate"></a>Function: xmlDictCreate</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> xmlDictCreate (void)<br /> +}</pre><h3><a name="xmlDictCleanup" id="xmlDictCleanup"></a>Function: xmlDictCleanup</h3><pre class="programlisting">void xmlDictCleanup (void)<br /> +</pre><p>Free the dictionary mutex.</p> +<h3><a name="xmlDictCreate" id="xmlDictCreate"></a>Function: xmlDictCreate</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> xmlDictCreate (void)<br /> </pre><p>Create a new dictionary</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlDictCreateSub" id="xmlDictCreateSub"></a>Function: xmlDictCreateSub</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> xmlDictCreateSub (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> sub)<br /> </pre><p>Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.</p> diff --git a/doc/html/libxml-encoding.html b/doc/html/libxml-encoding.html index f16f046..03585f4 100644 --- a/doc/html/libxml-encoding.html +++ b/doc/html/libxml-encoding.html @@ -73,9 +73,9 @@ int <a href="#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> (unsigned iconv_t iconv_out }</pre><h3><a name="UTF8Toisolat1" id="UTF8Toisolat1"></a>Function: UTF8Toisolat1</h3><pre class="programlisting">int UTF8Toisolat1 (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)<br /> </pre><p>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 block of chars out.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="isolat1ToUTF8" id="isolat1ToUTF8"></a>Function: isolat1ToUTF8</h3><pre class="programlisting">int isolat1ToUTF8 (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="isolat1ToUTF8" id="isolat1ToUTF8"></a>Function: isolat1ToUTF8</h3><pre class="programlisting">int isolat1ToUTF8 (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)<br /> </pre><p>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of ISO Latin 1 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="xmlAddEncodingAlias" id="xmlAddEncodingAlias"></a>Function: xmlAddEncodingAlias</h3><pre class="programlisting">int xmlAddEncodingAlias (const char * name, <br /> const char * alias)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of ISO Latin 1 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="xmlAddEncodingAlias" id="xmlAddEncodingAlias"></a>Function: xmlAddEncodingAlias</h3><pre class="programlisting">int xmlAddEncodingAlias (const char * name, <br /> const char * alias)<br /> </pre><p>Registers an alias @alias for an encoding named @name. Existing alias will be overwritten.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the encoding name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>alias</tt></i>:</span></td><td>the alias name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlCharEncCloseFunc" id="xmlCharEncCloseFunc"></a>Function: xmlCharEncCloseFunc</h3><pre class="programlisting">int xmlCharEncCloseFunc (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler)<br /> </pre><p>Generic front-end for encoding handler close function</p> diff --git a/doc/html/libxml-entities.html b/doc/html/libxml-entities.html index 31ed35e..ff56a7e 100644 --- a/doc/html/libxml-entities.html +++ b/doc/html/libxml-entities.html @@ -50,7 +50,7 @@ The content of this structure is not made public by the API. <h3><a name="xmlCopyEntitiesTable" id="xmlCopyEntitiesTable"></a>Function: xmlCopyEntitiesTable</h3><pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCopyEntitiesTable (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br /> </pre><p>Build a copy of an entity table.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCreateEntitiesTable" id="xmlCreateEntitiesTable"></a>Function: xmlCreateEntitiesTable</h3><pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCreateEntitiesTable (void)<br /> -</pre><p>create and initialize an empty entities hash table.</p> +</pre><p>create and initialize an empty entities hash table. This really doesn't make sense and should be deprecated</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> just created or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlDumpEntitiesTable" id="xmlDumpEntitiesTable"></a>Function: xmlDumpEntitiesTable</h3><pre class="programlisting">void xmlDumpEntitiesTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br /> </pre><p>This will dump the content of the entity table as an XML DTD definition</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>An XML buffer.</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr></tbody></table></div><h3><a name="xmlDumpEntityDecl" id="xmlDumpEntityDecl"></a>Function: xmlDumpEntityDecl</h3><pre class="programlisting">void xmlDumpEntityDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent)<br /> diff --git a/doc/html/libxml-hash.html b/doc/html/libxml-hash.html index 278bdd4..b8a87fb 100644 --- a/doc/html/libxml-hash.html +++ b/doc/html/libxml-hash.html @@ -21,6 +21,7 @@ void * <a href="#xmlHashCopier">xmlHashCopier</a> (void * payload, <br /> </pre> <pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCopy">xmlHashCopy</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashCopier">xmlHashCopier</a> f)</pre> <pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCreate">xmlHashCreate</a> (int size)</pre> +<pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCreateDict">xmlHashCreateDict</a> (int size, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre> <pre class="programlisting">Function type: <a href="#xmlHashDeallocator">xmlHashDeallocator</a> void <a href="#xmlHashDeallocator">xmlHashDeallocator</a> (void * payload, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name) </pre> @@ -49,7 +50,7 @@ void <a href="#xmlHashScannerFull">xmlHashScannerFull</a> (void * payload, <br <pre class="programlisting">int <a href="#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre> <pre class="programlisting">int <a href="#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre> <h2>Description</h2> -<h3><a name="XML_CAST_FPTR" id="XML_CAST_FPTR"></a>Macro: XML_CAST_FPTR</h3><pre>#define XML_CAST_FPTR</pre><p>Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc</p> +<h3><a name="XML_CAST_FPTR" id="XML_CAST_FPTR"></a>Macro: XML_CAST_FPTR</h3><pre>#define XML_CAST_FPTR</pre><p>Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) This macro violated ISO C aliasing rules (gcc4 on s390 broke) so it is disabled now</p> <h3><a name="xmlHashTable" id="xmlHashTable">Structure xmlHashTable</a></h3><pre class="programlisting">Structure xmlHashTable<br />struct _xmlHashTable { The content of this structure is not made public by the API. }</pre><h3><a name="xmlHashAddEntry" id="xmlHashAddEntry"></a>Function: xmlHashAddEntry</h3><pre class="programlisting">int xmlHashAddEntry (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> void * userdata)<br /> @@ -65,7 +66,9 @@ void * xmlHashCopier (void * payload, <br /> <a href="libxml-xmlstring.ht </pre><p>Scan the hash @table and applied @f to each value.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the copier function for items in the hash</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new table or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlHashCreate" id="xmlHashCreate"></a>Function: xmlHashCreate</h3><pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCreate (int size)<br /> </pre><p>Create a new xmlHashTablePtr.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the hash table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlHashDeallocator" id="xmlHashDeallocator"></a>Function type: xmlHashDeallocator</h3><pre class="programlisting">Function type: xmlHashDeallocator +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the hash table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlHashCreateDict" id="xmlHashCreateDict"></a>Function: xmlHashCreateDict</h3><pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCreateDict (int size, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br /> +</pre><p>Create a new <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> which will use @dict as the internal dictionary</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the hash table</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>a dictionary to use for the hash</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlHashDeallocator" id="xmlHashDeallocator"></a>Function type: xmlHashDeallocator</h3><pre class="programlisting">Function type: xmlHashDeallocator void xmlHashDeallocator (void * payload, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name) </pre><p>Callback to free data from a hash.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr></tbody></table></div><br /> <h3><a name="xmlHashFree" id="xmlHashFree"></a>Function: xmlHashFree</h3><pre class="programlisting">void xmlHashFree (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br /> diff --git a/doc/html/libxml-pattern.html b/doc/html/libxml-pattern.html index 2bf3ec3..2d56c1c 100644 --- a/doc/html/libxml-pattern.html +++ b/doc/html/libxml-pattern.html @@ -13,19 +13,48 @@ A:link, A:visited, A:active { text-decoration: underline } </style><title>Module pattern from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module pattern from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-parserInternals.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-parserInternals.html">parserInternals</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="n" href="libxml-relaxng.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>allows to compile and test pattern expressions for nodes either in a tree or based on a parser state. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlPattern">xmlPattern</a><br />struct _xmlPattern The content of this structure is not made public by the API. </pre><pre class="programlisting">Typedef <a href="libxml-pattern.html#xmlPattern">xmlPattern</a> * <a name="xmlPatternPtr" id="xmlPatternPtr">xmlPatternPtr</a> +</pre><pre class="programlisting">Structure <a href="#xmlStreamCtxt">xmlStreamCtxt</a><br />struct _xmlStreamCtxt +The content of this structure is not made public by the API. +</pre><pre class="programlisting">Typedef <a href="libxml-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a> * <a name="xmlStreamCtxtPtr" id="xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> </pre><pre class="programlisting">void <a href="#xmlFreePattern">xmlFreePattern</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre> <pre class="programlisting">void <a href="#xmlFreePatternList">xmlFreePatternList</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre> +<pre class="programlisting">void <a href="#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)</pre> +<pre class="programlisting">int <a href="#xmlPatternFromRoot">xmlPatternFromRoot</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre> +<pre class="programlisting"><a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> <a href="#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre> <pre class="programlisting">int <a href="#xmlPatternMatch">xmlPatternMatch</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre> +<pre class="programlisting">int <a href="#xmlPatternMaxDepth">xmlPatternMaxDepth</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre> +<pre class="programlisting">int <a href="#xmlPatternStreamable">xmlPatternStreamable</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre> <pre class="programlisting"><a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> <a href="#xmlPatterncompile">xmlPatterncompile</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br /> <a href="libxml-dict.html#xmlDict">xmlDict</a> * dict, <br /> int flags, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)</pre> +<pre class="programlisting">int <a href="#xmlStreamPop">xmlStreamPop</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)</pre> +<pre class="programlisting">int <a href="#xmlStreamPush">xmlStreamPush</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre> +<pre class="programlisting">int <a href="#xmlStreamPushAttr">xmlStreamPushAttr</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre> <h2>Description</h2> <h3><a name="xmlPattern" id="xmlPattern">Structure xmlPattern</a></h3><pre class="programlisting">Structure xmlPattern<br />struct _xmlPattern { The content of this structure is not made public by the API. +}</pre><h3><a name="xmlStreamCtxt" id="xmlStreamCtxt">Structure xmlStreamCtxt</a></h3><pre class="programlisting">Structure xmlStreamCtxt<br />struct _xmlStreamCtxt { +The content of this structure is not made public by the API. }</pre><h3><a name="xmlFreePattern" id="xmlFreePattern"></a>Function: xmlFreePattern</h3><pre class="programlisting">void xmlFreePattern (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br /> </pre><p>Free up the memory allocated by @comp</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XSLT comp</td></tr></tbody></table></div><h3><a name="xmlFreePatternList" id="xmlFreePatternList"></a>Function: xmlFreePatternList</h3><pre class="programlisting">void xmlFreePatternList (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br /> </pre><p>Free up the memory allocated by all the elements of @comp</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XSLT comp list</td></tr></tbody></table></div><h3><a name="xmlPatternMatch" id="xmlPatternMatch"></a>Function: xmlPatternMatch</h3><pre class="programlisting">int xmlPatternMatch (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XSLT comp list</td></tr></tbody></table></div><h3><a name="xmlFreeStreamCtxt" id="xmlFreeStreamCtxt"></a>Function: xmlFreeStreamCtxt</h3><pre class="programlisting">void xmlFreeStreamCtxt (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br /> +</pre><p>Free the stream context</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr></tbody></table></div><h3><a name="xmlPatternFromRoot" id="xmlPatternFromRoot"></a>Function: xmlPatternFromRoot</h3><pre class="programlisting">int xmlPatternFromRoot (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br /> +</pre><p>Check if the pattern must be looked at from the root.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlPatternGetStreamCtxt" id="xmlPatternGetStreamCtxt"></a>Function: xmlPatternGetStreamCtxt</h3><pre class="programlisting"><a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> xmlPatternGetStreamCtxt (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br /> +</pre><p>Get a streaming context for that pattern Use <a href="libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a> to free the context.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the context or NULL in case of failure</td></tr></tbody></table></div><h3><a name="xmlPatternMatch" id="xmlPatternMatch"></a>Function: xmlPatternMatch</h3><pre class="programlisting">int xmlPatternMatch (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br /> </pre><p>Test wether the node matches the pattern</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it matches, 0 if it doesn't and -1 in case of failure</td></tr></tbody></table></div><h3><a name="xmlPatterncompile" id="xmlPatterncompile"></a>Function: xmlPatterncompile</h3><pre class="programlisting"><a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> xmlPatterncompile (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br /> <a href="libxml-dict.html#xmlDict">xmlDict</a> * dict, <br /> int flags, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it matches, 0 if it doesn't and -1 in case of failure</td></tr></tbody></table></div><h3><a name="xmlPatternMaxDepth" id="xmlPatternMaxDepth"></a>Function: xmlPatternMaxDepth</h3><pre class="programlisting">int xmlPatternMaxDepth (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br /> +</pre><p>Check the maximum depth reachable by a pattern</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-2 if no limit (using //), otherwise the depth, and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlPatternStreamable" id="xmlPatternStreamable"></a>Function: xmlPatternStreamable</h3><pre class="programlisting">int xmlPatternStreamable (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br /> +</pre><p>Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() should work.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if streamable, 0 if not and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlPatterncompile" id="xmlPatterncompile"></a>Function: xmlPatterncompile</h3><pre class="programlisting"><a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> xmlPatterncompile (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br /> <a href="libxml-dict.html#xmlDict">xmlDict</a> * dict, <br /> int flags, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)<br /> </pre><p>Compile a pattern.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>the pattern to compile</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>an optional dictionnary for interned strings</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>compilation flags, undefined yet</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled for of the pattern or NULL in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>the pattern to compile</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>an optional dictionnary for interned strings</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>compilation flags, undefined yet</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled for of the pattern or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlStreamPop" id="xmlStreamPop"></a>Function: xmlStreamPop</h3><pre class="programlisting">int xmlStreamPop (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br /> +</pre><p>push one level from the stream.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPush" id="xmlStreamPush"></a>Function: xmlStreamPush</h3><pre class="programlisting">int xmlStreamPush (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br /> +</pre><p>push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionnary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPushAttr" id="xmlStreamPushAttr"></a>Function: xmlStreamPushAttr</h3><pre class="programlisting">int xmlStreamPushAttr (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br /> +</pre><p>push new <a href="libxml-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionnary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html> diff --git a/doc/html/libxml-schemasInternals.html b/doc/html/libxml-schemasInternals.html index 04c0a12..92aae08 100644 --- a/doc/html/libxml-schemasInternals.html +++ b/doc/html/libxml-schemasInternals.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } </style><style type="text/css"> div.deprecated pre.programlisting {border-style: double;border-color:red} pre.programlisting {border-style: double;background: #EECFA1} - </style><title>Module schemasInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schemasInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-relaxng.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-threads.html">threads</a></th><td><a accesskey="n" href="libxml-threads.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for the XML Schemas handling and schema validity checking </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a></pre><pre class="programlisting">Structure <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a><br />struct _xmlSchemaAnnot + </style><title>Module schemasInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schemasInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-relaxng.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-threads.html">threads</a></th><td><a accesskey="n" href="libxml-threads.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for the XML Schemas handling and schema validity checking </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a></pre><pre class="programlisting">Structure <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a><br />struct _xmlSchemaAnnot </pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a> * <a name="xmlSchemaAnnotPtr" id="xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> </pre><pre class="programlisting">Structure <a href="#xmlSchemaAttribute">xmlSchemaAttribute</a><br />struct _xmlSchemaAttribute </pre><pre class="programlisting">Structure <a href="#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a><br />struct _xmlSchemaAttributeGroup @@ -97,6 +97,7 @@ The content of this structure is not made public by the API. <h3><a name="XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE" id="XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE"></a>Macro: XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</h3><pre>#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</pre><p>Marks the item as a builtin primitive.</p> <h3><a name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION" id="XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION"></a>Macro: XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</h3><pre>#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</pre><p>the simple or complex type has a derivation method of "extension".</p> <h3><a name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION" id="XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION"></a>Macro: XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</h3><pre>#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</pre><p>the simple or complex type has a derivation method of "restriction".</p> +<h3><a name="XML_SCHEMAS_TYPE_FACETSNEEDVALUE" id="XML_SCHEMAS_TYPE_FACETSNEEDVALUE"></a>Macro: XML_SCHEMAS_TYPE_FACETSNEEDVALUE</h3><pre>#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE</pre><p>indicates if the facets need a computed value</p> <h3><a name="XML_SCHEMAS_TYPE_FINAL_DEFAULT" id="XML_SCHEMAS_TYPE_FINAL_DEFAULT"></a>Macro: XML_SCHEMAS_TYPE_FINAL_DEFAULT</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_DEFAULT</pre><p>the simpleType has a final of "default".</p> <h3><a name="XML_SCHEMAS_TYPE_FINAL_EXTENSION" id="XML_SCHEMAS_TYPE_FINAL_EXTENSION"></a>Macro: XML_SCHEMAS_TYPE_FINAL_EXTENSION</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_EXTENSION</pre><p>the complexType has a final of "extension".</p> <h3><a name="XML_SCHEMAS_TYPE_FINAL_LIST" id="XML_SCHEMAS_TYPE_FINAL_LIST"></a>Macro: XML_SCHEMAS_TYPE_FINAL_LIST</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_LIST</pre><p>the simpleType has a final of "list".</p> @@ -188,6 +189,7 @@ The content of this structure is not made public by the API. <a href="libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal + void * idcs }</pre><h3><a name="xmlSchemaFacet" id="xmlSchemaFacet">Structure xmlSchemaFacet</a></h3><pre class="programlisting">Structure xmlSchemaFacet<br />struct _xmlSchemaFacet { <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type struct _xmlSchemaFacet * next : the next type if in a sequence ... @@ -263,6 +265,9 @@ The content of this structure is not made public by the API. <a name="XML_SCHEMA_TYPE_LIST" id="XML_SCHEMA_TYPE_LIST">XML_SCHEMA_TYPE_LIST</a> = 19 <a name="XML_SCHEMA_TYPE_UNION" id="XML_SCHEMA_TYPE_UNION">XML_SCHEMA_TYPE_UNION</a> = 20 <a name="XML_SCHEMA_TYPE_ANY_ATTRIBUTE" id="XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a> = 21 + <a name="XML_SCHEMA_TYPE_IDC_UNIQUE" id="XML_SCHEMA_TYPE_IDC_UNIQUE">XML_SCHEMA_TYPE_IDC_UNIQUE</a> = 22 + <a name="XML_SCHEMA_TYPE_IDC_KEY" id="XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a> = 23 + <a name="XML_SCHEMA_TYPE_IDC_KEYREF" id="XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a> = 24 <a name="XML_SCHEMA_FACET_MININCLUSIVE" id="XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a> = 1000 <a name="XML_SCHEMA_FACET_MINEXCLUSIVE" id="XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a> = 1001 <a name="XML_SCHEMA_FACET_MAXINCLUSIVE" id="XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a> = 1002 diff --git a/doc/html/libxml-valid.html b/doc/html/libxml-valid.html index 9cbceb2..d02b327 100644 --- a/doc/html/libxml-valid.html +++ b/doc/html/libxml-valid.html @@ -36,6 +36,7 @@ The content of this structure is not made public by the API. <pre class="programlisting"><a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="#xmlAddNotationDecl">xmlAddNotationDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * PublicID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre> <pre class="programlisting"><a href="libxml-tree.html#xmlRefPtr">xmlRefPtr</a> <a href="#xmlAddRef">xmlAddRef</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre> <pre class="programlisting"><a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> <a href="#xmlCopyAttributeTable">xmlCopyAttributeTable</a> (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)</pre> +<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyDocElementContent">xmlCopyDocElementContent</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre> <pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyElementContent">xmlCopyElementContent</a> (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre> <pre class="programlisting"><a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> <a href="#xmlCopyElementTable">xmlCopyElementTable</a> (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)</pre> <pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCopyEnumeration">xmlCopyEnumeration</a> (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)</pre> @@ -48,6 +49,7 @@ The content of this structure is not made public by the API. <pre class="programlisting">void <a href="#xmlDumpNotationDecl">xmlDumpNotationDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota)</pre> <pre class="programlisting">void <a href="#xmlDumpNotationTable">xmlDumpNotationTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)</pre> <pre class="programlisting">void <a href="#xmlFreeAttributeTable">xmlFreeAttributeTable</a> (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)</pre> +<pre class="programlisting">void <a href="#xmlFreeDocElementContent">xmlFreeDocElementContent</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre> <pre class="programlisting">void <a href="#xmlFreeElementContent">xmlFreeElementContent</a> (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre> <pre class="programlisting">void <a href="#xmlFreeElementTable">xmlFreeElementTable</a> (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)</pre> <pre class="programlisting">void <a href="#xmlFreeEnumeration">xmlFreeEnumeration</a> (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)</pre> @@ -65,6 +67,7 @@ The content of this structure is not made public by the API. <pre class="programlisting">int <a href="#xmlIsID">xmlIsID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre> <pre class="programlisting">int <a href="#xmlIsMixedElement">xmlIsMixedElement</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre> <pre class="programlisting">int <a href="#xmlIsRef">xmlIsRef</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre> +<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlNewDocElementContent">xmlNewDocElementContent</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)</pre> <pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlNewElementContent">xmlNewElementContent</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)</pre> <pre class="programlisting"><a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> <a href="#xmlNewValidCtxt">xmlNewValidCtxt</a> (void)</pre> <pre class="programlisting">int <a href="#xmlRemoveID">xmlRemoveID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre> @@ -149,8 +152,10 @@ The content of this structure is not made public by the API. </pre><p>Register a new ref declaration</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value name</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> holding the Ref</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new <a href="libxml-tree.html#xmlRefPtr">xmlRefPtr</a></td></tr></tbody></table></div><h3><a name="xmlCopyAttributeTable" id="xmlCopyAttributeTable"></a>Function: xmlCopyAttributeTable</h3><pre class="programlisting"><a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> xmlCopyAttributeTable (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br /> </pre><p>Build a copy of an <a href="libxml-SAX.html#attribute">attribute</a> table.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyElementContent" id="xmlCopyElementContent"></a>Function: xmlCopyElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyDocElementContent" id="xmlCopyDocElementContent"></a>Function: xmlCopyDocElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyDocElementContent (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br /> </pre><p>Build a copy of an element content description.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the element declaration</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>An element content pointer.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyElementContent" id="xmlCopyElementContent"></a>Function: xmlCopyElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br /> +</pre><p>Build a copy of an element content description. Deprecated, use <a href="libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a> instead</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>An element content pointer.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyElementTable" id="xmlCopyElementTable"></a>Function: xmlCopyElementTable</h3><pre class="programlisting"><a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> xmlCopyElementTable (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br /> </pre><p>Build a copy of an element table.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyEnumeration" id="xmlCopyEnumeration"></a>Function: xmlCopyEnumeration</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlCopyEnumeration (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)<br /> @@ -173,8 +178,10 @@ The content of this structure is not made public by the API. </pre><p>This will dump the content of the notation table as an XML DTD definition</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>A notation table</td></tr></tbody></table></div><h3><a name="xmlFreeAttributeTable" id="xmlFreeAttributeTable"></a>Function: xmlFreeAttributeTable</h3><pre class="programlisting">void xmlFreeAttributeTable (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br /> </pre><p>Deallocate the memory used by an entities hash table.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> table</td></tr></tbody></table></div><h3><a name="xmlFreeElementContent" id="xmlFreeElementContent"></a>Function: xmlFreeElementContent</h3><pre class="programlisting">void xmlFreeElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br /> -</pre><p>Free an element content structure. This is a recursive call !</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> table</td></tr></tbody></table></div><h3><a name="xmlFreeDocElementContent" id="xmlFreeDocElementContent"></a>Function: xmlFreeDocElementContent</h3><pre class="programlisting">void xmlFreeDocElementContent (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br /> +</pre><p>Free an element content structure. The whole subtree is removed.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the element declaration</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the element content tree to free</td></tr></tbody></table></div><h3><a name="xmlFreeElementContent" id="xmlFreeElementContent"></a>Function: xmlFreeElementContent</h3><pre class="programlisting">void xmlFreeElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br /> +</pre><p>Free an element content structure. The whole subtree is removed. Deprecated, use <a href="libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a> instead</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the element content tree to free</td></tr></tbody></table></div><h3><a name="xmlFreeElementTable" id="xmlFreeElementTable"></a>Function: xmlFreeElementTable</h3><pre class="programlisting">void xmlFreeElementTable (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br /> </pre><p>Deallocate the memory used by an element hash table.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr></tbody></table></div><h3><a name="xmlFreeEnumeration" id="xmlFreeEnumeration"></a>Function: xmlFreeEnumeration</h3><pre class="programlisting">void xmlFreeEnumeration (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)<br /> @@ -207,8 +214,10 @@ The content of this structure is not made public by the API. </pre><p>Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no, 1 if yes, and -1 if no element description is available</td></tr></tbody></table></div><h3><a name="xmlIsRef" id="xmlIsRef"></a>Function: xmlIsRef</h3><pre class="programlisting">int xmlIsRef (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br /> </pre><p>Determine whether an <a href="libxml-SAX.html#attribute">attribute</a> is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase).</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element carrying the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the lookup result</td></tr></tbody></table></div><h3><a name="xmlNewElementContent" id="xmlNewElementContent"></a>Function: xmlNewElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewElementContent (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)<br /> -</pre><p>Allocate an element content structure.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element carrying the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the lookup result</td></tr></tbody></table></div><h3><a name="xmlNewDocElementContent" id="xmlNewDocElementContent"></a>Function: xmlNewDocElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewDocElementContent (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)<br /> +</pre><p>Allocate an element content structure for the document.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the subelement name or NULL</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of element content decl</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new element content structure</td></tr></tbody></table></div><h3><a name="xmlNewElementContent" id="xmlNewElementContent"></a>Function: xmlNewElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewElementContent (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)<br /> +</pre><p>Allocate an element content structure. Deprecated in favor of <a href="libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a></p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the subelement name or NULL</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of element content decl</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new element content structure</td></tr></tbody></table></div><h3><a name="xmlNewValidCtxt" id="xmlNewValidCtxt"></a>Function: xmlNewValidCtxt</h3><pre class="programlisting"><a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> xmlNewValidCtxt (void)<br /> </pre><p>Allocate a validation context structure.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new validation context structure</td></tr></tbody></table></div><h3><a name="xmlRemoveID" id="xmlRemoveID"></a>Function: xmlRemoveID</h3><pre class="programlisting">int xmlRemoveID (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br /> diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html index c586bf7..425bcfc 100644 --- a/doc/html/libxml-xmlerror.html +++ b/doc/html/libxml-xmlerror.html @@ -62,7 +62,7 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD <a name="XML_FROM_OUTPUT" id="XML_FROM_OUTPUT">XML_FROM_OUTPUT</a> = 7 : The serialization code <a name="XML_FROM_IO" id="XML_FROM_IO">XML_FROM_IO</a> = 8 : The Input/Output stack <a name="XML_FROM_FTP" id="XML_FROM_FTP">XML_FROM_FTP</a> = 9 : The FTP module - <a name="XML_FROM_HTTP" id="XML_FROM_HTTP">XML_FROM_HTTP</a> = 10 : The FTP module + <a name="XML_FROM_HTTP" id="XML_FROM_HTTP">XML_FROM_HTTP</a> = 10 : The HTTP module <a name="XML_FROM_XINCLUDE" id="XML_FROM_XINCLUDE">XML_FROM_XINCLUDE</a> = 11 : The XInclude processing <a name="XML_FROM_XPATH" id="XML_FROM_XPATH">XML_FROM_XPATH</a> = 12 : The XPath module <a name="XML_FROM_XPOINTER" id="XML_FROM_XPOINTER">XML_FROM_XPOINTER</a> = 13 : The XPointer module @@ -647,6 +647,8 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD <a name="XML_SCHEMAV_CVC_AU" id="XML_SCHEMAV_CVC_AU">XML_SCHEMAV_CVC_AU</a> = 1874 : 1874 <a name="XML_SCHEMAV_CVC_TYPE_1" id="XML_SCHEMAV_CVC_TYPE_1">XML_SCHEMAV_CVC_TYPE_1</a> = 1875 : 1875 <a name="XML_SCHEMAV_CVC_TYPE_2" id="XML_SCHEMAV_CVC_TYPE_2">XML_SCHEMAV_CVC_TYPE_2</a> = 1876 : 1876 + <a name="XML_SCHEMAV_CVC_IDC" id="XML_SCHEMAV_CVC_IDC">XML_SCHEMAV_CVC_IDC</a> = 1877 : 1877 + <a name="XML_SCHEMAV_CVC_WILDCARD" id="XML_SCHEMAV_CVC_WILDCARD">XML_SCHEMAV_CVC_WILDCARD</a> = 1878 : 1878 <a name="XML_XPTR_UNKNOWN_SCHEME" id="XML_XPTR_UNKNOWN_SCHEME">XML_XPTR_UNKNOWN_SCHEME</a> = 1900 <a name="XML_XPTR_CHILDSEQ_START" id="XML_XPTR_CHILDSEQ_START">XML_XPTR_CHILDSEQ_START</a> = 1901 : 1901 <a name="XML_XPTR_EVAL_FAILED" id="XML_XPTR_EVAL_FAILED">XML_XPTR_EVAL_FAILED</a> = 1902 : 1902 @@ -658,6 +660,7 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD <a name="XML_FTP_PASV_ANSWER" id="XML_FTP_PASV_ANSWER">XML_FTP_PASV_ANSWER</a> = 2000 <a name="XML_FTP_EPSV_ANSWER" id="XML_FTP_EPSV_ANSWER">XML_FTP_EPSV_ANSWER</a> = 2001 : 2001 <a name="XML_FTP_ACCNT" id="XML_FTP_ACCNT">XML_FTP_ACCNT</a> = 2002 : 2002 + <a name="XML_FTP_URL_SYNTAX" id="XML_FTP_URL_SYNTAX">XML_FTP_URL_SYNTAX</a> = 2003 : 2003 <a name="XML_HTTP_URL_SYNTAX" id="XML_HTTP_URL_SYNTAX">XML_HTTP_URL_SYNTAX</a> = 2020 <a name="XML_HTTP_USE_IP" id="XML_HTTP_USE_IP">XML_HTTP_USE_IP</a> = 2021 : 2021 <a name="XML_HTTP_UNKNOWN_HOST" id="XML_HTTP_UNKNOWN_HOST">XML_HTTP_UNKNOWN_HOST</a> = 2022 : 2022 diff --git a/doc/html/libxml-xmlreader.html b/doc/html/libxml-xmlreader.html index f8709ff..2a68322 100644 --- a/doc/html/libxml-xmlreader.html +++ b/doc/html/libxml-xmlreader.html @@ -35,6 +35,7 @@ The content of this structure is not made public by the API. <pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderWalker">xmlReaderWalker</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre> <pre class="programlisting">int <a href="#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre> <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre> +<pre class="programlisting">long <a href="#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre> <pre class="programlisting">int <a href="#xmlTextReaderClose">xmlTextReaderClose</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre> <pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre> <pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre> @@ -178,7 +179,9 @@ The content of this structure is not made public by the API. </pre><p>Provides the number of attributes of the current node</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 i no attributes, -1 in case of error or the <a href="libxml-SAX.html#attribute">attribute</a> count</td></tr></tbody></table></div><h3><a name="xmlTextReaderBaseUri" id="xmlTextReaderBaseUri"></a>Function: xmlTextReaderBaseUri</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderBaseUri (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br /> </pre><p>The base URI of the node.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlTextReaderClose" id="xmlTextReaderClose"></a>Function: xmlTextReaderClose</h3><pre class="programlisting">int xmlTextReaderClose (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlTextReaderByteConsumed" id="xmlTextReaderByteConsumed"></a>Function: xmlTextReaderByteConsumed</h3><pre class="programlisting">long xmlTextReaderByteConsumed (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br /> +</pre><p>This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the index in bytes from the beginning of the entity or -1 in case the index could not be computed.</td></tr></tbody></table></div><h3><a name="xmlTextReaderClose" id="xmlTextReaderClose"></a>Function: xmlTextReaderClose</h3><pre class="programlisting">int xmlTextReaderClose (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br /> </pre><p>This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstBaseUri" id="xmlTextReaderConstBaseUri"></a>Function: xmlTextReaderConstBaseUri</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstBaseUri (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br /> </pre><p>The base URI of the node.</p> diff --git a/doc/html/libxml-xmlschemas.html b/doc/html/libxml-xmlschemas.html index ce3e9e4..91b1ab9 100644 --- a/doc/html/libxml-xmlschemas.html +++ b/doc/html/libxml-xmlschemas.html @@ -65,6 +65,7 @@ void <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> (v void * includes : the includes, this is opaque for now int preserve : whether to free the document int counter : used to give ononymous components uniqu + <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> idcDef }</pre><h3><a name="xmlSchemaParserCtxt" id="xmlSchemaParserCtxt">Structure xmlSchemaParserCtxt</a></h3><pre class="programlisting">Structure xmlSchemaParserCtxt<br />struct _xmlSchemaParserCtxt { The content of this structure is not made public by the API. }</pre><h3><a name="xmlSchemaValidCtxt" id="xmlSchemaValidCtxt">Structure xmlSchemaValidCtxt</a></h3><pre class="programlisting">Structure xmlSchemaValidCtxt<br />struct _xmlSchemaValidCtxt { @@ -119,7 +120,7 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewParserCtxt" id="xmlSchemaNewParserCtxt"></a>Function: xmlSchemaNewParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewParserCtxt (const char * URL)<br /> </pre><p>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewValidCtxt" id="xmlSchemaNewValidCtxt"></a>Function: xmlSchemaNewValidCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> xmlSchemaNewValidCtxt (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br /> -</pre><p>Create an XML Schemas validation context based on the given schema</p> +</pre><p>Create an XML Schemas validation context based on the given schema.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schemas</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaParse" id="xmlSchemaParse"></a>Function: xmlSchemaParse</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> xmlSchemaParse (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br /> </pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserErrors" id="xmlSchemaSetParserErrors"></a>Function: xmlSchemaSetParserErrors</h3><pre class="programlisting">void xmlSchemaSetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)<br /> diff --git a/doc/html/libxml-xmlschemastypes.html b/doc/html/libxml-xmlschemastypes.html index 3241a2b..cf304ad 100644 --- a/doc/html/libxml-xmlschemastypes.html +++ b/doc/html/libxml-xmlschemastypes.html @@ -10,19 +10,25 @@ A:link, A:visited, A:active { text-decoration: underline } </style><style type="text/css"> div.deprecated pre.programlisting {border-style: double;border-color:red} pre.programlisting {border-style: double;background: #EECFA1} - </style><title>Module xmlschemastypes from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlschemastypes from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlschemas.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlschemas.html">xmlschemas</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlstring.html">xmlstring</a></th><td><a accesskey="n" href="libxml-xmlstring.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>module providing the XML Schema Datatypes implementation both definition and validity checking </p><h2>Table of Contents</h2><pre class="programlisting">int <a href="#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br /> <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre> + </style><title>Module xmlschemastypes from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlschemastypes from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlschemas.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlschemas.html">xmlschemas</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlstring.html">xmlstring</a></th><td><a accesskey="n" href="libxml-xmlstring.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>module providing the XML Schema Datatypes implementation both definition and validity checking </p><h2>Table of Contents</h2><pre class="programlisting">Enum <a href="#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> +</pre><pre class="programlisting">int <a href="#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br /> <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre> <pre class="programlisting">void <a href="#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a> (void)</pre> <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaCollapseString">xmlSchemaCollapseString</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre> <pre class="programlisting">int <a href="#xmlSchemaCompareValues">xmlSchemaCompareValues</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y)</pre> +<pre class="programlisting">int <a href="#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws)</pre> +<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaCopyValue">xmlSchemaCopyValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)</pre> <pre class="programlisting">void <a href="#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)</pre> <pre class="programlisting">void <a href="#xmlSchemaFreeValue">xmlSchemaFreeValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value)</pre> <pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)</pre> <pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a> (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type)</pre> +<pre class="programlisting">int <a href="#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** retValue)</pre> <pre class="programlisting">unsigned long <a href="#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)</pre> <pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre> <pre class="programlisting">void <a href="#xmlSchemaInitTypes">xmlSchemaInitTypes</a> (void)</pre> <pre class="programlisting">int <a href="#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> int facetType)</pre> <pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> <a href="#xmlSchemaNewFacet">xmlSchemaNewFacet</a> (void)</pre> +<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre> +<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre> <pre class="programlisting">int <a href="#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre> <pre class="programlisting">int <a href="#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre> <pre class="programlisting">int <a href="#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base, <br /> <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)</pre> @@ -31,7 +37,13 @@ A:link, A:visited, A:active { text-decoration: underline } <pre class="programlisting">int <a href="#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val)</pre> <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre> <h2>Description</h2> -<h3><a name="xmlSchemaCheckFacet" id="xmlSchemaCheckFacet"></a>Function: xmlSchemaCheckFacet</h3><pre class="programlisting">int xmlSchemaCheckFacet (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br /> <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br /> +<h3>Enum <a name="xmlSchemaWhitespaceValueType" id="xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a></h3><pre class="programlisting">Enum xmlSchemaWhitespaceValueType { + <a name="XML_SCHEMA_WHITESPACE_UNKNOWN" id="XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a> = 0 + <a name="XML_SCHEMA_WHITESPACE_PRESERVE" id="XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a> = 1 + <a name="XML_SCHEMA_WHITESPACE_REPLACE" id="XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a> = 2 + <a name="XML_SCHEMA_WHITESPACE_COLLAPSE" id="XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a> = 3 +} +</pre><h3><a name="xmlSchemaCheckFacet" id="xmlSchemaCheckFacet"></a>Function: xmlSchemaCheckFacet</h3><pre class="programlisting">int xmlSchemaCheckFacet (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br /> <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br /> </pre><p>Checks the default values types, especially for facets</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet</td></tr><tr><td><span class="term"><i><tt>typeDecl</tt></i>:</span></td><td>the schema type definition</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if okay or -1 in cae of error</td></tr></tbody></table></div><h3><a name="xmlSchemaCleanupTypes" id="xmlSchemaCleanupTypes"></a>Function: xmlSchemaCleanupTypes</h3><pre class="programlisting">void xmlSchemaCleanupTypes (void)<br /> </pre><p>Cleanup the default XML Schemas type library</p> @@ -39,7 +51,11 @@ A:link, A:visited, A:active { text-decoration: underline } </pre><p>Removes and normalize white spaces in the string</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL if no change was required.</td></tr></tbody></table></div><h3><a name="xmlSchemaCompareValues" id="xmlSchemaCompareValues"></a>Function: xmlSchemaCompareValues</h3><pre class="programlisting">int xmlSchemaCompareValues (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y)<br /> </pre><p>Compare 2 values</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeFacet" id="xmlSchemaFreeFacet"></a>Function: xmlSchemaFreeFacet</h3><pre class="programlisting">void xmlSchemaFreeFacet (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaCompareValuesWhtsp" id="xmlSchemaCompareValuesWhtsp"></a>Function: xmlSchemaCompareValuesWhtsp</h3><pre class="programlisting">int xmlSchemaCompareValuesWhtsp (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws)<br /> +</pre><p>Compare 2 values</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>xws</tt></i>:</span></td><td>the whitespace value of x</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>yws</tt></i>:</span></td><td>the whitespace value of y</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaCopyValue" id="xmlSchemaCopyValue"></a>Function: xmlSchemaCopyValue</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaCopyValue (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br /> +</pre><p>Copies the precomputed value. This duplicates any string within.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value to be copied</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the copy or NULL if a copy for a data-type is not implemented.</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeFacet" id="xmlSchemaFreeFacet"></a>Function: xmlSchemaFreeFacet</h3><pre class="programlisting">void xmlSchemaFreeFacet (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br /> </pre><p>Deallocate a Schema Facet structure.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>a schema facet structure</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeValue" id="xmlSchemaFreeValue"></a>Function: xmlSchemaFreeValue</h3><pre class="programlisting">void xmlSchemaFreeValue (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value)<br /> </pre><p>Cleanup the default XML Schemas type library</p> @@ -47,7 +63,9 @@ A:link, A:visited, A:active { text-decoration: underline } </pre><p>Lookup function</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in simple type.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the item type of @type as defined by the built-in datatype hierarchy of XML Schema Part 2: Datatypes, or NULL in case of an error.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetBuiltInType" id="xmlSchemaGetBuiltInType"></a>Function: xmlSchemaGetBuiltInType</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetBuiltInType (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type)<br /> </pre><p>Gives you the type struct for a built-in type by its type id.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of the built in type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetFacetValueAsULong" id="xmlSchemaGetFacetValueAsULong"></a>Function: xmlSchemaGetFacetValueAsULong</h3><pre class="programlisting">unsigned long xmlSchemaGetFacetValueAsULong (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of the built in type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetCanonValue" id="xmlSchemaGetCanonValue"></a>Function: xmlSchemaGetCanonValue</h3><pre class="programlisting">int xmlSchemaGetCanonValue (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** retValue)<br /> +</pre><p>Get a the cononical representation of the value. The caller has to free the returned retValue.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>retValue</tt></i>:</span></td><td>the returned value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value could be built and -1 in case of API errors or if the value type is not supported yet.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetFacetValueAsULong" id="xmlSchemaGetFacetValueAsULong"></a>Function: xmlSchemaGetFacetValueAsULong</h3><pre class="programlisting">unsigned long xmlSchemaGetFacetValueAsULong (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br /> </pre><p>Extract the value of a facet</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>an schemas type facet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value as a long</td></tr></tbody></table></div><h3><a name="xmlSchemaGetPredefinedType" id="xmlSchemaGetPredefinedType"></a>Function: xmlSchemaGetPredefinedType</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetPredefinedType (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br /> </pre><p>Lookup a type in the default XML Schemas type library</p> @@ -57,7 +75,11 @@ A:link, A:visited, A:active { text-decoration: underline } </pre><p>Evaluates if a specific facet can be used in conjunction with a type.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in type</td></tr><tr><td><span class="term"><i><tt>facetType</tt></i>:</span></td><td>the facet type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the facet can be used with the given built-in type, 0 otherwise and -1 in case the type is not a built-in type.</td></tr></tbody></table></div><h3><a name="xmlSchemaNewFacet" id="xmlSchemaNewFacet"></a>Function: xmlSchemaNewFacet</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> xmlSchemaNewFacet (void)<br /> </pre><p>Allocate a new Facet structure.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly allocated structure or NULL in case or error</td></tr></tbody></table></div><h3><a name="xmlSchemaValPredefTypeNode" id="xmlSchemaValPredefTypeNode"></a>Function: xmlSchemaValPredefTypeNode</h3><pre class="programlisting">int xmlSchemaValPredefTypeNode (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly allocated structure or NULL in case or error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewNOTATIONValue" id="xmlSchemaNewNOTATIONValue"></a>Function: xmlSchemaNewNOTATIONValue</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewNOTATIONValue (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br /> +</pre><p>Allocate a new NOTATION value.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the notation name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the notation namespace name or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewStringValue" id="xmlSchemaNewStringValue"></a>Function: xmlSchemaNewStringValue</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewStringValue (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br /> +</pre><p>Allocate a new simple type value. The type can be of XML_SCHEMAS_STRING. WARNING: This one is intended to be expanded for other string based types. We need this for anySimpleType as well.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the value type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaValPredefTypeNode" id="xmlSchemaValPredefTypeNode"></a>Function: xmlSchemaValPredefTypeNode</h3><pre class="programlisting">int xmlSchemaValPredefTypeNode (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br /> </pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the predefined type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the return computed value</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node containing the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValPredefTypeNodeNoNorm" id="xmlSchemaValPredefTypeNodeNoNorm"></a>Function: xmlSchemaValPredefTypeNodeNoNorm</h3><pre class="programlisting">int xmlSchemaValPredefTypeNodeNoNorm (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br /> </pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val. This one does apply any normalization to the value.</p> diff --git a/doc/index.html b/doc/index.html index ea631a4..1bbcf95 100644 --- a/doc/index.html +++ b/doc/index.html @@ -84,6 +84,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="index.html">Home</a> </li> <li> + <a href="http://xmlsoft.org/wiki">Wiki</a> + </li> + <li> <a href="html/index.html">Reference Manual</a> </li> <li> diff --git a/doc/intro.html b/doc/intro.html index 55c3184..701f02b 100644 --- a/doc/intro.html +++ b/doc/intro.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This document describes libxml, the <a href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the +</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This document describes libxml, the <a href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the <a href="http://www.gnome.org/">Gnome</a> project. <a href="http://www.w3.org/XML/">XML is a standard</a> for building tag-based structured documents/data.</p><p>Here are some key points about libxml:</p><ul><li>Libxml2 exports Push (progressive) and Pull (blocking) type parser interfaces for both XML and HTML.</li> diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index a33b6d5..df10929 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -362,14 +362,15 @@ <exports symbol='xmlDict' type='typedef'/> <exports symbol='xmlDictPtr' type='typedef'/> <exports symbol='xmlDictReference' type='function'/> + <exports symbol='xmlDictCleanup' type='function'/> <exports symbol='xmlDictSize' type='function'/> <exports symbol='xmlDictExists' type='function'/> <exports symbol='xmlDictOwns' type='function'/> <exports symbol='xmlDictQLookup' type='function'/> <exports symbol='xmlDictCreateSub' type='function'/> - <exports symbol='xmlDictCreate' type='function'/> - <exports symbol='xmlDictLookup' type='function'/> <exports symbol='xmlDictFree' type='function'/> + <exports symbol='xmlDictLookup' type='function'/> + <exports symbol='xmlDictCreate' type='function'/> </file> <file name='encoding'> <summary>interface for the encoding conversion functions</summary> @@ -536,6 +537,7 @@ <exports symbol='xmlHashScanFull' type='function'/> <exports symbol='xmlHashScan' type='function'/> <exports symbol='xmlHashScannerFull' type='function'/> + <exports symbol='xmlHashCreateDict' type='function'/> <exports symbol='xmlHashAddEntry' type='function'/> <exports symbol='xmlHashUpdateEntry' type='function'/> <exports symbol='xmlHashQLookup3' type='function'/> @@ -949,12 +951,22 @@ <summary>pattern expression handling</summary> <description>allows to compile and test pattern expressions for nodes either in a tree or based on a parser state. </description> <author>Daniel Veillard </author> + <exports symbol='xmlStreamCtxt' type='typedef'/> + <exports symbol='xmlStreamCtxtPtr' type='typedef'/> <exports symbol='xmlPattern' type='typedef'/> <exports symbol='xmlPatternPtr' type='typedef'/> - <exports symbol='xmlPatterncompile' type='function'/> - <exports symbol='xmlFreePattern' type='function'/> - <exports symbol='xmlPatternMatch' type='function'/> + <exports symbol='xmlPatternGetStreamCtxt' type='function'/> + <exports symbol='xmlPatternFromRoot' type='function'/> <exports symbol='xmlFreePatternList' type='function'/> + <exports symbol='xmlPatternStreamable' type='function'/> + <exports symbol='xmlStreamPushAttr' type='function'/> + <exports symbol='xmlPatternMatch' type='function'/> + <exports symbol='xmlStreamPop' type='function'/> + <exports symbol='xmlFreePattern' type='function'/> + <exports symbol='xmlStreamPush' type='function'/> + <exports symbol='xmlPatternMaxDepth' type='function'/> + <exports symbol='xmlPatterncompile' type='function'/> + <exports symbol='xmlFreeStreamCtxt' type='function'/> </file> <file name='relaxng'> <summary>implementation of the Relax-NG validation</summary> @@ -1100,6 +1112,7 @@ <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_FINAL_UNION' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_FINAL_DEFAULT' type='macro'/> + <exports symbol='XML_SCHEMAS_TYPE_FACETSNEEDVALUE' type='macro'/> <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_UNION' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_BLOCK_RESTRICTION' type='macro'/> <exports symbol='XML_SCHEMAS_FACET_REPLACE' type='macro'/> @@ -1131,14 +1144,14 @@ <exports symbol='XML_SCHEMAS_NINTEGER' type='enum'/> <exports symbol='XML_SCHEMAS_NORMSTRING' type='enum'/> <exports symbol='XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS' type='enum'/> - <exports symbol='XML_SCHEMAS_GYEARMONTH' type='enum'/> + <exports symbol='XML_SCHEMA_TYPE_SIMPLE' type='enum'/> <exports symbol='XML_SCHEMAS_NCNAME' type='enum'/> <exports symbol='XML_SCHEMAS_LONG' type='enum'/> <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/> <exports symbol='XML_SCHEMAS_BOOLEAN' type='enum'/> <exports symbol='XML_SCHEMAS_ENTITY' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_GROUP' type='enum'/> - <exports symbol='XML_SCHEMA_TYPE_SIMPLE' type='enum'/> + <exports symbol='XML_SCHEMAS_GYEARMONTH' type='enum'/> <exports symbol='XML_SCHEMAS_BASE64BINARY' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/> <exports symbol='XML_SCHEMA_FACET_WHITESPACE' type='enum'/> @@ -1157,6 +1170,7 @@ <exports symbol='XML_SCHEMAS_GYEAR' type='enum'/> <exports symbol='XML_SCHEMAS_BYTE' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_ALL' type='enum'/> + <exports symbol='XML_SCHEMA_TYPE_IDC_KEYREF' type='enum'/> <exports symbol='XML_SCHEMAS_NOTATION' type='enum'/> <exports symbol='XML_SCHEMA_FACET_MAXINCLUSIVE' type='enum'/> <exports symbol='XML_SCHEMAS_NAME' type='enum'/> @@ -1168,6 +1182,7 @@ <exports symbol='XML_SCHEMA_TYPE_ATTRIBUTEGROUP' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_BASIC' type='enum'/> <exports symbol='XML_SCHEMAS_IDREFS' type='enum'/> + <exports symbol='XML_SCHEMA_TYPE_IDC_UNIQUE' type='enum'/> <exports symbol='XML_SCHEMA_FACET_LENGTH' type='enum'/> <exports symbol='XML_SCHEMA_CONTENT_SIMPLE' type='enum'/> <exports symbol='XML_SCHEMA_FACET_PATTERN' type='enum'/> @@ -1183,6 +1198,7 @@ <exports symbol='XML_SCHEMAS_INTEGER' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_COMPLEX_CONTENT' type='enum'/> <exports symbol='XML_SCHEMA_FACET_MINEXCLUSIVE' type='enum'/> + <exports symbol='XML_SCHEMA_TYPE_IDC_KEY' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_SIMPLE_CONTENT' type='enum'/> <exports symbol='XML_SCHEMAS_FLOAT' type='enum'/> <exports symbol='XML_SCHEMAS_ENTITIES' type='enum'/> @@ -1593,6 +1609,7 @@ <exports symbol='xmlDumpNotationDecl' type='function'/> <exports symbol='xmlIsID' type='function'/> <exports symbol='xmlGetDtdQAttrDesc' type='function'/> + <exports symbol='xmlNewDocElementContent' type='function'/> <exports symbol='xmlFreeAttributeTable' type='function'/> <exports symbol='xmlValidityErrorFunc' type='function'/> <exports symbol='xmlValidateAttributeDecl' type='function'/> @@ -1610,13 +1627,13 @@ <exports symbol='xmlValidateOneElement' type='function'/> <exports symbol='xmlValidateNmtokenValue' type='function'/> <exports symbol='xmlDumpElementTable' type='function'/> - <exports symbol='xmlValidateNmtokensValue' type='function'/> + <exports symbol='xmlValidCtxtNormalizeAttributeValue' type='function'/> <exports symbol='xmlDumpElementDecl' type='function'/> <exports symbol='xmlFreeElementContent' type='function'/> <exports symbol='xmlValidateOneNamespace' type='function'/> <exports symbol='xmlValidatePushElement' type='function'/> <exports symbol='xmlIsRef' type='function'/> - <exports symbol='xmlRemoveRef' type='function'/> + <exports symbol='xmlCopyDocElementContent' type='function'/> <exports symbol='xmlAddID' type='function'/> <exports symbol='xmlFreeRefTable' type='function'/> <exports symbol='xmlRemoveID' type='function'/> @@ -1626,7 +1643,7 @@ <exports symbol='xmlCopyAttributeTable' type='function'/> <exports symbol='xmlCopyElementContent' type='function'/> <exports symbol='xmlValidateAttributeValue' type='function'/> - <exports symbol='xmlValidCtxtNormalizeAttributeValue' type='function'/> + <exports symbol='xmlRemoveRef' type='function'/> <exports symbol='xmlValidityWarningFunc' type='function'/> <exports symbol='xmlValidatePopElement' type='function'/> <exports symbol='xmlFreeEnumeration' type='function'/> @@ -1647,6 +1664,8 @@ <exports symbol='xmlGetDtdElementDesc' type='function'/> <exports symbol='xmlGetDtdNotationDesc' type='function'/> <exports symbol='xmlValidatePushCData' type='function'/> + <exports symbol='xmlValidateNmtokensValue' type='function'/> + <exports symbol='xmlFreeDocElementContent' type='function'/> </file> <file name='xinclude'> <summary>implementation of XInclude</summary> @@ -2001,6 +2020,7 @@ <exports symbol='XML_ERR_UNSUPPORTED_ENCODING' type='enum'/> <exports symbol='XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME' type='enum'/> <exports symbol='XML_ERR_ENTITYREF_IN_PROLOG' type='enum'/> + <exports symbol='XML_SCHEMAV_CVC_IDC' type='enum'/> <exports symbol='XML_IO_ENOTTY' type='enum'/> <exports symbol='XML_DTD_UNKNOWN_NOTATION' type='enum'/> <exports symbol='XML_FROM_DATATYPE' type='enum'/> @@ -2049,6 +2069,7 @@ <exports symbol='XML_DTD_LOAD_ERROR' type='enum'/> <exports symbol='XML_DTD_ENTITY_TYPE' type='enum'/> <exports symbol='XML_SCHEMAP_SRC_SIMPLE_TYPE_4' type='enum'/> + <exports symbol='XML_FTP_URL_SYNTAX' type='enum'/> <exports symbol='XML_ERR_NONE' type='enum'/> <exports symbol='XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD' type='enum'/> <exports symbol='XML_XPATH_NUMBER_ERROR' type='enum'/> @@ -2074,6 +2095,7 @@ <exports symbol='XML_IO_NO_INPUT' type='enum'/> <exports symbol='XML_NS_ERR_UNDEFINED_NAMESPACE' type='enum'/> <exports symbol='XML_SCHEMAV_CVC_MINLENGTH_VALID' type='enum'/> + <exports symbol='XML_SCHEMAV_CVC_WILDCARD' type='enum'/> <exports symbol='XML_IO_WRITE' type='enum'/> <exports symbol='XML_ERR_ENTITY_PE_INTERNAL' type='enum'/> <exports symbol='XML_DTD_XMLID_VALUE' type='enum'/> @@ -2715,6 +2737,7 @@ <exports symbol='xmlReaderForFd' type='function'/> <exports symbol='xmlTextReaderMoveToFirstAttribute' type='function'/> <exports symbol='xmlTextReaderPrefix' type='function'/> + <exports symbol='xmlTextReaderByteConsumed' type='function'/> <exports symbol='xmlTextReaderPreservePattern' type='function'/> <exports symbol='xmlTextReaderLocatorBaseURI' type='function'/> <exports symbol='xmlTextReaderGetAttribute' type='function'/> @@ -2836,25 +2859,35 @@ <summary>implementation of XML Schema Datatypes</summary> <description>module providing the XML Schema Datatypes implementation both definition and validity checking </description> <author>Daniel Veillard </author> - <exports symbol='xmlSchemaNewFacet' type='function'/> + <exports symbol='XML_SCHEMA_WHITESPACE_UNKNOWN' type='enum'/> + <exports symbol='XML_SCHEMA_WHITESPACE_COLLAPSE' type='enum'/> + <exports symbol='XML_SCHEMA_WHITESPACE_REPLACE' type='enum'/> + <exports symbol='XML_SCHEMA_WHITESPACE_PRESERVE' type='enum'/> + <exports symbol='xmlSchemaWhitespaceValueType' type='typedef'/> <exports symbol='xmlSchemaValPredefTypeNode' type='function'/> <exports symbol='xmlSchemaIsBuiltInTypeFacet' type='function'/> - <exports symbol='xmlSchemaValidateLengthFacet' type='function'/> - <exports symbol='xmlSchemaFreeFacet' type='function'/> + <exports symbol='xmlSchemaGetCanonValue' type='function'/> <exports symbol='xmlSchemaGetBuiltInListSimpleTypeItemType' type='function'/> - <exports symbol='xmlSchemaValidatePredefinedType' type='function'/> - <exports symbol='xmlSchemaCompareValues' type='function'/> - <exports symbol='xmlSchemaGetFacetValueAsULong' type='function'/> - <exports symbol='xmlSchemaInitTypes' type='function'/> - <exports symbol='xmlSchemaValidateFacet' type='function'/> + <exports symbol='xmlSchemaCompareValuesWhtsp' type='function'/> + <exports symbol='xmlSchemaCollapseString' type='function'/> <exports symbol='xmlSchemaValPredefTypeNodeNoNorm' type='function'/> + <exports symbol='xmlSchemaValidateFacet' type='function'/> + <exports symbol='xmlSchemaNewFacet' type='function'/> + <exports symbol='xmlSchemaCompareValues' type='function'/> + <exports symbol='xmlSchemaValidateLengthFacet' type='function'/> + <exports symbol='xmlSchemaGetPredefinedType' type='function'/> + <exports symbol='xmlSchemaValidatePredefinedType' type='function'/> + <exports symbol='xmlSchemaFreeFacet' type='function'/> <exports symbol='xmlSchemaValidateListSimpleTypeFacet' type='function'/> + <exports symbol='xmlSchemaGetFacetValueAsULong' type='function'/> + <exports symbol='xmlSchemaFreeValue' type='function'/> + <exports symbol='xmlSchemaCopyValue' type='function'/> + <exports symbol='xmlSchemaNewNOTATIONValue' type='function'/> <exports symbol='xmlSchemaCleanupTypes' type='function'/> <exports symbol='xmlSchemaWhiteSpaceReplace' type='function'/> - <exports symbol='xmlSchemaCollapseString' type='function'/> + <exports symbol='xmlSchemaNewStringValue' type='function'/> <exports symbol='xmlSchemaGetBuiltInType' type='function'/> - <exports symbol='xmlSchemaFreeValue' type='function'/> - <exports symbol='xmlSchemaGetPredefinedType' type='function'/> + <exports symbol='xmlSchemaInitTypes' type='function'/> <exports symbol='xmlSchemaCheckFacet' type='function'/> </file> <file name='xmlstring'> @@ -3787,7 +3820,7 @@ <macro name='XMLPUBVAR' file='xmlexports'> </macro> <macro name='XML_CAST_FPTR' file='hash'> - <info>Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc</info> + <info>Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) This macro violated ISO C aliasing rules (gcc4 on s390 broke) so it is disabled now</info> <arg name='fptr' info='pointer to a function'/> </macro> <macro name='XML_CATALOGS_NAMESPACE' file='catalog'> @@ -3988,6 +4021,9 @@ <macro name='XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION' file='schemasInternals'> <info>the simple or complex type has a derivation method of "restriction".</info> </macro> + <macro name='XML_SCHEMAS_TYPE_FACETSNEEDVALUE' file='schemasInternals'> + <info>indicates if the facets need a computed value</info> + </macro> <macro name='XML_SCHEMAS_TYPE_FINAL_DEFAULT' file='schemasInternals'> <info>the simpleType has a final of "default".</info> </macro> @@ -4533,7 +4569,7 @@ <enum name='XML_FROM_DTD' file='xmlerror' value='4' type='xmlErrorDomain' info='The XML DTD validation with parser contex'/> <enum name='XML_FROM_FTP' file='xmlerror' value='9' type='xmlErrorDomain' info='The FTP module'/> <enum name='XML_FROM_HTML' file='xmlerror' value='5' type='xmlErrorDomain' info='The HTML parser'/> - <enum name='XML_FROM_HTTP' file='xmlerror' value='10' type='xmlErrorDomain' info='The FTP module'/> + <enum name='XML_FROM_HTTP' file='xmlerror' value='10' type='xmlErrorDomain' info='The HTTP module'/> <enum name='XML_FROM_IO' file='xmlerror' value='8' type='xmlErrorDomain' info='The Input/Output stack'/> <enum name='XML_FROM_MEMORY' file='xmlerror' value='6' type='xmlErrorDomain' info='The memory allocator'/> <enum name='XML_FROM_MODULE' file='xmlerror' value='26' type='xmlErrorDomain' info=' The dynamically loaded module modul'/> @@ -4556,6 +4592,7 @@ <enum name='XML_FTP_ACCNT' file='xmlerror' value='2002' type='xmlParserErrors' info='2002'/> <enum name='XML_FTP_EPSV_ANSWER' file='xmlerror' value='2001' type='xmlParserErrors' info='2001'/> <enum name='XML_FTP_PASV_ANSWER' file='xmlerror' value='2000' type='xmlParserErrors'/> + <enum name='XML_FTP_URL_SYNTAX' file='xmlerror' value='2003' type='xmlParserErrors' info='2003'/> <enum name='XML_HTML_DOCUMENT_NODE' file='tree' value='13' type='xmlElementType'/> <enum name='XML_HTML_STRUCURE_ERROR' file='xmlerror' value='800' type='xmlParserErrors'/> <enum name='XML_HTML_UNKNOWN_TAG' file='xmlerror' value='801' type='xmlParserErrors' info='801'/> @@ -5166,6 +5203,7 @@ <enum name='XML_SCHEMAV_CVC_ENUMERATION_VALID' file='xmlerror' value='1840' type='xmlParserErrors' info='1840'/> <enum name='XML_SCHEMAV_CVC_FACET_VALID' file='xmlerror' value='1829' type='xmlParserErrors' info='1829'/> <enum name='XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID' file='xmlerror' value='1838' type='xmlParserErrors' info='1838'/> + <enum name='XML_SCHEMAV_CVC_IDC' file='xmlerror' value='1877' type='xmlParserErrors' info='1877'/> <enum name='XML_SCHEMAV_CVC_LENGTH_VALID' file='xmlerror' value='1830' type='xmlParserErrors' info='1830'/> <enum name='XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID' file='xmlerror' value='1836' type='xmlParserErrors' info='1836'/> <enum name='XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID' file='xmlerror' value='1834' type='xmlParserErrors' info='1834'/> @@ -5179,6 +5217,7 @@ <enum name='XML_SCHEMAV_CVC_TYPE_2' file='xmlerror' value='1876' type='xmlParserErrors' info='1876'/> <enum name='XML_SCHEMAV_CVC_TYPE_3_1_1' file='xmlerror' value='1827' type='xmlParserErrors' info='1827'/> <enum name='XML_SCHEMAV_CVC_TYPE_3_1_2' file='xmlerror' value='1828' type='xmlParserErrors' info='1828'/> + <enum name='XML_SCHEMAV_CVC_WILDCARD' file='xmlerror' value='1878' type='xmlParserErrors' info='1878'/> <enum name='XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING' file='xmlerror' value='1872' type='xmlParserErrors' info='1872'/> <enum name='XML_SCHEMAV_ELEMCONT' file='xmlerror' value='1810' type='xmlParserErrors' info='1810'/> <enum name='XML_SCHEMAV_ELEMENT_CONTENT' file='xmlerror' value='1871' type='xmlParserErrors' info='1871'/> @@ -5234,6 +5273,9 @@ <enum name='XML_SCHEMA_TYPE_EXTENSION' file='schemasInternals' value='13' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_FACET' file='schemasInternals' value='3' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_GROUP' file='schemasInternals' value='17' type='xmlSchemaTypeType'/> + <enum name='XML_SCHEMA_TYPE_IDC_KEY' file='schemasInternals' value='23' type='xmlSchemaTypeType'/> + <enum name='XML_SCHEMA_TYPE_IDC_KEYREF' file='schemasInternals' value='24' type='xmlSchemaTypeType'/> + <enum name='XML_SCHEMA_TYPE_IDC_UNIQUE' file='schemasInternals' value='22' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_LIST' file='schemasInternals' value='19' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_NOTATION' file='schemasInternals' value='18' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_RESTRICTION' file='schemasInternals' value='12' type='xmlSchemaTypeType'/> @@ -5245,6 +5287,10 @@ <enum name='XML_SCHEMA_VAL_VC_I_CREATE' file='xmlschemas' value='1' type='xmlSchemaValidOption' info=' Default/fixed: create an attribute node * or an element's text node on the instance. *'/> + <enum name='XML_SCHEMA_WHITESPACE_COLLAPSE' file='xmlschemastypes' value='3' type='xmlSchemaWhitespaceValueType'/> + <enum name='XML_SCHEMA_WHITESPACE_PRESERVE' file='xmlschemastypes' value='1' type='xmlSchemaWhitespaceValueType'/> + <enum name='XML_SCHEMA_WHITESPACE_REPLACE' file='xmlschemastypes' value='2' type='xmlSchemaWhitespaceValueType'/> + <enum name='XML_SCHEMA_WHITESPACE_UNKNOWN' file='xmlschemastypes' value='0' type='xmlSchemaWhitespaceValueType'/> <enum name='XML_TEXTREADER_MODE_CLOSED' file='xmlreader' value='4' type='xmlTextReaderMode'/> <enum name='XML_TEXTREADER_MODE_EOF' file='xmlreader' value='3' type='xmlTextReaderMode'/> <enum name='XML_TEXTREADER_MODE_ERROR' file='xmlreader' value='2' type='xmlTextReaderMode'/> @@ -5994,6 +6040,7 @@ actually an xmlCharEncoding'/> <field name='includes' type='void *' info=' the includes, this is opaque for now'/> <field name='preserve' type='int' info=' whether to free the document'/> <field name='counter' type='int' info=' used to give ononymous components unique names'/> + <field name='idcDef' type='xmlHashTablePtr' info=''/> </struct> <struct name='xmlSchemaAnnot' file='schemasInternals' type='struct _xmlSchemaAnnot'> <field name='next' type='struct _xmlSchemaAnnot *' info=''/> @@ -6071,6 +6118,7 @@ actually an xmlCharEncoding'/> <field name='contentType' type='xmlSchemaContentType' info=''/> <field name='refPrefix' type='const xmlChar *' info=''/> <field name='defVal' type='xmlSchemaValPtr' info=''/> + <field name='idcs' type='void *' info=''/> </struct> <typedef name='xmlSchemaElementPtr' file='schemasInternals' type='xmlSchemaElement *'/> <struct name='xmlSchemaFacet' file='schemasInternals' type='struct _xmlSchemaFacet'> @@ -6147,6 +6195,7 @@ actually an xmlCharEncoding'/> <typedef name='xmlSchemaValidCtxtPtr' file='xmlschemas' type='xmlSchemaValidCtxt *'/> <typedef name='xmlSchemaValidError' file='xmlschemas' type='enum'/> <typedef name='xmlSchemaValidOption' file='xmlschemas' type='enum'/> + <typedef name='xmlSchemaWhitespaceValueType' file='xmlschemastypes' type='enum'/> <struct name='xmlSchemaWildcard' file='schemasInternals' type='struct _xmlSchemaWildcard'> <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/> <field name='id' type='const xmlChar *' info=''/> @@ -6176,6 +6225,8 @@ actually an xmlCharEncoding'/> <field name='input' type='xmlShellReadlineFunc' info=''/> </struct> <typedef name='xmlShellCtxtPtr' file='debugXML' type='xmlShellCtxt *'/> + <struct name='xmlStreamCtxt' file='pattern' type='struct _xmlStreamCtxt'/> + <typedef name='xmlStreamCtxtPtr' file='pattern' type='xmlStreamCtxt *'/> <struct name='xmlTextReader' file='xmlreader' type='struct _xmlTextReader'/> <typedef name='xmlTextReaderLocatorPtr' file='xmlreader' type='void *'/> <typedef name='xmlTextReaderMode' file='xmlreader' type='enum'/> @@ -6368,7 +6419,7 @@ actually an xmlCharEncoding'/> <function name='UTF8Toisolat1' file='encoding'> <cond>defined(LIBXML_OUTPUT_ENABLED)</cond> <info>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 block of chars out.</info> - <return type='int' info='0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/> + <return type='int' info='the number of bytes written if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/> <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/> <arg name='outlen' type='int *' info='the length of @out'/> <arg name='in' type='const unsigned char *' info='a pointer to an array of UTF-8 chars'/> @@ -7277,7 +7328,7 @@ actually an xmlCharEncoding'/> </functype> <function name='isolat1ToUTF8' file='encoding'> <info>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out.</info> - <return type='int' info='0 if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/> + <return type='int' info='the number of bytes written if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/> <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/> <arg name='outlen' type='int *' info='the length of @out'/> <arg name='in' type='const unsigned char *' info='a pointer to an array of ISO Latin 1 chars'/> @@ -8357,6 +8408,12 @@ actually an xmlCharEncoding'/> <arg name='doc' type='xmlDocPtr' info='the document'/> <arg name='recursive' type='int' info='if not zero do a recursive copy.'/> </function> + <function name='xmlCopyDocElementContent' file='valid'> + <info>Build a copy of an element content description.</info> + <return type='xmlElementContentPtr' info='the new xmlElementContentPtr or NULL in case of error.'/> + <arg name='doc' type='xmlDocPtr' info='the document owning the element declaration'/> + <arg name='cur' type='xmlElementContentPtr' info='An element content pointer.'/> + </function> <function name='xmlCopyDtd' file='tree'> <cond>defined(LIBXML_TREE_ENABLED)</cond> <info>Do a copy of the dtd.</info> @@ -8364,7 +8421,7 @@ actually an xmlCharEncoding'/> <arg name='dtd' type='xmlDtdPtr' info='the dtd'/> </function> <function name='xmlCopyElementContent' file='valid'> - <info>Build a copy of an element content description.</info> + <info>Build a copy of an element content description. Deprecated, use xmlCopyDocElementContent instead</info> <return type='xmlElementContentPtr' info='the new xmlElementContentPtr or NULL in case of error.'/> <arg name='cur' type='xmlElementContentPtr' info='An element content pointer.'/> </function> @@ -8437,7 +8494,7 @@ actually an xmlCharEncoding'/> <arg name='cur' type='const xmlChar *' info='a pointer to an array of xmlChar'/> </function> <function name='xmlCreateEntitiesTable' file='entities'> - <info>create and initialize an empty entities hash table.</info> + <info>create and initialize an empty entities hash table. This really doesn't make sense and should be deprecated</info> <return type='xmlEntitiesTablePtr' info='the xmlEntitiesTablePtr just created or NULL in case of error.'/> </function> <function name='xmlCreateEntityParserCtxt' file='parserInternals'> @@ -8702,6 +8759,10 @@ actually an xmlCharEncoding'/> <arg name='in' type='const unsigned char *' info='a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant).'/> <arg name='len' type='int' info='pointer to the length of the buffer'/> </function> + <function name='xmlDictCleanup' file='dict'> + <info>Free the dictionary mutex.</info> + <return type='void'/> + </function> <function name='xmlDictCreate' file='dict'> <info>Create a new dictionary</info> <return type='xmlDictPtr' info='the newly created dictionnary, or NULL if an error occured.'/> @@ -8982,13 +9043,19 @@ actually an xmlCharEncoding'/> <return type='void'/> <arg name='cur' type='xmlDocPtr' info='pointer to the document'/> </function> + <function name='xmlFreeDocElementContent' file='valid'> + <info>Free an element content structure. The whole subtree is removed.</info> + <return type='void'/> + <arg name='doc' type='xmlDocPtr' info='the document owning the element declaration'/> + <arg name='cur' type='xmlElementContentPtr' info='the element content tree to free'/> + </function> <function name='xmlFreeDtd' file='tree'> <info>Free a DTD structure.</info> <return type='void'/> <arg name='cur' type='xmlDtdPtr' info='the DTD structure to free up'/> </function> <function name='xmlFreeElementContent' file='valid'> - <info>Free an element content structure. This is a recursive call !</info> + <info>Free an element content structure. The whole subtree is removed. Deprecated, use xmlFreeDocElementContent instead</info> <return type='void'/> <arg name='cur' type='xmlElementContentPtr' info='the element content tree to free'/> </function> @@ -9094,6 +9161,12 @@ actually an xmlCharEncoding'/> <return type='void'/> <arg name='table' type='xmlRefTablePtr' info='An ref table'/> </function> + <function name='xmlFreeStreamCtxt' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>Free the stream context</info> + <return type='void'/> + <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/> + </function> <function name='xmlFreeTextReader' file='xmlreader'> <cond>defined(LIBXML_READER_ENABLED)</cond> <info>Deallocate all the resources associated to the reader</info> @@ -9384,6 +9457,12 @@ actually an xmlCharEncoding'/> <return type='xmlHashTablePtr' info='the newly created object, or NULL if an error occured.'/> <arg name='size' type='int' info='the size of the hash table'/> </function> + <function name='xmlHashCreateDict' file='hash'> + <info>Create a new xmlHashTablePtr which will use @dict as the internal dictionary</info> + <return type='xmlHashTablePtr' info='the newly created object, or NULL if an error occured.'/> + <arg name='size' type='int' info='the size of the hash table'/> + <arg name='dict' type='xmlDictPtr' info='a dictionary to use for the hash'/> + </function> <functype name='xmlHashDeallocator' file='hash'> <info>Callback to free data from a hash.</info> <return type='void'/> @@ -10449,6 +10528,13 @@ actually an xmlCharEncoding'/> <arg name='doc' type='xmlDocPtr' info='the document'/> <arg name='content' type='const xmlChar *' info='the comment content'/> </function> + <function name='xmlNewDocElementContent' file='valid'> + <info>Allocate an element content structure for the document.</info> + <return type='xmlElementContentPtr' info='NULL if not, otherwise the new element content structure'/> + <arg name='doc' type='xmlDocPtr' info='the document'/> + <arg name='name' type='const xmlChar *' info='the subelement name or NULL'/> + <arg name='type' type='xmlElementContentType' info='the type of element content decl'/> + </function> <function name='xmlNewDocFragment' file='tree'> <cond>defined(LIBXML_TREE_ENABLED)</cond> <info>Creation of a new Fragment node.</info> @@ -10516,7 +10602,7 @@ actually an xmlCharEncoding'/> <arg name='SystemID' type='const xmlChar *' info='the system ID'/> </function> <function name='xmlNewElementContent' file='valid'> - <info>Allocate an element content structure.</info> + <info>Allocate an element content structure. Deprecated in favor of xmlNewDocElementContent</info> <return type='xmlElementContentPtr' info='NULL if not, otherwise the new element content structure'/> <arg name='name' type='const xmlChar *' info='the subelement name or NULL'/> <arg name='type' type='xmlElementContentType' info='the type of element content decl'/> @@ -11493,6 +11579,18 @@ actually an xmlCharEncoding'/> <arg name='msg' type='const char *' info='the message to display/transmit'/> <arg name='...' type='...' info='extra parameters for the message display'/> </function> + <function name='xmlPatternFromRoot' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>Check if the pattern must be looked at from the root.</info> + <return type='int' info='1 if true, 0 if false and -1 in case of error'/> + <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/> + </function> + <function name='xmlPatternGetStreamCtxt' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>Get a streaming context for that pattern Use xmlFreeStreamCtxt to free the context.</info> + <return type='xmlStreamCtxtPtr' info='a pointer to the context or NULL in case of failure'/> + <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/> + </function> <function name='xmlPatternMatch' file='pattern'> <cond>defined(LIBXML_PATTERN_ENABLED)</cond> <info>Test wether the node matches the pattern</info> @@ -11500,6 +11598,18 @@ actually an xmlCharEncoding'/> <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/> <arg name='node' type='xmlNodePtr' info='a node'/> </function> + <function name='xmlPatternMaxDepth' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>Check the maximum depth reachable by a pattern</info> + <return type='int' info='-2 if no limit (using //), otherwise the depth, and -1 in case of error'/> + <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/> + </function> + <function name='xmlPatternStreamable' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() should work.</info> + <return type='int' info='1 if streamable, 0 if not and -1 in case of error.'/> + <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/> + </function> <function name='xmlPatterncompile' file='pattern'> <cond>defined(LIBXML_PATTERN_ENABLED)</cond> <info>Compile a pattern.</info> @@ -12550,6 +12660,21 @@ actually an xmlCharEncoding'/> <arg name='x' type='xmlSchemaValPtr' info='a first value'/> <arg name='y' type='xmlSchemaValPtr' info='a second value'/> </function> + <function name='xmlSchemaCompareValuesWhtsp' file='xmlschemastypes'> + <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> + <info>Compare 2 values</info> + <return type='int' info='-1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error'/> + <arg name='x' type='xmlSchemaValPtr' info='a first value'/> + <arg name='xws' type='xmlSchemaWhitespaceValueType' info='the whitespace value of x'/> + <arg name='y' type='xmlSchemaValPtr' info='a second value'/> + <arg name='yws' type='xmlSchemaWhitespaceValueType' info='the whitespace value of y'/> + </function> + <function name='xmlSchemaCopyValue' file='xmlschemastypes'> + <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> + <info>Copies the precomputed value. This duplicates any string within.</info> + <return type='xmlSchemaValPtr' info='the copy or NULL if a copy for a data-type is not implemented.'/> + <arg name='val' type='xmlSchemaValPtr' info='the precomputed value to be copied'/> + </function> <function name='xmlSchemaDump' file='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)</cond> <info>Dump a Schema structure.</info> @@ -12611,6 +12736,13 @@ actually an xmlCharEncoding'/> <return type='xmlSchemaTypePtr' info='the type if found, NULL otherwise.'/> <arg name='type' type='xmlSchemaValType' info='the type of the built in type'/> </function> + <function name='xmlSchemaGetCanonValue' file='xmlschemastypes'> + <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> + <info>Get a the cononical representation of the value. The caller has to free the returned retValue.</info> + <return type='int' info='0 if the value could be built and -1 in case of API errors or if the value type is not supported yet.'/> + <arg name='val' type='xmlSchemaValPtr' info='the precomputed value'/> + <arg name='retValue' type='const xmlChar **' info='the returned value'/> + </function> <function name='xmlSchemaGetFacetValueAsULong' file='xmlschemastypes'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> <info>Extract the value of a facet</info> @@ -12672,15 +12804,29 @@ actually an xmlCharEncoding'/> <arg name='buffer' type='const char *' info='a pointer to a char array containing the schemas'/> <arg name='size' type='int' info='the size of the array'/> </function> + <function name='xmlSchemaNewNOTATIONValue' file='xmlschemastypes'> + <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> + <info>Allocate a new NOTATION value.</info> + <return type='xmlSchemaValPtr' info='a pointer to the new value or NULL in case of error'/> + <arg name='name' type='const xmlChar *' info='the notation name'/> + <arg name='ns' type='const xmlChar *' info='the notation namespace name or NULL'/> + </function> <function name='xmlSchemaNewParserCtxt' file='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> <info>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</info> <return type='xmlSchemaParserCtxtPtr' info='the parser context or NULL in case of error'/> <arg name='URL' type='const char *' info='the location of the schema'/> </function> + <function name='xmlSchemaNewStringValue' file='xmlschemastypes'> + <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> + <info>Allocate a new simple type value. The type can be of XML_SCHEMAS_STRING. WARNING: This one is intended to be expanded for other string based types. We need this for anySimpleType as well.</info> + <return type='xmlSchemaValPtr' info='a pointer to the new value or NULL in case of error'/> + <arg name='type' type='xmlSchemaValType' info='the value type'/> + <arg name='value' type='const xmlChar *' info='the value'/> + </function> <function name='xmlSchemaNewValidCtxt' file='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Create an XML Schemas validation context based on the given schema</info> + <info>Create an XML Schemas validation context based on the given schema.</info> <return type='xmlSchemaValidCtxtPtr' info='the validation context or NULL in case of error'/> <arg name='schema' type='xmlSchemaPtr' info='a precompiled XML Schemas'/> </function> @@ -13173,6 +13319,28 @@ actually an xmlCharEncoding'/> <return type='char *' info='the copy of the string or NULL in case of error.'/> <arg name='str' type='const char *' info='a zero terminated string'/> </functype> + <function name='xmlStreamPop' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>push one level from the stream.</info> + <return type='int' info='-1 in case of error, 0 otherwise.'/> + <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/> + </function> + <function name='xmlStreamPush' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionnary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</info> + <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/> + <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/> + <arg name='name' type='const xmlChar *' info='the current name'/> + <arg name='ns' type='const xmlChar *' info='the namespace name'/> + </function> + <function name='xmlStreamPushAttr' file='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionnary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</info> + <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/> + <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/> + <arg name='name' type='const xmlChar *' info='the current name'/> + <arg name='ns' type='const xmlChar *' info='the namespace name'/> + </function> <function name='xmlStringCurrentChar' file='parserInternals'> <info>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.</info> <return type='int' info='the current char value and its length'/> @@ -13321,6 +13489,12 @@ actually an xmlCharEncoding'/> <return type='xmlChar *' info='the base URI or NULL if not available'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> </function> + <function name='xmlTextReaderByteConsumed' file='xmlreader'> + <cond>defined(LIBXML_READER_ENABLED)</cond> + <info>This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.</info> + <return type='long' info='the index in bytes from the beginning of the entity or -1 in case the index could not be computed.'/> + <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/> + </function> <function name='xmlTextReaderClose' file='xmlreader'> <cond>defined(LIBXML_READER_ENABLED)</cond> <info>This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.</info> diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa index 5b0f27a..aab08b1 100644 --- a/doc/libxml2.xsa +++ b/doc/libxml2.xsa @@ -8,19 +8,33 @@ </vendor> <product id="libxml2"> <name>libxml2</name> - <version>2.6.16</version> - <last-release> Nov 10 2004</last-release> + <version>2.6.17</version> + <last-release> Jan 16 2005</last-release> <info-url>http://xmlsoft.org/</info-url> - <changes> - general hardening and bug fixing crossing all the API based on new - automated regression testing - - build fix: IPv6 build and test on AIX (Dodji Seketeli) - - bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding - conversion functions return values, UTF-8 bug affecting XPath reported by - Markus Bertheau, catalog problem with NULL entries (William Brack) - - documentation: fix to xmllint man page, some API function descritpion - were updated. - - improvements: DTD validation APIs provided at the Python level (Brent - Hendricks) + <changes> - build fixes: Windows, warnings removal (William Brack), + maintainer-clean dependency(William), build in a different directory + (William), fixing --with-minimum configure build (William), BeOS + build (Marcin Konicki), Python-2.4 detection (William), compilation + on AIX (Dan McNichol) + - bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() + to use the catalog(s), loop on output (William Brack), XPath memory leak, + ID deallocation problem (Steve Shepard), debugDumpNode crash (William), + warning not using error callback (William), xmlStopParser bug (William), + UTF-16 with BOM on DTDs (William), namespace bug on empty elements + in push mode (Rob Richards), line and col computations fixups (Aleksey + Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), + patterns with too many steps, bug in RNG choice optimization, line + number sometimes missing. + + - improvements: XSD Schemas (Kasimier Buchcik), python generator (William), + xmlUTF8Strpos speedup (William), unicode Python strings (William), + XSD error reports (Kasimier Buchcik), Python __str__ call serialize(). + + - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber + for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs + (mostly Joel Reed), error extraction API from regexps, new XMLSave + option for format (Phil Shafer) + - documentation: site improvement (John Fleck), FAQ entries (William). </changes> </product> diff --git a/doc/namespaces.html b/doc/namespaces.html index 3daa448..d726ee0 100644 --- a/doc/namespaces.html +++ b/doc/namespaces.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Namespaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Namespaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The libxml2 library implements <a href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by +</style><title>Namespaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Namespaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The libxml2 library implements <a href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by recognizing namespace constructs in the input, and does namespace lookup automatically when building the DOM tree. A namespace declaration is associated with an in-memory structure and all elements or attributes within diff --git a/doc/news.html b/doc/news.html index 6769ae4..a07144b 100644 --- a/doc/news.html +++ b/doc/news.html @@ -7,12 +7,35 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Items not finished and worked on, get in touch with the list if you want +</style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Items not finished and worked on, get in touch with the list if you want to help those</p><ul><li>More testing on RelaxNG</li> <li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML Schemas</a></li> </ul><p>The <a href="ChangeLog.html">change log</a> describes the recents commits -to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p><p>There is the list of public releases:</p><h3>2.6.17: Jan 16 2005</h3><ul><li>build fixes: Windows, warnings removal (William Brack), +to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p><p>There is the list of public releases:</p><h3>2.6.18: Mar 13 2005</h3><ul><li> build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li> + <li> bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, + URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python + paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, + xmlSetNsProp fix (Mike Hommey), warning should not count as error + (William Brack), xmlCreatePushParser empty chunk, XInclude parser + flags (William), cleanup FTP and HTTP code to reuse the uri parsing + and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), + XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), + multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), + Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 + on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type + fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).</li> + <li> improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik), </li> + <li> Documentation: Wiki support (Joel Reed) +</li></ul><h3>2.6.17: Jan 16 2005</h3><ul><li>build fixes: Windows, warnings removal (William Brack), maintainer-clean dependency(William), build in a different directory (William), fixing --with-minimum configure build (William), BeOS build (Marcin Konicki), Python-2.4 detection (William), compilation diff --git a/doc/site.xsl b/doc/site.xsl index d5db17b..22f8f2e 100644 --- a/doc/site.xsl +++ b/doc/site.xsl @@ -318,6 +318,7 @@ </form> <ul><!-- style="margin-left: -1em" --> <li><a href="index.html">Home</a></li> + <li><a href="http://xmlsoft.org/wiki">Wiki</a></li> <li><a href="html/index.html">Reference Manual</a></li> <xsl:for-each select="/html/body/h2"> <xsl:variable name="filename"> diff --git a/doc/wiki.xsl b/doc/wiki.xsl new file mode 100644 index 0000000..8f707bb --- /dev/null +++ b/doc/wiki.xsl @@ -0,0 +1,589 @@ +<?xml version="1.0"?> +<!-- + Stylesheet to generate the HTML documentation from an XML API descriptions: + xsltproc wiki.xsl libxml2-api.xml + + Daniel Veillard +--> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns:str="http://exslt.org/strings" + extension-element-prefixes="exsl str" + exclude-result-prefixes="exsl str"> + + <!-- Generate XHTML-1.0 transitional --> + <xsl:output method="xml" encoding="ISO-8859-1" indent="yes" + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" + doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> + + <!-- Build keys for all symbols --> + <xsl:key name="symbols" match="/api/symbols/*" use="@name"/> + + <!-- the target directory for the HTML output --> + <xsl:variable name="htmldir">wiki</xsl:variable> + <xsl:variable name="href_base">../</xsl:variable> + + <xsl:template name="style"> + <link rel="SHORTCUT ICON" href="/favicon.ico"/> + <style type="text/css"> +TD {font-family: Verdana,Arial,Helvetica} +BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em} +H1 {font-family: Verdana,Arial,Helvetica} +H2 {font-family: Verdana,Arial,Helvetica} +H3 {font-family: Verdana,Arial,Helvetica} +A:link, A:visited, A:active { text-decoration: underline } +</style> + </xsl:template> + + <xsl:template name="docstyle"> + <style type="text/css"> + div.deprecated pre.programlisting {border-style: double;border-color:red} + pre.programlisting {border-style: double;} + </style> + </xsl:template> + + <!-- This is convoluted but needed to force the current document to + be the API one and not the result tree from the tokenize() result, + because the keys are only defined on the main document --> + <xsl:template mode="dumptoken" match='*'> + <xsl:param name="token"/> + <xsl:variable name="ref" select="key('symbols', $token)"/> + <xsl:choose> + <xsl:when test="$ref"> + <a href="libxml-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$token"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- dumps a string, making cross-reference links --> + <xsl:template name="dumptext"> + <xsl:param name="text"/> + <xsl:variable name="ctxt" select='.'/> + <!-- <xsl:value-of select="$text"/> --> + <xsl:for-each select="str:tokenize($text, ' 	')"> + <xsl:apply-templates select="$ctxt" mode='dumptoken'> + <xsl:with-param name="token" select="string(.)"/> + </xsl:apply-templates> + <xsl:if test="position() != last()"> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:template> + + <xsl:template match="macro" mode="toc"> + <pre class="programlisting"> + <xsl:text>#define </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a> + </pre> + </xsl:template> + + <xsl:template match="variable" mode="toc"> + <pre class="programlisting"> + <xsl:text>Variable </xsl:text> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="string(@type)"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <a name="{@name}"></a> + <xsl:value-of select="@name"/> + <xsl:text> + +</xsl:text> + </pre> + </xsl:template> + + <xsl:template match="typedef" mode="toc"> + <xsl:variable name="name" select="string(@name)"/> + <pre class="programlisting"> + <xsl:choose> + <xsl:when test="@type = 'enum'"> + <xsl:text>Enum </xsl:text> + <a href="#{$name}"><xsl:value-of select="$name"/></a> + <xsl:text> +</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>Typedef </xsl:text> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <a name="{$name}"><xsl:value-of select="$name"/></a> + <xsl:text> +</xsl:text> + </xsl:otherwise> + </xsl:choose> + </pre> + </xsl:template> + + <xsl:template match="typedef[@type = 'enum']"> + <xsl:variable name="name" select="string(@name)"/> + <h3>Enum <a name="{$name}"><xsl:value-of select="$name"/></a></h3> + <pre class="programlisting"> + <xsl:text>Enum </xsl:text> + <xsl:value-of select="$name"/> + <xsl:text> { +</xsl:text> + <xsl:for-each select="/api/symbols/enum[@type = $name]"> + <xsl:sort select="@value" data-type="number" order="ascending"/> + <xsl:text> </xsl:text> + <a name="{@name}"><xsl:value-of select="@name"/></a> + <xsl:text> = </xsl:text> + <xsl:value-of select="@value"/> + <xsl:if test="@info != ''"> + <xsl:text> : </xsl:text> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@info"/> + </xsl:call-template> + </xsl:if> + <xsl:text> +</xsl:text> + </xsl:for-each> + <xsl:text>} +</xsl:text> + </pre> + </xsl:template> + + <xsl:template match="struct" mode="toc"> + <pre class="programlisting"> + <xsl:text>Structure </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a><br/> + <xsl:value-of select="@type"/><xsl:text> +</xsl:text> + <xsl:if test="not(field)"> + <xsl:text>The content of this structure is not made public by the API. +</xsl:text> + </xsl:if> + </pre> + </xsl:template> + + <xsl:template match="struct"> + <h3><a name="{@name}">Structure <xsl:value-of select="@name"/></a></h3> + <pre class="programlisting"> + <xsl:text>Structure </xsl:text><xsl:value-of select="@name"/><br/> + <xsl:value-of select="@type"/><xsl:text> { +</xsl:text> + <xsl:if test="not(field)"> + <xsl:text>The content of this structure is not made public by the API. +</xsl:text> + </xsl:if> + <xsl:for-each select="field"> + <xsl:text> </xsl:text> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + <xsl:text>	</xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="@info != ''"> + <xsl:text>	: </xsl:text> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="substring(@info, 1, 40)"/> + </xsl:call-template> + </xsl:if> + <xsl:text> +</xsl:text> + </xsl:for-each> + <xsl:text>}</xsl:text> + </pre> + </xsl:template> + + <xsl:template match="macro"> + <xsl:variable name="name" select="string(@name)"/> + <h3><a name="{$name}"></a>Macro: <xsl:value-of select="$name"/></h3> + <pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre> + <p> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="info"/> + </xsl:call-template> + </p><xsl:text> +</xsl:text> + </xsl:template> + + <xsl:template match="function" mode="toc"> + <xsl:variable name="name" select="string(@name)"/> + <xsl:variable name="nlen" select="string-length($name)"/> + <xsl:variable name="tlen" select="string-length(return/@type)"/> + <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> + <pre class="programlisting"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + <xsl:text>	</xsl:text> + <a href="#{@name}"><xsl:value-of select="@name"/></a> + <xsl:if test="$blen - 40 < -8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 < 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>	(</xsl:text> + <xsl:if test="not(arg)"> + <xsl:text>void</xsl:text> + </xsl:if> + <xsl:for-each select="arg"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text><br/> + <xsl:if test="$blen - 40 > 8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 > 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>					 </xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text>)</xsl:text> + </pre><xsl:text> +</xsl:text> + </xsl:template> + + <xsl:template match="functype" mode="toc"> + <xsl:variable name="name" select="string(@name)"/> + <xsl:variable name="nlen" select="string-length($name)"/> + <xsl:variable name="tlen" select="string-length(return/@type)"/> + <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> + <pre class="programlisting"> + <xsl:text>Function type: </xsl:text> + <a href="#{$name}"><xsl:value-of select="$name"/></a> + <xsl:text> +</xsl:text> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + <xsl:text>	</xsl:text> + <a href="#{$name}"><xsl:value-of select="$name"/></a> + <xsl:if test="$blen - 40 < -8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 < 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>	(</xsl:text> + <xsl:if test="not(arg)"> + <xsl:text>void</xsl:text> + </xsl:if> + <xsl:for-each select="arg"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text><br/> + <xsl:if test="$blen - 40 > 8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 > 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>					 </xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text>) +</xsl:text> + </pre> + <xsl:text> +</xsl:text> + </xsl:template> + + <xsl:template match="functype"> + <xsl:variable name="name" select="string(@name)"/> + <xsl:variable name="nlen" select="string-length($name)"/> + <xsl:variable name="tlen" select="string-length(return/@type)"/> + <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> + <h3> + <a name="{$name}"></a> + <xsl:text>Function type: </xsl:text> + <xsl:value-of select="$name"/> + </h3> + <pre class="programlisting"> + <xsl:text>Function type: </xsl:text> + <xsl:value-of select="$name"/> + <xsl:text> +</xsl:text> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + <xsl:text>	</xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="$blen - 40 < -8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 < 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>	(</xsl:text> + <xsl:if test="not(arg)"> + <xsl:text>void</xsl:text> + </xsl:if> + <xsl:for-each select="arg"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text><br/> + <xsl:if test="$blen - 40 > 8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 > 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>					 </xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text>) +</xsl:text> + </pre> + <p> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="info"/> + </xsl:call-template> + </p> + <xsl:if test="arg | return"> + <div class="variablelist"><table border="0"><col align="left"/><tbody> + <xsl:for-each select="arg"> + <tr> + <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td> + <td> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@info"/> + </xsl:call-template> + </td> + </tr> + </xsl:for-each> + <xsl:if test="return/@info"> + <tr> + <td><span class="term"><i><tt>Returns</tt></i>:</span></td> + <td> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@info"/> + </xsl:call-template> + </td> + </tr> + </xsl:if> + </tbody></table></div> + </xsl:if> + <br/> + <xsl:text> +</xsl:text> + </xsl:template> + + <xsl:template match="function"> + <xsl:variable name="name" select="string(@name)"/> + <xsl:variable name="nlen" select="string-length($name)"/> + <xsl:variable name="tlen" select="string-length(return/@type)"/> + <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> + <h3><a name="{$name}"></a>Function: <xsl:value-of select="$name"/></h3> + <pre class="programlisting"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + <xsl:text>	</xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="$blen - 40 < -8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 < 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>	(</xsl:text> + <xsl:if test="not(arg)"> + <xsl:text>void</xsl:text> + </xsl:if> + <xsl:for-each select="arg"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text><br/> + <xsl:if test="$blen - 40 > 8"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:if test="$blen - 40 > 0"> + <xsl:text>	</xsl:text> + </xsl:if> + <xsl:text>					 </xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text>)</xsl:text><br/> + <xsl:text> +</xsl:text> + </pre> + <p> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="info"/> + </xsl:call-template> + </p><xsl:text> +</xsl:text> + <xsl:if test="arg | return/@info"> + <div class="variablelist"><table border="0"><col align="left"/><tbody> + <xsl:for-each select="arg"> + <tr> + <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td> + <td> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@info"/> + </xsl:call-template> + </td> + </tr> + </xsl:for-each> + <xsl:if test="return/@info"> + <tr> + <td><span class="term"><i><tt>Returns</tt></i>:</span></td> + <td> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@info"/> + </xsl:call-template> + </td> + </tr> + </xsl:if> + </tbody></table></div> + </xsl:if> + </xsl:template> + + <xsl:template match="exports" mode="toc"> + <xsl:apply-templates select="key('symbols', string(@symbol))[1]" mode="toc"/> + </xsl:template> + + <xsl:template match="exports"> + <xsl:apply-templates select="key('symbols', string(@symbol))[1]"/> + </xsl:template> + + <xsl:template name="description"> + <xsl:if test="deprecated"> + <h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2> + </xsl:if> + <xsl:if test="description"> + <p><xsl:value-of select="description"/></p> + </xsl:if> + </xsl:template> + + <xsl:template name="docomponents"> + <xsl:param name="mode"/> + <xsl:apply-templates select="exports[@type='macro']" mode="$mode"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='enum']" mode="$mode"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='typedef']" mode="$mode"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='struct']" mode="$mode"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='function']" mode="$mode"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + </xsl:template> + + <xsl:template match="file"> + <xsl:variable name="name" select="@name"/> + <xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable> + <xsl:document href="{$htmldir}/libxml-{$name}.html" method="xml" encoding="ISO-8859-1" + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" + doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <xsl:call-template name="style"/> + <xsl:call-template name="docstyle"/> + <table border="0" cellpadding="3" cellspacing="1" width="100%"> + <tr> + <td> + <xsl:call-template name="description"/> + <xsl:choose> + <xsl:when test="deprecated"> + <div class="deprecated"> + <h2>Table of Contents</h2> + <xsl:apply-templates select="exports" mode="toc"/> + <h2>Description</h2> + <xsl:text> +</xsl:text> + <xsl:apply-templates select="exports"/> + </div> + </xsl:when> + <xsl:otherwise> + <h2>Table of Contents</h2> + <xsl:apply-templates select="exports[@type='macro']" mode="toc"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='enum']" mode="toc"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='typedef']" mode="toc"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='struct']" mode="toc"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='function']" mode="toc"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <h2>Description</h2> + <xsl:text> +</xsl:text> + <xsl:apply-templates select="exports[@type='macro']"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='enum']"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='typedef']"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='struct']"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + <xsl:apply-templates select="exports[@type='function']"> + <xsl:sort select='@symbol'/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </td> + </tr> +</table> + </xsl:document> + </xsl:template> + + <xsl:template match="file" mode="toc"> + <xsl:variable name="name" select="@name"/> + <b><a href="http://xmlsoft.org/wiki/index.php?title=Libxml2:Api:{$name}"><xsl:value-of select="$name"/></a></b><br/> + <xsl:value-of select="summary"/> + <br/><br/> + </xsl:template> + + <xsl:template name="mainpage"> + <xsl:param name="file" select="concat($htmldir, '/libxml-index.html')"/> + <xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable> + <xsl:document href="{$file}" method="xml" encoding="ISO-8859-1" + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" + doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <xsl:call-template name="style"/> + <xsl:call-template name="docstyle"/> + <table border="0" cellpadding="3" cellspacing="1" width="100%"> + <tr> + <td> + <xsl:apply-templates select="/api/files/file" mode="toc"/> + </td> + </tr> + </table> + </xsl:document> + </xsl:template> + + <xsl:template match="/"> + <!-- Save the main libxml-index.html as well as a couple of copies --> + <xsl:call-template name="mainpage"/> + <!-- now build the file for each of the modules --> + <xsl:apply-templates select="/api/files/file"/> + </xsl:template> + +</xsl:stylesheet> diff --git a/doc/xml.html b/doc/xml.html index fbb0d33..3dc7fd9 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -715,6 +715,32 @@ to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p> <p>There is the list of public releases:</p> +<h3>2.6.18: Mar 13 2005</h3> +<ul> + <li> build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li> + <li> bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, + URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python + paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, + xmlSetNsProp fix (Mike Hommey), warning should not count as error + (William Brack), xmlCreatePushParser empty chunk, XInclude parser + flags (William), cleanup FTP and HTTP code to reuse the uri parsing + and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), + XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), + multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), + Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 + on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type + fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).</li> + <li> improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik), </li> + <li> Documentation: Wiki support (Joel Reed) +</ul> <h3>2.6.17: Jan 16 2005</h3> <ul> <li>build fixes: Windows, warnings removal (William Brack), @@ -3099,6 +3125,17 @@ of a number of things:</p> <h2><a name="Encodings">Encodings support</a></h2> +<p>If you are not really familiar with Internationalization (usual shortcut +is I18N) , Unicode, characters and glyphs, I suggest you read a <a +href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a> +by Tim Bray on Unicode and why you should care about it.</p> +<p>If you don't understand why <b>it does not make sense to have a string +without knowing what encoding it uses</b>, then as Joel Spolsky said +<a href="http://www.joelonsoftware.com/articles/Unicode.html">please do +not write another line of code until you finish reading that article.</a>. +It is a prerequisite to understand this page, and avoid a lot of problems +with libxml2, XML or text processing in general.</p> + <p>Table of Content:</p> <ol> <li><a href="encoding.html#What">What does internationalization support @@ -3113,11 +3150,6 @@ of a number of things:</p> <h3><a name="What">What does internationalization support mean ?</a></h3> -<p>If you are not really familiar with Internationalization (usual shortcut -is I18N) , Unicode, characters and glyphs, I suggest you read a <a -href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a> -by Tim Bray on Unicode and why you should care about it.</p> - <p>XML was designed from the start to allow the support of any character set by using Unicode. Any conformant XML parser has to support the UTF-8 and UTF-16 default encodings which can both express the full unicode ranges. UTF8 diff --git a/doc/xmldtd.html b/doc/xmldtd.html index 0cacd0b..50d4364 100644 --- a/doc/xmldtd.html +++ b/doc/xmldtd.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Validation & DTDs</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Validation & DTDs</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="#General5">General overview</a></li> +</style><title>Validation & DTDs</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Validation & DTDs</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="#General5">General overview</a></li> <li><a href="#definition">The definition</a></li> <li><a href="#Simple">Simple rules</a> <ol><li><a href="#reference">How to reference a DTD from a document</a></li> diff --git a/elfgcchack.h b/elfgcchack.h index e247b22..2807bef 100644 --- a/elfgcchack.h +++ b/elfgcchack.h @@ -1021,6 +1021,10 @@ extern __typeof (xmlCopyDoc) xmlCopyDoc __attribute((alias("xmlCopyDoc__internal #define xmlCopyDoc xmlCopyDoc__internal_alias #endif +extern __typeof (xmlCopyDocElementContent) xmlCopyDocElementContent__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlCopyDocElementContent) xmlCopyDocElementContent __attribute((alias("xmlCopyDocElementContent__internal_alias"))); +#define xmlCopyDocElementContent xmlCopyDocElementContent__internal_alias + #if defined(LIBXML_TREE_ENABLED) extern __typeof (xmlCopyDtd) xmlCopyDtd__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlCopyDtd) xmlCopyDtd __attribute((alias("xmlCopyDtd__internal_alias"))); @@ -1261,6 +1265,10 @@ extern __typeof (xmlDetectCharEncoding) xmlDetectCharEncoding__internal_alias __ extern __typeof (xmlDetectCharEncoding) xmlDetectCharEncoding __attribute((alias("xmlDetectCharEncoding__internal_alias"))); #define xmlDetectCharEncoding xmlDetectCharEncoding__internal_alias +extern __typeof (xmlDictCleanup) xmlDictCleanup__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlDictCleanup) xmlDictCleanup __attribute((alias("xmlDictCleanup__internal_alias"))); +#define xmlDictCleanup xmlDictCleanup__internal_alias + extern __typeof (xmlDictCreate) xmlDictCreate__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlDictCreate) xmlDictCreate __attribute((alias("xmlDictCreate__internal_alias"))); #define xmlDictCreate xmlDictCreate__internal_alias @@ -1463,6 +1471,10 @@ extern __typeof (xmlFreeDoc) xmlFreeDoc__internal_alias __attribute((visibility( extern __typeof (xmlFreeDoc) xmlFreeDoc __attribute((alias("xmlFreeDoc__internal_alias"))); #define xmlFreeDoc xmlFreeDoc__internal_alias +extern __typeof (xmlFreeDocElementContent) xmlFreeDocElementContent__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlFreeDocElementContent) xmlFreeDocElementContent __attribute((alias("xmlFreeDocElementContent__internal_alias"))); +#define xmlFreeDocElementContent xmlFreeDocElementContent__internal_alias + extern __typeof (xmlFreeDtd) xmlFreeDtd__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlFreeDtd) xmlFreeDtd __attribute((alias("xmlFreeDtd__internal_alias"))); #define xmlFreeDtd xmlFreeDtd__internal_alias @@ -1551,6 +1563,12 @@ extern __typeof (xmlFreeRefTable) xmlFreeRefTable__internal_alias __attribute((v extern __typeof (xmlFreeRefTable) xmlFreeRefTable __attribute((alias("xmlFreeRefTable__internal_alias"))); #define xmlFreeRefTable xmlFreeRefTable__internal_alias +#if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlFreeStreamCtxt) xmlFreeStreamCtxt__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlFreeStreamCtxt) xmlFreeStreamCtxt __attribute((alias("xmlFreeStreamCtxt__internal_alias"))); +#define xmlFreeStreamCtxt xmlFreeStreamCtxt__internal_alias +#endif + #if defined(LIBXML_READER_ENABLED) extern __typeof (xmlFreeTextReader) xmlFreeTextReader__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlFreeTextReader) xmlFreeTextReader __attribute((alias("xmlFreeTextReader__internal_alias"))); @@ -1751,6 +1769,10 @@ extern __typeof (xmlHashCreate) xmlHashCreate__internal_alias __attribute((visib extern __typeof (xmlHashCreate) xmlHashCreate __attribute((alias("xmlHashCreate__internal_alias"))); #define xmlHashCreate xmlHashCreate__internal_alias +extern __typeof (xmlHashCreateDict) xmlHashCreateDict__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlHashCreateDict) xmlHashCreateDict __attribute((alias("xmlHashCreateDict__internal_alias"))); +#define xmlHashCreateDict xmlHashCreateDict__internal_alias + extern __typeof (xmlHashFree) xmlHashFree__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlHashFree) xmlHashFree __attribute((alias("xmlHashFree__internal_alias"))); #define xmlHashFree xmlHashFree__internal_alias @@ -2525,6 +2547,10 @@ extern __typeof (xmlNewDocComment) xmlNewDocComment__internal_alias __attribute( extern __typeof (xmlNewDocComment) xmlNewDocComment __attribute((alias("xmlNewDocComment__internal_alias"))); #define xmlNewDocComment xmlNewDocComment__internal_alias +extern __typeof (xmlNewDocElementContent) xmlNewDocElementContent__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlNewDocElementContent) xmlNewDocElementContent __attribute((alias("xmlNewDocElementContent__internal_alias"))); +#define xmlNewDocElementContent xmlNewDocElementContent__internal_alias + #if defined(LIBXML_TREE_ENABLED) extern __typeof (xmlNewDocFragment) xmlNewDocFragment__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlNewDocFragment) xmlNewDocFragment __attribute((alias("xmlNewDocFragment__internal_alias"))); @@ -3256,12 +3282,36 @@ extern __typeof (xmlParserWarning) xmlParserWarning __attribute((alias("xmlParse #define xmlParserWarning xmlParserWarning__internal_alias #if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlPatternFromRoot) xmlPatternFromRoot__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlPatternFromRoot) xmlPatternFromRoot __attribute((alias("xmlPatternFromRoot__internal_alias"))); +#define xmlPatternFromRoot xmlPatternFromRoot__internal_alias +#endif + +#if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlPatternGetStreamCtxt) xmlPatternGetStreamCtxt__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlPatternGetStreamCtxt) xmlPatternGetStreamCtxt __attribute((alias("xmlPatternGetStreamCtxt__internal_alias"))); +#define xmlPatternGetStreamCtxt xmlPatternGetStreamCtxt__internal_alias +#endif + +#if defined(LIBXML_PATTERN_ENABLED) extern __typeof (xmlPatternMatch) xmlPatternMatch__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlPatternMatch) xmlPatternMatch __attribute((alias("xmlPatternMatch__internal_alias"))); #define xmlPatternMatch xmlPatternMatch__internal_alias #endif #if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlPatternMaxDepth) xmlPatternMaxDepth__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlPatternMaxDepth) xmlPatternMaxDepth __attribute((alias("xmlPatternMaxDepth__internal_alias"))); +#define xmlPatternMaxDepth xmlPatternMaxDepth__internal_alias +#endif + +#if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlPatternStreamable) xmlPatternStreamable__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlPatternStreamable) xmlPatternStreamable __attribute((alias("xmlPatternStreamable__internal_alias"))); +#define xmlPatternStreamable xmlPatternStreamable__internal_alias +#endif + +#if defined(LIBXML_PATTERN_ENABLED) extern __typeof (xmlPatterncompile) xmlPatterncompile__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlPatterncompile) xmlPatterncompile __attribute((alias("xmlPatterncompile__internal_alias"))); #define xmlPatterncompile xmlPatterncompile__internal_alias @@ -4003,6 +4053,12 @@ extern __typeof (xmlSchemaCompareValues) xmlSchemaCompareValues __attribute((ali #define xmlSchemaCompareValues xmlSchemaCompareValues__internal_alias #endif +#if defined(LIBXML_SCHEMAS_ENABLED) +extern __typeof (xmlSchemaCompareValuesWhtsp) xmlSchemaCompareValuesWhtsp__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlSchemaCompareValuesWhtsp) xmlSchemaCompareValuesWhtsp __attribute((alias("xmlSchemaCompareValuesWhtsp__internal_alias"))); +#define xmlSchemaCompareValuesWhtsp xmlSchemaCompareValuesWhtsp__internal_alias +#endif + #if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) extern __typeof (xmlSchemaDump) xmlSchemaDump__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlSchemaDump) xmlSchemaDump __attribute((alias("xmlSchemaDump__internal_alias"))); @@ -4064,6 +4120,12 @@ extern __typeof (xmlSchemaGetBuiltInType) xmlSchemaGetBuiltInType __attribute((a #endif #if defined(LIBXML_SCHEMAS_ENABLED) +extern __typeof (xmlSchemaGetCanonValue) xmlSchemaGetCanonValue__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlSchemaGetCanonValue) xmlSchemaGetCanonValue __attribute((alias("xmlSchemaGetCanonValue__internal_alias"))); +#define xmlSchemaGetCanonValue xmlSchemaGetCanonValue__internal_alias +#endif + +#if defined(LIBXML_SCHEMAS_ENABLED) extern __typeof (xmlSchemaGetFacetValueAsULong) xmlSchemaGetFacetValueAsULong__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlSchemaGetFacetValueAsULong) xmlSchemaGetFacetValueAsULong __attribute((alias("xmlSchemaGetFacetValueAsULong__internal_alias"))); #define xmlSchemaGetFacetValueAsULong xmlSchemaGetFacetValueAsULong__internal_alias @@ -4118,12 +4180,24 @@ extern __typeof (xmlSchemaNewMemParserCtxt) xmlSchemaNewMemParserCtxt __attribut #endif #if defined(LIBXML_SCHEMAS_ENABLED) +extern __typeof (xmlSchemaNewNOTATIONValue) xmlSchemaNewNOTATIONValue__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlSchemaNewNOTATIONValue) xmlSchemaNewNOTATIONValue __attribute((alias("xmlSchemaNewNOTATIONValue__internal_alias"))); +#define xmlSchemaNewNOTATIONValue xmlSchemaNewNOTATIONValue__internal_alias +#endif + +#if defined(LIBXML_SCHEMAS_ENABLED) extern __typeof (xmlSchemaNewParserCtxt) xmlSchemaNewParserCtxt__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlSchemaNewParserCtxt) xmlSchemaNewParserCtxt __attribute((alias("xmlSchemaNewParserCtxt__internal_alias"))); #define xmlSchemaNewParserCtxt xmlSchemaNewParserCtxt__internal_alias #endif #if defined(LIBXML_SCHEMAS_ENABLED) +extern __typeof (xmlSchemaNewStringValue) xmlSchemaNewStringValue__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlSchemaNewStringValue) xmlSchemaNewStringValue __attribute((alias("xmlSchemaNewStringValue__internal_alias"))); +#define xmlSchemaNewStringValue xmlSchemaNewStringValue__internal_alias +#endif + +#if defined(LIBXML_SCHEMAS_ENABLED) extern __typeof (xmlSchemaNewValidCtxt) xmlSchemaNewValidCtxt__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlSchemaNewValidCtxt) xmlSchemaNewValidCtxt __attribute((alias("xmlSchemaNewValidCtxt__internal_alias"))); #define xmlSchemaNewValidCtxt xmlSchemaNewValidCtxt__internal_alias @@ -4449,6 +4523,24 @@ extern __typeof (xmlStrdup) xmlStrdup__internal_alias __attribute((visibility("h extern __typeof (xmlStrdup) xmlStrdup __attribute((alias("xmlStrdup__internal_alias"))); #define xmlStrdup xmlStrdup__internal_alias +#if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlStreamPop) xmlStreamPop__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlStreamPop) xmlStreamPop __attribute((alias("xmlStreamPop__internal_alias"))); +#define xmlStreamPop xmlStreamPop__internal_alias +#endif + +#if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlStreamPush) xmlStreamPush__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlStreamPush) xmlStreamPush __attribute((alias("xmlStreamPush__internal_alias"))); +#define xmlStreamPush xmlStreamPush__internal_alias +#endif + +#if defined(LIBXML_PATTERN_ENABLED) +extern __typeof (xmlStreamPushAttr) xmlStreamPushAttr__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlStreamPushAttr) xmlStreamPushAttr __attribute((alias("xmlStreamPushAttr__internal_alias"))); +#define xmlStreamPushAttr xmlStreamPushAttr__internal_alias +#endif + extern __typeof (xmlStringCurrentChar) xmlStringCurrentChar__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlStringCurrentChar) xmlStringCurrentChar __attribute((alias("xmlStringCurrentChar__internal_alias"))); #define xmlStringCurrentChar xmlStringCurrentChar__internal_alias @@ -4538,6 +4630,12 @@ extern __typeof (xmlTextReaderBaseUri) xmlTextReaderBaseUri __attribute((alias(" #endif #if defined(LIBXML_READER_ENABLED) +extern __typeof (xmlTextReaderByteConsumed) xmlTextReaderByteConsumed__internal_alias __attribute((visibility("hidden"))); +extern __typeof (xmlTextReaderByteConsumed) xmlTextReaderByteConsumed __attribute((alias("xmlTextReaderByteConsumed__internal_alias"))); +#define xmlTextReaderByteConsumed xmlTextReaderByteConsumed__internal_alias +#endif + +#if defined(LIBXML_READER_ENABLED) extern __typeof (xmlTextReaderClose) xmlTextReaderClose__internal_alias __attribute((visibility("hidden"))); extern __typeof (xmlTextReaderClose) xmlTextReaderClose __attribute((alias("xmlTextReaderClose__internal_alias"))); #define xmlTextReaderClose xmlTextReaderClose__internal_alias @@ -223,7 +223,7 @@ UTF8Toascii(unsigned char* out, int *outlen, * * Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 * block of chars out. - * Returns 0 if success, or -1 otherwise + * Returns the number of bytes written if success, or -1 otherwise * The value of @inlen after return is the number of octets consumed * if the return value is positive, else unpredictable. * The value of @outlen after return is the number of octets consumed. @@ -311,7 +311,8 @@ UTF8ToUTF8(unsigned char* out, int *outlen, * Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 * block of chars out. * - * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise + * Returns the number of bytes written if success, -2 if the transcoding fails, + or -1 otherwise * The value of @inlen after return is the number of octets consumed * if the return value is positive, else unpredictable. * The value of @outlen after return is the number of octets consumed. @@ -2145,7 +2146,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) { * the raw consumed value, this is not a cheap operation */ if (in->end - in->cur > 0) { - static unsigned char convbuf[32000]; + unsigned char convbuf[32000]; const unsigned char *cur = (const unsigned char *)in->cur; int toconv = in->end - in->cur, written = 32000; @@ -20,6 +20,7 @@ #include <libxml/parserInternals.h> #include <libxml/xmlerror.h> #include <libxml/globals.h> +#include <libxml/dict.h> /* * The XML predefined entities. @@ -89,24 +90,51 @@ xmlEntitiesErr(xmlParserErrors code, const char *msg) /* * xmlFreeEntity : clean-up an entity record. */ -static void xmlFreeEntity(xmlEntityPtr entity) { - if (entity == NULL) return; +static void +xmlFreeEntity(xmlEntityPtr entity) +{ + xmlDictPtr dict = NULL; + + if (entity == NULL) + return; + + if (entity->doc != NULL) + dict = entity->doc->dict; + if ((entity->children) && (entity->owner == 1) && - (entity == (xmlEntityPtr) entity->children->parent)) - xmlFreeNodeList(entity->children); - if (entity->name != NULL) - xmlFree((char *) entity->name); - if (entity->ExternalID != NULL) - xmlFree((char *) entity->ExternalID); - if (entity->SystemID != NULL) - xmlFree((char *) entity->SystemID); - if (entity->URI != NULL) - xmlFree((char *) entity->URI); - if (entity->content != NULL) - xmlFree((char *) entity->content); - if (entity->orig != NULL) - xmlFree((char *) entity->orig); + (entity == (xmlEntityPtr) entity->children->parent)) + xmlFreeNodeList(entity->children); + if (dict != NULL) { + if ((entity->name != NULL) && (!xmlDictOwns(dict, entity->name))) + xmlFree((char *) entity->name); + if ((entity->ExternalID != NULL) && + (!xmlDictOwns(dict, entity->ExternalID))) + xmlFree((char *) entity->ExternalID); + if ((entity->SystemID != NULL) && + (!xmlDictOwns(dict, entity->SystemID))) + xmlFree((char *) entity->SystemID); + if ((entity->URI != NULL) && (!xmlDictOwns(dict, entity->URI))) + xmlFree((char *) entity->URI); + if ((entity->content != NULL) + && (!xmlDictOwns(dict, entity->content))) + xmlFree((char *) entity->content); + if ((entity->orig != NULL) && (!xmlDictOwns(dict, entity->orig))) + xmlFree((char *) entity->orig); + } else { + if (entity->name != NULL) + xmlFree((char *) entity->name); + if (entity->ExternalID != NULL) + xmlFree((char *) entity->ExternalID); + if (entity->SystemID != NULL) + xmlFree((char *) entity->SystemID); + if (entity->URI != NULL) + xmlFree((char *) entity->URI); + if (entity->content != NULL) + xmlFree((char *) entity->content); + if (entity->orig != NULL) + xmlFree((char *) entity->orig); + } xmlFree(entity); } @@ -117,23 +145,29 @@ static xmlEntityPtr xmlAddEntity(xmlDtdPtr dtd, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) { + xmlDictPtr dict = NULL; xmlEntitiesTablePtr table = NULL; xmlEntityPtr ret; if (name == NULL) return(NULL); + if (dtd == NULL) + return(NULL); + if (dtd->doc != NULL) + dict = dtd->doc->dict; + switch (type) { case XML_INTERNAL_GENERAL_ENTITY: case XML_EXTERNAL_GENERAL_PARSED_ENTITY: case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: if (dtd->entities == NULL) - dtd->entities = xmlHashCreate(0); + dtd->entities = xmlHashCreateDict(0, dict); table = dtd->entities; break; case XML_INTERNAL_PARAMETER_ENTITY: case XML_EXTERNAL_PARAMETER_ENTITY: if (dtd->pentities == NULL) - dtd->pentities = xmlHashCreate(0); + dtd->pentities = xmlHashCreateDict(0, dict); table = dtd->pentities; break; case XML_INTERNAL_PREDEFINED_ENTITY: @@ -152,15 +186,27 @@ xmlAddEntity(xmlDtdPtr dtd, const xmlChar *name, int type, /* * fill the structure. */ - ret->name = xmlStrdup(name); ret->etype = (xmlEntityType) type; - if (ExternalID != NULL) - ret->ExternalID = xmlStrdup(ExternalID); - if (SystemID != NULL) - ret->SystemID = xmlStrdup(SystemID); + if (dict == NULL) { + ret->name = xmlStrdup(name); + if (ExternalID != NULL) + ret->ExternalID = xmlStrdup(ExternalID); + if (SystemID != NULL) + ret->SystemID = xmlStrdup(SystemID); + } else { + ret->name = xmlDictLookup(dict, name, -1); + if (ExternalID != NULL) + ret->ExternalID = xmlDictLookup(dict, ExternalID, -1); + if (SystemID != NULL) + ret->SystemID = xmlDictLookup(dict, SystemID, -1); + } if (content != NULL) { ret->length = xmlStrlen(content); - ret->content = xmlStrndup(content, ret->length); + if ((dict != NULL) && (ret->length < 5)) + ret->content = (xmlChar *) + xmlDictLookup(dict, content, ret->length); + else + ret->content = xmlStrndup(content, ret->length); } else { ret->length = 0; ret->content = NULL; @@ -169,6 +215,7 @@ xmlAddEntity(xmlDtdPtr dtd, const xmlChar *name, int type, the defining entity */ ret->orig = NULL; ret->owner = 0; + ret->doc = dtd->doc; if (xmlHashAddEntry(table, name, ret)) { /* @@ -679,6 +726,7 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) { * xmlCreateEntitiesTable: * * create and initialize an empty entities hash table. + * This really doesn't make sense and should be deprecated * * Returns the xmlEntitiesTablePtr just created or NULL in case of error. */ diff --git a/example/Makefile.in b/example/Makefile.in index c7f21aa..70a0986 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -145,7 +145,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -168,6 +167,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ @@ -112,12 +112,12 @@ skipped_functions = [ "xmlIORead", "xmlReadIO", "xmlCtxtReadIO", "htmlIORead", "htmlReadIO", "htmlCtxtReadIO", "xmlReaderNewIO", "xmlBufferDump", "xmlNanoFTPConnect", -"xmlNanoFTPConnectTo", +"xmlNanoFTPConnectTo", "xmlNanoHTTPMethod", "xmlNanoHTTPMethodRedir", # Complex I/O APIs "xmlCreateIOParserCtxt", "xmlParserInputBufferCreateIO", "xmlRegisterInputCallbacks", "xmlReaderForIO", "xmlOutputBufferCreateIO", "xmlRegisterOutputCallbacks", -"xmlSaveToIO", +"xmlSaveToIO", "xmlIOHTTPOpenW", # library state cleanup, generate false leak informations and other # troubles, heavillyb tested otherwise. "xmlCleanupParser", "xmlRelaxNGCleanupTypes", "xmlSetListDoc", @@ -129,7 +129,7 @@ skipped_functions = [ "xmlTextReaderReadInnerXml", "xmlTextReaderReadOuterXml", "xmlTextReaderReadString", # destructor -"xmlListDelete", "xmlOutputBufferClose", "xmlNanoFTPClose", +"xmlListDelete", "xmlOutputBufferClose", "xmlNanoFTPClose", "xmlNanoHTTPClose", # deprecated "xmlCatalogGetPublic", "xmlCatalogGetSystem", "xmlEncodeEntities", "xmlNewGlobalNs", "xmlHandleEntity", "xmlNamespaceParseNCName", @@ -231,6 +231,8 @@ extra_post_call = { (ret_val != prefix) && (ret_val != memory)) xmlFree(ret_val); ret_val = NULL;""", + "xmlNewDocElementContent": + """xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;""", "xmlDictReference": "xmlDictFree(dict);", # Functions which deallocates one of their parameters "xmlXPathConvertBoolean": """val = NULL;""", @@ -324,17 +326,25 @@ def type_convert(str, name, info, module, function, pos): string.find(info, "URL") != -1: if string.find(function, "Save") != -1 or \ string.find(function, "Create") != -1 or \ - string.find(function, "Write") != -1: + string.find(function, "Write") != -1 or \ + string.find(function, "Fetch") != -1: return('fileoutput') return('filepath') if res == 'void_ptr': if module == 'nanoftp' and name == 'ctx': return('xmlNanoFTPCtxtPtr') - if function == 'xmlNanoFTPNewCtxt': + if function == 'xmlNanoFTPNewCtxt' or \ + function == 'xmlNanoFTPConnectTo' or \ + function == 'xmlNanoFTPOpen': return('xmlNanoFTPCtxtPtr') if module == 'nanohttp' and name == 'ctx': return('xmlNanoHTTPCtxtPtr') - if function == 'xmlIOHTTPOpenW': + if function == 'xmlNanoHTTPMethod' or \ + function == 'xmlNanoHTTPMethodRedir' or \ + function == 'xmlNanoHTTPOpen' or \ + function == 'xmlNanoHTTPOpenRedir': + return('xmlNanoHTTPCtxtPtr'); + if function == 'xmlIOHTTPOpen': return('xmlNanoHTTPCtxtPtr') if string.find(name, "data") != -1: return('userdata') @@ -52,6 +52,7 @@ struct _xmlHashTable { struct _xmlHashEntry *table; int size; int nbElems; + xmlDictPtr dict; }; /* @@ -149,6 +150,7 @@ xmlHashCreate(int size) { table = xmlMalloc(sizeof(xmlHashTable)); if (table) { + table->dict = NULL; table->size = size; table->nbElems = 0; table->table = xmlMalloc(size * sizeof(xmlHashEntry)); @@ -162,6 +164,27 @@ xmlHashCreate(int size) { } /** + * xmlHashCreateDict: + * @size: the size of the hash table + * @dict: a dictionary to use for the hash + * + * Create a new xmlHashTablePtr which will use @dict as the internal dictionary + * + * Returns the newly created object, or NULL if an error occured. + */ +xmlHashTablePtr +xmlHashCreateDict(int size, xmlDictPtr dict) { + xmlHashTablePtr table; + + table = xmlHashCreate(size); + if (table != NULL) { + table->dict = dict; + xmlDictReference(dict); + } + return(table); +} + +/** * xmlHashGrow: * @table: the hash table * @size: the new size of the hash table @@ -282,12 +305,14 @@ xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) { next = iter->next; if ((f != NULL) && (iter->payload != NULL)) f(iter->payload, iter->name); - if (iter->name) - xmlFree(iter->name); - if (iter->name2) - xmlFree(iter->name2); - if (iter->name3) - xmlFree(iter->name3); + if (table->dict == NULL) { + if (iter->name) + xmlFree(iter->name); + if (iter->name2) + xmlFree(iter->name2); + if (iter->name3) + xmlFree(iter->name3); + } iter->payload = NULL; if (!inside_table) xmlFree(iter); @@ -299,6 +324,8 @@ xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) { } xmlFree(table->table); } + if (table->dict) + xmlDictFree(table->dict); xmlFree(table); } @@ -463,28 +490,64 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, xmlHashEntryPtr entry; xmlHashEntryPtr insert; - if ((table == NULL) || name == NULL) + if ((table == NULL) || (name == NULL)) return(-1); /* + * If using a dict internalize if needed + */ + if (table->dict) { + if (!xmlDictOwns(table->dict, name)) { + name = xmlDictLookup(table->dict, name, -1); + if (name == NULL) + return(-1); + } + if ((name2 != NULL) && (!xmlDictOwns(table->dict, name2))) { + name2 = xmlDictLookup(table->dict, name2, -1); + if (name2 == NULL) + return(-1); + } + if ((name3 != NULL) && (!xmlDictOwns(table->dict, name3))) { + name3 = xmlDictLookup(table->dict, name3, -1); + if (name3 == NULL) + return(-1); + } + } + + /* * Check for duplicate and insertion location. */ key = xmlHashComputeKey(table, name, name2, name3); if (table->table[key].valid == 0) { insert = NULL; } else { - for (insert = &(table->table[key]); insert->next != NULL; - insert = insert->next) { + if (table->dict) { + for (insert = &(table->table[key]); insert->next != NULL; + insert = insert->next) { + if ((insert->name == name) && + (insert->name2 == name2) && + (insert->name3 == name3)) + return(-1); + len++; + } + if ((insert->name == name) && + (insert->name2 == name2) && + (insert->name3 == name3)) + return(-1); + } else { + for (insert = &(table->table[key]); insert->next != NULL; + insert = insert->next) { + if ((xmlStrEqual(insert->name, name)) && + (xmlStrEqual(insert->name2, name2)) && + (xmlStrEqual(insert->name3, name3))) + return(-1); + len++; + } if ((xmlStrEqual(insert->name, name)) && (xmlStrEqual(insert->name2, name2)) && (xmlStrEqual(insert->name3, name3))) return(-1); - len++; } - if ((xmlStrEqual(insert->name, name)) && - (xmlStrEqual(insert->name2, name2)) && - (xmlStrEqual(insert->name3, name3))) - return(-1); } if (insert == NULL) { @@ -495,9 +558,15 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, return(-1); } - entry->name = xmlStrdup(name); - entry->name2 = xmlStrdup(name2); - entry->name3 = xmlStrdup(name3); + if (table->dict != NULL) { + entry->name = (xmlChar *) name; + entry->name2 = (xmlChar *) name2; + entry->name3 = (xmlChar *) name3; + } else { + entry->name = xmlStrdup(name); + entry->name2 = xmlStrdup(name2); + entry->name3 = xmlStrdup(name3); + } entry->payload = userdata; entry->next = NULL; entry->valid = 1; @@ -541,14 +610,65 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, return(-1); /* + * If using a dict internalize if needed + */ + if (table->dict) { + if (!xmlDictOwns(table->dict, name)) { + name = xmlDictLookup(table->dict, name, -1); + if (name == NULL) + return(-1); + } + if ((name2 != NULL) && (!xmlDictOwns(table->dict, name2))) { + name2 = xmlDictLookup(table->dict, name2, -1); + if (name2 == NULL) + return(-1); + } + if ((name3 != NULL) && (!xmlDictOwns(table->dict, name3))) { + name3 = xmlDictLookup(table->dict, name3, -1); + if (name3 == NULL) + return(-1); + } + } + + /* * Check for duplicate and insertion location. */ key = xmlHashComputeKey(table, name, name2, name3); if (table->table[key].valid == 0) { insert = NULL; } else { - for (insert = &(table->table[key]); insert->next != NULL; - insert = insert->next) { + if (table ->dict) { + for (insert = &(table->table[key]); insert->next != NULL; + insert = insert->next) { + if ((insert->name == name) && + (insert->name2 == name2) && + (insert->name3 == name3)) { + if (f) + f(insert->payload, insert->name); + insert->payload = userdata; + return(0); + } + } + if ((insert->name == name) && + (insert->name2 == name2) && + (insert->name3 == name3)) { + if (f) + f(insert->payload, insert->name); + insert->payload = userdata; + return(0); + } + } else { + for (insert = &(table->table[key]); insert->next != NULL; + insert = insert->next) { + if ((xmlStrEqual(insert->name, name)) && + (xmlStrEqual(insert->name2, name2)) && + (xmlStrEqual(insert->name3, name3))) { + if (f) + f(insert->payload, insert->name); + insert->payload = userdata; + return(0); + } + } if ((xmlStrEqual(insert->name, name)) && (xmlStrEqual(insert->name2, name2)) && (xmlStrEqual(insert->name3, name3))) { @@ -558,14 +678,6 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, return(0); } } - if ((xmlStrEqual(insert->name, name)) && - (xmlStrEqual(insert->name2, name2)) && - (xmlStrEqual(insert->name3, name3))) { - if (f) - f(insert->payload, insert->name); - insert->payload = userdata; - return(0); - } } if (insert == NULL) { @@ -576,9 +688,15 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, return(-1); } - entry->name = xmlStrdup(name); - entry->name2 = xmlStrdup(name2); - entry->name3 = xmlStrdup(name3); + if (table->dict != NULL) { + entry->name = (xmlChar *) name; + entry->name2 = (xmlChar *) name2; + entry->name3 = (xmlChar *) name3; + } else { + entry->name = xmlStrdup(name); + entry->name2 = xmlStrdup(name2); + entry->name3 = xmlStrdup(name3); + } entry->payload = userdata; entry->next = NULL; entry->valid = 1; @@ -615,6 +733,14 @@ xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name, key = xmlHashComputeKey(table, name, name2, name3); if (table->table[key].valid == 0) return(NULL); + if (table->dict) { + for (entry = &(table->table[key]); entry != NULL; entry = entry->next) { + if ((entry->name == name) && + (entry->name2 == name2) && + (entry->name3 == name3)) + return(entry->payload); + } + } for (entry = &(table->table[key]); entry != NULL; entry = entry->next) { if ((xmlStrEqual(entry->name, name)) && (xmlStrEqual(entry->name2, name2)) && @@ -920,12 +1046,14 @@ xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, if ((f != NULL) && (entry->payload != NULL)) f(entry->payload, entry->name); entry->payload = NULL; - if(entry->name) - xmlFree(entry->name); - if(entry->name2) - xmlFree(entry->name2); - if(entry->name3) - xmlFree(entry->name3); + if (table->dict == NULL) { + if(entry->name) + xmlFree(entry->name); + if(entry->name2) + xmlFree(entry->name2); + if(entry->name3) + xmlFree(entry->name3); + } if(prev) { prev->next = entry->next; xmlFree(entry); diff --git a/include/Makefile.in b/include/Makefile.in index 2c923d5..954474c 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -132,7 +132,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -155,6 +154,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ diff --git a/include/libxml/Makefile.in b/include/libxml/Makefile.in index 460f9c0..e08683a 100644 --- a/include/libxml/Makefile.in +++ b/include/libxml/Makefile.in @@ -136,7 +136,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -159,6 +158,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ diff --git a/include/libxml/dict.h b/include/libxml/dict.h index 6bf25fb..abb8339 100644 --- a/include/libxml/dict.h +++ b/include/libxml/dict.h @@ -56,6 +56,13 @@ XMLPUBFUN int XMLCALL const xmlChar *str); XMLPUBFUN int XMLCALL xmlDictSize (xmlDictPtr dict); + +/* + * Cleanup function + */ +XMLPUBFUN void XMLCALL + xmlDictCleanup (void); + #ifdef __cplusplus } #endif diff --git a/include/libxml/hash.h b/include/libxml/hash.h index b2f7b41..7fe4be7 100644 --- a/include/libxml/hash.h +++ b/include/libxml/hash.h @@ -27,6 +27,7 @@ typedef xmlHashTable *xmlHashTablePtr; #include <libxml/xmlversion.h> #include <libxml/parser.h> +#include <libxml/dict.h> #ifdef __cplusplus extern "C" { @@ -47,8 +48,13 @@ extern "C" { * function pointer without encountering a warning from * gcc * + * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) + * This macro violated ISO C aliasing rules (gcc4 on s390 broke) + * so it is disabled now */ -#define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) + +#define XML_CAST_FPTR(fptr) fptr + /* * function types: @@ -99,6 +105,9 @@ typedef void (*xmlHashScannerFull)(void *payload, void *data, */ XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreate (int size); +XMLPUBFUN xmlHashTablePtr XMLCALL + xmlHashCreateDict(int size, + xmlDictPtr dict); XMLPUBFUN void XMLCALL xmlHashFree (xmlHashTablePtr table, xmlHashDeallocator f); diff --git a/include/libxml/pattern.h b/include/libxml/pattern.h index 02c833b..f801a37 100644 --- a/include/libxml/pattern.h +++ b/include/libxml/pattern.h @@ -44,6 +44,30 @@ XMLPUBFUN int XMLCALL xmlPatternMatch (xmlPatternPtr comp, xmlNodePtr node); +/* streaming interfaces */ +typedef struct _xmlStreamCtxt xmlStreamCtxt; +typedef xmlStreamCtxt *xmlStreamCtxtPtr; + +XMLPUBFUN int XMLCALL + xmlPatternStreamable (xmlPatternPtr comp); +XMLPUBFUN int XMLCALL + xmlPatternMaxDepth (xmlPatternPtr comp); +XMLPUBFUN int XMLCALL + xmlPatternFromRoot (xmlPatternPtr comp); +XMLPUBFUN xmlStreamCtxtPtr XMLCALL + xmlPatternGetStreamCtxt (xmlPatternPtr comp); +XMLPUBFUN void XMLCALL + xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); +XMLPUBFUN int XMLCALL + xmlStreamPush (xmlStreamCtxtPtr stream, + const xmlChar *name, + const xmlChar *ns); +XMLPUBFUN int XMLCALL + xmlStreamPushAttr (xmlStreamCtxtPtr stream, + const xmlChar *name, + const xmlChar *ns); +XMLPUBFUN int XMLCALL + xmlStreamPop (xmlStreamCtxtPtr stream); #ifdef __cplusplus } #endif diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h index e4eeba6..0cd8053 100644 --- a/include/libxml/schemasInternals.h +++ b/include/libxml/schemasInternals.h @@ -99,6 +99,9 @@ typedef enum { XML_SCHEMA_TYPE_LIST, XML_SCHEMA_TYPE_UNION, XML_SCHEMA_TYPE_ANY_ATTRIBUTE, + XML_SCHEMA_TYPE_IDC_UNIQUE, + XML_SCHEMA_TYPE_IDC_KEY, + XML_SCHEMA_TYPE_IDC_KEYREF, XML_SCHEMA_FACET_MININCLUSIVE = 1000, XML_SCHEMA_FACET_MINEXCLUSIVE, XML_SCHEMA_FACET_MAXINCLUSIVE, @@ -498,6 +501,12 @@ struct _xmlSchemaFacetLink { * the simple/complexType is abstract. */ #define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20 +/** + * XML_SCHEMAS_TYPE_FACETSNEEDVALUE: + * + * indicates if the facets need a computed value + */ +#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21 /** * _xmlSchemaType: @@ -680,6 +689,7 @@ struct _xmlSchemaElement { xmlSchemaContentType contentType; const xmlChar *refPrefix; xmlSchemaValPtr defVal; + void *idcs; }; /* @@ -824,6 +834,7 @@ struct _xmlSchema { void *includes; /* the includes, this is opaque for now */ int preserve; /* whether to free the document */ int counter; /* used to give ononymous components unique names */ + xmlHashTablePtr idcDef; }; XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); diff --git a/include/libxml/valid.h b/include/libxml/valid.h index 858dee9..2e0ec3d 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -172,6 +172,7 @@ XMLPUBFUN void XMLCALL #endif /* LIBXML_OUTPUT_ENABLED */ /* Element Content */ +/* the non Doc version are being deprecated */ XMLPUBFUN xmlElementContentPtr XMLCALL xmlNewElementContent (const xmlChar *name, xmlElementContentType type); @@ -179,6 +180,17 @@ XMLPUBFUN xmlElementContentPtr XMLCALL xmlCopyElementContent (xmlElementContentPtr content); XMLPUBFUN void XMLCALL xmlFreeElementContent (xmlElementContentPtr cur); +/* the new versions with doc argument */ +XMLPUBFUN xmlElementContentPtr XMLCALL + xmlNewDocElementContent (xmlDocPtr doc, + const xmlChar *name, + xmlElementContentType type); +XMLPUBFUN xmlElementContentPtr XMLCALL + xmlCopyDocElementContent(xmlDocPtr doc, + xmlElementContentPtr content); +XMLPUBFUN void XMLCALL + xmlFreeDocElementContent(xmlDocPtr doc, + xmlElementContentPtr cur); XMLPUBFUN void XMLCALL xmlSnprintfElementContent(char *buf, int size, diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index 7a5df69..df883e5 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -44,7 +44,7 @@ typedef enum { XML_FROM_OUTPUT, /* The serialization code */ XML_FROM_IO, /* The Input/Output stack */ XML_FROM_FTP, /* The FTP module */ - XML_FROM_HTTP, /* The FTP module */ + XML_FROM_HTTP, /* The HTTP module */ XML_FROM_XINCLUDE, /* The XInclude processing */ XML_FROM_XPATH, /* The XPath module */ XML_FROM_XPOINTER, /* The XPointer module */ @@ -653,6 +653,8 @@ typedef enum { XML_SCHEMAV_CVC_AU, /* 1874 */ XML_SCHEMAV_CVC_TYPE_1, /* 1875 */ XML_SCHEMAV_CVC_TYPE_2, /* 1876 */ + XML_SCHEMAV_CVC_IDC, /* 1877 */ + XML_SCHEMAV_CVC_WILDCARD, /* 1878 */ XML_XPTR_UNKNOWN_SCHEME = 1900, XML_XPTR_CHILDSEQ_START, /* 1901 */ XML_XPTR_EVAL_FAILED, /* 1902 */ @@ -664,6 +666,7 @@ typedef enum { XML_FTP_PASV_ANSWER = 2000, XML_FTP_EPSV_ANSWER, /* 2001 */ XML_FTP_ACCNT, /* 2002 */ + XML_FTP_URL_SYNTAX, /* 2003 */ XML_HTTP_URL_SYNTAX = 2020, XML_HTTP_USE_IP, /* 2021 */ XML_HTTP_UNKNOWN_HOST, /* 2022 */ diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h index 6c4c447..803f8e3 100644 --- a/include/libxml/xmlreader.h +++ b/include/libxml/xmlreader.h @@ -281,6 +281,13 @@ XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN int XMLCALL xmlTextReaderStandalone (xmlTextReaderPtr reader); + +/* + * Index lookup + */ +XMLPUBFUN long XMLCALL + xmlTextReaderByteConsumed (xmlTextReaderPtr reader); + /* * New more complete APIs for simpler creation and reuse of readers */ diff --git a/include/libxml/xmlschemastypes.h b/include/libxml/xmlschemastypes.h index 86010c0..004386f 100644 --- a/include/libxml/xmlschemastypes.h +++ b/include/libxml/xmlschemastypes.h @@ -23,6 +23,13 @@ extern "C" { #endif +typedef enum { + XML_SCHEMA_WHITESPACE_UNKNOWN = 0, + XML_SCHEMA_WHITESPACE_PRESERVE = 1, + XML_SCHEMA_WHITESPACE_REPLACE = 2, + XML_SCHEMA_WHITESPACE_COLLAPSE = 3 +} xmlSchemaWhitespaceValueType; + XMLPUBFUN void XMLCALL xmlSchemaInitTypes (void); XMLPUBFUN void XMLCALL @@ -87,6 +94,23 @@ XMLPUBFUN int XMLCALL const xmlChar *value, xmlSchemaValPtr *val, xmlNodePtr node); +XMLPUBFUN int XMLCALL + xmlSchemaGetCanonValue (xmlSchemaValPtr val, + const xmlChar **retValue); +XMLPUBFUN xmlSchemaValPtr XMLCALL + xmlSchemaNewStringValue (xmlSchemaValType type, + const xmlChar *value); +XMLPUBFUN xmlSchemaValPtr XMLCALL + xmlSchemaNewNOTATIONValue (const xmlChar *name, + const xmlChar *ns); + +XMLPUBFUN int XMLCALL + xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x, + xmlSchemaWhitespaceValueType xws, + xmlSchemaValPtr y, + xmlSchemaWhitespaceValueType yws); +XMLPUBFUN xmlSchemaValPtr XMLCALL + xmlSchemaCopyValue (xmlSchemaValPtr val); #ifdef __cplusplus } diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h index 76a9e29..357910e 100644 --- a/include/libxml/xmlversion.h +++ b/include/libxml/xmlversion.h @@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.6.17" +#define LIBXML_DOTTED_VERSION "2.6.18" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 1002003 */ -#define LIBXML_VERSION 20617 +#define LIBXML_VERSION 20618 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "1002003" */ -#define LIBXML_VERSION_STRING "20617" +#define LIBXML_VERSION_STRING "20618" /** * LIBXML_VERSION_EXTRA: * * extra version information, used to show a CVS compilation */ -#define LIBXML_VERSION_EXTRA "-CVS2309" +#define LIBXML_VERSION_EXTRA "-CVS2374" /** * LIBXML_TEST_VERSION: @@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20617); +#define LIBXML_TEST_VERSION xmlCheckVersion(20618); #ifndef VMS #if 0 @@ -54,9 +54,11 @@ void __xmlLoaderErr(void *ctx, const char *msg, const char *filename); #ifdef __GNUC__ #ifdef PIC #ifdef linux +#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) #include "elfgcchack.h" #endif #endif #endif #endif +#endif #endif /* ! __XML_LIBXML_H__ */ diff --git a/libxml.spec.in b/libxml.spec.in index f9823df..481f88e 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -65,22 +65,11 @@ at parse time or later once the document has been modified. # initial test spec. This really doesn't work okay for most tests done. # GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'` -#if [ $GCC_VERSION -eq 32 ] -#then -# PROF_GEN='-fprofile-arcs' -# PROF_USE='-fbranch-probabilities' -#else if [ $GCC_VERSION -eq 33 ] -#then -# PROF_GEN='-fprofile-arcs' -# PROF_USE='-fbranch-probabilities -ftracer' -#else if [ $GCC_VERSION -ge 34 ] then PROF_GEN='-fprofile-generate' PROF_USE='-fprofile-use' fi -#fi -#fi if [ "$PROF_GEN" != "" ] then diff --git a/libxml2.spec b/libxml2.spec index dc194ed..d15f6bf 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -1,6 +1,6 @@ Summary: Library providing XML and HTML support Name: libxml2 -Version: 2.6.17 +Version: 2.6.18 Release: 1 License: MIT Group: Development/Libraries @@ -65,22 +65,11 @@ at parse time or later once the document has been modified. # initial test spec. This really doesn't work okay for most tests done. # GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'` -#if [ $GCC_VERSION -eq 32 ] -#then -# PROF_GEN='-fprofile-arcs' -# PROF_USE='-fbranch-probabilities' -#else if [ $GCC_VERSION -eq 33 ] -#then -# PROF_GEN='-fprofile-arcs' -# PROF_USE='-fbranch-probabilities -ftracer' -#else if [ $GCC_VERSION -ge 34 ] then PROF_GEN='-fprofile-generate' PROF_USE='-fprofile-use' fi -#fi -#fi if [ "$PROF_GEN" != "" ] then @@ -159,8 +148,8 @@ rm -fr %{buildroot} %doc doc/python.html %changelog -* Sun Jan 16 2005 Daniel Veillard <veillard@redhat.com> -- upstream release 2.6.17 see http://xmlsoft.org/news.html +* Sun Mar 13 2005 Daniel Veillard <veillard@redhat.com> +- upstream release 2.6.18 see http://xmlsoft.org/news.html * Thu Jan 2 2003 Daniel Veillard <veillard@redhat.com> - integrated drv_libxml2 xml.sax driver from Stéphane Bidoul @@ -296,11 +296,11 @@ xmlNanoFTPProxy(const char *host, int port, const char *user, static void xmlNanoFTPScanURL(void *ctx, const char *URL) { xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx; - const char *cur = URL; - char buf[XML_NANO_MAX_URLBUF]; - int indx = 0; - int port = 0; + xmlURIPtr uri; + /* + * Clear any existing data from the context + */ if (ctxt->protocol != NULL) { xmlFree(ctxt->protocol); ctxt->protocol = NULL; @@ -314,122 +314,38 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) { ctxt->path = NULL; } if (URL == NULL) return; - buf[indx] = 0; - while ((*cur != 0) && (indx < XML_NANO_MAX_URLBUF - 1)) { - if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { - buf[indx] = 0; - ctxt->protocol = xmlMemStrdup(buf); - indx = 0; - cur += 3; - break; - } - buf[indx++] = *cur++; - } - if (*cur == 0) return; - buf[indx] = 0; - /* allow user@ and user:pass@ forms */ - { - const char *p = strchr(cur, '@'); - if(p) { - while(indx < XML_NANO_MAX_URLBUF-1) { - if(cur[0] == ':' || cur[0] == '@') break; - buf[indx++] = *cur++; - } - buf[indx] = 0; - ctxt->user = xmlMemStrdup(buf); - indx = 0; - if(cur[0] == ':') { - cur++; - while(indx < XML_NANO_MAX_URLBUF-1) { - if(cur[0] == '@') break; - buf[indx++] = *cur++; - } - buf[indx] = 0; - ctxt->passwd = xmlMemStrdup(buf); - indx = 0; - } - cur = p+1; - } - } + uri = xmlParseURI(URL); + if (uri == NULL) + return; - while (indx < XML_NANO_MAX_URLBUF - 1) { - if ((strchr (cur, '[') && !strchr (cur, ']')) || - (!strchr (cur, '[') && strchr (cur, ']'))) { - xmlGenericError (xmlGenericErrorContext, "\nxmlNanoFTPScanURL: %s", - "Syntax Error\n"); - return; + if ((uri->scheme == NULL) || (uri->server == NULL)) { + xmlFreeURI(uri); + return; + } + + ctxt->protocol = xmlMemStrdup(uri->scheme); + ctxt->hostname = xmlMemStrdup(uri->server); + if (uri->path != NULL) + ctxt->path = xmlMemStrdup(uri->path); + else + ctxt->path = xmlMemStrdup("/"); + if (uri->port != 0) + ctxt->port = uri->port; + + if (uri->user != NULL) { + char *cptr; + if ((cptr=strchr(uri->user, ':')) == NULL) + ctxt->user = xmlMemStrdup(uri->user); + else { + ctxt->user = (char *)xmlStrndup((xmlChar *)uri->user, + (cptr - uri->user)); + ctxt->passwd = xmlMemStrdup(cptr+1); } + } - if (cur[0] == '[') { - cur++; - while ((cur[0] != ']') && (indx < XML_NANO_MAX_URLBUF-1)) - buf[indx++] = *cur++; - if (indx >= XML_NANO_MAX_URLBUF-1) { - xmlGenericError(xmlGenericErrorContext, - "\nxmlNanoFTPScanURL: %s", "Syntax Error\n"); - return; - } - - if (!strchr (buf, ':')) { - xmlGenericError (xmlGenericErrorContext, "\nxmlNanoFTPScanURL: %s", - "Use [IPv6]/IPv4 format\n"); - return; - } - - buf[indx] = 0; - ctxt->hostname = xmlMemStrdup (buf); - indx = 0; - cur += 1; - if (cur[0] == ':') { - cur++; - while (*cur >= '0' && *cur <= '9') { - port *= 10; - port += *cur - '0'; - cur++; - } + xmlFreeURI(uri); - if (port != 0) ctxt->port = port; - while ((cur[0] != '/') && (*cur != 0)) - cur++; - } - break; - } - else { /* address is an IPv4 one*/ - if (cur[0] == ':') { - buf[indx] = 0; - ctxt->hostname = xmlMemStrdup (buf); - indx = 0; - cur += 1; - while ((*cur >= '0') && (*cur <= '9')) { - port *= 10; - port += *cur - '0'; - cur++; - } - if (port != 0) ctxt->port = port; - while ((cur[0] != '/') && (*cur != 0)) - cur++; - break; - } - if ((*cur == '/') || (*cur == 0)) { - buf[indx] = 0; - ctxt->hostname = xmlMemStrdup (buf); - indx = 0; - break; - } - } - buf[indx++] = *cur++; - } - if (*cur == 0) - ctxt->path = xmlMemStrdup("/"); - else { - indx = 0; - buf[indx] = 0; - while ((*cur != 0) && (indx < XML_NANO_MAX_URLBUF-1)) - buf[indx++] = *cur++; - buf[indx] = 0; - ctxt->path = xmlMemStrdup(buf); - } } /** @@ -449,10 +365,7 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) { int xmlNanoFTPUpdateURL(void *ctx, const char *URL) { xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx; - const char *cur = URL; - char buf[XML_NANO_MAX_URLBUF]; - int indx = 0; - int port = 0; + xmlURIPtr uri; if (URL == NULL) return(-1); @@ -462,104 +375,37 @@ xmlNanoFTPUpdateURL(void *ctx, const char *URL) { return(-1); if (ctxt->hostname == NULL) return(-1); - buf[indx] = 0; - while ((*cur != 0) && (indx < XML_NANO_MAX_URLBUF-1)) { - if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { - buf[indx] = 0; - if (strcmp(ctxt->protocol, buf)) - return(-1); - indx = 0; - cur += 3; - break; - } - buf[indx++] = *cur++; - } - if (*cur == 0) - return(-1); - - buf[indx] = 0; - while (indx < XML_NANO_MAX_URLBUF-1) { - if ((strchr (cur, '[') && !strchr (cur, ']')) || - (!strchr (cur, '[') && strchr (cur, ']'))) { - xmlGenericError (xmlGenericErrorContext, "\nxmlNanoFTPUpdateURL: %s", - "Syntax Error\n"); - return (-1); - } - if (cur[0] == '[') { - cur++; - while ((cur[0] != ']') && (indx < XML_NANO_MAX_URLBUF-1)) - buf[indx++] = *cur++; + uri = xmlParseURI(URL); + if (uri == NULL) + return(-1); - if (!strchr (buf, ':')) { - xmlGenericError (xmlGenericErrorContext, "\nxmlNanoFTPUpdateURL: %s", - "Use [IPv6]/IPv4 format\n"); - return (-1); - } + if ((uri->scheme == NULL) || (uri->server == NULL)) { + xmlFreeURI(uri); + return(-1); + } + if ((strcmp(ctxt->protocol, uri->scheme)) || + (strcmp(ctxt->hostname, uri->server)) || + ((uri->port != 0) && (ctxt->port != uri->port))) { + xmlFreeURI(uri); + return(-1); + } - buf[indx] = 0; - if (strcmp (ctxt->hostname, buf)) - return (-1); - indx = 0; - cur += 1; - if (cur[0] == ':') { - cur++; - while (*cur >= '0' && *cur <= '9') { - port *= 10; - port += *cur - '0'; - cur++; - } + if (uri->port != 0) + ctxt->port = uri->port; - if (port != ctxt->port) - return (-1); - while ((cur[0] != '/') && (*cur != 0)) - cur++; - } - break; - } - else { - if (cur[0] == ':') { - buf[indx] = 0; - if (strcmp (ctxt->hostname, buf)) - return (-1); - indx = 0; - cur += 1; - while ((*cur >= '0') && (*cur <= '9')) { - port *= 10; - port += *cur - '0'; - cur++; - } - if (port != ctxt->port) - return (-1); - while ((cur[0] != '/') && (*cur != 0)) - cur++; - break; - } - if ((*cur == '/') || (*cur == 0)) { - buf[indx] = 0; - if (strcmp (ctxt->hostname, buf)) - return (-1); - indx = 0; - break; - } - } - buf[indx++] = *cur++; - } if (ctxt->path != NULL) { xmlFree(ctxt->path); ctxt->path = NULL; } - if (*cur == 0) + if (uri->path == NULL) ctxt->path = xmlMemStrdup("/"); - else { - indx = 0; - buf[indx] = 0; - while ((*cur != 0) && (indx < XML_NANO_MAX_URLBUF-1)) - buf[indx++] = *cur++; - buf[indx] = 0; - ctxt->path = xmlMemStrdup(buf); - } + else + ctxt->path = xmlMemStrdup(uri->path); + + xmlFreeURI(uri); + return(0); } @@ -575,105 +421,38 @@ xmlNanoFTPUpdateURL(void *ctx, const char *URL) { void xmlNanoFTPScanProxy(const char *URL) { - const char *cur = URL; - char buf[XML_NANO_MAX_URLBUF]; - int indx = 0; - int port = 0; + xmlURIPtr uri; if (proxy != NULL) { xmlFree(proxy); proxy = NULL; } - if (proxyPort != 0) { - proxyPort = 0; - } + proxyPort = 0; + #ifdef DEBUG_FTP if (URL == NULL) - xmlGenericError(xmlGenericErrorContext, "Removing FTP proxy info\n"); + xmlGenericError(xmlGenericErrorContext, + "Removing FTP proxy info\n"); else - xmlGenericError(xmlGenericErrorContext, "Using FTP proxy %s\n", URL); + xmlGenericError(xmlGenericErrorContext, + "Using FTP proxy %s\n", URL); #endif if (URL == NULL) return; - buf[indx] = 0; - while ((*cur != 0) && (indx < XML_NANO_MAX_URLBUF-1)) { - if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { - buf[indx] = 0; - indx = 0; - cur += 3; - break; - } - buf[indx++] = *cur++; - } - if (*cur == 0) return; - - buf[indx] = 0; - while (indx < XML_NANO_MAX_URLBUF-1) { - if ((strchr (cur, '[') && !strchr (cur, ']')) || - (!strchr (cur, '[') && strchr (cur, ']'))) { - xmlGenericError (xmlGenericErrorContext, "\nxmlNanoFTPScanProxy: %s", - "Syntax error\n"); - return; - } - if (cur[0] == '[') { - cur++; - while ((cur[0] != ']') && (indx < XML_NANO_MAX_URLBUF-1)) - buf[indx++] = *cur++; - if (indx >= XML_NANO_MAX_URLBUF-1) { - xmlGenericError (xmlGenericErrorContext, - "\nxmlNanoFTPScanProxy: %s", "Syntax error\n"); - return; - } - - if (!strchr (buf, ':')) { - xmlGenericError (xmlGenericErrorContext, "\nxmlNanoFTPScanProxy: %s", - "Use [IPv6]/IPv4 format\n"); - return; - } - - buf[indx] = 0; - proxy = xmlMemStrdup (buf); - indx = 0; - cur += 1; - if (cur[0] == ':') { - cur++; - while (*cur >= '0' && *cur <= '9') { - port *= 10; - port += *cur - '0'; - cur++; - } - - if (port != 0) proxyPort = port; - while ((cur[0] != '/') && (*cur != 0)) - cur++; - } - break; - } - else { - if (cur[0] == ':') { - buf[indx] = 0; - proxy = xmlMemStrdup (buf); - indx = 0; - cur += 1; - while ((*cur >= '0') && (*cur <= '9')) { - port *= 10; - port += *cur - '0'; - cur++; - } - if (port != 0) proxyPort = port; - while ((cur[0] != '/') && (*cur != 0)) - cur++; - break; - } - if ((*cur == '/') || (*cur == 0)) { - buf[indx] = 0; - proxy = xmlMemStrdup (buf); - indx = 0; - break; - } - } - buf[indx++] = *cur++; + uri = xmlParseURI(URL); + if ((uri == NULL) || (uri->scheme == NULL) || + (strcmp(uri->scheme, "ftp")) || (uri->server == NULL)) { + __xmlIOErr(XML_FROM_FTP, XML_FTP_URL_SYNTAX, "Syntax Error\n"); + if (uri != NULL) + xmlFreeURI(uri); + return; } + + proxy = xmlMemStrdup(uri->server); + if (uri->port != 0) + proxyPort = uri->port; + + xmlFreeURI(uri); } /** @@ -1489,6 +1268,7 @@ xmlNanoFTPCwd(void *ctx, const char *directory) { int res; if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1); + if (directory == NULL) return 0; /* * Expected response code for CWD: @@ -1537,6 +1317,7 @@ xmlNanoFTPDele(void *ctx, const char *file) { int res; if ((ctxt == NULL) || (ctxt->controlFd < 0) || (file == NULL)) return(-1); + if (file == NULL) return (0); /* * Expected response code for DELE: @@ -1940,6 +1721,7 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, fd_set rfd, efd; struct timeval tv; + if (ctxt == NULL) return (-1); if (filename == NULL) { if (xmlNanoFTPCwd(ctxt, ctxt->path) < 1) return(-1); @@ -2113,6 +1895,7 @@ xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData, fd_set rfd; struct timeval tv; + if (ctxt == NULL) return(-1); if ((filename == NULL) && (ctxt->path == NULL)) return(-1); if (callback == NULL) @@ -2182,7 +1965,8 @@ xmlNanoFTPRead(void *ctx, void *dest, int len) { len = recv(ctxt->dataFd, dest, len, 0); if (len <= 0) { - __xmlIOErr(XML_FROM_FTP, 0, "recv failed"); + if (len < 0) + __xmlIOErr(XML_FROM_FTP, 0, "recv failed"); xmlNanoFTPCloseConnection(ctxt); } #ifdef DEBUG_FTP @@ -268,12 +268,10 @@ xmlNanoHTTPCleanup(void) { static void xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) { - const char *cur = URL; - char buf[4096]; - int indx = 0; - const int indxMax = 4096 - 1; - int port = 0; - + xmlURIPtr uri; + /* + * Clear any existing data from the context + */ if (ctxt->protocol != NULL) { xmlFree(ctxt->protocol); ctxt->protocol = NULL; @@ -287,92 +285,26 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) { ctxt->path = NULL; } if (URL == NULL) return; - buf[indx] = 0; - while ((*cur != 0) && (indx < indxMax)) { - if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { - buf[indx] = 0; - ctxt->protocol = xmlMemStrdup(buf); - indx = 0; - cur += 3; - break; - } - buf[indx++] = *cur++; - } - if (*cur == 0) return; - - buf[indx] = 0; - while (indx < indxMax) { - if ((strchr (cur, '[') && !strchr (cur, ']')) || - (!strchr (cur, '[') && strchr (cur, ']'))) { - __xmlIOErr(XML_FROM_HTTP, XML_HTTP_URL_SYNTAX, - "Syntax Error\n"); - return; - } - - if (cur[0] == '[') { - cur++; - while ((cur[0] != ']') && (indx < indxMax)) - buf[indx++] = *cur++; - - if (!strchr (buf, ':')) { - __xmlIOErr(XML_FROM_HTTP, XML_HTTP_USE_IP, - "Use [IPv6]/IPv4 format\n"); - return; - } - buf[indx] = 0; - ctxt->hostname = xmlMemStrdup (buf); - indx = 0; - cur += 1; - if (cur[0] == ':') { - cur++; - while (*cur >= '0' && *cur <= '9') { - port *= 10; - port += *cur - '0'; - cur++; - } + uri = xmlParseURI(URL); + if (uri == NULL) + return; - if (port != 0) ctxt->port = port; - while ((cur[0] != '/') && (*cur != 0)) - cur++; - } - break; - } - else { - if (cur[0] == ':') { - buf[indx] = 0; - ctxt->hostname = xmlMemStrdup (buf); - indx = 0; - cur += 1; - while ((*cur >= '0') && (*cur <= '9')) { - port *= 10; - port += *cur - '0'; - cur++; - } - if (port != 0) ctxt->port = port; - while ((cur[0] != '/') && (*cur != 0)) - cur++; - break; - } - if ((*cur == '/') || (*cur == 0)) { - buf[indx] = 0; - ctxt->hostname = xmlMemStrdup (buf); - indx = 0; - break; - } - } - buf[indx++] = *cur++; + if ((uri->scheme == NULL) || (uri->server == NULL)) { + xmlFreeURI(uri); + return; } - if (*cur == 0) - ctxt->path = xmlMemStrdup("/"); - else { - indx = 0; - buf[indx] = 0; - while ((*cur != 0) && (indx < indxMax)) - buf[indx++] = *cur++; - buf[indx] = 0; - ctxt->path = xmlMemStrdup(buf); - } + + ctxt->protocol = xmlMemStrdup(uri->scheme); + ctxt->hostname = xmlMemStrdup(uri->server); + if (uri->path != NULL) + ctxt->path = xmlMemStrdup(uri->path); + else + ctxt->path = xmlMemStrdup("/"); + if (uri->port != 0) + ctxt->port = uri->port; + + xmlFreeURI(uri); } /** @@ -387,19 +319,14 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) { void xmlNanoHTTPScanProxy(const char *URL) { - const char *cur = URL; - char buf[4096]; - int indx = 0; - const int indxMax = 4096 - 1; - int port = 0; + xmlURIPtr uri; if (proxy != NULL) { xmlFree(proxy); proxy = NULL; } - if (proxyPort != 0) { - proxyPort = 0; - } + proxyPort = 0; + #ifdef DEBUG_HTTP if (URL == NULL) xmlGenericError(xmlGenericErrorContext, @@ -409,80 +336,21 @@ xmlNanoHTTPScanProxy(const char *URL) { "Using HTTP proxy %s\n", URL); #endif if (URL == NULL) return; - buf[indx] = 0; - while ((*cur != 0) && (indx < indxMax)) { - if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { - buf[indx] = 0; - indx = 0; - cur += 3; - break; - } - buf[indx++] = *cur++; - } - if (*cur == 0) return; - - buf[indx] = 0; - while (indx < indxMax) { - if ((strchr (cur, '[') && !strchr (cur, ']')) || - (!strchr (cur, '[') && strchr (cur, ']'))) { - __xmlIOErr(XML_FROM_HTTP, XML_HTTP_URL_SYNTAX, "Syntax Error\n"); - return; - } - - if (cur[0] == '[') { - cur++; - while ((cur[0] != ']') && (indx < indxMax)) - buf[indx++] = *cur++; - - if (!strchr (buf, ':')) { - __xmlIOErr(XML_FROM_HTTP, XML_HTTP_USE_IP, - "Use [IPv6]/IPv4 format\n"); - return; - } - - buf[indx] = 0; - proxy = xmlMemStrdup (buf); - indx = 0; - cur += 1; - if (cur[0] == ':') { - cur++; - while (*cur >= '0' && *cur <= '9') { - port *= 10; - port += *cur - '0'; - cur++; - } - if (port != 0) proxyPort = port; - while ((cur[0] != '/') && (*cur != 0)) - cur ++; - } - break; - } - else { - if (cur[0] == ':') { - buf[indx] = 0; - proxy = xmlMemStrdup (buf); - indx = 0; - cur += 1; - while ((*cur >= '0') && (*cur <= '9')) { - port *= 10; - port += *cur - '0'; - cur++; - } - if (port != 0) proxyPort = port; - while ((cur[0] != '/') && (*cur != 0)) - cur++; - break; - } - if ((*cur == '/') || (*cur == 0)) { - buf[indx] = 0; - proxy = xmlMemStrdup (buf); - indx = 0; - break; - } - } - buf[indx++] = *cur++; + uri = xmlParseURI(URL); + if ((uri == NULL) || (uri->scheme == NULL) || + (strcmp(uri->scheme, "http")) || (uri->server == NULL)) { + __xmlIOErr(XML_FROM_HTTP, XML_HTTP_URL_SYNTAX, "Syntax Error\n"); + if (uri != NULL) + xmlFreeURI(uri); + return; } + + proxy = xmlMemStrdup(uri->server); + if (uri->port != 0) + proxyPort = uri->port; + + xmlFreeURI(uri); } /** @@ -1551,6 +1419,7 @@ xmlNanoHTTPFetch(const char *URL, const char *filename, char **contentType) { int fd; int len; + if (filename == NULL) return(-1); ctxt = xmlNanoHTTPOpen(URL, contentType); if (ctxt == NULL) return(-1); @@ -1595,7 +1464,7 @@ xmlNanoHTTPSave(void *ctxt, const char *filename) { int fd; int len; - if (ctxt == NULL) return(-1); + if ((ctxt == NULL) || (filename == NULL)) return(-1); if (!strcmp(filename, "-")) fd = 0; @@ -410,7 +410,6 @@ xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; - ctxt->errNo = error; if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) schannel = ctxt->sax->serror; __xmlRaiseError(schannel, @@ -642,7 +641,7 @@ xmlAddDefAttrs(xmlParserCtxtPtr ctxt, const xmlChar *prefix; if (ctxt->attsDefault == NULL) { - ctxt->attsDefault = xmlHashCreate(10); + ctxt->attsDefault = xmlHashCreateDict(10, ctxt->dict); if (ctxt->attsDefault == NULL) goto mem_error; } @@ -729,7 +728,7 @@ xmlAddSpecialAttr(xmlParserCtxtPtr ctxt, int type) { if (ctxt->attsSpecial == NULL) { - ctxt->attsSpecial = xmlHashCreate(10); + ctxt->attsSpecial = xmlHashCreateDict(10, ctxt->dict); if (ctxt->attsSpecial == NULL) goto mem_error; } @@ -1389,7 +1388,7 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) { int cur; do { cur = CUR; - while (IS_BLANK(cur)) { /* CHECKED tstblanks.xml */ + while (IS_BLANK_CH(cur)) { /* CHECKED tstblanks.xml */ NEXT; cur = CUR; res++; @@ -3189,6 +3188,7 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { int nbchar = 0; int line = ctxt->input->line; int col = ctxt->input->col; + int ccol; SHRINK; GROW; @@ -3233,15 +3233,18 @@ get_more_space: } return; } + get_more: + ccol = ctxt->input->col; while (((*in > ']') && (*in <= 0x7F)) || ((*in > '&') && (*in < '<')) || ((*in > '<') && (*in < ']')) || ((*in >= 0x20) && (*in < '&')) || (*in == 0x09)) { in++; - ctxt->input->col++; + ccol++; } + ctxt->input->col = ccol; if (*in == 0xA) { ctxt->input->line++; ctxt->input->col = 1; in++; @@ -3471,42 +3474,35 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { } /** - * xmlParseComment: + * xmlParseCommentComplex: * @ctxt: an XML parser context + * @buf: the already parsed part of the buffer + * @len: number of bytes filles in the buffer + * @size: allocated size of the buffer * * Skip an XML (SGML) comment <!-- .... --> * The spec says that "For compatibility, the string "--" (double-hyphen) * must not occur within comments. " + * This is the slow routine in case the accelerator for ascii didn't work * * [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->' */ -void -xmlParseComment(xmlParserCtxtPtr ctxt) { - xmlChar *buf = NULL; - int len; - int size = XML_PARSER_BUFFER_SIZE; +static void +xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf, int len, int size) { int q, ql; int r, rl; int cur, l; - xmlParserInputState state; xmlParserInputPtr input = ctxt->input; int count = 0; - /* - * Check that there is a comment right here. - */ - if ((RAW != '<') || (NXT(1) != '!') || - (NXT(2) != '-') || (NXT(3) != '-')) return; - - state = ctxt->instate; - ctxt->instate = XML_PARSER_COMMENT; - SHRINK; - SKIP(4); - buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); if (buf == NULL) { - xmlErrMemory(ctxt, NULL); - ctxt->instate = state; - return; + len = 0; + size = XML_PARSER_BUFFER_SIZE; + buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); + if (buf == NULL) { + xmlErrMemory(ctxt, NULL); + return; + } } q = CUR_CHAR(ql); if (q == 0) @@ -3519,7 +3515,6 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { cur = CUR_CHAR(l); if (cur == 0) goto not_terminated; - len = 0; while (IS_CHAR(cur) && /* checked */ ((cur != '>') || (r != '-') || (q != '-'))) { @@ -3533,7 +3528,6 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { if (new_buf == NULL) { xmlFree (buf); xmlErrMemory(ctxt, NULL); - ctxt->instate = state; return; } buf = new_buf; @@ -3573,13 +3567,164 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { ctxt->sax->comment(ctxt->userData, buf); xmlFree(buf); } - ctxt->instate = state; return; not_terminated: xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, "Comment not terminated\n", NULL); xmlFree(buf); } +/** + * xmlParseComment: + * @ctxt: an XML parser context + * + * Skip an XML (SGML) comment <!-- .... --> + * The spec says that "For compatibility, the string "--" (double-hyphen) + * must not occur within comments. " + * + * [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->' + */ +void +xmlParseComment(xmlParserCtxtPtr ctxt) { + xmlChar *buf = NULL; + int size = XML_PARSER_BUFFER_SIZE; + int len = 0; + xmlParserInputState state; + const xmlChar *in; + int nbchar = 0, ccol; + + /* + * Check that there is a comment right here. + */ + if ((RAW != '<') || (NXT(1) != '!') || + (NXT(2) != '-') || (NXT(3) != '-')) return; + + state = ctxt->instate; + ctxt->instate = XML_PARSER_COMMENT; + SKIP(4); + SHRINK; + GROW; + + /* + * Accelerated common case where input don't need to be + * modified before passing it to the handler. + */ + in = ctxt->input->cur; + do { + if (*in == 0xA) { + ctxt->input->line++; ctxt->input->col = 1; + in++; + while (*in == 0xA) { + ctxt->input->line++; ctxt->input->col = 1; + in++; + } + } +get_more: + ccol = ctxt->input->col; + while (((*in > '-') && (*in <= 0x7F)) || + ((*in >= 0x20) && (*in < '-')) || + (*in == 0x09)) { + in++; + ccol++; + } + ctxt->input->col = ccol; + if (*in == 0xA) { + ctxt->input->line++; ctxt->input->col = 1; + in++; + while (*in == 0xA) { + ctxt->input->line++; ctxt->input->col = 1; + in++; + } + goto get_more; + } + nbchar = in - ctxt->input->cur; + /* + * save current set of data + */ + if (nbchar > 0) { + if ((ctxt->sax != NULL) && + (ctxt->sax->comment != NULL)) { + if (buf == NULL) { + if ((*in == '-') && (in[1] == '-')) + size = nbchar + 1; + else + size = XML_PARSER_BUFFER_SIZE + nbchar; + buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); + if (buf == NULL) { + xmlErrMemory(ctxt, NULL); + ctxt->instate = state; + return; + } + len = 0; + } else if (len + nbchar + 1 >= size) { + xmlChar *new_buf; + size += len + nbchar + XML_PARSER_BUFFER_SIZE; + new_buf = (xmlChar *) xmlRealloc(buf, + size * sizeof(xmlChar)); + if (new_buf == NULL) { + xmlFree (buf); + xmlErrMemory(ctxt, NULL); + ctxt->instate = state; + return; + } + buf = new_buf; + } + memcpy(&buf[len], ctxt->input->cur, nbchar); + len += nbchar; + buf[len] = 0; + } + } + ctxt->input->cur = in; + if (*in == 0xA) + + if (*in == 0xD) { + in++; + if (*in == 0xA) { + ctxt->input->cur = in; + in++; + ctxt->input->line++; ctxt->input->col = 1; + continue; /* while */ + } + in--; + } + SHRINK; + GROW; + in = ctxt->input->cur; + if (*in == '-') { + if (in[1] == '-') { + if (in[2] == '>') { + SKIP(3); + if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) && + (!ctxt->disableSAX)) { + if (buf != NULL) + ctxt->sax->comment(ctxt->userData, buf); + else + ctxt->sax->comment(ctxt->userData, BAD_CAST ""); + } + if (buf != NULL) + xmlFree(buf); + ctxt->instate = state; + return; + } + if (buf != NULL) + xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, + "Comment not terminated \n<!--%.50s\n", + buf); + else + xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, + "Comment not terminated \n", NULL); + in++; + ctxt->input->col++; + } + in++; + ctxt->input->col++; + goto get_more; + } + } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09)); + xmlParseCommentComplex(ctxt, buf, len, size); + ctxt->instate = state; + return; +} + /** * xmlParsePITarget: @@ -3920,7 +4065,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { xmlChar *orig = NULL; int skipped; - GROW; + /* GROW; done in the caller */ if (CMP8(CUR_PTR, '<', '!', 'E', 'N', 'T', 'I', 'T', 'Y')) { xmlParserInputPtr input = ctxt->input; SHRINK; @@ -4593,7 +4738,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { NULL); } NEXT; - ret = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_PCDATA); + ret = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_PCDATA); if (RAW == '*') { ret->ocur = XML_ELEMENT_CONTENT_MULT; NEXT; @@ -4601,22 +4746,22 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { return(ret); } if ((RAW == '(') || (RAW == '|')) { - ret = cur = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_PCDATA); + ret = cur = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_PCDATA); if (ret == NULL) return(NULL); } while (RAW == '|') { NEXT; if (elem == NULL) { - ret = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_OR); + ret = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_OR); if (ret == NULL) return(NULL); ret->c1 = cur; if (cur != NULL) cur->parent = ret; cur = ret; } else { - n = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_OR); + n = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_OR); if (n == NULL) return(NULL); - n->c1 = xmlNewElementContent(elem, XML_ELEMENT_CONTENT_ELEMENT); + n->c1 = xmlNewDocElementContent(ctxt->myDoc, elem, XML_ELEMENT_CONTENT_ELEMENT); if (n->c1 != NULL) n->c1->parent = n; cur->c2 = n; @@ -4629,7 +4774,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { if (elem == NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, "xmlParseElementMixedContentDecl : Name expected\n"); - xmlFreeElementContent(cur); + xmlFreeDocElementContent(ctxt->myDoc, cur); return(NULL); } SKIP_BLANKS; @@ -4637,7 +4782,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { } if ((RAW == ')') && (NXT(1) == '*')) { if (elem != NULL) { - cur->c2 = xmlNewElementContent(elem, + cur->c2 = xmlNewDocElementContent(ctxt->myDoc, elem, XML_ELEMENT_CONTENT_ELEMENT); if (cur->c2 != NULL) cur->c2->parent = cur; @@ -4650,7 +4795,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { } SKIP(2); } else { - xmlFreeElementContent(ret); + xmlFreeDocElementContent(ctxt->myDoc, ret); xmlFatalErr(ctxt, XML_ERR_MIXED_NOT_STARTED, NULL); return(NULL); } @@ -4715,7 +4860,7 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { xmlFatalErr(ctxt, XML_ERR_ELEMCONTENT_NOT_STARTED, NULL); return(NULL); } - cur = ret = xmlNewElementContent(elem, XML_ELEMENT_CONTENT_ELEMENT); + cur = ret = xmlNewDocElementContent(ctxt->myDoc, elem, XML_ELEMENT_CONTENT_ELEMENT); if (cur == NULL) { xmlErrMemory(ctxt, NULL); return(NULL); @@ -4752,18 +4897,18 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { "xmlParseElementChildrenContentDecl : '%c' expected\n", type); if ((last != NULL) && (last != ret)) - xmlFreeElementContent(last); + xmlFreeDocElementContent(ctxt->myDoc, last); if (ret != NULL) - xmlFreeElementContent(ret); + xmlFreeDocElementContent(ctxt->myDoc, ret); return(NULL); } NEXT; - op = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_SEQ); + op = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_SEQ); if (op == NULL) { if ((last != NULL) && (last != ret)) - xmlFreeElementContent(last); - xmlFreeElementContent(ret); + xmlFreeDocElementContent(ctxt->myDoc, last); + xmlFreeDocElementContent(ctxt->myDoc, ret); return(NULL); } if (last == NULL) { @@ -4792,19 +4937,19 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { "xmlParseElementChildrenContentDecl : '%c' expected\n", type); if ((last != NULL) && (last != ret)) - xmlFreeElementContent(last); + xmlFreeDocElementContent(ctxt->myDoc, last); if (ret != NULL) - xmlFreeElementContent(ret); + xmlFreeDocElementContent(ctxt->myDoc, ret); return(NULL); } NEXT; - op = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_OR); + op = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_OR); if (op == NULL) { if ((last != NULL) && (last != ret)) - xmlFreeElementContent(last); + xmlFreeDocElementContent(ctxt->myDoc, last); if (ret != NULL) - xmlFreeElementContent(ret); + xmlFreeDocElementContent(ctxt->myDoc, ret); return(NULL); } if (last == NULL) { @@ -4825,7 +4970,7 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { } else { xmlFatalErr(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED, NULL); if (ret != NULL) - xmlFreeElementContent(ret); + xmlFreeDocElementContent(ctxt->myDoc, ret); return(NULL); } GROW; @@ -4843,10 +4988,10 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { if (elem == NULL) { xmlFatalErr(ctxt, XML_ERR_ELEMCONTENT_NOT_STARTED, NULL); if (ret != NULL) - xmlFreeElementContent(ret); + xmlFreeDocElementContent(ctxt->myDoc, ret); return(NULL); } - last = xmlNewElementContent(elem, XML_ELEMENT_CONTENT_ELEMENT); + last = xmlNewDocElementContent(ctxt->myDoc, elem, XML_ELEMENT_CONTENT_ELEMENT); if (RAW == '?') { last->ocur = XML_ELEMENT_CONTENT_OPT; NEXT; @@ -5004,7 +5149,7 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { int ret = -1; xmlElementContentPtr content = NULL; - GROW; + /* GROW; done in the caller */ if (CMP9(CUR_PTR, '<', '!', 'E', 'L', 'E', 'M', 'E', 'N', 'T')) { xmlParserInputPtr input = ctxt->input; @@ -5067,6 +5212,9 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { if (RAW != '>') { xmlFatalErr(ctxt, XML_ERR_GT_REQUIRED, NULL); + if (content != NULL) { + xmlFreeDocElementContent(ctxt->myDoc, content); + } } else { if (input != ctxt->input) { xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY, @@ -5075,12 +5223,23 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { NEXT; if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && - (ctxt->sax->elementDecl != NULL)) + (ctxt->sax->elementDecl != NULL)) { + if (content != NULL) + content->parent = NULL; ctxt->sax->elementDecl(ctxt->userData, name, ret, content); - } - if (content != NULL) { - xmlFreeElementContent(content); + if ((content != NULL) && (content->parent == NULL)) { + /* + * this is a trick: if xmlAddElementDecl is called, + * instead of copying the full tree it is plugged directly + * if called from the parser. Avoid duplicating the + * interfaces or change the API/ABI + */ + xmlFreeDocElementContent(ctxt->myDoc, content); + } + } else if (content != NULL) { + xmlFreeDocElementContent(ctxt->myDoc, content); + } } } return(ret); @@ -5247,12 +5406,32 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { void xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) { GROW; - xmlParseElementDecl(ctxt); - xmlParseAttributeListDecl(ctxt); - xmlParseEntityDecl(ctxt); - xmlParseNotationDecl(ctxt); - xmlParsePI(ctxt); - xmlParseComment(ctxt); + if (CUR == '<') { + if (NXT(1) == '!') { + switch (NXT(2)) { + case 'E': + if (NXT(3) == 'L') + xmlParseElementDecl(ctxt); + else if (NXT(3) == 'N') + xmlParseEntityDecl(ctxt); + break; + case 'A': + xmlParseAttributeListDecl(ctxt); + break; + case 'N': + xmlParseNotationDecl(ctxt); + break; + case '-': + xmlParseComment(ctxt); + break; + default: + /* there is an error but it will be detected later */ + break; + } + } else if (NXT(1) == '?') { + xmlParsePI(ctxt); + } + } /* * This is only for internal subset. On external entities, * the replacement is done before parsing stage @@ -9093,16 +9272,16 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { /* * Get the 4 first bytes and decode the charset * if enc != XML_CHAR_ENCODING_NONE - * plug some encoding conversion routines. + * plug some encoding conversion routines, + * else xmlSwitchEncoding will set to (default) + * UTF8. */ start[0] = RAW; start[1] = NXT(1); start[2] = NXT(2); start[3] = NXT(3); enc = xmlDetectCharEncoding(start, 4); - if (enc != XML_CHAR_ENCODING_NONE) { - xmlSwitchEncoding(ctxt, enc); - } + xmlSwitchEncoding(ctxt, enc); break; } @@ -9681,8 +9860,12 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { break; } } - if (!found) - break; + if (!found) { +#if 0 + fprintf(stderr, "unfinished comment\n"); +#endif + break; /* for */ + } continue; } } @@ -9695,6 +9878,10 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { continue; } if (buf[base] == ']') { +#if 0 + fprintf(stderr, "%c%c%c%c: ", buf[base], + buf[base + 1], buf[base + 2], buf[base + 3]); +#endif if ((unsigned int) base +1 >= ctxt->input->buf->buffer->use) break; @@ -9703,20 +9890,34 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { base++; continue; } - for (i = 0; + for (i = 1; (unsigned int) base + i < ctxt->input->buf->buffer->use; i++) { - if (buf[base + i] == '>') + if (buf[base + i] == '>') { +#if 0 + fprintf(stderr, "found\n"); +#endif goto found_end_int_subset; + } + if (!IS_BLANK_CH(buf[base + i])) { +#if 0 + fprintf(stderr, "not found\n"); +#endif + goto not_end_of_int_subset; + } } +#if 0 + fprintf(stderr, "end of stream\n"); +#endif break; + } +not_end_of_int_subset: + continue; /* for */ } /* * We didn't found the end of the Internal subset */ - if (quote == 0) - ctxt->checkIndex = base; #ifdef DEBUG_PUSH if (next == 0) xmlGenericError(xmlGenericErrorContext, @@ -10038,8 +10239,14 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, inputPush(ctxt, inputStream); - if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && - (ctxt->input->buf != NULL)) { + /* + * If the caller didn't provide an initial 'chunk' for determining + * the encoding, we set the context to XML_CHAR_ENCODING_NONE so + * that it can be automatically determined later + */ + if ((size == 0) || (chunk == NULL)) { + ctxt->charset = XML_CHAR_ENCODING_NONE; + } else if ((ctxt->input != NULL) && (ctxt->input->buf != NULL)) { int base = ctxt->input->base - ctxt->input->buf->buffer->content; int cur = ctxt->input->cur - ctxt->input->base; @@ -12158,6 +12365,7 @@ xmlCleanupParser(void) { #ifdef LIBXML_CATALOG_ENABLED xmlCatalogCleanup(); #endif + xmlDictCleanup(); xmlCleanupInputCallbacks(); #ifdef LIBXML_OUTPUT_ENABLED xmlCleanupOutputCallbacks(); @@ -11,6 +11,18 @@ * daniel@veillard.com */ +/* + * TODO: + * - compilation flags to check for specific syntaxes + * using flags of xmlPatterncompile() + * - making clear how pattern starting with / or . need to be handled, + * currently push(NULL, NULL) means a reset of the streaming context + * and indicating we are on / (the document node), probably need + * something similar for . + * - get rid of the "compile" starting with lowercase + * - get rid of the Strdup/Strndup in case of dictionary + */ + #define IN_LIBXML #include "libxml.h" @@ -25,9 +37,48 @@ #ifdef LIBXML_PATTERN_ENABLED +/* #define DEBUG_STREAMING */ +#define SUPPORT_IDC + #define ERROR(a, b, c, d) #define ERROR5(a, b, c, d, e) +#define XML_STREAM_STEP_DESC 1 +#define XML_STREAM_STEP_FINAL 2 +#define XML_STREAM_STEP_ROOT 4 +#define XML_STREAM_STEP_ATTR 8 + +#define XML_PATTERN_NOTPATTERN 1 + +typedef struct _xmlStreamStep xmlStreamStep; +typedef xmlStreamStep *xmlStreamStepPtr; +struct _xmlStreamStep { + int flags; /* properties of that step */ + const xmlChar *name; /* first string value if NULL accept all */ + const xmlChar *ns; /* second string value */ +}; + +typedef struct _xmlStreamComp xmlStreamComp; +typedef xmlStreamComp *xmlStreamCompPtr; +struct _xmlStreamComp { + xmlDict *dict; /* the dictionnary if any */ + int nbStep; /* number of steps in the automata */ + int maxStep; /* allocated number of steps */ + xmlStreamStepPtr steps; /* the array of steps */ +}; + +struct _xmlStreamCtxt { + struct _xmlStreamCtxt *next;/* link to next sub pattern if | */ + xmlStreamCompPtr comp; /* the compiled stream */ + int nbState; /* number of state in the automata */ + int maxState; /* allocated number of state */ + int level; /* how deep are we ? */ + int *states; /* the array of step indexes */ + int flags; /* validation options */ +}; + +static void xmlFreeStreamComp(xmlStreamCompPtr comp); + /* * Types are private: */ @@ -45,6 +96,21 @@ typedef enum { } xmlPatOp; +typedef struct _xmlStepState xmlStepState; +typedef xmlStepState *xmlStepStatePtr; +struct _xmlStepState { + int step; + xmlNodePtr node; +}; + +typedef struct _xmlStepStates xmlStepStates; +typedef xmlStepStates *xmlStepStatesPtr; +struct _xmlStepStates { + int nbstates; + int maxstates; + xmlStepStatePtr states; +}; + typedef struct _xmlStepOp xmlStepOp; typedef xmlStepOp *xmlStepOpPtr; struct _xmlStepOp { @@ -53,14 +119,20 @@ struct _xmlStepOp { const xmlChar *value2; }; +#define PAT_FROM_ROOT 1 +#define PAT_FROM_CUR 2 + struct _xmlPattern { void *data; /* the associated template */ - struct _xmlPattern *next; /* siblings */ + xmlDictPtr dict; /* the optional dictionnary */ + struct _xmlPattern *next; /* next pattern if | is used */ const xmlChar *pattern; /* the pattern */ + int flags; /* flags */ int nbStep; int maxStep; xmlStepOpPtr steps; /* ops for computation */ + xmlStreamCompPtr stream; /* the streaming data if any */ }; typedef struct _xmlPatParserContext xmlPatParserContext; @@ -124,18 +196,27 @@ xmlFreePattern(xmlPatternPtr comp) { if (comp == NULL) return; + if (comp->next != NULL) + xmlFreePattern(comp->next); + if (comp->stream != NULL) + xmlFreeStreamComp(comp->stream); if (comp->pattern != NULL) xmlFree((xmlChar *)comp->pattern); if (comp->steps != NULL) { - for (i = 0;i < comp->nbStep;i++) { - op = &comp->steps[i]; - if (op->value != NULL) - xmlFree((xmlChar *) op->value); - if (op->value2 != NULL) - xmlFree((xmlChar *) op->value2); + if (comp->dict == NULL) { + for (i = 0;i < comp->nbStep;i++) { + op = &comp->steps[i]; + if (op->value != NULL) + xmlFree((xmlChar *) op->value); + if (op->value2 != NULL) + xmlFree((xmlChar *) op->value2); + } } xmlFree(comp->steps); } + if (comp->dict != NULL) + xmlDictFree(comp->dict); + memset(comp, -1, sizeof(xmlPattern)); xmlFree(comp); } @@ -153,6 +234,7 @@ xmlFreePatternList(xmlPatternPtr comp) { while (comp != NULL) { cur = comp; comp = comp->next; + cur->next = NULL; xmlFreePattern(cur); } } @@ -161,7 +243,8 @@ xmlFreePatternList(xmlPatternPtr comp) { * xmlNewPatParserContext: * @pattern: the pattern context * @dict: the inherited dictionnary or NULL - * @namespaces: the prefix definitions, array of [URI, prefix] or NULL + * @namespaces: the prefix definitions, array of [URI, prefix] terminated + * with [NULL, NULL] or NULL if no namespace is used * * Create a new XML pattern parser context * @@ -284,9 +367,19 @@ xsltSwapTopPattern(xmlPatternPtr comp) { */ static int xmlReversePattern(xmlPatternPtr comp) { - int i = 0; - int j = comp->nbStep - 1; - + int i, j; + + /* + * remove the leading // for //a or .//a + */ + if ((comp->nbStep > 0) && (comp->steps[0].op == XML_OP_ANCESTOR)) { + for (i = 0, j = 1;j < comp->nbStep;i++,j++) { + comp->steps[i].value = comp->steps[j].value; + comp->steps[i].value2 = comp->steps[j].value2; + comp->steps[i].op = comp->steps[j].op; + } + comp->nbStep--; + } if (comp->nbStep >= comp->maxStep) { xmlStepOpPtr temp; temp = (xmlStepOpPtr) xmlRealloc(comp->steps, comp->maxStep * 2 * @@ -299,6 +392,8 @@ xmlReversePattern(xmlPatternPtr comp) { comp->steps = temp; comp->maxStep *= 2; } + i = 0; + j = comp->nbStep - 1; while (j > i) { register const xmlChar *tmp; register xmlPatOp op; @@ -326,6 +421,31 @@ xmlReversePattern(xmlPatternPtr comp) { * * ************************************************************************/ +static int +xmlPatPushState(xmlStepStates *states, int step, xmlNodePtr node) { + if ((states->states == NULL) || (states->maxstates <= 0)) { + states->maxstates = 4; + states->nbstates = 0; + states->states = xmlMalloc(4 * sizeof(xmlStepState)); + } + else if (states->maxstates <= states->nbstates) { + xmlStepState *tmp; + + tmp = (xmlStepStatePtr) xmlRealloc(states->states, + 2 * states->maxstates * sizeof(xmlStepState)); + if (tmp == NULL) + return(-1); + states->states = tmp; + states->maxstates *= 2; + } + states->states[states->nbstates].step = step; + states->states[states->nbstates++].node = node; +#if 0 + fprintf(stderr, "Push: %d, %s\n", step, node->name); +#endif + return(0); +} + /** * xmlPatMatch: * @comp: the precompiled pattern @@ -339,40 +459,46 @@ static int xmlPatMatch(xmlPatternPtr comp, xmlNodePtr node) { int i; xmlStepOpPtr step; + xmlStepStates states = {0, 0, NULL}; /* // may require backtrack */ if ((comp == NULL) || (node == NULL)) return(-1); - for (i = 0;i < comp->nbStep;i++) { + i = 0; +restart: + for (;i < comp->nbStep;i++) { step = &comp->steps[i]; switch (step->op) { case XML_OP_END: - return(1); + goto found; case XML_OP_ROOT: + if (node->type == XML_NAMESPACE_DECL) + goto rollback; + node = node->parent; if ((node->type == XML_DOCUMENT_NODE) || #ifdef LIBXML_DOCB_ENABLED (node->type == XML_DOCB_DOCUMENT_NODE) || #endif (node->type == XML_HTML_DOCUMENT_NODE)) continue; - return(0); + goto rollback; case XML_OP_ELEM: if (node->type != XML_ELEMENT_NODE) - return(0); + goto rollback; if (step->value == NULL) continue; if (step->value[0] != node->name[0]) - return(0); + goto rollback; if (!xmlStrEqual(step->value, node->name)) - return(0); + goto rollback; /* Namespace test */ if (node->ns == NULL) { if (step->value2 != NULL) - return(0); + goto rollback; } else if (node->ns->href != NULL) { if (step->value2 == NULL) - return(0); + goto rollback; if (!xmlStrEqual(step->value2, node->ns->href)) - return(0); + goto rollback; } continue; case XML_OP_CHILD: { @@ -384,7 +510,7 @@ xmlPatMatch(xmlPatternPtr comp, xmlNodePtr node) { (node->type != XML_DOCB_DOCUMENT_NODE) && #endif (node->type != XML_HTML_DOCUMENT_NODE)) - return(0); + goto rollback; lst = node->children; @@ -399,24 +525,24 @@ xmlPatMatch(xmlPatternPtr comp, xmlNodePtr node) { if (lst != NULL) continue; } - return(0); + goto rollback; } case XML_OP_ATTR: if (node->type != XML_ATTRIBUTE_NODE) - return(0); + goto rollback; if (step->value != NULL) { if (step->value[0] != node->name[0]) - return(0); + goto rollback; if (!xmlStrEqual(step->value, node->name)) - return(0); + goto rollback; } /* Namespace test */ if (node->ns == NULL) { if (step->value2 != NULL) - return(0); + goto rollback; } else if (step->value2 != NULL) { if (!xmlStrEqual(step->value2, node->ns->href)) - return(0); + goto rollback; } continue; case XML_OP_PARENT: @@ -426,25 +552,25 @@ xmlPatMatch(xmlPatternPtr comp, xmlNodePtr node) { (node->type == XML_DOCB_DOCUMENT_NODE) || #endif (node->type == XML_NAMESPACE_DECL)) - return(0); + goto rollback; node = node->parent; if (node == NULL) - return(0); + goto rollback; if (step->value == NULL) continue; if (step->value[0] != node->name[0]) - return(0); + goto rollback; if (!xmlStrEqual(step->value, node->name)) - return(0); + goto rollback; /* Namespace test */ if (node->ns == NULL) { if (step->value2 != NULL) - return(0); + goto rollback; } else if (node->ns->href != NULL) { if (step->value2 == NULL) - return(0); + goto rollback; if (!xmlStrEqual(step->value2, node->ns->href)) - return(0); + goto rollback; } continue; case XML_OP_ANCESTOR: @@ -453,25 +579,25 @@ xmlPatMatch(xmlPatternPtr comp, xmlNodePtr node) { i++; step = &comp->steps[i]; if (step->op == XML_OP_ROOT) - return(1); + goto found; if (step->op != XML_OP_ELEM) - return(0); + goto rollback; if (step->value == NULL) return(-1); } if (node == NULL) - return(0); + goto rollback; if ((node->type == XML_DOCUMENT_NODE) || (node->type == XML_HTML_DOCUMENT_NODE) || #ifdef LIBXML_DOCB_ENABLED (node->type == XML_DOCB_DOCUMENT_NODE) || #endif (node->type == XML_NAMESPACE_DECL)) - return(0); + goto rollback; node = node->parent; while (node != NULL) { if (node == NULL) - return(0); + goto rollback; if ((node->type == XML_ELEMENT_NODE) && (step->value[0] == node->name[0]) && (xmlStrEqual(step->value, node->name))) { @@ -488,28 +614,56 @@ xmlPatMatch(xmlPatternPtr comp, xmlNodePtr node) { node = node->parent; } if (node == NULL) - return(0); + goto rollback; + /* + * prepare a potential rollback from here + * for ancestors of that node. + */ + if (step->op == XML_OP_ANCESTOR) + xmlPatPushState(&states, i, node); + else + xmlPatPushState(&states, i - 1, node); continue; case XML_OP_NS: if (node->type != XML_ELEMENT_NODE) - return(0); + goto rollback; if (node->ns == NULL) { if (step->value != NULL) - return(0); + goto rollback; } else if (node->ns->href != NULL) { if (step->value == NULL) - return(0); + goto rollback; if (!xmlStrEqual(step->value, node->ns->href)) - return(0); + goto rollback; } break; case XML_OP_ALL: if (node->type != XML_ELEMENT_NODE) - return(0); + goto rollback; break; } } +found: + if (states.states != NULL) { + /* Free the rollback states */ + xmlFree(states.states); + } return(1); +rollback: + /* got an error try to rollback */ + if (states.states == NULL) + return(0); + if (states.nbstates <= 0) { + xmlFree(states.states); + return(0); + } + states.nbstates--; + i = states.states[states.nbstates].step; + node = states.states[states.nbstates].node; +#if 0 + fprintf(stderr, "Pop: %d, %s\n", i, node->name); +#endif + goto restart; } /************************************************************************ @@ -708,6 +862,78 @@ xmlPatScanQName(xmlPatParserContextPtr ctxt, xmlChar **prefix) { #endif /** + * xmlCompileAttributeTest: + * @ctxt: the compilation context + * + * Compile an attribute test. + */ +static void +xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) { + xmlChar *token = NULL; + xmlChar *name = NULL; + xmlChar *URL = NULL; + + name = xmlPatScanNCName(ctxt); + if (name == NULL) { + if (CUR == '*') { + PUSH(XML_OP_ATTR, NULL, NULL); + } else { + ERROR(NULL, NULL, NULL, + "xmlCompileAttributeTest : Name expected\n"); + ctxt->error = 1; + } + return; + } + if (CUR == ':') { + int i; + xmlChar *prefix = name; + + NEXT; + /* + * This is a namespace match + */ + token = xmlPatScanName(ctxt); + for (i = 0;i < ctxt->nb_namespaces;i++) { + if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) { + URL = xmlStrdup(ctxt->namespaces[2 * i]); + break; + } + } + if (i >= ctxt->nb_namespaces) { + ERROR5(NULL, NULL, NULL, + "xmlCompileAttributeTest : no namespace bound to prefix %s\n", + prefix); + ctxt->error = 1; + goto error; + } + + xmlFree(prefix); + if (token == NULL) { + if (CUR == '*') { + NEXT; + PUSH(XML_OP_ATTR, NULL, URL); + } else { + ERROR(NULL, NULL, NULL, + "xmlCompileAttributeTest : Name expected\n"); + ctxt->error = 1; + goto error; + } + } else { + PUSH(XML_OP_ATTR, token, URL); + } + } else { + PUSH(XML_OP_ATTR, name, NULL); + } + return; +error: + if (URL != NULL) + xmlFree(URL); + if (token != NULL) + xmlFree(token); +} + + +/** * xmlCompileStepPattern: * @ctxt: the compilation context * @@ -722,7 +948,6 @@ static void xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { xmlChar *token = NULL; xmlChar *name = NULL; - const xmlChar *URI = NULL; xmlChar *URL = NULL; SKIP_BLANKS; @@ -737,6 +962,12 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { NEXT; PUSH(XML_OP_ALL, NULL, NULL); return; + } else if (CUR == '@') { + NEXT; + xmlCompileAttributeTest(ctxt); + if (ctxt->error != 0) + goto error; + return; } else { ERROR(NULL, NULL, NULL, "xmlCompileStepPattern : Name expected\n"); @@ -749,21 +980,24 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { NEXT; if (CUR != ':') { xmlChar *prefix = name; - xmlNsPtr ns; + int i; /* * This is a namespace match */ token = xmlPatScanName(ctxt); - ns = xmlSearchNs(NULL, ctxt->elem, prefix); - if (ns == NULL) { + for (i = 0;i < ctxt->nb_namespaces;i++) { + if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) { + URL = xmlStrdup(ctxt->namespaces[2 * i]); + break; + } + } + if (i >= ctxt->nb_namespaces) { ERROR5(NULL, NULL, NULL, - "xmlCompileStepPattern : no namespace bound to prefix %s\n", - prefix); + "xmlCompileStepPattern : no namespace bound to prefix %s\n", + prefix); ctxt->error = 1; goto error; - } else { - URL = xmlStrdup(ns->href); } xmlFree(prefix); if (token == NULL) { @@ -781,61 +1015,80 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { } } else { NEXT; - if (xmlStrEqual(token, (const xmlChar *) "child")) { - xmlFree(token); - token = xmlPatScanName(ctxt); - if (token == NULL) { - if (CUR == '*') { - NEXT; - PUSH(XML_OP_ALL, token, NULL); - return; - } else { - ERROR(NULL, NULL, NULL, + if (xmlStrEqual(name, (const xmlChar *) "child")) { + xmlFree(name); + name = xmlPatScanName(ctxt); + if (name == NULL) { + if (CUR == '*') { + NEXT; + PUSH(XML_OP_ALL, NULL, NULL); + return; + } else { + ERROR(NULL, NULL, NULL, "xmlCompileStepPattern : QName expected\n"); - ctxt->error = 1; - goto error; + ctxt->error = 1; + goto error; } } - TODO - /* URI = xsltGetQNameURI(ctxt->elem, &token); */ - if (token == NULL) { - ctxt->error = 1; - goto error; - } else { - name = xmlStrdup(token); - if (URI != NULL) - URL = xmlStrdup(URI); - } - PUSH(XML_OP_CHILD, name, URL); - } else if (xmlStrEqual(token, (const xmlChar *) "attribute")) { - xmlFree(token); - token = xmlPatScanName(ctxt); - if (token == NULL) { - ERROR(NULL, NULL, NULL, - "xmlCompileStepPattern : QName expected\n"); - ctxt->error = 1; - goto error; - } - TODO - /* URI = xsltGetQNameURI(ctxt->elem, &token); */ - if (token == NULL) { - ctxt->error = 1; + if (CUR == ':') { + xmlChar *prefix = name; + int i; + + NEXT; + /* + * This is a namespace match + */ + token = xmlPatScanName(ctxt); + for (i = 0;i < ctxt->nb_namespaces;i++) { + if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) { + URL = xmlStrdup(ctxt->namespaces[2 * i]); + break; + } + } + if (i >= ctxt->nb_namespaces) { + ERROR5(NULL, NULL, NULL, + "xmlCompileStepPattern : no namespace bound to prefix %s\n", + prefix); + ctxt->error = 1; + goto error; + } + xmlFree(prefix); + if (token == NULL) { + if (CUR == '*') { + NEXT; + PUSH(XML_OP_NS, URL, NULL); + } else { + ERROR(NULL, NULL, NULL, + "xmlCompileStepPattern : Name expected\n"); + ctxt->error = 1; + goto error; + } + } else { + PUSH(XML_OP_CHILD, token, URL); + } + } else + PUSH(XML_OP_CHILD, name, NULL); + return; + } else if (xmlStrEqual(name, (const xmlChar *) "attribute")) { + xmlFree(name); + name = NULL; + xmlCompileAttributeTest(ctxt); + if (ctxt->error != 0) goto error; - } else { - name = xmlStrdup(token); - if (URI != NULL) - URL = xmlStrdup(URI); - } - PUSH(XML_OP_ATTR, name, URL); + return; } else { ERROR(NULL, NULL, NULL, "xmlCompileStepPattern : 'child' or 'attribute' expected\n"); ctxt->error = 1; goto error; } - xmlFree(token); + xmlFree(name); } } else if (CUR == '*') { + if (name != NULL) { + ctxt->error = 1; + goto error; + } NEXT; PUSH(XML_OP_ALL, token, NULL); } else { @@ -847,6 +1100,8 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { } return; error: + if (URL != NULL) + xmlFree(URL); if (token != NULL) xmlFree(token); if (name != NULL) @@ -865,24 +1120,33 @@ error: static void xmlCompilePathPattern(xmlPatParserContextPtr ctxt) { SKIP_BLANKS; + if (CUR == '/') { + ctxt->comp->flags |= PAT_FROM_ROOT; + } else if (CUR == '.') { + ctxt->comp->flags |= PAT_FROM_CUR; + } if ((CUR == '/') && (NXT(1) == '/')) { - /* - * since we reverse the query - * a leading // can be safely ignored - */ + PUSH(XML_OP_ANCESTOR, NULL, NULL); NEXT; NEXT; } else if ((CUR == '.') && (NXT(1) == '/') && (NXT(2) == '/')) { - /* - * a leading .// can be safely ignored - */ + PUSH(XML_OP_ANCESTOR, NULL, NULL); NEXT; NEXT; NEXT; } if (CUR == '@') { - TODO + NEXT; + xmlCompileAttributeTest(ctxt); + SKIP_BLANKS; + if ((CUR != 0) || (CUR == '|')) { + xmlCompileStepPattern(ctxt); + } } else { + if (CUR == '/') { + PUSH(XML_OP_ROOT, NULL, NULL); + NEXT; + } xmlCompileStepPattern(ctxt); SKIP_BLANKS; while (CUR == '/') { @@ -902,9 +1166,676 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) { } } } + if (CUR != 0) { + ERROR5(NULL, NULL, NULL, + "Failed to compile pattern %s\n", ctxt->base); + ctxt->error = 1; + } error: return; } + +/************************************************************************ + * * + * The streaming code * + * * + ************************************************************************/ + +#ifdef DEBUG_STREAMING +static void +xmlDebugStreamComp(xmlStreamCompPtr stream) { + int i; + + if (stream == NULL) { + printf("Stream: NULL\n"); + return; + } + printf("Stream: %d steps\n", stream->nbStep); + for (i = 0;i < stream->nbStep;i++) { + if (stream->steps[i].ns != NULL) { + printf("{%s}", stream->steps[i].ns); + } + if (stream->steps[i].name == NULL) { + printf("* "); + } else { + printf("%s ", stream->steps[i].name); + } + if (stream->steps[i].flags & XML_STREAM_STEP_ROOT) + printf("root "); + if (stream->steps[i].flags & XML_STREAM_STEP_DESC) + printf("// "); + if (stream->steps[i].flags & XML_STREAM_STEP_FINAL) + printf("final "); + printf("\n"); + } +} +static void +xmlDebugStreamCtxt(xmlStreamCtxtPtr ctxt, int match) { + int i; + + if (ctxt == NULL) { + printf("Stream: NULL\n"); + return; + } + printf("Stream: level %d, %d states: ", ctxt->level, ctxt->nbState); + if (match) + printf("matches\n"); + else + printf("\n"); + for (i = 0;i < ctxt->nbState;i++) { + if (ctxt->states[2 * i] < 0) + printf(" %d: free\n", i); + else { + printf(" %d: step %d, level %d", i, ctxt->states[2 * i], + ctxt->states[(2 * i) + 1]); + if (ctxt->comp->steps[ctxt->states[2 * i]].flags & + XML_STREAM_STEP_DESC) + printf(" //\n"); + else + printf("\n"); + } + } +} +#endif +/** + * xmlNewStreamComp: + * @size: the number of expected steps + * + * build a new compiled pattern for streaming + * + * Returns the new structure or NULL in case of error. + */ +static xmlStreamCompPtr +xmlNewStreamComp(int size) { + xmlStreamCompPtr cur; + + if (size < 4) + size = 4; + + cur = (xmlStreamCompPtr) xmlMalloc(sizeof(xmlStreamComp)); + if (cur == NULL) { + ERROR(NULL, NULL, NULL, + "xmlNewStreamComp: malloc failed\n"); + return(NULL); + } + memset(cur, 0, sizeof(xmlStreamComp)); + cur->steps = (xmlStreamStepPtr) xmlMalloc(size * sizeof(xmlStreamStep)); + if (cur->steps == NULL) { + xmlFree(cur); + ERROR(NULL, NULL, NULL, + "xmlNewStreamComp: malloc failed\n"); + return(NULL); + } + cur->nbStep = 0; + cur->maxStep = size; + return(cur); +} + +/** + * xmlFreeStreamComp: + * @comp: the compiled pattern for streaming + * + * Free the compiled pattern for streaming + */ +static void +xmlFreeStreamComp(xmlStreamCompPtr comp) { + if (comp != NULL) { + if (comp->steps != NULL) + xmlFree(comp->steps); + if (comp->dict != NULL) + xmlDictFree(comp->dict); + xmlFree(comp); + } +} + +/** + * xmlStreamCompAddStep: + * @comp: the compiled pattern for streaming + * @name: the first string, the name, or NULL for * + * @ns: the second step, the namespace name + * @flags: the flags for that step + * + * Add a new step to the compiled pattern + * + * Returns -1 in case of error or the step index if successful + */ +static int +xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, + const xmlChar *ns, int flags) { + xmlStreamStepPtr cur; + + if (comp->nbStep >= comp->maxStep) { + cur = (xmlStreamStepPtr) xmlRealloc(comp->steps, + comp->maxStep * 2 * sizeof(xmlStreamStep)); + if (cur == NULL) { + ERROR(NULL, NULL, NULL, + "xmlNewStreamComp: malloc failed\n"); + return(-1); + } + comp->steps = cur; + comp->maxStep *= 2; + } + cur = &comp->steps[comp->nbStep++]; + cur->flags = flags; + cur->name = name; + cur->ns = ns; + return(comp->nbStep - 1); +} + +/** + * xmlStreamCompile: + * @comp: the precompiled pattern + * + * Tries to stream compile a pattern + * + * Returns -1 in case of failure and 0 in case of success. + */ +static int +xmlStreamCompile(xmlPatternPtr comp) { + xmlStreamCompPtr stream; + int i, s = 0, root = 0, flags = 0; + + if ((comp == NULL) || (comp->steps == NULL)) + return(-1); + /* + * special case for . + */ + if ((comp->nbStep == 1) && + (comp->steps[0].op == XML_OP_ELEM) && + (comp->steps[0].value == NULL) && + (comp->steps[0].value2 == NULL)) { + stream = xmlNewStreamComp(0); + if (stream == NULL) + return(-1); + comp->stream = stream; + return(0); + } + + stream = xmlNewStreamComp((comp->nbStep / 2) + 1); + if (stream == NULL) + return(-1); + if (comp->dict != NULL) { + stream->dict = comp->dict; + xmlDictReference(stream->dict); + } + + /* + * Skip leading ./ on relative paths + */ + i = 0; + while ((comp->flags & PAT_FROM_CUR) && (comp->nbStep > i + 2) && + (comp->steps[i].op == XML_OP_ELEM) && + (comp->steps[i].value == NULL) && + (comp->steps[i].value2 == NULL) && + (comp->steps[i + 1].op == XML_OP_PARENT)) { + i += 2; + } + for (;i < comp->nbStep;i++) { + switch (comp->steps[i].op) { + case XML_OP_END: + break; + case XML_OP_ROOT: + if (i != 0) + goto error; + root = 1; + break; + case XML_OP_NS: + s = xmlStreamCompAddStep(stream, NULL, + comp->steps[i].value, flags); + flags = 0; + if (s < 0) + goto error; + break; + case XML_OP_ATTR: + flags |= XML_STREAM_STEP_ATTR; + s = xmlStreamCompAddStep(stream, comp->steps[i].value, + comp->steps[i].value2, flags); + flags = 0; + if (s < 0) + goto error; + break; + case XML_OP_ELEM: + if ((comp->steps[i].value == NULL) && + (comp->steps[i].value2 == NULL) && + (comp->nbStep > i + 2) && + (comp->steps[i + 1].op == XML_OP_PARENT)) { + i++; + continue; + } + case XML_OP_CHILD: + s = xmlStreamCompAddStep(stream, comp->steps[i].value, + comp->steps[i].value2, flags); + flags = 0; + if (s < 0) + goto error; + break; + case XML_OP_ALL: + s = xmlStreamCompAddStep(stream, NULL, NULL, flags); + flags = 0; + if (s < 0) + goto error; + break; + case XML_OP_PARENT: + if ((comp->nbStep > i + 1) && + (comp->steps[i + 1].op == XML_OP_ELEM) && + (comp->steps[i + 1].value == NULL) && + (comp->steps[i + 1].value2 == NULL)) { + i++; + continue; + } + break; + case XML_OP_ANCESTOR: + flags |= XML_STREAM_STEP_DESC; + break; + } + } + stream->steps[s].flags |= XML_STREAM_STEP_FINAL; + if (root) + stream->steps[0].flags |= XML_STREAM_STEP_ROOT; +#ifdef DEBUG_STREAMING + xmlDebugStreamComp(stream); +#endif + comp->stream = stream; + return(0); +error: + xmlFreeStreamComp(stream); + return(0); +} + +/** + * xmlNewStreamCtxt: + * @size: the number of expected states + * + * build a new stream context + * + * Returns the new structure or NULL in case of error. + */ +static xmlStreamCtxtPtr +xmlNewStreamCtxt(xmlStreamCompPtr stream) { + xmlStreamCtxtPtr cur; + + cur = (xmlStreamCtxtPtr) xmlMalloc(sizeof(xmlStreamCtxt)); + if (cur == NULL) { + ERROR(NULL, NULL, NULL, + "xmlNewStreamCtxt: malloc failed\n"); + return(NULL); + } + memset(cur, 0, sizeof(xmlStreamCtxt)); + cur->states = (int *) xmlMalloc(4 * 2 * sizeof(int)); + if (cur->states == NULL) { + xmlFree(cur); + ERROR(NULL, NULL, NULL, + "xmlNewStreamCtxt: malloc failed\n"); + return(NULL); + } + cur->nbState = 0; + cur->maxState = 4; + cur->level = 0; + cur->comp = stream; + return(cur); +} + +/** + * xmlFreeStreamCtxt: + * @stream: the stream context + * + * Free the stream context + */ +void +xmlFreeStreamCtxt(xmlStreamCtxtPtr stream) { + xmlStreamCtxtPtr next; + + while (stream != NULL) { + next = stream->next; + if (stream->states != NULL) + xmlFree(stream->states); + xmlFree(stream); + stream = next; + } +} + +/** + * xmlStreamCtxtAddState: + * @comp: the stream context + * @idx: the step index for that streaming state + * + * Add a new state to the stream context + * + * Returns -1 in case of error or the state index if successful + */ +static int +xmlStreamCtxtAddState(xmlStreamCtxtPtr comp, int idx, int level) { + int i; + for (i = 0;i < comp->nbState;i++) { + if (comp->states[2 * i] < 0) { + comp->states[2 * i] = idx; + comp->states[2 * i + 1] = level; + return(i); + } + } + if (comp->nbState >= comp->maxState) { + int *cur; + + cur = (int *) xmlRealloc(comp->states, + comp->maxState * 4 * sizeof(int)); + if (cur == NULL) { + ERROR(NULL, NULL, NULL, + "xmlNewStreamCtxt: malloc failed\n"); + return(-1); + } + comp->states = cur; + comp->maxState *= 2; + } + comp->states[2 * comp->nbState] = idx; + comp->states[2 * comp->nbState++ + 1] = level; + return(comp->nbState - 1); +} + +/** + * xmlStreamPushInternal: + * @stream: the stream context + * @name: the current name + * @ns: the namespace name + * @nodeType: the type of the node + * + * push new data onto the stream. NOTE: if the call xmlPatterncompile() + * indicated a dictionnary, then strings for name and ns will be expected + * to come from the dictionary. + * Both @name and @ns being NULL means the / i.e. the root of the document. + * This can also act as a reset. + * + * Returns: -1 in case of error, 1 if the current state in the stream is a + * match and 0 otherwise. + */ +static int +xmlStreamPushInternal(xmlStreamCtxtPtr stream, + const xmlChar *name, const xmlChar *ns, + xmlElementType nodeType) { + int ret = 0, err = 0, tmp, i, m, match, step, desc, final; + xmlStreamCompPtr comp; +#ifdef DEBUG_STREAMING + xmlStreamCtxtPtr orig = stream; +#endif + + if ((stream == NULL) || (stream->nbState < 0)) + return(-1); + + while (stream != NULL) { + comp = stream->comp; + if ((name == NULL) && (ns == NULL)) { + stream->nbState = 0; + stream->level = 0; + if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) { + tmp = xmlStreamCtxtAddState(stream, 0, 0); + if (tmp < 0) + err++; + if (comp->nbStep == 0) + ret = 1; + stream = stream->next; + continue; /* while */ + } + stream = stream->next; + continue; /* while */ + } + + /* + * Fast check for ".". + */ + if (comp->nbStep == 0) { + if (nodeType == XML_ELEMENT_NODE) + ret = 1; + goto stream_next; + } + + /* + * Check evolution of existing states + */ + m = stream->nbState; + for (i = 0;i < m;i++) { + match = 0; + step = stream->states[2 * i]; + /* dead states */ + if (step < 0) continue; + /* skip new states just added */ + if (stream->states[(2 * i) + 1] > stream->level) + continue; + /* skip continuations */ + desc = comp->steps[step].flags & XML_STREAM_STEP_DESC; + if ((stream->states[(2 * i) + 1] < stream->level) && (!desc)) + continue; + + /* discard old states */ + /* something needed about old level discarded */ + + /* + * Check for correct node-type. + */ + if ((comp->steps[step].flags & XML_STREAM_STEP_ATTR) && + (nodeType != XML_ATTRIBUTE_NODE)) + continue; + + if (comp->dict) { + if (comp->steps[step].name == NULL) { + if (comp->steps[step].ns == NULL) + match = 1; + else + match = (comp->steps[step].ns == ns); + } else { + match = ((comp->steps[step].name == name) && + (comp->steps[step].ns == ns)); + } + } else { + if (comp->steps[step].name == NULL) { + if (comp->steps[step].ns == NULL) + match = 1; + else + match = xmlStrEqual(comp->steps[step].ns, ns); + } else { + match = ((xmlStrEqual(comp->steps[step].name, name)) && + (xmlStrEqual(comp->steps[step].ns, ns))); + } + } + if (match) { + final = comp->steps[step].flags & XML_STREAM_STEP_FINAL; + if (desc) { + if (final) { + ret = 1; + } else { + /* descending match create a new state */ + xmlStreamCtxtAddState(stream, step + 1, + stream->level + 1); + } + } else { + if (final) { + ret = 1; + } else { + xmlStreamCtxtAddState(stream, step + 1, + stream->level + 1); + } + } + } + } + + /* + * Check creating a new state. + */ + stream->level++; + + /* + * Check the start only if this is a "desc" evaluation + * or if we are at the first level of evaluation. + */ + desc = comp->steps[0].flags & XML_STREAM_STEP_DESC; + if ( ((comp->steps[0].flags & XML_STREAM_STEP_ROOT) == 0) && + ( ((stream->flags & XML_PATTERN_NOTPATTERN) == 0) || + ( (desc || (stream->level == 1)) ) + ) + ) { + +/* +#ifdef SUPPORT_IDC + + + if ((desc || (stream->level == 1)) && + (!(comp->steps[0].flags & XML_STREAM_STEP_ROOT))) { + + * + * Workaround for missing "self::node()" on "@foo". + * + if (comp->steps[0].flags & XML_STREAM_STEP_ATTR) { + xmlStreamCtxtAddState(stream, 0, stream->level); + goto stream_next; + } +#else + + if (!(comp->steps[0].flags & XML_STREAM_STEP_ROOT)) { +#endif + */ + match = 0; + if (comp->dict) { + if (comp->steps[0].name == NULL) { + if (comp->steps[0].ns == NULL) + match = 1; + else + match = (comp->steps[0].ns == ns); + } else { + if (stream->flags & XML_PATTERN_NOTPATTERN) { + /* + * Workaround for missing "self::node() on "foo". + */ + if (!desc) { + xmlStreamCtxtAddState(stream, 0, stream->level); + goto stream_next; + } else { + match = ((comp->steps[0].name == name) && + (comp->steps[0].ns == ns)); + } + } else { + match = ((comp->steps[0].name == name) && + (comp->steps[0].ns == ns)); + } + } + } else { + if (comp->steps[0].name == NULL) { + if (comp->steps[0].ns == NULL) + match = 1; + else + match = xmlStrEqual(comp->steps[0].ns, ns); + } else { + if (stream->flags & XML_PATTERN_NOTPATTERN) { + /* + * Workaround for missing "self::node() on "foo". + */ + if (!desc) { + xmlStreamCtxtAddState(stream, 0, stream->level); + goto stream_next; + } else { + match = ((xmlStrEqual(comp->steps[0].name, name)) && + (xmlStrEqual(comp->steps[0].ns, ns))); + } + } else { + match = ((xmlStrEqual(comp->steps[0].name, name)) && + (xmlStrEqual(comp->steps[0].ns, ns))); + } + } + } + if (match) { + if (comp->steps[0].flags & XML_STREAM_STEP_FINAL) + ret = 1; + else + xmlStreamCtxtAddState(stream, 1, stream->level); + } + } +stream_next: + stream = stream->next; + } /* while stream != NULL */ + + if (err > 0) + ret = -1; +#ifdef DEBUG_STREAMING + xmlDebugStreamCtxt(orig, ret); +#endif + return(ret); +} + +/** + * xmlStreamPush: + * @stream: the stream context + * @name: the current name + * @ns: the namespace name + * + * push new data onto the stream. NOTE: if the call xmlPatterncompile() + * indicated a dictionnary, then strings for name and ns will be expected + * to come from the dictionary. + * Both @name and @ns being NULL means the / i.e. the root of the document. + * This can also act as a reset. + * + * Returns: -1 in case of error, 1 if the current state in the stream is a + * match and 0 otherwise. + */ +int +xmlStreamPush(xmlStreamCtxtPtr stream, + const xmlChar *name, const xmlChar *ns) { + return (xmlStreamPushInternal(stream, name, ns, XML_ELEMENT_NODE)); +} + +/** +* xmlStreamPushAttr: +* @stream: the stream context +* @name: the current name +* @ns: the namespace name +* +* push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() +* indicated a dictionnary, then strings for name and ns will be expected +* to come from the dictionary. +* Both @name and @ns being NULL means the / i.e. the root of the document. +* This can also act as a reset. +* +* Returns: -1 in case of error, 1 if the current state in the stream is a +* match and 0 otherwise. +*/ +int +xmlStreamPushAttr(xmlStreamCtxtPtr stream, + const xmlChar *name, const xmlChar *ns) { + return (xmlStreamPushInternal(stream, name, ns, XML_ATTRIBUTE_NODE)); +} + +/** + * xmlStreamPop: + * @stream: the stream context + * + * push one level from the stream. + * + * Returns: -1 in case of error, 0 otherwise. + */ +int +xmlStreamPop(xmlStreamCtxtPtr stream) { + int i, m; + int ret; + + if (stream == NULL) + return(-1); + ret = 0; + while (stream != NULL) { + stream->level--; + if (stream->level < 0) + ret = -1; + + /* + * Check evolution of existing states + */ + m = stream->nbState; + for (i = 0;i < m;i++) { + if (stream->states[(2 * i)] < 0) break; + /* discard obsoleted states */ + if (stream->states[(2 * i) + 1] > stream->level) + stream->states[(2 * i)] = -1; + } + stream = stream->next; + } + return(0); +} + /************************************************************************ * * * The public interfaces * @@ -926,24 +1857,85 @@ xmlPatternPtr xmlPatterncompile(const xmlChar *pattern, xmlDict *dict, int flags ATTRIBUTE_UNUSED, const xmlChar **namespaces) { - xmlPatternPtr ret = NULL; + xmlPatternPtr ret = NULL, cur; xmlPatParserContextPtr ctxt = NULL; + const xmlChar *or, *start; + xmlChar *tmp = NULL; + int type = 0; + int streamable = 1; + + if (pattern == NULL) + return(NULL); - ctxt = xmlNewPatParserContext(pattern, dict, namespaces); - if (ctxt == NULL) goto error; - ret = xmlNewPattern(); - if (ret == NULL) goto error; - ctxt->comp = ret; + start = pattern; + or = start; + while (*or != 0) { + tmp = NULL; + while ((*or != 0) && (*or != '|')) or++; + if (*or == 0) + ctxt = xmlNewPatParserContext(start, dict, namespaces); + else { + tmp = xmlStrndup(start, or - start); + if (tmp != NULL) { + ctxt = xmlNewPatParserContext(tmp, dict, namespaces); + } + or++; + } + if (ctxt == NULL) goto error; + cur = xmlNewPattern(); + if (cur == NULL) goto error; + if (ret == NULL) + ret = cur; + else { + cur->next = ret->next; + ret->next = cur; + } + cur->flags = flags; + ctxt->comp = cur; - xmlCompilePathPattern(ctxt); - xmlFreePatParserContext(ctxt); + xmlCompilePathPattern(ctxt); + if (ctxt->error != 0) + goto error; + xmlFreePatParserContext(ctxt); + + + if (streamable) { + if (type == 0) { + type = cur->flags & (PAT_FROM_ROOT | PAT_FROM_CUR); + } else if (type == PAT_FROM_ROOT) { + if (cur->flags & PAT_FROM_CUR) + streamable = 0; + } else if (type == PAT_FROM_CUR) { + if (cur->flags & PAT_FROM_ROOT) + streamable = 0; + } + } + if (streamable) + xmlStreamCompile(cur); + if (xmlReversePattern(cur) < 0) + goto error; + if (tmp != NULL) { + xmlFree(tmp); + tmp = NULL; + } + start = or; + } + if (streamable == 0) { + cur = ret; + while (cur != NULL) { + if (cur->stream != NULL) { + xmlFreeStreamComp(cur->stream); + cur->stream = NULL; + } + cur = cur->next; + } + } - if (xmlReversePattern(ret) < 0) - goto error; return(ret); error: if (ctxt != NULL) xmlFreePatParserContext(ctxt); if (ret != NULL) xmlFreePattern(ret); + if (tmp != NULL) xmlFree(tmp); return(NULL); } @@ -959,9 +1951,128 @@ error: int xmlPatternMatch(xmlPatternPtr comp, xmlNodePtr node) { + int ret = 0; + if ((comp == NULL) || (node == NULL)) return(-1); - return(xmlPatMatch(comp, node)); + + while (comp != NULL) { + ret = xmlPatMatch(comp, node); + if (ret != 0) + return(ret); + comp = comp->next; + } + return(ret); +} + +/** + * xmlPatternGetStreamCtxt: + * @comp: the precompiled pattern + * + * Get a streaming context for that pattern + * Use xmlFreeStreamCtxt to free the context. + * + * Returns a pointer to the context or NULL in case of failure + */ +xmlStreamCtxtPtr +xmlPatternGetStreamCtxt(xmlPatternPtr comp) +{ + xmlStreamCtxtPtr ret = NULL, cur; + + if ((comp == NULL) || (comp->stream == NULL)) + return(NULL); + + while (comp != NULL) { + if (comp->stream == NULL) + goto failed; + cur = xmlNewStreamCtxt(comp->stream); + if (cur == NULL) + goto failed; + if (ret == NULL) + ret = cur; + else { + cur->next = ret->next; + ret->next = cur; + } + cur->flags = comp->flags; + comp = comp->next; + } + return(ret); +failed: + xmlFreeStreamCtxt(ret); + return(NULL); +} + +/** + * xmlPatternStreamable: + * @comp: the precompiled pattern + * + * Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() + * should work. + * + * Returns 1 if streamable, 0 if not and -1 in case of error. + */ +int +xmlPatternStreamable(xmlPatternPtr comp) { + if (comp == NULL) + return(-1); + while (comp != NULL) { + if (comp->stream == NULL) + return(0); + comp = comp->next; + } + return(1); +} + +/** + * xmlPatternMaxDepth: + * @comp: the precompiled pattern + * + * Check the maximum depth reachable by a pattern + * + * Returns -2 if no limit (using //), otherwise the depth, + * and -1 in case of error + */ +int +xmlPatternMaxDepth(xmlPatternPtr comp) { + int ret = 0, i; + if (comp == NULL) + return(-1); + while (comp != NULL) { + if (comp->stream == NULL) + return(-1); + for (i = 0;i < comp->stream->nbStep;i++) + if (comp->stream->steps[i].flags & XML_STREAM_STEP_DESC) + return(-2); + if (comp->stream->nbStep > ret) + ret = comp->stream->nbStep; + comp = comp->next; + } + return(ret); + +} + +/** + * xmlPatternFromRoot: + * @comp: the precompiled pattern + * + * Check if the pattern must be looked at from the root. + * + * Returns 1 if true, 0 if false and -1 in case of error + */ +int +xmlPatternFromRoot(xmlPatternPtr comp) { + if (comp == NULL) + return(-1); + while (comp != NULL) { + if (comp->stream == NULL) + return(-1); + if (comp->flags & PAT_FROM_ROOT) + return(1); + comp = comp->next; + } + return(0); + } #endif /* LIBXML_PATTERN_ENABLED */ diff --git a/python/Makefile.in b/python/Makefile.in index e1d33cd..4464fa4 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -163,7 +163,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -186,6 +185,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ diff --git a/python/generator.py b/python/generator.py index 0b09b9a..8add0a9 100755 --- a/python/generator.py +++ b/python/generator.py @@ -6,13 +6,16 @@ functions = {} enums = {} # { enumType: { enumConstant: enumValue } } +import os import sys import string -if len(sys.argv) > 1: - srcPref = sys.argv[1] + '/' +if __name__ == "__main__": + # launched as a script + srcPref = os.path.dirname(sys.argv[0]) else: - srcPref = '' + # imported + srcPref = os.path.dirname(__file__) ####################################################################### # @@ -341,6 +344,8 @@ def skip_function(name): # the next function is defined in libxml.c if name == "xmlRelaxNGFreeValidCtxt": return 1 + if name == "xmlFreeValidCtxt": + return 1 # # Those are skipped because the Const version is used of the bindings # instead. @@ -596,14 +601,14 @@ def buildStubs(): global unknown_types try: - f = open(srcPref + "libxml2-api.xml") + f = open(os.path.join(srcPref,"libxml2-api.xml")) data = f.read() (parser, target) = getparser() parser.feed(data) parser.close() except IOError, msg: try: - f = open(srcPref + "../doc/libxml2-api.xml") + f = open(os.path.join(srcPref,"..","doc","libxml2-api.xml")) data = f.read() (parser, target) = getparser() parser.feed(data) @@ -617,7 +622,7 @@ def buildStubs(): py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject") try: - f = open(srcPref + "libxml2-python-api.xml") + f = open(os.path.join(srcPref,"libxml2-python-api.xml")) data = f.read() (parser, target) = getparser() parser.feed(data) diff --git a/python/libxml.c b/python/libxml.c index ae1a0f4..b520994 100644 --- a/python/libxml.c +++ b/python/libxml.c @@ -1858,6 +1858,31 @@ libxml_xmlSetValidErrors(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) return (py_retval); } + +PyObject * +libxml_xmlFreeValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + xmlValidCtxtPtr cur; + xmlValidCtxtPyCtxtPtr pyCtxt; + PyObject *pyobj_cur; + + if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeValidCtxt", &pyobj_cur)) + return(NULL); + cur = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_cur); + + pyCtxt = (xmlValidCtxtPyCtxtPtr)(cur->userData); + if (pyCtxt != NULL) + { + Py_XDECREF(pyCtxt->error); + Py_XDECREF(pyCtxt->warn); + Py_XDECREF(pyCtxt->arg); + xmlFree(pyCtxt); + } + + xmlFreeValidCtxt(cur); + Py_INCREF(Py_None); + return(Py_None); +} + /************************************************************************ * * * Per xmlTextReader error handler * @@ -3618,6 +3643,7 @@ static PyMethodDef libxmlMethods[] = { {(char *) "doc", libxml_doc, METH_VARARGS, NULL}, {(char *) "xmlNewNode", libxml_xmlNewNode, METH_VARARGS, NULL}, {(char *)"xmlSetValidErrors", libxml_xmlSetValidErrors, METH_VARARGS, NULL}, + {(char *)"xmlFreeValidCtxt", libxml_xmlFreeValidCtxt, METH_VARARGS, NULL}, #ifdef LIBXML_OUTPUT_ENABLED {(char *) "serializeNode", libxml_serializeNode, METH_VARARGS, NULL}, {(char *) "saveNodeTo", libxml_saveNodeTo, METH_VARARGS, NULL}, diff --git a/python/libxml2-py.c b/python/libxml2-py.c index e6602a4..b704cd1 100644 --- a/python/libxml2-py.c +++ b/python/libxml2-py.c @@ -2866,6 +2866,25 @@ libxml_xmlUCSIsLimbu(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * +libxml_xmlRemoveID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; + xmlDocPtr doc; + PyObject *pyobj_doc; + xmlAttrPtr attr; + PyObject *pyobj_attr; + + if (!PyArg_ParseTuple(args, (char *)"OO:xmlRemoveID", &pyobj_doc, &pyobj_attr)) + return(NULL); + doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc); + attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr); + + c_retval = xmlRemoveID(doc, attr); + py_retval = libxml_intWrap((int) c_retval); + return(py_retval); +} + +PyObject * libxml_xmlNewDocPI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; xmlNodePtr c_retval; @@ -3669,25 +3688,6 @@ libxml_xmlErrorGetMessage(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(py_retval); } -PyObject * -libxml_xmlRemoveID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - int c_retval; - xmlDocPtr doc; - PyObject *pyobj_doc; - xmlAttrPtr attr; - PyObject *pyobj_attr; - - if (!PyArg_ParseTuple(args, (char *)"OO:xmlRemoveID", &pyobj_doc, &pyobj_attr)) - return(NULL); - doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc); - attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr); - - c_retval = xmlRemoveID(doc, attr); - py_retval = libxml_intWrap((int) c_retval); - return(py_retval); -} - #ifdef LIBXML_HTML_ENABLED #endif /* LIBXML_HTML_ENABLED */ #ifdef LIBXML_XPATH_ENABLED @@ -3986,6 +3986,20 @@ libxml_xmlRegexpExec(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { #endif /* LIBXML_REGEXP_ENABLED */ PyObject * +libxml_xmlUCSIsCatPe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; + int code; + + if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPe", &code)) + return(NULL); + + c_retval = xmlUCSIsCatPe(code); + py_retval = libxml_intWrap((int) c_retval); + return(py_retval); +} + +PyObject * libxml_xmlByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; long c_retval; @@ -6136,20 +6150,6 @@ libxml_xmlXPathIsNodeType(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* LIBXML_XPATH_ENABLED */ -PyObject * -libxml_xmlFreeValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - xmlValidCtxtPtr cur; - PyObject *pyobj_cur; - - if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeValidCtxt", &pyobj_cur)) - return(NULL); - cur = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_cur); - - xmlFreeValidCtxt(cur); - Py_INCREF(Py_None); - return(Py_None); -} - #ifdef LIBXML_XPATH_ENABLED PyObject * libxml_xmlXPathRoot(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -6294,22 +6294,6 @@ libxml_xmlTextReaderDepth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * -libxml_xmlNanoFTPProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - char * host; - int port; - char * user; - char * passwd; - int type; - - if (!PyArg_ParseTuple(args, (char *)"zizzi:xmlNanoFTPProxy", &host, &port, &user, &passwd, &type)) - return(NULL); - - xmlNanoFTPProxy(host, port, user, passwd, type); - Py_INCREF(Py_None); - return(Py_None); -} - -PyObject * libxml_xmlUCSIsHiragana(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; int c_retval; @@ -6747,20 +6731,6 @@ libxml_xmlReaderNewDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * -libxml_xmlParsePI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - xmlParserCtxtPtr ctxt; - PyObject *pyobj_ctxt; - - if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePI", &pyobj_ctxt)) - return(NULL); - ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); - - xmlParsePI(ctxt); - Py_INCREF(Py_None); - return(Py_None); -} - -PyObject * libxml_xmlTextReaderConstPrefix(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; const xmlChar * c_retval; @@ -6777,6 +6747,20 @@ libxml_xmlTextReaderConstPrefix(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) } PyObject * +libxml_xmlRecoverDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + xmlDocPtr c_retval; + xmlChar * cur; + + if (!PyArg_ParseTuple(args, (char *)"z:xmlRecoverDoc", &cur)) + return(NULL); + + c_retval = xmlRecoverDoc(cur); + py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval); + return(py_retval); +} + +PyObject * libxml_xmlNormalizeWindowsPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; xmlChar * c_retval; @@ -6891,6 +6875,22 @@ libxml_xmlReaderForMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * +libxml_xmlTextReaderByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + long c_retval; + xmlTextReaderPtr reader; + PyObject *pyobj_reader; + + if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderByteConsumed", &pyobj_reader)) + return(NULL); + reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader); + + c_retval = xmlTextReaderByteConsumed(reader); + py_retval = libxml_intWrap((int) c_retval); + return(py_retval); +} + +PyObject * libxml_xmlNewDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; xmlDtdPtr c_retval; @@ -7498,6 +7498,22 @@ libxml_xmlParseExtParsedEnt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * +libxml_xmlNanoFTPProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + char * host; + int port; + char * user; + char * passwd; + int type; + + if (!PyArg_ParseTuple(args, (char *)"zizzi:xmlNanoFTPProxy", &host, &port, &user, &passwd, &type)) + return(NULL); + + xmlNanoFTPProxy(host, port, user, passwd, type); + Py_INCREF(Py_None); + return(Py_None); +} + +PyObject * libxml_xmlStringLenDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; xmlChar * c_retval; @@ -9675,6 +9691,24 @@ libxml_xmlXPathNotEqualValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { #endif /* LIBXML_XPATH_ENABLED */ PyObject * +libxml_xmlTextReaderMoveToAttributeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; + xmlTextReaderPtr reader; + PyObject *pyobj_reader; + xmlChar * localName; + xmlChar * namespaceURI; + + if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlTextReaderMoveToAttributeNs", &pyobj_reader, &localName, &namespaceURI)) + return(NULL); + reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader); + + c_retval = xmlTextReaderMoveToAttributeNs(reader, localName, namespaceURI); + py_retval = libxml_intWrap((int) c_retval); + return(py_retval); +} + +PyObject * libxml_xmlUCSIsOgham(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; int c_retval; @@ -9805,20 +9839,6 @@ libxml_xmlUCSIsCatPf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * -libxml_xmlUCSIsCatPe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - int c_retval; - int code; - - if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPe", &code)) - return(NULL); - - c_retval = xmlUCSIsCatPe(code); - py_retval = libxml_intWrap((int) c_retval); - return(py_retval); -} - -PyObject * libxml_xmlUCSIsCatPd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; int c_retval; @@ -10342,6 +10362,20 @@ libxml_xmlTextConcat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * +libxml_xmlParsePI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + xmlParserCtxtPtr ctxt; + PyObject *pyobj_ctxt; + + if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePI", &pyobj_ctxt)) + return(NULL); + ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); + + xmlParsePI(ctxt); + Py_INCREF(Py_None); + return(Py_None); +} + +PyObject * libxml_xmlLoadCatalogs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { char * pathss; @@ -10794,24 +10828,6 @@ libxml_xmlParserHandlePEReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg return(Py_None); } -PyObject * -libxml_xmlTextReaderMoveToAttributeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - int c_retval; - xmlTextReaderPtr reader; - PyObject *pyobj_reader; - xmlChar * localName; - xmlChar * namespaceURI; - - if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlTextReaderMoveToAttributeNs", &pyobj_reader, &localName, &namespaceURI)) - return(NULL); - reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader); - - c_retval = xmlTextReaderMoveToAttributeNs(reader, localName, namespaceURI); - py_retval = libxml_intWrap((int) c_retval); - return(py_retval); -} - #ifdef LIBXML_XPATH_ENABLED PyObject * libxml_xmlXPathNewBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -12890,6 +12906,14 @@ libxml_xmlURIGetOpaque(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * +libxml_xmlDictCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) { + + xmlDictCleanup(); + Py_INCREF(Py_None); + return(Py_None); +} + +PyObject * libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; xmlChar * c_retval; @@ -13133,20 +13157,6 @@ libxml_xmlUCSIsAegeanNumbers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * -libxml_xmlRecoverDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - xmlDocPtr c_retval; - xmlChar * cur; - - if (!PyArg_ParseTuple(args, (char *)"z:xmlRecoverDoc", &cur)) - return(NULL); - - c_retval = xmlRecoverDoc(cur); - py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval); - return(py_retval); -} - -PyObject * libxml_xmlCheckUTF8(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; int c_retval; diff --git a/python/setup.py b/python/setup.py index dd8aa76..748c1a8 100755 --- a/python/setup.py +++ b/python/setup.py @@ -226,7 +226,7 @@ else: setup (name = "libxml2-python", # On *nix, the version number is created from setup.py.in # On windows, it is set by configure.js - version = "2.6.17", + version = "2.6.18", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com", diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index 1ae9b6c..f41cd6d 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -28,6 +28,7 @@ PYTESTS= \ reader6.py \ reader7.py \ reader8.py \ + readernext.py \ walker.py \ ctxterror.py\ readererr.py\ @@ -37,7 +38,8 @@ PYTESTS= \ sync.py \ tstLastError.py \ indexes.py \ - dtdvalid.py + dtdvalid.py \ + tstmem.py XMLS= \ tst.xml \ @@ -52,6 +54,8 @@ tests: $(PYTESTS) @echo "## running Python regression tests" -@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ for test in $(PYTESTS) ; \ do log=`$(PYTHON) $(srcdir)/$$test` ; \ if [ "`echo $$log | grep OK`" = "" ] ; then \ diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in index d13d845..2184681 100644 --- a/python/tests/Makefile.in +++ b/python/tests/Makefile.in @@ -123,7 +123,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -146,6 +145,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ @@ -284,6 +284,7 @@ PYTESTS = \ reader6.py \ reader7.py \ reader8.py \ + readernext.py \ walker.py \ ctxterror.py\ readererr.py\ @@ -293,7 +294,8 @@ PYTESTS = \ sync.py \ tstLastError.py \ indexes.py \ - dtdvalid.py + dtdvalid.py \ + tstmem.py XMLS = \ tst.xml \ @@ -465,6 +467,8 @@ uninstall-am: uninstall-info-am @WITH_PYTHON_TRUE@ @echo "## running Python regression tests" @WITH_PYTHON_TRUE@ -@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \ @WITH_PYTHON_TRUE@ export PYTHONPATH; \ +@WITH_PYTHON_TRUE@ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ +@WITH_PYTHON_TRUE@ export LD_LIBRARY_PATH; \ @WITH_PYTHON_TRUE@ for test in $(PYTESTS) ; \ @WITH_PYTHON_TRUE@ do log=`$(PYTHON) $(srcdir)/$$test` ; \ @WITH_PYTHON_TRUE@ if [ "`echo $$log | grep OK`" = "" ] ; then \ diff --git a/python/tests/readernext.py b/python/tests/readernext.py new file mode 100755 index 0000000..b01a49d --- /dev/null +++ b/python/tests/readernext.py @@ -0,0 +1,81 @@ +#!/usr/bin/python -u +# -*- coding: ISO-8859-1 -*- +# +# this tests the next API of the XmlTextReader interface +# +import libxml2 +import StringIO +import sys + +# Memory debug specific +libxml2.debugMemory(1) + +f = StringIO.StringIO("""<a><b><c /></b><d>content of d</d></a>""") +input = libxml2.inputBuffer(f) +reader = input.newTextReader("test_next") +ret = reader.Read() +if ret != 1: + print "test_next: Error reading to first element" + sys.exit(1) +if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \ + reader.NodeType() != 1 or reader.HasAttributes() != 0: + print "test_next: Error reading the first element" + sys.exit(1) +ret = reader.Read() +if ret != 1: + print "test_next: Error reading to second element" + sys.exit(1) +if reader.Name() != "b" or reader.IsEmptyElement() != 0 or \ + reader.NodeType() != 1 or reader.HasAttributes() != 0: + print "test_next: Error reading the second element" + sys.exit(1) +ret = reader.Read() +if ret != 1: + print "test_next: Error reading to third element" + sys.exit(1) +if reader.Name() != "c" or reader.NodeType() != 1 or \ + reader.HasAttributes() != 0: + print "test_next: Error reading the third element" + sys.exit(1) +ret = reader.Read() +if ret != 1: + print "test_next: Error reading to end of third element" + sys.exit(1) +if reader.Name() != "b" or reader.NodeType() != 15: + print "test_next: Error reading to end of second element" + sys.exit(1) +ret = reader.Next() +if ret != 1: + print "test_next: Error moving to third element" + sys.exit(1) +if reader.Name() != "d" or reader.IsEmptyElement() != 0 or \ + reader.NodeType() != 1 or reader.HasAttributes() != 0: + print "test_next: Error reading third element" + sys.exit(1) +ret = reader.Next() +if ret != 1: + print "test_next: Error reading to end of first element" + sys.exit(1) +if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \ + reader.NodeType() != 15 or reader.HasAttributes() != 0: + print "test_next: Error reading the end of first element" + sys.exit(1) +ret = reader.Read() +if ret != 0: + print "test_next: Error reading to end of document" + sys.exit(1) + +# +# cleanup for memory allocation counting +# +del f +del input +del reader + +# Memory debug specific +libxml2.cleanupParser() +if libxml2.debugMemory(1) == 0: + print "OK" +else: + print "Memory leak %d bytes" % (libxml2.debugMemory(1)) + libxml2.dumpMemory() diff --git a/python/tests/tstmem.py b/python/tests/tstmem.py new file mode 100755 index 0000000..553096d --- /dev/null +++ b/python/tests/tstmem.py @@ -0,0 +1,36 @@ +#!/usr/bin/python -u +import libxml2 +import libxml2mod +import sys + +def error(msg, data): + pass + +# Memory debug specific +libxml2.debugMemory(1) + +dtd="""<!ELEMENT foo EMPTY>""" +instance="""<?xml version="1.0"?> +<foo></foo>""" + +dtd = libxml2.parseDTD(None, 'test.dtd') +ctxt = libxml2.newValidCtxt() +libxml2mod.xmlSetValidErrors(ctxt._o, error, error) +doc = libxml2.parseDoc(instance) +ret = doc.validateDtd(ctxt, dtd) +if ret != 1: + print "error doing DTD validation" + sys.exit(1) + +doc.freeDoc() +dtd.freeDtd() +del dtd +del ctxt + +# Memory debug specific +libxml2.cleanupParser() +if libxml2.debugMemory(1) == 0: + print "OK" +else: + print "Memory leak %d bytes" % (libxml2.debugMemory(1)) + libxml2.dumpMemory() diff --git a/result/comment3.xml b/result/comment3.xml new file mode 100644 index 0000000..395f67c --- /dev/null +++ b/result/comment3.xml @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of very very long comments and buffer limits +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +--> +<doc/> diff --git a/result/comment3.xml.rde b/result/comment3.xml.rde new file mode 100644 index 0000000..519b8d0 --- /dev/null +++ b/result/comment3.xml.rde @@ -0,0 +1,163 @@ +0 8 #comment 0 1 test of very very long comments and buffer limits +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 + +0 1 doc 1 0 diff --git a/result/comment3.xml.rdr b/result/comment3.xml.rdr new file mode 100644 index 0000000..519b8d0 --- /dev/null +++ b/result/comment3.xml.rdr @@ -0,0 +1,163 @@ +0 8 #comment 0 1 test of very very long comments and buffer limits +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 + +0 1 doc 1 0 diff --git a/result/comment3.xml.sax b/result/comment3.xml.sax new file mode 100644 index 0000000..82b8b36 --- /dev/null +++ b/result/comment3.xml.sax @@ -0,0 +1,167 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.comment( test of very very long comments and buffer limits +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +) +SAX.startElement(doc) +SAX.endElement(doc) +SAX.endDocument() diff --git a/result/comment4.xml b/result/comment4.xml new file mode 100644 index 0000000..93282d8 --- /dev/null +++ b/result/comment4.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of non ascii comments like là et très --> +<!--à another one --> +<!-- another one à--> +<doc/> diff --git a/result/comment4.xml.rde b/result/comment4.xml.rde new file mode 100644 index 0000000..09e181b --- /dev/null +++ b/result/comment4.xml.rde @@ -0,0 +1,4 @@ +0 8 #comment 0 1 test of non ascii comments like là et très +0 8 #comment 0 1 à another one +0 8 #comment 0 1 another one à +0 1 doc 1 0 diff --git a/result/comment4.xml.rdr b/result/comment4.xml.rdr new file mode 100644 index 0000000..09e181b --- /dev/null +++ b/result/comment4.xml.rdr @@ -0,0 +1,4 @@ +0 8 #comment 0 1 test of non ascii comments like là et très +0 8 #comment 0 1 à another one +0 8 #comment 0 1 another one à +0 1 doc 1 0 diff --git a/result/comment4.xml.sax b/result/comment4.xml.sax new file mode 100644 index 0000000..26011d9 --- /dev/null +++ b/result/comment4.xml.sax @@ -0,0 +1,8 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.comment( test of non ascii comments like là et très ) +SAX.comment(à another one ) +SAX.comment( another one à ) +SAX.startElement(doc) +SAX.endElement(doc) +SAX.endDocument() diff --git a/result/comment5.xml b/result/comment5.xml new file mode 100644 index 0000000..398f974 --- /dev/null +++ b/result/comment5.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of hyphen and line break handling + some text - interrupted - +- - - - - - - - - - - - - - - - - - - - - - + this should stop here^ + + +--> +<doc/> diff --git a/result/comment5.xml.rde b/result/comment5.xml.rde new file mode 100644 index 0000000..fe7a88f --- /dev/null +++ b/result/comment5.xml.rde @@ -0,0 +1,8 @@ +0 8 #comment 0 1 test of hyphen and line break handling + some text - interrupted - +- - - - - - - - - - - - - - - - - - - - - - + this should stop here^ + + + +0 1 doc 1 0 diff --git a/result/comment5.xml.rdr b/result/comment5.xml.rdr new file mode 100644 index 0000000..fe7a88f --- /dev/null +++ b/result/comment5.xml.rdr @@ -0,0 +1,8 @@ +0 8 #comment 0 1 test of hyphen and line break handling + some text - interrupted - +- - - - - - - - - - - - - - - - - - - - - - + this should stop here^ + + + +0 1 doc 1 0 diff --git a/result/comment5.xml.sax b/result/comment5.xml.sax new file mode 100644 index 0000000..dd58e7a --- /dev/null +++ b/result/comment5.xml.sax @@ -0,0 +1,12 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.comment( test of hyphen and line break handling + some text - interrupted - +- - - - - - - - - - - - - - - - - - - - - - + this should stop here^ + + +) +SAX.startElement(doc) +SAX.endElement(doc) +SAX.endDocument() diff --git a/result/errors/webdav.xml b/result/errors/webdav.xml new file mode 100644 index 0000000..2646219 --- /dev/null +++ b/result/errors/webdav.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<propfind xmlns="DAV:"><prop> +<getcontentlength xmlns="DAV:"/> +<getlastmodified xmlns="DAV:"/> +<displayname xmlns="DAV:"/> +<executable xmlns="http://apache.org/dav/props/"/> +<resourcetype xmlns="DAV:"/> +</prop></propfind> diff --git a/result/errors/webdav.xml.err b/result/errors/webdav.xml.err new file mode 100644 index 0000000..a722454 --- /dev/null +++ b/result/errors/webdav.xml.err @@ -0,0 +1,15 @@ +./test/errors/webdav.xml:2: parser warning : xmlns: DAV: not a valid URI +<propfind xmlns="DAV:"><prop> + ^ +./test/errors/webdav.xml:3: parser warning : xmlns: DAV: not a valid URI +<getcontentlength xmlns="DAV:"/> + ^ +./test/errors/webdav.xml:4: parser warning : xmlns: DAV: not a valid URI +<getlastmodified xmlns="DAV:"/> + ^ +./test/errors/webdav.xml:5: parser warning : xmlns: DAV: not a valid URI +<displayname xmlns="DAV:"/> + ^ +./test/errors/webdav.xml:7: parser warning : xmlns: DAV: not a valid URI +<resourcetype xmlns="DAV:"/> + ^ diff --git a/result/errors/webdav.xml.str b/result/errors/webdav.xml.str new file mode 100644 index 0000000..a722454 --- /dev/null +++ b/result/errors/webdav.xml.str @@ -0,0 +1,15 @@ +./test/errors/webdav.xml:2: parser warning : xmlns: DAV: not a valid URI +<propfind xmlns="DAV:"><prop> + ^ +./test/errors/webdav.xml:3: parser warning : xmlns: DAV: not a valid URI +<getcontentlength xmlns="DAV:"/> + ^ +./test/errors/webdav.xml:4: parser warning : xmlns: DAV: not a valid URI +<getlastmodified xmlns="DAV:"/> + ^ +./test/errors/webdav.xml:5: parser warning : xmlns: DAV: not a valid URI +<displayname xmlns="DAV:"/> + ^ +./test/errors/webdav.xml:7: parser warning : xmlns: DAV: not a valid URI +<resourcetype xmlns="DAV:"/> + ^ diff --git a/result/intsubset2.xml b/result/intsubset2.xml new file mode 100644 index 0000000..b103955 --- /dev/null +++ b/result/intsubset2.xml @@ -0,0 +1,250 @@ +<?xml version="1.0"?> +<!DOCTYPE kanjidic2 [ +<!-- Version 1.3 + This is the DTD of the XML-format kanji file combining information from + the KANJIDIC and KANJD212 files. It is intended to be largely self- + documenting, with each field being accompanied by an explanatory + comment. + + The file covers the following kanji: + (a) the 6,355 kanji from JIS X 0208; + (b) the 5,801 kanji from JIS X 0212; + (c) the 3,625 kanji from JIS X 0213 as follows: + (i) the 2,741 kanji which are also in JIS X 0212 have + JIS X 0213 code-points (kuten) added to the existing entry; + (ii) the 884 "new" kanji have new entries. + + At the end of the explanation for a number of fields there is a tag + with the format [N]. This indicates the leading letter(s) of the + equivalent field in the KANJIDIC and KANJD212 files. + + The KANJIDIC documentation should also be read for additional + information about the information in the file. + --><!ELEMENT kanjidic2 (header , character*)> +<!ELEMENT header (file_version , database_version , date_of_creation)> +<!-- + The single header element will contain identification information + about the version of the file + --><!ELEMENT file_version (#PCDATA)> +<!-- + This field denotes the version of kanjidic2 structure, as more + than one version may exist. + --><!ELEMENT database_version (#PCDATA)> +<!-- + The version of the file, in the format YYYY-NN, where NN will be + a number starting with 01 for the first version released in a + calendar year, then increasing for each version in that year. + --><!ELEMENT date_of_creation (#PCDATA)> +<!-- + The date the file was created in international format (YYYY-MM-DD). + --><!ELEMENT character (literal , codepoint , radical , misc , dic_number? , query_code? , reading_meaning? , nanori?)*> +<!ELEMENT literal (#PCDATA)> +<!-- + The character itself in UTF8 coding. + --><!ELEMENT codepoint (cp_value)+> +<!-- + The codepoint element states the code of the character in the various + character set standards. + --><!ELEMENT cp_value (#PCDATA)> +<!-- + The cp_value contains the codepoint of the character in a particular + standard. The standard will be identified in the cp_type attribute. + --><!ATTLIST cp_value cp_type CDATA #REQUIRED> +<!-- + The cp_type attribute states the coding standard applying to the + element. The values assigned so far are: + jis208 - JIS X 0208-1997 - kuten coding (nn-nn) + jis212 - JIS X 0212-1990 - kuten coding (nn-nn) + jis213 - JIS X 0213-2000 - kuten coding (p-nn-nn) + ucs - Unicode 4.0 - hex coding (4 or 5 hexadecimal digits) + --><!ELEMENT radical (rad_value)+> +<!ELEMENT rad_value (#PCDATA)> +<!-- + The radical number, in the range 1 to 214. The particular + classification type is stated in the rad_type attribute. + --><!ATTLIST rad_value rad_type CDATA #REQUIRED> +<!-- + The rad_type attribute states the type of radical classification. + classical - as recorded in the KangXi Zidian. + nelson - as used in the Nelson "Modern Japanese-English + Character Dictionary" (i.e. the Classic, not the New Nelson). + This will only be used where Nelson reclassified the kanji. + --><!ELEMENT misc (grade? , stroke_count+ , variant* , freq* , rad_name*)> +<!ELEMENT grade (#PCDATA)> +<!-- + The Jouyou Kanji grade level. 1 through 6 indicate the grade in which + the kanji is taught in Japanese schools. 8 indicates it is one of the + remaining Jouyou Kanji to be learned in junior high school, and 9 + indicates it is a Jinmeiyou (for use in names) kanji. [G] + --><!ELEMENT stroke_count (#PCDATA)> +<!-- + The stroke count of the kanji, including the radical. If more than + one, the first is considered the accepted count, while subsequent ones + are common miscounts. (See Appendix E. of the KANJIDIC documentation + for some of the rules applied when counting strokes in some of the + radicals.) [S] + --><!ELEMENT variant (#PCDATA)> +<!-- + A cross-reference code to another kanji, usually regarded as a variant. + The type of cross-reference is given in the var_type attribute. + --><!ATTLIST variant var_type CDATA #REQUIRED> +<!-- + The var_type attribute indicates the type of variant code. The current + values are: + jis208 - in JIS X 0208 - kuten coding + jis212 - in JIS X 0212 - kuten coding + jis213 - in JIS X 0213 - kuten coding + deroo - De Roo number - numeric + njecd - Halpern NJECD index number - numeric + s_h - The Kanji Dictionary (Spahn & Hadamitzky) - descriptor + nelson - "Classic" Nelson - numeric + oneill - Japanese Names (O'Neill) - numeric + --><!ELEMENT freq (#PCDATA)> +<!-- + A frequency-of-use ranking. The 2,500 most-used characters have a + ranking; those characters that lack this field are not ranked. The + frequency is a number from 1 to 2,500 that expresses the relative + frequency of occurrence of a character in modern Japanese. This is + based on a survey in newspapers, so it is biassed towards kanji + used in newspaper articles. The discrimination between the less + frequently used kanji is not strong. + --><!ELEMENT rad_name (#PCDATA)> +<!-- + When the kanji is itself a radical and has a name, this element + contains the name (in hiragana.) [T2] + --><!ELEMENT dic_number (dic_ref)+> +<!-- + This element contains the index numbers and similar unstructured + information such as page numbers in a number of published dictionaries, + and instructional books on kanji. + --><!ELEMENT dic_ref (#PCDATA)> +<!-- + Each dic_ref contains an index number. The particular dictionary, + etc. is defined by the dr_type attribute. + --><!ATTLIST dic_ref dr_type CDATA #REQUIRED> +<!-- + The dr_type defines the dictionary or reference book, etc. to which + dic_ref element applies. The initial allocation is: + nelson_c - "Modern Reader's Japanese-English Character Dictionary", + edited by Andrew Nelson (now published as the "Classic" + Nelson). + nelson_n - "The New Nelson Japanese-English Character Dictionary", + edited by John Haig. + halpern_njecd - "New Japanese-English Character Dictionary", + edited by Jack Halpern. + halpern_kkld - "Kanji Learners Dictionary" (Kodansha) edited by + Jack Halpern. + heisig - "Remembering The Kanji" by James Heisig. + gakken - "A New Dictionary of Kanji Usage" (Gakken) + oneill_names - "Japanese Names", by P.G. O'Neill. + oneill_kk - "Essential Kanji" by P.G. O'Neill. + moro - "Daikanwajiten" compiled by Morohashi. For some kanji two + additional attributes are used: m_vol: the volume of the + dictionary in which the kanji is found, and m_page: the page + number in the volume. + henshall - "A Guide To Remembering Japanese Characters" by + Kenneth G. Henshall. + sh_kk - "Kanji and Kana" by Spahn and Hadamitzky. + sakade - "A Guide To Reading and Writing Japanese" edited by + Florence Sakade. + henshall3 - "A Guide To Reading and Writing Japanese" 3rd + edition, edited by Henshall, Seeley and De Groot. + tutt_cards - Tuttle Kanji Cards, compiled by Alexander Kask. + crowley - "The Kanji Way to Japanese Language Power" by + Dale Crowley. + kanji_in_context - "Kanji in Context" by Nishiguchi and Kono. + busy_people - "Japanese For Busy People" vols I-III, published + by the AJLT. The codes are the volume.chapter. + kodansha_compact - the "Kodansha Compact Kanji Guide". + --><!ATTLIST dic_ref m_vol CDATA #IMPLIED> +<!-- + See above under "moro". + --><!ATTLIST dic_ref m_page CDATA #IMPLIED> +<!-- + See above under "moro". + --><!ELEMENT query_code (q_code)+> +<!-- + These codes contain information relating to the glyph, and can be used + for finding a required kanji. The type of code is defined by the + qc_type attribute. + --><!ELEMENT q_code (#PCDATA)> +<!-- + The q_code contains the actual query-code value, according to the + qc_type attribute. + --><!ATTLIST q_code qc_type CDATA #REQUIRED> +<!-- + The q_code attribute defines the type of query code. The current values + are: + skip - Halpern's SKIP (System of Kanji Indexing by Patterns) + code. The format is n-nn-nn. See the KANJIDIC documentation + for a description of the code and restrictions on the + commercial use of this data. [P] + + sh_desc - the descriptor codes for The Kanji Dictionary (Tuttle + 1996) by Spahn and Hadamitzky. They are in the form nxnn.n, + e.g. 3k11.2, where the kanji has 3 strokes in the + identifying radical, it is radical "k" in the SH + classification system, there are 11 other strokes, and it is + the 2nd kanji in the 3k11 sequence. (I am very grateful to + Mark Spahn for providing the list of these descriptor codes + for the kanji in this file.) [I] + four_corner - the "Four Corner" code for the kanji. This is a code + invented by Wang Chen in 1928. See the KANJIDIC documentation + for an overview of the Four Corner System. [Q] + + deroo - the codes developed by the late Father Joseph De Roo, and + published in his book "2001 Kanji" (Bojinsha). Fr De Roo + gave his permission for these codes to be included. [DR] + misclass - a possible misclassification of the kanji according + to one of the code types. (See the "Z" codes in the KANJIDIC + documentation for more details.) + + --><!ELEMENT reading_meaning (rmgroup* , nanori*)> +<!-- + The readings for the kanji in several languages, and the meanings, also + in several languages. The readings and meanings are grouped to enable + the handling of the situation where the meaning is differentiated by + reading. [T1] + --><!ELEMENT nanori (#PCDATA)> +<!-- + Japanese readings that are now only associated with names. + --><!ELEMENT rmgroup (reading* , meaning*)> +<!ELEMENT reading (#PCDATA)> +<!-- + The reading element contains the reading or pronunciation + of the kanji. + --><!ATTLIST reading r_type CDATA #REQUIRED> +<!-- + The r_type attribute defines the type of reading in the reading + element. The current values are: + pinyin - the modern PinYin romanization of the Chinese reading + of the kanji. The tones are represented by a concluding + digit. [Y] + korean_r - the romanized form of the Korean reading(s) of the + kanji. The readings are in the (Republic of Korea) Ministry + of Education style of romanization. [W] + korean_h - the Korean reading(s) of the kanji in hangul. + ja_on - the "on" Japanese reading of the kanji, in katakana. A + second attribute r_status, if present, will indicate with + a value of "jy" whether the reading is approved for a + "Jouyou kanji". + ja_kun - the "kun" Japanese reading of the kanji, in hiragana. + Where relevant the okurigana is also included separated by a + ".". Readings associated with prefixes and suffixes are + marked with a "-". A second attribute r_status, if present, + will indicate with a value of "jy" whether the reading is + approved for a "Jouyou kanji". + --><!ATTLIST reading r_status CDATA #IMPLIED> +<!-- + See under ja_on and ja_kun above. + --><!ELEMENT meaning (#PCDATA)> +<!-- + The meaning associated with the kanji. + --><!ATTLIST meaning m_lang CDATA #IMPLIED> +<!-- + The m_lang attribute defines the target language of the meaning. It + will be coded using the two-letter language code from the ISO 639 + standard. When absent, the value "en" (i.e. English) is implied. [{}] + -->]> +<kanjidic2> +</kanjidic2> diff --git a/result/intsubset2.xml.rde b/result/intsubset2.xml.rde new file mode 100644 index 0000000..d27e245 --- /dev/null +++ b/result/intsubset2.xml.rde @@ -0,0 +1,5 @@ +0 10 kanjidic2 0 0 +0 1 kanjidic2 0 0 +1 14 #text 0 1 + +0 15 kanjidic2 0 0 diff --git a/result/intsubset2.xml.rdr b/result/intsubset2.xml.rdr new file mode 100644 index 0000000..d27e245 --- /dev/null +++ b/result/intsubset2.xml.rdr @@ -0,0 +1,5 @@ +0 10 kanjidic2 0 0 +0 1 kanjidic2 0 0 +1 14 #text 0 1 + +0 15 kanjidic2 0 0 diff --git a/result/intsubset2.xml.sax b/result/intsubset2.xml.sax new file mode 100644 index 0000000..b4d7bf4 --- /dev/null +++ b/result/intsubset2.xml.sax @@ -0,0 +1,286 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.internalSubset(kanjidic2, , ) +SAX.comment( Version 1.3 + This is the DTD of the XML-format kanji file combining information from + the KANJIDIC and KANJD212 files. It is intended to be largely self- + documenting, with each field being accompanied by an explanatory + comment. + + The file covers the following kanji: + (a) the 6,355 kanji from JIS X 0208; + (b) the 5,801 kanji from JIS X 0212; + (c) the 3,625 kanji from JIS X 0213 as follows: + (i) the 2,741 kanji which are also in JIS X 0212 have + JIS X 0213 code-points (kuten) added to the existing entry; + (ii) the 884 "new" kanji have new entries. + + At the end of the explanation for a number of fields there is a tag + with the format [N]. This indicates the leading letter(s) of the + equivalent field in the KANJIDIC and KANJD212 files. + + The KANJIDIC documentation should also be read for additional + information about the information in the file. + ) +SAX.elementDecl(kanjidic2, 4, ...) +SAX.elementDecl(header, 4, ...) +SAX.comment( + The single header element will contain identification information + about the version of the file + ) +SAX.elementDecl(file_version, 3, ...) +SAX.comment( + This field denotes the version of kanjidic2 structure, as more + than one version may exist. + ) +SAX.elementDecl(database_version, 3, ...) +SAX.comment( + The version of the file, in the format YYYY-NN, where NN will be + a number starting with 01 for the first version released in a + calendar year, then increasing for each version in that year. + ) +SAX.elementDecl(date_of_creation, 3, ...) +SAX.comment( + The date the file was created in international format (YYYY-MM-DD). + ) +SAX.elementDecl(character, 4, ...) +SAX.elementDecl(literal, 3, ...) +SAX.comment( + The character itself in UTF8 coding. + ) +SAX.elementDecl(codepoint, 4, ...) +SAX.comment( + The codepoint element states the code of the character in the various + character set standards. + ) +SAX.elementDecl(cp_value, 3, ...) +SAX.comment( + The cp_value contains the codepoint of the character in a particular + standard. The standard will be identified in the cp_type attribute. + ) +SAX.attributeDecl(cp_value, cp_type, 1, 2, NULL, ...) +SAX.comment( + The cp_type attribute states the coding standard applying to the + element. The values assigned so far are: + jis208 - JIS X 0208-1997 - kuten coding (nn-nn) + jis212 - JIS X 0212-1990 - kuten coding (nn-nn) + jis213 - JIS X 0213-2000 - kuten coding (p-nn-nn) + ucs - Unicode 4.0 - hex coding (4 or 5 hexadecimal digits) + ) +SAX.elementDecl(radical, 4, ...) +SAX.elementDecl(rad_value, 3, ...) +SAX.comment( + The radical number, in the range 1 to 214. The particular + classification type is stated in the rad_type attribute. + ) +SAX.attributeDecl(rad_value, rad_type, 1, 2, NULL, ...) +SAX.comment( + The rad_type attribute states the type of radical classification. + classical - as recorded in the KangXi Zidian. + nelson - as used in the Nelson "Modern Japanese-English + Character Dictionary" (i.e. the Classic, not the New Nelson). + This will only be used where Nelson reclassified the kanji. + ) +SAX.elementDecl(misc, 4, ...) +SAX.elementDecl(grade, 3, ...) +SAX.comment( + The Jouyou Kanji grade level. 1 through 6 indicate the grade in which + the kanji is taught in Japanese schools. 8 indicates it is one of the + remaining Jouyou Kanji to be learned in junior high school, and 9 + indicates it is a Jinmeiyou (for use in names) kanji. [G] + ) +SAX.elementDecl(stroke_count, 3, ...) +SAX.comment( + The stroke count of the kanji, including the radical. If more than + one, the first is considered the accepted count, while subsequent ones + are common miscounts. (See Appendix E. of the KANJIDIC documentation + for some of the rules applied when counting strokes in some of the + radicals.) [S] + ) +SAX.elementDecl(variant, 3, ...) +SAX.comment( + A cross-reference code to another kanji, usually regarded as a variant. + The type of cross-reference is given in the var_type attribute. + ) +SAX.attributeDecl(variant, var_type, 1, 2, NULL, ...) +SAX.comment( + The var_type attribute indicates the type of variant code. The current + values are: + jis208 - in JIS X 0208 - kuten coding + jis212 - in JIS X 0212 - kuten coding + jis213 - in JIS X 0213 - kuten coding + deroo - De Roo number - numeric + njecd - Halpern NJECD index number - numeric + s_h - The Kanji Dictionary (Spahn & Hadamitzky) - descriptor + nelson - "Classic" Nelson - numeric + oneill - Japanese Names (O'Neill) - numeric + ) +SAX.elementDecl(freq, 3, ...) +SAX.comment( + A frequency-of-use ranking. The 2,500 most-used characters have a + ranking; those characters that lack this field are not ranked. The + frequency is a number from 1 to 2,500 that expresses the relative + frequency of occurrence of a character in modern Japanese. This is + based on a survey in newspapers, so it is biassed towards kanji + used in newspaper articles. The discrimination between the less + frequently used kanji is not strong. + ) +SAX.elementDecl(rad_name, 3, ...) +SAX.comment( + When the kanji is itself a radical and has a name, this element + contains the name (in hiragana.) [T2] + ) +SAX.elementDecl(dic_number, 4, ...) +SAX.comment( + This element contains the index numbers and similar unstructured + information such as page numbers in a number of published dictionaries, + and instructional books on kanji. + ) +SAX.elementDecl(dic_ref, 3, ...) +SAX.comment( + Each dic_ref contains an index number. The particular dictionary, + etc. is defined by the dr_type attribute. + ) +SAX.attributeDecl(dic_ref, dr_type, 1, 2, NULL, ...) +SAX.comment( + The dr_type defines the dictionary or reference book, etc. to which + dic_ref element applies. The initial allocation is: + nelson_c - "Modern Reader's Japanese-English Character Dictionary", + edited by Andrew Nelson (now published as the "Classic" + Nelson). + nelson_n - "The New Nelson Japanese-English Character Dictionary", + edited by John Haig. + halpern_njecd - "New Japanese-English Character Dictionary", + edited by Jack Halpern. + halpern_kkld - "Kanji Learners Dictionary" (Kodansha) edited by + Jack Halpern. + heisig - "Remembering The Kanji" by James Heisig. + gakken - "A New Dictionary of Kanji Usage" (Gakken) + oneill_names - "Japanese Names", by P.G. O'Neill. + oneill_kk - "Essential Kanji" by P.G. O'Neill. + moro - "Daikanwajiten" compiled by Morohashi. For some kanji two + additional attributes are used: m_vol: the volume of the + dictionary in which the kanji is found, and m_page: the page + number in the volume. + henshall - "A Guide To Remembering Japanese Characters" by + Kenneth G. Henshall. + sh_kk - "Kanji and Kana" by Spahn and Hadamitzky. + sakade - "A Guide To Reading and Writing Japanese" edited by + Florence Sakade. + henshall3 - "A Guide To Reading and Writing Japanese" 3rd + edition, edited by Henshall, Seeley and De Groot. + tutt_cards - Tuttle Kanji Cards, compiled by Alexander Kask. + crowley - "The Kanji Way to Japanese Language Power" by + Dale Crowley. + kanji_in_context - "Kanji in Context" by Nishiguchi and Kono. + busy_people - "Japanese For Busy People" vols I-III, published + by the AJLT. The codes are the volume.chapter. + kodansha_compact - the "Kodansha Compact Kanji Guide". + ) +SAX.attributeDecl(dic_ref, m_vol, 1, 3, NULL, ...) +SAX.comment( + See above under "moro". + ) +SAX.attributeDecl(dic_ref, m_page, 1, 3, NULL, ...) +SAX.comment( + See above under "moro". + ) +SAX.elementDecl(query_code, 4, ...) +SAX.comment( + These codes contain information relating to the glyph, and can be used + for finding a required kanji. The type of code is defined by the + qc_type attribute. + ) +SAX.elementDecl(q_code, 3, ...) +SAX.comment( + The q_code contains the actual query-code value, according to the + qc_type attribute. + ) +SAX.attributeDecl(q_code, qc_type, 1, 2, NULL, ...) +SAX.comment( + The q_code attribute defines the type of query code. The current values + are: + skip - Halpern's SKIP (System of Kanji Indexing by Patterns) + code. The format is n-nn-nn. See the KANJIDIC documentation + for a description of the code and restrictions on the + commercial use of this data. [P] + + sh_desc - the descriptor codes for The Kanji Dictionary (Tuttle + 1996) by Spahn and Hadamitzky. They are in the form nxnn.n, + e.g. 3k11.2, where the kanji has 3 strokes in the + identifying radical, it is radical "k" in the SH + classification system, there are 11 other strokes, and it is + the 2nd kanji in the 3k11 sequence. (I am very grateful to + Mark Spahn for providing the list of these descriptor codes + for the kanji in this file.) [I] + four_corner - the "Four Corner" code for the kanji. This is a code + invented by Wang Chen in 1928. See the KANJIDIC documentation + for an overview of the Four Corner System. [Q] + + deroo - the codes developed by the late Father Joseph De Roo, and + published in his book "2001 Kanji" (Bojinsha). Fr De Roo + gave his permission for these codes to be included. [DR] + misclass - a possible misclassification of the kanji according + to one of the code types. (See the "Z" codes in the KANJIDIC + documentation for more details.) + + ) +SAX.elementDecl(reading_meaning, 4, ...) +SAX.comment( + The readings for the kanji in several languages, and the meanings, also + in several languages. The readings and meanings are grouped to enable + the handling of the situation where the meaning is differentiated by + reading. [T1] + ) +SAX.elementDecl(nanori, 3, ...) +SAX.comment( + Japanese readings that are now only associated with names. + ) +SAX.elementDecl(rmgroup, 4, ...) +SAX.elementDecl(reading, 3, ...) +SAX.comment( + The reading element contains the reading or pronunciation + of the kanji. + ) +SAX.attributeDecl(reading, r_type, 1, 2, NULL, ...) +SAX.comment( + The r_type attribute defines the type of reading in the reading + element. The current values are: + pinyin - the modern PinYin romanization of the Chinese reading + of the kanji. The tones are represented by a concluding + digit. [Y] + korean_r - the romanized form of the Korean reading(s) of the + kanji. The readings are in the (Republic of Korea) Ministry + of Education style of romanization. [W] + korean_h - the Korean reading(s) of the kanji in hangul. + ja_on - the "on" Japanese reading of the kanji, in katakana. A + second attribute r_status, if present, will indicate with + a value of "jy" whether the reading is approved for a + "Jouyou kanji". + ja_kun - the "kun" Japanese reading of the kanji, in hiragana. + Where relevant the okurigana is also included separated by a + ".". Readings associated with prefixes and suffixes are + marked with a "-". A second attribute r_status, if present, + will indicate with a value of "jy" whether the reading is + approved for a "Jouyou kanji". + ) +SAX.attributeDecl(reading, r_status, 1, 3, NULL, ...) +SAX.comment( + See under ja_on and ja_kun above. + ) +SAX.elementDecl(meaning, 3, ...) +SAX.comment( + The meaning associated with the kanji. + ) +SAX.attributeDecl(meaning, m_lang, 1, 3, NULL, ...) +SAX.comment( + The m_lang attribute defines the target language of the meaning. It + will be coded using the two-letter language code from the ISO 639 + standard. When absent, the value "en" (i.e. English) is implied. [{}] + ) +SAX.externalSubset(kanjidic2, , ) +SAX.startElement(kanjidic2) +SAX.characters( +, 1) +SAX.endElement(kanjidic2) +SAX.endDocument() diff --git a/result/noent/comment3.xml b/result/noent/comment3.xml new file mode 100644 index 0000000..395f67c --- /dev/null +++ b/result/noent/comment3.xml @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of very very long comments and buffer limits +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +--> +<doc/> diff --git a/result/noent/comment4.xml b/result/noent/comment4.xml new file mode 100644 index 0000000..93282d8 --- /dev/null +++ b/result/noent/comment4.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of non ascii comments like là et très --> +<!--à another one --> +<!-- another one à--> +<doc/> diff --git a/result/noent/comment5.xml b/result/noent/comment5.xml new file mode 100644 index 0000000..398f974 --- /dev/null +++ b/result/noent/comment5.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of hyphen and line break handling + some text - interrupted - +- - - - - - - - - - - - - - - - - - - - - - + this should stop here^ + + +--> +<doc/> diff --git a/result/noent/intsubset2.xml b/result/noent/intsubset2.xml new file mode 100644 index 0000000..b103955 --- /dev/null +++ b/result/noent/intsubset2.xml @@ -0,0 +1,250 @@ +<?xml version="1.0"?> +<!DOCTYPE kanjidic2 [ +<!-- Version 1.3 + This is the DTD of the XML-format kanji file combining information from + the KANJIDIC and KANJD212 files. It is intended to be largely self- + documenting, with each field being accompanied by an explanatory + comment. + + The file covers the following kanji: + (a) the 6,355 kanji from JIS X 0208; + (b) the 5,801 kanji from JIS X 0212; + (c) the 3,625 kanji from JIS X 0213 as follows: + (i) the 2,741 kanji which are also in JIS X 0212 have + JIS X 0213 code-points (kuten) added to the existing entry; + (ii) the 884 "new" kanji have new entries. + + At the end of the explanation for a number of fields there is a tag + with the format [N]. This indicates the leading letter(s) of the + equivalent field in the KANJIDIC and KANJD212 files. + + The KANJIDIC documentation should also be read for additional + information about the information in the file. + --><!ELEMENT kanjidic2 (header , character*)> +<!ELEMENT header (file_version , database_version , date_of_creation)> +<!-- + The single header element will contain identification information + about the version of the file + --><!ELEMENT file_version (#PCDATA)> +<!-- + This field denotes the version of kanjidic2 structure, as more + than one version may exist. + --><!ELEMENT database_version (#PCDATA)> +<!-- + The version of the file, in the format YYYY-NN, where NN will be + a number starting with 01 for the first version released in a + calendar year, then increasing for each version in that year. + --><!ELEMENT date_of_creation (#PCDATA)> +<!-- + The date the file was created in international format (YYYY-MM-DD). + --><!ELEMENT character (literal , codepoint , radical , misc , dic_number? , query_code? , reading_meaning? , nanori?)*> +<!ELEMENT literal (#PCDATA)> +<!-- + The character itself in UTF8 coding. + --><!ELEMENT codepoint (cp_value)+> +<!-- + The codepoint element states the code of the character in the various + character set standards. + --><!ELEMENT cp_value (#PCDATA)> +<!-- + The cp_value contains the codepoint of the character in a particular + standard. The standard will be identified in the cp_type attribute. + --><!ATTLIST cp_value cp_type CDATA #REQUIRED> +<!-- + The cp_type attribute states the coding standard applying to the + element. The values assigned so far are: + jis208 - JIS X 0208-1997 - kuten coding (nn-nn) + jis212 - JIS X 0212-1990 - kuten coding (nn-nn) + jis213 - JIS X 0213-2000 - kuten coding (p-nn-nn) + ucs - Unicode 4.0 - hex coding (4 or 5 hexadecimal digits) + --><!ELEMENT radical (rad_value)+> +<!ELEMENT rad_value (#PCDATA)> +<!-- + The radical number, in the range 1 to 214. The particular + classification type is stated in the rad_type attribute. + --><!ATTLIST rad_value rad_type CDATA #REQUIRED> +<!-- + The rad_type attribute states the type of radical classification. + classical - as recorded in the KangXi Zidian. + nelson - as used in the Nelson "Modern Japanese-English + Character Dictionary" (i.e. the Classic, not the New Nelson). + This will only be used where Nelson reclassified the kanji. + --><!ELEMENT misc (grade? , stroke_count+ , variant* , freq* , rad_name*)> +<!ELEMENT grade (#PCDATA)> +<!-- + The Jouyou Kanji grade level. 1 through 6 indicate the grade in which + the kanji is taught in Japanese schools. 8 indicates it is one of the + remaining Jouyou Kanji to be learned in junior high school, and 9 + indicates it is a Jinmeiyou (for use in names) kanji. [G] + --><!ELEMENT stroke_count (#PCDATA)> +<!-- + The stroke count of the kanji, including the radical. If more than + one, the first is considered the accepted count, while subsequent ones + are common miscounts. (See Appendix E. of the KANJIDIC documentation + for some of the rules applied when counting strokes in some of the + radicals.) [S] + --><!ELEMENT variant (#PCDATA)> +<!-- + A cross-reference code to another kanji, usually regarded as a variant. + The type of cross-reference is given in the var_type attribute. + --><!ATTLIST variant var_type CDATA #REQUIRED> +<!-- + The var_type attribute indicates the type of variant code. The current + values are: + jis208 - in JIS X 0208 - kuten coding + jis212 - in JIS X 0212 - kuten coding + jis213 - in JIS X 0213 - kuten coding + deroo - De Roo number - numeric + njecd - Halpern NJECD index number - numeric + s_h - The Kanji Dictionary (Spahn & Hadamitzky) - descriptor + nelson - "Classic" Nelson - numeric + oneill - Japanese Names (O'Neill) - numeric + --><!ELEMENT freq (#PCDATA)> +<!-- + A frequency-of-use ranking. The 2,500 most-used characters have a + ranking; those characters that lack this field are not ranked. The + frequency is a number from 1 to 2,500 that expresses the relative + frequency of occurrence of a character in modern Japanese. This is + based on a survey in newspapers, so it is biassed towards kanji + used in newspaper articles. The discrimination between the less + frequently used kanji is not strong. + --><!ELEMENT rad_name (#PCDATA)> +<!-- + When the kanji is itself a radical and has a name, this element + contains the name (in hiragana.) [T2] + --><!ELEMENT dic_number (dic_ref)+> +<!-- + This element contains the index numbers and similar unstructured + information such as page numbers in a number of published dictionaries, + and instructional books on kanji. + --><!ELEMENT dic_ref (#PCDATA)> +<!-- + Each dic_ref contains an index number. The particular dictionary, + etc. is defined by the dr_type attribute. + --><!ATTLIST dic_ref dr_type CDATA #REQUIRED> +<!-- + The dr_type defines the dictionary or reference book, etc. to which + dic_ref element applies. The initial allocation is: + nelson_c - "Modern Reader's Japanese-English Character Dictionary", + edited by Andrew Nelson (now published as the "Classic" + Nelson). + nelson_n - "The New Nelson Japanese-English Character Dictionary", + edited by John Haig. + halpern_njecd - "New Japanese-English Character Dictionary", + edited by Jack Halpern. + halpern_kkld - "Kanji Learners Dictionary" (Kodansha) edited by + Jack Halpern. + heisig - "Remembering The Kanji" by James Heisig. + gakken - "A New Dictionary of Kanji Usage" (Gakken) + oneill_names - "Japanese Names", by P.G. O'Neill. + oneill_kk - "Essential Kanji" by P.G. O'Neill. + moro - "Daikanwajiten" compiled by Morohashi. For some kanji two + additional attributes are used: m_vol: the volume of the + dictionary in which the kanji is found, and m_page: the page + number in the volume. + henshall - "A Guide To Remembering Japanese Characters" by + Kenneth G. Henshall. + sh_kk - "Kanji and Kana" by Spahn and Hadamitzky. + sakade - "A Guide To Reading and Writing Japanese" edited by + Florence Sakade. + henshall3 - "A Guide To Reading and Writing Japanese" 3rd + edition, edited by Henshall, Seeley and De Groot. + tutt_cards - Tuttle Kanji Cards, compiled by Alexander Kask. + crowley - "The Kanji Way to Japanese Language Power" by + Dale Crowley. + kanji_in_context - "Kanji in Context" by Nishiguchi and Kono. + busy_people - "Japanese For Busy People" vols I-III, published + by the AJLT. The codes are the volume.chapter. + kodansha_compact - the "Kodansha Compact Kanji Guide". + --><!ATTLIST dic_ref m_vol CDATA #IMPLIED> +<!-- + See above under "moro". + --><!ATTLIST dic_ref m_page CDATA #IMPLIED> +<!-- + See above under "moro". + --><!ELEMENT query_code (q_code)+> +<!-- + These codes contain information relating to the glyph, and can be used + for finding a required kanji. The type of code is defined by the + qc_type attribute. + --><!ELEMENT q_code (#PCDATA)> +<!-- + The q_code contains the actual query-code value, according to the + qc_type attribute. + --><!ATTLIST q_code qc_type CDATA #REQUIRED> +<!-- + The q_code attribute defines the type of query code. The current values + are: + skip - Halpern's SKIP (System of Kanji Indexing by Patterns) + code. The format is n-nn-nn. See the KANJIDIC documentation + for a description of the code and restrictions on the + commercial use of this data. [P] + + sh_desc - the descriptor codes for The Kanji Dictionary (Tuttle + 1996) by Spahn and Hadamitzky. They are in the form nxnn.n, + e.g. 3k11.2, where the kanji has 3 strokes in the + identifying radical, it is radical "k" in the SH + classification system, there are 11 other strokes, and it is + the 2nd kanji in the 3k11 sequence. (I am very grateful to + Mark Spahn for providing the list of these descriptor codes + for the kanji in this file.) [I] + four_corner - the "Four Corner" code for the kanji. This is a code + invented by Wang Chen in 1928. See the KANJIDIC documentation + for an overview of the Four Corner System. [Q] + + deroo - the codes developed by the late Father Joseph De Roo, and + published in his book "2001 Kanji" (Bojinsha). Fr De Roo + gave his permission for these codes to be included. [DR] + misclass - a possible misclassification of the kanji according + to one of the code types. (See the "Z" codes in the KANJIDIC + documentation for more details.) + + --><!ELEMENT reading_meaning (rmgroup* , nanori*)> +<!-- + The readings for the kanji in several languages, and the meanings, also + in several languages. The readings and meanings are grouped to enable + the handling of the situation where the meaning is differentiated by + reading. [T1] + --><!ELEMENT nanori (#PCDATA)> +<!-- + Japanese readings that are now only associated with names. + --><!ELEMENT rmgroup (reading* , meaning*)> +<!ELEMENT reading (#PCDATA)> +<!-- + The reading element contains the reading or pronunciation + of the kanji. + --><!ATTLIST reading r_type CDATA #REQUIRED> +<!-- + The r_type attribute defines the type of reading in the reading + element. The current values are: + pinyin - the modern PinYin romanization of the Chinese reading + of the kanji. The tones are represented by a concluding + digit. [Y] + korean_r - the romanized form of the Korean reading(s) of the + kanji. The readings are in the (Republic of Korea) Ministry + of Education style of romanization. [W] + korean_h - the Korean reading(s) of the kanji in hangul. + ja_on - the "on" Japanese reading of the kanji, in katakana. A + second attribute r_status, if present, will indicate with + a value of "jy" whether the reading is approved for a + "Jouyou kanji". + ja_kun - the "kun" Japanese reading of the kanji, in hiragana. + Where relevant the okurigana is also included separated by a + ".". Readings associated with prefixes and suffixes are + marked with a "-". A second attribute r_status, if present, + will indicate with a value of "jy" whether the reading is + approved for a "Jouyou kanji". + --><!ATTLIST reading r_status CDATA #IMPLIED> +<!-- + See under ja_on and ja_kun above. + --><!ELEMENT meaning (#PCDATA)> +<!-- + The meaning associated with the kanji. + --><!ATTLIST meaning m_lang CDATA #IMPLIED> +<!-- + The m_lang attribute defines the target language of the meaning. It + will be coded using the two-letter language code from the ISO 639 + standard. When absent, the value "en" (i.e. English) is implied. [{}] + -->]> +<kanjidic2> +</kanjidic2> diff --git a/result/pattern/conj b/result/pattern/conj new file mode 100644 index 0000000..616450b --- /dev/null +++ b/result/pattern/conj @@ -0,0 +1,47 @@ +Node /a matches pattern a|b +Node /a/b matches pattern a|b +Node /a/b/c[1]/b matches pattern a|b +Node /a/b/c[2]/b matches pattern a|b +Node /a/b/c[2]/c/b matches pattern a|b +Node /a/c/b matches pattern a|b +Node /a matches pattern a|c +Node /a/b/c[1] matches pattern a|c +Node /a/b/c[2] matches pattern a|c +Node /a/b/c[2]/c matches pattern a|c +Node /a/c matches pattern a|c +Node /a/b matches pattern b|c +Node /a/b/c[1] matches pattern b|c +Node /a/b/c[1]/b matches pattern b|c +Node /a/b/c[2] matches pattern b|c +Node /a/b/c[2]/b matches pattern b|c +Node /a/b/c[2]/c matches pattern b|c +Node /a/b/c[2]/c/b matches pattern b|c +Node /a/c matches pattern b|c +Node /a/c/b matches pattern b|c +Node /a matches pattern a|b|c +Node /a/b matches pattern a|b|c +Node /a/b/c[1] matches pattern a|b|c +Node /a/b/c[1]/b matches pattern a|b|c +Node /a/b/c[2] matches pattern a|b|c +Node /a/b/c[2]/b matches pattern a|b|c +Node /a/b/c[2]/c matches pattern a|b|c +Node /a/b/c[2]/c/b matches pattern a|b|c +Node /a/c matches pattern a|b|c +Node /a/c/b matches pattern a|b|c +Node /a matches pattern /a|b +Node /a/b matches pattern /a|b +Node /a/b/c[1]/b matches pattern /a|b +Node /a/b/c[2]/b matches pattern /a|b +Node /a/b/c[2]/c/b matches pattern /a|b +Node /a/c/b matches pattern /a|b +Node /a matches pattern b|/a +Node /a/b matches pattern b|/a +Node /a/b/c[1]/b matches pattern b|/a +Node /a/b/c[2]/b matches pattern b|/a +Node /a/b/c[2]/c/b matches pattern b|/a +Node /a/c/b matches pattern b|/a +Node /a/b/c[1] matches pattern a//c|b//c +Node /a/b/c[2] matches pattern a//c|b//c +Node /a/b/c[2]/c matches pattern a//c|b//c +Node /a/c matches pattern a//c|b//c +Node /a matches pattern d|e|f|g|h|a diff --git a/result/pattern/multiple b/result/pattern/multiple new file mode 100644 index 0000000..e10390e --- /dev/null +++ b/result/pattern/multiple @@ -0,0 +1,91 @@ +Node /c/b[1]/a[1] matches pattern a +Node /c/b[1]/a[2] matches pattern a +Node /c/c/b/a[1] matches pattern a +Node /c/c/b/a[2] matches pattern a +Node /c/b[2]/a[1] matches pattern a +Node /c/b[2]/a[2] matches pattern a +Node /c/b[1] matches pattern b +Node /c/c/b matches pattern b +Node /c/b[2] matches pattern b +Node /c matches pattern c +Node /c/c matches pattern c +Node /c/b[1] matches pattern c/b +Node /c/c/b matches pattern c/b +Node /c/b[2] matches pattern c/b +Node /c/b[1]/a[1] matches pattern b/a +Node /c/b[1]/a[2] matches pattern b/a +Node /c/c/b/a[1] matches pattern b/a +Node /c/c/b/a[2] matches pattern b/a +Node /c/b[2]/a[1] matches pattern b/a +Node /c/b[2]/a[2] matches pattern b/a +Node /c/b[1]/a[1] matches pattern c/b/a +Node /c/b[1]/a[2] matches pattern c/b/a +Node /c/c/b/a[1] matches pattern c/b/a +Node /c/c/b/a[2] matches pattern c/b/a +Node /c/b[2]/a[1] matches pattern c/b/a +Node /c/b[2]/a[2] matches pattern c/b/a +Node /c/b[1]/a[1] matches pattern c//a +Node /c/b[1]/a[2] matches pattern c//a +Node /c/c/b/a[1] matches pattern c//a +Node /c/c/b/a[2] matches pattern c//a +Node /c/b[2]/a[1] matches pattern c//a +Node /c/b[2]/a[2] matches pattern c//a +Node /c/b[1] matches pattern c//b +Node /c/c/b matches pattern c//b +Node /c/b[2] matches pattern c//b +Node /c/b[1]/a[1] matches pattern b//a +Node /c/b[1]/a[2] matches pattern b//a +Node /c/c/b/a[1] matches pattern b//a +Node /c/c/b/a[2] matches pattern b//a +Node /c/b[2]/a[1] matches pattern b//a +Node /c/b[2]/a[2] matches pattern b//a +Node /c/b[1]/a[1] matches pattern c//b//a +Node /c/b[1]/a[2] matches pattern c//b//a +Node /c/c/b/a[1] matches pattern c//b//a +Node /c/c/b/a[2] matches pattern c//b//a +Node /c/b[2]/a[1] matches pattern c//b//a +Node /c/b[2]/a[2] matches pattern c//b//a +Node /c/b[1]/a[1] matches pattern c/b//a +Node /c/b[1]/a[2] matches pattern c/b//a +Node /c/c/b/a[1] matches pattern c/b//a +Node /c/c/b/a[2] matches pattern c/b//a +Node /c/b[2]/a[1] matches pattern c/b//a +Node /c/b[2]/a[2] matches pattern c/b//a +Node /c/b[1]/a[1] matches pattern c//b/a +Node /c/b[1]/a[2] matches pattern c//b/a +Node /c/c/b/a[1] matches pattern c//b/a +Node /c/c/b/a[2] matches pattern c//b/a +Node /c/b[2]/a[1] matches pattern c//b/a +Node /c/b[2]/a[2] matches pattern c//b/a +Node /c matches pattern /c +Node /c/b[1] matches pattern /c/b +Node /c/b[2] matches pattern /c/b +Node /c/b[1]/a[1] matches pattern /c/b/a +Node /c/b[1]/a[2] matches pattern /c/b/a +Node /c/b[2]/a[1] matches pattern /c/b/a +Node /c/b[2]/a[2] matches pattern /c/b/a +Node /c/b[1]/a[1] matches pattern /c//a +Node /c/b[1]/a[2] matches pattern /c//a +Node /c/c/b/a[1] matches pattern /c//a +Node /c/c/b/a[2] matches pattern /c//a +Node /c/b[2]/a[1] matches pattern /c//a +Node /c/b[2]/a[2] matches pattern /c//a +Node /c/b[1] matches pattern /c//b +Node /c/c/b matches pattern /c//b +Node /c/b[2] matches pattern /c//b +Node /c/b[1]/a[1] matches pattern /c//b//a +Node /c/b[1]/a[2] matches pattern /c//b//a +Node /c/c/b/a[1] matches pattern /c//b//a +Node /c/c/b/a[2] matches pattern /c//b//a +Node /c/b[2]/a[1] matches pattern /c//b//a +Node /c/b[2]/a[2] matches pattern /c//b//a +Node /c/b[1]/a[1] matches pattern /c/b//a +Node /c/b[1]/a[2] matches pattern /c/b//a +Node /c/b[2]/a[1] matches pattern /c/b//a +Node /c/b[2]/a[2] matches pattern /c/b//a +Node /c/b[1]/a[1] matches pattern /c//b/a +Node /c/b[1]/a[2] matches pattern /c//b/a +Node /c/c/b/a[1] matches pattern /c//b/a +Node /c/c/b/a[2] matches pattern /c//b/a +Node /c/b[2]/a[1] matches pattern /c//b/a +Node /c/b[2]/a[2] matches pattern /c//b/a diff --git a/result/pattern/namespaces b/result/pattern/namespaces new file mode 100644 index 0000000..f8b3495 --- /dev/null +++ b/result/pattern/namespaces @@ -0,0 +1,20 @@ +Node /a matches pattern //a +Node /a/b:b/a matches pattern //a +Node /a/a/a matches pattern //a +Node /a/a:a matches pattern //a:a +Node /a/b:b/a/a:a matches pattern //a:a +Node /a/a matches pattern //a:a +Node /a/c:a matches pattern //a:a +Node /a/b matches pattern //b +Node /a/a:a/b:b matches pattern //b:b +Node /a/b:b matches pattern //b:b +Node /a/b:b/a/a:a/b:b matches pattern //b:b +Node /a/b:b/a matches pattern /a//a +Node /a/a/a matches pattern /a//a +Node /a/b matches pattern /a/b +Node /a/a:a matches pattern /a/a:a +Node /a/a matches pattern /a/a:a +Node /a/c:a matches pattern /a/a:a +Node /a/a:a matches pattern /a/c:a +Node /a/a matches pattern /a/c:a +Node /a/c:a matches pattern /a/c:a diff --git a/result/pattern/simple b/result/pattern/simple new file mode 100644 index 0000000..5710b5c --- /dev/null +++ b/result/pattern/simple @@ -0,0 +1,12 @@ +Node /a matches pattern a +Node /a/b matches pattern b +Node /a/b matches pattern b +Node /a matches pattern /a +Node /a/b matches pattern a/b +Node /a/b/c matches pattern a/b/c +Node /a matches pattern //a +Node /a/b matches pattern //b +Node /a/b/c matches pattern //c +Node /a/b matches pattern a//b +Node /a/b/c matches pattern a//c +Node /a/b/c matches pattern b//c diff --git a/result/schemas/anyAttr-processContents-err1_0_0.err b/result/schemas/anyAttr-processContents-err1_0_0.err index 84b3c98..160863d 100644 --- a/result/schemas/anyAttr-processContents-err1_0_0.err +++ b/result/schemas/anyAttr-processContents-err1_0_0.err @@ -1,2 +1,2 @@ ./test/schemas/anyAttr-processContents-err1_0.xml:11: element elem.lax: Schemas validity error : Element 'elem.lax', attribute 'foo:bar' ['language']: The value 'o o' is not valid. -./test/schemas/anyAttr-processContents-err1_0.xml:12: element elem.strict: Schemas validity error : Element 'elem.strict': The attribute 'foo:barB' is not allowed. +./test/schemas/anyAttr-processContents-err1_0.xml:12: element elem.strict: Schemas validity error : Element 'elem.strict', attribute 'foo:barB' [strict wildcard]: No global attribute declaration found, but stipulated by the strict processContents of the wildcard. diff --git a/result/schemas/bug167754_0_0 b/result/schemas/bug167754_0_0 new file mode 100644 index 0000000..27b50fc --- /dev/null +++ b/result/schemas/bug167754_0_0 @@ -0,0 +1 @@ +./test/schemas/bug167754_0.xml validates diff --git a/result/schemas/bug167754_0_0.err b/result/schemas/bug167754_0_0.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/result/schemas/bug167754_0_0.err diff --git a/test/comment3.xml b/test/comment3.xml new file mode 100644 index 0000000..395f67c --- /dev/null +++ b/test/comment3.xml @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of very very long comments and buffer limits +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +--> +<doc/> diff --git a/test/comment4.xml b/test/comment4.xml new file mode 100644 index 0000000..93282d8 --- /dev/null +++ b/test/comment4.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of non ascii comments like là et très --> +<!--à another one --> +<!-- another one à--> +<doc/> diff --git a/test/comment5.xml b/test/comment5.xml new file mode 100644 index 0000000..398f974 --- /dev/null +++ b/test/comment5.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- test of hyphen and line break handling + some text - interrupted - +- - - - - - - - - - - - - - - - - - - - - - + this should stop here^ + + +--> +<doc/> diff --git a/test/errors/webdav.xml b/test/errors/webdav.xml new file mode 100644 index 0000000..981c7c9 --- /dev/null +++ b/test/errors/webdav.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<propfind xmlns="DAV:"><prop> +<getcontentlength xmlns="DAV:"/> +<getlastmodified xmlns="DAV:"/> +<displayname xmlns="DAV:"/> +<executable xmlns="http://apache.org/dav/props/"/> +<resourcetype xmlns="DAV:"/> +</prop></propfind> + diff --git a/test/intsubset2.xml b/test/intsubset2.xml new file mode 100644 index 0000000..4ae845a --- /dev/null +++ b/test/intsubset2.xml @@ -0,0 +1,282 @@ +<?xml version="1.0"?> +<!DOCTYPE kanjidic2 [ + <!-- Version 1.3 + This is the DTD of the XML-format kanji file combining information from + the KANJIDIC and KANJD212 files. It is intended to be largely self- + documenting, with each field being accompanied by an explanatory + comment. + + The file covers the following kanji: + (a) the 6,355 kanji from JIS X 0208; + (b) the 5,801 kanji from JIS X 0212; + (c) the 3,625 kanji from JIS X 0213 as follows: + (i) the 2,741 kanji which are also in JIS X 0212 have + JIS X 0213 code-points (kuten) added to the existing entry; + (ii) the 884 "new" kanji have new entries. + + At the end of the explanation for a number of fields there is a tag + with the format [N]. This indicates the leading letter(s) of the + equivalent field in the KANJIDIC and KANJD212 files. + + The KANJIDIC documentation should also be read for additional + information about the information in the file. + --> +<!ELEMENT kanjidic2 (header,character*)> +<!ELEMENT header (file_version,database_version,date_of_creation)> +<!-- + The single header element will contain identification information + about the version of the file + --> +<!ELEMENT file_version (#PCDATA)> +<!-- + This field denotes the version of kanjidic2 structure, as more + than one version may exist. + --> +<!ELEMENT database_version (#PCDATA)> +<!-- + The version of the file, in the format YYYY-NN, where NN will be + a number starting with 01 for the first version released in a + calendar year, then increasing for each version in that year. + --> +<!ELEMENT date_of_creation (#PCDATA)> +<!-- + The date the file was created in international format (YYYY-MM-DD). + --> +<!ELEMENT character (literal,codepoint, radical, misc, dic_number?, query_code?, reading_meaning?,nanori?)*> +<!ELEMENT literal (#PCDATA)> +<!-- + The character itself in UTF8 coding. + --> +<!ELEMENT codepoint (cp_value+)> + <!-- + The codepoint element states the code of the character in the various + character set standards. + --> +<!ELEMENT cp_value (#PCDATA)> + <!-- + The cp_value contains the codepoint of the character in a particular + standard. The standard will be identified in the cp_type attribute. + --> +<!ATTLIST cp_value cp_type CDATA #REQUIRED> + <!-- + The cp_type attribute states the coding standard applying to the + element. The values assigned so far are: + jis208 - JIS X 0208-1997 - kuten coding (nn-nn) + jis212 - JIS X 0212-1990 - kuten coding (nn-nn) + jis213 - JIS X 0213-2000 - kuten coding (p-nn-nn) + ucs - Unicode 4.0 - hex coding (4 or 5 hexadecimal digits) + --> +<!ELEMENT radical (rad_value+)> +<!ELEMENT rad_value (#PCDATA)> + <!-- + The radical number, in the range 1 to 214. The particular + classification type is stated in the rad_type attribute. + --> +<!ATTLIST rad_value rad_type CDATA #REQUIRED> + <!-- + The rad_type attribute states the type of radical classification. + classical - as recorded in the KangXi Zidian. + nelson - as used in the Nelson "Modern Japanese-English + Character Dictionary" (i.e. the Classic, not the New Nelson). + This will only be used where Nelson reclassified the kanji. + --> +<!ELEMENT misc (grade?, stroke_count+, variant*, freq*, rad_name*)> +<!ELEMENT grade (#PCDATA)> + <!-- + The Jouyou Kanji grade level. 1 through 6 indicate the grade in which + the kanji is taught in Japanese schools. 8 indicates it is one of the + remaining Jouyou Kanji to be learned in junior high school, and 9 + indicates it is a Jinmeiyou (for use in names) kanji. [G] + --> +<!ELEMENT stroke_count (#PCDATA)> + <!-- + The stroke count of the kanji, including the radical. If more than + one, the first is considered the accepted count, while subsequent ones + are common miscounts. (See Appendix E. of the KANJIDIC documentation + for some of the rules applied when counting strokes in some of the + radicals.) [S] + --> +<!ELEMENT variant (#PCDATA)> + <!-- + A cross-reference code to another kanji, usually regarded as a variant. + The type of cross-reference is given in the var_type attribute. + --> +<!ATTLIST variant var_type CDATA #REQUIRED> + <!-- + The var_type attribute indicates the type of variant code. The current + values are: + jis208 - in JIS X 0208 - kuten coding + jis212 - in JIS X 0212 - kuten coding + jis213 - in JIS X 0213 - kuten coding + deroo - De Roo number - numeric + njecd - Halpern NJECD index number - numeric + s_h - The Kanji Dictionary (Spahn & Hadamitzky) - descriptor + nelson - "Classic" Nelson - numeric + oneill - Japanese Names (O'Neill) - numeric + --> +<!ELEMENT freq (#PCDATA)> + <!-- + A frequency-of-use ranking. The 2,500 most-used characters have a + ranking; those characters that lack this field are not ranked. The + frequency is a number from 1 to 2,500 that expresses the relative + frequency of occurrence of a character in modern Japanese. This is + based on a survey in newspapers, so it is biassed towards kanji + used in newspaper articles. The discrimination between the less + frequently used kanji is not strong. + --> +<!ELEMENT rad_name (#PCDATA)> + <!-- + When the kanji is itself a radical and has a name, this element + contains the name (in hiragana.) [T2] + --> +<!ELEMENT dic_number (dic_ref+)> + <!-- + This element contains the index numbers and similar unstructured + information such as page numbers in a number of published dictionaries, + and instructional books on kanji. + --> +<!ELEMENT dic_ref (#PCDATA)> + <!-- + Each dic_ref contains an index number. The particular dictionary, + etc. is defined by the dr_type attribute. + --> +<!ATTLIST dic_ref dr_type CDATA #REQUIRED> + <!-- + The dr_type defines the dictionary or reference book, etc. to which + dic_ref element applies. The initial allocation is: + nelson_c - "Modern Reader's Japanese-English Character Dictionary", + edited by Andrew Nelson (now published as the "Classic" + Nelson). + nelson_n - "The New Nelson Japanese-English Character Dictionary", + edited by John Haig. + halpern_njecd - "New Japanese-English Character Dictionary", + edited by Jack Halpern. + halpern_kkld - "Kanji Learners Dictionary" (Kodansha) edited by + Jack Halpern. + heisig - "Remembering The Kanji" by James Heisig. + gakken - "A New Dictionary of Kanji Usage" (Gakken) + oneill_names - "Japanese Names", by P.G. O'Neill. + oneill_kk - "Essential Kanji" by P.G. O'Neill. + moro - "Daikanwajiten" compiled by Morohashi. For some kanji two + additional attributes are used: m_vol: the volume of the + dictionary in which the kanji is found, and m_page: the page + number in the volume. + henshall - "A Guide To Remembering Japanese Characters" by + Kenneth G. Henshall. + sh_kk - "Kanji and Kana" by Spahn and Hadamitzky. + sakade - "A Guide To Reading and Writing Japanese" edited by + Florence Sakade. + henshall3 - "A Guide To Reading and Writing Japanese" 3rd + edition, edited by Henshall, Seeley and De Groot. + tutt_cards - Tuttle Kanji Cards, compiled by Alexander Kask. + crowley - "The Kanji Way to Japanese Language Power" by + Dale Crowley. + kanji_in_context - "Kanji in Context" by Nishiguchi and Kono. + busy_people - "Japanese For Busy People" vols I-III, published + by the AJLT. The codes are the volume.chapter. + kodansha_compact - the "Kodansha Compact Kanji Guide". + --> +<!ATTLIST dic_ref m_vol CDATA #IMPLIED> + <!-- + See above under "moro". + --> +<!ATTLIST dic_ref m_page CDATA #IMPLIED> + <!-- + See above under "moro". + --> +<!ELEMENT query_code (q_code+)> + <!-- + These codes contain information relating to the glyph, and can be used + for finding a required kanji. The type of code is defined by the + qc_type attribute. + --> +<!ELEMENT q_code (#PCDATA)> + <!-- + The q_code contains the actual query-code value, according to the + qc_type attribute. + --> +<!ATTLIST q_code qc_type CDATA #REQUIRED> + <!-- + The q_code attribute defines the type of query code. The current values + are: + skip - Halpern's SKIP (System of Kanji Indexing by Patterns) + code. The format is n-nn-nn. See the KANJIDIC documentation + for a description of the code and restrictions on the + commercial use of this data. [P] + + sh_desc - the descriptor codes for The Kanji Dictionary (Tuttle + 1996) by Spahn and Hadamitzky. They are in the form nxnn.n, + e.g. 3k11.2, where the kanji has 3 strokes in the + identifying radical, it is radical "k" in the SH + classification system, there are 11 other strokes, and it is + the 2nd kanji in the 3k11 sequence. (I am very grateful to + Mark Spahn for providing the list of these descriptor codes + for the kanji in this file.) [I] + four_corner - the "Four Corner" code for the kanji. This is a code + invented by Wang Chen in 1928. See the KANJIDIC documentation + for an overview of the Four Corner System. [Q] + + deroo - the codes developed by the late Father Joseph De Roo, and + published in his book "2001 Kanji" (Bojinsha). Fr De Roo + gave his permission for these codes to be included. [DR] + misclass - a possible misclassification of the kanji according + to one of the code types. (See the "Z" codes in the KANJIDIC + documentation for more details.) + + --> +<!ELEMENT reading_meaning (rmgroup*, nanori*)> + <!-- + The readings for the kanji in several languages, and the meanings, also + in several languages. The readings and meanings are grouped to enable + the handling of the situation where the meaning is differentiated by + reading. [T1] + --> +<!ELEMENT nanori (#PCDATA)> + <!-- + Japanese readings that are now only associated with names. + --> +<!ELEMENT rmgroup (reading*, meaning*)> +<!ELEMENT reading (#PCDATA)> + <!-- + The reading element contains the reading or pronunciation + of the kanji. + --> +<!ATTLIST reading r_type CDATA #REQUIRED> + <!-- + The r_type attribute defines the type of reading in the reading + element. The current values are: + pinyin - the modern PinYin romanization of the Chinese reading + of the kanji. The tones are represented by a concluding + digit. [Y] + korean_r - the romanized form of the Korean reading(s) of the + kanji. The readings are in the (Republic of Korea) Ministry + of Education style of romanization. [W] + korean_h - the Korean reading(s) of the kanji in hangul. + ja_on - the "on" Japanese reading of the kanji, in katakana. A + second attribute r_status, if present, will indicate with + a value of "jy" whether the reading is approved for a + "Jouyou kanji". + ja_kun - the "kun" Japanese reading of the kanji, in hiragana. + Where relevant the okurigana is also included separated by a + ".". Readings associated with prefixes and suffixes are + marked with a "-". A second attribute r_status, if present, + will indicate with a value of "jy" whether the reading is + approved for a "Jouyou kanji". + --> +<!ATTLIST reading r_status CDATA #IMPLIED> + <!-- + See under ja_on and ja_kun above. + --> +<!ELEMENT meaning (#PCDATA)> + <!-- + The meaning associated with the kanji. + --> +<!ATTLIST meaning m_lang CDATA #IMPLIED> + <!-- + The m_lang attribute defines the target language of the meaning. It + will be coded using the two-letter language code from the ISO 639 + standard. When absent, the value "en" (i.e. English) is implied. [{}] + --> +] > +<kanjidic2> +</kanjidic2> diff --git a/test/pattern/conj.pat b/test/pattern/conj.pat new file mode 100644 index 0000000..ca80a06 --- /dev/null +++ b/test/pattern/conj.pat @@ -0,0 +1,8 @@ +a|b +a|c +b|c +a|b|c +/a|b +b|/a +a//c|b//c +d|e|f|g|h|a diff --git a/test/pattern/conj.xml b/test/pattern/conj.xml new file mode 100644 index 0000000..c1c770e --- /dev/null +++ b/test/pattern/conj.xml @@ -0,0 +1,13 @@ +<a> + <b> + <c><b/></c> + <c> + <b/> + <c><b/></c> + </c> + </b> + <c> + <b> + </b> + </c> +</a> diff --git a/test/pattern/multiple.pat b/test/pattern/multiple.pat new file mode 100644 index 0000000..3f1ee3e --- /dev/null +++ b/test/pattern/multiple.pat @@ -0,0 +1,27 @@ +a +b +c +c/a +c/b +b/a +c/b/a +c//a +c//b +b//a +c//b//a +c/b//a +c//b/a +/a +/b +/c +/c/a +/c/b +/b/a +/c/b/a +/c//a +/c//b +/b//a +/c//b//a +/c/b//a +/c//b/a + diff --git a/test/pattern/multiple.xml b/test/pattern/multiple.xml new file mode 100644 index 0000000..62f31a5 --- /dev/null +++ b/test/pattern/multiple.xml @@ -0,0 +1,5 @@ +<c> +<b><a/><a/></b> +<c><b><a/><a/></b></c> +<b><a/><a/></b> +</c> diff --git a/test/pattern/namespaces.pat b/test/pattern/namespaces.pat new file mode 100644 index 0000000..c273a10 --- /dev/null +++ b/test/pattern/namespaces.pat @@ -0,0 +1,10 @@ +//a +//a:a +//b +//b:b +/a//a +/a/a +/a/b +/a/a:a +/a/a:b +/a/c:a diff --git a/test/pattern/namespaces.xml b/test/pattern/namespaces.xml new file mode 100644 index 0000000..1ebb50f --- /dev/null +++ b/test/pattern/namespaces.xml @@ -0,0 +1,17 @@ +<a xmlns:a="http://a" xmlns:b="http://b" xmlns:c="http://a"> + <b/> + <a:a> + <b:b/> + </a:a> + <b:b> + <a> + <a:a> + <b:b/> + </a:a> + </a> + </b:b> + <a xmlns="http://a"> + <a xmlns=""/> + </a> + <c:a/> +</a> diff --git a/test/pattern/simple.pat b/test/pattern/simple.pat new file mode 100644 index 0000000..1b298ae --- /dev/null +++ b/test/pattern/simple.pat @@ -0,0 +1,15 @@ +a +b +b +/a +/b +/c +a/b +a/b/c +//a +//b +//c +a//b +a//c +b//c + diff --git a/test/pattern/simple.xml b/test/pattern/simple.xml new file mode 100644 index 0000000..16ac6c2 --- /dev/null +++ b/test/pattern/simple.xml @@ -0,0 +1,5 @@ +<a> + <b> + <c d="attr">text</c> + </b> +</a> diff --git a/test/schemas/annot-err_0.xsd b/test/schemas/annot-err_0.xsd index 70df4f7..94d818c 100644 --- a/test/schemas/annot-err_0.xsd +++ b/test/schemas/annot-err_0.xsd @@ -4,13 +4,13 @@ xmlns:goo="http://GOO" xmlns:but="http://BUT"> <xsd:element name="foo" xml:lang="hhh"> - <xsd:annotation id="?" death="is a good entertainer" but:such="is life"> + <xsd:annotation id="id1" death="is a good entertainer" but:such="is life"> I shouldn't do this here... - <xsd:appinfo id="?" source="somewhere" + <xsd:appinfo id="id2" source="somewhere" goo:fun="bag" fun="another fun-bag"> weeelll </xsd:appinfo> - <xsd:documentation xml:lang="*" id="?" source="anywhere" + <xsd:documentation xml:lang="*" id="id3" source="anywhere" goo:mothers="of invention" mothers="don't do your dishes"> hmmmmmm </xsd:documentation> @@ -18,4 +18,4 @@ </xsd:annotation> </xsd:element> -</xsd:schema>
\ No newline at end of file +</xsd:schema> diff --git a/test/schemas/bug167754_0.xml b/test/schemas/bug167754_0.xml new file mode 100644 index 0000000..e5ec7d7 --- /dev/null +++ b/test/schemas/bug167754_0.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<test xmlns="http://www.example.com/Test" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.example.com/Test bug167754.xsd"> + <child> + <foo/> + </child> + <child> + <foo/> + <joe/> + </child> +</test> diff --git a/test/schemas/bug167754_0.xsd b/test/schemas/bug167754_0.xsd new file mode 100644 index 0000000..e7883d2 --- /dev/null +++ b/test/schemas/bug167754_0.xsd @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<xsd:schema + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:target="http://www.example.com/Test" + targetNamespace="http://www.example.com/Test" + version="1.0" + elementFormDefault="qualified" > + + <xsd:element name="foo" /> + <xsd:element name="bar" /> + <xsd:element name="joe" /> + + <xsd:complexType name="dominik"> + <xsd:all> + <xsd:element minOccurs="0" ref="target:foo" /> + <xsd:element minOccurs="0" ref="target:bar" /> + <xsd:element minOccurs="0" ref="target:joe" /> + </xsd:all> + </xsd:complexType> + + <xsd:element name="test"> + <xsd:complexType> + <xsd:sequence> + <xsd:element maxOccurs="unbounded" name="child" type="target:dominik" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + +</xsd:schema>
\ No newline at end of file diff --git a/test/schemas/element-err_0.xsd b/test/schemas/element-err_0.xsd index a5c696f..92604c8 100644 --- a/test/schemas/element-err_0.xsd +++ b/test/schemas/element-err_0.xsd @@ -17,7 +17,7 @@ <xsd:sequence> <xsd:element ref="foo:bar" name="myomy" minOccurs="3" maxOccurs="2" abstract="true" block="flute" - form="qualified" id="b12" nillable="true" + form="qualified" id="b13" nillable="true" substitutionGroup="foo:bar" type="xsd:string" default="Jimi" fixed="Hendrix" final="fantasy"> <xsd:complexType/> @@ -25,7 +25,7 @@ </xsd:element> <xsd:element name="myomy" maxOccurs="0" abstract="true" block="flute" - form="qualified" id="b12" nillable="true" + form="qualified" id="b14" nillable="true" substitutionGroup="foo:bar" type="xsd:string" default="Jimi" fixed="Hendrix" final="fantasy"> <xsd:complexType/> diff --git a/testReader.c b/testReader.c index a874250..4d5711b 100644 --- a/testReader.c +++ b/testReader.c @@ -39,12 +39,14 @@ int dump = 0; int noent = 0; int count = 0; int valid = 0; +int consumed = 0; static void usage(const char *progname) { printf("Usage : %s [options] XMLfiles ...\n", progname); printf("\tParse the XML files using the xmlTextReader API\n"); printf("\t --count: count the number of attribute and elements\n"); printf("\t --valid: validate the document\n"); + printf("\t --consumed: count the number of bytes consumed\n"); exit(1); } static int elem, attrs; @@ -87,6 +89,8 @@ static void handleFile(const char *filename) { /* * Done, cleanup and status */ + if (consumed) + printf("%ld bytes consumed by parser\n", xmlTextReaderByteConsumed(reader)); xmlFreeTextReader(reader); if (ret != 0) { printf("%s : failed to parse\n", filename); @@ -113,6 +117,8 @@ int main(int argc, char **argv) { dump++; else if ((!strcmp(argv[i], "-count")) || (!strcmp(argv[i], "--count"))) count++; + else if ((!strcmp(argv[i], "-consumed")) || (!strcmp(argv[i], "--consumed"))) + consumed++; else if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid"))) valid++; else if ((!strcmp(argv[i], "-noent")) || @@ -193,6 +193,14 @@ int main(int argc, char **argv) { */ void xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra); +/* + We need some "remote" addresses, but want to avoid getting into + name resolution delays, so we use these +*/ +#define REMOTE1GOOD "http://localhost/" +#define REMOTE1BAD "http://missing. example.org/" +#define REMOTE2GOOD "ftp://localhost/foo" + #define gen_nb_void_ptr 2 static void *gen_void_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -392,8 +400,8 @@ static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) { if (no == 2) return("test/ent2"); if (no == 3) return("test/valid/REC-xml-19980210.xml"); if (no == 4) return("test/valid/dtds/xhtml1-strict.dtd"); - if (no == 5) return("http://missing.example.org/"); - if (no == 6) return("http://missing. example.org/"); + if (no == 5) return(REMOTE1GOOD); + if (no == 6) return(REMOTE1BAD); return(NULL); } static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -413,9 +421,9 @@ static void des_eaten_name(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSE static const char *gen_fileoutput(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return("/missing.xml"); if (no == 1) return("<foo/>"); - if (no == 2) return("ftp://missing.example.org/foo"); - if (no == 3) return("http://missing.example.org/"); - if (no == 4) return("http://missing. example.org/"); + if (no == 2) return(REMOTE2GOOD); + if (no == 3) return(REMOTE1GOOD); + if (no == 4) return(REMOTE1BAD); return(NULL); } static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -464,8 +472,8 @@ static xmlParserInputBufferPtr gen_xmlParserInputBufferPtr(int no, int nr ATTRIB if (no == 2) return(xmlParserInputBufferCreateFilename("test/ent2", XML_CHAR_ENCODING_NONE)); if (no == 3) return(xmlParserInputBufferCreateFilename("test/valid/REC-xml-19980210.xml", XML_CHAR_ENCODING_NONE)); if (no == 4) return(xmlParserInputBufferCreateFilename("test/valid/dtds/xhtml1-strict.dtd", XML_CHAR_ENCODING_NONE)); - if (no == 5) return(xmlParserInputBufferCreateFilename("http://missing.example.org/", XML_CHAR_ENCODING_NONE)); - if (no == 6) return(xmlParserInputBufferCreateFilename("http://missing. example.org/", XML_CHAR_ENCODING_NONE)); + if (no == 5) return(xmlParserInputBufferCreateFilename(REMOTE1GOOD, XML_CHAR_ENCODING_NONE)); + if (no == 6) return(xmlParserInputBufferCreateFilename(REMOTE1BAD, XML_CHAR_ENCODING_NONE)); return(NULL); } static void des_xmlParserInputBufferPtr(int no ATTRIBUTE_UNUSED, xmlParserInputBufferPtr val, int nr ATTRIBUTE_UNUSED) { @@ -642,8 +650,8 @@ static void des_xmlOutputBufferPtr(int no ATTRIBUTE_UNUSED, xmlOutputBufferPtr v #ifdef LIBXML_FTP_ENABLED #define gen_nb_xmlNanoFTPCtxtPtr 4 static void *gen_xmlNanoFTPCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) { - if (no == 0) return(xmlNanoFTPNewCtxt("ftp://example.com/")); - if (no == 1) return(xmlNanoFTPNewCtxt("http://example.com/")); + if (no == 0) return(xmlNanoFTPNewCtxt(REMOTE2GOOD)); + if (no == 1) return(xmlNanoFTPNewCtxt(REMOTE1GOOD)); if (no == 2) return(xmlNanoFTPNewCtxt("foo")); return(NULL); } @@ -656,10 +664,16 @@ static void des_xmlNanoFTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val, int nr ATT #ifdef LIBXML_HTTP_ENABLED #define gen_nb_xmlNanoHTTPCtxtPtr 1 -static void *gen_xmlNanoHTTPCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +static void *gen_xmlNanoHTTPCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) { + if (no == 0) return(xmlNanoHTTPOpen(REMOTE1GOOD, NULL)); + if (no == 1) return(xmlNanoHTTPOpen(REMOTE2GOOD, NULL)); + if (no == 2) return(xmlNanoHTTPOpen(REMOTE1BAD, NULL)); return(NULL); } -static void des_xmlNanoHTTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +static void des_xmlNanoHTTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val, int nr ATTRIBUTE_UNUSED) { + if (val != NULL) { + xmlNanoHTTPClose(val); + } } #endif @@ -667,7 +681,7 @@ static void des_xmlNanoHTTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_ static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return(XML_CHAR_ENCODING_UTF8); if (no == 1) return(XML_CHAR_ENCODING_NONE); - if (no == 0) return(XML_CHAR_ENCODING_8859_1); + if (no == 2) return(XML_CHAR_ENCODING_8859_1); return(XML_CHAR_ENCODING_ERROR); } static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -800,8 +814,15 @@ static void desret_xmlRelaxNGParserCtxtPtr(xmlRelaxNGParserCtxtPtr val) { #ifdef LIBXML_HTML_ENABLED static void desret_const_htmlEntityDesc_ptr(const htmlEntityDesc * val ATTRIBUTE_UNUSED) { } +static void desret_xmlNanoHTTPCtxtPtr(void *val) { + xmlNanoHTTPClose(val); +} +#endif +#ifdef LIBXML_FTP_ENABLED +static void desret_xmlNanoFTPCtxtPtr(void *val) { + xmlNanoFTPClose(val); +} #endif - /* cut and pasted from autogenerated to avoid troubles */ #define gen_nb_const_xmlChar_ptr_ptr 1 static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -1045,6 +1066,21 @@ static void des_xmlSchemaValType(int no ATTRIBUTE_UNUSED, xmlSchemaValType val A #endif +#ifdef LIBXML_SCHEMAS_ENABLED +#define gen_nb_xmlSchemaWhitespaceValueType 4 +static xmlSchemaWhitespaceValueType gen_xmlSchemaWhitespaceValueType(int no, int nr ATTRIBUTE_UNUSED) { + if (no == 1) return(XML_SCHEMA_WHITESPACE_COLLAPSE); + if (no == 2) return(XML_SCHEMA_WHITESPACE_PRESERVE); + if (no == 3) return(XML_SCHEMA_WHITESPACE_REPLACE); + if (no == 4) return(XML_SCHEMA_WHITESPACE_UNKNOWN); + return(0); +} + +static void des_xmlSchemaWhitespaceValueType(int no ATTRIBUTE_UNUSED, xmlSchemaWhitespaceValueType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} + +#endif + #include <libxml/HTMLparser.h> #include <libxml/HTMLtree.h> #include <libxml/SAX2.h> @@ -7938,6 +7974,29 @@ test_debugXML(void) { } static int +test_xmlDictCleanup(void) { + int test_ret = 0; + + int mem_base; + + mem_base = xmlMemBlocks(); + + xmlDictCleanup(); + call_tests++; + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlDictCleanup", + xmlMemBlocks() - mem_base); + test_ret++; + printf("\n"); + } + function_tests++; + + return(test_ret); +} + + +static int test_xmlDictCreate(void) { int test_ret = 0; @@ -8239,7 +8298,8 @@ static int test_dict(void) { int test_ret = 0; - if (quiet == 0) printf("Testing dict : 8 of 9 functions ...\n"); + if (quiet == 0) printf("Testing dict : 9 of 10 functions ...\n"); + test_ret += test_xmlDictCleanup(); test_ret += test_xmlDictCreate(); test_ret += test_xmlDictCreateSub(); test_ret += test_xmlDictExists(); @@ -9617,6 +9677,16 @@ test_xmlHashCreate(void) { static int +test_xmlHashCreateDict(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + +static int test_xmlHashLookup(void) { int test_ret = 0; @@ -10348,12 +10418,13 @@ static int test_hash(void) { int test_ret = 0; - if (quiet == 0) printf("Testing hash : 16 of 23 functions ...\n"); + if (quiet == 0) printf("Testing hash : 16 of 24 functions ...\n"); test_ret += test_xmlHashAddEntry(); test_ret += test_xmlHashAddEntry2(); test_ret += test_xmlHashAddEntry3(); test_ret += test_xmlHashCopy(); test_ret += test_xmlHashCreate(); + test_ret += test_xmlHashCreateDict(); test_ret += test_xmlHashLookup(); test_ret += test_xmlHashLookup2(); test_ret += test_xmlHashLookup3(); @@ -11492,8 +11563,32 @@ static int test_xmlNanoFTPNewCtxt(void) { int test_ret = 0; +#if defined(LIBXML_FTP_ENABLED) + int mem_base; + void * ret_val; + const char * URL; /* The URL used to initialize the context */ + int n_URL; + + for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) { + mem_base = xmlMemBlocks(); + URL = gen_filepath(n_URL, 0); + + ret_val = xmlNanoFTPNewCtxt(URL); + desret_xmlNanoFTPCtxtPtr(ret_val); + call_tests++; + des_filepath(n_URL, URL, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlNanoFTPNewCtxt", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_URL); + printf("\n"); + } + } + function_tests++; +#endif - /* missing type support */ return(test_ret); } @@ -11513,7 +11608,7 @@ test_xmlNanoFTPOpen(void) { URL = gen_filepath(n_URL, 0); ret_val = xmlNanoFTPOpen(URL); - desret_void_ptr(ret_val); + desret_xmlNanoFTPCtxtPtr(ret_val); call_tests++; des_filepath(n_URL, URL, 0); xmlResetLastError(); @@ -11728,7 +11823,7 @@ static int test_nanoftp(void) { int test_ret = 0; - if (quiet == 0) printf("Testing nanoftp : 15 of 22 functions ...\n"); + if (quiet == 0) printf("Testing nanoftp : 16 of 22 functions ...\n"); test_ret += test_xmlNanoFTPCheckResponse(); test_ret += test_xmlNanoFTPCleanup(); test_ret += test_xmlNanoFTPCloseConnection(); @@ -11813,38 +11908,6 @@ test_xmlNanoHTTPCleanup(void) { static int -test_xmlNanoHTTPClose(void) { - int test_ret = 0; - -#if defined(LIBXML_HTTP_ENABLED) - int mem_base; - void * ctx; /* the HTTP context */ - int n_ctx; - - for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) { - mem_base = xmlMemBlocks(); - ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0); - - xmlNanoHTTPClose(ctx); - call_tests++; - des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0); - xmlResetLastError(); - if (mem_base != xmlMemBlocks()) { - printf("Leak of %d blocks found in xmlNanoHTTPClose", - xmlMemBlocks() - mem_base); - test_ret++; - printf(" %d", n_ctx); - printf("\n"); - } - } - function_tests++; -#endif - - return(test_ret); -} - - -static int test_xmlNanoHTTPContentLength(void) { int test_ret = 0; @@ -11933,19 +11996,19 @@ test_xmlNanoHTTPFetch(void) { char ** contentType; /* if available the Content-Type information will be returned at that location */ int n_contentType; - for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) { - for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) { + for (n_URL = 0;n_URL < gen_nb_fileoutput;n_URL++) { + for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) { for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) { mem_base = xmlMemBlocks(); - URL = gen_filepath(n_URL, 0); - filename = gen_filepath(n_filename, 1); + URL = gen_fileoutput(n_URL, 0); + filename = gen_fileoutput(n_filename, 1); contentType = gen_char_ptr_ptr(n_contentType, 2); ret_val = xmlNanoHTTPFetch(URL, filename, contentType); desret_int(ret_val); call_tests++; - des_filepath(n_URL, URL, 0); - des_filepath(n_filename, filename, 1); + des_fileoutput(n_URL, URL, 0); + des_fileoutput(n_filename, filename, 1); des_char_ptr_ptr(n_contentType, contentType, 2); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { @@ -11993,151 +12056,6 @@ test_xmlNanoHTTPInit(void) { static int -test_xmlNanoHTTPMethod(void) { - int test_ret = 0; - -#if defined(LIBXML_HTTP_ENABLED) - int mem_base; - void * ret_val; - const char * URL; /* The URL to load */ - int n_URL; - char * method; /* the HTTP method to use */ - int n_method; - char * input; /* the input string if any */ - int n_input; - char ** contentType; /* the Content-Type information IN and OUT */ - int n_contentType; - char * headers; /* the extra headers */ - int n_headers; - int ilen; /* input length */ - int n_ilen; - - for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) { - for (n_method = 0;n_method < gen_nb_const_char_ptr;n_method++) { - for (n_input = 0;n_input < gen_nb_const_char_ptr;n_input++) { - for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) { - for (n_headers = 0;n_headers < gen_nb_const_char_ptr;n_headers++) { - for (n_ilen = 0;n_ilen < gen_nb_int;n_ilen++) { - mem_base = xmlMemBlocks(); - URL = gen_filepath(n_URL, 0); - method = gen_const_char_ptr(n_method, 1); - input = gen_const_char_ptr(n_input, 2); - contentType = gen_char_ptr_ptr(n_contentType, 3); - headers = gen_const_char_ptr(n_headers, 4); - ilen = gen_int(n_ilen, 5); - - ret_val = xmlNanoHTTPMethod(URL, (const char *)method, (const char *)input, contentType, (const char *)headers, ilen); - desret_void_ptr(ret_val); - call_tests++; - des_filepath(n_URL, URL, 0); - des_const_char_ptr(n_method, (const char *)method, 1); - des_const_char_ptr(n_input, (const char *)input, 2); - des_char_ptr_ptr(n_contentType, contentType, 3); - des_const_char_ptr(n_headers, (const char *)headers, 4); - des_int(n_ilen, ilen, 5); - xmlResetLastError(); - if (mem_base != xmlMemBlocks()) { - printf("Leak of %d blocks found in xmlNanoHTTPMethod", - xmlMemBlocks() - mem_base); - test_ret++; - printf(" %d", n_URL); - printf(" %d", n_method); - printf(" %d", n_input); - printf(" %d", n_contentType); - printf(" %d", n_headers); - printf(" %d", n_ilen); - printf("\n"); - } - } - } - } - } - } - } - function_tests++; -#endif - - return(test_ret); -} - - -static int -test_xmlNanoHTTPMethodRedir(void) { - int test_ret = 0; - -#if defined(LIBXML_HTTP_ENABLED) - int mem_base; - void * ret_val; - const char * URL; /* The URL to load */ - int n_URL; - char * method; /* the HTTP method to use */ - int n_method; - char * input; /* the input string if any */ - int n_input; - char ** contentType; /* the Content-Type information IN and OUT */ - int n_contentType; - char ** redir; /* the redirected URL OUT */ - int n_redir; - char * headers; /* the extra headers */ - int n_headers; - int ilen; /* input length */ - int n_ilen; - - for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) { - for (n_method = 0;n_method < gen_nb_const_char_ptr;n_method++) { - for (n_input = 0;n_input < gen_nb_const_char_ptr;n_input++) { - for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) { - for (n_redir = 0;n_redir < gen_nb_char_ptr_ptr;n_redir++) { - for (n_headers = 0;n_headers < gen_nb_const_char_ptr;n_headers++) { - for (n_ilen = 0;n_ilen < gen_nb_int;n_ilen++) { - mem_base = xmlMemBlocks(); - URL = gen_filepath(n_URL, 0); - method = gen_const_char_ptr(n_method, 1); - input = gen_const_char_ptr(n_input, 2); - contentType = gen_char_ptr_ptr(n_contentType, 3); - redir = gen_char_ptr_ptr(n_redir, 4); - headers = gen_const_char_ptr(n_headers, 5); - ilen = gen_int(n_ilen, 6); - - ret_val = xmlNanoHTTPMethodRedir(URL, (const char *)method, (const char *)input, contentType, redir, (const char *)headers, ilen); - desret_void_ptr(ret_val); - call_tests++; - des_filepath(n_URL, URL, 0); - des_const_char_ptr(n_method, (const char *)method, 1); - des_const_char_ptr(n_input, (const char *)input, 2); - des_char_ptr_ptr(n_contentType, contentType, 3); - des_char_ptr_ptr(n_redir, redir, 4); - des_const_char_ptr(n_headers, (const char *)headers, 5); - des_int(n_ilen, ilen, 6); - xmlResetLastError(); - if (mem_base != xmlMemBlocks()) { - printf("Leak of %d blocks found in xmlNanoHTTPMethodRedir", - xmlMemBlocks() - mem_base); - test_ret++; - printf(" %d", n_URL); - printf(" %d", n_method); - printf(" %d", n_input); - printf(" %d", n_contentType); - printf(" %d", n_redir); - printf(" %d", n_headers); - printf(" %d", n_ilen); - printf("\n"); - } - } - } - } - } - } - } - } - function_tests++; -#endif - - return(test_ret); -} - - -static int test_xmlNanoHTTPMimeType(void) { int test_ret = 0; @@ -12190,7 +12108,7 @@ test_xmlNanoHTTPOpen(void) { contentType = gen_char_ptr_ptr(n_contentType, 1); ret_val = xmlNanoHTTPOpen(URL, contentType); - desret_void_ptr(ret_val); + desret_xmlNanoHTTPCtxtPtr(ret_val); call_tests++; des_filepath(n_URL, URL, 0); des_char_ptr_ptr(n_contentType, contentType, 1); @@ -12235,7 +12153,7 @@ test_xmlNanoHTTPOpenRedir(void) { redir = gen_char_ptr_ptr(n_redir, 2); ret_val = xmlNanoHTTPOpenRedir(URL, contentType, redir); - desret_void_ptr(ret_val); + desret_xmlNanoHTTPCtxtPtr(ret_val); call_tests++; des_filepath(n_URL, URL, 0); des_char_ptr_ptr(n_contentType, contentType, 1); @@ -12419,16 +12337,13 @@ static int test_nanohttp(void) { int test_ret = 0; - if (quiet == 0) printf("Testing nanohttp : 16 of 17 functions ...\n"); + if (quiet == 0) printf("Testing nanohttp : 13 of 17 functions ...\n"); test_ret += test_xmlNanoHTTPAuthHeader(); test_ret += test_xmlNanoHTTPCleanup(); - test_ret += test_xmlNanoHTTPClose(); test_ret += test_xmlNanoHTTPContentLength(); test_ret += test_xmlNanoHTTPEncoding(); test_ret += test_xmlNanoHTTPFetch(); test_ret += test_xmlNanoHTTPInit(); - test_ret += test_xmlNanoHTTPMethod(); - test_ret += test_xmlNanoHTTPMethodRedir(); test_ret += test_xmlNanoHTTPMimeType(); test_ret += test_xmlNanoHTTPOpen(); test_ret += test_xmlNanoHTTPOpenRedir(); @@ -16657,6 +16572,50 @@ test_parserInternals(void) { } static int +test_xmlPatternFromRoot(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlPatternPtr comp; /* the precompiled pattern */ + int n_comp; + + for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) { + mem_base = xmlMemBlocks(); + comp = gen_xmlPatternPtr(n_comp, 0); + + ret_val = xmlPatternFromRoot(comp); + desret_int(ret_val); + call_tests++; + des_xmlPatternPtr(n_comp, comp, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlPatternFromRoot", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_comp); + printf("\n"); + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int +test_xmlPatternGetStreamCtxt(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + +static int test_xmlPatternMatch(void) { int test_ret = 0; @@ -16698,6 +16657,74 @@ test_xmlPatternMatch(void) { static int +test_xmlPatternMaxDepth(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlPatternPtr comp; /* the precompiled pattern */ + int n_comp; + + for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) { + mem_base = xmlMemBlocks(); + comp = gen_xmlPatternPtr(n_comp, 0); + + ret_val = xmlPatternMaxDepth(comp); + desret_int(ret_val); + call_tests++; + des_xmlPatternPtr(n_comp, comp, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlPatternMaxDepth", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_comp); + printf("\n"); + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int +test_xmlPatternStreamable(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlPatternPtr comp; /* the precompiled pattern */ + int n_comp; + + for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) { + mem_base = xmlMemBlocks(); + comp = gen_xmlPatternPtr(n_comp, 0); + + ret_val = xmlPatternStreamable(comp); + desret_int(ret_val); + call_tests++; + des_xmlPatternPtr(n_comp, comp, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlPatternStreamable", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_comp); + printf("\n"); + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int test_xmlPatterncompile(void) { int test_ret = 0; @@ -16706,13 +16733,157 @@ test_xmlPatterncompile(void) { return(test_ret); } + +#define gen_nb_xmlStreamCtxtPtr 1 +static xmlStreamCtxtPtr gen_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, xmlStreamCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} + +static int +test_xmlStreamPop(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlStreamCtxtPtr stream; /* the stream context */ + int n_stream; + + for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) { + mem_base = xmlMemBlocks(); + stream = gen_xmlStreamCtxtPtr(n_stream, 0); + + ret_val = xmlStreamPop(stream); + desret_int(ret_val); + call_tests++; + des_xmlStreamCtxtPtr(n_stream, stream, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlStreamPop", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_stream); + printf("\n"); + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int +test_xmlStreamPush(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlStreamCtxtPtr stream; /* the stream context */ + int n_stream; + xmlChar * name; /* the current name */ + int n_name; + xmlChar * ns; /* the namespace name */ + int n_ns; + + for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) { + for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) { + for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) { + mem_base = xmlMemBlocks(); + stream = gen_xmlStreamCtxtPtr(n_stream, 0); + name = gen_const_xmlChar_ptr(n_name, 1); + ns = gen_const_xmlChar_ptr(n_ns, 2); + + ret_val = xmlStreamPush(stream, (const xmlChar *)name, (const xmlChar *)ns); + desret_int(ret_val); + call_tests++; + des_xmlStreamCtxtPtr(n_stream, stream, 0); + des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1); + des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlStreamPush", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_stream); + printf(" %d", n_name); + printf(" %d", n_ns); + printf("\n"); + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int +test_xmlStreamPushAttr(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlStreamCtxtPtr stream; /* the stream context */ + int n_stream; + xmlChar * name; /* the current name */ + int n_name; + xmlChar * ns; /* the namespace name */ + int n_ns; + + for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) { + for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) { + for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) { + mem_base = xmlMemBlocks(); + stream = gen_xmlStreamCtxtPtr(n_stream, 0); + name = gen_const_xmlChar_ptr(n_name, 1); + ns = gen_const_xmlChar_ptr(n_ns, 2); + + ret_val = xmlStreamPushAttr(stream, (const xmlChar *)name, (const xmlChar *)ns); + desret_int(ret_val); + call_tests++; + des_xmlStreamCtxtPtr(n_stream, stream, 0); + des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1); + des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlStreamPushAttr", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_stream); + printf(" %d", n_name); + printf(" %d", n_ns); + printf("\n"); + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + static int test_pattern(void) { int test_ret = 0; - if (quiet == 0) printf("Testing pattern : 1 of 4 functions ...\n"); + if (quiet == 0) printf("Testing pattern : 7 of 12 functions ...\n"); + test_ret += test_xmlPatternFromRoot(); + test_ret += test_xmlPatternGetStreamCtxt(); test_ret += test_xmlPatternMatch(); + test_ret += test_xmlPatternMaxDepth(); + test_ret += test_xmlPatternStreamable(); test_ret += test_xmlPatterncompile(); + test_ret += test_xmlStreamPop(); + test_ret += test_xmlStreamPush(); + test_ret += test_xmlStreamPushAttr(); if (test_ret != 0) printf("Module pattern: %d errors\n", test_ret); @@ -23591,6 +23762,45 @@ test_xmlCopyAttributeTable(void) { static int +test_xmlCopyDocElementContent(void) { + int test_ret = 0; + + int mem_base; + xmlElementContentPtr ret_val; + xmlDocPtr doc; /* the document owning the element declaration */ + int n_doc; + xmlElementContentPtr cur; /* An element content pointer. */ + int n_cur; + + for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { + for (n_cur = 0;n_cur < gen_nb_xmlElementContentPtr;n_cur++) { + mem_base = xmlMemBlocks(); + doc = gen_xmlDocPtr(n_doc, 0); + cur = gen_xmlElementContentPtr(n_cur, 1); + + ret_val = xmlCopyDocElementContent(doc, cur); + desret_xmlElementContentPtr(ret_val); + call_tests++; + des_xmlDocPtr(n_doc, doc, 0); + des_xmlElementContentPtr(n_cur, cur, 1); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlCopyDocElementContent", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_doc); + printf(" %d", n_cur); + printf("\n"); + } + } + } + function_tests++; + + return(test_ret); +} + + +static int test_xmlCopyElementContent(void) { int test_ret = 0; @@ -24306,6 +24516,53 @@ test_xmlIsRef(void) { static int +test_xmlNewDocElementContent(void) { + int test_ret = 0; + + int mem_base; + xmlElementContentPtr ret_val; + xmlDocPtr doc; /* the document */ + int n_doc; + xmlChar * name; /* the subelement name or NULL */ + int n_name; + xmlElementContentType type; /* the type of element content decl */ + int n_type; + + for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { + for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) { + for (n_type = 0;n_type < gen_nb_xmlElementContentType;n_type++) { + mem_base = xmlMemBlocks(); + doc = gen_xmlDocPtr(n_doc, 0); + name = gen_const_xmlChar_ptr(n_name, 1); + type = gen_xmlElementContentType(n_type, 2); + + ret_val = xmlNewDocElementContent(doc, (const xmlChar *)name, type); + xmlFreeDocElementContent(doc, ret_val); ret_val = NULL; + desret_xmlElementContentPtr(ret_val); + call_tests++; + des_xmlDocPtr(n_doc, doc, 0); + des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1); + des_xmlElementContentType(n_type, type, 2); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlNewDocElementContent", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_doc); + printf(" %d", n_name); + printf(" %d", n_type); + printf("\n"); + } + } + } + } + function_tests++; + + return(test_ret); +} + + +static int test_xmlNewElementContent(void) { int test_ret = 0; @@ -25779,13 +26036,14 @@ static int test_valid(void) { int test_ret = 0; - if (quiet == 0) printf("Testing valid : 48 of 67 functions ...\n"); + if (quiet == 0) printf("Testing valid : 50 of 70 functions ...\n"); test_ret += test_xmlAddAttributeDecl(); test_ret += test_xmlAddElementDecl(); test_ret += test_xmlAddID(); test_ret += test_xmlAddNotationDecl(); test_ret += test_xmlAddRef(); test_ret += test_xmlCopyAttributeTable(); + test_ret += test_xmlCopyDocElementContent(); test_ret += test_xmlCopyElementContent(); test_ret += test_xmlCopyElementTable(); test_ret += test_xmlCopyEnumeration(); @@ -25807,6 +26065,7 @@ test_valid(void) { test_ret += test_xmlIsID(); test_ret += test_xmlIsMixedElement(); test_ret += test_xmlIsRef(); + test_ret += test_xmlNewDocElementContent(); test_ret += test_xmlNewElementContent(); test_ret += test_xmlNewValidCtxt(); test_ret += test_xmlRemoveID(); @@ -26674,7 +26933,7 @@ test_xmlIOHTTPOpen(void) { filename = gen_filepath(n_filename, 0); ret_val = xmlIOHTTPOpen(filename); - desret_void_ptr(ret_val); + desret_xmlNanoHTTPCtxtPtr(ret_val); call_tests++; des_filepath(n_filename, filename, 0); xmlResetLastError(); @@ -26694,16 +26953,6 @@ test_xmlIOHTTPOpen(void) { static int -test_xmlIOHTTPOpenW(void) { - int test_ret = 0; - - - /* missing type support */ - return(test_ret); -} - - -static int test_xmlIOHTTPRead(void) { int test_ret = 0; @@ -27555,7 +27804,6 @@ test_xmlIO(void) { test_ret += test_xmlIOHTTPClose(); test_ret += test_xmlIOHTTPMatch(); test_ret += test_xmlIOHTTPOpen(); - test_ret += test_xmlIOHTTPOpenW(); test_ret += test_xmlIOHTTPRead(); test_ret += test_xmlNoNetExternalEntityLoader(); test_ret += test_xmlNormalizeWindowsPath(); @@ -28903,6 +29151,40 @@ test_xmlTextReaderBaseUri(void) { static int +test_xmlTextReaderByteConsumed(void) { + int test_ret = 0; + +#if defined(LIBXML_READER_ENABLED) + int mem_base; + long ret_val; + xmlTextReaderPtr reader; /* an XML reader */ + int n_reader; + + for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) { + mem_base = xmlMemBlocks(); + reader = gen_xmlTextReaderPtr(n_reader, 0); + + ret_val = xmlTextReaderByteConsumed(reader); + desret_long(ret_val); + call_tests++; + des_xmlTextReaderPtr(n_reader, reader, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlTextReaderByteConsumed", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_reader); + printf("\n"); + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int test_xmlTextReaderClose(void) { int test_ret = 0; @@ -31050,7 +31332,7 @@ static int test_xmlreader(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlreader : 70 of 80 functions ...\n"); + if (quiet == 0) printf("Testing xmlreader : 71 of 81 functions ...\n"); test_ret += test_xmlNewTextReader(); test_ret += test_xmlNewTextReaderFilename(); test_ret += test_xmlReaderForDoc(); @@ -31063,6 +31345,7 @@ test_xmlreader(void) { test_ret += test_xmlReaderWalker(); test_ret += test_xmlTextReaderAttributeCount(); test_ret += test_xmlTextReaderBaseUri(); + test_ret += test_xmlTextReaderByteConsumed(); test_ret += test_xmlTextReaderClose(); test_ret += test_xmlTextReaderConstBaseUri(); test_ret += test_xmlTextReaderConstEncoding(); @@ -32532,6 +32815,71 @@ test_xmlSchemaCompareValues(void) { static int +test_xmlSchemaCompareValuesWhtsp(void) { + int test_ret = 0; + +#if defined(LIBXML_SCHEMAS_ENABLED) + int mem_base; + int ret_val; + xmlSchemaValPtr x; /* a first value */ + int n_x; + xmlSchemaWhitespaceValueType xws; /* the whitespace value of x */ + int n_xws; + xmlSchemaValPtr y; /* a second value */ + int n_y; + xmlSchemaWhitespaceValueType yws; /* the whitespace value of y */ + int n_yws; + + for (n_x = 0;n_x < gen_nb_xmlSchemaValPtr;n_x++) { + for (n_xws = 0;n_xws < gen_nb_xmlSchemaWhitespaceValueType;n_xws++) { + for (n_y = 0;n_y < gen_nb_xmlSchemaValPtr;n_y++) { + for (n_yws = 0;n_yws < gen_nb_xmlSchemaWhitespaceValueType;n_yws++) { + mem_base = xmlMemBlocks(); + x = gen_xmlSchemaValPtr(n_x, 0); + xws = gen_xmlSchemaWhitespaceValueType(n_xws, 1); + y = gen_xmlSchemaValPtr(n_y, 2); + yws = gen_xmlSchemaWhitespaceValueType(n_yws, 3); + + ret_val = xmlSchemaCompareValuesWhtsp(x, xws, y, yws); + desret_int(ret_val); + call_tests++; + des_xmlSchemaValPtr(n_x, x, 0); + des_xmlSchemaWhitespaceValueType(n_xws, xws, 1); + des_xmlSchemaValPtr(n_y, y, 2); + des_xmlSchemaWhitespaceValueType(n_yws, yws, 3); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlSchemaCompareValuesWhtsp", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_x); + printf(" %d", n_xws); + printf(" %d", n_y); + printf(" %d", n_yws); + printf("\n"); + } + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int +test_xmlSchemaCopyValue(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + +static int test_xmlSchemaGetBuiltInListSimpleTypeItemType(void) { int test_ret = 0; @@ -32591,6 +32939,47 @@ test_xmlSchemaGetBuiltInType(void) { static int +test_xmlSchemaGetCanonValue(void) { + int test_ret = 0; + +#if defined(LIBXML_SCHEMAS_ENABLED) + int mem_base; + int ret_val; + xmlSchemaValPtr val; /* the precomputed value */ + int n_val; + xmlChar ** retValue; /* the returned value */ + int n_retValue; + + for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) { + for (n_retValue = 0;n_retValue < gen_nb_const_xmlChar_ptr_ptr;n_retValue++) { + mem_base = xmlMemBlocks(); + val = gen_xmlSchemaValPtr(n_val, 0); + retValue = gen_const_xmlChar_ptr_ptr(n_retValue, 1); + + ret_val = xmlSchemaGetCanonValue(val, (const xmlChar **)retValue); + desret_int(ret_val); + call_tests++; + des_xmlSchemaValPtr(n_val, val, 0); + des_const_xmlChar_ptr_ptr(n_retValue, (const xmlChar **)retValue, 1); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlSchemaGetCanonValue", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_val); + printf(" %d", n_retValue); + printf("\n"); + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int test_xmlSchemaGetFacetValueAsULong(void) { int test_ret = 0; @@ -32732,6 +33121,26 @@ test_xmlSchemaNewFacet(void) { return(test_ret); } + +static int +test_xmlSchemaNewNOTATIONValue(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + +static int +test_xmlSchemaNewStringValue(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + #ifdef LIBXML_SCHEMAS_ENABLED #define gen_nb_xmlSchemaValPtr_ptr 1 @@ -33110,18 +33519,23 @@ static int test_xmlschemastypes(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlschemastypes : 17 of 20 functions ...\n"); + if (quiet == 0) printf("Testing xmlschemastypes : 19 of 25 functions ...\n"); test_ret += test_xmlSchemaCheckFacet(); test_ret += test_xmlSchemaCleanupTypes(); test_ret += test_xmlSchemaCollapseString(); test_ret += test_xmlSchemaCompareValues(); + test_ret += test_xmlSchemaCompareValuesWhtsp(); + test_ret += test_xmlSchemaCopyValue(); test_ret += test_xmlSchemaGetBuiltInListSimpleTypeItemType(); test_ret += test_xmlSchemaGetBuiltInType(); + test_ret += test_xmlSchemaGetCanonValue(); test_ret += test_xmlSchemaGetFacetValueAsULong(); test_ret += test_xmlSchemaGetPredefinedType(); test_ret += test_xmlSchemaInitTypes(); test_ret += test_xmlSchemaIsBuiltInTypeFacet(); test_ret += test_xmlSchemaNewFacet(); + test_ret += test_xmlSchemaNewNOTATIONValue(); + test_ret += test_xmlSchemaNewStringValue(); test_ret += test_xmlSchemaValPredefTypeNode(); test_ret += test_xmlSchemaValPredefTypeNodeNoNorm(); test_ret += test_xmlSchemaValidateFacet(); @@ -3,7 +3,9 @@ #define IN_LIBXML #include "libxml/xmlexports.h" -XMLPUBFUN int hello_world(void) +XMLPUBFUN int hello_world(void); + +int hello_world(void) { printf("Success!\n"); return 0; @@ -107,7 +107,11 @@ static __declspec(thread) int tlstate_inited = 0; static DWORD globalkey = TLS_OUT_OF_INDEXES; #endif /* HAVE_COMPILER_TLS */ static DWORD mainthread; -static int run_once_init = 1; +static struct +{ + DWORD done; + DWORD control; +} run_once = { 0, 0 }; /* endif HAVE_WIN32_THREADS */ #elif defined HAVE_BEOS_THREADS int32 globalkey = 0; @@ -487,10 +491,7 @@ xmlGetGlobalState(void) xmlGlobalState *globalval; xmlGlobalStateCleanupHelperParams * p; - if (run_once_init) { - run_once_init = 0; - xmlOnceInit(); - } + xmlOnceInit(); #if defined(LIBXML_STATIC) && !defined(LIBXML_STATIC_FOR_DLL) globalval = (xmlGlobalState *)TlsGetValue(globalkey); #else @@ -581,12 +582,9 @@ xmlIsMainThread(void) #ifdef HAVE_PTHREAD_H pthread_once(&once_control, xmlOnceInit); #elif defined HAVE_WIN32_THREADS - if (run_once_init) { - run_once_init = 0; - xmlOnceInit (); - } + xmlOnceInit (); #elif defined HAVE_BEOS_THREADS - xmlOnceInit(); + xmlOnceInit(); #endif #ifdef DEBUG_THREADS @@ -700,10 +698,22 @@ xmlOnceInit(void) { #endif #if defined(HAVE_WIN32_THREADS) + if (!run_once.done) { + if (InterlockedIncrement(&run_once.control) == 1) + { #if !defined(HAVE_COMPILER_TLS) - globalkey = TlsAlloc(); + globalkey = TlsAlloc(); #endif - mainthread = GetCurrentThreadId(); + mainthread = GetCurrentThreadId(); + run_once.done = 1; + } + else { + /* Another thread is working; give up our slice and + * wait until they're done. */ + while (!run_once.done) + Sleep(0); + } + } #endif #ifdef HAVE_BEOS_THREADS @@ -4164,6 +4164,8 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) { ret->name = xmlMemStrdup(doc->name); if (doc->encoding != NULL) ret->encoding = xmlStrdup(doc->encoding); + if (doc->URL != NULL) + ret->URL = xmlStrdup(doc->URL); ret->charset = doc->charset; ret->compression = doc->compression; ret->standalone = doc->standalone; @@ -4305,7 +4307,10 @@ xmlGetNodePath(xmlNodePtr node) tmp = cur->prev; while (tmp != NULL) { if ((tmp->type == XML_ELEMENT_NODE) && - (xmlStrEqual(cur->name, tmp->name))) + (xmlStrEqual(cur->name, tmp->name)) && + ((tmp->ns == cur->ns) || + ((tmp->ns != NULL) && (cur->ns != NULL) && + (xmlStrEqual(cur->ns->prefix, tmp->ns->prefix))))) occur++; tmp = tmp->prev; } @@ -4313,7 +4318,10 @@ xmlGetNodePath(xmlNodePtr node) tmp = cur->next; while (tmp != NULL && occur == 0) { if ((tmp->type == XML_ELEMENT_NODE) && - (xmlStrEqual(cur->name, tmp->name))) + (xmlStrEqual(cur->name, tmp->name)) && + ((tmp->ns == cur->ns) || + ((tmp->ns != NULL) && (cur->ns != NULL) && + (xmlStrEqual(cur->ns->prefix, tmp->ns->prefix))))) occur++; tmp = tmp->next; } @@ -5663,7 +5671,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) if ((cur->href != NULL) && (href != NULL) && (xmlStrEqual(cur->href, href))) { if (((!is_attr) || (cur->prefix != NULL)) && - (xmlNsInScope(doc, orig, node, cur->href) == 1)) + (xmlNsInScope(doc, orig, node, cur->prefix) == 1)) return (cur); } cur = cur->next; @@ -5674,7 +5682,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) if ((cur->href != NULL) && (href != NULL) && (xmlStrEqual(cur->href, href))) { if (((!is_attr) || (cur->prefix != NULL)) && - (xmlNsInScope(doc, orig, node, cur->href) == 1)) + (xmlNsInScope(doc, orig, node, cur->prefix) == 1)) return (cur); } } @@ -6438,7 +6446,7 @@ xmlSetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, const xmlChar *value) { xmlAttrPtr prop; - if ((node == NULL) || (name == NULL)) + if ((node == NULL) || (name == NULL) || (node->type != XML_ELEMENT_NODE)) return(NULL); if (ns == NULL) @@ -1,7 +1,7 @@ /** * uri.c: set of generic URI related routines * - * Reference: RFC 2396 + * Reference: RFCs 2396, 2732 and 2373 * * See Copyright for the status of this software. * @@ -78,12 +78,14 @@ /* - * reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," + * reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," | + * "[" | "]" */ #define IS_RESERVED(x) (((x) == ';') || ((x) == '/') || ((x) == '?') || \ ((x) == ':') || ((x) == '@') || ((x) == '&') || ((x) == '=') || \ - ((x) == '+') || ((x) == '$') || ((x) == ',')) + ((x) == '+') || ((x) == '$') || ((x) == ',') || ((x) == '[') || \ + ((x) == ']')) /* * unreserved = alphanum | mark @@ -159,7 +161,7 @@ (IS_RESERVED(*(p)))) /* -* unwise = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`" +* unwise = "{" | "}" | "|" | "\" | "^" | "`" */ #define IS_UNWISE(p) \ @@ -1199,11 +1201,16 @@ xmlParseURIOpaquePart(xmlURIPtr uri, const char **str) * userinfo = *( unreserved | escaped | * ";" | ":" | "&" | "=" | "+" | "$" | "," ) * hostport = host [ ":" port ] - * host = hostname | IPv4address + * host = hostname | IPv4address | IPv6reference * hostname = *( domainlabel "." ) toplabel [ "." ] * domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum * toplabel = alpha | alpha *( alphanum | "-" ) alphanum - * IPv4address = 1*digit "." 1*digit "." 1*digit "." 1*digit + * IPv6reference = "[" IPv6address "]" + * IPv6address = hexpart [ ":" IPv4address ] + * IPv4address = 1*3digit "." 1*3digit "." 1*3digit "." 1*3digit + * hexpart = hexseq | hexseq "::" [ hexseq ]| "::" [ hexseq ] + * hexseq = hex4 *( ":" hex4) + * hex4 = 1*4hexdig * port = *digit * * Returns 0 or the error code @@ -1212,7 +1219,8 @@ static int xmlParseURIServer(xmlURIPtr uri, const char **str) { const char *cur; const char *host, *tmp; - const int IPmax = 4; + const int IPV4max = 4; + const int IPV6max = 8; int oct; if (str == NULL) @@ -1221,7 +1229,7 @@ xmlParseURIServer(xmlURIPtr uri, const char **str) { cur = *str; /* - * is there an userinfo ? + * is there a userinfo ? */ while (IS_USERINFO(cur)) NEXT(cur); if (*cur == '@') { @@ -1252,21 +1260,60 @@ xmlParseURIServer(xmlURIPtr uri, const char **str) { return(0); } /* - * host part of hostport can derive either an IPV4 address - * or an unresolved name. Check the IP first, it easier to detect - * errors if wrong one + * host part of hostport can denote an IPV4 address, an IPV6 address + * or an unresolved name. Check the IP first, its easier to detect + * errors if wrong one. + * An IPV6 address must start with a '[' and end with a ']'. */ - for (oct = 0; oct < IPmax; ++oct) { - if (*cur == '.') - return(3); /* e.g. http://.xml/ or http://18.29..30/ */ - while(IS_DIGIT(*cur)) cur++; - if (oct == (IPmax-1)) - continue; - if (*cur != '.') - break; - cur++; + if (*cur == '[') { + int compress=0; + cur++; + for (oct = 0; oct < IPV6max; ++oct) { + if (*cur == ':') { + if (compress) + return(3); /* multiple compression attempted */ + if (!oct) { /* initial char is compression */ + if (*++cur != ':') + return(3); + } + compress = 1; /* set compression-encountered flag */ + cur++; /* skip over the second ':' */ + continue; + } + while(IS_HEX(*cur)) cur++; + if (oct == (IPV6max-1)) + continue; + if (*cur != ':') + break; + cur++; + } + if ((!compress) && (oct != IPV6max)) + return(3); + if (*cur != ']') + return(3); + if (uri != NULL) { + if (uri->server != NULL) xmlFree(uri->server); + uri->server = (char *)xmlStrndup((xmlChar *)host+1, + (cur-host)-1); + } + cur++; + } else { + /* + * Not IPV6, maybe IPV4 + */ + for (oct = 0; oct < IPV4max; ++oct) { + if (*cur == '.') + return(3); /* e.g. http://.xml/ or http://18.29..30/ */ + while(IS_DIGIT(*cur)) cur++; + if (oct == (IPV4max-1)) + continue; + if (*cur != '.') + break; + cur++; + } } - if (oct < IPmax || (*cur == '.' && cur++) || IS_ALPHA(*cur)) { + if ((host[0] != '[') && (oct < IPV4max || (*cur == '.' && cur++) || + IS_ALPHA(*cur))) { /* maybe host_name */ if (!IS_ALPHANUM(*cur)) return(4); /* e.g. http://xml.$oft */ @@ -1300,8 +1347,10 @@ xmlParseURIServer(xmlURIPtr uri, const char **str) { if (uri != NULL) { if (uri->authority != NULL) xmlFree(uri->authority); uri->authority = NULL; - if (uri->server != NULL) xmlFree(uri->server); - uri->server = xmlURIUnescapeString(host, cur - host, NULL); + if (host[0] != '[') { /* it's not an IPV6 addr */ + if (uri->server != NULL) xmlFree(uri->server); + uri->server = xmlURIUnescapeString(host, cur - host, NULL); + } } /* * finish by checking for a port presence. @@ -895,17 +895,23 @@ xmlFreeValidCtxt(xmlValidCtxtPtr cur) { #endif /* LIBXML_VALID_ENABLED */ /** - * xmlNewElementContent: + * xmlNewDocElementContent: + * @doc: the document * @name: the subelement name or NULL * @type: the type of element content decl * - * Allocate an element content structure. + * Allocate an element content structure for the document. * * Returns NULL if not, otherwise the new element content structure */ xmlElementContentPtr -xmlNewElementContent(const xmlChar *name, xmlElementContentType type) { +xmlNewDocElementContent(xmlDocPtr doc, const xmlChar *name, + xmlElementContentType type) { xmlElementContentPtr ret; + xmlDictPtr dict = NULL; + + if (doc != NULL) + dict = doc->dict; switch(type) { case XML_ELEMENT_CONTENT_ELEMENT: @@ -939,21 +945,46 @@ xmlNewElementContent(const xmlChar *name, xmlElementContentType type) { ret->type = type; ret->ocur = XML_ELEMENT_CONTENT_ONCE; if (name != NULL) { - xmlChar *prefix = NULL; - ret->name = xmlSplitQName2(name, &prefix); - if (ret->name == NULL) - ret->name = xmlStrdup(name); - ret->prefix = prefix; - } else { - ret->name = NULL; - ret->prefix = NULL; + int l; + const xmlChar *tmp; + + tmp = xmlSplitQName3(name, &l); + if (tmp == NULL) { + if (dict == NULL) + ret->name = xmlStrdup(name); + else + ret->name = xmlDictLookup(dict, name, -1); + } else { + if (dict == NULL) { + ret->prefix = xmlStrndup(name, l); + ret->name = xmlStrdup(tmp); + } else { + ret->prefix = xmlDictLookup(dict, name, l); + ret->name = xmlDictLookup(dict, tmp, -1); + } + } } - ret->c1 = ret->c2 = ret->parent = NULL; return(ret); } /** - * xmlCopyElementContent: + * xmlNewElementContent: + * @name: the subelement name or NULL + * @type: the type of element content decl + * + * Allocate an element content structure. + * Deprecated in favor of xmlNewDocElementContent + * + * Returns NULL if not, otherwise the new element content structure + */ +xmlElementContentPtr +xmlNewElementContent(const xmlChar *name, xmlElementContentType type) { + return(xmlNewDocElementContent(NULL, name, type)); +} + +/** + * xmlCopyDocElementContent: + * @doc: the document owning the element declaration * @cur: An element content pointer. * * Build a copy of an element content description. @@ -961,53 +992,145 @@ xmlNewElementContent(const xmlChar *name, xmlElementContentType type) { * Returns the new xmlElementContentPtr or NULL in case of error. */ xmlElementContentPtr -xmlCopyElementContent(xmlElementContentPtr cur) { - xmlElementContentPtr ret; +xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) { + xmlElementContentPtr ret = NULL, prev = NULL, tmp; + xmlDictPtr dict = NULL; if (cur == NULL) return(NULL); - ret = xmlNewElementContent((xmlChar *) cur->name, cur->type); + + if (doc != NULL) + dict = doc->dict; + + ret = (xmlElementContentPtr) xmlMalloc(sizeof(xmlElementContent)); if (ret == NULL) { xmlVErrMemory(NULL, "malloc failed"); return(NULL); } - if (cur->prefix != NULL) - ret->prefix = xmlStrdup(cur->prefix); + memset(ret, 0, sizeof(xmlElementContent)); + ret->type = cur->type; ret->ocur = cur->ocur; - if (cur->c1 != NULL) ret->c1 = xmlCopyElementContent(cur->c1); + if (cur->name != NULL) { + if (dict) + ret->name = xmlDictLookup(dict, cur->name, -1); + else + ret->name = xmlStrdup(cur->name); + } + + if (cur->prefix != NULL) { + if (dict) + ret->prefix = xmlDictLookup(dict, cur->prefix, -1); + else + ret->prefix = xmlStrdup(cur->prefix); + } + if (cur->c1 != NULL) + ret->c1 = xmlCopyDocElementContent(doc, cur->c1); if (ret->c1 != NULL) ret->c1->parent = ret; - if (cur->c2 != NULL) ret->c2 = xmlCopyElementContent(cur->c2); - if (ret->c2 != NULL) - ret->c2->parent = ret; + if (cur->c2 != NULL) { + prev = ret; + cur = cur->c2; + while (cur != NULL) { + tmp = (xmlElementContentPtr) xmlMalloc(sizeof(xmlElementContent)); + if (tmp == NULL) { + xmlVErrMemory(NULL, "malloc failed"); + return(ret); + } + memset(tmp, 0, sizeof(xmlElementContent)); + tmp->type = cur->type; + tmp->ocur = cur->ocur; + prev->c2 = tmp; + if (cur->name != NULL) { + if (dict) + tmp->name = xmlDictLookup(dict, cur->name, -1); + else + tmp->name = xmlStrdup(cur->name); + } + + if (cur->prefix != NULL) { + if (dict) + tmp->prefix = xmlDictLookup(dict, cur->prefix, -1); + else + tmp->prefix = xmlStrdup(cur->prefix); + } + if (cur->c1 != NULL) + tmp->c1 = xmlCopyDocElementContent(doc,cur->c1); + if (tmp->c1 != NULL) + tmp->c1->parent = ret; + prev = tmp; + cur = cur->c2; + } + } return(ret); } /** + * xmlCopyElementContent: + * @cur: An element content pointer. + * + * Build a copy of an element content description. + * Deprecated, use xmlCopyDocElementContent instead + * + * Returns the new xmlElementContentPtr or NULL in case of error. + */ +xmlElementContentPtr +xmlCopyElementContent(xmlElementContentPtr cur) { + return(xmlCopyDocElementContent(NULL, cur)); +} + +/** + * xmlFreeDocElementContent: + * @doc: the document owning the element declaration + * @cur: the element content tree to free + * + * Free an element content structure. The whole subtree is removed. + */ +void +xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) { + xmlElementContentPtr next; + xmlDictPtr dict = NULL; + + if (doc != NULL) + dict = doc->dict; + + while (cur != NULL) { + next = cur->c2; + switch (cur->type) { + case XML_ELEMENT_CONTENT_PCDATA: + case XML_ELEMENT_CONTENT_ELEMENT: + case XML_ELEMENT_CONTENT_SEQ: + case XML_ELEMENT_CONTENT_OR: + break; + default: + xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, + "Internal: ELEMENT content corrupted invalid type\n", + NULL); + return; + } + if (cur->c1 != NULL) xmlFreeDocElementContent(doc, cur->c1); + if (dict) { + if ((cur->name != NULL) && (!xmlDictOwns(dict, cur->name))) + xmlFree((xmlChar *) cur->name); + if ((cur->prefix != NULL) && (!xmlDictOwns(dict, cur->prefix))) + xmlFree((xmlChar *) cur->prefix); + } else { + if (cur->name != NULL) xmlFree((xmlChar *) cur->name); + if (cur->prefix != NULL) xmlFree((xmlChar *) cur->prefix); + } + xmlFree(cur); + cur = next; + } +} + +/** * xmlFreeElementContent: * @cur: the element content tree to free * - * Free an element content structure. This is a recursive call ! + * Free an element content structure. The whole subtree is removed. + * Deprecated, use xmlFreeDocElementContent instead */ void xmlFreeElementContent(xmlElementContentPtr cur) { - if (cur == NULL) return; - switch (cur->type) { - case XML_ELEMENT_CONTENT_PCDATA: - case XML_ELEMENT_CONTENT_ELEMENT: - case XML_ELEMENT_CONTENT_SEQ: - case XML_ELEMENT_CONTENT_OR: - break; - default: - xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, - "Internal: ELEMENT content corrupted invalid type\n", - NULL); - return; - } - if (cur->c1 != NULL) xmlFreeElementContent(cur->c1); - if (cur->c2 != NULL) xmlFreeElementContent(cur->c2); - if (cur->name != NULL) xmlFree((xmlChar *) cur->name); - if (cur->prefix != NULL) xmlFree((xmlChar *) cur->prefix); - xmlFree(cur); + xmlFreeDocElementContent(NULL, cur); } #ifdef LIBXML_OUTPUT_ENABLED @@ -1207,18 +1330,6 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int ****************************************************************/ /** - * xmlCreateElementTable: - * - * create and initialize an empty element hash table. - * - * Returns the xmlElementTablePtr just created or NULL in case of error. - */ -static xmlElementTablePtr -xmlCreateElementTable(void) { - return(xmlHashCreate(0)); -} - -/** * xmlFreeElement: * @elem: An element * @@ -1228,7 +1339,7 @@ static void xmlFreeElement(xmlElementPtr elem) { if (elem == NULL) return; xmlUnlinkNode((xmlNodePtr) elem); - xmlFreeElementContent(elem->content); + xmlFreeDocElementContent(elem->doc, elem->content); if (elem->name != NULL) xmlFree((xmlChar *) elem->name); if (elem->prefix != NULL) @@ -1269,6 +1380,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, if (name == NULL) { return(NULL); } + switch (type) { case XML_ELEMENT_TYPE_EMPTY: if (content != NULL) { @@ -1321,7 +1433,11 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, */ table = (xmlElementTablePtr) dtd->elements; if (table == NULL) { - table = xmlCreateElementTable(); + xmlDictPtr dict = NULL; + + if (dtd->doc != NULL) + dict = dtd->doc->dict; + table = xmlHashCreateDict(0, dict); dtd->elements = (void *) table; } if (table == NULL) { @@ -1426,7 +1542,20 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, * Finish to fill the structure. */ ret->etype = type; - ret->content = xmlCopyElementContent(content); + /* + * Avoid a stupid copy when called by the parser + * and flag it by setting a special parent value + * so the parser doesn't unallocate it. + */ + if ((ctxt != NULL) && + ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) || + (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1))) { + ret->content = content; + if (content != NULL) + content->parent = (xmlElementContentPtr) 1; + } else { + ret->content = xmlCopyDocElementContent(dtd->doc, content); + } /* * Link it to the DTD @@ -1683,19 +1812,6 @@ xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) { } #endif /* LIBXML_OUTPUT_ENABLED */ -/** - * xmlCreateAttributeTable: - * - * create and initialize an empty attribute hash table. - * - * Returns the xmlAttributeTablePtr just created or NULL in case - * of error. - */ -static xmlAttributeTablePtr -xmlCreateAttributeTable(void) { - return(xmlHashCreate(0)); -} - #ifdef LIBXML_VALID_ENABLED /** * xmlScanAttributeDeclCallback: @@ -1783,18 +1899,36 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) { */ static void xmlFreeAttribute(xmlAttributePtr attr) { + xmlDictPtr dict; + if (attr == NULL) return; + if (attr->doc != NULL) + dict = attr->doc->dict; + else + dict = NULL; xmlUnlinkNode((xmlNodePtr) attr); if (attr->tree != NULL) xmlFreeEnumeration(attr->tree); - if (attr->elem != NULL) - xmlFree((xmlChar *) attr->elem); - if (attr->name != NULL) - xmlFree((xmlChar *) attr->name); - if (attr->defaultValue != NULL) - xmlFree((xmlChar *) attr->defaultValue); - if (attr->prefix != NULL) - xmlFree((xmlChar *) attr->prefix); + if (dict) { + if ((attr->elem != NULL) && (!xmlDictOwns(dict, attr->elem))) + xmlFree((xmlChar *) attr->elem); + if ((attr->name != NULL) && (!xmlDictOwns(dict, attr->name))) + xmlFree((xmlChar *) attr->name); + if ((attr->prefix != NULL) && (!xmlDictOwns(dict, attr->prefix))) + xmlFree((xmlChar *) attr->prefix); + if ((attr->defaultValue != NULL) && + (!xmlDictOwns(dict, attr->defaultValue))) + xmlFree((xmlChar *) attr->defaultValue); + } else { + if (attr->elem != NULL) + xmlFree((xmlChar *) attr->elem); + if (attr->name != NULL) + xmlFree((xmlChar *) attr->name); + if (attr->defaultValue != NULL) + xmlFree((xmlChar *) attr->defaultValue); + if (attr->prefix != NULL) + xmlFree((xmlChar *) attr->prefix); + } xmlFree(attr); } @@ -1825,6 +1959,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlAttributePtr ret; xmlAttributeTablePtr table; xmlElementPtr elemDef; + xmlDictPtr dict = NULL; if (dtd == NULL) { xmlFreeEnumeration(tree); @@ -1838,6 +1973,8 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlFreeEnumeration(tree); return(NULL); } + if (dtd->doc != NULL) + dict = dtd->doc->dict; #ifdef LIBXML_VALID_ENABLED /* @@ -1899,7 +2036,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, */ table = (xmlAttributeTablePtr) dtd->attributes; if (table == NULL) { - table = xmlCreateAttributeTable(); + table = xmlHashCreateDict(0, dict); dtd->attributes = (void *) table; } if (table == NULL) { @@ -1921,19 +2058,29 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, * fill the structure. */ ret->atype = type; - ret->name = xmlStrdup(name); - ret->prefix = xmlStrdup(ns); - ret->elem = xmlStrdup(elem); + if (dict) { + ret->name = xmlDictLookup(dict, name, -1); + ret->prefix = xmlDictLookup(dict, ns, -1); + ret->elem = xmlDictLookup(dict, elem, -1); + } else { + ret->name = xmlStrdup(name); + ret->prefix = xmlStrdup(ns); + ret->elem = xmlStrdup(elem); + } ret->def = def; ret->tree = tree; - if (defaultValue != NULL) - ret->defaultValue = xmlStrdup(defaultValue); + if (defaultValue != NULL) { + if (dict) + ret->defaultValue = xmlDictLookup(dict, defaultValue, -1); + else + ret->defaultValue = xmlStrdup(defaultValue); + } /* * Validity Check: * Search the DTD for previous declarations of the ATTLIST */ - if (xmlHashAddEntry3(table, name, ns, elem, ret) < 0) { + if (xmlHashAddEntry3(table, ret->name, ret->prefix, ret->elem, ret) < 0) { #ifdef LIBXML_VALID_ENABLED /* * The attribute is already defined in this DTD. @@ -2185,19 +2332,6 @@ xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table) { * * ************************************************************************/ /** - * xmlCreateNotationTable: - * - * create and initialize an empty notation hash table. - * - * Returns the xmlNotationTablePtr just created or NULL in case - * of error. - */ -static xmlNotationTablePtr -xmlCreateNotationTable(void) { - return(xmlHashCreate(0)); -} - -/** * xmlFreeNotation: * @not: A notation * @@ -2249,8 +2383,13 @@ xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, * Create the Notation table if needed. */ table = (xmlNotationTablePtr) dtd->notations; - if (table == NULL) - dtd->notations = table = xmlCreateNotationTable(); + if (table == NULL) { + xmlDictPtr dict = NULL; + if (dtd->doc != NULL) + dict = dtd->doc->dict; + + dtd->notations = table = xmlHashCreateDict(0, dict); + } if (table == NULL) { xmlVErrMemory(ctxt, "xmlAddNotationDecl: Table creation failed!\n"); @@ -2421,19 +2560,6 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) { xmlFree((char *)(str)); /** - * xmlCreateIDTable: - * - * create and initialize an empty id hash table. - * - * Returns the xmlIDTablePtr just created or NULL in case - * of error. - */ -static xmlIDTablePtr -xmlCreateIDTable(void) { - return(xmlHashCreate(0)); -} - -/** * xmlFreeID: * @not: A id * @@ -2487,8 +2613,9 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, * Create the ID table if needed. */ table = (xmlIDTablePtr) doc->ids; - if (table == NULL) - doc->ids = table = xmlCreateIDTable(); + if (table == NULL) { + doc->ids = table = xmlHashCreateDict(0, doc->dict); + } if (table == NULL) { xmlVErrMemory(ctxt, "xmlAddID: Table creation failed!\n"); @@ -2705,19 +2832,6 @@ typedef struct xmlValidateMemo_t typedef xmlValidateMemo *xmlValidateMemoPtr; /** - * xmlCreateRefTable: - * - * create and initialize an empty ref hash table. - * - * Returns the xmlRefTablePtr just created or NULL in case - * of error. - */ -static xmlRefTablePtr -xmlCreateRefTable(void) { - return(xmlHashCreate(0)); -} - -/** * xmlFreeRef: * @lk: A list link * @@ -2813,8 +2927,9 @@ xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, * Create the Ref table if needed. */ table = (xmlRefTablePtr) doc->refs; - if (table == NULL) - doc->refs = table = xmlCreateRefTable(); + if (table == NULL) { + doc->refs = table = xmlHashCreateDict(0, doc->dict); + } if (table == NULL) { xmlVErrMemory(ctxt, "xmlAddRef: Table creation failed!\n"); @@ -3063,6 +3178,11 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) { if (dtd == NULL) return(NULL); if (dtd->elements == NULL) { + xmlDictPtr dict = NULL; + + if (dtd->doc != NULL) + dict = dtd->doc->dict; + if (!create) return(NULL); /* @@ -3070,7 +3190,7 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) { */ table = (xmlElementTablePtr) dtd->elements; if (table == NULL) { - table = xmlCreateElementTable(); + table = xmlHashCreateDict(0, dict); dtd->elements = (void *) table; } if (table == NULL) { diff --git a/win32/configure.js b/win32/configure.js index 12e5f42..d857146 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -145,6 +145,7 @@ function usage() txt += " dynruntime: Use the dynamic RTL (only bcb) (" + dynruntime + ")\n"; txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n"; txt += " static: Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no") + ")\n"; + txt += " Note: automatically enabled if cruntime is not /MD or /MDd\n"; txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n"; txt += " bindir: Directory where xmllint and friends should be installed\n"; txt += " (" + buildBinPrefix + ")\n"; @@ -534,6 +535,14 @@ if (error != 0) { usage(); WScript.Quit(error); } + +// if user choses to link the c-runtime library statically into libxml2 +// with /MT and friends, then we need to enable static linking for xmllint +if (cruntime == "/MT" || cruntime == "/MTd" || + cruntime == "/ML" || cruntime == "/MLd") { + buildStatic = 1; +} + dirSep = "\\"; if (compiler == "mingw") dirSep = "/"; diff --git a/win32/libxml2.def.src b/win32/libxml2.def.src index 07ce959..5e2c8fb 100644 --- a/win32/libxml2.def.src +++ b/win32/libxml2.def.src @@ -663,6 +663,7 @@ xmlCopyAttributeTable xmlCopyChar xmlCopyCharMultiByte xmlCopyDoc +xmlCopyDocElementContent xmlCopyDtd xmlCopyElementContent xmlCopyElementTable @@ -736,6 +737,7 @@ xmlDefaultSAXHandlerInit xmlDelEncodingAlias xmlDeregisterNodeDefault xmlDetectCharEncoding +xmlDictCleanup xmlDictCreate xmlDictCreateSub xmlDictExists @@ -781,6 +783,7 @@ xmlFreeAutomata xmlFreeCatalog #endif xmlFreeDoc +xmlFreeDocElementContent xmlFreeDtd xmlFreeElementContent xmlFreeElementTable @@ -802,6 +805,7 @@ xmlFreeProp xmlFreePropList xmlFreeRMutex xmlFreeRefTable +xmlFreeStreamCtxt xmlFreeTextReader xmlFreeTextWriter xmlFreeURI @@ -848,6 +852,7 @@ xmlHashAddEntry2 xmlHashAddEntry3 xmlHashCopy xmlHashCreate +xmlHashCreateDict xmlHashFree xmlHashLookup xmlHashLookup2 @@ -1130,6 +1135,7 @@ xmlNewChild xmlNewComment xmlNewDoc xmlNewDocComment +xmlNewDocElementContent xmlNewDocFragment xmlNewDocNode xmlNewDocNodeEatName @@ -1291,7 +1297,11 @@ xmlParserPrintFileInfo xmlParserValidityError xmlParserValidityWarning xmlParserWarning +xmlPatternFromRoot +xmlPatternGetStreamCtxt xmlPatternMatch +xmlPatternMaxDepth +xmlPatternStreamable xmlPatterncompile xmlPedanticParserDefault xmlPopInput @@ -1512,6 +1522,9 @@ xmlSchemaCollapseString xmlSchemaCompareValues #endif #ifdef LIBXML_SCHEMAS_ENABLED +xmlSchemaCompareValuesWhtsp +#endif +#ifdef LIBXML_SCHEMAS_ENABLED xmlSchemaDump #endif #ifdef LIBXML_SCHEMAS_ENABLED @@ -1538,6 +1551,9 @@ xmlSchemaGetBuiltInListSimpleTypeItemType xmlSchemaGetBuiltInType #endif #ifdef LIBXML_SCHEMAS_ENABLED +xmlSchemaGetCanonValue +#endif +#ifdef LIBXML_SCHEMAS_ENABLED xmlSchemaGetFacetValueAsULong #endif #ifdef LIBXML_SCHEMAS_ENABLED @@ -1565,9 +1581,15 @@ xmlSchemaNewFacet xmlSchemaNewMemParserCtxt #endif #ifdef LIBXML_SCHEMAS_ENABLED +xmlSchemaNewNOTATIONValue +#endif +#ifdef LIBXML_SCHEMAS_ENABLED xmlSchemaNewParserCtxt #endif #ifdef LIBXML_SCHEMAS_ENABLED +xmlSchemaNewStringValue +#endif +#ifdef LIBXML_SCHEMAS_ENABLED xmlSchemaNewValidCtxt #endif #ifdef LIBXML_SCHEMAS_ENABLED @@ -1690,6 +1712,9 @@ xmlStrcat xmlStrchr xmlStrcmp xmlStrdup +xmlStreamPop +xmlStreamPush +xmlStreamPushAttr xmlStringCurrentChar xmlStringDecodeEntities xmlStringGetNodeList @@ -1711,6 +1736,7 @@ xmlTextConcat xmlTextMerge xmlTextReaderAttributeCount xmlTextReaderBaseUri +xmlTextReaderByteConsumed xmlTextReaderClose xmlTextReaderConstBaseUri xmlTextReaderConstEncoding @@ -451,7 +451,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) { if ((pctxt->directory == NULL) && (directory != NULL)) pctxt->directory = (char *) xmlStrdup((xmlChar *) directory); - pctxt->loadsubset = XML_DETECT_IDS; + pctxt->loadsubset |= XML_DETECT_IDS; xmlParseDocument(pctxt); @@ -186,6 +186,7 @@ static int sax1 = 0; #ifdef LIBXML_PATTERN_ENABLED static const char *pattern = NULL; static xmlPatternPtr patternc = NULL; +static xmlStreamCtxtPtr patstream = NULL; #endif static int options = 0; @@ -805,29 +806,82 @@ static void myClose(FILE *f) { ************************************************************************/ static void processNode(xmlTextReaderPtr reader) { const xmlChar *name, *value; - - name = xmlTextReaderConstName(reader); - if (name == NULL) - name = BAD_CAST "--"; - - value = xmlTextReaderConstValue(reader); - - printf("%d %d %s %d %d", - xmlTextReaderDepth(reader), - xmlTextReaderNodeType(reader), - name, - xmlTextReaderIsEmptyElement(reader), - xmlTextReaderHasValue(reader)); - if (value == NULL) - printf("\n"); - else { - printf(" %s\n", value); + int type, empty; + + type = xmlTextReaderNodeType(reader); + empty = xmlTextReaderIsEmptyElement(reader); + + if (debug) { + name = xmlTextReaderConstName(reader); + if (name == NULL) + name = BAD_CAST "--"; + + value = xmlTextReaderConstValue(reader); + + + printf("%d %d %s %d %d", + xmlTextReaderDepth(reader), + type, + name, + empty, + xmlTextReaderHasValue(reader)); + if (value == NULL) + printf("\n"); + else { + printf(" %s\n", value); + } } #ifdef LIBXML_PATTERN_ENABLED if (patternc) { - if (xmlPatternMatch(patternc, xmlTextReaderCurrentNode(reader)) == 1) { - printf("Node matches pattern %s\n", pattern); + xmlChar *path = NULL; + int match = -1; + + if (type == XML_READER_TYPE_ELEMENT) { + /* do the check only on element start */ + match = xmlPatternMatch(patternc, xmlTextReaderCurrentNode(reader)); + + if (match) { + path = xmlGetNodePath(xmlTextReaderCurrentNode(reader)); + printf("Node %s matches pattern %s\n", path, pattern); + } + } + if (patstream != NULL) { + int ret; + + if (type == XML_READER_TYPE_ELEMENT) { + ret = xmlStreamPush(patstream, + xmlTextReaderConstLocalName(reader), + xmlTextReaderConstNamespaceUri(reader)); + if (ret < 0) { + fprintf(stderr, "xmlStreamPush() failure\n"); + xmlFreeStreamCtxt(patstream); + patstream = NULL; + } else if (ret != match) { + if (path == NULL) { + path = xmlGetNodePath( + xmlTextReaderCurrentNode(reader)); + } + fprintf(stderr, + "xmlPatternMatch and xmlStreamPush disagree\n"); + fprintf(stderr, + " pattern %s node %s\n", + pattern, path); + } + + + } + if ((type == XML_READER_TYPE_END_ELEMENT) || + ((type == XML_READER_TYPE_ELEMENT) && (empty))) { + ret = xmlStreamPop(patstream); + if (ret < 0) { + fprintf(stderr, "xmlStreamPop() failure\n"); + xmlFreeStreamCtxt(patstream); + patstream = NULL; + } + } } + if (path != NULL) + xmlFree(path); } #endif } @@ -855,6 +909,28 @@ static void streamFile(char *filename) { } else #endif reader = xmlReaderForFile(filename, NULL, options); +#ifdef LIBXML_PATTERN_ENABLED + if (pattern != NULL) { + patternc = xmlPatterncompile((const xmlChar *) pattern, NULL, 0, NULL); + if (patternc == NULL) { + xmlGenericError(xmlGenericErrorContext, + "Pattern %s failed to compile\n", pattern); + progresult = XMLLINT_ERR_SCHEMAPAT; + pattern = NULL; + } + } + if (patternc != NULL) { + patstream = xmlPatternGetStreamCtxt(patternc); + if (patstream != NULL) { + ret = xmlStreamPush(patstream, NULL, NULL); + if (ret < 0) { + fprintf(stderr, "xmlStreamPush() failure\n"); + xmlFreeStreamCtxt(patstream); + patstream = NULL; + } + } + } +#endif if (reader != NULL) { @@ -943,6 +1019,12 @@ static void streamFile(char *filename) { fprintf(stderr, "Unable to open %s\n", filename); progresult = XMLLINT_ERR_UNCLASS; } +#ifdef LIBXML_PATTERN_ENABLED + if (patstream != NULL) { + xmlFreeStreamCtxt(patstream); + patstream = NULL; + } +#endif #ifdef HAVE_SYS_MMAN_H if (memory) { xmlFreeParserInputBuffer(input); @@ -956,6 +1038,42 @@ static void walkDoc(xmlDocPtr doc) { xmlTextReaderPtr reader; int ret; +#ifdef LIBXML_PATTERN_ENABLED + xmlNodePtr root; + const xmlChar *namespaces[22]; + int i; + xmlNsPtr ns; + + root = xmlDocGetRootElement(doc); + for (ns = root->nsDef, i = 0;ns != NULL && i < 20;ns=ns->next) { + namespaces[i++] = ns->href; + namespaces[i++] = ns->prefix; + } + namespaces[i++] = NULL; + namespaces[i++] = NULL; + + if (pattern != NULL) { + patternc = xmlPatterncompile((const xmlChar *) pattern, doc->dict, + 0, &namespaces[0]); + if (patternc == NULL) { + xmlGenericError(xmlGenericErrorContext, + "Pattern %s failed to compile\n", pattern); + progresult = XMLLINT_ERR_SCHEMAPAT; + pattern = NULL; + } + } + if (patternc != NULL) { + patstream = xmlPatternGetStreamCtxt(patternc); + if (patstream != NULL) { + ret = xmlStreamPush(patstream, NULL, NULL); + if (ret < 0) { + fprintf(stderr, "xmlStreamPush() failure\n"); + xmlFreeStreamCtxt(patstream); + patstream = NULL; + } + } + } +#endif /* LIBXML_PATTERN_ENABLED */ reader = xmlReaderWalker(doc); if (reader != NULL) { if ((timing) && (!repeat)) { @@ -983,6 +1101,12 @@ static void walkDoc(xmlDocPtr doc) { fprintf(stderr, "Failed to crate a reader from the document\n"); progresult = XMLLINT_ERR_UNCLASS; } +#ifdef LIBXML_PATTERN_ENABLED + if (patstream != NULL) { + xmlFreeStreamCtxt(patstream); + patstream = NULL; + } +#endif } #endif /* LIBXML_READER_ENABLED */ @@ -1217,7 +1341,8 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { if ((timing) && (!repeat)) { startTimer(); } - xmlXIncludeProcessFlags(doc, options); + if (xmlXIncludeProcessFlags(doc, options) < 0) + progresult = XMLLINT_ERR_UNCLASS; if ((timing) && (!repeat)) { endTimer("Xinclude processing"); } @@ -2189,7 +2314,7 @@ main(int argc, char **argv) { } #endif /* LIBXML_SCHEMAS_ENABLED */ #ifdef LIBXML_PATTERN_ENABLED - if (pattern != NULL) { + if ((pattern != NULL) && (walker == 0)) { patternc = xmlPatterncompile((const xmlChar *) pattern, NULL, 0, NULL); if (patternc == NULL) { xmlGenericError(xmlGenericErrorContext, diff --git a/xmlmodule.c b/xmlmodule.c index fcd4c33..b057371 100644 --- a/xmlmodule.c +++ b/xmlmodule.c @@ -237,7 +237,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol) return 0; } -#endif /* HAVE_DLOPEN */ +#else /* ! HAVE_DLOPEN */ #ifdef HAVE_SHLLOAD /* HAVE_SHLLOAD */ #ifdef HAVE_DL_H @@ -285,6 +285,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol) } #endif /* HAVE_SHLLOAD */ +#endif /* ! HAVE_DLOPEN */ #ifdef _WIN32 diff --git a/xmlreader.c b/xmlreader.c index b467c1c..e16128b 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -1164,6 +1164,44 @@ xmlTextReaderDoExpand(xmlTextReaderPtr reader) { } /** + * xmlTextReaderCollectSiblings: + * @node: the first child + * + * Traverse depth-first through all sibling nodes and their children + * nodes and concatenate their content. This is an auxiliary function + * to xmlTextReaderReadString. + * + * Returns a string containing the content, or NULL in case of error. + */ +static xmlChar * +xmlTextReaderCollectSiblings(xmlNodePtr node) +{ + xmlBufferPtr buffer; + xmlChar *ret; + + buffer = xmlBufferCreate(); + if (buffer == NULL) + return NULL; + + for ( ; node != NULL; node = node->next) { + switch (node->type) { + case XML_TEXT_NODE: + case XML_CDATA_SECTION_NODE: + xmlBufferCat(buffer, node->content); + break; + case XML_ELEMENT_NODE: + xmlBufferCat(buffer, xmlTextReaderCollectSiblings(node->children)); + default: + break; + } + } + ret = buffer->content; + buffer->content = NULL; + xmlBufferFree(buffer); + return(ret); +} + +/** * xmlTextReaderRead: * @reader: the xmlTextReaderPtr used * @@ -1551,7 +1589,7 @@ xmlTextReaderNext(xmlTextReaderPtr reader) { cur = reader->node; if ((cur == NULL) || (cur->type != XML_ELEMENT_NODE)) return(xmlTextReaderRead(reader)); - if (reader->state == XML_TEXTREADER_END) + if (reader->state == XML_TEXTREADER_END || reader->state == XML_TEXTREADER_BACKTRACK) return(xmlTextReaderRead(reader)); if (cur->extra & NODE_IS_EMPTY) return(xmlTextReaderRead(reader)); @@ -1606,8 +1644,29 @@ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) { * The string must be deallocated by the caller. */ xmlChar * -xmlTextReaderReadString(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) { - TODO +xmlTextReaderReadString(xmlTextReaderPtr reader) +{ + xmlNodePtr node; + + if ((reader == NULL) || (reader->node == NULL)) + return(NULL); + + node = (reader->curnode != NULL) ? reader->curnode : reader->node; + switch (node->type) { + case XML_TEXT_NODE: + if (node->content != NULL) + return(xmlStrdup(node->content)); + break; + case XML_ELEMENT_NODE: + if (xmlTextReaderDoExpand(reader) != -1) { + return xmlTextReaderCollectSiblings(node->children); + } + case XML_ATTRIBUTE_NODE: + TODO + break; + default: + break; + } return(NULL); } @@ -4458,6 +4517,27 @@ xmlTextReaderSetup(xmlTextReaderPtr reader, } /** + * xmlTextReaderByteConsumed: + * @reader: an XML reader + * + * This function provides the current index of the parser used + * by the reader, relative to the start of the current entity. + * This function actually just wraps a call to xmlBytesConsumed() + * for the parser context associated with the reader. + * See xmlBytesConsumed() for more information. + * + * Returns the index in bytes from the beginning of the entity or -1 + * in case the index could not be computed. + */ +long +xmlTextReaderByteConsumed(xmlTextReaderPtr reader) { + if ((reader == NULL) || (reader->ctxt == NULL)) + return(-1); + return(xmlByteConsumed(reader->ctxt)); +} + + +/** * xmlReaderWalker: * @doc: a preparsed document * diff --git a/xmlregexp.c b/xmlregexp.c index 2b1919e..7638c71 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -19,7 +19,7 @@ #ifdef LIBXML_REGEXP_ENABLED -#define DEBUG_ERR +/* #define DEBUG_ERR */ #include <stdio.h> #include <string.h> @@ -3343,7 +3343,7 @@ xmlRegExecErrInfo(xmlRegExecCtxtPtr exec, const xmlChar **string, #ifdef DEBUG_ERR static void testerr(xmlRegExecCtxtPtr exec) { const xmlChar *string; - const xmlChar *values[5]; + xmlChar *values[5]; int nb = 5; int nbneg; int terminal; @@ -327,14 +327,16 @@ static void xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt) { int i; + int len; if (ctxt == NULL) return; if ((ctxt->encoding == NULL) && (ctxt->escape == NULL)) ctxt->escape = xmlEscapeEntities; - if (xmlTreeIndentString == NULL) { + len = xmlStrlen((xmlChar *)xmlTreeIndentString); + if ((xmlTreeIndentString == NULL) || (len == 0)) { memset(&ctxt->indent[0], 0, MAX_INDENT + 1); } else { - ctxt->indent_size = xmlStrlen((const xmlChar *) xmlTreeIndentString); + ctxt->indent_size = len; ctxt->indent_nr = MAX_INDENT / ctxt->indent_size; for (i = 0;i < ctxt->indent_nr;i++) memcpy(&ctxt->indent[i * ctxt->indent_size], xmlTreeIndentString, @@ -670,9 +672,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { } if (cur->type == XML_TEXT_NODE) { if (cur->content != NULL) { - if ((cur->name == xmlStringText) || - (cur->name != xmlStringTextNoenc)) { - + if (cur->name != xmlStringTextNoenc) { xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); } else { /* diff --git a/xmlschemas.c b/xmlschemas.c index 81386b2..41add1c 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -7,7 +7,7 @@ * Daniel Veillard <veillard@redhat.com> */ -/* +/* * TODO: * - when types are redefined in includes, check that all * types in the redef list are equal @@ -34,6 +34,9 @@ #include <libxml/xmlautomata.h> #include <libxml/xmlregexp.h> #include <libxml/dict.h> +#ifdef LIBXML_PATTERN_ENABLED +#include <libxml/pattern.h> +#endif /* #define DEBUG 1 */ @@ -49,6 +52,16 @@ /* #define DEBUG_UNION_VALIDATION 1 */ +#define ELEM_INFO_ENABLED 1 + +#define IDC_ENABLED 1 + +#define IDC_VALUE_SUPPORT 1 + +#define IDC_XPATH_SUPPORT 1 + +/* #define DEBUG_IDC 1 */ + #define UNBOUNDED (1 << 30) #define TODO \ @@ -79,6 +92,10 @@ static const xmlChar *xmlSchemaElemDesST = (const xmlChar *) "simple type"; static const xmlChar *xmlSchemaElemDesCT = (const xmlChar *) "complex type"; +static const xmlChar *xmlSchemaElemModelGrDef = (const xmlChar *) + "Model group"; +static const xmlChar *xmlSchemaElemModelGrRef = (const xmlChar *) + "Model group ref."; #define IS_SCHEMA(node, type) \ ((node != NULL) && (node->ns != NULL) && \ @@ -104,9 +121,11 @@ static const xmlChar *xmlSchemaElemDesCT = (const xmlChar *) ((item->type == XML_SCHEMA_TYPE_BASIC) && \ (item->builtInType != XML_SCHEMAS_ANYTYPE))) +/* #define XML_SCHEMAS_VAL_WTSP_PRESERVE 0 #define XML_SCHEMAS_VAL_WTSP_REPLACE 1 #define XML_SCHEMAS_VAL_WTSP_COLLAPSE 2 +*/ #define XML_SCHEMAS_PARSE_ERROR 1 @@ -114,14 +133,6 @@ static const xmlChar *xmlSchemaElemDesCT = (const xmlChar *) /* -* XML_SCHEMA_VAL_XSI_ASSEMBLE_TNS_COMPOSE -* allow to assemble schemata with -* the same target namespace from -* different sources; otherwise, the first -* encountered schema with a specific target -* namespace will be used only * - -* * XML_SCHEMA_VAL_LOCATE_BY_NSNAME = 1<<2 * locate schemata to be imported * using the namespace name; otherwise @@ -140,15 +151,6 @@ typedef enum { } xmlSchemaParserOption; */ -/* -XMLPUBFUN int XMLCALL - xmlSchemaParserCtxtSetOptions(xmlSchemaParserCtxtPtr ctxt, - int options); -XMLPUBFUN int XMLCALL - xmlSchemaParserCtxtGetOptions(xmlSchemaParserCtxtPtr ctxt); - -*/ - typedef struct _xmlSchemaAssemble xmlSchemaAssemble; typedef xmlSchemaAssemble *xmlSchemaAssemblePtr; struct _xmlSchemaAssemble { @@ -194,6 +196,9 @@ struct _xmlSchemaParserCtxt { xmlSchemaAssemblePtr assemble; int options; xmlSchemaValidCtxtPtr vctxt; + const xmlChar **localImports; /* list of locally imported namespaces */ + int sizeLocalImports; + int nbLocalImports; }; @@ -205,6 +210,8 @@ struct _xmlSchemaParserCtxt { #define XML_SCHEMAS_ATTR_TYPE_NOT_RESOLVED 6 #define XML_SCHEMAS_ATTR_INVALID_FIXED_VALUE 7 #define XML_SCHEMAS_ATTR_DEFAULT 8 +#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9 +#define XML_SCHEMAS_ATTR_WILD_NO_DECL 10 typedef struct _xmlSchemaAttrState xmlSchemaAttrState; typedef xmlSchemaAttrState *xmlSchemaAttrStatePtr; @@ -216,6 +223,191 @@ struct _xmlSchemaAttrState { const xmlChar *value; }; +typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem; +typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr; +struct _xmlSchemaBasicItem { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; +}; + +typedef struct _xmlSchemaItemQNRef xmlSchemaItemQNRef; +typedef xmlSchemaItemQNRef *xmlSchemaItemQNRefPtr; +struct _xmlSchemaItemQNRef { + xmlSchemaBasicItemPtr item; + const xmlChar *name; + const xmlChar *targetNamespace; +}; + +typedef struct _xmlSchemaIDC xmlSchemaIDC; +typedef xmlSchemaIDC *xmlSchemaIDCPtr; + +/** + * xmlSchemaIDCSelect: + * + * The identity-constraint "field" and "selector" item, holding the + * XPath expression. + */ +typedef struct _xmlSchemaIDCSelect xmlSchemaIDCSelect; +typedef xmlSchemaIDCSelect *xmlSchemaIDCSelectPtr; +struct _xmlSchemaIDCSelect { + xmlSchemaIDCSelectPtr next; + xmlSchemaIDCPtr idc; + int index; /* an index position if significant for IDC key-sequences */ + const xmlChar *xpath; /* the XPath expression */ + void *xpathComp; /* the compiled XPath expression */ +}; + +/** + * xmlSchemaIDC: + * + * The identity-constraint definition component. + */ + +struct _xmlSchemaIDC { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; + xmlSchemaIDCPtr next; + xmlNodePtr node; + const xmlChar *name; + const xmlChar *targetNamespace; + xmlSchemaIDCSelectPtr selector; + xmlSchemaIDCSelectPtr fields; + int nbFields; + xmlSchemaItemQNRefPtr ref; +}; + +/** + * xmlSchemaIDCAug: + * + * The augmented IDC information used for validation. + */ +typedef struct _xmlSchemaIDCAug xmlSchemaIDCAug; +typedef xmlSchemaIDCAug *xmlSchemaIDCAugPtr; +struct _xmlSchemaIDCAug { + xmlSchemaIDCAugPtr next; /* next in a list */ + xmlSchemaIDCPtr def; /* the IDC definition */ + int bubbleDepth; /* the lowest level to which IDC + tables need to be bubbled upwards */ +}; + +/** + * xmlSchemaPSVIIDCKeySequence: + * + * The key sequence of a node table item. + */ +typedef struct _xmlSchemaPSVIIDCKey xmlSchemaPSVIIDCKey; +typedef xmlSchemaPSVIIDCKey *xmlSchemaPSVIIDCKeyPtr; +struct _xmlSchemaPSVIIDCKey { + xmlSchemaTypePtr type; + xmlSchemaValPtr compValue; +}; + +/** + * xmlSchemaPSVIIDCNode: + * + * The node table item of a node table. + */ +typedef struct _xmlSchemaPSVIIDCNode xmlSchemaPSVIIDCNode; +typedef xmlSchemaPSVIIDCNode *xmlSchemaPSVIIDCNodePtr; +struct _xmlSchemaPSVIIDCNode { + xmlNodePtr node; + xmlSchemaPSVIIDCKeyPtr *keys; +}; + +/** + * xmlSchemaPSVIIDCBinding: + * + * The identity-constraint binding item of the [identity-constraint table]. + */ +typedef struct _xmlSchemaPSVIIDCBinding xmlSchemaPSVIIDCBinding; +typedef xmlSchemaPSVIIDCBinding *xmlSchemaPSVIIDCBindingPtr; +struct _xmlSchemaPSVIIDCBinding { + xmlSchemaPSVIIDCBindingPtr next; /* next binding of a specific node */ + xmlSchemaIDCPtr definition; /* the IDC definition */ + xmlSchemaPSVIIDCNodePtr *nodeTable; /* array of key-sequences */ + int nbNodes; /* number of entries in the node table */ + int sizeNodes; /* size of the node table */ + int nbDupls; /* number of already identified duplicates in the node + table */ + /* int nbKeys; number of keys in each key-sequence */ +}; + +#define XPATH_STATE_OBJ_TYPE_IDC_SELECTOR 1 +#define XPATH_STATE_OBJ_TYPE_IDC_FIELD 2 + +#define XPATH_STATE_OBJ_MATCHES -2 +#define XPATH_STATE_OBJ_BLOCKED -3 + +typedef struct _xmlSchemaIDCMatcher xmlSchemaIDCMatcher; +typedef xmlSchemaIDCMatcher *xmlSchemaIDCMatcherPtr; + +/** + * xmlSchemaIDCStateObj: + * + * The state object used to evaluate XPath expressions. + */ +typedef struct _xmlSchemaIDCStateObj xmlSchemaIDCStateObj; +typedef xmlSchemaIDCStateObj *xmlSchemaIDCStateObjPtr; +struct _xmlSchemaIDCStateObj { + int type; + xmlSchemaIDCStateObjPtr next; /* next if in a list */ + int depth; /* depth of creation */ + int *history; /* list of (depth, state-id) tuples */ + int nbHistory; + int sizeHistory; + xmlSchemaIDCMatcherPtr matcher; /* the correspondent field/selector + matcher */ + xmlSchemaIDCSelectPtr sel; + void *xpathCtxt; +}; + +#define IDC_MATCHER 0 + +/** + * xmlSchemaIDCMatcher: + * + * Used to IDC selectors (and fields) successively. + */ +struct _xmlSchemaIDCMatcher { + int type; + int depth; /* the tree depth at creation time */ + xmlSchemaIDCMatcherPtr next; /* next in the list */ + xmlSchemaIDCAugPtr aidc; /* the augmented IDC item */ + xmlSchemaPSVIIDCKeyPtr **keySeqs; /* the key-sequences of the target + elements */ + int sizeKeySeqs; + int targetDepth; +}; + +/* +* Element info flags. +*/ +#define XML_SCHEMA_ELEM_INFO_VALUE_NEEDED 1 +/* #define XML_SCHEMA_ELEM_INFO_ATTR 2 */ +/* #define XML_SCHEMA_ELEM_INFO_ELEM 4 */ + +/** + * xmlSchemaNodeInfo: + * + * Holds information of an element node. + */ +typedef struct _xmlSchemaNodeInfo xmlSchemaNodeInfo; +typedef xmlSchemaNodeInfo *xmlSchemaNodeInfoPtr; +struct _xmlSchemaNodeInfo { + int depth; + int flags; /* combination of node info flags */ + xmlNodePtr node; + const xmlChar *localName; + const xmlChar *namespaceName; + xmlSchemaTypePtr typeDef; /* the complex/simple type definition if any */ + xmlSchemaTypePtr decl; /* the element/attribute declaration */ + xmlSchemaValPtr value; /* the pre-computed value if any */ + xmlSchemaPSVIIDCBindingPtr idcTable; /* the table of PSVI IDC bindings + for the scope element*/ + xmlSchemaIDCMatcherPtr idcMatchers; /* the IDC matchers for the scope + element */ +}; + /** * xmlSchemaValidCtxt: * @@ -225,7 +417,7 @@ struct _xmlSchemaAttrState { struct _xmlSchemaValidCtxt { void *userData; /* user specific data block */ xmlSchemaValidityErrorFunc error; /* the callback in case of errors */ - xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */ + xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */ xmlStructuredErrorFunc serror; xmlSchemaPtr schema; /* The schema in use */ @@ -254,6 +446,27 @@ struct _xmlSchemaValidCtxt { xmlNodePtr validationRoot; xmlSchemaParserCtxtPtr pctxt; int xsiAssemble; +#ifdef ELEM_INFO_ENABLED + int depth; + xmlSchemaNodeInfoPtr *elemInfos; /* array of element informations */ + int sizeElemInfos; + xmlSchemaNodeInfoPtr nodeInfo; /* the current element information */ + xmlSchemaNodeInfoPtr attrInfo; /* node infor for the current attribute */ +#endif +#ifdef IDC_ENABLED + xmlSchemaIDCAugPtr aidcs; /* a list of augmented IDC informations */ + + xmlSchemaIDCStateObjPtr xpathStates; /* first active state object. */ + xmlSchemaIDCStateObjPtr xpathStatePool; /* first stored state object. */ + + xmlSchemaPSVIIDCNodePtr *idcNodes; /* list of all IDC node-table entries*/ + int nbIdcNodes; + int sizeIdcNodes; + + xmlSchemaPSVIIDCKeyPtr *idcKeys; /* list of all IDC node-table entries */ + int nbIdcKeys; + int sizeIdcKeys; +#endif }; /* @@ -275,9 +488,10 @@ typedef struct _xmlSchemaInclude xmlSchemaInclude; typedef xmlSchemaInclude *xmlSchemaIncludePtr; struct _xmlSchemaInclude { xmlSchemaIncludePtr next; - const xmlChar *schemaLocation; xmlDocPtr doc; + const xmlChar *origTargetNamespace; + const xmlChar *targetNamespace; }; typedef struct _xmlSchemaParticle xmlSchemaParticle; @@ -322,13 +536,13 @@ static int xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaTypeFixup(xmlSchemaTypePtr typeDecl, xmlSchemaParserCtxtPtr ctxt, const xmlChar * name); -static const char * +static const xmlChar * xmlSchemaFacetTypeToString(xmlSchemaTypeType type); static int xmlSchemaValidateSimpleTypeValue(xmlSchemaValidCtxtPtr ctxt, xmlSchemaTypePtr type, const xmlChar *value, - int fireErrors, + int fireErrors, int applyFacets, int normalize, int checkNodes); @@ -346,6 +560,8 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, static void xmlSchemaCheckDefaults(xmlSchemaTypePtr typeDecl, xmlSchemaParserCtxtPtr ctxt, const xmlChar * name); +static void +xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt); /************************************************************************ * * @@ -701,6 +917,57 @@ xmlSchemaFormatNsPrefixLocal(xmlChar **buf, } /** + * xmlSchemaFormatQName: + * @buf: the string buffer + * @namespaceName: the namespace name + * @localName: the local name + * + * Returns the given QName in the format "{namespaceName}localName" or + * just "localName" if @namespaceName is NULL. + * + * Returns the localName if @namespaceName is NULL, a formatted + * string otherwise. + */ +static const xmlChar* +xmlSchemaFormatQName(xmlChar **buf, + const xmlChar *namespaceName, + const xmlChar *localName) +{ + FREE_AND_NULL(*buf) + if (namespaceName == NULL) + return(localName); + + *buf = xmlStrdup(BAD_CAST "{"); + *buf = xmlStrcat(*buf, namespaceName); + *buf = xmlStrcat(*buf, BAD_CAST "}"); + *buf = xmlStrcat(*buf, localName); + + return ((const xmlChar *) *buf); +} + +/** + * xmlSchemaWildcardPCToString: + * @pc: the type of processContents + * + * Returns a string representation of the type of + * processContents. + */ +static const xmlChar * +xmlSchemaWildcardPCToString(int pc) +{ + switch (pc) { + case XML_SCHEMAS_ANY_SKIP: + return (BAD_CAST "skip"); + case XML_SCHEMAS_ANY_LAX: + return (BAD_CAST "lax"); + case XML_SCHEMAS_ANY_STRICT: + return (BAD_CAST "strict"); + default: + return (BAD_CAST "invalid process contents"); + } +} + +/** * xmlSchemaFormatItemForReport: * @buf: the string buffer * @itemDes: the designation of the item @@ -744,7 +1011,8 @@ xmlSchemaFormatItemForReport(xmlChar **buf, if (itemDes != NULL) { *buf = xmlStrdup(itemDes); } else if (item != NULL) { - if (item->type == XML_SCHEMA_TYPE_BASIC) { + switch (item->type) { + case XML_SCHEMA_TYPE_BASIC: if (item->builtInType == XML_SCHEMAS_ANYTYPE) *buf = xmlStrdup(BAD_CAST "'anyType'"); else if (item->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) @@ -756,7 +1024,8 @@ xmlSchemaFormatItemForReport(xmlChar **buf, *buf = xmlStrcat(*buf, item->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); } - } else if (item->type == XML_SCHEMA_TYPE_SIMPLE) { + break; + case XML_SCHEMA_TYPE_SIMPLE: if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrdup(xmlSchemaElemDesST); *buf = xmlStrcat(*buf, BAD_CAST " '"); @@ -764,11 +1033,9 @@ xmlSchemaFormatItemForReport(xmlChar **buf, *buf = xmlStrcat(*buf, BAD_CAST "'"); } else { *buf = xmlStrdup(xmlSchemaElemDesST); - /* Local types will get to name - *buf = xmlStrcat(*buf, BAD_CAST " "); - */ } - } else if (item->type == XML_SCHEMA_TYPE_COMPLEX) { + break; + case XML_SCHEMA_TYPE_COMPLEX: if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrdup(xmlSchemaElemDesCT); *buf = xmlStrcat(*buf, BAD_CAST " '"); @@ -776,48 +1043,100 @@ xmlSchemaFormatItemForReport(xmlChar **buf, *buf = xmlStrcat(*buf, BAD_CAST "'"); } else { *buf = xmlStrdup(xmlSchemaElemDesCT); - /* Local types will get to name - *buf = xmlStrcat(*buf, BAD_CAST " "); - */ } - } else if (item->type == XML_SCHEMA_TYPE_ATTRIBUTE) { - xmlSchemaAttributePtr attr; + break; + case XML_SCHEMA_TYPE_ATTRIBUTE: { + xmlSchemaAttributePtr attr; + + attr = (xmlSchemaAttributePtr) item; + if ((attr->flags & XML_SCHEMAS_ATTR_GLOBAL) || + (attr->ref == NULL)) { + *buf = xmlStrdup(xmlSchemaElemDesAttrDecl); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, attr->name); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + } else { + *buf = xmlStrdup(xmlSchemaElemDesAttrRef); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, attr->refPrefix); + *buf = xmlStrcat(*buf, BAD_CAST ":"); + *buf = xmlStrcat(*buf, attr->ref); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + } + } + break; + case XML_SCHEMA_TYPE_ELEMENT: { + xmlSchemaElementPtr elem; - attr = (xmlSchemaAttributePtr) item; - if ((attr->flags & XML_SCHEMAS_TYPE_GLOBAL) || - (attr->ref == NULL)) { - *buf = xmlStrdup(xmlSchemaElemDesAttrDecl); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, attr->name); - *buf = xmlStrcat(*buf, BAD_CAST "'"); - } else { - *buf = xmlStrdup(xmlSchemaElemDesAttrRef); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, attr->refPrefix); - *buf = xmlStrcat(*buf, BAD_CAST ":"); - *buf = xmlStrcat(*buf, attr->ref); - *buf = xmlStrcat(*buf, BAD_CAST "'"); - } - } else if (item->type == XML_SCHEMA_TYPE_ELEMENT) { - xmlSchemaElementPtr elem; - - elem = (xmlSchemaElementPtr) item; - if ((elem->flags & XML_SCHEMAS_TYPE_GLOBAL) || - (elem->ref == NULL)) { - *buf = xmlStrdup(xmlSchemaElemDesElemDecl); + elem = (xmlSchemaElementPtr) item; + if ((elem->flags & XML_SCHEMAS_ELEM_GLOBAL) || + (elem->ref == NULL)) { + *buf = xmlStrdup(xmlSchemaElemDesElemDecl); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, elem->name); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + } else { + *buf = xmlStrdup(xmlSchemaElemDesElemRef); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, elem->refPrefix); + *buf = xmlStrcat(*buf, BAD_CAST ":"); + *buf = xmlStrcat(*buf, elem->ref); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + } + } + break; + case XML_SCHEMA_TYPE_IDC_UNIQUE: + case XML_SCHEMA_TYPE_IDC_KEY: + case XML_SCHEMA_TYPE_IDC_KEYREF: + if (item->type == XML_SCHEMA_TYPE_IDC_UNIQUE) + *buf = xmlStrdup(BAD_CAST "unique '"); + else if (item->type == XML_SCHEMA_TYPE_IDC_KEY) + *buf = xmlStrdup(BAD_CAST "key '"); + else + *buf = xmlStrdup(BAD_CAST "keyRef '"); + *buf = xmlStrcat(*buf, ((xmlSchemaIDCPtr) item)->name); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + break; + case XML_SCHEMA_TYPE_ANY_ATTRIBUTE: + *buf = xmlStrdup(xmlSchemaWildcardPCToString( + ((xmlSchemaWildcardPtr) item)->processContents)); + *buf = xmlStrcat(*buf, BAD_CAST " wildcard"); + break; + case XML_SCHEMA_FACET_MININCLUSIVE: + case XML_SCHEMA_FACET_MINEXCLUSIVE: + case XML_SCHEMA_FACET_MAXINCLUSIVE: + case XML_SCHEMA_FACET_MAXEXCLUSIVE: + case XML_SCHEMA_FACET_TOTALDIGITS: + case XML_SCHEMA_FACET_FRACTIONDIGITS: + case XML_SCHEMA_FACET_PATTERN: + case XML_SCHEMA_FACET_ENUMERATION: + case XML_SCHEMA_FACET_WHITESPACE: + case XML_SCHEMA_FACET_LENGTH: + case XML_SCHEMA_FACET_MAXLENGTH: + case XML_SCHEMA_FACET_MINLENGTH: + *buf = xmlStrdup(BAD_CAST "facet '"); + *buf = xmlStrcat(*buf, xmlSchemaFacetTypeToString(item->type)); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + break; + case XML_SCHEMA_TYPE_NOTATION: + *buf = xmlStrdup(BAD_CAST "notation"); + break; + case XML_SCHEMA_TYPE_GROUP: + if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { + *buf = xmlStrdup(xmlSchemaElemModelGrDef); *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, elem->name); + *buf = xmlStrcat(*buf, item->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); } else { - *buf = xmlStrdup(xmlSchemaElemDesElemRef); + *buf = xmlStrdup(xmlSchemaElemModelGrRef); *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, elem->refPrefix); - *buf = xmlStrcat(*buf, BAD_CAST ":"); - *buf = xmlStrcat(*buf, elem->ref); + *buf = xmlStrcat(*buf, item->ref); *buf = xmlStrcat(*buf, BAD_CAST "'"); - } - } else + } + break; + default: named = 0; + } } else named = 0; @@ -949,7 +1268,7 @@ xmlSchemaVFacetErr(xmlSchemaValidCtxtPtr ctxt, */ } else facetType = facet->type; - msg = xmlStrcat(msg, BAD_CAST xmlSchemaFacetTypeToString(facetType)); + msg = xmlStrcat(msg, xmlSchemaFacetTypeToString(facetType)); msg = xmlStrcat(msg, BAD_CAST "']: "); if (message == NULL) { /* @@ -1535,7 +1854,7 @@ xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPErrExt(ctxt, item->node, error, NULL, NULL, NULL, "%s: The facet '%s' is not allowed on types derived from the " "type %s.\n", - BAD_CAST des, BAD_CAST xmlSchemaFacetTypeToString(facet->type), + BAD_CAST des, xmlSchemaFacetTypeToString(facet->type), xmlSchemaFormatItemForReport(&strT, NULL, baseItem, NULL, 1), NULL, NULL); if (itemDes == NULL) @@ -1565,7 +1884,7 @@ xmlSchemaPIllegalFacetListUnionErr(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPAquireDes(&des, itemDes, item, item->node); xmlSchemaPErr(ctxt, item->node, error, "%s: The facet '%s' is not allowed.\n", - BAD_CAST des, BAD_CAST xmlSchemaFacetTypeToString(facet->type)); + BAD_CAST des, xmlSchemaFacetTypeToString(facet->type)); if (itemDes == NULL) FREE_AND_NULL(des); FREE_AND_NULL(strT); @@ -1790,6 +2109,51 @@ xmlSchemaIsGlobalItem(xmlSchemaTypePtr item) return (0); } + +static void +xmlSchemaStreamVCustomErr(xmlSchemaValidCtxtPtr vctxt, + xmlParserErrors error, + xmlSchemaNodeInfoPtr nodeInfo, + xmlSchemaTypePtr type, + const char *message, + const xmlChar *str1, + const xmlChar *str2) +{ + xmlChar *msg = NULL, *str = NULL; + + msg = xmlStrdup(BAD_CAST "Element '"); + + if (vctxt->elemInfos[vctxt->depth] != nodeInfo) { + xmlSchemaNodeInfoPtr elemInfo; + /* + * The node info is an attribute info. + */ + elemInfo = vctxt->elemInfos[vctxt->depth]; + msg = xmlStrcat(msg, xmlSchemaFormatQName(&str, + elemInfo->namespaceName, elemInfo->localName)); + msg = xmlStrcat(msg, BAD_CAST "', "); + msg = xmlStrcat(msg, BAD_CAST "attribute '"); + } + msg = xmlStrcat(msg, xmlSchemaFormatQName(&str, + nodeInfo->namespaceName, nodeInfo->localName)); + msg = xmlStrcat(msg, BAD_CAST "'"); + + if ((type != NULL) && (xmlSchemaIsGlobalItem(type))) { + msg = xmlStrcat(msg, BAD_CAST " ["); + msg = xmlStrcat(msg, xmlSchemaFormatItemForReport(&str, + NULL, type, NULL, 0)); + msg = xmlStrcat(msg, BAD_CAST "]"); + } + msg = xmlStrcat(msg, BAD_CAST ": "); + + msg = xmlStrcat(msg, (const xmlChar *) message); + msg = xmlStrcat(msg, BAD_CAST ".\n"); + xmlSchemaVErr(vctxt, nodeInfo->node, error, (const char *) msg, + str1, str2); + FREE_AND_NULL(msg) + FREE_AND_NULL(str) +} + /** * xmlSchemaVCustomErr: * @ctxt: the schema validation context @@ -1837,28 +2201,6 @@ xmlSchemaVCustomErr(xmlSchemaValidCtxtPtr ctxt, } /** - * xmlSchemaWildcardPCToString: - * @pc: the type of processContents - * - * Returns a string representation of the type of - * processContents. - */ -static const char * -xmlSchemaWildcardPCToString(int pc) -{ - switch (pc) { - case XML_SCHEMAS_ANY_SKIP: - return ("skip"); - case XML_SCHEMAS_ANY_LAX: - return ("lax"); - case XML_SCHEMAS_ANY_STRICT: - return ("strict"); - default: - return ("invalid process contents"); - } -} - -/** * xmlSchemaVWildcardErr: * @ctxt: the schema validation context * @error: the error code @@ -1878,8 +2220,8 @@ xmlSchemaVWildcardErr(xmlSchemaValidCtxtPtr ctxt, xmlChar *des = NULL, *msg = NULL; xmlSchemaFormatItemForReport(&des, NULL, NULL, node, 0); - msg = xmlStrdup(BAD_CAST "%s, ["); - msg = xmlStrcat(msg, BAD_CAST xmlSchemaWildcardPCToString(wild->processContents)); + msg = xmlStrdup(BAD_CAST "%s ["); + msg = xmlStrcat(msg, xmlSchemaWildcardPCToString(wild->processContents)); msg = xmlStrcat(msg, BAD_CAST " wildcard]: "); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); @@ -2211,6 +2553,60 @@ xmlSchemaFreeTypeLinkList(xmlSchemaTypeLinkPtr link) } } +#ifdef IDC_ENABLED +static void +xmlSchemaFreeIDCStateObjList(xmlSchemaIDCStateObjPtr sto) +{ + xmlSchemaIDCStateObjPtr next; + while (sto != NULL) { + next = sto->next; + if (sto->history != NULL) + xmlFree(sto->history); + if (sto->xpathCtxt != NULL) + xmlFreeStreamCtxt((xmlStreamCtxtPtr) sto->xpathCtxt); + xmlFree(sto); + sto = next; + } +} + +/** + * xmlSchemaFreeIDC: + * @idc: a identity-constraint definition + * + * Deallocates an identity-constraint definition. + */ +static void +xmlSchemaFreeIDC(xmlSchemaIDCPtr idcDef) +{ + xmlSchemaIDCSelectPtr cur, prev; + + if (idcDef == NULL) + return; + if (idcDef->annot != NULL) + xmlSchemaFreeAnnot(idcDef->annot); + if (idcDef->ref != NULL) + xmlFree(idcDef->ref); + /* Selector */ + if (idcDef->selector != NULL) { + if (idcDef->selector->xpathComp != NULL) + xmlFreePattern((xmlPatternPtr) idcDef->selector->xpathComp); + xmlFree(idcDef->selector); + } + /* Fields */ + if (idcDef->fields != NULL) { + cur = idcDef->fields; + do { + prev = cur; + cur = cur->next; + if (prev->xpathComp != NULL) + xmlFreePattern((xmlPatternPtr) prev->xpathComp); + xmlFree(prev); + } while (cur != NULL); + } + xmlFree(idcDef); +} +#endif /* IDC_ENABLED */ + /** * xmlSchemaFreeElement: * @schema: a schema element structure @@ -2353,6 +2749,11 @@ xmlSchemaFree(xmlSchemaPtr schema) if (schema->groupDecl != NULL) xmlHashFree(schema->groupDecl, (xmlHashDeallocator) xmlSchemaFreeType); +#ifdef IDC_ENABLED + if (schema->idcDef != NULL) + xmlHashFree(schema->idcDef, + (xmlHashDeallocator) xmlSchemaFreeIDC); +#endif if (schema->schemasImports != NULL) xmlHashFree(schema->schemasImports, (xmlHashDeallocator) xmlSchemaFreeImport); @@ -2385,36 +2786,28 @@ xmlSchemaFree(xmlSchemaPtr schema) static void xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, const xmlChar * name ATTRIBUTE_UNUSED, - const xmlChar * context ATTRIBUTE_UNUSED, - const xmlChar * namespace ATTRIBUTE_UNUSED) + const xmlChar * namespace ATTRIBUTE_UNUSED, + const xmlChar * context ATTRIBUTE_UNUSED) { if (elem == NULL) return; - fprintf(output, "Element "); - if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL) - fprintf(output, "global "); - fprintf(output, ": %s ", elem->name); - if (namespace != NULL) - fprintf(output, "namespace '%s' ", namespace); - - if (elem->flags & XML_SCHEMAS_ELEM_NILLABLE) - fprintf(output, "nillable "); - if (elem->flags & XML_SCHEMAS_ELEM_DEFAULT) - fprintf(output, "default "); - if (elem->flags & XML_SCHEMAS_ELEM_FIXED) - fprintf(output, "fixed "); - if (elem->flags & XML_SCHEMAS_ELEM_ABSTRACT) - fprintf(output, "abstract "); - if (elem->flags & XML_SCHEMAS_ELEM_REF) - fprintf(output, "ref '%s' ", elem->ref); - if (elem->id != NULL) - fprintf(output, "id '%s' ", elem->id); + if (elem->flags & XML_SCHEMAS_ELEM_REF) { + fprintf(output, "Particle: %s", name); + fprintf(output, ", term element: %s", elem->ref); + if (elem->refNs != NULL) + fprintf(output, " ns %s", elem->refNs); + } else { + fprintf(output, "Element"); + if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL) + fprintf(output, " (global)"); + fprintf(output, ": %s ", elem->name); + if (namespace != NULL) + fprintf(output, "ns %s", namespace); + } fprintf(output, "\n"); if ((elem->minOccurs != 1) || (elem->maxOccurs != 1)) { - fprintf(output, " "); - if (elem->minOccurs != 1) - fprintf(output, "min: %d ", elem->minOccurs); + fprintf(output, " min %d ", elem->minOccurs); if (elem->maxOccurs >= UNBOUNDED) fprintf(output, "max: unbounded\n"); else if (elem->maxOccurs != 1) @@ -2422,22 +2815,52 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, else fprintf(output, "\n"); } + /* + * Misc other properties. + */ + if ((elem->flags & XML_SCHEMAS_ELEM_NILLABLE) || + (elem->flags & XML_SCHEMAS_ELEM_ABSTRACT) || + (elem->flags & XML_SCHEMAS_ELEM_FIXED) || + (elem->flags & XML_SCHEMAS_ELEM_DEFAULT) || + (elem->id != NULL)) { + fprintf(output, " props: "); + if (elem->flags & XML_SCHEMAS_ELEM_FIXED) + fprintf(output, "[fixed] "); + if (elem->flags & XML_SCHEMAS_ELEM_DEFAULT) + fprintf(output, "[default] "); + if (elem->flags & XML_SCHEMAS_ELEM_ABSTRACT) + fprintf(output, "[abstract] "); + if (elem->flags & XML_SCHEMAS_ELEM_NILLABLE) + fprintf(output, "[nillable] "); + if (elem->id != NULL) + fprintf(output, "[id: '%s'] ", elem->id); + fprintf(output, "\n"); + } + /* + * Default/fixed value. + */ + if (elem->value != NULL) + fprintf(output, " value: '%s'\n", elem->value); + /* + * Type. + */ if (elem->namedType != NULL) { - fprintf(output, " type: %s", elem->namedType); - if (elem->namedTypeNs != NULL) - fprintf(output, " ns %s\n", elem->namedTypeNs); - else - fprintf(output, "\n"); + fprintf(output, " type: %s ", elem->namedType); + if (elem->namedTypeNs != NULL) + fprintf(output, "ns %s\n", elem->namedTypeNs); + else + fprintf(output, "\n"); } + /* + * Substitution group. + */ if (elem->substGroup != NULL) { - fprintf(output, " substitutionGroup: %s", elem->substGroup); - if (elem->substGroupNs != NULL) - fprintf(output, " ns %s\n", elem->substGroupNs); - else - fprintf(output, "\n"); + fprintf(output, " substitutionGroup: %s ", elem->substGroup); + if (elem->substGroupNs != NULL) + fprintf(output, "ns %s\n", elem->substGroupNs); + else + fprintf(output, "\n"); } - if (elem->value != NULL) - fprintf(output, " default: %s", elem->value); } /** @@ -2479,75 +2902,73 @@ xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output) } fprintf(output, "Type: "); if (type->name != NULL) - fprintf(output, "%s, ", type->name); + fprintf(output, "%s ", type->name); else - fprintf(output, "no name"); + fprintf(output, "no name "); + if (type->targetNamespace != NULL) + fprintf(output, "ns %s ", type->targetNamespace); switch (type->type) { case XML_SCHEMA_TYPE_BASIC: - fprintf(output, "basic "); + fprintf(output, "[basic] "); break; case XML_SCHEMA_TYPE_SIMPLE: - fprintf(output, "simple "); + fprintf(output, "[simple] "); break; case XML_SCHEMA_TYPE_COMPLEX: - fprintf(output, "complex "); + fprintf(output, "[complex] "); break; case XML_SCHEMA_TYPE_SEQUENCE: - fprintf(output, "sequence "); + fprintf(output, "[sequence] "); break; case XML_SCHEMA_TYPE_CHOICE: - fprintf(output, "choice "); + fprintf(output, "[choice] "); break; case XML_SCHEMA_TYPE_ALL: - fprintf(output, "all "); + fprintf(output, "[all] "); break; case XML_SCHEMA_TYPE_UR: - fprintf(output, "ur "); + fprintf(output, "[ur] "); break; case XML_SCHEMA_TYPE_RESTRICTION: - fprintf(output, "restriction "); + fprintf(output, "[restriction] "); break; case XML_SCHEMA_TYPE_EXTENSION: - fprintf(output, "extension "); + fprintf(output, "[extension] "); break; default: - fprintf(output, "unknowntype%d ", type->type); + fprintf(output, "[unknown type %d] ", type->type); break; - } - if (type->base != NULL) { - fprintf(output, "base %s, ", type->base); - } + } + fprintf(output, "content: "); switch (type->contentType) { case XML_SCHEMA_CONTENT_UNKNOWN: - fprintf(output, "unknown "); + fprintf(output, "[unknown] "); break; case XML_SCHEMA_CONTENT_EMPTY: - fprintf(output, "empty "); + fprintf(output, "[empty] "); break; case XML_SCHEMA_CONTENT_ELEMENTS: - fprintf(output, "element "); + fprintf(output, "[element] "); break; case XML_SCHEMA_CONTENT_MIXED: - fprintf(output, "mixed "); + fprintf(output, "[mixed] "); break; case XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS: /* not used. */ break; case XML_SCHEMA_CONTENT_BASIC: - fprintf(output, "basic "); + fprintf(output, "[basic] "); break; case XML_SCHEMA_CONTENT_SIMPLE: - fprintf(output, "simple "); + fprintf(output, "[simple] "); break; case XML_SCHEMA_CONTENT_ANY: - fprintf(output, "any "); + fprintf(output, "[any] "); break; } fprintf(output, "\n"); if ((type->minOccurs != 1) || (type->maxOccurs != 1)) { - fprintf(output, " "); - if (type->minOccurs != 1) - fprintf(output, "min: %d ", type->minOccurs); + fprintf(output, " min: %d ", type->minOccurs); if (type->maxOccurs >= UNBOUNDED) fprintf(output, "max: unbounded\n"); else if (type->maxOccurs != 1) @@ -2555,6 +2976,13 @@ xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output) else fprintf(output, "\n"); } + if (type->base != NULL) { + fprintf(output, " base type: %s", type->base); + if (type->baseNs != NULL) + fprintf(output, " ns %s\n", type->baseNs); + else + fprintf(output, "\n"); + } if (type->annot != NULL) xmlSchemaAnnotDump(output, type->annot); if (type->subtypes != NULL) { @@ -2604,6 +3032,67 @@ xmlSchemaDump(FILE * output, xmlSchemaPtr schema) xmlHashScanFull(schema->elemDecl, (xmlHashScannerFull) xmlSchemaElementDump, output); } + +#ifdef IDC_ENABLED +#ifdef DEBUG_IDC +/** + * xmlSchemaDebugDumpIDCTable: + * @vctxt: the WXS validation context + * + * Displays the current IDC table for debug purposes. + */ +static void +xmlSchemaDebugDumpIDCTable(FILE * output, + const xmlChar *namespaceName, + const xmlChar *localName, + xmlSchemaPSVIIDCBindingPtr bind) +{ + xmlChar *str = NULL, *value; + xmlSchemaPSVIIDCNodePtr tab; + xmlSchemaPSVIIDCKeyPtr key; + int i, j, res; + + fprintf(output, "IDC: TABLES on %s\n", + xmlSchemaFormatNsUriLocal(&str, namespaceName, localName)); + FREE_AND_NULL(str) + + if (bind == NULL) + return; + do { + fprintf(output, "IDC: BINDING %s\n", + xmlSchemaFormatNsUriLocal(&str, bind->definition->targetNamespace, + bind->definition->name)); + FREE_AND_NULL(str) + for (i = 0; i < bind->nbNodes; i++) { + tab = bind->nodeTable[i]; + fprintf(output, " ( "); + for (j = 0; j < bind->definition->nbFields; j++) { + key = tab->keys[j]; + if ((key != NULL) && (key->compValue != NULL)) { +#ifdef IDC_VALUE_SUPPORT + res = xmlSchemaGetCanonValue(key->compValue, &value); +#else + value = xmlStrdup(BAD_CAST "dummy-value"); + res = 0; +#endif + if (res >= 0) + fprintf(output, "\"%s\" ", value); + else + fprintf(output, "CANON-VALUE-FAILED "); + if (res == 0) + FREE_AND_NULL(value) + } else if (key != NULL) + fprintf(output, "(no val), "); + else + fprintf(output, "(key missing), "); + } + fprintf(output, ")\n"); + } + bind = bind->next; + } while (bind != NULL); +} +#endif /* DEBUG_IDC */ +#endif /* IDC_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */ /************************************************************************ @@ -3082,7 +3571,7 @@ xmlSchemaAddAssembledItem(xmlSchemaParserCtxtPtr ctxt, */ static xmlSchemaNotationPtr xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - const xmlChar * name) + const xmlChar *name) { xmlSchemaNotationPtr ret = NULL; int val; @@ -3091,7 +3580,7 @@ xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); if (schema->notaDecl == NULL) - schema->notaDecl = xmlHashCreate(10); + schema->notaDecl = xmlHashCreateDict(10, ctxt->dict); if (schema->notaDecl == NULL) return (NULL); @@ -3135,7 +3624,7 @@ xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, static xmlSchemaAttributePtr xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, const xmlChar * name, const xmlChar * namespace, - xmlNodePtr node) + xmlNodePtr node, int topLevel) { xmlSchemaAttributePtr ret = NULL; int val; @@ -3150,7 +3639,7 @@ xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, #endif if (schema->attrDecl == NULL) - schema->attrDecl = xmlHashCreate(10); + schema->attrDecl = xmlHashCreateDict(10, ctxt->dict); if (schema->attrDecl == NULL) return (NULL); @@ -3165,12 +3654,41 @@ xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, val = xmlHashAddEntry3(schema->attrDecl, name, namespace, ctxt->container, ret); if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_ATTR, - NULL, NULL, node, - "A global attribute declaration with the name '%s' does already exist", name); - xmlFree(ret); - return (NULL); + if (topLevel) { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_REDEFINED_ATTR, + NULL, NULL, node, + "A global attribute declaration with the name '%s' does " + "already exist", name); + xmlFree(ret); + return (NULL); + } else { + char buf[30]; + /* + * Using the ctxt->container for xmlHashAddEntry3 is ambigious + * in the scenario: + * 1. multiple top-level complex types have different target + * namespaces but have the SAME NAME; this can happen if + * schemata are imported + * 2. those complex types contain attributes with an equal name + * 3. those attributes are in no namespace + * We will compute a new context string. + */ + snprintf(buf, 29, "#aCont%d", ctxt->counter++ + 1); + val = xmlHashAddEntry3(schema->attrDecl, name, + namespace, xmlDictLookup(ctxt->dict, BAD_CAST buf, -1), ret); + + if (val != 0) { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_INTERNAL, + NULL, NULL, node, + "Internal error: xmlSchemaAddAttribute, " + "a dublicate attribute declaration with the name '%s' " + "could not be added to the hash.", name); + xmlFree(ret); + return (NULL); + } + } } if (ctxt->assemble != NULL) xmlSchemaAddAssembledItem(ctxt, (xmlSchemaTypePtr) ret); @@ -3199,7 +3717,7 @@ xmlSchemaAddAttributeGroup(xmlSchemaParserCtxtPtr ctxt, return (NULL); if (schema->attrgrpDecl == NULL) - schema->attrgrpDecl = xmlHashCreate(10); + schema->attrgrpDecl = xmlHashCreateDict(10, ctxt->dict); if (schema->attrgrpDecl == NULL) return (NULL); @@ -3257,7 +3775,7 @@ xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, #endif if (schema->elemDecl == NULL) - schema->elemDecl = xmlHashCreate(10); + schema->elemDecl = xmlHashCreateDict(10, ctxt->dict); if (schema->elemDecl == NULL) return (NULL); @@ -3282,9 +3800,9 @@ xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else { char buf[30]; - snprintf(buf, 29, "#eCont %d", ctxt->counter++ + 1); - val = xmlHashAddEntry3(schema->elemDecl, name, (xmlChar *) buf, - namespace, ret); + snprintf(buf, 29, "#eCont%d", ctxt->counter++ + 1); + val = xmlHashAddEntry3(schema->elemDecl, name, + namespace, (xmlChar *) buf, ret); if (val != 0) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL, @@ -3333,7 +3851,7 @@ xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, #endif if (schema->typeDecl == NULL) - schema->typeDecl = xmlHashCreate(10); + schema->typeDecl = xmlHashCreateDict(10, ctxt->dict); if (schema->typeDecl == NULL) return (NULL); @@ -3402,7 +3920,7 @@ xmlSchemaAddGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); if (schema->groupDecl == NULL) - schema->groupDecl = xmlHashCreate(10); + schema->groupDecl = xmlHashCreateDict(10, ctxt->dict); if (schema->groupDecl == NULL) return (NULL); @@ -3418,12 +3936,14 @@ xmlSchemaAddGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, ret); if (val != 0) { xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_GROUP, - NULL, NULL, node, - "A global model group definition with the name '%s' does already exist", name); + XML_SCHEMAP_REDEFINED_GROUP, + NULL, NULL, node, + "A global model group definition with the name '%s' does already " + "exist", name); xmlFree(ret); return (NULL); } + ret->targetNamespace = namespaceName; ret->minOccurs = 1; ret->maxOccurs = 1; if (ctxt->assemble != NULL) @@ -3708,6 +4228,82 @@ xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt, } /** + * xmlSchemaPValAttrID: + * @ctxt: a schema parser context + * @schema: the schema context + * @ownerDes: the designation of the parent element + * @ownerItem: the owner as a schema object + * @ownerElem: the parent node of the attribute + * @name: the name of the attribute + * + * Extracts and validates the ID of an attribute value. + * + * Returns 0, in case the ID is valid, a positive error code + * if not valid and -1 if an internal error occurs. + */ +static int +xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt, + xmlChar **ownerDes, + xmlSchemaTypePtr ownerItem, + xmlNodePtr ownerElem, + const xmlChar *name) +{ + int ret; + xmlChar *value; + xmlAttrPtr attr; + + value = xmlGetNoNsProp(ownerElem, name); + if (value == NULL) + return (0); + + attr = xmlSchemaGetPropNode(ownerElem, (const char *) name); + if (attr == NULL) + return (-1); + + ret = xmlValidateNCName(BAD_CAST value, 1); + if (ret == 0) { + /* + * NOTE: the IDness might have already be declared in the DTD + */ + if (attr->atype != XML_ATTRIBUTE_ID) { + xmlIDPtr res; + xmlChar *strip; + + /* + * TODO: Use xmlSchemaStrip here; it's not exported at this + * moment. + */ + strip = xmlSchemaCollapseString(BAD_CAST value); + if (strip != NULL) + value = strip; + res = xmlAddID(NULL, ownerElem->doc, BAD_CAST value, attr); + if (res == NULL) { + ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE; + xmlSchemaPSimpleTypeErr(ctxt, + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, + ownerDes, ownerItem, (xmlNodePtr) attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_ID), + NULL, NULL, "The ID '%s' is already defined", + BAD_CAST value, NULL); + } else + attr->atype = XML_ATTRIBUTE_ID; + if (strip != NULL) + xmlFree(strip); + } + } else if (ret > 0) { + ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE; + xmlSchemaPSimpleTypeErr(ctxt, + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, + ownerDes, ownerItem, (xmlNodePtr) attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_ID), + NULL, BAD_CAST value, NULL, NULL, NULL); + } + xmlFree(value); + + return (ret); +} + +/** * xmlGetMaxOccurs: * @ctxt: a schema validation context * @node: a subtree containing XML Schema informations @@ -3908,10 +4504,11 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt, def = 1; else if (xmlStrEqual(val, BAD_CAST "0")) def = 0; - else { + else { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_INVALID_BOOLEAN, - ownerDes, ownerItem, node, + ownerDes, ownerItem, + (xmlNodePtr) xmlSchemaGetPropNode(node, name), xmlSchemaGetBuiltInType(XML_SCHEMAS_BOOLEAN), "(1 | 0 | true | false)", val, NULL, NULL, NULL); } @@ -4191,6 +4788,35 @@ xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, return (xmlSchemaPValAttrNode(ctxt, ownerDes, ownerItem, attr, type, value)); } + +static int +xmlSchemaCheckReference(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node, + xmlSchemaTypePtr item, + const xmlChar *namespaceName) +{ + if (xmlStrEqual(schema->targetNamespace, namespaceName)) + return (1); + if (pctxt->localImports != NULL) { + int i; + for (i = 0; i < pctxt->nbLocalImports; i++) + if (xmlStrEqual(namespaceName, pctxt->localImports[i])) + return (1); + } + if (namespaceName == NULL) + xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, + NULL, item, node, "References from this schema to components in no " + "namespace are not valid, since not indicated by an import " + "statement", NULL); + else + xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, + NULL, item, node, "References from this schema to components in the " + "namespace '%s' are not valid, since not indicated by an import " + "statement", namespaceName); + return (0); +} + /** * xmlSchemaParseAttrDecls: * @ctxt: a schema validation context @@ -4280,8 +4906,7 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } attr = attr->next; } - /* TODO: Check id. */ - + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); /* * And now for the children... */ @@ -4423,7 +5048,8 @@ xmlSchemaParseFacet(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaFreeFacet(facet); return (NULL); } - facet->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, + (xmlSchemaTypePtr) facet, node, BAD_CAST "id"); facet->value = value; if ((facet->type != XML_SCHEMA_FACET_PATTERN) && (facet->type != XML_SCHEMA_FACET_ENUMERATION)) { @@ -4642,7 +5268,7 @@ xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((minOccurs == 0) && (maxOccurs == 0)) return (NULL); - snprintf((char *) name, 30, "any %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#any%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); @@ -4712,6 +5338,15 @@ xmlSchemaParseNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } ret->targetNamespace = schema->targetNamespace; + + xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, + node, BAD_CAST "id"); + + if (IS_SCHEMA(child, "annotation")) { + ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + child = child->next; + } + child = node->children; if (IS_SCHEMA(child, "annotation")) { ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); @@ -4773,7 +5408,8 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, } attr = attr->next; } - /* ret->id = xmlSchemaGetProp(ctxt, node, "id"); */ + xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, + node, BAD_CAST "id"); /* * Parse the namespace list. */ @@ -4866,9 +5502,9 @@ xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, &refPrefix, &ref) != 0) { return (NULL); } - snprintf(buf, 49, "#aRef %d", ctxt->counter++ + 1); + snprintf(buf, 49, "#aRef%d", ctxt->counter++ + 1); name = (const xmlChar *) buf; - ret = xmlSchemaAddAttribute(ctxt, schema, name, NULL, node); + ret = xmlSchemaAddAttribute(ctxt, schema, name, NULL, node, 0); if (ret == NULL) { if (repName != NULL) xmlFree(repName); @@ -4876,9 +5512,10 @@ xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } ret->type = XML_SCHEMA_TYPE_ATTRIBUTE; ret->node = node; - ret->refNs = refNs; + ret->refNs = refNs; ret->refPrefix = refPrefix; - ret->ref = ref; + ret->ref = ref; + xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaTypePtr) ret, refNs); /* xmlSchemaFormatTypeRep(&repName, (xmlSchemaTypePtr) ret, NULL, NULL); */ @@ -4967,8 +5604,8 @@ xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } } else if (schema->flags & XML_SCHEMAS_QUALIF_ATTR) ns = schema->targetNamespace; - } - ret = xmlSchemaAddAttribute(ctxt, schema, name, ns, node); + } + ret = xmlSchemaAddAttribute(ctxt, schema, name, ns, node, topLevel); if (ret == NULL) { if (repName != NULL) xmlFree(repName); @@ -5015,9 +5652,9 @@ xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } xmlSchemaPValAttrQName(ctxt, schema, &repName, (xmlSchemaTypePtr) ret, node, "type", &ret->typeNs, NULL, &ret->typeName); - } - /* TODO: Check ID. */ - ret->id = xmlSchemaGetProp(ctxt, node, "id"); + } + xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, + node, BAD_CAST "id"); /* * Attribute "fixed". */ @@ -5197,7 +5834,7 @@ xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPValAttrNodeQName(ctxt, schema, NULL, NULL, attr, &refNs, &refPrefix, &ref); - snprintf(buf, 49, "#aGrRef %d", ctxt->counter++ + 1); + snprintf(buf, 49, "#agRef%d", ctxt->counter++ + 1); name = (const xmlChar *) buf; if (name == NULL) { xmlSchemaPErrMemory(ctxt, "creating internal name for an " @@ -5211,8 +5848,9 @@ xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt, ret->ref = ref; ret->refNs = refNs; /* TODO: Is @refPrefix currently used? */ - ret->refPrefix = refPrefix; + ret->refPrefix = refPrefix; ret->node = node; + xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaTypePtr) ret, refNs); } /* * Check for illegal attributes. @@ -5388,6 +6026,416 @@ xmlSchemaPValAttrBlockFinal(const xmlChar *value, return (ret); } +#ifdef IDC_ENABLED +static int +xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaIDCPtr idc, + xmlSchemaIDCSelectPtr selector, + xmlAttrPtr attr, + int isField) +{ + xmlNodePtr node; + + /* + * c-selector-xpath: + * Schema Component Constraint: Selector Value OK + * + * TODO: 1 The {selector} must be a valid XPath expression, as defined + * in [XPath]. + */ + if (selector == NULL) { + xmlSchemaPErr(ctxt, idc->node, + XML_SCHEMAP_INTERNAL, + "Internal error: xmlSchemaCheckCSelectorXPath, " + "the selector is not specified.\n", NULL, NULL); + return (-1); + } + if (attr == NULL) + node = idc->node; + else + node = (xmlNodePtr) attr; + if (selector->xpath == NULL) { + xmlSchemaPCustomErr(ctxt, + /* TODO: Adjust error code. */ + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, + NULL, NULL, node, + "The XPath expression of the selector is not valid", NULL); + return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE); + } else { + const xmlChar **nsArray = NULL; + xmlNsPtr *nsList = NULL; + /* + * Compile the XPath expression. + */ + /* + * TODO: We need the array of in-scope namespaces for compilation. + * TODO: Call xmlPatterncompile with different options for selector/ + * field. + */ + nsList = xmlGetNsList(attr->doc, attr->parent); + /* + * Build an array of prefixes and namespaces. + */ + if (nsList != NULL) { + int i, count = 0; + xmlNsPtr ns; + + for (i = 0; nsList[i] != NULL; i++) + count++; + + nsArray = (const xmlChar **) xmlMalloc( + (count * 2 + 1) * sizeof(const xmlChar *)); + if (nsArray == NULL) { + xmlSchemaPErrMemory(ctxt, "allocating a namespace array", + NULL); + return (-1); + } + for (i = 0; i < count; i++) { + ns = nsList[i]; + nsArray[2 * i] = nsList[i]->href; + nsArray[2 * i + 1] = nsList[i]->prefix; + } + nsArray[count * 2] = NULL; + xmlFree(nsList); + } + if (isField) + selector->xpathComp = (void *) xmlPatterncompile(selector->xpath, + NULL, 1, nsArray); + else + selector->xpathComp = (void *) xmlPatterncompile(selector->xpath, + NULL, 1, nsArray); + if (nsArray != NULL) + xmlFree((xmlChar **) nsArray); + +#ifdef IDC_XPATH_SUPPORT + if (selector->xpathComp == NULL) { + xmlSchemaPCustomErr(ctxt, + /* TODO: Adjust error code? */ + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, + NULL, NULL, node, + "The XPath expression '%s' could not be " + "compiled", selector->xpath); + return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE); + } +#endif + } + return (0); +} + +/** + * xmlSchemaAssignAnnotation: + * @item: the schema component + * @annot: the annotation + * + * Adds the annotation to the given schema component. + * + * Returns the given annotaion. + */ +static xmlSchemaAnnotPtr +xmlSchemaAssignAnnotation(xmlSchemaBasicItemPtr item, + xmlSchemaAnnotPtr annot) +{ + xmlSchemaAnnotPtr cur = item->annot; + + if (item->annot == NULL) { + item->annot = annot; + return (annot); + } + cur = item->annot; + if (cur->next != NULL) { + cur = cur->next; + } + cur->next = annot; + return (annot); +} + +/** + * xmlSchemaParseIDCSelectorAndField: + * @ctxt: a schema validation context + * @schema: the schema being built + * @node: a subtree containing XML Schema informations + * + * Parses a XML Schema identity-contraint definition's + * <selector> and <field> elements. + * + * Returns the parsed identity-constraint definition. + */ +static xmlSchemaIDCSelectPtr +xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaPtr schema, + xmlSchemaIDCPtr idc, + xmlNodePtr node, + int isField) +{ + xmlSchemaIDCSelectPtr item; + xmlNodePtr child = NULL; + xmlAttrPtr attr; + + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && + (!xmlStrEqual(attr->name, BAD_CAST "xpath"))) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, NULL, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, NULL, attr); + } + attr = attr->next; + } + /* + * Create the item. + */ + item = (xmlSchemaIDCSelectPtr) xmlMalloc(sizeof(xmlSchemaIDCSelect)); + if (item == NULL) { + xmlSchemaPErrMemory(ctxt, + "allocating a 'selector' of an identity-constraint definition", + NULL); + return (NULL); + } + memset(item, 0, sizeof(xmlSchemaIDCSelect)); + /* + * Attribute "xpath" (mandatory). + */ + attr = xmlSchemaGetPropNode(node, "xpath"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, NULL, node, + "name", NULL); + } else { + item->xpath = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); + /* + * URGENT TODO: "field"s have an other syntax than "selector"s. + */ + + if (xmlSchemaCheckCSelectorXPath(ctxt, idc, item, attr, + isField) == -1) { + xmlSchemaPErr(ctxt, + (xmlNodePtr) attr, + XML_SCHEMAP_INTERNAL, + "Internal error: xmlSchemaParseIDCSelectorAndField, " + "validating the XPath expression of a IDC selector.\n", + NULL, NULL); + } + + } + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + /* + * And now for the children... + */ + child = node->children; + if (IS_SCHEMA(child, "annotation")) { + /* + * Add the annotation to the parent IDC. + */ + xmlSchemaAssignAnnotation((xmlSchemaBasicItemPtr) idc, + xmlSchemaParseAnnotation(ctxt, schema, child)); + child = child->next; + } + if (child != NULL) { + xmlSchemaPContentErr(ctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, NULL, node, child, + NULL, "(annotation?)"); + } + + return (item); +} + +/** + * xmlSchemaParseIDC: + * @ctxt: a schema validation context + * @schema: the schema being built + * @node: a subtree containing XML Schema informations + * + * Parses a XML Schema identity-contraint definition. + * + * Returns the parsed identity-constraint definition. + */ +static xmlSchemaIDCPtr +xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaPtr schema, + xmlNodePtr node, + xmlSchemaTypeType idcCategory, + const xmlChar *targetNamespace) +{ + xmlSchemaIDCPtr item = NULL; + xmlNodePtr child = NULL; + xmlAttrPtr attr; + const xmlChar *name = NULL; + xmlSchemaIDCSelectPtr field = NULL, lastField = NULL; + int resAdd; + + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && + (!xmlStrEqual(attr->name, BAD_CAST "name")) && + ((idcCategory != XML_SCHEMA_TYPE_IDC_KEYREF) || + (!xmlStrEqual(attr->name, BAD_CAST "refer")))) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, NULL, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, NULL, attr); + } + attr = attr->next; + } + /* + * Attribute "name" (mandatory). + */ + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, NULL, node, + "name", NULL); + return (NULL); + } else if (xmlSchemaPValAttrNode(ctxt, + NULL, NULL, attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { + return (NULL); + } + /* + * Create the component. + */ + if (schema->idcDef == NULL) + schema->idcDef = xmlHashCreateDict(10, ctxt->dict); + if (schema->idcDef == NULL) + return (NULL); + + item = (xmlSchemaIDCPtr) xmlMalloc(sizeof(xmlSchemaIDC)); + if (item == NULL) { + xmlSchemaPErrMemory(ctxt, + "allocating an identity-constraint definition", NULL); + return (NULL); + } + /* + * Add the IDC to the list of IDCs on the schema component. + */ + resAdd = xmlHashAddEntry2(schema->idcDef, name, targetNamespace, item); + if (resAdd != 0) { + xmlSchemaPCustomErrExt(ctxt, + XML_SCHEMAP_REDEFINED_TYPE, + NULL, NULL, node, + "An identity-constraint definition with the name '%s' " + "and targetNamespace '%s' does already exist", + name, targetNamespace, NULL); + xmlFree(item); + return (NULL); + } + memset(item, 0, sizeof(xmlSchemaIDC)); + item->name = name; + item->type = idcCategory; + item->node = node; + /* + * The target namespace of the parent element declaration. + */ + item->targetNamespace = targetNamespace; + xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) item, + node, BAD_CAST "id"); + if (idcCategory == XML_SCHEMA_TYPE_IDC_KEYREF) { + /* + * Attribute "refer" (mandatory). + */ + attr = xmlSchemaGetPropNode(node, "refer"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, NULL, node, + "refer", NULL); + } else { + /* + * Create a reference item. + */ + item->ref = (xmlSchemaItemQNRefPtr) xmlMalloc( + sizeof(xmlSchemaItemQNRef)); + if (item->ref == NULL) { + xmlSchemaPErrMemory(ctxt, + "allocating a QName reference item", NULL); + return (NULL); + } + memset(item->ref, 0, sizeof(xmlSchemaItemQNRef)); + xmlSchemaPValAttrNodeQName(ctxt, schema, + NULL, NULL, attr, + &(item->ref->targetNamespace), 0, + &(item->ref->name)); + xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaTypePtr) item, + item->ref->targetNamespace); + } + } + /* + * And now for the children... + */ + child = node->children; + if (IS_SCHEMA(child, "annotation")) { + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + child = child->next; + } + if (child == NULL) { + xmlSchemaPContentErr(ctxt, + XML_SCHEMAP_S4S_ELEM_MISSING, + NULL, NULL, node, child, + "A child element is missing", + "(annotation?, (selector, field+))"); + } + /* + * Child element <selector>. + */ + if (IS_SCHEMA(child, "selector")) { + item->selector = xmlSchemaParseIDCSelectorAndField(ctxt, schema, + item, child, 0); + child = child->next; + /* + * Child elements <field>. + */ + if (IS_SCHEMA(child, "field")) { + do { + field = xmlSchemaParseIDCSelectorAndField(ctxt, schema, + item, child, 1); + if (field != NULL) { + field->index = item->nbFields; + item->nbFields++; + if (lastField != NULL) + lastField->next = field; + else + item->fields = field; + lastField = field; + } + child = child->next; + } while (IS_SCHEMA(child, "field")); + } else { + xmlSchemaPContentErr(ctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, NULL, node, child, + NULL, "(annotation?, (selector, field+))"); + } + } + if (child != NULL) { + xmlSchemaPContentErr(ctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, NULL, node, child, + NULL, "(annotation?, (selector, field+))"); + } + + return (item); +} +#endif + /** * xmlSchemaParseElement: * @ctxt: a schema validation context @@ -5412,6 +6460,9 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlAttrPtr attr, nameAttr; int minOccurs, maxOccurs; int isRef = 0; +#ifdef IDC_ENABLED + xmlSchemaIDCPtr curIDC = NULL, lastIDC = NULL; +#endif /* 3.3.3 Constraints on XML Representations of Element Declarations */ /* TODO: Complete implementation of 3.3.6 */ @@ -5459,10 +6510,10 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Parse as a particle. */ xmlSchemaPValAttrNodeQName(ctxt, schema, - (xmlChar **) &xmlSchemaElemDesAttrRef, + (xmlChar **) &xmlSchemaElemDesElemRef, NULL, attr, &refNs, &refPrefix, &ref); - snprintf(buf, 49, "#eRef %d", ctxt->counter++ + 1); + snprintf(buf, 49, "#eRef%d", ctxt->counter++ + 1); ret = xmlSchemaAddElement(ctxt, schema, (const xmlChar *) buf, NULL, node, 0); if (ret == NULL) { if (repName != NULL) @@ -5475,6 +6526,7 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, ret->refNs = refNs; ret->refPrefix = refPrefix; ret->flags |= XML_SCHEMAS_ELEM_REF; + xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaTypePtr) ret, refNs); /* * Check for illegal attributes. */ @@ -5695,9 +6747,9 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } /* * Extract/validate common attributes. - */ - /* TODO: Check ID: */ - ret->id = xmlSchemaGetProp(ctxt, node, "id"); + */ + xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, + node, BAD_CAST "id"); ret->minOccurs = minOccurs; ret->maxOccurs = maxOccurs; if (topLevel != 1) @@ -5753,7 +6805,26 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } while ((IS_SCHEMA(child, "unique")) || (IS_SCHEMA(child, "key")) || (IS_SCHEMA(child, "keyref"))) { - TODO child = child->next; +#ifdef IDC_ENABLED + if (IS_SCHEMA(child, "unique")) { + curIDC = xmlSchemaParseIDC(ctxt, schema, child, + XML_SCHEMA_TYPE_IDC_UNIQUE, ret->targetNamespace); + } else if (IS_SCHEMA(child, "key")) { + curIDC = xmlSchemaParseIDC(ctxt, schema, child, + XML_SCHEMA_TYPE_IDC_KEY, ret->targetNamespace); + } else if (IS_SCHEMA(child, "keyref")) { + curIDC = xmlSchemaParseIDC(ctxt, schema, child, + XML_SCHEMA_TYPE_IDC_KEYREF, ret->targetNamespace); + } + if (lastIDC != NULL) + lastIDC->next = curIDC; + else + ret->idcs = (void *) curIDC; + lastIDC = curIDC; +#else + TODO +#endif + child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, @@ -5801,7 +6872,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); - snprintf((char *) name, 30, "#union %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#union%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); @@ -5826,7 +6897,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } attr = attr->next; } - type->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); /* * Attribute "memberTypes". This is a list of QNames. * TODO: Validate the QNames. @@ -5888,13 +6959,13 @@ xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); - snprintf((char *) name, 30, "#list %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#list%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); type->node = node; type->type = XML_SCHEMA_TYPE_LIST; - type->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); /* * Check for illegal attributes. */ @@ -5997,7 +7068,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Parse as local simple type definition. */ - snprintf(buf, 39, "#ST %d", ctxt->counter++ + 1); + snprintf(buf, 39, "#ST%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf, NULL, node); if (type == NULL) return (NULL); @@ -6075,8 +7146,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } } type->targetNamespace = schema->targetNamespace; - /* TODO: Check id. */ - type->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, type, node, BAD_CAST "id"); /* * And now for the children... */ @@ -6133,83 +7203,165 @@ static xmlSchemaTypePtr xmlSchemaParseGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node, int topLevel) { - xmlSchemaTypePtr type, subtype; - xmlNodePtr child = NULL; - const xmlChar *name, *ns = NULL; - const xmlChar *ref = NULL, *refNs = NULL; - char buf[50]; - int minOccurs, maxOccurs; + xmlSchemaTypePtr item; + xmlNodePtr child = NULL; + xmlAttrPtr attr; if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) - return (NULL); - /* - * TODO: Validate the element even if no item is created - * (i.e. min/maxOccurs == 0). - */ - minOccurs = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "nonNegativeInteger"); - maxOccurs = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1, "(nonNegativeInteger | unbounded)"); - if ((minOccurs == 0) && (maxOccurs == 0)) { - return (NULL); - } - if (topLevel) - ns = schema->targetNamespace; - name = xmlSchemaGetProp(ctxt, node, "name"); - if (name == NULL) { - ref = xmlGetQNameProp(ctxt, node, "ref", &refNs); - if (ref == NULL) { - xmlSchemaPErr2(ctxt, node, child, - XML_SCHEMAP_GROUP_NONAME_NOREF, - "Group definition or particle: One of the attributes \"name\" " - "or \"ref\" must be present.\n", NULL, NULL); - return (NULL); - } - if (refNs == NULL) - refNs = schema->targetNamespace; - snprintf(buf, 49, "#GrRef %d", ctxt->counter++ + 1); - name = (const xmlChar *) buf; - } - type = xmlSchemaAddGroup(ctxt, schema, name, ns, node); - if (type == NULL) - return (NULL); - type->node = node; - type->type = XML_SCHEMA_TYPE_GROUP; - if (topLevel) - type->flags |= XML_SCHEMAS_TYPE_GLOBAL; - type->id = xmlSchemaGetProp(ctxt, node, "id"); - type->ref = ref; - type->refNs = refNs; - type->minOccurs = minOccurs; - type->maxOccurs = maxOccurs; - xmlSchemaPCheckParticleCorrect_2(ctxt, type, - node, type->minOccurs, type->maxOccurs); + return (NULL); - child = node->children; - if (IS_SCHEMA(child, "annotation")) { - type->annot = xmlSchemaParseAnnotation(ctxt, schema, child); - child = child->next; - } - subtype = NULL; - if (IS_SCHEMA(child, "all")) { - subtype = (xmlSchemaTypePtr) - xmlSchemaParseAll(ctxt, schema, child); - child = child->next; - } else if (IS_SCHEMA(child, "choice")) { - subtype = xmlSchemaParseChoice(ctxt, schema, child); - child = child->next; - } else if (IS_SCHEMA(child, "sequence")) { - subtype = (xmlSchemaTypePtr) - xmlSchemaParseSequence(ctxt, schema, child); - child = child->next; - } - if (subtype != NULL) - type->subtypes = subtype; - if (child != NULL) { - xmlSchemaPErr2(ctxt, node, child, XML_SCHEMAP_UNKNOWN_GROUP_CHILD, - "Group definition \"%s\" has unexpected content.\n", type->name, - NULL); - } + if (topLevel) { + const xmlChar *name; + /* + * Parse as model group definition. + */ + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, NULL, node, + "name", NULL); + return (NULL); + } else if (xmlSchemaPValAttrNode(ctxt, + NULL, NULL, attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { + return (NULL); + } + item = xmlSchemaAddGroup(ctxt, schema, name, + schema->targetNamespace, node); + if (item == NULL) + return (NULL); + item->node = node; + item->type = XML_SCHEMA_TYPE_GROUP; + item->flags |= XML_SCHEMAS_TYPE_GLOBAL; + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "name")) && + (!xmlStrEqual(attr->name, BAD_CAST "id"))) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, item, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, item, attr); + } + attr = attr->next; + } + xmlSchemaPValAttrID(ctxt, NULL, item, node, BAD_CAST "id"); + /* + * And now for the children... + */ + child = node->children; + if (IS_SCHEMA(child, "annotation")) { + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + child = child->next; + } + if (IS_SCHEMA(child, "all")) { + item->subtypes = (xmlSchemaTypePtr) + xmlSchemaParseAll(ctxt, schema, child); + child = child->next; + } else if (IS_SCHEMA(child, "choice")) { + item->subtypes = xmlSchemaParseChoice(ctxt, schema, child); + child = child->next; + } else if (IS_SCHEMA(child, "sequence")) { + item->subtypes = xmlSchemaParseSequence(ctxt, schema, child); + child = child->next; + } + if (child != NULL) { + xmlSchemaPContentErr(ctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, item, node, child, NULL, + "(annotation?, (all | choice | sequence)?)"); + } + } else { + const xmlChar *ref = NULL, *refNs = NULL, *refPrefix = NULL; + int minOccurs, maxOccurs; + char buf[40]; - return (type); + /* + * Parse as particle. + */ + attr = xmlSchemaGetPropNode(node, "ref"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, NULL, node, + "ref", NULL); + return (NULL); + } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL, NULL, + attr, &refNs, &refPrefix, &ref) != 0) { + return (NULL); + } + + /* + * TODO: Validate the element even if no item is created + * (i.e. min/maxOccurs == 0). + */ + minOccurs = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "nonNegativeInteger"); + maxOccurs = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1, + "(nonNegativeInteger | unbounded)"); + if ((minOccurs == 0) && (maxOccurs == 0)) { + return (NULL); + } + + snprintf(buf, 39, "#grRef%d", ctxt->counter++ + 1); + item = xmlSchemaAddGroup(ctxt, schema, (const xmlChar *)buf, NULL, node); + if (item == NULL) + return (NULL); + item->node = node; + item->type = XML_SCHEMA_TYPE_GROUP; + item->ref = ref; + item->refNs = refNs; + xmlSchemaCheckReference(ctxt, schema, node, item, refNs); + item->minOccurs = minOccurs; + item->maxOccurs = maxOccurs; + xmlSchemaPCheckParticleCorrect_2(ctxt, item, + node, item->minOccurs, item->maxOccurs); + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) && + (!xmlStrEqual(attr->name, BAD_CAST "id")) && + (!xmlStrEqual(attr->name, BAD_CAST "minOccurs")) && + (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs"))) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, item, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + NULL, item, attr); + } + attr = attr->next; + } + xmlSchemaPValAttrID(ctxt, NULL, item, node, BAD_CAST "id"); + /* + * And now for the children... + */ + child = node->children; + if (IS_SCHEMA(child, "annotation")) { + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + child = child->next; + } + if (child != NULL) { + xmlSchemaPContentErr(ctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, item, node, child, NULL, + "(annotation?, (all | choice | sequence)?)"); + } + } + + return (item); } /** @@ -6237,13 +7389,14 @@ xmlSchemaParseAll(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); - snprintf((char *) name, 30, "all%d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#all%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); type->node = node; type->type = XML_SCHEMA_TYPE_ALL; - type->id = xmlSchemaGetProp(ctxt, node, "id"); + + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); type->minOccurs = xmlGetMinOccurs(ctxt, node, 0, 1, 1, "(0 | 1)"); type->maxOccurs = xmlGetMaxOccurs(ctxt, node, 1, 1, 1, "1"); @@ -6464,6 +7617,14 @@ xmlSchemaParseSchemaDefaults(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr; const xmlChar *val; + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + if (schema->version == NULL) + xmlSchemaPValAttr(ctxt, NULL, NULL, node, "version", + xmlSchemaGetBuiltInType(XML_SCHEMAS_TOKEN), &(schema->version)); + else + xmlSchemaPValAttr(ctxt, NULL, NULL, node, "version", + xmlSchemaGetBuiltInType(XML_SCHEMAS_TOKEN), NULL); + attr = xmlSchemaGetPropNode(node, "elementFormDefault"); if (attr != NULL) { val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); @@ -6612,7 +7773,7 @@ xmlSchemaAddImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaImportPtr ret; if (*imports == NULL) { - *imports = xmlHashCreate(10); + *imports = xmlHashCreateDict(10, ctxt->dict); if (*imports == NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_FAILED_BUILD_IMPORT, @@ -6865,6 +8026,49 @@ xmlSchemaAcquireSchemaDoc(xmlSchemaParserCtxtPtr ctxt, return (0); } +static void +xmlSchemaParseForImpInc(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + const xmlChar *targetNamespace, + xmlNodePtr node) +{ + const xmlChar *oldURL, **oldLocImps, *oldTNS; + int oldFlags, oldNumLocImps, oldSizeLocImps; + + /* + * Save and reset the context & schema. + */ + oldURL = pctxt->URL; + /* TODO: Is using the doc->URL here correct? */ + pctxt->URL = node->doc->URL; + oldLocImps = pctxt->localImports; + pctxt->localImports = NULL; + oldNumLocImps = pctxt->nbLocalImports; + pctxt->nbLocalImports = 0; + oldSizeLocImps = pctxt->sizeLocalImports; + pctxt->sizeLocalImports = 0; + oldFlags = schema->flags; + xmlSchemaClearSchemaDefaults(schema); + oldTNS = schema->targetNamespace; + schema->targetNamespace = targetNamespace; + /* + * Parse the schema. + */ + xmlSchemaParseSchemaDefaults(pctxt, schema, node); + xmlSchemaParseSchemaTopLevel(pctxt, schema, node->children); + /* + * Restore the context & schema. + */ + schema->flags = oldFlags; + schema->targetNamespace = oldTNS; + if (pctxt->localImports != NULL) + xmlFree((xmlChar *) pctxt->localImports); + pctxt->localImports = oldLocImps; + pctxt->nbLocalImports = oldNumLocImps; + pctxt->sizeLocalImports = oldSizeLocImps; + pctxt->URL = oldURL; +} + /** * xmlSchemaParseImport: * @ctxt: a schema validation context @@ -6882,14 +8086,12 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node) { xmlNodePtr child; - const xmlChar *namespace = NULL; + const xmlChar *namespaceName = NULL; const xmlChar *schemaLocation = NULL; - const xmlChar *targetNamespace, *oldTNS, *url; + const xmlChar *targetNamespace; xmlAttrPtr attr; xmlDocPtr doc; - xmlNodePtr root; - int flags, ret = 0; - + int ret = 0; if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (-1); @@ -6919,12 +8121,12 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if (xmlSchemaPValAttr(ctxt, NULL, NULL, node, "namespace", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), - &namespace) != 0) { + &namespaceName) != 0) { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, NULL, NULL, node, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), - NULL, namespace, NULL, NULL, NULL); + NULL, namespaceName, NULL, NULL, NULL); return (XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI); } @@ -6935,7 +8137,7 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, NULL, NULL, node, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), - NULL, namespace, NULL, NULL, NULL); + NULL, namespaceName, NULL, NULL, NULL); return (XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI); } /* @@ -6957,13 +8159,13 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Apply additional constraints. */ - if (namespace != NULL) { + if (namespaceName != NULL) { /* * 1.1 If the namespace [attribute] is present, then its ·actual value· * must not match the ·actual value· of the enclosing <schema>'s * targetNamespace [attribute]. */ - if (xmlStrEqual(schema->targetNamespace, namespace)) { + if (xmlStrEqual(schema->targetNamespace, namespaceName)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_IMPORT_1_1, NULL, NULL, node, @@ -6988,37 +8190,32 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } } /* + * Add the namespace to the list of locally imported namespace. + */ + if (ctxt->localImports == NULL) { + ctxt->localImports = (const xmlChar **) xmlMalloc(10 * + sizeof(const xmlChar*)); + ctxt->sizeLocalImports = 10; + ctxt->nbLocalImports = 0; + } else if (ctxt->sizeLocalImports <= ctxt->nbLocalImports) { + ctxt->sizeLocalImports *= 2; + ctxt->localImports = (const xmlChar **) xmlRealloc( + (xmlChar **) ctxt->localImports, + ctxt->sizeLocalImports * sizeof(const xmlChar*)); + } + ctxt->localImports[ctxt->nbLocalImports++] = namespaceName; + /* * Locate and aquire the schema document. */ - ret = xmlSchemaAcquireSchemaDoc(ctxt, schema, node, namespace, + ret = xmlSchemaAcquireSchemaDoc(ctxt, schema, node, namespaceName, schemaLocation, &doc, &targetNamespace, 0); if (ret != 0) { if (doc != NULL) xmlFreeDoc(doc); return (ret); - } else if (doc != NULL) { - /* - * Save and reset the context & schema. - */ - url = ctxt->URL; - /* TODO: Is using the doc->URL here correct? */ - ctxt->URL = doc->URL; - flags = schema->flags; - oldTNS = schema->targetNamespace; - /* - * Parse the schema. - */ - root = xmlDocGetRootElement(doc); - xmlSchemaClearSchemaDefaults(schema); - xmlSchemaParseSchemaDefaults(ctxt, schema, root); - schema->targetNamespace = targetNamespace; - xmlSchemaParseSchemaTopLevel(ctxt, schema, root->children); - /* - * Restore the context & schema. - */ - schema->flags = flags; - schema->targetNamespace = oldTNS; - ctxt->URL = url; + } else if (doc != NULL) { + xmlSchemaParseForImpInc(ctxt, schema, targetNamespace, + xmlDocGetRootElement(doc)); } return (0); @@ -7041,12 +8238,11 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, { xmlNodePtr child = NULL; const xmlChar *schemaLocation, *targetNamespace; - xmlDocPtr doc; - xmlNodePtr root; - xmlSchemaIncludePtr include; + xmlDocPtr doc = NULL; + xmlNodePtr root = NULL; + xmlSchemaIncludePtr include = NULL; int wasConvertingNs = 0; xmlAttrPtr attr; - int saveFlags; xmlParserCtxtPtr parserCtxt; @@ -7075,10 +8271,11 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Extract and validate attributes. */ + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); /* - * Preliminary step, extract the URI-Reference for the include and - * make an URI from the base. - */ + * Preliminary step, extract the URI-Reference for the include and + * make an URI from the base. + */ attr = xmlSchemaGetPropNode(node, "schemaLocation"); if (attr != NULL) { xmlChar *base = NULL; @@ -7086,7 +8283,7 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), &schemaLocation) != 0) - return (-1); + goto exit_invalid; base = xmlNodeGetBase(node->doc, node); if (base == NULL) { uri = xmlBuildURI(schemaLocation, node->doc->URL); @@ -7094,16 +8291,23 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, uri = xmlBuildURI(schemaLocation, base); xmlFree(base); } - if (uri != NULL) { - schemaLocation = xmlDictLookup(ctxt->dict, uri, -1); - xmlFree(uri); + if (uri == NULL) { + xmlSchemaPErr(ctxt, + node, + XML_SCHEMAP_INTERNAL, + "Internal error: xmlSchemaParseInclude, " + "could not build an URI from the schemaLocation.\n", + NULL, NULL); + goto exit_failure; } + schemaLocation = xmlDictLookup(ctxt->dict, uri, -1); + xmlFree(uri); } else { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, NULL, NULL, node, "schemaLocation", NULL); - return (-1); - } + goto exit_invalid; + } /* * And now for the children... */ @@ -7120,18 +8324,55 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, NULL, NULL, node, child, NULL, "(annotation?)"); } - /* - * First step is to parse the input document into an DOM/Infoset - */ - /* - * TODO: Use xmlCtxtReadFile to share the dictionary. + * Report self-inclusion. + */ + if (xmlStrEqual(schemaLocation, ctxt->URL)) { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_SRC_INCLUDE, + NULL, NULL, node, + "The schema document '%s' cannot include itself.", + schemaLocation); + return (XML_SCHEMAP_SRC_INCLUDE); + } + /* + * Check if this one was already processed to avoid incorrect + * duplicate component errors and infinite circular inclusion. + */ + include = schema->includes; + while (include != NULL) { + if (xmlStrEqual(include->schemaLocation, schemaLocation)) { + targetNamespace = include->origTargetNamespace; + if (targetNamespace == NULL) { + /* + * Chameleon include: skip only if it was build for + * the targetNamespace of the including schema. + */ + if (xmlStrEqual(schema->targetNamespace, + include->targetNamespace)) { + fprintf(stderr, "already included chameleon '%s', TNS '%s'\n", + include->schemaLocation, + include->origTargetNamespace); + goto check_targetNamespace; + } + } else { + fprintf(stderr, "already included '%s', TNS '%s'\n", + include->schemaLocation, + include->origTargetNamespace); + goto check_targetNamespace; + } + } + include = include->next; + } + /* + * First step is to parse the input document into an DOM/Infoset + * TODO: Use xmlCtxtReadFile to share the dictionary? */ parserCtxt = xmlNewParserCtxt(); if (parserCtxt == NULL) { xmlSchemaPErrMemory(NULL, "xmlSchemaParseInclude: " "allocating a parser context", NULL); - return(-1); + goto exit_failure; } if ((ctxt->dict != NULL) && (parserCtxt->dict != NULL)) { @@ -7154,7 +8395,7 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, XML_SCHEMAP_FAILED_LOAD, NULL, NULL, node, "Failed to load the document '%s' for inclusion", schemaLocation); - return(-1); + goto exit_invalid; } /* @@ -7167,8 +8408,7 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, NULL, NULL, node, "The included document '%s' has no document " "element", schemaLocation); - xmlFreeDoc(doc); - return (-1); + goto exit_invalid; } /* @@ -7185,8 +8425,7 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, NULL, NULL, node, "The document '%s' to be included is not a schema document", schemaLocation); - xmlFreeDoc(doc); - return (-1); + goto exit_invalid; } targetNamespace = xmlSchemaGetProp(ctxt, root, "targetNamespace"); @@ -7195,6 +8434,7 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * value· is identical to the ·actual value· of the targetNamespace * [attribute] of SII’ (which must have such an [attribute]). */ +check_targetNamespace: if (targetNamespace != NULL) { if (schema->targetNamespace == NULL) { xmlSchemaPCustomErr(ctxt, @@ -7203,9 +8443,8 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, "The target namespace of the included schema " "'%s' has to be absent, since the including schema " "has no target namespace", - schemaLocation); - xmlFreeDoc(doc); - return (-1); + schemaLocation); + goto exit_invalid; } else if (!xmlStrEqual(targetNamespace, schema->targetNamespace)) { xmlSchemaPCustomErrExt(ctxt, XML_SCHEMAP_SRC_INCLUDE, @@ -7213,8 +8452,7 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, "The target namespace '%s' of the included schema '%s' " "differs from '%s' of the including schema", targetNamespace, schemaLocation, schema->targetNamespace); - xmlFreeDoc(doc); - return (-1); + goto exit_invalid; } } else if (schema->targetNamespace != NULL) { if ((schema->flags & XML_SCHEMAS_INCLUDING_CONVERT_NS) == 0) { @@ -7222,38 +8460,49 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else wasConvertingNs = 1; } + + if (include != NULL) + goto exit; + /* - * register the include - */ + * URGENT TODO: If the schema is a chameleon-include then copy the + * components into the including schema and modify the targetNamespace + * of those components, do nothing otherwise. + * NOTE: This is currently worked-around by compiling the chameleon + * for every destinct including targetNamespace; thus not performant at + * the moment. + * TODO: Check when the namespace in wildcards for chameleons needs + * to be converted: before we built wildcard intersections or after. + */ + /* + * Register the include. + */ include = (xmlSchemaIncludePtr) xmlMalloc(sizeof(xmlSchemaInclude)); if (include == NULL) { - xmlSchemaPErrMemory(ctxt, "allocating included schema", NULL); - xmlFreeDoc(doc); - return (-1); + xmlSchemaPErrMemory(ctxt, "allocating include entry", NULL); + goto exit_failure; } - memset(include, 0, sizeof(xmlSchemaInclude)); - include->schemaLocation = xmlDictLookup(ctxt->dict, schemaLocation, -1); - include->doc = doc; include->next = schema->includes; schema->includes = include; - /* - * parse the declarations in the included file like if they - * were in the original file. - */ + * TODO: Use the resolved URI for the this location, since it might + * differ if using filenames/URIs simultaneosly. + */ + include->schemaLocation = schemaLocation; + include->doc = doc; /* - * TODO: The complete validation of the <schema> element is not done. + * In case of chameleons, the original target namespace will differ + * from the resulting namespace. */ - /* - * The default values ("blockDefault", "elementFormDefault", etc.) - * are set to the values of the included schema and restored afterwards. - */ - saveFlags = schema->flags; - xmlSchemaClearSchemaDefaults(schema); - xmlSchemaParseSchemaDefaults(ctxt, schema, root); - xmlSchemaParseSchemaTopLevel(ctxt, schema, root->children); - schema->flags = saveFlags; + include->origTargetNamespace = targetNamespace; + include->targetNamespace = schema->targetNamespace; + /* + * Compile the included schema. + */ + xmlSchemaParseForImpInc(ctxt, schema, schema->targetNamespace, root); + +exit: /* * Remove the converting flag. */ @@ -7261,6 +8510,23 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (schema->flags & XML_SCHEMAS_INCLUDING_CONVERT_NS)) schema->flags ^= XML_SCHEMAS_INCLUDING_CONVERT_NS; return (1); + +exit_invalid: + if (doc != NULL) { + if (include != NULL) + include->doc = NULL; + xmlFreeDoc(doc); + } + return (ctxt->err); + +exit_failure: + if (doc != NULL) { + if (include != NULL) + include->doc = NULL; + xmlFreeDoc(doc); + } + return (-1); + } /** @@ -7289,7 +8555,7 @@ xmlSchemaParseChoice(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); - snprintf((char *) name, 30, "choice %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#ch%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); @@ -7318,7 +8584,7 @@ xmlSchemaParseChoice(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Extract and validate attributes. */ - type->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); type->minOccurs = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "nonNegativeInteger"); type->maxOccurs = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1, "(nonNegativeInteger | unbounded)"); @@ -7399,7 +8665,7 @@ xmlSchemaParseSequence(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); oldcontainer = ctxt->container; - snprintf((char *) name, 30, "#seq %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#seq%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); @@ -7428,7 +8694,7 @@ xmlSchemaParseSequence(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Extract and validate attributes. */ - type->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); type->minOccurs = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "nonNegativeInteger"); type->maxOccurs = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1, "(nonNegativeInteger | unbounded)"); @@ -7508,7 +8774,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, oldcontainer = ctxt->container; - snprintf((char *) name, 30, "#restr %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#restr%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); @@ -7536,7 +8802,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Extract and validate attributes. */ - type->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); /* * Attribute "base". */ @@ -7730,13 +8996,15 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, oldcontainer = ctxt->container; - snprintf((char *) name, 30, "extension %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#ext%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); type->type = XML_SCHEMA_TYPE_EXTENSION; type->node = node; - type->id = xmlSchemaGetProp(ctxt, node, "id"); + + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + ctxt->container = name; type->base = xmlGetQNameProp(ctxt, node, "base", &(type->baseNs)); @@ -7808,13 +9076,14 @@ xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt, if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); - snprintf((char *) name, 30, "simpleContent %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#SC%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); type->type = XML_SCHEMA_TYPE_SIMPLE_CONTENT; type->node = node; - type->id = xmlSchemaGetProp(ctxt, node, "id"); + + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); child = node->children; if (IS_SCHEMA(child, "annotation")) { @@ -7867,7 +9136,7 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); - snprintf((char *) name, 30, "#CC %d", ctxt->counter++ + 1); + snprintf((char *) name, 30, "#CC%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, name, NULL, node); if (type == NULL) return (NULL); @@ -7893,7 +9162,9 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, } attr = attr->next; } - type->id = xmlSchemaGetProp(ctxt, node, "id"); + + xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + /* * Handle attribute 'mixed'. */ @@ -7978,7 +9249,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Parse as local complex type definition. */ - snprintf(buf, 39, "#CT %d", ctxt->counter++ + 1); + snprintf(buf, 39, "#CT%d", ctxt->counter++ + 1); type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf, NULL, node); if (type == NULL) return (NULL); @@ -8015,7 +9286,8 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute "id". */ - type->id = xmlSchemaGetProp(ctxt, node, "id"); + xmlSchemaPValAttrID(ctxt, NULL, type, node, + BAD_CAST "id"); } else if (xmlStrEqual(attr->name, BAD_CAST "mixed")) { /* * Attribute "mixed". @@ -8239,12 +9511,6 @@ xmlSchemaParseSchema(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node) * if the import struct is freed. * import->doc = ctxt->doc; */ - - /* TODO: Check id. */ - schema->id = xmlSchemaGetProp(ctxt, node, "id"); - xmlSchemaPValAttr(ctxt, NULL, NULL, node, "version", - xmlSchemaGetBuiltInType(XML_SCHEMAS_TOKEN), &(schema->version)); - xmlSchemaParseSchemaDefaults(ctxt, schema, node); xmlSchemaParseSchemaTopLevel(ctxt, schema, node->children); } else { @@ -8495,6 +9761,8 @@ xmlSchemaFreeParserCtxt(xmlSchemaParserCtxtPtr ctxt) if (ctxt->vctxt != NULL) { xmlSchemaFreeValidCtxt(ctxt->vctxt); } + if (ctxt->localImports != NULL) + xmlFree((xmlChar *) ctxt->localImports); xmlDictFree(ctxt->dict); xmlFree(ctxt); } @@ -8904,51 +10172,56 @@ xmlSchemaBuildAContentModel(xmlSchemaTypePtr type, } case XML_SCHEMA_TYPE_ALL:{ xmlAutomataStatePtr start; - xmlSchemaTypePtr subtypes; - - xmlSchemaElementPtr elem; + xmlSchemaElementPtr elemDecl, particle; int lax; - subtypes = type->subtypes; - if (subtypes == NULL) + particle = (xmlSchemaElementPtr) type->subtypes; + if (particle == NULL) break; start = ctxt->state; - while (subtypes != NULL) { + while (particle != NULL) { ctxt->state = start; /* - * the following 'if' was needed to fix bug 139897 - * not quite sure why it only needs to be done for - * elements with a 'ref', but it seems to work ok. + * Changed to put the element declaration and + * never the element decl. reference into the + * automaton. This fixes bug 139897 and bug 167754. */ - if (subtypes->ref != NULL) - xmlSchemaBuildAContentModel(subtypes, ctxt, name); - elem = (xmlSchemaElementPtr) subtypes; + if (particle->ref != NULL) { + if (particle->refDecl == NULL) { + /* + * TODO: Note that we break on missing + * sub-components. + */ + break; + } else + elemDecl = particle->refDecl; + } else + elemDecl = particle; /* * NOTE: The {max occurs} of all the particles in the - * {particles} of the group must be 0 or 1. + * {particles} of the group must be 0 or 1; this is + * already ensured during the parse of the content of + * <all>. */ - if ((elem->minOccurs == 1) && (elem->maxOccurs == 1)) { + if ((particle->minOccurs == 1) && + (particle->maxOccurs == 1)) { xmlAutomataNewOnceTrans2(ctxt->am, ctxt->state, ctxt->state, - elem->name, - elem->targetNamespace, - 1, 1, subtypes); - } else if ((elem->minOccurs == 0) && - (elem->maxOccurs == 1)) { + elemDecl->name, + elemDecl->targetNamespace, + 1, 1, elemDecl); + } else if ((particle->minOccurs == 0) && + (particle->maxOccurs == 1)) { xmlAutomataNewCountTrans2(ctxt->am, ctxt->state, ctxt->state, - elem->name, - elem->targetNamespace, + elemDecl->name, + elemDecl->targetNamespace, 0, 1, - subtypes); + elemDecl); } - /* - * NOTE: if maxOccurs == 0 then no transition will be - * created. - */ - subtypes = subtypes->next; + particle = (xmlSchemaElementPtr) particle->next; } lax = type->minOccurs == 0; ctxt->state = @@ -9430,7 +10703,7 @@ xmlSchemaIsDerivedFromBuiltInType(xmlSchemaParserCtxtPtr ctxt, } /** - * xmlSchemaIsDerivedFromBuiltInType: + * xmlSchemaGetPrimitiveType: * @type: the simpleType definition * * Returns the primitive type of the given type or @@ -9439,8 +10712,14 @@ xmlSchemaIsDerivedFromBuiltInType(xmlSchemaParserCtxtPtr ctxt, static xmlSchemaTypePtr xmlSchemaGetPrimitiveType(xmlSchemaTypePtr type) { + while (type != NULL) { - if (type->flags & XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE) + /* + * Note that anySimpleType is actually not a primitive type + * but we need that here. + */ + if ((type->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) || + (type->flags & XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE)) return (type); type = type->baseType; } @@ -9448,6 +10727,27 @@ xmlSchemaGetPrimitiveType(xmlSchemaTypePtr type) return (NULL); } +#if 0 +/** + * xmlSchemaGetBuiltInTypeAncestor: + * @type: the simpleType definition + * + * Returns the primitive type of the given type or + * NULL in case of error. + */ +static xmlSchemaTypePtr +xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type) +{ + while (type != NULL) { + if (type->type == XML_SCHEMA_TYPE_BASIC) + return (type); + type = type->baseType; + } + + return (NULL); +} +#endif + /** * xmlSchemaBuildAttributeUsesOwned: @@ -11375,10 +12675,11 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr ctxt, * thus a check for equality can be skipped. */ /* - * TODO: Even worse: I cannot see a scenario where a restricting + * Even worse: I cannot see a scenario where a restricting * union simple type can have other member types as the member * types of it's base type. This check seems not necessary with * respect to the derivation process in libxml2. + * But necessary if constructing types with an API. */ if (type->memberTypes != NULL) { member = type->memberTypes; @@ -11627,9 +12928,11 @@ xmlSchemaCheckCVCSimpleType(xmlSchemaValidCtxtPtr ctxt, static int xmlSchemaCreatePCtxtOnVCtxt(xmlSchemaValidCtxtPtr vctxt) { - if (vctxt->pctxt == NULL) { - vctxt->pctxt =xmlSchemaNewParserCtxtUseDict("*", vctxt->schema->dict); - /* vctxt->pctxt = xmlSchemaNewParserCtxt("*"); */ + if (vctxt->pctxt == NULL) { + if (vctxt->schema != NULL) + vctxt->pctxt = xmlSchemaNewParserCtxtUseDict("*", vctxt->schema->dict); + else + vctxt->pctxt = xmlSchemaNewParserCtxt("*"); if (vctxt->pctxt == NULL) { xmlSchemaVErr(vctxt, NULL, XML_SCHEMAV_INTERNAL, @@ -11668,6 +12971,7 @@ xmlSchemaCreateVCtxtOnPCtxt(xmlSchemaParserCtxtPtr ctxt) * @ctxt: the schema parser context * @type: the simple type definition * @value: the default value + * @val: the precomputed value to be returned * @node: an optional node (the holder of the value) * * Checks the "cos-valid-default" constraints. @@ -12291,6 +13595,11 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr item, if (item == NULL) return; /* + * Do not fixup built-in types. + */ + if (item->type == XML_SCHEMA_TYPE_BASIC) + return; + /* * Do not allow the following types to be typefixed, prior to * the corresponding simple/complex types. */ @@ -12515,6 +13824,32 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr item, item->contentType = item->subtypes->contentType; } + + /* + * Some optimization for validation: + * If there are no facets beside the "whitespace" facet, + * then a value needs not to checked against against a + * facet, thus no computed value is needed. + * TODO URGENT: This is just a workaround, we need to + * introduce the correct usage of contentType to store the + * facets in! + */ + if ((item->baseType != NULL) && + (item->baseType->flags & + XML_SCHEMAS_TYPE_FACETSNEEDVALUE)) + item->flags |= XML_SCHEMAS_TYPE_FACETSNEEDVALUE; + else { + xmlSchemaFacetLinkPtr cur; + + for (cur = item->facetSet; cur != NULL; + cur = cur->next) { + if (cur->facet->type != XML_SCHEMA_FACET_WHITESPACE) { + item->flags |= XML_SCHEMAS_TYPE_FACETSNEEDVALUE; + break; + } + } + } + xmlSchemaBuildAttributeValidation(ctxt, item); xmlSchemaCheckDefaults(item, ctxt, item->name); ctxt->ctxtType = ctxtType; @@ -12620,49 +13955,75 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr item, if (last != NULL) while (last->next != NULL) last = last->next; - cur = item->baseType->facetSet; - for (; cur != NULL; cur = cur->next) { - /* - * Base patterns won't be add here: - * they are ORed in a type and - * ANDed in derived types. This will - * happed at validation level by - * walking the base axis of the type. + cur = item->baseType->facetSet; + for (; cur != NULL; cur = cur->next) { + /* + * Base patterns won't be add here: + * they are ORed in a type and + * ANDed in derived types. This will + * happed at validation level by + * walking the base axis of the type. + */ + if (cur->facet->type == + XML_SCHEMA_FACET_PATTERN) + continue; + facet = NULL; + if ((item->facetSet != NULL) && + /* REMOVED: a check for + * XML_SCHEMA_FACET_PATTERN was already + * performed above. + + * (cur->facet->type != + * XML_SCHEMA_FACET_PATTERN) && */ - if (cur->facet->type == - XML_SCHEMA_FACET_PATTERN) - continue; - facet = NULL; - if ((item->facetSet != NULL) && - (cur->facet->type != - XML_SCHEMA_FACET_PATTERN) && - (cur->facet->type != - XML_SCHEMA_FACET_ENUMERATION)) { - facet = item->facetSet; - do { - if (cur->facet->type == - facet->facet->type) - break; - facet = facet->next; - } while (facet != NULL); - } + (cur->facet->type != + XML_SCHEMA_FACET_ENUMERATION)) { + facet = item->facetSet; + do { + if (cur->facet->type == + facet->facet->type) + break; + facet = facet->next; + } while (facet != NULL); + } + if (facet == NULL) { + facet = (xmlSchemaFacetLinkPtr) + xmlMalloc(sizeof(xmlSchemaFacetLink)); if (facet == NULL) { - facet = (xmlSchemaFacetLinkPtr) - xmlMalloc(sizeof(xmlSchemaFacetLink)); - if (facet == NULL) { - xmlSchemaPErrMemory(ctxt, - "fixing simpleType", NULL); - return; - } - facet->facet = cur->facet; - facet->next = NULL; - if (last == NULL) - item->facetSet = facet; - else - last->next = facet; - last = facet; - } + xmlSchemaPErrMemory(ctxt, + "fixing simpleType", NULL); + return; + } + /* + * The facets are not copied but referenced + * via the facet link. + */ + facet->facet = cur->facet; + facet->next = NULL; + if (last == NULL) + item->facetSet = facet; + else + last->next = facet; + last = facet; + } + } + } + /* + * Some optimization for validation: + * If there are no facets beside the "whitespace" facet, + * then a value needs not to checked against against a + * facet, thus no computed value is needed. + */ + if (item->baseType->flags & XML_SCHEMAS_TYPE_FACETSNEEDVALUE) + item->flags |= XML_SCHEMAS_TYPE_FACETSNEEDVALUE; + else { + for (cur = item->facetSet; cur != NULL; + cur = cur->next) { + if (cur->facet->type != XML_SCHEMA_FACET_WHITESPACE) { + item->flags |= XML_SCHEMAS_TYPE_FACETSNEEDVALUE; + break; } + } } } } @@ -12716,6 +14077,10 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr item, if (item->subtypes != NULL) xmlSchemaTypeFixup(item->subtypes, ctxt, NULL); break; + case XML_SCHEMA_TYPE_IDC_UNIQUE: + case XML_SCHEMA_TYPE_IDC_KEY: + case XML_SCHEMA_TYPE_IDC_KEYREF: + break; } } #ifdef DEBUG_TYPE @@ -12878,7 +14243,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, "Type definition '%s': The value '%s' of the " "facet '%s' is not valid.\n", name, facet->value, - BAD_CAST xmlSchemaFacetTypeToString(facet->type), + xmlSchemaFacetTypeToString(facet->type), NULL, NULL); } ret = -1; @@ -12890,7 +14255,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, "failed to validate the value '%s' name of the " "facet '%s' against the base type '%s'.\n", facet->value, - BAD_CAST xmlSchemaFacetTypeToString(facet->type), + xmlSchemaFacetTypeToString(facet->type), base->name, NULL, NULL); ret = -1; } @@ -12929,7 +14294,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, "Type definition '%s': The value '%s' of the " "facet '%s' is not valid.\n", name, facet->value, - BAD_CAST xmlSchemaFacetTypeToString(facet->type), + xmlSchemaFacetTypeToString(facet->type), NULL, NULL); } ret = -1; @@ -12980,10 +14345,22 @@ xmlSchemaCheckDefaults(xmlSchemaTypePtr typeDecl, if (typeDecl->facets != NULL) { xmlSchemaFacetPtr facet = typeDecl->facets; + /* + * Temporarily assign the "schema" to the validation context + * of the parser context. This is needed for NOTATION validation. + */ + if (ctxt->vctxt == NULL) { + if (xmlSchemaCreateVCtxtOnPCtxt(ctxt) == -1) + return; + } + ctxt->vctxt->schema = ctxt->schema; + while (facet != NULL) { xmlSchemaCheckFacet(facet, typeDecl, ctxt, name); facet = facet->next; } + + ctxt->vctxt->schema = NULL; } } @@ -13456,7 +14833,7 @@ xmlSchemaCheckElemValConstr(xmlSchemaElementPtr decl, * Consume the computed value. */ decl->defVal = ctxt->vctxt->value; - ctxt->vctxt->value = NULL; + ctxt->vctxt->value = NULL; } else if (ret < 0) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL, NULL, NULL, node, @@ -13464,7 +14841,7 @@ xmlSchemaCheckElemValConstr(xmlSchemaElementPtr decl, "failed to validate the value constraint of the " "element declaration '%s'", decl->name); - } + } } } @@ -13566,6 +14943,41 @@ xmlSchemaAttrFixup(xmlSchemaAttributePtr item, } /** + * xmlSchemaResolveIDCKeyRef: + * @idc: the identity-constraint definition + * @ctxt: the schema parser context + * @name: the attribute name + * + * Resolve keyRef references to key/unique IDCs. + */ +static void +xmlSchemaResolveIDCKeyRef(xmlSchemaIDCPtr idc, + xmlSchemaParserCtxtPtr ctxt, + const xmlChar * name ATTRIBUTE_UNUSED) +{ + if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) + return; + if (idc->ref->name != NULL) { + idc->ref->item = (xmlSchemaBasicItemPtr) xmlHashLookup2( + ctxt->schema->idcDef, + idc->ref->name, + idc->ref->targetNamespace); + if (idc->ref->item == NULL) { + /* + * TODO: It is actually not an error to fail to resolve. + */ + xmlSchemaPResCompAttrErr(ctxt, + XML_SCHEMAP_SRC_RESOLVE, + NULL, (xmlSchemaTypePtr) idc, idc->node, + "refer", idc->ref->name, + idc->ref->targetNamespace, + XML_SCHEMA_TYPE_IDC_KEYREF, NULL); + return; + } + } +} + +/** * xmlSchemaParse: * @ctxt: a schema validation context * @@ -13680,6 +15092,11 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt) ctxt); /* + * Resolve identity-constraint keyRefs. + */ + xmlHashScan(ret->idcDef, (xmlHashScanner) xmlSchemaResolveIDCKeyRef, ctxt); + + /* * Check attribute groups for circular references. */ xmlHashScan(ret->attrgrpDecl, (xmlHashScanner) @@ -13691,16 +15108,24 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt) xmlHashScan(ret->groupDecl, (xmlHashScanner) xmlSchemaGroupDefFixup, ctxt); /* - * Then fixup all types properties - */ - xmlHashScan(ret->typeDecl, (xmlHashScanner) xmlSchemaTypeFixup, ctxt); - - /* * Then fix references of element declaration; apply constraints. */ xmlHashScanFull(ret->elemDecl, (xmlHashScannerFull) xmlSchemaRefFixupCallback, ctxt); + /* + * We will stop here if the schema was not valid to avoid internal errors + * on missing sub-components. This is not conforming to the spec, since it + * allows missing components, but it might make further processing crash. + * So see it as a very strict handling, which might be made more lax in the + * future. + */ + if (ctxt->nberrors != 0) + goto exit; + /* + * Then fixup all types properties + */ + xmlHashScan(ret->typeDecl, (xmlHashScanner) xmlSchemaTypeFixup, ctxt); /* * Check model groups defnitions for circular references. */ @@ -13728,7 +15153,7 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt) */ xmlHashScan(ret->elemDecl, (xmlHashScanner) xmlSchemaCheckElemValConstr, ctxt); - +exit: if (ctxt->nberrors != 0) { xmlSchemaFree(ret); ret = NULL; @@ -13793,42 +15218,40 @@ xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, * Returns the char string representation of the facet type if the * type is a facet and an "Internal Error" string otherwise. */ -static const char * +static const xmlChar * xmlSchemaFacetTypeToString(xmlSchemaTypeType type) { switch (type) { case XML_SCHEMA_FACET_PATTERN: - return ("pattern"); + return (BAD_CAST "pattern"); case XML_SCHEMA_FACET_MAXEXCLUSIVE: - return ("maxExclusive"); + return (BAD_CAST "maxExclusive"); case XML_SCHEMA_FACET_MAXINCLUSIVE: - return ("maxInclusive"); + return (BAD_CAST "maxInclusive"); case XML_SCHEMA_FACET_MINEXCLUSIVE: - return ("minExclusive"); + return (BAD_CAST "minExclusive"); case XML_SCHEMA_FACET_MININCLUSIVE: - return ("minInclusive"); + return (BAD_CAST "minInclusive"); case XML_SCHEMA_FACET_WHITESPACE: - return ("whiteSpace"); + return (BAD_CAST "whiteSpace"); case XML_SCHEMA_FACET_ENUMERATION: - return ("enumeration"); + return (BAD_CAST "enumeration"); case XML_SCHEMA_FACET_LENGTH: - return ("length"); + return (BAD_CAST "length"); case XML_SCHEMA_FACET_MAXLENGTH: - return ("maxLength"); + return (BAD_CAST "maxLength"); case XML_SCHEMA_FACET_MINLENGTH: - return ("minLength"); + return (BAD_CAST "minLength"); case XML_SCHEMA_FACET_TOTALDIGITS: - return ("totalDigits"); + return (BAD_CAST "totalDigits"); case XML_SCHEMA_FACET_FRACTIONDIGITS: - return ("fractionDigits"); + return (BAD_CAST "fractionDigits"); default: break; } - return ("Internal Error"); + return (BAD_CAST "Internal Error"); } - - static int xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type) { @@ -13840,24 +15263,29 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type) */ if (type->type == XML_SCHEMA_TYPE_BASIC) { if (type->builtInType == XML_SCHEMAS_STRING) - return(XML_SCHEMAS_VAL_WTSP_PRESERVE); + return(XML_SCHEMAS_FACET_PRESERVE); else if (type->builtInType == XML_SCHEMAS_NORMSTRING) - return(XML_SCHEMAS_VAL_WTSP_REPLACE); + return(XML_SCHEMAS_FACET_REPLACE); + else if (type->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) + /* + * Note that we assume a whitespace of preserve for anySimpleType. + */ + return(XML_SCHEMAS_FACET_PRESERVE); else { /* * For all ·atomic· datatypes other than string (and types ·derived· * by ·restriction· from it) the value of whiteSpace is fixed to * collapse */ - return(XML_SCHEMAS_VAL_WTSP_COLLAPSE); + return(XML_SCHEMAS_FACET_COLLAPSE); } } else if (type->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) { /* * For list types the facet "whiteSpace" is fixed to "collapse". */ - return (XML_SCHEMAS_VAL_WTSP_COLLAPSE); + return (XML_SCHEMAS_FACET_COLLAPSE); } else if (type->flags & XML_SCHEMAS_TYPE_VARIETY_UNION) { - return (-1); + return (XML_SCHEMAS_FACET_UNKNOWN); } else if (type->facetSet != NULL) { xmlSchemaTypePtr anyST; xmlSchemaFacetLinkPtr lin; @@ -13879,14 +15307,7 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type) lin = type->facetSet; do { if (lin->facet->type == XML_SCHEMA_FACET_WHITESPACE) { - if (lin->facet->whitespace == - XML_SCHEMAS_FACET_COLLAPSE) { - return(XML_SCHEMAS_VAL_WTSP_COLLAPSE); - } else if (lin->facet->whitespace == - XML_SCHEMAS_FACET_REPLACE) { - return(XML_SCHEMAS_VAL_WTSP_REPLACE); - } else - return(XML_SCHEMAS_VAL_WTSP_PRESERVE); + return(lin->facet->whitespace); break; } lin = lin->next; @@ -13895,7 +15316,7 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type) } anc = anc->baseType; } while (anc != anyST); - return (XML_SCHEMAS_VAL_WTSP_COLLAPSE); + return (XML_SCHEMAS_FACET_COLLAPSE); } return (-1); } @@ -14086,8 +15507,83 @@ static int xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlSchemaTypePtr type); static int xmlSchemaValidateElementByType(xmlSchemaValidCtxtPtr ctxt, xmlSchemaTypePtr type, + int isNil, int valSimpleContent); +static void xmlSchemaBeginElement(xmlSchemaValidCtxtPtr vctxt); +static int xmlSchemaEndElement(xmlSchemaValidCtxtPtr vctxt); + +#ifdef ELEM_INFO_ENABLED +/** + * xmlSchemaGetFreshElemInfo: + * @vctxt: the schema validation context + * + * Creates/reuses and initializes the element info item for + * the currect tree depth. + * + * Returns the element info item or NULL on API or internal errors. + */ +static xmlSchemaNodeInfoPtr +xmlSchemaGetFreshElemInfo(xmlSchemaValidCtxtPtr vctxt, + int depth) +{ + xmlSchemaNodeInfoPtr info = NULL; + + if (depth > vctxt->sizeElemInfos) { + xmlSchemaVErr(vctxt, NULL, XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaGetFreshElemInfo, " + "an inconsistent depth encountered.\n", + NULL, NULL); + return (NULL); + } + if (vctxt->elemInfos == NULL) { + vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) + xmlMalloc(10 * sizeof(xmlSchemaNodeInfoPtr)); + if (vctxt->elemInfos == NULL) { + xmlSchemaVErrMemory(vctxt, + "allocating the element info array", NULL); + return (NULL); + } + memset(vctxt->elemInfos, 0, 10 * sizeof(xmlSchemaNodeInfoPtr)); + vctxt->sizeElemInfos = 10; + } else if (vctxt->sizeElemInfos == vctxt->depth) { + int i = vctxt->sizeElemInfos; + + vctxt->sizeElemInfos *= 2; + vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) + xmlRealloc(vctxt->elemInfos, vctxt->sizeElemInfos * + sizeof(xmlSchemaNodeInfoPtr)); + if (vctxt->elemInfos == NULL) { + xmlSchemaVErrMemory(vctxt, + "re-allocating the element info array", NULL); + return (NULL); + } + /* + * We need the new memory to be NULLed. + * TODO: Use memset instead? + */ + for (; i < vctxt->sizeElemInfos; i++) + vctxt->elemInfos[i] = NULL; + } else + info = vctxt->elemInfos[depth]; + + if (info == NULL) { + info = (xmlSchemaNodeInfoPtr) + xmlMalloc(sizeof(xmlSchemaNodeInfo)); + if (info == NULL) { + xmlSchemaVErrMemory(vctxt, + "allocating an element info", NULL); + return (NULL); + } + vctxt->elemInfos[depth] = info; + } + memset(info, 0, sizeof(xmlSchemaNodeInfo)); + info->depth = depth; + + return (info); +} +#endif /* ELEM_INFO_ENABLED */ + /** * xmlSchemaFreeAttrStates: @@ -14556,6 +16052,11 @@ xmlSchemaValidateCallback(xmlSchemaValidCtxtPtr ctxt, ctxt->type = type; ctxt->node = node; ctxt->cur = node->children; + +#ifdef ELEM_INFO_ENABLED + xmlSchemaBeginElement(ctxt); +#endif + /* * Assemble new schemata using xsi. */ @@ -14569,7 +16070,7 @@ xmlSchemaValidateCallback(xmlSchemaValidCtxtPtr ctxt, ctxt->node, NULL, "Internal error: xmlSchemaValidateElement, " "assembling schema by xsi", NULL); - return; + goto leave; } /* * NOTE: We won't react on schema parser errors here. @@ -14595,7 +16096,7 @@ xmlSchemaValidateCallback(xmlSchemaValidCtxtPtr ctxt, "element declaration 'reference' encountered, " "but an element declaration was expected", NULL); - return; + goto leave; } xmlSchemaValidateElementByDeclaration(ctxt, (xmlSchemaElementPtr) type); @@ -14607,10 +16108,77 @@ xmlSchemaValidateCallback(xmlSchemaValidCtxtPtr ctxt, default: break; } +leave: + +#ifdef ELEM_INFO_ENABLED + xmlSchemaEndElement(ctxt); +#endif ctxt->type = oldtype; ctxt->node = oldnode; } +static int +xmlSchemaValidateNotation(xmlSchemaValidCtxtPtr vctxt, + const xmlChar *value, + xmlSchemaValPtr *val, + xmlNodePtr node) +{ + int ret; + + ret = xmlValidateQName(value, 1); + if (ret != 0) + return (ret); + + { + xmlChar *uri = NULL; + xmlChar *local = NULL; + xmlChar *prefix; + + local = xmlSplitQName2(value, &prefix); + if (prefix != NULL) { + xmlNsPtr ns; + + /* + * TODO: Make this streamable. + */ + if ((node == NULL) || (node->doc == NULL)) { + xmlFree(prefix); + xmlFree(local); + return (3); + } + + ns = xmlSearchNs(node->doc, node, prefix); + if (ns == NULL) { + xmlFree(prefix); + xmlFree(local); + return (1); + } + } + if (prefix != NULL) { + if (xmlHashLookup2(vctxt->schema->notaDecl, local, uri) == NULL) + ret = 1; + } else if (xmlHashLookup2(vctxt->schema->notaDecl, value, + NULL) == NULL) + ret = 1; + + if ((ret == 0) && (val != NULL)) { + if (prefix != NULL) { + (*val) = xmlSchemaNewNOTATIONValue(BAD_CAST local, + BAD_CAST xmlStrdup(uri)); + local = NULL; + } else + (*val) = xmlSchemaNewNOTATIONValue(BAD_CAST xmlStrdup(value), + NULL); + if (*val == NULL) + ret = -1; + } + if (local != NULL) + xmlFree(local); + } + + return (ret); +} + /** * xmlSchemaValidateSimpleTypeValue: * @ctxt: a schema validation context @@ -14646,11 +16214,11 @@ xmlSchemaValidateSimpleTypeValue(xmlSchemaValidCtxtPtr ctxt, * Normalize the value. */ if (normalize && - (ctxt->valueWS != XML_SCHEMAS_VAL_WTSP_COLLAPSE)) { + (ctxt->valueWS != XML_SCHEMAS_FACET_COLLAPSE)) { int norm = xmlSchemaGetWhiteSpaceFacetValue(type); if ((norm != -1) && (norm > ctxt->valueWS)) { - if (norm == XML_SCHEMAS_VAL_WTSP_COLLAPSE) + if (norm == XML_SCHEMAS_FACET_COLLAPSE) normValue = xmlSchemaCollapseString(value); else normValue = xmlSchemaWhiteSpaceReplace(value); @@ -14771,7 +16339,15 @@ xmlSchemaValidateSimpleTypeValue(xmlSchemaValidCtxtPtr ctxt, /* * STREAM-READ-CHILDREN. */ - ret = xmlSchemaValPredefTypeNodeNoNorm(type, value, &(ctxt->value), node); + if ((type->builtInType == XML_SCHEMAS_NOTATION) && + (ctxt->schema != NULL)) { + /* + * NOTATIONs need to be processed here, since they need + * to lookup in the hashtable of NOTATION declarations. + */ + ret = xmlSchemaValidateNotation(ctxt, value, &(ctxt->value), node); + } else + ret = xmlSchemaValPredefTypeNodeNoNorm(type, value, &(ctxt->value), node); if (ret > 0) { if (type->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2; @@ -14783,6 +16359,22 @@ xmlSchemaValidateSimpleTypeValue(xmlSchemaValidCtxtPtr ctxt, xmlSchemaVErr(ctxt, node, XML_SCHEMAV_INTERNAL, "Internal error: xmlSchemaValidateSimpleTypeValue, " "validating built-in type '%s'\n", type->name, NULL); + } else if ((ctxt->value == NULL) && + (type->builtInType == XML_SCHEMAS_STRING) && + (ctxt->nodeInfo != NULL) && + (ctxt->nodeInfo->flags & XML_SCHEMA_ELEM_INFO_VALUE_NEEDED)) { +#ifdef IDC_VALUE_SUPPORT + xmlChar *valdup; + /* + * Create a precomputed string value for "string" as well if + * requested. + */ + valdup = xmlStrdup(value); + ctxt->value = xmlSchemaNewStringValue(XML_SCHEMAS_STRING, + BAD_CAST valdup); + if ((valdup != NULL) && (ctxt->value == NULL)) + xmlFree(valdup); +#endif } } else if (type->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC) { /* 1.2.1 if {variety} is ·atomic· then the string must ·match· @@ -14955,7 +16547,7 @@ xmlSchemaValidateSimpleTypeValue(xmlSchemaValidCtxtPtr ctxt, } mws = xmlSchemaGetWhiteSpaceFacetValue(memberLink->type); if (mws > ctxt->valueWS) { - if (mws == XML_SCHEMAS_VAL_WTSP_COLLAPSE) + if (mws == XML_SCHEMAS_FACET_COLLAPSE) normValue = xmlSchemaCollapseString(value); else normValue = xmlSchemaWhiteSpaceReplace(value); @@ -14998,6 +16590,7 @@ xmlSchemaValidateSimpleTypeValue(xmlSchemaValidCtxtPtr ctxt, static int xmlSchemaValidateElementBySimpleType(xmlSchemaValidCtxtPtr ctxt, xmlSchemaTypePtr type, + int isNil, int valSimpleContent) { xmlSchemaTypePtr oldtype; @@ -15066,10 +16659,11 @@ xmlSchemaValidateElementBySimpleType(xmlSchemaValidCtxtPtr ctxt, * This will skip validation if the type is 'anySimpleType' and * if the value was already validated (e.g. default values). */ - if ((valSimpleContent == 1) && + if ((! isNil) && + (valSimpleContent == 1) && ((type->type != XML_SCHEMA_TYPE_BASIC) || (type->builtInType != XML_SCHEMAS_ANYSIMPLETYPE))) { - xmlChar *value; + xmlChar *value; value = xmlNodeGetContent(node); /* @@ -15210,6 +16804,1698 @@ xmlSchemaHasElemOrCharContent(xmlNodePtr node) return (0); } +/************************************************************************ + * * + * Identity-constraints (IDC) * + * * + ************************************************************************/ + +#ifdef IDC_ENABLED + +/** + * xmlSchemaAugmentIDC: + * @idcDef: the IDC definition + * + * Creates an augmented IDC definition item. + * + * Returns the item, or NULL on internal errors. + */ +static void +xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef, + xmlSchemaValidCtxtPtr vctxt) +{ + xmlSchemaIDCAugPtr aidc; + + aidc = (xmlSchemaIDCAugPtr) xmlMalloc(sizeof(xmlSchemaIDCAug)); + if (aidc == NULL) { + xmlSchemaVErrMemory(vctxt, + "xmlSchemaAugmentIDC: allocating an augmented IDC definition", + NULL); + return; + } + aidc->bubbleDepth = -1; + aidc->def = idcDef; + aidc->next = NULL; + if (vctxt->aidcs == NULL) + vctxt->aidcs = aidc; + else { + aidc->next = vctxt->aidcs; + vctxt->aidcs = aidc; + } +} + +/** + * xmlSchemaIDCNewBinding: + * @idcDef: the IDC definition of this binding + * + * Creates a new IDC binding. + * + * Returns the new binding in case of succeeded, NULL on internal errors. + */ +static xmlSchemaPSVIIDCBindingPtr +xmlSchemaIDCNewBinding(xmlSchemaIDCPtr idcDef) +{ + xmlSchemaPSVIIDCBindingPtr ret; + + ret = (xmlSchemaPSVIIDCBindingPtr) xmlMalloc( + sizeof(xmlSchemaPSVIIDCBinding)); + if (ret == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating a PSVI IDC binding item", NULL); + return (NULL); + } + memset(ret, 0, sizeof(xmlSchemaPSVIIDCBinding)); + ret->definition = idcDef; + return (ret); +} + +/** + * xmlSchemaIDCStoreNodeTableItem: + * @vctxt: the WXS validation context + * @item: the IDC node table item + * + * The validation context is used to store an IDC node table items. + * They are stored to avoid copying them if IDC node-tables are merged + * with corresponding parent IDC node-tables (bubbling). + * + * Returns 0 if succeeded, -1 on internal errors. + */ +static int +xmlSchemaIDCStoreNodeTableItem(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaPSVIIDCNodePtr item) +{ + /* + * Add to gobal list. + */ + if (vctxt->idcNodes == NULL) { + vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) + xmlMalloc(20 * sizeof(xmlSchemaPSVIIDCNodePtr)); + if (vctxt->idcNodes == NULL) { + xmlSchemaVErrMemory(vctxt, + "allocating the IDC node table item list", NULL); + return (-1); + } + vctxt->sizeIdcNodes = 20; + } else if (vctxt->sizeIdcNodes <= vctxt->nbIdcNodes) { + vctxt->sizeIdcNodes *= 2; + vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) + xmlRealloc(vctxt->idcNodes, vctxt->sizeIdcNodes * + sizeof(xmlSchemaPSVIIDCNodePtr)); + if (vctxt->idcNodes == NULL) { + xmlSchemaVErrMemory(vctxt, + "re-allocating the IDC node table item list", NULL); + return (-1); + } + } + vctxt->idcNodes[vctxt->nbIdcNodes++] = item; + + return (0); +} + +/** + * xmlSchemaIDCStoreKey: + * @vctxt: the WXS validation context + * @item: the IDC key + * + * The validation context is used to store an IDC key. + * + * Returns 0 if succeeded, -1 on internal errors. + */ +static int +xmlSchemaIDCStoreKey(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaPSVIIDCKeyPtr key) +{ + /* + * Add to gobal list. + */ + if (vctxt->idcKeys == NULL) { + vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) + xmlMalloc(40 * sizeof(xmlSchemaPSVIIDCKeyPtr)); + if (vctxt->idcKeys == NULL) { + xmlSchemaVErrMemory(vctxt, + "allocating the IDC key storage list", NULL); + return (-1); + } + vctxt->sizeIdcKeys = 40; + } else if (vctxt->sizeIdcKeys <= vctxt->nbIdcKeys) { + vctxt->sizeIdcKeys *= 2; + vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) + xmlRealloc(vctxt->idcKeys, vctxt->sizeIdcKeys * + sizeof(xmlSchemaPSVIIDCKeyPtr)); + if (vctxt->idcKeys == NULL) { + xmlSchemaVErrMemory(vctxt, + "re-allocating the IDC key storage list", NULL); + return (-1); + } + } + vctxt->idcKeys[vctxt->nbIdcKeys++] = key; + + return (0); +} + +/** + * xmlSchemaIDCAppendNodeTableItem: + * @bind: the IDC binding + * @ntItem: the node-table item + * + * Appends the IDC node-table item to the binding. + * + * Returns 0 on success and -1 on internal errors. + */ +static int +xmlSchemaIDCAppendNodeTableItem(xmlSchemaPSVIIDCBindingPtr bind, + xmlSchemaPSVIIDCNodePtr ntItem) +{ + if (bind->nodeTable == NULL) { + bind->sizeNodes = 10; + bind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) + xmlMalloc(10 * sizeof(xmlSchemaPSVIIDCNodePtr)); + if (bind->nodeTable == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an array of IDC node-table items", NULL); + return(-1); + } + } else if (bind->sizeNodes <= bind->nbNodes) { + bind->sizeNodes *= 2; + bind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) + xmlRealloc(bind->nodeTable, bind->sizeNodes * + sizeof(xmlSchemaPSVIIDCNodePtr)); + if (bind->nodeTable == NULL) { + xmlSchemaVErrMemory(NULL, + "re-allocating an array of IDC node-table items", NULL); + return(-1); + } + } + bind->nodeTable[bind->nbNodes++] = ntItem; + return(0); +} + +/** + * xmlSchemaIDCAquireBinding: + * @vctxt: the WXS validation context + * @matcher: the IDC matcher + * + * Looks up an PSVI IDC binding, for the IDC definition and + * of the given matcher. If none found, a new one is created + * and added to the IDC table. + * + * Returns an IDC binding or NULL on internal errors. + */ +static xmlSchemaPSVIIDCBindingPtr +xmlSchemaIDCAquireBinding(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaIDCMatcherPtr matcher) +{ + xmlSchemaNodeInfoPtr info; + + info = vctxt->elemInfos[matcher->depth]; + + if (info->idcTable == NULL) { + info->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def); + if (info->idcTable == NULL) + return (NULL); + return(info->idcTable); + } else { + xmlSchemaPSVIIDCBindingPtr bind = NULL; + + bind = info->idcTable; + do { + if (bind->definition == matcher->aidc->def) + return(bind); + if (bind->next == NULL) { + bind->next = xmlSchemaIDCNewBinding(matcher->aidc->def); + if (bind->next == NULL) + return (NULL); + return(bind->next); + } + bind = bind->next; + } while (bind != NULL); + } + return (NULL); +} + +/** + * xmlSchemaIDCFreeKey: + * @key: the IDC key + * + * Frees an IDC key together with its compiled value. + */ +static void +xmlSchemaIDCFreeKey(xmlSchemaPSVIIDCKeyPtr key) +{ + if (key->compValue != NULL) + xmlSchemaFreeValue(key->compValue); + xmlFree(key); +} + +/** + * xmlSchemaIDCFreeBinding: + * + * Frees an IDC binding. Note that the node table-items + * are not freed. + */ +static void +xmlSchemaIDCFreeBinding(xmlSchemaPSVIIDCBindingPtr bind) +{ + if (bind->nodeTable != NULL) { + if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { + int i; + /* + * Node-table items for keyrefs are not stored globally + * to the validation context, since they are not bubbled. + * We need to free them here. + */ + for (i = 0; i < bind->nbNodes; i++) { + xmlFree(bind->nodeTable[i]->keys); + xmlFree(bind->nodeTable[i]); + } + } + xmlFree(bind->nodeTable); + } + xmlFree(bind); +} + +/** + * xmlSchemaIDCFreeIDCTable: + * @bind: the first IDC binding in the list + * + * Frees an IDC table, i.e. all the IDC bindings in the list. + */ +static void +xmlSchemaIDCFreeIDCTable(xmlSchemaPSVIIDCBindingPtr bind) +{ + xmlSchemaPSVIIDCBindingPtr prev; + + while (bind != NULL) { + prev = bind; + bind = bind->next; + xmlSchemaIDCFreeBinding(prev); + } +} + +/** + * xmlSchemaIDCFreeMatcherList: + * @matcher: the first IDC matcher in the list + * + * Frees a list of IDC matchers. + */ +static void +xmlSchemaIDCFreeMatcherList(xmlSchemaIDCMatcherPtr matcher) +{ + xmlSchemaIDCMatcherPtr next; + + while (matcher != NULL) { + next = matcher->next; + if (matcher->keySeqs != NULL) { + int i; + for (i = 0; i < matcher->sizeKeySeqs; i++) + if (matcher->keySeqs[i] != NULL) + xmlFree(matcher->keySeqs[i]); + xmlFree(matcher->keySeqs); + } + xmlFree(matcher); + matcher = next; + } +} + +/** + * xmlSchemaAreValuesEqual: + * @ta: the first type + * @a: the first value + * @tb: the second type + * @b: the second value + * + * Compares two values. + * + * Returns 1 if they are equal, 0 if not and -1 on internal errors. + */ +static int +xmlSchemaAreValuesEqual(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaTypePtr ta, + xmlSchemaValPtr a, + xmlSchemaTypePtr tb, + xmlSchemaValPtr b) +{ + /* Same user derived/built-in derived/built-in primitive types. */ + if (ta == tb) + goto compareValue; + + /* + * Note that comparison with anySimpleTypes with be supported for + * string based types as well. + */ +#if 0 + if ((ta->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) || + (tb->builtInType == XML_SCHEMAS_ANYSIMPLETYPE)) + return(0); +#endif + + /* + * 4.2.1 equal (data-types) + * + * the ·value space·s of all ·primitive· datatypes are disjoint + * (they do not share any values) + */ + if ((ta->builtInType != 0) && (tb->builtInType != 0) && + (ta->flags & XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE) && + (tb->flags & XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE)) + return(0); + + if ((ta->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) || + (ta->flags & XML_SCHEMAS_TYPE_VARIETY_UNION) || + (tb->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) || + (tb->flags & XML_SCHEMAS_TYPE_VARIETY_UNION)) { + TODO + return(0); + } + /* + * (1) if a datatype T' is ·derived· by ·restriction· from an atomic datatype + * T then the ·value space· of T' is a subset of the ·value space· of T. + */ + /* + * (2) if datatypes T' and T'' are ·derived· by ·restriction· from a common + * atomic ancestor T then the ·value space·s of T' and T'' may overlap. + */ + + { + xmlSchemaTypePtr pta = ta, ptb = tb; + + /* Note that we will compare the primitives here. */ + while ((pta->builtInType == 0) || + ((pta->flags & XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE) == 0)) + pta = pta->baseType; + while ((ptb->builtInType == 0) || + ((ptb->flags & XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE) == 0)) + ptb = ptb->baseType; + if (pta == ptb) + goto compareValue; + return(0); + } +compareValue: + { +#ifdef IDC_VALUE_SUPPORT + int ret; + int aws, bws; + + aws = xmlSchemaGetWhiteSpaceFacetValue(ta); + bws = xmlSchemaGetWhiteSpaceFacetValue(tb); + + ret = xmlSchemaCompareValuesWhtsp( + a, (xmlSchemaWhitespaceValueType) aws, + b, (xmlSchemaWhitespaceValueType) bws); + if (ret == 0) + return(1); + else if (ret == -2) { + xmlSchemaVErr(vctxt, vctxt->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaAreValuesEqual, " + "failed to compare the values.\n", + NULL, NULL); + return(-1); + } else + return(0); +#else + return (1); +#endif + } +} + +/** + * xmlSchemaIDCAddStateObject: + * @vctxt: the WXS validation context + * @matcher: the IDC matcher + * @sel: the XPath information + * @parent: the parent "selector" state object if any + * @type: "selector" or "field" + * + * Creates/reuses and activates state objects for the given + * XPath information; if the XPath expression consists of unions, + * multiple state objects are created for every unioned expression. + * + * Returns 0 on success and -1 on internal errors. + */ +static int +xmlSchemaIDCAddStateObject(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaIDCMatcherPtr matcher, + xmlSchemaIDCSelectPtr sel, + int type) +{ + xmlSchemaIDCStateObjPtr sto; + + /* + * Reuse the state objects from the pool. + */ + if (vctxt->xpathStatePool != NULL) { + sto = vctxt->xpathStatePool; + vctxt->xpathStatePool = sto->next; + sto->next = NULL; + } else { + /* + * Create a new state object. + */ + sto = (xmlSchemaIDCStateObjPtr) xmlMalloc(sizeof(xmlSchemaIDCStateObj)); + if (sto == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an IDC state object", NULL); + return (-1); + } + memset(sto, 0, sizeof(xmlSchemaIDCStateObj)); + } + /* + * Add to global list. + */ + if (vctxt->xpathStates != NULL) + sto->next = vctxt->xpathStates; + vctxt->xpathStates = sto; + + /* + * Free the old xpath validation context. + */ + if (sto->xpathCtxt != NULL) + xmlFreeStreamCtxt((xmlStreamCtxtPtr) sto->xpathCtxt); + + /* + * Create a new XPath (pattern) validation context. + */ + sto->xpathCtxt = (void *) xmlPatternGetStreamCtxt( + (xmlPatternPtr) sel->xpathComp); + if (sto->xpathCtxt == NULL) { + xmlSchemaVErr(vctxt, vctxt->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaIDCAddStateObject, " + "failed to create the XPath validation context.\n", + NULL, NULL); + return (-1); + } + sto->type = type; + sto->depth = vctxt->depth; + sto->matcher = matcher; + sto->sel = sel; + sto->nbHistory = 0; + +#if DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: STO push '%s'\n", + sto->sel->xpath); +#endif + return (0); +} + +/** + * xmlSchemaXPathEvaluate: + * @vctxt: the WXS validation context + * @nodeType: the nodeType of the current node + * + * Evaluates all active XPath state objects. + * + * Returns the number of IC "field" state objects which resolved to + * this node, 0 if none resolved and -1 on internal errors. + */ +static int +xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, + xmlElementType nodeType) +{ + xmlSchemaIDCStateObjPtr sto, head = NULL, first; + int res, resolved = 0, depth = vctxt->depth; + + if (vctxt->xpathStates == NULL) + return (0); + + if (nodeType == XML_ATTRIBUTE_NODE) + depth++; +#if DEBUG_IDC + { + xmlChar *str = NULL; + xmlGenericError(xmlGenericErrorContext, + "IDC: EVAL on %s, depth %d, type %d\n", + xmlSchemaFormatNsUriLocal(&str, vctxt->nodeInfo->namespaceName, + vctxt->nodeInfo->localName), depth, nodeType); + FREE_AND_NULL(str) + } +#endif + /* + * Process all active XPath state objects. + */ + first = vctxt->xpathStates; + sto = first; + while (sto != head) { +#if DEBUG_IDC + if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) + xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] selector '%s'\n", + sto->matcher->aidc->def->name, sto->sel->xpath); + else + xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] field '%s'\n", + sto->matcher->aidc->def->name, sto->sel->xpath); +#endif + +#ifdef IDC_XPATH_SUPPORT + if (nodeType == XML_ELEMENT_NODE) + res = xmlStreamPush((xmlStreamCtxtPtr) sto->xpathCtxt, + vctxt->nodeInfo->localName, vctxt->nodeInfo->namespaceName); + else + res = xmlStreamPushAttr((xmlStreamCtxtPtr) sto->xpathCtxt, + vctxt->nodeInfo->localName, vctxt->nodeInfo->namespaceName); + +#else + res = 0; +#endif + if (res == -1) { + xmlSchemaVErr(vctxt, vctxt->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaXPathEvaluate, " + "failed to evaluate a node.\n", + NULL, NULL); + return (-1); + } + if (res == 0) + goto next_sto; + /* + * Full match. + */ +#if DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: " + "MATCH\n"); +#endif + /* + * Register a match in the state object history. + */ + if (sto->history == NULL) { + sto->history = (int *) xmlMalloc(5 * sizeof(int)); + if (sto->history == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating the state object history", NULL); + return(-1); + } + sto->sizeHistory = 10; + } else if (sto->sizeHistory <= sto->nbHistory) { + sto->sizeHistory *= 2; + sto->history = (int *) xmlRealloc(sto->history, + sto->sizeHistory * sizeof(int)); + if (sto->history == NULL) { + xmlSchemaVErrMemory(NULL, + "re-allocating the state object history", NULL); + return(-1); + } + } + sto->history[sto->nbHistory++] = depth; + +#ifdef DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: push match '%d'\n", + vctxt->depth); +#endif + + if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) { + xmlSchemaIDCSelectPtr sel; + /* + * Activate state objects for the IDC fields of + * the IDC selector. + */ +#if DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: " + "activating field states\n"); +#endif + sel = sto->matcher->aidc->def->fields; + while (sel != NULL) { + if (xmlSchemaIDCAddStateObject(vctxt, sto->matcher, + sel, XPATH_STATE_OBJ_TYPE_IDC_FIELD) == -1) + return (-1); + sel = sel->next; + } + } else if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_FIELD) { + /* + * An IDC key node was found. + */ +#if DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, + "IDC: key found\n"); +#endif + /* + * Notify that the character value of this node is + * needed. + */ + if (resolved == 0) + vctxt->nodeInfo->flags |= XML_SCHEMA_ELEM_INFO_VALUE_NEEDED; + resolved++; + } +next_sto: + if (sto->next == NULL) { + /* + * Evaluate field state objects created on this node as well. + */ + head = first; + sto = vctxt->xpathStates; + } else + sto = sto->next; + } + return (resolved); +} + +/** + * xmlSchemaXPathProcessHistory: + * @vctxt: the WXS validation context + * @type: the simple/complex type of the current node if any at all + * @compValue: the precompiled value + * + * Processes and pops the history items of the IDC state objects. + * IDC key-sequences are validated/created on IDC bindings. + * + * Returns 0 on success and -1 on internal errors. + */ +static int +xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, + int depth) +{ + xmlSchemaIDCStateObjPtr sto, nextsto; + int res, matchDepth; + xmlSchemaPSVIIDCKeyPtr key = NULL; + xmlSchemaTypePtr type = vctxt->nodeInfo->typeDef; + + if (vctxt->xpathStates == NULL) + return (0); + sto = vctxt->xpathStates; + +#if DEBUG_IDC + { + xmlChar *str = NULL; + xmlGenericError(xmlGenericErrorContext, + "IDC: BACK on %s, depth %d\n", + xmlSchemaFormatNsUriLocal(&str, vctxt->nodeInfo->namespaceName, + vctxt->nodeInfo->localName), vctxt->depth); + FREE_AND_NULL(str) + } +#endif + /* + * Evaluate the state objects. + */ + while (sto != NULL) { +#ifdef IDC_XPATH_SUPPORT + xmlStreamPop((xmlStreamCtxtPtr) sto->xpathCtxt); + #if DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: stream pop '%s'\n", + sto->sel->xpath); + #endif +#endif + if (sto->nbHistory == 0) + goto deregister_check; + + matchDepth = sto->history[sto->nbHistory -1]; + + /* + * Only matches at the current depth are of interest. + */ + if (matchDepth != depth) { + sto = sto->next; + continue; + } + if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_FIELD) { + if (! IS_SIMPLE_TYPE(type)) { + /* + * Not qualified if the field resolves to a node of non + * simple type. + */ + xmlSchemaStreamVCustomErr(vctxt, + XML_SCHEMAV_CVC_IDC, + vctxt->nodeInfo, + (xmlSchemaTypePtr) sto->matcher->aidc->def, + "The field '%s' does evaluate to a node of " + "non-simple type", sto->sel->xpath, NULL); + + sto->nbHistory--; + goto deregister_check; + } + if ((key == NULL) && (vctxt->nodeInfo->value == NULL)) { + /* + * Failed to provide the normalized value; maby + * the value was invalid. + */ + xmlSchemaStreamVCustomErr(vctxt, + XML_SCHEMAV_CVC_IDC, + vctxt->nodeInfo, + (xmlSchemaTypePtr) sto->matcher->aidc->def, + "Warning: No precomputed value available, the value " + "was either invalid or something strange happend", + NULL, NULL); + /* + xmlSchemaVErr(vctxt, vctxt->nodeInfo->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaXPathProcessHistory, " + "computed value not available.\n", + NULL, NULL); + */ + sto->nbHistory--; + goto deregister_check; + } else { + xmlSchemaIDCMatcherPtr matcher = sto->matcher; + xmlSchemaPSVIIDCKeyPtr *keySeq; + int pos, idx; + + /* + * The key will be anchored on the matcher's list of + * key-sequences. The position in this list is determined + * by the target node's depth relative to the matcher's + * depth of creation (i.e. the depth of the scope element). + */ + pos = sto->depth - matcher->depth; + idx = sto->sel->index; + + /* + * Create/grow the array of key-sequences. + */ + if (matcher->keySeqs == NULL) { + if (pos > 9) + matcher->sizeKeySeqs = pos * 2; + else + matcher->sizeKeySeqs = 10; + matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **) + xmlMalloc(matcher->sizeKeySeqs * + sizeof(xmlSchemaPSVIIDCKeyPtr *)); + if (matcher->keySeqs == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an array of key-sequences", + NULL); + return(-1); + } + memset(matcher->keySeqs, 0, + matcher->sizeKeySeqs * + sizeof(xmlSchemaPSVIIDCKeyPtr *)); + } else if (pos >= matcher->sizeKeySeqs) { + int i = matcher->sizeKeySeqs; + + matcher->sizeKeySeqs *= 2; + matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **) + xmlRealloc(matcher->keySeqs, + matcher->sizeKeySeqs * + sizeof(xmlSchemaPSVIIDCKeyPtr *)); + if (matcher->keySeqs == NULL) { + xmlSchemaVErrMemory(NULL, + "reallocating an array of key-sequences", + NULL); + return (-1); + } + /* + * The array needs to be NULLed. + * TODO: Use memset? + */ + for (; i < matcher->sizeKeySeqs; i++) + matcher->keySeqs[i] = NULL; + } + + /* + * Get/create the key-sequence. + */ + keySeq = matcher->keySeqs[pos]; + if (keySeq == NULL) { + goto create_sequence; + } else { + if (keySeq[idx] != NULL) { + /* + * cvc-identity-constraint: + * 3 For each node in the ·target node set· all + * of the {fields}, with that node as the context + * node, evaluate to either an empty node-set or + * a node-set with exactly one member, which must + * have a simple type. + * + * The key was already set; report an error. + */ + xmlSchemaStreamVCustomErr(vctxt, + XML_SCHEMAV_CVC_IDC, + vctxt->nodeInfo, + (xmlSchemaTypePtr) matcher->aidc->def, + "The field '%s' evaluates to a node-set " + "with more than one member", + sto->sel->xpath, NULL); + sto->nbHistory--; + goto deregister_check; + } else { + goto create_key; + } + } + +create_sequence: + /* + * Create a key-sequence. + */ + keySeq = (xmlSchemaPSVIIDCKeyPtr *) xmlMalloc( + matcher->aidc->def->nbFields * + sizeof(xmlSchemaPSVIIDCKeyPtr)); + if (keySeq == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an IDC key-sequence", NULL); + return(-1); + } + memset(keySeq, 0, matcher->aidc->def->nbFields * + sizeof(xmlSchemaPSVIIDCKeyPtr)); + matcher->keySeqs[pos] = keySeq; +create_key: + /* + * Created a key once per node only. + */ + if (key == NULL) { + key = (xmlSchemaPSVIIDCKeyPtr) xmlMalloc( + sizeof(xmlSchemaPSVIIDCKey)); + if (key == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating a IDC key", NULL); + xmlFree(keySeq); + matcher->keySeqs[pos] = NULL; + return(-1); + } + /* + * Consume the compiled value. + */ + key->type = type; + key->compValue = vctxt->nodeInfo->value; + vctxt->nodeInfo->value = NULL; + /* + * Store the key in a global list. + */ + if (xmlSchemaIDCStoreKey(vctxt, key) == -1) { + xmlSchemaIDCFreeKey(key); + return (-1); + } + } + keySeq[idx] = key; + } + } else if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) { + + xmlSchemaPSVIIDCKeyPtr **keySeq = NULL; + xmlSchemaPSVIIDCBindingPtr bind; + xmlSchemaPSVIIDCNodePtr ntItem; + xmlSchemaIDCMatcherPtr matcher; + xmlSchemaIDCPtr idc; + int pos, i, j, nbKeys; + /* + * Here we have the following scenario: + * An IDC 'selector' state object resolved to a target node, + * during the time this target node was in the + * ancestor-or-self axis, the 'field' state object(s) looked + * out for matching nodes to create a key-sequence for this + * target node. Now we are back to this target node and need + * to put the key-sequence, together with the target node + * itself, into the node-table of the corresponding IDC + * binding. + */ + matcher = sto->matcher; + idc = matcher->aidc->def; + nbKeys = idc->nbFields; + pos = depth - matcher->depth; + /* + * Check if the matcher has any key-sequences at all, plus + * if it has a key-sequence for the current target node. + */ + if ((matcher->keySeqs == NULL) || + (matcher->sizeKeySeqs <= pos)) { + if (idc->type == XML_SCHEMA_TYPE_IDC_KEY) + goto selector_key_error; + else + goto selector_leave; + } + + keySeq = &(matcher->keySeqs[pos]); + if (*keySeq == NULL) { + if (idc->type == XML_SCHEMA_TYPE_IDC_KEY) + goto selector_key_error; + else + goto selector_leave; + } + + for (i = 0; i < nbKeys; i++) { + if ((*keySeq)[i] == NULL) { + /* + * Not qualified, if not all fields did resolve. + */ + if (idc->type == XML_SCHEMA_TYPE_IDC_KEY) { + /* + * All fields of a "key" IDC must resolve. + */ + goto selector_key_error; + } + goto selector_leave; + } + } + /* + * All fields did resolve. + */ + + /* + * 4.1 If the {identity-constraint category} is unique(/key), + * then no two members of the ·qualified node set· have + * ·key-sequences· whose members are pairwise equal, as + * defined by Equal in [XML Schemas: Datatypes]. + * + * Get the IDC binding from the matcher and check for + * duplicate key-sequences. + */ + bind = xmlSchemaIDCAquireBinding(vctxt, matcher); + if ((idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) && + (bind->nbNodes != 0)) { + xmlSchemaPSVIIDCKeyPtr ckey, bkey, *bkeySeq; + + i = 0; + res = 0; + /* + * Compare the key-sequences, key by key. + */ + do { + bkeySeq = bind->nodeTable[i]->keys; + for (j = 0; j < nbKeys; j++) { + ckey = (*keySeq)[j]; + bkey = bkeySeq[j]; + res = xmlSchemaAreValuesEqual(vctxt, ckey->type, + ckey->compValue, bkey->type, bkey->compValue); + if (res == -1) { + return (-1); + } else if (res == 0) + break; + } + if (res == 1) { + /* + * Duplicate found. + */ + break; + } + i++; + } while (i < bind->nbNodes); + if (i != bind->nbNodes) { + /* + * TODO: Try to report the key-sequence. + */ + xmlSchemaStreamVCustomErr(vctxt, + XML_SCHEMAV_CVC_IDC, + vctxt->nodeInfo, + (xmlSchemaTypePtr) idc, + "Duplicate key-sequence found", NULL, NULL); + + goto selector_leave; + } + } + /* + * Add a node-table item to the IDC binding. + */ + ntItem = (xmlSchemaPSVIIDCNodePtr) xmlMalloc( + sizeof(xmlSchemaPSVIIDCNode)); + if (ntItem == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an IDC node-table item", NULL); + xmlFree(*keySeq); + *keySeq = NULL; + return(-1); + } + memset(ntItem, 0, sizeof(xmlSchemaPSVIIDCNode)); + + /* + * Store the node-table item on global list. + */ + if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) { + if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) { + xmlFree(ntItem); + xmlFree(*keySeq); + *keySeq = NULL; + return (-1); + } + } + /* + * Init the node-table item. Consume the key-sequence. + */ + ntItem->node = vctxt->node; + ntItem->keys = *keySeq; + *keySeq = NULL; + if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1) { + if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) { + /* + * Free the item, since keyref items won't be + * put on a global list. + */ + xmlFree(ntItem->keys); + xmlFree(ntItem); + } + return (-1); + } + + goto selector_leave; +selector_key_error: + /* + * 4.2.1 (KEY) The ·target node set· and the + * ·qualified node set· are equal, that is, every + * member of the ·target node set· is also a member + * of the ·qualified node set· and vice versa. + */ + xmlSchemaStreamVCustomErr(vctxt, + XML_SCHEMAV_CVC_IDC, + vctxt->nodeInfo, + (xmlSchemaTypePtr) idc, + "All 'key' fields must evaluate to a node", + NULL, NULL); +selector_leave: + /* + * Free the key-sequence if not added to the IDC table. + */ + if ((keySeq != NULL) && (*keySeq != NULL)) { + xmlFree(*keySeq); + *keySeq = NULL; + } + } /* if selector */ + + sto->nbHistory--; + +deregister_check: + /* + * Deregister state objects if they reach the depth of creation. + */ + if ((sto->nbHistory == 0) && (sto->depth == depth)) { +#if DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: STO pop '%s'\n", + sto->sel->xpath); +#endif + if (vctxt->xpathStates != sto) { + xmlSchemaVErr(vctxt, vctxt->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaXPathProcessHistory, " + "The state object to be removed is not the first " + "in the list.\n", + NULL, NULL); + } + nextsto = sto->next; + /* + * Unlink from the list of active XPath state objects. + */ + vctxt->xpathStates = sto->next; + sto->next = vctxt->xpathStatePool; + /* + * Link it to the pool of reusable state objects. + */ + vctxt->xpathStatePool = sto; + sto = nextsto; + } else + sto = sto->next; + } /* while (sto != NULL) */ + return (0); +} + +/** + * xmlSchemaIDCRegisterMatchers: + * @vctxt: the WXS validation context + * @elemDecl: the element declaration + * + * Creates helper objects to evaluate IDC selectors/fields + * successively. + * + * Returns 0 if OK and -1 on internal errors. + */ +static int +xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaElementPtr elemDecl) +{ + xmlSchemaIDCMatcherPtr matcher, last = NULL; + xmlSchemaIDCPtr idc, refIdc; + xmlSchemaIDCAugPtr aidc; + + idc = (xmlSchemaIDCPtr) elemDecl->idcs; + if (idc == NULL) + return (0); + +#if DEBUG_IDC + { + xmlChar *str = NULL; + xmlGenericError(xmlGenericErrorContext, + "IDC: REGISTER on %s, depth %d\n", + (char *) xmlSchemaFormatNsUriLocal(&str, vctxt->nodeInfo->namespaceName, + vctxt->nodeInfo->localName), vctxt->depth); + FREE_AND_NULL(str) + } +#endif + if (vctxt->nodeInfo->idcMatchers != NULL) { + xmlSchemaVErr(vctxt, vctxt->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaIDCRegisterMatchers: " + "The chain of IDC matchers is expected to be empty.\n", + NULL, NULL); + return (-1); + } + do { + if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) { + /* + * Since IDCs bubbles are expensive we need to know the + * depth at which the bubbles should stop; this will be + * the depth of the top-most keyref IDC. If no keyref + * references a key/unique IDC, the bubbleDepth will + * be -1, indicating that no bubbles are needed. + */ + refIdc = (xmlSchemaIDCPtr) idc->ref->item; + if (refIdc != NULL) { + /* + * Lookup the augmented IDC. + */ + aidc = vctxt->aidcs; + while (aidc != NULL) { + if (aidc->def == refIdc) + break; + aidc = aidc->next; + } + if (aidc == NULL) { + xmlSchemaVErr(vctxt, vctxt->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaIDCRegisterMatchers: " + "Could not find an augmented IDC item for an IDC " + "definition.\n", + NULL, NULL); + return (-1); + } + if ((aidc->bubbleDepth == -1) || + (vctxt->depth < aidc->bubbleDepth)) + aidc->bubbleDepth = vctxt->depth; + } + } + /* + * Lookup the augmented IDC item for the IDC definition. + */ + aidc = vctxt->aidcs; + while (aidc != NULL) { + if (aidc->def == idc) + break; + aidc = aidc->next; + } + if (aidc == NULL) { + xmlSchemaVErr(vctxt, vctxt->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaIDCRegisterMatchers: " + "Could not find an augmented IDC item for an IDC definition.\n", + NULL, NULL); + return (-1); + } + /* + * Create an IDC matcher for every IDC definition. + */ + matcher = (xmlSchemaIDCMatcherPtr) + xmlMalloc(sizeof(xmlSchemaIDCMatcher)); + if (matcher == NULL) { + xmlSchemaVErrMemory(vctxt, + "allocating an IDC matcher", NULL); + return (-1); + } + memset(matcher, 0, sizeof(xmlSchemaIDCMatcher)); + if (last == NULL) + vctxt->nodeInfo->idcMatchers = matcher; + else + last->next = matcher; + last = matcher; + + matcher->type = IDC_MATCHER; + matcher->depth = vctxt->depth; + matcher->aidc = aidc; +#if DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n"); +#endif + /* + * Init the automaton state object. + */ + if (xmlSchemaIDCAddStateObject(vctxt, matcher, + idc->selector, XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) == -1) + return (-1); + + idc = idc->next; + } while (idc != NULL); + return (0); +} + +/** + * xmlSchemaBubbleIDCNodeTables: + * @depth: the current tree depth + * + * Merges IDC bindings of an element at @depth into the corresponding IDC + * bindings of its parent element. If a duplicate note-table entry is found, + * both, the parent node-table entry and child entry are discarded from the + * node-table of the parent. + * + * Returns 0 if OK and -1 on internal errors. + */ +static int +xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) +{ + xmlSchemaPSVIIDCBindingPtr bind; /* IDC bindings of the current node. */ + xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL, lastParBind = NULL; /* parent IDC bindings. */ + xmlSchemaPSVIIDCNodePtr node, parNode = NULL; /* node-table entries. */ + xmlSchemaPSVIIDCKeyPtr key, parKey; /* keys of in a key-sequence. */ + xmlSchemaIDCAugPtr aidc; + int i, j, k, ret = 0, oldNum, newDupls = 0; + int duplTop; + + /* + * The node table has the following sections: + * + * O --> old node-table entries (first) + * O + * + --> new node-table entries + * + + * % --> new duplicate node-table entries + * % + * # --> old duplicate node-table entries + * # (last) + * + */ + bind = vctxt->nodeInfo->idcTable; + if (bind == NULL) { + /* Fine, no table, no bubbles. */ + return (0); + } + + parTable = &(vctxt->elemInfos[vctxt->depth -1]->idcTable); + /* + * Walk all bindings; create new or add to existing bindings. + * Remove duplicate key-sequences. + */ +start_binding: + while (bind != NULL) { + /* + * Skip keyref IDCs. + */ + if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { + bind = bind->next; + continue; + } + /* + * Check if the key/unique IDC table needs to be bubbled. + */ + aidc = vctxt->aidcs; + do { + if (aidc->def == bind->definition) { + if (aidc->bubbleDepth >= vctxt->depth) { + bind = bind->next; + goto start_binding; + } + break; + } + aidc = aidc->next; + } while (aidc != NULL); + + if (parTable != NULL) + parBind = *parTable; + while (parBind != NULL) { + /* + * Search a matching parent binding for the + * IDC definition. + */ + if (parBind->definition == bind->definition) { + + /* + * Compare every node-table entry of the child node, + * i.e. the key-sequence within, ... + */ + oldNum = parBind->nbNodes; /* Skip newly added items. */ + duplTop = oldNum + parBind->nbDupls; + + for (i = 0; i < bind->nbNodes; i++) { + node = bind->nodeTable[i]; + if (node == NULL) + continue; + /* + * ...with every key-sequence of the parent node, already + * evaluated to be a duplicate key-sequence. + */ + if (parBind->nbDupls != 0) { + j = bind->nbNodes + newDupls; + while (j < duplTop) { + parNode = parBind->nodeTable[j]; + for (k = 0; k < bind->definition->nbFields; k++) { + key = node->keys[k]; + parKey = parNode->keys[k]; + ret = xmlSchemaAreValuesEqual(vctxt, key->type, + key->compValue, + parKey->type, parKey->compValue); + if (ret == -1) { + /* TODO: Internal error */ + return(-1); + } else if (ret == 0) + break; + + } + if (ret == 1) + /* Duplicate found. */ + break; + j++; + } + if (j != duplTop) { + /* Duplicate found. */ + continue; + } + } + /* + * ... and with every key-sequence of the parent node. + */ + j = 0; + while (j < oldNum) { + parNode = parBind->nodeTable[j]; + /* + * Compare key by key. + */ + for (k = 0; k < parBind->definition->nbFields; k++) { + key = node->keys[k]; + parKey = parNode->keys[k]; + + ret = xmlSchemaAreValuesEqual(vctxt, key->type, + key->compValue, + parKey->type, parKey->compValue); + if (ret == -1) { + /* TODO: Internal error */ + } else if (ret == 0) + break; + + } + if (ret == 1) + /* + * The key-sequences are equal. + */ + break; + j++; + } + if (j != oldNum) { + /* + * Handle duplicates. + */ + newDupls++; + oldNum--; + parBind->nbNodes--; + /* + * Move last old item to pos of duplicate. + */ + parBind->nodeTable[j] = + parBind->nodeTable[oldNum]; + + if (parBind->nbNodes != oldNum) { + /* + * If new items exist, move last new item to + * last of old items. + */ + parBind->nodeTable[oldNum] = + parBind->nodeTable[parBind->nbNodes]; + } + /* + * Move duplicate to last pos of new/old items. + */ + parBind->nodeTable[parBind->nbNodes] = parNode; + + } else { + /* + * Add the node-table entry (node and key-sequence) of + * the child node to the node table of the parent node. + */ + if (parBind->nodeTable == NULL) { + parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) + xmlMalloc(1 * sizeof(xmlSchemaPSVIIDCNodePtr)); + if (parBind->nodeTable == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating IDC list of node-table items", NULL); + return(-1); + } + parBind->sizeNodes = 1; + } else if (duplTop >= parBind->sizeNodes) { + parBind->sizeNodes++; + parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) + xmlRealloc(parBind->nodeTable, parBind->sizeNodes * + sizeof(xmlSchemaPSVIIDCNodePtr)); + if (parBind->nodeTable == NULL) { + xmlSchemaVErrMemory(NULL, + "re-allocating IDC list of node-table items", NULL); + return(-1); + } + } + + /* + * Move first old duplicate to last position + * of old duplicates +1. + */ + if (parBind->nbDupls != 0) { + parBind->nodeTable[duplTop] = + parBind->nodeTable[parBind->nbNodes + newDupls]; + } + /* + * Move first new duplicate to last position of + * new duplicates +1. + */ + if (newDupls != 0) { + parBind->nodeTable[parBind->nbNodes + newDupls] = + parBind->nodeTable[parBind->nbNodes]; + } + /* + * Append the new node-table entry to the 'new node-table + * entries' section. + */ + parBind->nodeTable[parBind->nbNodes] = node; + parBind->nbNodes++; + duplTop++; + } + } + parBind->nbDupls += newDupls; + break; + } + if (parBind->next == NULL) + lastParBind = parBind; + parBind = parBind->next; + } + if (parBind == NULL) { + /* + * No binding for the IDC was found: create a new one and + * copy all node-tables. + */ + parBind = xmlSchemaIDCNewBinding(bind->definition); + if (parBind == NULL) + return(-1); + + parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) + xmlMalloc(bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); + if (parBind->nodeTable == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an array of IDC node-table items", NULL); + xmlSchemaIDCFreeBinding(parBind); + return(-1); + } + parBind->sizeNodes = bind->nbNodes; + parBind->nbNodes = bind->nbNodes; + memcpy(parBind->nodeTable, bind->nodeTable, + bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); + if (*parTable == NULL) + *parTable = parBind; + else + lastParBind->next = parBind; + } + bind = bind->next; + } + return (0); +} + +/** + * xmlSchemaCheckCVCIDCKeyRef: + * @vctxt: the WXS validation context + * @elemDecl: the element declaration + * + * Check the cvc-idc-keyref constraints. + */ +static int +xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) +{ + xmlSchemaPSVIIDCBindingPtr refbind, bind; + + refbind = vctxt->nodeInfo->idcTable; + /* + * Find a keyref. + */ + while (refbind != NULL) { + if (refbind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { + int i, j, k, res; + xmlSchemaPSVIIDCKeyPtr *refKeys, *keys; + xmlSchemaPSVIIDCKeyPtr refKey, key; + + /* + * Find the referred key/unique. + */ + bind = vctxt->nodeInfo->idcTable; + do { + if ((xmlSchemaIDCPtr) refbind->definition->ref->item == + bind->definition) + break; + bind = bind->next; + } while (bind != NULL); + + /* + * Search for a matching key-sequences. + */ + for (i = 0; i < refbind->nbNodes; i++) { + res = 0; + if (bind != NULL) { + refKeys = refbind->nodeTable[i]->keys; + for (j = 0; j < bind->nbNodes; j++) { + keys = bind->nodeTable[j]->keys; + for (k = 0; k < bind->definition->nbFields; k++) { + refKey = refKeys[k]; + key = keys[k]; + res = xmlSchemaAreValuesEqual(vctxt, + key->type, key->compValue, + refKey->type, refKey->compValue); + if (res == 0) + break; + else if (res == -1) { + return (-1); + } + } + if (res == 1) { + /* + * Match found. + */ + break; + } + } + } + if (res == 0) { + /* TODO: Report the key-sequence. */ + xmlSchemaVCustomErr(vctxt, + XML_SCHEMAV_CVC_IDC, + refbind->nodeTable[i]->node, + (xmlSchemaTypePtr) refbind->definition, + "No matching key-sequence found", NULL); + } + } + } + refbind = refbind->next; + } + return (0); +} +#endif /* IDC_ENABLED */ + +#ifdef ELEM_INFO_ENABLED +/** + * xmlSchemaBeginElement: + * @vctxt: the WXS validation context + * + * Just a temporary workaround to simulate streaming validation + * a bit. + */ +static void +xmlSchemaBeginElement(xmlSchemaValidCtxtPtr vctxt) +{ + vctxt->depth++; + vctxt->nodeInfo = xmlSchemaGetFreshElemInfo(vctxt, vctxt->depth); + vctxt->nodeInfo->node = vctxt->node; + vctxt->nodeInfo->localName = vctxt->node->name; + if (vctxt->node->ns != NULL) + vctxt->nodeInfo->namespaceName = vctxt->node->ns->href; + else + vctxt->nodeInfo->namespaceName = NULL; +} + +/** + * xmlSchemaEndElement: + * @vctxt: the WXS validation context + * + * Just a temporary workaround to simulate streaming validation + * a bit. + */ +static int +xmlSchemaEndElement(xmlSchemaValidCtxtPtr vctxt) +{ + if (vctxt->depth < 0) { + /* TODO: raise error? */ + vctxt->depth--; + return (0); + } +#ifdef IDC_ENABLED + /* + * Evaluate the history of changes of active state objects. + */ + if (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1) + return (-1); + + if (vctxt->nodeInfo->value != NULL) { + xmlSchemaFreeValue(vctxt->nodeInfo->value); + vctxt->nodeInfo->value = NULL; + } + /* + * TODO: 6 The element information item must be ·valid· with respect to each of + * the {identity-constraint definitions} as per Identity-constraint + * Satisfied (§3.11.4). + */ + /* + * Validate IDC keyrefs. + */ + xmlSchemaCheckCVCIDCKeyRef(vctxt); +#endif + + /* + * Merge/free the IDC table. + */ + if (vctxt->nodeInfo->idcTable != NULL) { +#ifdef IDC_ENABLED +#ifdef DEBUG_IDC + xmlSchemaDebugDumpIDCTable(stdout, + vctxt->nodeInfo->namespaceName, + vctxt->nodeInfo->localName, + vctxt->nodeInfo->idcTable); +#endif + if (vctxt->depth > 0) { + /* + * Merge the IDC node table with the table of the parent node. + */ + xmlSchemaBubbleIDCNodeTables(vctxt); + } + /* + * TODO: Don't free the PSVI IDC tables if they are + * requested for the PSVI. + */ + xmlSchemaIDCFreeIDCTable(vctxt->nodeInfo->idcTable); +#endif + vctxt->nodeInfo->idcTable = NULL; + } + + /* + * Cleanup IDC matchers. + */ +#ifdef IDC_ENABLED + if (vctxt->nodeInfo->idcMatchers != NULL) { + xmlSchemaIDCFreeMatcherList(vctxt->nodeInfo->idcMatchers); + vctxt->nodeInfo->idcMatchers = NULL; + } +#endif + + /* + * Skip further processing if we are on the validation root. + */ + if (vctxt->depth == 0) { + vctxt->depth--; + return (0); + } + + /* + * Reset the bubbleDepth if needed. + */ +#ifdef IDC_ENABLED + if (vctxt->aidcs != NULL) { + xmlSchemaIDCAugPtr aidc = vctxt->aidcs; + do { + if (aidc->bubbleDepth == vctxt->depth) { + /* + * A bubbleDepth of a key/unique IDC matches the current + * depth, this means that we are leaving the scope of the + * top-most keyref IDC. + */ + aidc->bubbleDepth = -1; + } + aidc = aidc->next; + } while (aidc != NULL); + } +#endif + vctxt->depth--; + /* + * Clear the current elemInfo. + */ + if (vctxt->nodeInfo->value != NULL) { + xmlSchemaFreeValue(vctxt->nodeInfo->value); + vctxt->nodeInfo->value = NULL; + } + vctxt->nodeInfo = vctxt->elemInfos[vctxt->depth]; + vctxt->node = vctxt->nodeInfo->node; + + return (0); +} + +#endif /* ELEM_INFO_ENABLED */ /** * xmlSchemaValidateElementByDeclaration: @@ -15258,6 +18544,13 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, XML_SCHEMAV_CVC_ELT_1, elem, NULL, "No matching declaration available", NULL); + /* + * Evaluate IDCs even if an error occured. + */ +#ifdef IDC_ENABLED + if (xmlSchemaXPathEvaluate(ctxt, XML_ELEMENT_NODE) == -1) + return (-1); +#endif return (ctxt->err); } /* @@ -15268,6 +18561,13 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, XML_SCHEMAV_CVC_ELT_2, elem, NULL, "The element declaration is abstract", NULL); + /* + * Evaluate IDCs even if an error occured. + */ +#ifdef IDC_ENABLED + if (xmlSchemaXPathEvaluate(ctxt, XML_ELEMENT_NODE) == -1) + return (-1); +#endif return (ctxt->err); } @@ -15297,8 +18597,8 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, return (-1); } if ((elemDecl->flags & XML_SCHEMAS_ELEM_NILLABLE) == 0) { - /* - * cvc-elt (3.3.4) : 3.1 + /* + * cvc-elt (3.3.4) : 3.1 */ xmlSchemaVCustomErr(ctxt, XML_SCHEMAV_CVC_ELT_3_1, @@ -15420,10 +18720,24 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, XML_SCHEMAV_CVC_TYPE_1, elem, (xmlSchemaTypePtr) elemDecl, "The type definition is absent", NULL); + /* + * Evaluate IDCs even if an error occured. + */ +#ifdef IDC_ENABLED + if (xmlSchemaXPathEvaluate(ctxt, XML_ELEMENT_NODE) == -1) + return (-1); +#endif return (XML_SCHEMAV_CVC_TYPE_1); } /* + * Remember the actual-type definition. + */ +#ifdef ELEM_INFO_ENABLED + ctxt->nodeInfo->typeDef = actualType; +#endif + + /* * TODO: Since this should be already checked by the content model automaton, * and we want to get rid of the XML_SCHEMAS_ERR... types, the error code * has been changed to XML_SCHEMAV_INTERNAL. @@ -15453,6 +18767,19 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, */ if (elemHasContent == -1) elemHasContent = xmlSchemaHasElemOrCharContent(elem); + + /* + * IDC: Register identity-constraint XPath matchers. + */ +#ifdef IDC_ENABLED + if (elemDecl->idcs != NULL) + xmlSchemaIDCRegisterMatchers(ctxt, elemDecl); + /* + * Evaluate IDCs. + */ + if (xmlSchemaXPathEvaluate(ctxt, XML_ELEMENT_NODE) == -1) + return (-1); +#endif /* * cvc-elt (3.3.4) : 5 * The appropriate case among the following must be true: @@ -15478,7 +18805,7 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, if (actualType != elemDecl->subtypes) { xmlSchemaCreatePCtxtOnVCtxt(ctxt); ret = xmlSchemaCheckCOSValidDefault(ctxt->pctxt, ctxt, actualType, - elemDecl->value, NULL); + elemDecl->value, NULL); if (ret < 0) { xmlSchemaVCustomErr(ctxt, XML_SCHEMAV_INTERNAL, @@ -15497,14 +18824,14 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, * (§3.3.4). */ /* - * Disable validation of the simple content, since it was already + * Disable validation of the simple content, if it was already * done above. */ if (ret == 0) { if (actualType != elemDecl->subtypes) - ret = xmlSchemaValidateElementByType(ctxt, actualType, 0); + ret = xmlSchemaValidateElementByType(ctxt, actualType, 0, 0); else - ret = xmlSchemaValidateElementByType(ctxt, actualType, 0); + ret = xmlSchemaValidateElementByType(ctxt, actualType, 0, 1); ctxt->node = elem; if (ret < 0) { xmlSchemaVCustomErr(ctxt, @@ -15539,21 +18866,30 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, * to the ·actual type definition· as defined by Element Locally * Valid (Type) (§3.3.4). */ - ret = xmlSchemaValidateElementByType(ctxt, actualType, 1); + ret = xmlSchemaValidateElementByType(ctxt, actualType, nilled, 1); + /* + * Consume the computed value for IDCs, ect. Note that default + * values are not supported yet. + */ +#ifdef ELEM_INFO_ENABLED + if (ctxt->value != NULL) { + ctxt->nodeInfo->value = ctxt->value; + ctxt->value = NULL; + } +#endif ctxt->node = elem; if (ret < 0) { xmlSchemaVCustomErr(ctxt, XML_SCHEMAV_INTERNAL, elem, actualType, "Internal error: xmlSchemaValidateElementByDeclaration, " - "validating a default value", NULL); + "calling validation by type", NULL); return (-1); } /* * 5.2.2 If there is a fixed {value constraint} and clause 3.2 has * not applied, all of the following must be true: */ - if ((elemDecl->flags & XML_SCHEMAS_ELEM_FIXED) && (nilled == 0)) { /* * 5.2.2.1 The element information item must have no element @@ -15592,7 +18928,7 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, if (! xmlStrEqual(BAD_CAST value, elemDecl->value)) { /* * TODO: Report invalid & expected values as well. - * TODO: Implement the cononical stuff. + * TODO: Implement the canonical stuff. */ xmlSchemaVCustomErr(ctxt, XML_SCHEMAV_CVC_ELT_5_2_2_2_1, @@ -15617,7 +18953,7 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, /* * TODO: *actual value* is the normalized value, impl. this. * TODO: Report invalid & expected values as well. - * TODO: Implement the cononical stuff. + * TODO: Implement the canonical stuff. * */ value = xmlNodeListGetString(elem->doc, elem->children, 1); @@ -15625,7 +18961,7 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, xmlSchemaVCustomErr(ctxt, XML_SCHEMAV_CVC_ELT_5_2_2_2_2, elem, (xmlSchemaTypePtr) elemDecl, - "The normalized value does not match the cononical " + "The normalized value does not match the canonical " "lexical representation of the fixed constraint", NULL); } @@ -15641,13 +18977,6 @@ xmlSchemaValidateElementByDeclaration(xmlSchemaValidCtxtPtr ctxt, } } - - /* - * TODO: 6 The element information item must be ·valid· with respect to each of - * the {identity-constraint definitions} as per Identity-constraint - * Satisfied (§3.11.4). - */ - /* * TODO: 7 If the element information item is the ·validation root·, it must be * ·valid· per Validation Root Valid (ID/IDREF) (§3.3.4). @@ -15698,7 +19027,8 @@ xmlSchemaValidateElementByWildcardInternal(xmlSchemaValidCtxtPtr ctxt, decl = xmlHashLookup3(ctxt->schema->elemDecl, node->name, node->ns->href, NULL); else - decl = xmlHashLookup3(ctxt->schema->elemDecl, node->name, NULL, NULL); + decl = xmlHashLookup3(ctxt->schema->elemDecl, node->name, + NULL, NULL); if (decl != NULL) { ctxt->node = node; ret = xmlSchemaValidateElementByDeclaration(ctxt, decl); @@ -15713,8 +19043,25 @@ xmlSchemaValidateElementByWildcardInternal(xmlSchemaValidCtxtPtr ctxt, /* TODO: Change to proper error code. */ xmlSchemaVWildcardErr(ctxt, XML_SCHEMAV_CVC_ELT_1, node, wild, "No matching global declaration available"); + /* + * Evaluate IDCs even if a validation error occured. + */ +#ifdef IDC_ENABLED + if (xmlSchemaXPathEvaluate(ctxt,XML_ELEMENT_NODE) == -1) + return(-1); +#endif return (ctxt->err); } + /* + * Evaluate IDCs; we need to know if an IDC field resolves to + * such a node. This node has no type definition and will + * definitely result in an IDC validation error if an IDC field + * resolves. + */ +#ifdef IDC_ENABLED + if (xmlSchemaXPathEvaluate(ctxt, XML_ELEMENT_NODE) == -1) + return(-1); +#endif } if (node->children != NULL) { child = node->children; @@ -15731,8 +19078,21 @@ xmlSchemaValidateElementByWildcardInternal(xmlSchemaValidCtxtPtr ctxt, "The namespace of the element is not allowed"); return (ctxt->err); } +#ifdef ELEM_INFO_ENABLED + ctxt->node = child; + xmlSchemaBeginElement(ctxt); +#endif + /* + * Recurse over the children. + */ ret = xmlSchemaValidateElementByWildcardInternal(ctxt, wild, child); + if (ret == -1) + return (-1); +#ifdef ELEM_INFO_ENABLED + if (xmlSchemaEndElement(ctxt) == -1) + return (-1); +#endif if (ret != 0) return (ret); } @@ -15995,7 +19355,9 @@ xmlSchemaValidateElementByComplexType(xmlSchemaValidCtxtPtr ctxt, else nsUri = NULL; ret = xmlRegExecPushString2(ctxt->regexp, - child->name, nsUri, child); + child->name, nsUri, child); + if (ctxt->err == XML_SCHEMAV_INTERNAL) + return (-1); /* * URGENT TODO: Could we anchor an error report * here to notify of invalid elements? @@ -16237,6 +19599,7 @@ xmlSchemaValidateElementByComplexType(xmlSchemaValidCtxtPtr ctxt, static int xmlSchemaValidateElementByType(xmlSchemaValidCtxtPtr ctxt, xmlSchemaTypePtr type, + int isNil, int valSimpleContent) { int ret; @@ -16276,14 +19639,14 @@ xmlSchemaValidateElementByType(xmlSchemaValidCtxtPtr ctxt, break; case XML_SCHEMA_TYPE_SIMPLE: ret = xmlSchemaValidateElementBySimpleType(ctxt, type, - valSimpleContent); + isNil, valSimpleContent); break; case XML_SCHEMA_TYPE_BASIC: if (type->builtInType == XML_SCHEMAS_ANYTYPE) ret = xmlSchemaValidateElementByAnyType(ctxt, type); else ret = xmlSchemaValidateElementBySimpleType(ctxt, type, - valSimpleContent); + isNil, valSimpleContent); break; default: ret = -1; @@ -16295,12 +19658,55 @@ xmlSchemaValidateElementByType(xmlSchemaValidCtxtPtr ctxt, return (ret); } +static int +xmlSchemaPostCreateVal(xmlSchemaValidCtxtPtr vctxt, + const xmlChar *value, + xmlSchemaValPtr *val) +{ + xmlSchemaTypePtr prim; + + if (val == NULL) { + xmlSchemaVErr(vctxt, vctxt->nodeInfo->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaPostCreateVal, " + "bad arguments", NULL, NULL); + return (-1); + } + /* + * Only string or anySimpleType values are expected to be post-created. + */ + prim = xmlSchemaGetPrimitiveType(vctxt->nodeInfo->typeDef); + if ((prim->builtInType == XML_SCHEMAS_STRING) || + (prim->builtInType == XML_SCHEMAS_ANYSIMPLETYPE)) + { +#if 0 + builtIn = xmlSchemaGetBuiltInTypeAncestor(vctxt->nodeInfo->typeDef); +#endif + if (value == NULL) + /* TODO: Can this happen at all? */ + *val = xmlSchemaNewStringValue(XML_SCHEMAS_STRING, + xmlStrdup(BAD_CAST "")); + else + *val = xmlSchemaNewStringValue(XML_SCHEMAS_STRING, value); + if ((*val) == NULL) { + xmlSchemaVErr(vctxt, vctxt->nodeInfo->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaPostCreateVal, " + "failed to create the value", NULL, NULL); + return (-1); + } + return (0); + } + xmlSchemaVErr(vctxt, vctxt->nodeInfo->node, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaPostCreateVal, " + "the given type is not supported", NULL, NULL); + return (-1); +} static int -xmlSchemaCheckAttrLocallyValid(xmlSchemaValidCtxtPtr ctxt, - xmlSchemaAttributePtr decl, - xmlSchemaAttrStatePtr state, - xmlAttrPtr attr) +xmlSchemaCheckAttrLocallyValid(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaAttrStatePtr state) { xmlChar *value; const xmlChar *defValue; @@ -16308,17 +19714,19 @@ xmlSchemaCheckAttrLocallyValid(xmlSchemaValidCtxtPtr ctxt, int fixed; int ret; - if (decl->subtypes == NULL) { + if (vctxt->attrInfo->typeDef == NULL) { state->state = XML_SCHEMAS_ATTR_TYPE_NOT_RESOLVED; return (XML_SCHEMAS_ATTR_TYPE_NOT_RESOLVED); } - value = xmlNodeListGetString(attr->doc, attr->children, 1); - ctxt->node = (xmlNodePtr) attr; - ctxt->cur = attr->children; + vctxt->node = vctxt->attrInfo->node; + vctxt->cur = vctxt->node->children; + /* STREAM */ + value = xmlNodeListGetString(vctxt->node->doc, vctxt->cur, 1); + /* * NOTE: This call also checks the content nodes for correct type. */ - ret = xmlSchemaValidateSimpleTypeValue(ctxt, decl->subtypes, + ret = xmlSchemaValidateSimpleTypeValue(vctxt, vctxt->attrInfo->typeDef, value, 1, 1, 1, 1); /* @@ -16336,31 +19744,66 @@ xmlSchemaCheckAttrLocallyValid(xmlSchemaValidCtxtPtr ctxt, */ } else if (ret == 0) { state->state = XML_SCHEMAS_ATTR_CHECKED; - if (xmlSchemaGetEffectiveValueConstraint(decl, + if (xmlSchemaGetEffectiveValueConstraint( + (xmlSchemaAttributePtr) vctxt->attrInfo->decl, &fixed, &defValue, &defVal) && (fixed == 1)) { + + int ws = xmlSchemaGetWhiteSpaceFacetValue( + vctxt->nodeInfo->typeDef); /* * cvc-au : Attribute Locally Valid (Use) * For an attribute information item to be·valid· * with respect to an attribute use its ·normalized * value· must match the canonical lexical representation - * of the attribute use's {value constraint} value, if it + * of the attribute use's {value constraint} value, if it * is present and fixed. + * + * TODO: Use somehow the *normalized* value and the *canonical* + * fixed value. This here compares the canonical values of both. + * The normalized value of, for example, a float type can differ + * from its canonical representation. This all means that a fixed + * value can only be OK, if it's present in the canonical form in + * the instance. + * NOTE: Since the value for string and anySimpleType is not always + * precomputed during validation, we need to do it now. */ - /* - * NOTE: the validation context holds in ctxt->value the - * precomputed value of the attribute; well for some types, - * fallback to string comparison if no computed value - * exists. - */ - if (((ctxt->value != NULL) && - (xmlSchemaCompareValues(ctxt->value, defVal) != 0)) || - ((ctxt->value == NULL) && - (! xmlStrEqual(defValue, BAD_CAST value)))) { - state->state = - XML_SCHEMAS_ATTR_INVALID_FIXED_VALUE; + if (vctxt->value == NULL) { + /* + * Post-create the value. + */ + if (xmlSchemaPostCreateVal(vctxt, value, &(vctxt->value)) == -1) { + ret = -1; + goto exit; + } + value = NULL; + } + if (defVal == NULL) { + xmlChar *str; + + /* + * Post-create the default/fixed value. + */ + if (defValue == NULL) + str = xmlStrdup(BAD_CAST ""); + else + str = xmlStrdup(defValue); + if (xmlSchemaPostCreateVal(vctxt, str, &defVal) == -1) { + ret = -1; + FREE_AND_NULL(str) + goto exit; + } + ((xmlSchemaAttributePtr) vctxt->attrInfo->decl)->defVal = defVal; + } + if (xmlSchemaCompareValuesWhtsp(vctxt->value, + (xmlSchemaWhitespaceValueType) ws, + defVal, + (xmlSchemaWhitespaceValueType) ws) != 0) + { + state->state = XML_SCHEMAS_ATTR_INVALID_FIXED_VALUE; } } - } + } +exit: if (value != NULL) { xmlFree(value); } @@ -16423,7 +19866,7 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche printf("attr use - name: %s\n", xmlSchemaGetAttrName(attrDecl)); printf("attr use - use: %d\n", attrDecl->occurs); #endif - for (curState = ctxt->attr; curState != NULL; curState = curState->next) { + for (curState = ctxt->attr; curState != NULL; curState = curState->next) { if (curState->decl == attrUse->attr) { #ifdef DEBUG_ATTR_VALIDATION @@ -16483,7 +19926,10 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche #endif found = 1; curState->decl = attrDecl; + curState->state = XML_SCHEMAS_ATTR_VALIDATE_VALUE; + /* ret = xmlSchemaCheckAttrLocallyValid(ctxt, attrDecl, curState, attr); + */ } if (!found) { if (attrDecl->occurs == XML_SCHEMAS_ATTR_USE_REQUIRED) { @@ -16499,7 +19945,7 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche if (tmp == NULL) { xmlSchemaVErrMemory(ctxt, "registering required attributes", NULL); ctxt->node = oldnode; - return (-1); + goto fatal_exit; } tmp->attr = NULL; tmp->state = XML_SCHEMAS_ATTR_MISSING; @@ -16526,7 +19972,7 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche xmlSchemaVErrMemory(ctxt, "registering schema specified attributes", NULL); ctxt->node = oldnode; - return (-1); + goto fatal_exit; } tmp->attr = NULL; tmp->state = XML_SCHEMAS_ATTR_DEFAULT; @@ -16618,25 +20064,117 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche curState->decl = attrDecl; if (attrDecl != NULL) { curState->decl = attrDecl; - ret = xmlSchemaCheckAttrLocallyValid(ctxt, attrDecl, curState, attr); + curState->state = XML_SCHEMAS_ATTR_VALIDATE_VALUE; + /* TODO + ret = xmlSchemaCheckAttrLocallyValid(ctxt, attrDecl, curState, attr); + */ } else if (type->attributeWildcard->processContents == XML_SCHEMAS_ANY_LAX) { curState->state = XML_SCHEMAS_ATTR_CHECKED; - } + } else + curState->state = XML_SCHEMAS_ATTR_WILD_NO_DECL; } else curState->state = XML_SCHEMAS_ATTR_CHECKED; - } + } } curState = curState->next; } - } - - /* - * Report missing and illegal attributes. - */ + } + if (ctxt->attr != NULL) { + int valueNeeded; + + /* + * Validate the value of the attribute. + */ + if (ctxt->value != NULL) { + xmlSchemaFreeValue(ctxt->value); + ctxt->value = NULL; + } curState = ctxt->attr; - while ((curState != NULL) && (curState != ctxt->attrTop->next)) { + while ((curState != NULL) && (curState != ctxt->attrTop->next)) { + valueNeeded = 0; + switch (curState->state) { + case XML_SCHEMAS_ATTR_VALIDATE_VALUE: + + /* + * Create an attribute info if needed. + */ + if (ctxt->attrInfo == NULL) { + ctxt->attrInfo = (xmlSchemaNodeInfoPtr) + xmlMalloc(sizeof(xmlSchemaNodeInfo)); + if (ctxt->attrInfo == NULL) { + xmlSchemaVErrMemory(ctxt, + "allocating an attribute info", NULL); + goto fatal_exit; + } + } + /* + * Init the attribute info. + */ + ctxt->attrInfo->flags = 0; + ctxt->attrInfo->node = (xmlNodePtr) curState->attr; + ctxt->attrInfo->decl = (xmlSchemaTypePtr) curState->decl; + ctxt->attrInfo->value = NULL; + if (curState->decl != NULL) + ctxt->attrInfo->typeDef = curState->decl->subtypes; + else + ctxt->attrInfo->typeDef = NULL; + if (curState->attr->ns != NULL) + ctxt->attrInfo->namespaceName = + curState->attr->ns->href; + else + ctxt->attrInfo->namespaceName = NULL; + ctxt->attrInfo->localName = curState->attr->name; + + ctxt->nodeInfo = ctxt->attrInfo; + +#ifdef IDC_ENABLED + /* + * Evaluate IDCs. + */ + if (ctxt->xpathStates != NULL) { + ret = xmlSchemaXPathEvaluate(ctxt, + XML_ATTRIBUTE_NODE); + if (ret == -1) + goto fatal_exit; + } + +#endif + ret = xmlSchemaCheckAttrLocallyValid(ctxt, curState); + if (ret == -1) + goto fatal_exit; + if ((ret != 0) && (ctxt->value != NULL)) { + xmlSchemaFreeValue(ctxt->value); + ctxt->value = NULL; + } + /* No break on purpose. */ + case XML_SCHEMAS_ATTR_CHECKED: +#ifdef IDC_ENABLED + if (ctxt->xpathStates != NULL) { + /* + * Evaluate IDCs. + */ + if (ctxt->value != NULL) { + ctxt->attrInfo->value = ctxt->value; + ctxt->value = NULL; + } + if (xmlSchemaXPathProcessHistory(ctxt, ctxt->depth +1) == -1) + goto fatal_exit; + } + break; +#endif + default: + break; + } + curState = curState->next; + } + + /* + * Report missing and illegal attributes. + */ + curState = ctxt->attr; + while ((curState != NULL) && (curState != ctxt->attrTop->next)) { if (curState->state != XML_SCHEMAS_ATTR_CHECKED) { attr = curState->attr; if (curState->decl != NULL) { @@ -16663,6 +20201,14 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche (xmlNodePtr) attr, (xmlSchemaTypePtr) attrDecl, "The value does not match the fixed value " "constraint", NULL); + } else if (curState->state == XML_SCHEMAS_ATTR_WILD_NO_DECL) { + xmlSchemaVWildcardErr(ctxt, + XML_SCHEMAV_CVC_WILDCARD, + (xmlNodePtr) attr, + type->attributeWildcard, + "No global attribute declaration found, but " + "stipulated by the strict processContents of " + "the wildcard"); } else if (curState->state == XML_SCHEMAS_ATTR_UNKNOWN) { /* TODO: "prohibited" won't ever be touched here!. (curState->state == XML_SCHEMAS_ATTR_PROHIBITED)) @@ -16687,122 +20233,196 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche /* * Add missing default/fixed attributes. */ - if (ctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { + if (defAttrStates != NULL) { curState = defAttrStates; + while (curState != NULL) { attrDecl = curState->decl; if (attrDecl->ref != NULL) attrDecl = attrDecl->refDecl; + +#ifdef IDC_ENABLED /* - * PSVI: Add a new attribute node to the current element. + * Evaluate IDCs on default attributes. */ - if (attrDecl->targetNamespace == NULL) { - xmlNewProp(elem, attrDecl->name, curState->value); - } else { - xmlNsPtr ns; - - ns = xmlSearchNsByHref(elem->doc, elem, - attrDecl->targetNamespace); - if (ns == NULL) { - xmlChar prefix[12]; - int counter = 1; - - attr = curState->attr; + if (ctxt->xpathStates != NULL) { + /* + * Create an attribute info if needed. + */ + if (ctxt->attrInfo == NULL) { + ctxt->attrInfo = (xmlSchemaNodeInfoPtr) + xmlMalloc(sizeof(xmlSchemaNodeInfo)); + if (ctxt->attrInfo == NULL) { + xmlSchemaVErrMemory(ctxt, + "allocating an attribute info", NULL); + goto fatal_exit; + } + ctxt->attrInfo->value = NULL; + } + /* + * Init the attribute info. + * TODO: Hmm, maby a bit oversized this all. + */ + ctxt->attrInfo->flags = 0; + ctxt->attrInfo->decl = (xmlSchemaTypePtr) attrDecl; + ctxt->attrInfo->node = NULL; + ctxt->attrInfo->typeDef = attrDecl->subtypes; + ctxt->attrInfo->namespaceName = attrDecl->targetNamespace; + ctxt->attrInfo->localName = attrDecl->name; + + ctxt->nodeInfo = ctxt->attrInfo; + + ret = xmlSchemaXPathEvaluate(ctxt, + XML_ATTRIBUTE_NODE); + if (ret == -1) + goto fatal_exit; + if (ctxt->attrInfo->value != NULL) { + xmlSchemaFreeValue(ctxt->attrInfo->value); + ctxt->attrInfo->value = NULL; + } + if (ret > 0) { /* - * Create a namespace declaration on the validation - * root node if no namespace declaration is in scope. - */ - snprintf((char *) prefix, sizeof(prefix), "p"); + * IDCs will consume the precomputed default value, + * so we need to clone it somehow. + */ /* - * This is somehow not performant, since the ancestor - * axis beyond @elem will be searched as well. + * string or anySimpleType does not create a precomputed value + * by default, so it will be created here on demand. + * TODO: default/fixed attributes are a bit unoptimized: + * the string value will be hold by ->defValue and inside + * the precomputed value. */ - ns = xmlSearchNs(elem->doc, elem, BAD_CAST prefix); - while (ns != NULL) { - if (counter > 1000) { - xmlSchemaVErr(ctxt, (xmlNodePtr) attr, - XML_SCHEMAV_INTERNAL, - "Internal error: xmlSchemaValidateAttributes, " - "could not compute a ns prefix for " - "default/fixed attribute '%s'.\n", - attrDecl->name, NULL); - - break; - } - snprintf((char *) prefix, - sizeof(prefix), "p%d", counter++); - ns = xmlSearchNs(elem->doc, elem, - BAD_CAST prefix); + if (attrDecl->defVal == NULL) { + xmlChar *str = xmlStrdup(attrDecl->defValue); + + if (xmlSchemaPostCreateVal(ctxt, + str, + &(attrDecl->defVal)) == -1) { + FREE_AND_NULL(str) + goto fatal_exit; + } } + ctxt->attrInfo->value = xmlSchemaCopyValue(attrDecl->defVal); + /* TODO: error on NULL return. */ + } + + if (xmlSchemaXPathProcessHistory(ctxt, ctxt->depth +1) == -1) + goto fatal_exit; + } +#endif + + if (ctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { + /* + * PSVI: Add a new attribute node to the current element. + */ + if (attrDecl->targetNamespace == NULL) { + xmlNewProp(elem, attrDecl->name, curState->value); + } else { + xmlNsPtr ns; + + ns = xmlSearchNsByHref(elem->doc, elem, + attrDecl->targetNamespace); if (ns == NULL) { - ns = xmlNewNs(ctxt->validationRoot, - attrDecl->targetNamespace, BAD_CAST prefix); + xmlChar prefix[12]; + int counter = 1; + + attr = curState->attr; + /* + * Create a namespace declaration on the validation + * root node if no namespace declaration is in scope. + */ + snprintf((char *) prefix, sizeof(prefix), "p"); + /* + * This is somehow not performant, since the ancestor + * axis beyond @elem will be searched as well. + */ + ns = xmlSearchNs(elem->doc, elem, BAD_CAST prefix); + while (ns != NULL) { + if (counter > 1000) { + xmlSchemaVErr(ctxt, (xmlNodePtr) attr, + XML_SCHEMAV_INTERNAL, + "Internal error: xmlSchemaValidateAttributes, " + "could not compute a ns prefix for " + "default/fixed attribute '%s'.\n", + attrDecl->name, NULL); + + break; + } + snprintf((char *) prefix, + sizeof(prefix), "p%d", counter++); + ns = xmlSearchNs(elem->doc, elem, + BAD_CAST prefix); + } + if (ns == NULL) { + ns = xmlNewNs(ctxt->validationRoot, + attrDecl->targetNamespace, BAD_CAST prefix); + xmlNewNsProp(elem, ns, attrDecl->name, + curState->value); + } + } else { xmlNewNsProp(elem, ns, attrDecl->name, curState->value); } - } else { - xmlNewNsProp(elem, ns, attrDecl->name, - curState->value); } } curState = curState->next; } } + ret = ctxt->err; + goto exit; + +fatal_exit: + ret = -1; + +exit: + if (defAttrStates != NULL) xmlSchemaFreeAttributeStates(defAttrStates); #ifdef DEBUG_ATTR_VALIDATION if (redundant) xmlGenericError(xmlGenericErrorContext, - "xmlSchemaValidateAttributes: redundant call by type: %s\n", - type->name); + "xmlSchemaValidateAttributes: redundant call by " + "type: %s\n", type->name); #endif + ctxt->nodeInfo = ctxt->elemInfos[ctxt->depth]; ctxt->node = oldnode; - return (ctxt->err); + return (ret); } /** - * xmlSchemaValidateElement: + * xmlSchemaStartValidation: * @ctxt: a schema validation context - * @elem: an element * - * Validate an element in a tree + * The starting point of the validation, called by + * xmlSchemaValidateDocument and xmlSchemaValidateOneElement. * * Returns 0 if the element is schemas valid, a positive error code * number otherwise and -1 in case of internal or API error. */ static int -xmlSchemaValidateElement(xmlSchemaValidCtxtPtr ctxt) +xmlSchemaStartValidation(xmlSchemaValidCtxtPtr ctxt) { xmlSchemaElementPtr elemDecl; int ret = 0; - /* - * This one is called by xmlSchemaValidateDocument and - * xmlSchemaValidateOneElement. - */ + ctxt->err = 0; + ctxt->nberrors = 0; if (ctxt->schema == NULL) { /* * No schema was specified at time of creation of the validation * context. Use xsi:schemaLocation and xsi:noNamespaceSchemaLocation * of the instance to build a schema. */ - if (ctxt->pctxt == NULL) - ctxt->pctxt = xmlSchemaNewParserCtxt("*"); if (ctxt->pctxt == NULL) - return (-1); + if (xmlSchemaCreatePCtxtOnVCtxt(ctxt) == -1) + return (-1); ctxt->schema = xmlSchemaNewSchema(ctxt->pctxt); if (ctxt->schema == NULL) return (-1); - /* TODO: assign user data. */ - ctxt->pctxt->error = ctxt->error; - ctxt->pctxt->warning = ctxt->warning; ctxt->xsiAssemble = 1; } else ctxt->xsiAssemble = 0; - /* ctxt->options |= XML_SCHEMA_VAL_VC_I_CREATE; - * ctxt->xsiAssemble = 1; - */ /* * Assemble new schemata using xsi. */ @@ -16834,7 +20454,17 @@ xmlSchemaValidateElement(xmlSchemaValidCtxtPtr ctxt) "No matching global declaration available", NULL); ret = XML_SCHEMAV_CVC_ELT_1; } else { + /* + * Augment the IDC definitions. + */ + if (ctxt->schema->idcDef != NULL) { + xmlHashScan(ctxt->schema->idcDef, + (xmlHashScanner) xmlSchemaAugmentIDC, ctxt); + } + ctxt->depth = -1; + xmlSchemaBeginElement(ctxt); ret = xmlSchemaValidateElementByDeclaration(ctxt, elemDecl); + xmlSchemaEndElement(ctxt); if (ret < 0) { xmlSchemaVCustomErr(ctxt, XML_SCHEMAV_INTERNAL, ctxt->node, NULL, @@ -16843,13 +20473,14 @@ xmlSchemaValidateElement(xmlSchemaValidCtxtPtr ctxt) } } } - /* ctxt->xsiAssemble = 0; */ + if (ctxt->xsiAssemble) { if (ctxt->schema != NULL) { xmlSchemaFree(ctxt->schema); ctxt->schema = NULL; } } + xmlSchemaClearValidCtxt(ctxt); return (ret); } @@ -16870,7 +20501,7 @@ xmlSchemaValidateOneElement(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem) if ((ctxt == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE)) return (-1); - if (ctxt->schema == NULL) { + if (ctxt->schema == NULL) { xmlSchemaVErr(ctxt, NULL, XML_SCHEMAV_INTERNAL, "API error: xmlSchemaValidateOneElement, " @@ -16879,46 +20510,9 @@ xmlSchemaValidateOneElement(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem) } ctxt->doc = elem->doc; - ctxt->err = 0; - ctxt->nberrors = 0; ctxt->node = elem; ctxt->validationRoot = elem; - return (xmlSchemaValidateElement(ctxt)); -} - -/** - * xmlSchemaValidateDocument: - * @ctxt: a schema validation context - * @doc: a parsed document tree - * @xsiAssemble: should schemata be added if requested by the instance? - * - * Validate a document tree in memory. - * - * Returns 0 if the document is schemas valid, a positive error code - * number otherwise and -1 in case of internal or API error. - */ -static int -xmlSchemaValidateDocument(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc) -{ - xmlNodePtr root; - - root = xmlDocGetRootElement(doc); - if (root == NULL) { - xmlSchemaVCustomErr(ctxt, - XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, - (xmlNodePtr) doc, NULL, - "The document has no document element", NULL); - return (ctxt->err); - } - /* ctxt->options |= XML_SCHEMA_VAL_XSI_ASSEMBLE; */ - /* - * Okay, start the recursive validation - */ - ctxt->node = root; - ctxt->validationRoot = root; - xmlSchemaValidateElement(ctxt); - - return (ctxt->err); + return (xmlSchemaStartValidation(ctxt)); } /************************************************************************ @@ -16937,7 +20531,7 @@ xmlSchemaValidateDocument(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc) * xmlSchemaNewValidCtxt: * @schema: a precompiled XML Schemas * - * Create an XML Schemas validation context based on the given schema + * Create an XML Schemas validation context based on the given schema. * * Returns the validation context or NULL in case of error */ @@ -16953,12 +20547,93 @@ xmlSchemaNewValidCtxt(xmlSchemaPtr schema) } memset(ret, 0, sizeof(xmlSchemaValidCtxt)); ret->schema = schema; - ret->attrTop = NULL; - ret->attr = NULL; return (ret); } /** + * xmlSchemaClearValidCtxt: + * @ctxt: the schema validation context + * + * Free the resources associated to the schema validation context; + * leaves some fields alive intended for reuse of the context. + */ +static void +xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) +{ + if (vctxt == NULL) + return; + + vctxt->validationRoot = NULL; + if (vctxt->attr != NULL) { + xmlSchemaFreeAttributeStates(vctxt->attr); + vctxt->attr = NULL; + } + if (vctxt->value != NULL) { + xmlSchemaFreeValue(vctxt->value); + vctxt->value = NULL; + } + /* + * Augmented IDC information. + */ + if (vctxt->aidcs != NULL) { + xmlSchemaIDCAugPtr cur = vctxt->aidcs, next; + do { + next = cur->next; + xmlFree(cur); + cur = next; + } while (cur != NULL); + vctxt->aidcs = NULL; + } + if (vctxt->idcNodes != NULL) { + int i; + xmlSchemaPSVIIDCNodePtr item; + + for (i = 0; i < vctxt->nbIdcNodes; i++) { + item = vctxt->idcNodes[i]; + xmlFree(item->keys); + xmlFree(item); + } + xmlFree(vctxt->idcNodes); + vctxt->idcNodes = NULL; + } + /* + * Note that we won't delete the XPath state pool here. + */ + if (vctxt->xpathStates != NULL) { + xmlSchemaFreeIDCStateObjList(vctxt->xpathStates); + vctxt->xpathStates = NULL; + } + if (vctxt->attrInfo != NULL) { + if (vctxt->attrInfo->value != NULL) { + xmlSchemaFreeValue(vctxt->attrInfo->value); + } + memset(vctxt->attrInfo, 0, sizeof(xmlSchemaNodeInfo)); + } + if (vctxt->elemInfos != NULL) { + int i; + xmlSchemaNodeInfoPtr info; + + for (i = 0; i < vctxt->sizeElemInfos; i++) { + info = vctxt->elemInfos[i]; + if (info == NULL) + break; + if (info->value != NULL) { + xmlSchemaFreeValue(info->value); + info->value = NULL; + } + if (info->idcMatchers != NULL) { + xmlSchemaIDCFreeMatcherList(info->idcMatchers); + info->idcMatchers = NULL; + } + if (info->idcTable != NULL) { + xmlSchemaIDCFreeIDCTable(info->idcTable); + info->idcTable = NULL; + } + } + } +} + +/** * xmlSchemaFreeValidCtxt: * @ctxt: the schema validation context * @@ -16973,8 +20648,72 @@ xmlSchemaFreeValidCtxt(xmlSchemaValidCtxtPtr ctxt) xmlSchemaFreeAttributeStates(ctxt->attr); if (ctxt->value != NULL) xmlSchemaFreeValue(ctxt->value); - if (ctxt->pctxt != NULL) { + if (ctxt->pctxt != NULL) xmlSchemaFreeParserCtxt(ctxt->pctxt); + if (ctxt->idcNodes != NULL) { + int i; + xmlSchemaPSVIIDCNodePtr item; + + for (i = 0; i < ctxt->nbIdcNodes; i++) { + item = ctxt->idcNodes[i]; + xmlFree(item->keys); + xmlFree(item); + } + xmlFree(ctxt->idcNodes); + } + if (ctxt->idcKeys != NULL) { + int i; + for (i = 0; i < ctxt->nbIdcKeys; i++) + xmlSchemaIDCFreeKey(ctxt->idcKeys[i]); + xmlFree(ctxt->idcKeys); + } + + if (ctxt->xpathStates != NULL) + xmlSchemaFreeIDCStateObjList(ctxt->xpathStates); + if (ctxt->xpathStatePool != NULL) + xmlSchemaFreeIDCStateObjList(ctxt->xpathStatePool); + + /* + * Augmented IDC information. + */ + if (ctxt->aidcs != NULL) { + xmlSchemaIDCAugPtr cur = ctxt->aidcs, next; + do { + next = cur->next; + xmlFree(cur); + cur = next; + } while (cur != NULL); + } + if (ctxt->attrInfo != NULL) { + if (ctxt->attrInfo->value != NULL) + xmlSchemaFreeValue(ctxt->attrInfo->value); + xmlFree(ctxt->attrInfo); + } + if (ctxt->elemInfos != NULL) { + int i; + xmlSchemaNodeInfoPtr info; + + for (i = 0; i < ctxt->sizeElemInfos; i++) { + info = ctxt->elemInfos[i]; + if (info == NULL) + break; + if (info->value != NULL) + xmlSchemaFreeValue(info->value); + if (info->idcMatchers != NULL) + xmlSchemaIDCFreeMatcherList(info->idcMatchers); + if (info->idcTable != NULL) + xmlSchemaIDCFreeIDCTable(info->idcTable); + /* + * TODO: Don't know if those will have to be freed if in streaming + * mode. + * + * xmlFree(info->localName); + * if (info->namespaceName != NULL) + * xmlFree(info->namespaceName); + */ + xmlFree(info); + } + xmlFree(ctxt->elemInfos); } xmlFree(ctxt); } @@ -17100,28 +20839,22 @@ xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt) int xmlSchemaValidateDoc(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc) { - int ret; - if ((ctxt == NULL) || (doc == NULL)) return (-1); - ctxt->doc = doc; - ctxt->err = 0; - ctxt->nberrors = 0; - - /* - if (ctxt->schema == NULL) { - xmlSchemaVErr(ctxt, NULL, - XML_SCHEMAV_INTERNAL, - "API error: xmlSchemaValidateDoc, " - "no schema specified and assembling of schemata " - "using xsi:schemaLocation and xsi:noNamespaceSchemaLocation " - "is not enabled.\n", NULL, NULL); - return (-1); - } - */ - ret = xmlSchemaValidateDocument(ctxt, doc); - return (ret); + ctxt->doc = doc; + ctxt->node = xmlDocGetRootElement(doc); + if (ctxt->node == NULL) { + xmlSchemaVCustomErr(ctxt, + XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, + (xmlNodePtr) doc, NULL, + "The document has no document element", NULL); + return (ctxt->err); + } + ctxt->validationRoot = ctxt->node; + xmlSchemaStartValidation(ctxt); + + return (ctxt->err); } /** diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 3ff8acf..a1cdf7f 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -45,12 +45,10 @@ extern double xmlXPathNINF; #define XML_SCHEMAS_NAMESPACE_NAME \ (const xmlChar *)"http://www.w3.org/2001/XMLSchema" +#define IS_WSP_REPLACE_CH(c) ((((c) == 0x9) || ((c) == 0xa)) || \ + ((c) == 0xd)) -static unsigned long powten[10] = { - 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000L, - 100000000L, 1000000000L -}; - +#define IS_WSP_SPACE_CH(c) ((c) == 0x20) /* Date value */ typedef struct _xmlSchemaValDate xmlSchemaValDate; @@ -677,6 +675,61 @@ xmlSchemaNewValue(xmlSchemaValType type) { } /** + * xmlSchemaNewStringValue: + * @type: the value type + * @value: the value + * + * Allocate a new simple type value. The type can be + * of XML_SCHEMAS_STRING. + * WARNING: This one is intended to be expanded for other + * string based types. We need this for anySimpleType as well. + * + * Returns a pointer to the new value or NULL in case of error + */ +xmlSchemaValPtr +xmlSchemaNewStringValue(xmlSchemaValType type, + const xmlChar *value) +{ + xmlSchemaValPtr val; + + if (type != XML_SCHEMAS_STRING) + return(NULL); + val = (xmlSchemaValPtr) xmlMalloc(sizeof(xmlSchemaVal)); + if (val == NULL) { + return(NULL); + } + memset(val, 0, sizeof(xmlSchemaVal)); + val->type = type; + val->value.str = (xmlChar *) value; + return(val); +} + +/** + * xmlSchemaNewNOTATIONValue: + * @name: the notation name + * @ns: the notation namespace name or NULL + * + * Allocate a new NOTATION value. + * + * Returns a pointer to the new value or NULL in case of error + */ +xmlSchemaValPtr +xmlSchemaNewNOTATIONValue(const xmlChar *name, + const xmlChar *ns) +{ + xmlSchemaValPtr val; + + val = xmlSchemaNewValue(XML_SCHEMAS_NOTATION); + if (val == NULL) + return (NULL); + + val->value.qname.name = (xmlChar *)name; + if (ns != NULL) + val->value.qname.uri = (xmlChar *)ns; + return(val); +} + +/** * xmlSchemaFreeValue: * @value: the value to free * @@ -699,12 +752,12 @@ xmlSchemaFreeValue(xmlSchemaValPtr value) { case XML_SCHEMAS_IDREF: case XML_SCHEMAS_IDREFS: case XML_SCHEMAS_ENTITY: - case XML_SCHEMAS_ENTITIES: - case XML_SCHEMAS_NOTATION: + case XML_SCHEMAS_ENTITIES: case XML_SCHEMAS_ANYURI: if (value->value.str != NULL) xmlFree(value->value.str); break; + case XML_SCHEMAS_NOTATION: case XML_SCHEMAS_QNAME: if (value->value.qname.uri != NULL) xmlFree(value->value.qname.uri); @@ -1830,42 +1883,76 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, goto return0; } case XML_SCHEMAS_DECIMAL:{ - const xmlChar *cur = value, *tmp; - unsigned int frac = 0, len, neg = 0; - unsigned long base = 0; + const xmlChar *cur = value; + unsigned int len, neg = 0; + xmlChar cval[25]; + xmlChar *cptr = cval; + int dec = -1; if (cur == NULL) goto return1; + /* First we handle an optional sign */ if (*cur == '+') cur++; else if (*cur == '-') { neg = 1; cur++; } - tmp = cur; - while ((*cur >= '0') && (*cur <= '9')) { - base = base * 10 + (*cur - '0'); - cur++; - } - len = cur - tmp; - if (*cur == '.') { - cur++; - tmp = cur; - while ((*cur >= '0') && (*cur <= '9')) { - base = base * 10 + (*cur - '0'); - cur++; - } - frac = cur - tmp; - } - if (*cur != 0) - goto return1; + /* + * Next we "pre-parse" the number, in preparation for calling + * the common routine xmlSchemaParseUInt. We get rid of any + * leading zeroes (because we have reserved only 25 chars), + * and note the position of any decimal point. + */ + len = 0; + while (len < 24) { + if ((*cur >= '0') && (*cur <= '9')) { + *cptr++ = *cur; + len++; + } else if (*cur == '.') { + if (dec != -1) + goto return1; /* multiple decimal points */ + if (!len) { /* num starts with '.' */ + *cptr++ = '0'; + len++; + } + dec = len++; + } else + break; + cur++; + } + if (*cur != 0) + goto return1; /* error if any extraneous chars */ + if (val != NULL) { v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL); if (v != NULL) { - v->value.decimal.lo = base; + /* + * If a mixed decimal, get rid of trailing zeroes + */ + if (dec) { + while ((cptr > cval) && (*(cptr-1) == '0')) { + cptr--; + len--; + } + } + *cptr = 0; /* Terminate our (preparsed) string */ + cptr = cval; + /* + * Now evaluate the significant digits of the number + */ + xmlSchemaParseUInt((const xmlChar **)&cptr, + &v->value.decimal.lo, + &v->value.decimal.mi, + &v->value.decimal.hi); v->value.decimal.sign = neg; - v->value.decimal.frac = frac; - v->value.decimal.total = frac + len; + if (dec == -1) { + v->value.decimal.frac = 0; + v->value.decimal.total = len; + } else { + v->value.decimal.frac = len - dec - 1; + v->value.decimal.total = len - 1; + } *val = v; } } @@ -2210,7 +2297,11 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, case XML_SCHEMAS_IDREF: ret = xmlValidateNCName(value, 1); if ((ret == 0) && (val != NULL)) { - TODO; + v = xmlSchemaNewValue(XML_SCHEMAS_IDREF); + if (v == NULL) + goto error; + v->value.str = xmlStrdup(value); + *val = v; } if ((ret == 0) && (node != NULL) && (node->type == XML_ATTRIBUTE_NODE)) { @@ -2815,59 +2906,106 @@ static int xmlSchemaCompareDecimals(xmlSchemaValPtr x, xmlSchemaValPtr y) { xmlSchemaValPtr swp; - int order = 1, p; - unsigned long tmp; + int order = 1, integx, integy, dlen; + unsigned long hi, mi, lo; + /* + * First test: If x is -ve and not zero + */ if ((x->value.decimal.sign) && ((x->value.decimal.lo != 0) || (x->value.decimal.mi != 0) || (x->value.decimal.hi != 0))) { + /* + * Then if y is -ve and not zero reverse the compare + */ if ((y->value.decimal.sign) && ((y->value.decimal.lo != 0) || (y->value.decimal.mi != 0) || (y->value.decimal.hi != 0))) order = -1; + /* + * Otherwise (y >= 0) we have the answer + */ else return (-1); + /* + * If x is not -ve and y is -ve we have the answer + */ } else if ((y->value.decimal.sign) && ((y->value.decimal.lo != 0) || (y->value.decimal.mi != 0) || (y->value.decimal.hi != 0))) { return (1); } - if (x->value.decimal.frac == y->value.decimal.frac) { - if (x->value.decimal.hi < y->value.decimal.hi) - return (-order); - if (x->value.decimal.hi > y->value.decimal.hi) - return (order); - if (x->value.decimal.mi < y->value.decimal.mi) - return (-order); - if (x->value.decimal.mi > y->value.decimal.mi) - return (order); - if (x->value.decimal.lo < y->value.decimal.lo) - return (-order); - if (x->value.decimal.lo > y->value.decimal.lo) - return(order); - return(0); + /* + * If it's not simply determined by a difference in sign, + * then we need to compare the actual values of the two nums. + * To do this, we start by looking at the integral parts. + * If the number of integral digits differ, then we have our + * answer. + */ + integx = x->value.decimal.total - x->value.decimal.frac; + integy = y->value.decimal.total - y->value.decimal.frac; + if (integx > integy) + return order; + else if (integy > integx) + return -order; + /* + * If the number of integral digits is the same for both numbers, + * then things get a little more complicated. We need to "normalize" + * the numbers in order to properly compare them. To do this, we + * look at the total length of each number (length => number of + * significant digits), and divide the "shorter" by 10 (decreasing + * the length) until they are of equal length. + */ + dlen = x->value.decimal.total - y->value.decimal.total; + if (dlen < 0) { /* y has more digits than x */ + swp = x; + hi = y->value.decimal.hi; + mi = y->value.decimal.mi; + lo = y->value.decimal.lo; + dlen = -dlen; + order = -order; + } else { /* x has more digits than y */ + swp = y; + hi = x->value.decimal.hi; + mi = x->value.decimal.mi; + lo = x->value.decimal.lo; + } + while (dlen > 8) { /* in effect, right shift by 10**8 */ + lo = mi; + mi = hi; + hi = 0; + dlen -= 8; } - if (y->value.decimal.frac > x->value.decimal.frac) { - swp = y; - y = x; - x = swp; - order = -order; + while (dlen > 0) { + unsigned long rem1, rem2; + rem1 = (hi % 10) * 100000000L; + hi = hi / 10; + rem2 = (mi % 10) * 100000000L; + mi = (mi + rem1) / 10; + lo = (lo + rem2) / 10; + dlen--; } - p = powten[x->value.decimal.frac - y->value.decimal.frac]; - tmp = x->value.decimal.lo / p; - if (tmp > y->value.decimal.lo) - return (order); - if (tmp < y->value.decimal.lo) - return (-order); - tmp = y->value.decimal.lo * p; - if (x->value.decimal.lo < tmp) - return (-order); - if (x->value.decimal.lo == tmp) - return (0); - return (order); + if (hi > swp->value.decimal.hi) { + return order; + } else if (hi == swp->value.decimal.hi) { + if (mi > swp->value.decimal.mi) { + return order; + } else if (mi == swp->value.decimal.mi) { + if (lo > swp->value.decimal.lo) { + return order; + } else if (lo == swp->value.decimal.lo) { + if (x->value.decimal.total == y->value.decimal.total) { + return 0; + } else { + return order; + } + } + } + } + return -order; } /** @@ -2989,6 +3127,73 @@ xmlSchemaDupVal (xmlSchemaValPtr v) } /** + * xmlSchemaCopyValue: + * @val: the precomputed value to be copied + * + * Copies the precomputed value. This duplicates any string within. + * + * Returns the copy or NULL if a copy for a data-type is not implemented. + */ +xmlSchemaValPtr +xmlSchemaCopyValue(xmlSchemaValPtr val) +{ + xmlSchemaValPtr ret; + + if (val == NULL) + return (NULL); + /* + * Copy the string values. + */ + switch (val->type) { + case XML_SCHEMAS_IDREFS: + case XML_SCHEMAS_ENTITIES: + case XML_SCHEMAS_NMTOKENS: + case XML_SCHEMAS_ANYTYPE: + case XML_SCHEMAS_ANYSIMPLETYPE: + return (NULL); + case XML_SCHEMAS_STRING: + case XML_SCHEMAS_NORMSTRING: + case XML_SCHEMAS_TOKEN: + case XML_SCHEMAS_LANGUAGE: + case XML_SCHEMAS_NAME: + case XML_SCHEMAS_NCNAME: + case XML_SCHEMAS_ID: + case XML_SCHEMAS_IDREF: + case XML_SCHEMAS_ENTITY: + case XML_SCHEMAS_NMTOKEN: + case XML_SCHEMAS_ANYURI: + ret = xmlSchemaDupVal(val); + if (val->value.str != NULL) + ret->value.str = xmlStrdup(BAD_CAST val->value.str); + return (ret); + case XML_SCHEMAS_QNAME: + case XML_SCHEMAS_NOTATION: + ret = xmlSchemaDupVal(val); + if (val->value.qname.name != NULL) + ret->value.qname.name = + xmlStrdup(BAD_CAST val->value.qname.name); + if (val->value.qname.uri != NULL) + ret->value.qname.uri = + xmlStrdup(BAD_CAST val->value.qname.uri); + return (ret); + case XML_SCHEMAS_HEXBINARY: + ret = xmlSchemaDupVal(val); + if (val->value.hex.str != NULL) + ret->value.hex.str = xmlStrdup(BAD_CAST val->value.hex.str); + return (ret); + case XML_SCHEMAS_BASE64BINARY: + ret = xmlSchemaDupVal(val); + if (val->value.base64.str != NULL) + ret->value.base64.str = + xmlStrdup(BAD_CAST val->value.base64.str); + return (ret); + default: + return (xmlSchemaDupVal(val)); + } + return (NULL); +} + +/** * _xmlSchemaDateAdd: * @dt: an #xmlSchemaValPtr * @dur: an #xmlSchemaValPtr of type #XS_DURATION @@ -3478,6 +3683,333 @@ xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y) } /** + * xmlSchemaComparePreserveReplaceStrings: + * @x: a first string value + * @y: a second string value + * @invert: inverts the result if x < y or x > y. + * + * Compare 2 string for their normalized values. + * @x is a string with whitespace of "preserve", @y is + * a string with a whitespace of "replace". I.e. @x could + * be an "xsd:string" and @y an "xsd:normalizedString". + * + * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in + * case of error + */ +static int +xmlSchemaComparePreserveReplaceStrings(xmlSchemaValPtr x, xmlSchemaValPtr y, + int invert) +{ + const xmlChar *utf1; + const xmlChar *utf2; + int tmp; + + if ((x == NULL) || (y == NULL)) + return(-2); + utf1 = x->value.str; + utf2 = y->value.str; + + while ((*utf1 != 0) && (*utf2 != 0)) { + if (IS_WSP_REPLACE_CH(*utf2)) { + if (! IS_WSP_SPACE_CH(*utf1)) { + if ((*utf1 - 0x20) < 0) { + if (invert) + return(1); + else + return(-1); + } else { + if (invert) + return(-1); + else + return(1); + } + } + } else { + tmp = *utf1 - *utf2; + if (tmp < 0) { + if (invert) + return(1); + else + return(-1); + } + if (tmp > 0) { + if (invert) + return(-1); + else + return(1); + } + } + utf1++; + utf2++; + } + if (*utf1 != 0) { + if (invert) + return(-1); + else + return(1); + } + if (*utf2 != 0) { + if (invert) + return(1); + else + return(-1); + } + return(0); +} + +/** + * xmlSchemaComparePreserveCollapseStrings: + * @x: a first string value + * @y: a second string value + * + * Compare 2 string for their normalized values. + * @x is a string with whitespace of "preserve", @y is + * a string with a whitespace of "collapse". I.e. @x could + * be an "xsd:string" and @y an "xsd:normalizedString". + * + * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in + * case of error + */ +static int +xmlSchemaComparePreserveCollapseStrings(xmlSchemaValPtr x, xmlSchemaValPtr y, + int invert) +{ + const xmlChar *utf1; + const xmlChar *utf2; + int tmp; + + if ((x == NULL) || (y == NULL)) + return(-2); + utf1 = x->value.str; + utf2 = y->value.str; + + /* + * Skip leading blank chars of the collapsed string. + */ + while (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) + utf2++; + + while ((*utf1 != 0) && (*utf2 != 0)) { + if (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) { + if (! IS_WSP_SPACE_CH(*utf1)) { + /* + * The utf2 character would have been replaced to 0x20. + */ + if ((*utf1 - 0x20) < 0) { + if (invert) + return(1); + else + return(-1); + } else { + if (invert) + return(-1); + else + return(1); + } + } + utf1++; + utf2++; + /* + * Skip contiguous blank chars of the collapsed string. + */ + while (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) + utf2++; + } else { + tmp = *utf1++ - *utf2++; + if (tmp < 0) { + if (invert) + return(1); + else + return(-1); + } + if (tmp > 0) { + if (invert) + return(-1); + else + return(1); + } + } + } + if (*utf1 != 0) { + if (invert) + return(-1); + else + return(1); + } + if (*utf2 != 0) { + /* + * Skip trailing blank chars of the collapsed string. + */ + while (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) + utf2++; + if (*utf2 != 0) { + if (invert) + return(1); + else + return(-1); + } + } + return(0); +} + +/** + * xmlSchemaComparePreserveCollapseStrings: + * @x: a first string value + * @y: a second string value + * + * Compare 2 string for their normalized values. + * @x is a string with whitespace of "preserve", @y is + * a string with a whitespace of "collapse". I.e. @x could + * be an "xsd:string" and @y an "xsd:normalizedString". + * + * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in + * case of error + */ +static int +xmlSchemaCompareReplaceCollapseStrings(xmlSchemaValPtr x, xmlSchemaValPtr y, + int invert) +{ + const xmlChar *utf1; + const xmlChar *utf2; + int tmp; + + if ((x == NULL) || (y == NULL)) + return(-2); + utf1 = x->value.str; + utf2 = y->value.str; + + /* + * Skip leading blank chars of the collapsed string. + */ + while (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) + utf2++; + + while ((*utf1 != 0) && (*utf2 != 0)) { + if (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) { + if (! (IS_WSP_SPACE_CH(*utf1) || IS_WSP_REPLACE_CH(*utf1))) { + /* + * The utf2 character would have been replaced to 0x20. + */ + if ((*utf1 - 0x20) < 0) { + if (invert) + return(1); + else + return(-1); + } else { + if (invert) + return(-1); + else + return(1); + } + } + utf1++; + utf2++; + /* + * Skip contiguous blank chars of the collapsed string. + */ + while (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) + utf2++; + } else { + if (IS_WSP_SPACE_CH(*utf1) || IS_WSP_REPLACE_CH(*utf1)) { + /* + * The utf1 character would have been replaced to 0x20. + */ + if ((0x20 - *utf2) < 0) { + if (invert) + return(1); + else + return(-1); + } else { + if (invert) + return(-1); + else + return(1); + } + } + tmp = *utf1++ - *utf2++; + if (tmp < 0) + return(-1); + if (tmp > 0) + return(1); + } + } + if (*utf1 != 0) { + if (invert) + return(-1); + else + return(1); + } + if (*utf2 != 0) { + /* + * Skip trailing blank chars of the collapsed string. + */ + while (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) + utf2++; + if (*utf2 != 0) { + if (invert) + return(1); + else + return(-1); + } + } + return(0); +} + + +/** + * xmlSchemaCompareReplacedStrings: + * @x: a first string value + * @y: a second string value + * + * Compare 2 string for their normalized values. + * + * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in + * case of error + */ +static int +xmlSchemaCompareReplacedStrings(xmlSchemaValPtr x, xmlSchemaValPtr y) +{ + const xmlChar *utf1; + const xmlChar *utf2; + int tmp; + + if ((x == NULL) || (y == NULL)) + return(-2); + utf1 = x->value.str; + utf2 = y->value.str; + + while ((*utf1 != 0) && (*utf2 != 0)) { + if (IS_WSP_SPACE_CH(*utf2) || IS_WSP_REPLACE_CH(*utf2)) { + if (! (IS_WSP_SPACE_CH(*utf1) || IS_WSP_REPLACE_CH(*utf1))) { + if ((*utf1 - 0x20) < 0) + return(-1); + else + return(1); + } + } else { + if (IS_WSP_SPACE_CH(*utf1) || IS_WSP_REPLACE_CH(*utf1)) { + if ((0x20 - *utf2) < 0) + return(-1); + else + return(1); + } + tmp = *utf1 - *utf2; + if (tmp < 0) + return(-1); + if (tmp > 0) + return(1); + } + utf1++; + utf2++; + } + if (*utf1 != 0) + return(1); + if (*utf2 != 0) + return(-1); + return(0); +} + +/** * xmlSchemaCompareNormStrings: * @x: a first string value * @y: a second string value @@ -3605,22 +4137,26 @@ xmlSchemaCompareFloats(xmlSchemaValPtr x, xmlSchemaValPtr y) { /** * xmlSchemaCompareValues: * @x: a first value + * @xwtsp: the whitespace type * @y: a second value + * @ywtsp: the whitespace type * * Compare 2 values * * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in * case of error */ -int -xmlSchemaCompareValues(xmlSchemaValPtr x, xmlSchemaValPtr y) { +static int +xmlSchemaCompareValuesInternal(xmlSchemaValPtr x, + xmlSchemaWhitespaceValueType xws, + xmlSchemaValPtr y, + xmlSchemaWhitespaceValueType yws) { if ((x == NULL) || (y == NULL)) return(-2); switch (x->type) { case XML_SCHEMAS_UNKNOWN: case XML_SCHEMAS_ANYTYPE: - case XML_SCHEMAS_ANYSIMPLETYPE: return(-2); case XML_SCHEMAS_INTEGER: case XML_SCHEMAS_NPINTEGER: @@ -3676,7 +4212,13 @@ xmlSchemaCompareValues(xmlSchemaValPtr x, xmlSchemaValPtr y) { (y->type == XML_SCHEMAS_GYEARMONTH)) return (xmlSchemaCompareDates(x, y)); return (-2); - case XML_SCHEMAS_NORMSTRING: + /* + * Note that we will support comparison of string types against + * anySimpleType as well. + */ + case XML_SCHEMAS_ANYSIMPLETYPE: + case XML_SCHEMAS_STRING: + case XML_SCHEMAS_NORMSTRING: case XML_SCHEMAS_TOKEN: case XML_SCHEMAS_LANGUAGE: case XML_SCHEMAS_NMTOKEN: @@ -3687,19 +4229,61 @@ xmlSchemaCompareValues(xmlSchemaValPtr x, xmlSchemaValPtr y) { case XML_SCHEMAS_ENTITY: case XML_SCHEMAS_NOTATION: case XML_SCHEMAS_ANYURI: - if ((y->type == XML_SCHEMAS_NORMSTRING) || + /* + * TODO: Compare those against QName. + */ + if (y->type == XML_SCHEMAS_QNAME) { + TODO + return (-2); + } + if ((y->type == XML_SCHEMAS_ANYSIMPLETYPE) || + (y->type == XML_SCHEMAS_STRING) || + (y->type == XML_SCHEMAS_NORMSTRING) || (y->type == XML_SCHEMAS_TOKEN) || (y->type == XML_SCHEMAS_LANGUAGE) || (y->type == XML_SCHEMAS_NMTOKEN) || (y->type == XML_SCHEMAS_NAME) || - (y->type == XML_SCHEMAS_QNAME) || (y->type == XML_SCHEMAS_NCNAME) || (y->type == XML_SCHEMAS_ID) || (y->type == XML_SCHEMAS_IDREF) || (y->type == XML_SCHEMAS_ENTITY) || (y->type == XML_SCHEMAS_NOTATION) || - (y->type == XML_SCHEMAS_ANYURI)) - return (xmlSchemaCompareNormStrings(x, y)); + (y->type == XML_SCHEMAS_ANYURI)) { + + if (xws == XML_SCHEMA_WHITESPACE_PRESERVE) { + + if (yws == XML_SCHEMA_WHITESPACE_PRESERVE) { + /* TODO: What about x < y or x > y. */ + if (xmlStrEqual(x->value.str, y->value.str)) + return (0); + else + return (2); + } else if (yws == XML_SCHEMA_WHITESPACE_REPLACE) + return (xmlSchemaComparePreserveReplaceStrings(x, y, 0)); + else if (yws == XML_SCHEMA_WHITESPACE_COLLAPSE) + return (xmlSchemaComparePreserveCollapseStrings(x, y, 0)); + + } else if (xws == XML_SCHEMA_WHITESPACE_REPLACE) { + + if (yws == XML_SCHEMA_WHITESPACE_PRESERVE) + return (xmlSchemaComparePreserveReplaceStrings(y, x, 1)); + if (yws == XML_SCHEMA_WHITESPACE_REPLACE) + return (xmlSchemaCompareReplacedStrings(x, y)); + if (yws == XML_SCHEMA_WHITESPACE_COLLAPSE) + return (xmlSchemaCompareReplaceCollapseStrings(x, y, 0)); + + } else if (xws == XML_SCHEMA_WHITESPACE_COLLAPSE) { + + if (yws == XML_SCHEMA_WHITESPACE_PRESERVE) + return (xmlSchemaComparePreserveCollapseStrings(y, x, 1)); + if (yws == XML_SCHEMA_WHITESPACE_REPLACE) + return (xmlSchemaCompareReplaceCollapseStrings(y, x, 1)); + if (yws == XML_SCHEMA_WHITESPACE_COLLAPSE) + return (xmlSchemaCompareNormStrings(x, y)); + } else + return (-2); + + } return (-2); case XML_SCHEMAS_QNAME: if (y->type == XML_SCHEMAS_QNAME) { @@ -3754,8 +4338,7 @@ xmlSchemaCompareValues(xmlSchemaValPtr x, xmlSchemaValPtr y) { else return(-1); } - return (-2); - case XML_SCHEMAS_STRING: + return (-2); case XML_SCHEMAS_IDREFS: case XML_SCHEMAS_ENTITIES: case XML_SCHEMAS_NMTOKENS: @@ -3766,6 +4349,59 @@ xmlSchemaCompareValues(xmlSchemaValPtr x, xmlSchemaValPtr y) { } /** + * xmlSchemaCompareValues: + * @x: a first value + * @y: a second value + * + * Compare 2 values + * + * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in + * case of error + */ +int +xmlSchemaCompareValues(xmlSchemaValPtr x, xmlSchemaValPtr y) { + xmlSchemaWhitespaceValueType xws, yws; + + if ((x == NULL) || (y == NULL)) + return(-2); + if (x->type == XML_SCHEMAS_STRING) + xws = XML_SCHEMA_WHITESPACE_PRESERVE; + else if (x->type == XML_SCHEMAS_NORMSTRING) + xws = XML_SCHEMA_WHITESPACE_REPLACE; + else + xws = XML_SCHEMA_WHITESPACE_COLLAPSE; + + if (y->type == XML_SCHEMAS_STRING) + yws = XML_SCHEMA_WHITESPACE_PRESERVE; + else if (x->type == XML_SCHEMAS_NORMSTRING) + yws = XML_SCHEMA_WHITESPACE_REPLACE; + else + yws = XML_SCHEMA_WHITESPACE_COLLAPSE; + + return(xmlSchemaCompareValuesInternal(x, xws, y, yws)); +} + +/** + * xmlSchemaCompareValuesWhtsp: + * @x: a first value + * @xws: the whitespace value of x + * @y: a second value + * @yws: the whitespace value of y + * + * Compare 2 values + * + * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in + * case of error + */ +int +xmlSchemaCompareValuesWhtsp(xmlSchemaValPtr x, + xmlSchemaWhitespaceValueType xws, + xmlSchemaValPtr y, + xmlSchemaWhitespaceValueType yws) { + return(xmlSchemaCompareValuesInternal(x, xws, y, yws)); +} + +/** * xmlSchemaNormLen: * @value: a string * @@ -4138,4 +4774,50 @@ xmlSchemaValidateFacet(xmlSchemaTypePtr base ATTRIBUTE_UNUSED, } +/** + * xmlSchemaGetCanonValue: + * @val: the precomputed value + * @retValue: the returned value + * + * Get a the cononical representation of the value. + * The caller has to free the returned retValue. + * + * Returns 0 if the value could be built and -1 in case of + * API errors or if the value type is not supported yet. + */ +int +xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) +{ + if ((retValue == NULL) || (val == NULL)) + return (-1); + *retValue = NULL; + switch (val->type) { + case XML_SCHEMAS_STRING: + case XML_SCHEMAS_NORMSTRING: + /* + case XML_SCHEMAS_TOKEN: + case XML_SCHEMAS_LANGUAGE: + case XML_SCHEMAS_NMTOKEN: + case XML_SCHEMAS_NAME: + case XML_SCHEMAS_QNAME: + case XML_SCHEMAS_NCNAME: + case XML_SCHEMAS_ID: + case XML_SCHEMAS_IDREF: + case XML_SCHEMAS_ENTITY: + case XML_SCHEMAS_NOTATION: + case XML_SCHEMAS_ANYURI: + */ + if (val->value.str == NULL) + *retValue = NULL; + else + /* TODO: This is not yet correct for non-normalized values. */ + *retValue = + BAD_CAST xmlStrdup((const xmlChar *) val->value.str); + return (0); + default: + return (-1); + } + return (-1); +} + #endif /* LIBXML_SCHEMAS_ENABLED */ diff --git a/xmlwriter.c b/xmlwriter.c index 099d3f0..76d7549 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -936,6 +936,12 @@ xmlTextWriterStartElement(xmlTextWriterPtr writer, const xmlChar * name) return -1; case XML_TEXTWRITER_NONE: break; + case XML_TEXTWRITER_ATTRIBUTE: + count = xmlTextWriterEndAttribute(writer); + if (count < 0) + return -1; + sum += count; + /* fallthrough */ case XML_TEXTWRITER_NAME: count = xmlOutputBufferWriteString(writer->out, ">"); if (count < 0) @@ -1832,12 +1838,26 @@ xmlTextWriterEndAttribute(xmlTextWriterPtr writer) sum += count; while (!xmlListEmpty(writer->nsstack)) { + xmlChar *namespaceURI = NULL; + xmlChar *prefix = NULL; + lk = xmlListFront(writer->nsstack); np = (xmlTextWriterNsStackEntry *) xmlLinkGetData(lk); + + if (np != 0) { + namespaceURI = xmlStrdup(np->uri); + prefix = xmlStrdup(np->prefix); + } + + xmlListPopFront(writer->nsstack); + if (np != 0) { count = - xmlTextWriterWriteAttribute(writer, np->prefix, - np->uri); + xmlTextWriterWriteAttribute(writer, prefix, + namespaceURI); + xmlFree(namespaceURI); + xmlFree(prefix); + if (count < 0) { xmlListDelete(writer->nsstack); writer->nsstack = NULL; @@ -1845,8 +1865,6 @@ xmlTextWriterEndAttribute(xmlTextWriterPtr writer) } sum += count; } - - xmlListPopFront(writer->nsstack); } break; @@ -51,6 +51,13 @@ #include <libxml/xmlerror.h> #include <libxml/threads.h> #include <libxml/globals.h> +#ifdef LIBXML_PATTERN_ENABLED +#include <libxml/pattern.h> +#endif + +#ifdef LIBXML_PATTERN_ENABLED +#define XPATH_STREAMING +#endif #define TODO \ xmlGenericError(xmlGenericErrorContext, \ @@ -436,6 +443,9 @@ struct _xmlXPathCompExpr { int nb; xmlChar *string; #endif +#ifdef XPATH_STREAMING + xmlPatternPtr stream; +#endif }; /************************************************************************ @@ -522,6 +532,11 @@ xmlXPathFreeCompExpr(xmlXPathCompExprPtr comp) xmlFree(comp->string); } #endif +#ifdef XPATH_STREAMING + if (comp->stream != NULL) { + xmlFreePatternList(comp->stream); + } +#endif if (comp->expr != NULL) { xmlFree(comp->expr); } @@ -4042,8 +4057,15 @@ xmlXPathFreeParserContext(xmlXPathParserContextPtr ctxt) { if (ctxt->valueTab != NULL) { xmlFree(ctxt->valueTab); } - if (ctxt->comp) + if (ctxt->comp != NULL) { +#ifdef XPATH_STREAMING + if (ctxt->comp->stream != NULL) { + xmlFreePatternList(ctxt->comp->stream); + ctxt->comp->stream = NULL; + } +#endif xmlXPathFreeCompExpr(ctxt->comp); + } xmlFree(ctxt); } @@ -10904,6 +10926,164 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) return (total); } +#ifdef XPATH_STREAMING +/** + * xmlXPathRunStreamEval: + * @ctxt: the XPath parser context with the compiled expression + * + * Evaluate the Precompiled Streamable XPath expression in the given context. + */ +static xmlXPathObjectPtr +xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { + int max_depth; + int from_root; + int ret, depth; + xmlNodePtr cur = NULL, limit = NULL; + xmlXPathObjectPtr retval; + xmlStreamCtxtPtr patstream; + + int nb_nodes = 0; + + if ((ctxt == NULL) || (comp == NULL)) + return(NULL); + max_depth = xmlPatternMaxDepth(comp); + if (max_depth == -1) + return(NULL); + if (max_depth == -2) + max_depth = 10000; + from_root = xmlPatternFromRoot(comp); + if (from_root < 0) + return(NULL); +#if 0 + printf("stream eval: depth %d from root %d\n", max_depth, from_root); +#endif + + retval = xmlXPathNewNodeSet(NULL); + if (retval == NULL) + return(NULL); + + if ((from_root) && (max_depth == 0)) { + xmlXPathNodeSetAddUnique(retval->nodesetval, (xmlNodePtr) ctxt->doc); + return(retval); + } else if (max_depth == 0) { + xmlXPathNodeSetAddUnique(retval->nodesetval, ctxt->node); + return(retval); + } + if (from_root) { + cur = (xmlNodePtr)ctxt->doc; + } else if (ctxt->node != NULL) { + switch (ctxt->node->type) { + case XML_ELEMENT_NODE: + case XML_DOCUMENT_NODE: + case XML_DOCUMENT_FRAG_NODE: + case XML_HTML_DOCUMENT_NODE: +#ifdef LIBXML_DOCB_ENABLED + case XML_DOCB_DOCUMENT_NODE: +#endif + cur = ctxt->node; + break; + case XML_ATTRIBUTE_NODE: + case XML_TEXT_NODE: + case XML_CDATA_SECTION_NODE: + case XML_ENTITY_REF_NODE: + case XML_ENTITY_NODE: + case XML_PI_NODE: + case XML_COMMENT_NODE: + case XML_NOTATION_NODE: + case XML_DTD_NODE: + case XML_DOCUMENT_TYPE_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: + case XML_NAMESPACE_DECL: + case XML_XINCLUDE_START: + case XML_XINCLUDE_END: + break; + } + limit = cur; + } + if (cur == NULL) + return(retval); + + patstream = xmlPatternGetStreamCtxt(comp); + if (patstream == NULL) { + return(retval); + } + + if (from_root) { + ret = xmlStreamPush(patstream, NULL, NULL); + if (ret < 0) { + } else if (ret == 1) { + xmlXPathNodeSetAddUnique(retval->nodesetval, cur); + } + } + + depth = 0; + goto scan_children; + do { +next_node: + nb_nodes++; + if (cur->type == XML_ELEMENT_NODE) { + ret = xmlStreamPush(patstream, cur->name, + (cur->ns ? cur->ns->href : NULL)); + if (ret < 0) { + } else if (ret == 1) { + xmlXPathNodeSetAddUnique(retval->nodesetval, cur); + } + if ((cur->children == NULL) || (depth >= max_depth)) { + ret = xmlStreamPop(patstream); + } + } + +scan_children: + if ((cur->children != NULL) && (depth < max_depth)) { + /* + * Do not descend on entities declarations + */ + if (cur->children->type != XML_ENTITY_DECL) { + cur = cur->children; + depth++; + /* + * Skip DTDs + */ + if (cur->type != XML_DTD_NODE) + continue; + } + } + + if (cur == limit) + break; + + while (cur->next != NULL) { + cur = cur->next; + if ((cur->type != XML_ENTITY_DECL) && + (cur->type != XML_DTD_NODE)) + goto next_node; + } + + do { + ret = xmlStreamPop(patstream); + cur = cur->parent; + depth--; + if ((cur == NULL) || (cur == limit)) + goto done; + if (cur->next != NULL) { + cur = cur->next; + break; + } + } while (cur != NULL); + + } while ((cur != NULL) && (depth >= 0)); +done: +#if 0 + printf("stream eval: checked %d nodes selected %d\n", + nb_nodes, retval->nodesetval->nodeNr); +#endif + xmlFreeStreamCtxt(patstream); + return(retval); +} +#endif /* XPATH_STREAMING */ + /** * xmlXPathRunEval: * @ctxt: the XPath parser context with the compiled expression @@ -10929,6 +11109,16 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt) { ctxt->valueMax = 10; ctxt->value = NULL; } +#ifdef XPATH_STREAMING + if (ctxt->comp->stream) { + xmlXPathObjectPtr ret; + ret = xmlXPathRunStreamEval(ctxt->context, ctxt->comp->stream); + if (ret != NULL) { + valuePush(ctxt, ret); + return; + } + } +#endif comp = ctxt->comp; if(comp->last < 0) { xmlGenericError(xmlGenericErrorContext, @@ -11034,6 +11224,68 @@ xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, return(0); } +#ifdef XPATH_STREAMING +/** + * xmlXPathTryStreamCompile: + * @ctxt: an XPath context + * @str: the XPath expression + * + * Try to compile the XPath expression as a streamable subset. + * + * Returns the compiled expression or NULL if failed to compile. + */ +static xmlXPathCompExprPtr +xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { + /* + * Optimization: use streaming patterns when the XPath expression can + * be compiled to a stream lookup + */ + xmlPatternPtr stream; + xmlXPathCompExprPtr comp; + xmlDictPtr dict = NULL; + const xmlChar **namespaces = NULL; + xmlNsPtr ns; + int i, j; + + if ((!xmlStrchr(str, '[')) && (!xmlStrchr(str, '(')) && + (!xmlStrchr(str, '@'))) { + if (ctxt != NULL) { + dict = ctxt->dict; + if (ctxt->nsNr > 0) { + namespaces = xmlMalloc(2 * (ctxt->nsNr + 1)); + if (namespaces == NULL) { + xmlXPathErrMemory(ctxt, "allocating namespaces array\n"); + return(NULL); + } + for (i = 0, j = 0; (j < ctxt->nsNr); j++) { + ns = ctxt->namespaces[j]; + namespaces[i++] = ns->href; + namespaces[i++] = ns->prefix; + } + namespaces[i++] = NULL; + namespaces[i++] = NULL; + } + } + + stream = xmlPatterncompile(str, dict, 0, &namespaces[0]); + if ((stream != NULL) && (xmlPatternStreamable(stream) == 1)) { + comp = xmlXPathNewCompExpr(); + if (comp == NULL) { + xmlXPathErrMemory(ctxt, "allocating streamable expression\n"); + return(NULL); + } + comp->stream = stream; + comp->dict = dict; + if (comp->dict) + xmlDictReference(comp->dict); + return(comp); + } + xmlFreePattern(stream); + } + return(NULL); +} +#endif /* XPATH_STREAMING */ + /** * xmlXPathCtxtCompile: * @ctxt: an XPath context @@ -11049,6 +11301,12 @@ xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { xmlXPathParserContextPtr pctxt; xmlXPathCompExprPtr comp; +#ifdef XPATH_STREAMING + comp = xmlXPathTryStreamCompile(ctxt, str); + if (comp != NULL) + return(comp); +#endif + xmlXPathInit(); pctxt = xmlXPathNewParserContext(str, ctxt); @@ -11184,8 +11442,25 @@ xmlXPathCompiledEval(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx) { */ void xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) { +#ifdef XPATH_STREAMING + xmlXPathCompExprPtr comp; +#endif + if (ctxt == NULL) return; - xmlXPathCompileExpr(ctxt); + +#ifdef XPATH_STREAMING + comp = xmlXPathTryStreamCompile(ctxt->context, ctxt->base); + if (comp != NULL) { + if (ctxt->comp != NULL) + xmlXPathFreeCompExpr(ctxt->comp); + ctxt->comp = comp; + if (ctxt->cur != NULL) + while (*ctxt->cur != 0) ctxt->cur++; + } else +#endif + { + xmlXPathCompileExpr(ctxt); + } CHECK_ERROR; xmlXPathRunEval(ctxt); } @@ -11217,7 +11492,11 @@ xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx) { xmlGenericError(xmlGenericErrorContext, "xmlXPathEval: evaluation failed\n"); res = NULL; - } else if (*ctxt->cur != 0) { + } else if ((*ctxt->cur != 0) && (ctxt->comp != NULL) +#ifdef XPATH_STREAMING + && (ctxt->comp->stream == NULL) +#endif + ) { xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR); res = NULL; } else { diff --git a/xstc/Makefile.am b/xstc/Makefile.am index 45309ff..e7e128b 100644 --- a/xstc/Makefile.am +++ b/xstc/Makefile.am @@ -64,18 +64,24 @@ $(TESTDIRS): pytests: $(PYSCRIPTS) $(TESTDIRS) -@(if [ -x nist-test.py -a -d nisttest ] ; then \ echo "## Running NIST Schemas tests"; \ - PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ + PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi) -@(if [ -x sun-test.py -a -d suntest ] ; then \ echo "## Running Sun Schemas tests"; \ - PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ + PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi) -@(if [ -x ms-test.py -a -d msxsdtest ] ; then \ echo "## Running Microsoft Schemas tests"; \ - PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ + PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ $(CHECKER) $(PYTHON) ms-test.py -s -b $(srcdir) ; fi) tests: @@ -88,7 +94,7 @@ tests: valgrind: -@(if [ -x $(PYTHON) ] ; then \ echo '## Running the regression tests under Valgrind' ; \ - $(MAKE) CHECKER='valgrind -q' MAKEFLAGS+=--silent pytests ; fi); + $(MAKE) CHECKER='valgrind' MAKEFLAGS+=--silent pytests ; fi); clean: rm -f $(PYSCRIPTS) test.log diff --git a/xstc/Makefile.in b/xstc/Makefile.in index 821d78a..26fd694 100644 --- a/xstc/Makefile.in +++ b/xstc/Makefile.in @@ -123,7 +123,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PATTERN_TEST = @PATTERN_TEST@ PERL = @PERL@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -146,6 +145,7 @@ TEST_CATALOG = @TEST_CATALOG@ TEST_DEBUG = @TEST_DEBUG@ TEST_HTML = @TEST_HTML@ TEST_MODULES = @TEST_MODULES@ +TEST_PATTERN = @TEST_PATTERN@ TEST_PHTML = @TEST_PHTML@ TEST_PUSH = @TEST_PUSH@ TEST_REGEXPS = @TEST_REGEXPS@ @@ -479,18 +479,24 @@ $(TESTDIRS): pytests: $(PYSCRIPTS) $(TESTDIRS) -@(if [ -x nist-test.py -a -d nisttest ] ; then \ echo "## Running NIST Schemas tests"; \ - PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ + PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi) -@(if [ -x sun-test.py -a -d suntest ] ; then \ echo "## Running Sun Schemas tests"; \ - PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ + PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi) -@(if [ -x ms-test.py -a -d msxsdtest ] ; then \ echo "## Running Microsoft Schemas tests"; \ - PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ + PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\ export PYTHONPATH; \ + LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + export LD_LIBRARY_PATH; \ $(CHECKER) $(PYTHON) ms-test.py -s -b $(srcdir) ; fi) tests: @@ -503,7 +509,7 @@ tests: valgrind: -@(if [ -x $(PYTHON) ] ; then \ echo '## Running the regression tests under Valgrind' ; \ - $(MAKE) CHECKER='valgrind -q' MAKEFLAGS+=--silent pytests ; fi); + $(MAKE) CHECKER='valgrind' MAKEFLAGS+=--silent pytests ; fi); clean: rm -f $(PYSCRIPTS) test.log |