1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-27 04:55:04 +03:00
Commit Graph

107 Commits

Author SHA1 Message Date
Daniel Veillard
9f7eb0bba3 started messing seriously with per-document dict and element and attribute
* SAX2.c parser.c parserInternals.c xmlreader.c: started messing
  seriously with per-document dict and element and attribute nodes
  reuse in the xmlReader. This seems to lead to an interesting
  speedup of the xmlReader already.
Daniel
2003-09-17 10:26:25 +00:00
Daniel Veillard
07cb8226c0 Time to commit 3 days of work rewriting the parser internal,
fixing bugs and migrating to SAX2 interface by default. There
is some work letf TODO, like namespace validation and attributes
normalization (this break C14N right now)
* Makefile.am: fixed the test rules
* include/libxml/SAX2.h include/libxml/parser.h
  include/libxml/parserInternals.h SAX2.c parser.c
  parserInternals.c: changing the parser, migrating to SAX2,
  adding new interface to switch back to SAX1 or initialize a
  SAX block for v1 or v2. Most of the namespace work is done
  below SAX, as well as attribute defaulting
* globals.c: changed initialization of the default SAX handlers
* hash.c tree.c include/libxml/hash.h: added QName specific handling
* xmlIO.c: small fix
* xmllint.c testSAX.c: provide a --sax1 switch to test the old
  version code path
* result/p3p result/p3p.sax result/noent/p3p test/p3p: the new code
  pointed out a typo in a very old test namespace
Daniel
2003-09-10 10:51:05 +00:00
Daniel Veillard
40412cda44 when creating a DOCTYPE use "html" lowercase by default instead of "HTML"
* HTMLparser.c: when creating a DOCTYPE use "html" lowercase
  by default instead of "HTML"
* parser.c xmlreader.c: optimization, gain a few % parsing speed by
  avoiding calls to "areBlanks" when not needed.
* include/libxml/parser.h include/libxml/tree.h: some structure
  extensions for future work on using per-document dictionaries.
Daniel
2003-09-03 13:28:32 +00:00
William M. Brack
c193956ee1 small changes to syntax to get rid of compiler warnings. No changes to
* error.c HTMLparser.c testC14N.c testHTML.c testURI.c
  xmlcatalog.c xmlmemory.c xmlreader.c xmlschemastypes.c
  python/libxml.c include/libxml/xmlmemory.h: small changes
  to syntax to get rid of compiler warnings.  No changes
  to logic.
2003-08-05 15:52:22 +00:00
William M. Brack
779af00750 =Bug 118559 (continued) 2003-08-01 15:55:39 +00:00
Daniel Veillard
d6038e0283 applying cleanup patch from Bjorn Reese for xmlTextReaderNodeType() and
* xmlreader.c include/libxml/xmlreader.h: applying cleanup
  patch from Bjorn Reese for xmlTextReaderNodeType() and
  significant whitespace. There is an enum for node type
  values now.
Daniel
2003-07-30 16:37:18 +00:00
Daniel Veillard
c127adc808 fixed an out of bound error #118052 , the good part if that base64 code
* xmlreader.c: fixed an out of bound error #118052 , the good
  part if that base64 code was not in use yet ...
Daniel
2003-07-23 15:07:08 +00:00
Daniel Veillard
409a8147c1 adding Get interface for the error callback and parameters of parsing and
* relaxng.c include/libxml/relaxng.h: adding Get interface for
  the error callback and parameters of parsing and validation
  contexts
* xmlreader.c: patch to fix bug #117702 about incomplete Read()
  on text nodes.
