1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-01 17:47:01 +03:00

882 Commits

Author SHA1 Message Date
Daniel Veillard
f63085de5e port patch from Marcus Meissner to add gcc checking for printf like
* include/libxml/parser.h include/libxml/xmlwriter.h
  include/libxml/relaxng.h include/libxml/xmlversion.h.in
  include/libxml/xmlwin32version.h.in include/libxml/valid.h
  include/libxml/xmlschemas.h include/libxml/xmlerror.h:
  port patch from Marcus Meissner to add gcc checking for
  printf like functions parameters, should fix #65068
* doc/apibuild.py doc/*: modified the script accordingly
  and regenerated
* xpath.c xmlmemory.c threads.c: fix a few warnings
Daniel

svn path=/trunk/; revision=3813
2009-01-18 20:53:59 +00:00
Daniel Veillard
d032a5bc21 windows header should get the same define Daniel
* include/libxml/xmlwin32version.h.in: windows header should
  get the same define
Daniel

svn path=/trunk/; revision=3812
2009-01-18 19:41:26 +00:00
Daniel Veillard
d4d4705780 apply patch from Marcus Meissner to add gcc attribute alloc_size should
* include/libxml/xmlversion.h.in include/libxml/xmlmemory.h:
  apply patch from Marcus Meissner to add gcc attribute alloc_size
  should fix #552505
* doc/apibuild.py doc/* testapi.c: regenerate the API
* include/libxml/parserInternals.h: fix a comment problem raised
  by apibuild.py
daniel

svn path=/trunk/; revision=3811
2009-01-18 17:26:02 +00:00
Daniel Veillard
1fb2e0dfc6 add a new define XML_MAX_TEXT_LENGHT limiting the maximum size of a single
* include/libxml/parserInternals.h SAX2.c: add a new define
  XML_MAX_TEXT_LENGHT limiting the maximum size of a single text
  node, the defaultis 10MB and can be removed with the HUGE
  parsing option
Daniel

svn path=/trunk/; revision=3808
2009-01-18 14:08:36 +00:00
Rob Richards
b9ed017d31 add XML_PARSE_OLDSAX parser option to enable pre 2.7 SAX behavior.
* include/libxml/parser.h parser.c: add XML_PARSE_OLDSAX parser 
  option to enable pre 2.7 SAX behavior.

svn path=/trunk/; revision=3807
2009-01-05 17:28:50 +00:00
Daniel Veillard
be2bd6ac6f adds element traversal support avoid a warning regenerated daniel
* include/libxml/tree.h tree.c python/generator.py: adds
  element traversal support
* valid.c: avoid a warning
* doc/*: regenerated
daniel

svn path=/trunk/; revision=3804
2008-11-27 15:26:28 +00:00
Daniel Veillard
856d92818b new options to serialize as XML/HTML/XHTML and restore old entry point
* include/libxml/xmlsave.h xmlsave.c: new options to serialize
  as XML/HTML/XHTML and restore old entry point behaviours
Daniel

svn path=/trunk/; revision=3794
2008-09-25 14:31:40 +00:00
Daniel Veillard
e83e93e715 make a new kind of buffer where shrinking and adding in head can avoid
* include/libxml/tree.h tree.c: make a new kind of buffer where
  shrinking and adding in head can avoid reallocation or full
  buffer memmoves
* encoding.c xmlIO.c: use the new kind of buffers for output
  buffers
Daniel

svn path=/trunk/; revision=3787
2008-08-30 12:52:26 +00:00
Daniel Veillard
0161e638c6 completely different fix for the recursion detection based on entity
* parser.c include/libxml/parser.h: completely different fix for
  the recursion detection based on entity density, big cleanups
  in the entity parsing code too
* result/*.sax*: the parser should not ask for used defined versions
  of the predefined entities
* testrecurse.c: automatic test for entity recursion checks
* Makefile.am: added testrecurse
* test/recurse/lol* test/recurse/good*: a first set of tests for
  the recursion
Daniel

svn path=/trunk/; revision=3783
2008-08-28 15:36:32 +00:00
Daniel Veillard
49d4405a6d a bit of cleanup and added checks based on the regression tests of the
* include/libxml/xmlerror.h parser.c: a bit of cleanup and
  added checks based on the regression tests of the xmlconf suite
Daniel

svn path=/trunk/; revision=3782
2008-08-27 19:57:06 +00:00
Daniel Veillard
a8f09ce8d3 cleanup entity pushing error handling based on a patch from Ashwin daniel
* include/libxml/parserInternals.h parser.c: cleanup entity
  pushing error handling based on a patch from Ashwin
daniel

svn path=/trunk/; revision=3779
2008-08-27 13:02:01 +00:00
Daniel Veillard
8915c150b5 strengthen some of the internal parser limits, add an XML_PARSE_HUGE
* include/libxml/parser.h parser.c xmllint.c: strengthen some
  of the internal parser limits, add an XML_PARSE_HUGE option
  to bypass them all. More internal parser limits will still need
  to be added.
Daniel

svn path=/trunk/; revision=3777
2008-08-26 13:05:34 +00:00
Daniel Veillard
54bd29b79b patch based on Wieant Nielander contribution to add the option of not
* include/libxml/parser.h xinclude.c xmllint.c: patch based on
  Wieant Nielander contribution to add the option of not doing
  URI base fixup in XInclude
Daniel

svn path=/trunk/; revision=3775
2008-08-26 07:26:55 +00:00
Daniel Veillard
aa6de47ebf applied patch from Aswin to fix tree skipping fixed a comment and added a
* xmlreader.c: applied patch from Aswin to fix tree skipping
* include/libxml/entities.h entities.c: fixed a comment and
  added a new xmlNewEntity() entry point
* runtest.c: be less verbose
* tree.c: space and tabs cleanups
daniel

svn path=/trunk/; revision=3774
2008-08-25 14:53:31 +00:00
Daniel Veillard
f4f4e4853a rework the patch to avoid some ABI issue with people allocating entities
* include/libxml/entities.h entities.c SAX2.c parser.c: rework
  the patch to avoid some ABI issue with people allocating
  entities structure directly
Daniel

svn path=/trunk/; revision=3773
2008-08-25 08:57:48 +00:00
Daniel Veillard
4bf899bf1b fix for CVE-2008-3281 Daniel
* include/libxml/parser.h include/libxml/entities.h entities.c
  parserInternals.c parser.c: fix for CVE-2008-3281
Daniel

svn path=/trunk/; revision=3772
2008-08-20 17:04:30 +00:00
Daniel Veillard
d7af555327 rewrite the URI parser to update to rfc3986 (from 2396) removed the error
* uri.c include/libxml/uri.h: rewrite the URI parser to update to
  rfc3986 (from 2396)
* test/errors/webdav.xml result/errors/webdav.xml*: removed the
  error test, 'DAV:' is a correct URI under 3986
* Makefile.am: small cleanup in make check
Daniel

svn path=/trunk/; revision=3763
2008-08-04 15:29:44 +00:00
Daniel Veillard
ae0765b681 more progresses against the official regression tests small cleanup for
* runxmlconf.c: more progresses against the official regression tests
* runsuite.c: small cleanup for non-leak reports
* include/libxml/tree.h: parsing flags and other properties are
  now added to the document node, this is generally useful and
  allow to make Name and NmToken validations based on the parser
  flags, more specifically the 5th edition of XML or not
* HTMLparser.c tree.c: small side effects for the previous changes
* parser.c SAX2.c valid.c: the bulk of teh changes are here,
  the parser and validation behaviour can be affected, parsing
  flags need to be copied, lot of changes. Also fixing various
  validation problems in the regression tests.
Daniel

svn path=/trunk/; revision=3762
2008-07-31 19:54:59 +00:00
Daniel Veillard
373345764b added a skipped list, insert rmt-ns10-035 improve 'make check' clean up
* runxmlconf.c: added a skipped list, insert rmt-ns10-035
* Makefile.am: improve 'make check'
* include/libxml/xmlerror.h parser.c: clean up namespace errors
  checking and reporting, errors when a document is labelled
  as UTF-16 while it is parsed as UTF-8 and no encoding was given
  explicitely.
* result/errors/webdav.xml.*: some warnings are no recategorized
  as Namespace errors
Daniel

svn path=/trunk/; revision=3761
2008-07-31 08:20:02 +00:00
Daniel Veillard
09459bf107 add xmlMemDisplayLast to help debug incremental memory leaks, and some
* include/libxml/xmlmemory.h xmlmemory.c: add xmlMemDisplayLast to
  help debug incremental memory leaks, and some cleanups
* runxmlconf.c: use that new call and avoid ever touching the
  system catalog in the regression tests
Daniel

svn path=/trunk/; revision=3760
2008-07-30 12:58:11 +00:00
Daniel Veillard
40ec29a56f an XML-1.0 document can't load an 1.1 entity when using entities make sure
* parser.c include/libxml/xmlerror.h: an XML-1.0 document can't load
  an 1.1 entity
* runxmlconf.c: when using entities make sure we load them
Daniel

svn path=/trunk/; revision=3759
2008-07-30 12:35:40 +00:00
Daniel Veillard
34e3f64191 implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stick
* include/libxml/parser.h include/libxml/xmlerror.h parser.c:
  implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10
  to stick to old behaviour
* testapi.c gentest.py: modified slightly and regenerated
* Makefile.am: add testchar
Daniel

svn path=/trunk/; revision=3755
2008-07-29 09:02:27 +00:00
Daniel Veillard
438ebbd59a fx compilation when configured without the reader should fix #513110
* xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h
  python/types.c python/libxml_wrap.h python/libxml.c: fx compilation
  when configured without the reader should fix #513110
* doc/*: regenerated
Daniel

svn path=/trunk/; revision=3743
2008-05-12 12:58:46 +00:00
Daniel Veillard
dee23485f6 added new function xmlSchemaValidCtxtGetParserCtxt based on Holger
* include/libxml/xmlschemas.h xmlschemas.c: added new function
  xmlSchemaValidCtxtGetParserCtxt based on Holger Kaelberer patch
* doc/apibuild.py doc/*: regenerated the doc, chased why the new
  function didn't got any documentation, added more checking in the
  generator
* include/libxml/relaxng.h include/libxml/schematron.h
  include/libxml/xmlschemas.h include/libxml/c14n.h
  include/libxml/xmlregexp.h include/libxml/globals.h
  include/libxml/xmlreader.h threads.c xmlschemas.c: various changes
  and cleanups following the new reports
Daniel

svn path=/trunk/; revision=3738
2008-04-11 12:58:43 +00:00
Daniel Veillard
e43579b2d4 small doc improvement for xmlXPathContext from Jack Jansen, fixes #524759
* include/libxml/xpath.h: small doc improvement for xmlXPathContext
  from Jack Jansen, fixes #524759
* doc/newapi.xsl doc/*: fixed a problem and regenerated the docs
Daniel

svn path=/trunk/; revision=3722
2008-04-03 04:56:04 +00:00
Daniel Veillard
68b6e02bfd lot of out of memory handling fixes from Ashwin work around a problem with
* parser.c: lot of out of memory handling fixes from Ashwin
* elfgcchack.h doc/elfgcchack.xsl: work around a problem with xmlDllMain
* include/libxml/threads.h: indenting cleanups
Daniel

svn path=/trunk/; revision=3720
2008-03-31 09:26:00 +00:00
Daniel Veillard
c4b0debc1e applied patch from Tobias Minich to allow plugin schematron error
* include/libxml/schematron.h include/libxml/xmlerror.h schematron.c:
  applied patch from Tobias Minich to allow plugin schematron error
  reporting in the normal error system, should fix #513998
Daniel

svn path=/trunk/; revision=3707
2008-03-14 12:46:42 +00:00
Daniel Veillard
6f8611fdb4 patch from Julien Charbon to simplify the processing of xmlSetProp()
* include/libxml/xmlerror.h tree.c: patch from Julien Charbon
  to simplify the processing of xmlSetProp()
Daniel

svn path=/trunk/; revision=3694
2008-02-15 08:33:21 +00:00
Rob Richards
e967f0bda3 *use specified calling convention
for xmlDllMain. Old SDKs (VC6) only support InterlockedCompareExchange.
  add xmlDllMain to header for win32 when building for static dll

svn path=/trunk/; revision=3624
2007-06-08 19:36:04 +00:00
William M. Brack
38d452ac1c Fixed typo in xmlCharEncFirstLine pointed out by Mark Rowe (bug #440159)
* encoding.c: Fixed typo in xmlCharEncFirstLine pointed out
  by Mark Rowe (bug #440159)
* include/libxml/xmlversion.h.in: Added check for definition of
  _POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from
  Wendy Doyle and Mark Rowe, bug #346675)
* schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor
  changes to fix compilation warnings - no change to logic.

svn path=/trunk/; revision=3618
2007-05-22 16:00:06 +00:00
Daniel Veillard
a1413b84f7 patch from Richard Jones to save the query part in raw form. Daniel
* uri.c include/libxml/uri.h: patch from Richard Jones to save
  the query part in raw form.
Daniel

svn path=/trunk/; revision=3607
2007-04-26 08:33:28 +00:00
Daniel Veillard
7ef5169074 applied documentation patch from James Dennett Daniel
* include/libxml/xpath.h: applied documentation patch from James Dennett
Daniel

svn path=/trunk/; revision=3595
2007-03-21 16:47:12 +00:00
Aleksey Sanin
d837764002 expose xmlTextReaderSetup function
svn path=/trunk/; revision=3571
2007-01-03 23:13:12 +00:00
Daniel Veillard
602f2bd01a patch from Michael Day on standalone and XML declaration detection, and
* parser.c include/libxml/tree.h: patch from Michael Day on standalone
  and XML declaration detection, and associated documentation change
Daniel
2006-12-04 09:26:04 +00:00
Daniel Veillard
c8338f1a52 preparing release of libxml2-2.6.27 fix a small problem with preproc flags
* NEWS configure.in testapi.c doc//*: preparing release of
  libxml2-2.6.27
* include/libxml/tree.h: fix a small problem with preproc flags
Daniel
2006-10-25 16:06:29 +00:00
Daniel Veillard
f1a27c659e added --html --memory to test htmlReadMemory to test #321632 added various
* xmllint.c: added --html --memory to test htmlReadMemory to
  test #321632
* HTMLparser.c: added various initialization calls which may help
  #321632 but not conclusive
* testapi.c tree.c include/libxml/tree.h: fixed compilation with
  --with-minimum --with-sax1 and --with-minimum --with-schemas
  fixing #326442
Daniel
2006-10-13 22:33:03 +00:00
Daniel Veillard
f4721d66fc fix comment on versions do not spend too much time digging in dumped
* include/libxml/xmlversion.h.in: fix comment on versions
* xmlmemory.c: do not spend too much time digging in dumped memory
Daniel
2006-10-11 21:12:10 +00:00
Daniel Veillard
a37a6ad91a trying to fix entities behaviour when using SAX, had to extend entities
* include/libxml/entities.h entities.c SAX2.c parser.c: trying to
  fix entities behaviour when using SAX, had to extend entities
  content and hack on the entities processing code, but that should
  fix the long standing bug #159219
Daniel
2006-10-10 20:05:45 +00:00
Daniel Veillard
b8efdda0a3 add a new function xmlPathToUri() to provide a clean conversion when
* uri.c include/libxml/uri.h: add a new function xmlPathToUri()
  to provide a clean conversion when setting up a base
* SAX2.c tree.c: use said function when setting up doc->URL
  or using the xmlSetBase function. Should fix #346261
Daniel
2006-10-10 12:37:14 +00:00
Daniel Veillard
681e904e37 fixed a comment applied a patch from Michael Day to add a new function
* xmlsave.c: fixed a comment
* xinclude.c include/libxml/xinclude.h: applied a patch from Michael Day
  to add a new function providing the _private field for the generated
  parser contexts xmlXIncludeProcessFlagsData()
Daniel
2006-09-29 09:16:00 +00:00
Daniel Veillard
34c647cfae exports htmlNewParserCtxt() as Michael Day pointed out this is needed to
* HTMLparser.c include/libxml/HTMLparser.h: exports htmlNewParserCtxt()
  as Michael Day pointed out this is needed to use htmlCtxtRead*()
Daniel
2006-09-21 06:53:59 +00:00
Daniel Veillard
75acfeea32 applied patch from Andrew W. Nosenko to expose if zlib support was
* configure.in parser.c xmllint.c include/libxml/parser.h
  include/libxml/xmlversion.h.in: applied patch from Andrew W. Nosenko
  to expose if zlib support was compiled in, in the header, in the
  feature API and in the xmllint --version output.
Daniel
2006-07-13 06:29:56 +00:00
Kasimier T. Buchcik
631ea8176a Added xmlXPathCompiledEvalToBoolean() to the API and adjusted/added
* xpath.c: Added xmlXPathCompiledEvalToBoolean() to the API and
  adjusted/added xmlXPathRunEval(), xmlXPathRunStreamEval(),
  xmlXPathCompOpEvalToBoolean(), xmlXPathNodeCollectAndTest()
  to be aware of a boolean result request. The new function
  is now used to evaluate predicates.
2006-06-26 16:47:25 +00:00
Kasimier T. Buchcik
978039bbd8 Fixed a bug in xmlDOMWrapAdoptNode(); the tree traversal stopped if the
* tree.c include/libxml/tree.h: Fixed a bug in
  xmlDOMWrapAdoptNode(); the tree traversal stopped if the
  very first given node had an attribute node :-( This was due
  to a missed check in the traversal mechanism.
  Expanded the xmlDOMWrapCtxt: it now holds the namespace map
  used in xmlDOMWrapAdoptNode() and xmlDOMWrapCloneNode() for
  reusal; so the map-items don't need to be created for every
  cloning/adoption. Added a callback function to it for
  retrieval of xmlNsPtr to be set on node->ns; this is needed
  for my custom handling of ns-references in my DOM wrapper.
  Substituted code which created the XML namespace decl on
  the doc for a call to xmlTreeEnsureXMLDecl(). Removed
  those nastly "warnigns" from the docs of the clone/adopt
  functions; they work fine on my side.
2006-06-16 19:46:26 +00:00
Kasimier T. Buchcik
803e37ac2c Clarified in the docs that the tree must not be tried to be modified if
* include/libxml/parser.h: Clarified in the docs that the tree
  must not  be tried to be modified if using the parser flag
  XML_PARSE_COMPACT as suggested by Stefan Behnel
  (#344390).
2006-06-09 19:46:46 +00:00
Kasimier T. Buchcik
5869469f42 Changed the name of the recently added public function
* xpath.c include/libxml/xpath.h runsuite.c:
  Changed the name of the recently added public function
  xmlXPathContextSetObjectCache() to
  xmlXPathContextSetCache(); so a more generic one, in
  case we decide to cache more things than only XPath
  objects.
2006-05-31 12:37:28 +00:00
Kasimier T. Buchcik
e5f810f69b A warning will now be reported in the value of the XSD attribute
* xmlschemas.c: A warning will now be reported in the value of
  the XSD attribute 'schemaLocation' does not consist of tuples
  (namespace-name, document-URI). A warning will be reported
  if a schema document could not be found at the specified
  location (via 'schemaLocation' or
  'noNamespaceSchemaLocation').
* include/libxml/xmlerror.h: Added XML_SCHEMAV_MISC to
  xmlParserErrors.
2006-05-30 09:41:25 +00:00
Kasimier T. Buchcik
a72484438f Added an XPath object cache. It sits on an xmlXPathContext and need to be
* xpath.c include/libxml/xpath.h: Added an XPath object cache.
  It sits on an xmlXPathContext and need to be explicitely
  activated (or deactivated again) with
  xmlXPathContextSetObjectCache(). The cache consists of 5
  lists for node-set, string, number, boolean and misc XPath
  objects. Internally the xpath.c module will use object-
  deposition and -acquisition functions which will try to reuse
  as many XPath objects as possible, and fallback to normal
  free/create behaviour if no cache is available or if the cache
  is full.
* runsuite.c: Adjusted to deactivate the cache for XML Schema
  tests if a cache-creation is turned on by default for the whole
  library, e.g. for testing purposes of the cache. It is
  deactivated here in order to avoid confusion of the memory leak
  detection in runsuite.c.
2006-05-29 16:15:36 +00:00
Daniel Veillard
b2f8f1de7a preparing 2.6.24 release, fixed Python paths at the last moment fix some
* NEWS configure.in doc//*: preparing 2.6.24 release, fixed Python
  paths at the last moment
* relaxng.c testapi.c tree.c: fix some comments
Daniel
2006-04-28 16:30:48 +00:00
Daniel Veillard
05e9db806d applied patches from Aivars Kalvans to make unicode tables const, fixes
* chvalid.c genChRanges.py genUnicode.py xmlunicode.c
  include/libxml/chvalid.h include/libxml/xmlunicode.h: applied
  patches from Aivars Kalvans to make unicode tables const, fixes
  bug #336096, this also updates to Unicode 4.01 final with a couple
  of character ranges fixes.
Daniel
2006-03-27 09:30:13 +00:00