Daniel
2003-07-18 15:16:57 +00:00
Daniel Veillard
a37aab845c applied a patch from Gman for building docs applied a patch from Gary
* doc/*: applied a patch from Gman for building docs
* valid.c xmllint.c include/libxml/valid.h: applied a patch from
  Gary Pennington to provide an allocator for xmlValidCtxt
* xmlreader.c: applied patch from Jacek Konieczny fixing bug
  #113580 about data not being passed immediately.
Daniel
2003-06-09 09:10:36 +00:00
Daniel Veillard
37fc84d155 fixing bug #104081 with xs:all with an element holding minOccurs="0" added
* xmlschemas.c: fixing bug #104081 with xs:all with an element
  holding minOccurs="0"
* test/schemas/all_* result/schemas/all_*: added some regression
  tests for that bug
* xmllint.c xmlreader.c: patches from Joerg Schmitz-Linneweber and
  Garry Pennington to compile without schemas support.
Daniel
2003-05-09 19:38:15 +00:00
Daniel Veillard
61c5220296 try to fix Red hat bug #89957, do not output -L/usr/lib64 fixed a typo in
* xml2-config.in: try to fix Red hat bug #89957, do not
  output -L/usr/lib64
* xmlreader.c: fixed a typo in a comment
Daniel
2003-04-30 12:20:34 +00:00
Daniel Veillard
a76fe5ca11 integrated the Out Of Memory test from Havoc Pennington #109368 a lot of
* Makefile.am testOOM.c testOOMlib.[ch] : integrated the Out Of
  Memory test from Havoc Pennington #109368
* SAX.c parser.c parserInternals.c tree.c uri.c valid.c
  xmlmemory.c xmlreader.c xmlregexp.c include/libxml/tree.h
  include/libxml/parser.h: a lot of memory allocation cleanups
  based on the results of the OOM testing
* check-relaxng-test-suite2.py: seems I forgot to commit the
  script.
Daniel
2003-04-24 16:06:47 +00:00
Daniel Veillard
a880b12475 a lot of performance work especially the speed of streaming through the
* globals.c libxml.h parser.c parserInternals.c tree.c xmllint.c
  xmlreader.c include/libxml/parser.h: a lot of performance work
  especially the speed of streaming through the reader and push
  interface. Some thread related optimizations. Nearly doubled the
  speed of parsing through the reader.
Daniel
2003-04-21 21:36:41 +00:00
Daniel Veillard
3c908dca47 added xmlMallocAtomic() to be used when allocating blocks which do not
* DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c
  nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c
  xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c
  include/libxml/globals.h include/libxml/xmlmemory.h: added
  xmlMallocAtomic() to be used when allocating blocks which
  do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet()
  to allow registering the full set of functions needed by
  a garbage collecting allocator like libgc, ref #109944
Daniel
2003-04-19 00:07:51 +00:00
Daniel Veillard
33300b49f0 augnemting the APIs, cleanups. cleanup bug #111005 added some missing
* include/libxml/relaxng.h relaxng.c include/libxml/xmlreader.h
  xmlreader.c: augnemting the APIs, cleanups.
* parser.c: cleanup bug #111005
* xmlIO.c: added some missing comments
Daniel
2003-04-17 09:09:19 +00:00
Daniel Veillard
f4e5576f8f implemented streaming of RelaxNG (when possible) on top of the xmlReader
* relaxng.c xmlreader.c xmllint.c include/libxml/relaxng.h
  include/libxml/xmlreader.h: implemented streaming of
  RelaxNG (when possible) on top of the xmlReader interface,
  provided it as xmllint --stream --relaxng .rng .xml
  This seems to mostly work.
* Makefile.am: updated to test RelaxNG streaming
Daniel
2003-04-15 23:32:22 +00:00
Daniel Veillard
f6bad798cf make sure xmllint --stream and xmllint --stream --valid returns errors
* xmllint.c xmlreader.c include/libxml/xmlreader.h: make sure
  xmllint --stream and xmllint --stream --valid returns errors
  code appropriately
Daniel
2003-04-11 19:38:54 +00:00
Daniel Veillard
c6cae7b690 Added the Expand() and Next() operation to work on subtrees within the
* xmlreader.c include/libxml/xmlreader.h: Added the Expand()
  and Next() operation to work on subtrees within the reader
  framework.
* doc/libxml2-api.xml python/libxml2class.txt: resulting updates
* python/tests/reader5.py: added an example for those new
  functions of the reader.
Daniel
2003-04-11 09:02:11 +00:00
Daniel Veillard
9e07710b95 fixing HasValue for namespace as raised by Denys Duchier Daniel
* xmlreader.c: fixing HasValue for namespace as raised by
  Denys Duchier
Daniel
2003-04-10 13:36:54 +00:00
Daniel Veillard
ef8dd7be29 fixing bug #108976 get the ID/REFs to reference the ID in the document
* parser.c: fixing bug #108976 get the ID/REFs to reference
  the ID in the document content and not in the entity copy
* SAX.c include/libxml/parser.h: more checking of the ID/REF
  stuff, better solution for #107208
* xmlregexp.c: removed a direct printf, dohhh
* xmlreader.c: fixed a bug on streaming validation of empty
  elements in entities
* result/VC/ElementValid8 test/VCM/v20.xml result/valid/xhtml1.xhtml:
  cleanup of the validation tests
* test/valid/id* test/valid/dtds/destfoo.ent result/valid/id*:
  added more ID/IDREF tests to the suite
Daniel
2003-03-23 12:02:56 +00:00
Daniel Veillard
2cfd9dff28 fixed #107043 removing 2 warnings with Sun One compiler. Daniel
* xmlreader.c: fixed #107043 removing 2 warnings with Sun One
  compiler.
Daniel
2003-03-22 22:39:16 +00:00
Daniel Veillard
48ef4c98d2 fixed bug #108801 reported by Malcolm Tredinnick about the DocType node
* xmlreader.c: fixed bug #108801 reported by Malcolm Tredinnick
  about the DocType node not being reported sometimes.
* python/tests/reader.py: added to test to the regression checks
Daniel
2003-03-22 12:38:15 +00:00
Daniel Veillard
120e8eb291 fixed bug #108546 on long CDATA (or text nodes) reported by Edd Dumbill
* xmlreader.c: fixed bug #108546 on long CDATA (or text nodes)
  reported by Edd Dumbill
Daniel
2003-03-22 01:00:34 +00:00
Daniel Veillard
580ced8ee2 fixed Red Hat bug #86118 use libxml2.spec instead of libxml.spec fixed
* configure.in Makefile.am: fixed Red Hat bug #86118 use libxml2.spec
  instead of libxml.spec
* relaxng.c: fixed some of the error reporting excessive
  verbosity
* catalog.c debugXML.c valid.c xmlreader.c xmlschemas.c xpath.c
  xmlschemastypes.c: removed some warnings from gcc
* doc/libxml2-api.xml: rebuilt
Daniel
2003-03-21 21:22:48 +00:00
Daniel Veillard
952379b780 fixed the last core RelaxNG bug known #107083, shemas datatype ID/IDREF
* relaxng.c: fixed the last core RelaxNG bug known #107083,
  shemas datatype ID/IDREF support still missing though.
* xmlreader.c: fix a crashing bug with prefix raised by
  Merijn Broeren
* test/relaxng/testsuite.xml: augmented the testsuite with
  complex inheritance tests
Daniel
2003-03-17 15:37:12 +00:00
Daniel Veillard
d431074c46 float/double check bugfix exported a function for NMTOKEN validation add a
* xmlschemastypes.c: float/double check bugfix
* tree.c include/libxml/tree.h: exported a function for NMTOKEN
  validation
* xmlreader.c: add a TODO for Jody
* relaxng.c: bugfix bugfix bugfix
  found 373 test schemas: 300 success 73 failures
  found 529 test instances: 507 success 10 failures
* result/relaxng/*: updated the results
Daniel
2003-02-18 21:12:46 +00:00
Daniel Veillard
0e298ad23f fixing #104096 to compile without regexps Daniel
* configure.in valid.c xmlreader.c python/libxml_wrap.h
  python/types.c: fixing #104096 to compile without regexps
Daniel
2003-02-04 16:14:33 +00:00
Daniel Veillard
540a31a361 applied a new patch from Stphane Bidoul for cleanups rebuilt the API
* xmlreader.c doc/apibuild.py: applied a new patch from
  Stphane Bidoul for cleanups
* doc/libxml2-api.xml: rebuilt the API description with
  new entry points
Daniel
2003-01-21 11:21:07 +00:00
Daniel Veillard
417be3ae08 patch from Stphane Bidoul for better per context error message APIs
* xmlreader.c python/drv_libxml2.py python/generator.py
  python/libxml.c python/libxml.py python/libxml_wrap.h
  python/types.c: patch from Stphane Bidoul for better per
  context error message APIs
* python/tests/ctxterror.py python/tests/readererr.py:
  update of the tests
Daniel
2003-01-20 21:26:34 +00:00
Daniel Veillard
26f70269c8 applied a patch from Stphane Bidoul to allow per XMLtextReader error and
* xmlreader.c include/libxml/xmlreader.h python/generator.py
  python/libxml.c python/libxml.py win32/libxml2.def.src: applied
  a patch from Stphane Bidoul to allow per XMLtextReader error
  and warning handling
* python/tests/Makefile.am python/tests/readererr.py: adding the
  specific regression test
Daniel
2003-01-16 22:45:08 +00:00
Daniel Veillard
4dbe77a84f fixed the streaming property of the reader, it was generating tree faster
* xmlreader.c: fixed the streaming property of the reader,
  it was generating tree faster than consuming it. Pointed out
  by Nate Myers
* tree.c: fixed a bug in xmlSaveFormatFileEnc if passed a NULL doc
Daniel
2003-01-14 00:17:42 +00:00
Daniel Veillard
067bae5ff8 seriously changed the way data are pushed to the underlying parser, go by
* xmlreader.c: seriously changed the way data are pushed to
  the underlying parser, go by block of 512 bytes instead of
  tryng to detect tag boundaries at that level. Changed the
  way empty element are detected and tagged.
* python/tests/reader.py python/tests/reader2.py
  python/tests/reader3.py: small changes mostly due to context
  reporting being different and DTD node being reported. Some
  errors previously undetected are now caught and fixed.
* doc/xmlreader.html: flagged last section as TODO
Daniel
2003-01-05 01:27:54 +00:00
Daniel Veillard
e59494fa54 a bit of cleanup small fix more work on the XmlTextReader tutorial a few
* xmllint.c: a bit of cleanup
* xmlreader.c: small fix
* doc/xmlreader.html: more work on the XmlTextReader tutorial
* python/libxml.py: a few fixes pointed out by Hannu Krosing
Daniel
2003-01-04 16:35:29 +00:00
Daniel Veillard
7704fb1d9f added the --stream flag to use the TextReader API small performance tweak
* xmllint.c: added the --stream flag to use the TextReader API
* xmlreader.c: small performance tweak
Daniel
2003-01-03 16:19:51 +00:00
Daniel Veillard
a80ff6ec18 okay the DTD validation code on top of the XMLTextParser API should be
* xmlreader.c python/tests/reader2py: okay the DTD validation
  code on top of the XMLTextParser API should be solid now.
Daniel
2003-01-03 12:52:08 +00:00
Daniel Veillard
1fdfd115e5 Fixing some more mess with validation and recursive entities while using
* xmlreader.c python/tests/reader2py: Fixing some more mess
  with validation and recursive entities while using the
  reader interface, it's getting a bit messy...
Daniel
2003-01-03 01:18:43 +00:00
Daniel Veillard
dab8ea9b83 another couple of problem related to IsEmptyElement reported by Stphane
* xmlreader.c python/tests/reader.py: another couple of problem
  related to IsEmptyElement reported by Stphane Bidoul needed
  some fixes.
Daniel
2003-01-02 14:16:45 +00:00
Daniel Veillard
e3c036eedd fixed another couple of xmlreader bugs reported by Stphane Bidoul and
* xmlreader.c python/tests/reader.py: fixed another couple of
  xmlreader bugs reported by Stphane Bidoul and added tests.
Daniel
2003-01-01 15:11:05 +00:00
Daniel Veillard
9e395c289f fixed another validity checking in external parsed entities raised by
* xmlreader.c python/tests/reader2.py: fixed another validity
  checking in external parsed entities raised by Stphane Bidoul
  and added a specific regression test.
* python/tests/reader3.py: cleanup
Daniel
2003-01-01 14:50:44 +00:00
Daniel Veillard
d589614042 fixed a problem with validation within entities pointed by Stphane
* xmlreader.c python/tests/reader2.py: fixed a problem with
  validation within entities pointed by Stphane Bidoul, augmented
  the tests to catch those.
Daniel
2002-12-31 14:45:26 +00:00
Daniel Veillard
4d8db8a22c fixed another pair of problem pointed by Stphane Bidoul: depth start at 0
* xmlreader.c python/tests/reader.py: fixed another pair of problem
  pointed by Stphane Bidoul: depth start at 0 and a parse problem.
Daniel
2002-12-30 18:40:42 +00:00
Daniel Veillard
571b889b6b fixed another problem pointed by Stphane Bidoul Daniel
* xmlreader.c python/tests/reader.py: fixed another problem
  pointed by Stphane Bidoul
Daniel
2002-12-30 12:37:59 +00:00
Daniel Veillard
aaa105b590 fixed a limit case problem with "<a/>" Daniel
* xmlreader.c python/tests/reader.py: fixed a limit case problem
  with "<a/>"
Daniel
2002-12-30 11:42:17 +00:00
Daniel Veillard
ecaba49a72 warn on xmlns:prefix="foo" fixed a couple of problem for namespace
* SAX.c: warn on xmlns:prefix="foo"
* xmlreader.c python/tests/reader.py: fixed a couple of problem
  for namespace attributes handling.
Daniel
2002-12-30 10:55:29 +00:00
Daniel Veillard
29b3e285a7 fixed a bug pointed out by Stphane Bidoul and integrated it into the
* xmlreader.c python/tests/reader.py: fixed a bug pointed out
  by Stphane Bidoul and integrated it into the tests
Daniel
2002-12-29 11:14:41 +00:00
Daniel Veillard
e18fc185fa extended the XmlTextReader API a bit, addding accessors for the current
* xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml:
  extended the XmlTextReader API a bit, addding accessors for
  the current doc and node, and an entity substitution mode for
  the parser.
* python/libxml.py python/libxml2class.txt: related updates
* python/tests/Makefile.am python/tests/reader.py
  python/tests/reader2.py python/tests/reader3.py: updated a bit
  the old tests and added a new one to test the entities handling
Daniel
2002-12-28 22:56:33 +00:00
Daniel Veillard
336fc7d3c9 final touch running DTD validation on the XmlTextReader added a specific
* valid.c xmlreader.c: final touch running DTD validation
  on the XmlTextReader
* python/tests/Makefile.am python/tests/reader2.py: added a
  specific run based on the examples from test/valid/*.xml
Daniel
2002-12-27 19:37:04 +00:00
Daniel Veillard
df512f4060 Fixed the empty node detection to avoid reporting an inexistant close tag.
* xmlreader.c: Fixed the empty node detection to avoid reporting
  an inexistant close tag.
Daniel
2002-12-23 15:56:21 +00:00
Daniel Veillard
ea7751d53b working on DTD validation on top of xml reader interfaces. Allows to
* testReader.c xmlreader.c valid.c include/libxml/tree.h
  include/libxml/valid.h include/libxml/xmlreader.h: working on
  DTD validation on top of xml reader interfaces. Allows to
  validate arbitrary large instances. This required some extensions
  to the valid module interface and augmenting the size of xmlID
  and xmlRef structs a bit.
* uri.c xmlregexp.c: simple cleanup.
Daniel
2002-12-20 00:16:24 +00:00
Daniel Veillard
beb70bd39b more work on the xml reader interfaces. updated Igor's mail and the Web
* xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: more
  work on the xml reader interfaces.
* AUTHORS MAINTAINERS doc/* win32/*: updated Igor's mail and the
  Web page for the Windows binaries.
Daniel
2002-12-18 14:53:54 +00:00
Daniel Veillard
67df809c3a Vyacheslav Pindyura managed to trigger a bug in parseStartTag, fixing it.
* parser.c: Vyacheslav Pindyura managed to trigger a bug in
  parseStartTag, fixing it.
* test/att4 result/att4 result/noent/att4: adding the test
* xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added
  more methods to XmlTextReader.
Daniel
2002-12-16 22:04:11 +00:00
Daniel Veillard
da46d2d31e added more methods of XmlTextReader. this increased the methods in the
* xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added
  more methods of XmlTextReader.
* python/libxml2class.txt python/tests/reader.py: this increased the
  methods in the bndings, augmented the test to check those new
  functions.
Daniel
2002-12-15 23:36:49 +00:00
Daniel Veillard
0eb38c7259 added the close and getattribute methods of XmlTextReader. added the
* xmlreader.c doc/libxml2-api.xml: added the close and getattribute
  methods of XmlTextReader.
* python/generator.py python/libxml_wrap.h python/types.c
  python/libxml2class.txt: added the reader to the Python bindings
* python/tests/Makefile.am python/tests/reader.py: added a specific
  test for the Python bindings of the Reader APIs
* parser.c: small cleanup.
Daniel
2002-12-14 23:00:35 +00:00
Daniel Veillard
9b4bb4d07a preparing release of 2.4.29 rebuilt the docs and API a few more fixes for
* configure.in: preparing release of 2.4.29
* doc/*: rebuilt the docs and API
* xmlreader.c: a few more fixes for the XmlTextReader API
Daniel
2002-12-11 19:28:47 +00:00
Daniel Veillard
a9b66d00b5 new API building Python script, does the C parsing directly, generates a
* doc/apibuild.py doc/libxml2-api.xml doc/Makefile.am: new API
  building Python script, does the C parsing directly, generates
  a better API description including structure fieds defs and
  enums. Still a couple of bugs, but good enough for the python
  wrappers now.
* DOCBparser.c SAX.c nanohttp.c parser.c parserInternals.c tree.c
  valid.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c
  include/libxml/schemasInternals.h include/libxml/tree.h: more
  cleanup based on the python analysis script reports.
* libxml.spec.in: make sure the API XML description is part of the
  devel package.
Daniel
2002-12-11 14:23:49 +00:00
Daniel Veillard
01c13b5be2 code cleanup, especially the function comments. fixed a small bug when
* DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c
  nanoftp.c nanohttp.c parser.c parserInternals.c testC14N.c
  testDocbook.c threads.c tree.c valid.c xmlIO.c xmllint.c xmlmemory.c
  xmlreader.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c:
  code cleanup, especially the function comments.
* tree.c: fixed a small bug when freeing nodes which are XInclude ones.
Daniel
2002-12-10 15:19:08 +00:00
Daniel Veillard
e1ca50330b Adding a new set of APIs based on the C# TextXmlReader API but converted
* Makefile.am xmlreader.c include/libxml/Makefile.am
  include/libxml/xmlreader.h:  Adding a new set of APIs based on
  the C# TextXmlReader API but converted to C. Allow to parse
  in constant memory usage, far simpler to program and explain
  than the SAX like APIs, unfinished but working.
* testReader.c: test program
Daniel
2002-12-09 14:13:43 +00:00