1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00
Commit Graph

381 Commits

Author SHA1 Message Date
Daniel Veillard
c9923324e9 Richard Jones reported xmlBufferAdd (buf, "", -1), fixing it Daniel
* tree.c: Richard Jones reported xmlBufferAdd (buf, "", -1), fixing it
Daniel

svn path=/trunk/; revision=3605
2007-04-24 18:12:06 +00:00
Daniel Veillard
0e05f4c2e0 applied documentation patches from Markus Keim fixed one bug and added a
* tree.c: applied documentation patches from Markus Keim
* xmlregexp.c: fixed one bug and added a couple of optimisations
  while working on bug #362989
Daniel
2006-11-01 15:33:04 +00:00
Daniel Veillard
26a45c815a fix comment for xmlDocSetRootElement c.f. #351981 order XPath elements
* tree.c: fix comment for xmlDocSetRootElement c.f. #351981
* xmllint.c: order XPath elements when using --shell
Daniel
2006-10-20 12:55:34 +00:00
Daniel Veillard
b5f1197ce2 fixing bug #344390 with xmlReconciliateNs Daniel
* tree.c: fixing bug #344390 with xmlReconciliateNs
Daniel
2006-10-14 08:46:40 +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
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
Rob Richards
a02f199d7b xmlTextConcat works with comments and PI nodes (bug #355962). fix
* tree.c: xmlTextConcat works with comments and PI nodes (bug #355962).
* parser.c: fix resulting tree corruption when using XML namespace
  with existing doc in xmlParseBalancedChunkMemoryRecover.
2006-09-16 14:04:26 +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
43ceb1ec88 Got rid of a compiler warning in xmlGetNodePath().
* tree.c: Got rid of a compiler warning in xmlGetNodePath().
2006-06-12 11:08:18 +00:00
Kasimier T. Buchcik
d38c63f329 Fixed xmlGetNodePath() to generate the node test "*" for elements in the
* tree.c: Fixed xmlGetNodePath() to generate the node test "*"
  for elements in the default namespace, rather than generating
  an unprefixed named node test and loosing the namespace
  information.
2006-06-12 10:58:24 +00:00
Rob Richards
a512d76edc Revert behavior change in xmlSetProp to handle attributes with colons in
* tree.c: Revert behavior change in xmlSetProp to handle attributes
  with colons in name and no namespace.
2006-05-22 11:34:44 +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
973dceb768 fix compilation without tree Daniel
* tree.c: fix compilation without tree
Daniel
2006-04-25 20:22:20 +00:00
Daniel Veillard
11ce4004d8 end of first pass on coverity reports. Daniel
* runtest.c schematron.c testAutomata.c tree.c valid.c xinclude.c
  xmlcatalog.c xmlreader.c xmlregexp.c xpath.c: end of first
  pass on coverity reports.
Daniel
2006-03-10 00:36:23 +00:00
Kasimier T. Buchcik
4435341da4 Simplified usage of the internal xmlNsMap. Added a "strict" lookup for
* tree.c: Simplified usage of the internal xmlNsMap. Added a
  "strict" lookup for namespaces based on a prefix. Fixed a
  namespace processing issue in the clone-node function, which
  occured if a @ctxt argument was given.
2006-03-06 13:26:16 +00:00
Kasimier T. Buchcik
30f874d7e6 Bundled lookup of attr-nodes and retrieving their values into the
* tree.c: Bundled lookup of attr-nodes and retrieving their
  values into the functions xmlGetPropNodeInternal() and
  xmlGetPropNodeValueInternal(). Changed relevant code
  to use those functions.
2006-03-02 18:04:29 +00:00
Rob Richards
6581512a0c Fix the add sibling functions when passing attributes. Modify testing for
* tree.c: Fix the add sibling functions when passing attributes.
  Modify testing for ID in xmlSetProp.
  No longer remove IDness when unlinking or replacing an attribute.
2006-02-25 17:13:33 +00:00
Kasimier T. Buchcik
eb46870850 Fixed bug #328896 reported by Liron. The path for text- and
* tree.c: Fixed bug #328896 reported by Liron. The path
  for text- and CDATA-section-nodes was computed incorrectly
  in xmlGetNodePath().
2006-02-15 10:57:50 +00:00
Kasimier T. Buchcik
cab801b163 Added an initial version of xmlDOMWrapCloneNode() to the API. It will be
* tree.c: Added an initial version of xmlDOMWrapCloneNode() to
  the API. It will be used to reflect DOM's Node.cloneNode and
  Document.importNode methods.
  The pros: 1) non-recursive, 2) optimized ns-lookup
  (mostly pointer comparison), 3) user defined ns-lookup,
  4) save ns-processing. The function is in an unfinished
  and experimental state and should be only used to test it.
2006-02-03 16:35:27 +00:00
Kasimier T. Buchcik
e8f8d75166 Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt the previous addition
* tree.c: Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt
  the previous addition of the removal of redundant ns-decls.
2006-02-02 12:13:07 +00:00
Kasimier T. Buchcik
e01b2fd776 Enhanced xmlDOMWrapReconcileNamespaces() to remove redundant ns-decls if
* tree.c: Enhanced xmlDOMWrapReconcileNamespaces() to remove
  redundant ns-decls if the option XML_DOM_RECONNS_REMOVEREDUND
  was given. Note that I haven't moved this option to the
  header file yet; so just call this function with an @option
  of 1 to test the behaviour.
2006-02-01 16:36:13 +00:00
Rob Richards
77b92ff6a8 fix bug #322136 in xmlNodeBufGetContent when entity ref is a child of an
* tree.c: fix bug #322136 in xmlNodeBufGetContent when entity ref is
  a child of an element (fix by Oleksandr Kononenko).
* HTMLtree.c include/libxml/HTMLtree.h: Add htmlDocDumpMemoryFormat.
2005-12-20 15:55:14 +00:00
Rob Richards
19dc961ec1 add additional checks to prevent tree corruption. fix problem copying
* tree.c: add additional checks to prevent tree corruption. fix problem
  copying attribute using xmlDocCopyNode from one document to another.
2005-10-28 16:15:16 +00:00
Rob Richards
c342ec6d6d fix issue adding non-namespaced attributes in xmlAddChild(),
* tree.c: fix issue adding non-namespaced attributes in xmlAddChild(),
  xmlAddNextSibling() and xmlAddPrevSibling() (bug #319108) - part 1.
2005-10-25 00:10:12 +00:00
Kasimier T. Buchcik
65c2f1d78a Silenced intel compiler warnings (reported by Kjartan Maraas, bug
* tree.c pattern.c: Silenced intel compiler warnings (reported
  by Kjartan Maraas, bug #318517).
* xmlschemas.c: The above changes in pattern.c revealed an
  inconsistency wrt IDCs: we now _only_ pop XPath states, if
  we really pushed them beforehand; this was previously not
  checked for the case when we discover an element node to be
  invalid wrt the content model.
  Fixed segfault in xmlSchemaGetEffectiveValueConstraint().
2005-10-17 12:39:58 +00:00
Daniel Veillard
54f9a4f508 fixing a number of issues raised by xml:id but more generally related to
* SAX2.c tree.c valid.c: fixing a number of issues raised by xml:id
  but more generally related to attributes and ID handling, fixes
  #314358 among other things
Daniel
2005-09-03 13:28:24 +00:00
Daniel Veillard
8874b94cd2 added a parser XML_PARSE_COMPACT option to allocate small text nodes (less
* HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c
  xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h:
  added a parser XML_PARSE_COMPACT option to allocate small
  text nodes (less than 8 bytes on 32bits, less than 16bytes on 64bits)
  directly within the node, various changes to cope with this.
* result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: this
  slightly change the output
Daniel
2005-08-25 13:19:21 +00:00
Daniel Veillard
73da77e0d7 line numbers are now carried by most nodes, fixing xmlGetLineNo() c.f. bug
* SAX2.c tree.c: line numbers are now carried by most nodes, fixing
  xmlGetLineNo() c.f. bug #309205
Daniel
2005-08-24 14:05:37 +00:00
Daniel Veillard
bca3ad25f9 fixed compilation when configured --without-sax1 and other cleanups fixes
* SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c
  include/libxml/SAX2.h include/libxml/xmlregexp.h: fixed compilation
  when configured --without-sax1 and other cleanups fixes bug #172683
* doc/* elfgcchack.h: regenerated
Daniel
2005-08-23 22:14:02 +00:00
Daniel Veillard
365c806eb5 applied patch from Alexander Pohoyda fixing xmlGetNodePath on namespaced
* tree.c: applied patch from Alexander Pohoyda fixing xmlGetNodePath
  on namespaced attributes #310417.
Daniel
2005-07-19 11:31:55 +00:00
Daniel Veillard
39e5c89016 fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing
* testapi.c tree.c: fixing a leak detected by testapi in
  xmlDOMWrapAdoptNode, and fixing another side effect in testapi
  seems to pass tests fine now.
* include/libxml/parser.h parser.c: xmlStopParser() is no more limited
  to push mode
* error.c: remove a warning
* runtest.c xmllint.c: avoid compilation errors if only some parts
  of the library are compiled in.
Daniel
2005-07-03 22:48:50 +00:00
Daniel Veillard
7e21fd108c fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing
* testapi.c tree.c: fixing a leak detected by testapi in
  xmlDOMWrapAdoptNode, and fixing another side effect in testapi
  seems to pass tests fine now.
Daniel
2005-07-03 21:44:07 +00:00
Daniel Veillard
6b6d680901 fixing compilations when disabling parts of the library at configure time.
* runsuite.c runtest.c tree.c: fixing compilations when
  disabling parts of the library at configure time.
Daniel
2005-07-03 21:00:34 +00:00
Daniel Veillard
304e78c6b4 fix bug raised by zamez on IRC regenerated, seems to pop-up leaks in new
* parserInternals.c: fix bug raised by zamez on IRC
* testapi.c: regenerated, seems to pop-up leaks in new tree functions
* tree.c: added comments missing.
* doc/*: regenerated
Daniel
2005-07-03 16:19:41 +00:00
Kasimier T. Buchcik
4d9c948fd7 Added allocation/deallocation functions for the DOM-wrapper context.
* tree.c include/libxml/tree.h: Added allocation/deallocation
  functions for the DOM-wrapper context.
2005-06-27 15:04:46 +00:00
Kasimier T. Buchcik
017264fe4a Commented the new functions to be experimental.
* tree.c: Commented the new functions to be experimental.
2005-06-27 13:45:24 +00:00
Kasimier T. Buchcik
bc0e3c6b1a Added xmlDOMWrapReconcileNamespaces(), xmlDOMWrapAdoptNode() and
* tree.c include/libxml/tree.h: Added
  xmlDOMWrapReconcileNamespaces(), xmlDOMWrapAdoptNode() and
  xmlDOMWrapRemoveNode() to the API. These are functions intended
  to be used with DOM-wrappers.
2005-06-27 10:28:23 +00:00
Daniel Veillard
da6f4af38a applied patch from Rob Richards for removal of ID (and xml:id) applied
* tree.c valid.c: applied patch from Rob Richards for removal
  of ID (and xml:id)
* xmlreader.c: applied patch from James Wert implementing
  xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml
Daniel
2005-06-20 17:17:54 +00:00
Daniel Veillard
64d7d123a0 applied patch for replaceNode from Brent Hendricks Daniel
* tree.c: applied patch for replaceNode from Brent Hendricks
Daniel
2005-05-11 18:03:42 +00:00
Daniel Veillard
c587bce5c9 fixed bug #303682 of a leak reported by Malcolm Rowe Daniel
* tree.c: fixed bug #303682 of a leak reported by Malcolm Rowe
Daniel
2005-05-10 15:28:08 +00:00
Daniel Veillard
5d4644ef6e revamped the elfgcchack.h format to cope with gcc4 change of aliasing
* doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h
  format to cope with gcc4 change of aliasing allowed scopes, had
  to add extra informations to doc/libxml2-api.xml to separate
  the header from the c module source.
* *.c: updated all c library files to add a #define bottom_xxx
  and reimport elfgcchack.h thereafter, and a bit of cleanups.
* doc//* testapi.c: regenerated when rebuilding the API
Daniel
2005-04-01 13:11:58 +00:00
Daniel Veillard
5cd3e8c494 cleanup of the Prop related functions and xmlNewNodeEatName by Rob
* tree.c: cleanup of the Prop related functions and xmlNewNodeEatName
  by Rob Richards
Daniel
2005-03-27 11:25:28 +00:00
Kasimier T. Buchcik
ba70cc0de7 Changed xmlSearchNsByHref to call xmlNsInScope with the prefix instead of
* 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.
2005-02-28 10:28:21 +00:00
Daniel Veillard
b6b36d37f2 applied patch to xmlSetNsProp from Mike Hommey Daniel
* tree.c: applied patch to xmlSetNsProp from Mike Hommey
Daniel
2005-02-09 16:48:53 +00:00
Daniel Veillard
0996a162c9 fixed the namespaces support fixed xmlGetNodePath when namespaces are used
* 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
Daniel
2005-02-05 14:00:10 +00:00
Daniel Veillard
f59507d428 fixed xmlCopyDoc to also copy the doc->URL as pointed by Martijn Faassen
* tree.c: fixed xmlCopyDoc to also copy the doc->URL as pointed
  by Martijn Faassen
Daniel
2005-01-27 17:26:49 +00:00
William M. Brack
21e4ef20f6 Re-examined the problems of configuring a "minimal" library.
Synchronized the header files with the library code in order
to assure that all the various conditionals (LIBXML_xxxx_ENABLED)
were the same in both.  Modified the API database content to more
accurately reflect the conditionals.  Enhanced the generation
of that database.  Although there was no substantial change to
any of the library code's logic, a large number of files were
modified to achieve the above, and the configuration script
was enhanced to do some automatic enabling of features (e.g.
--with-xinclude forces --with-xpath).  Additionally, all the format
errors discovered by apibuild.py were corrected.
* configure.in: enhanced cross-checking of options
* doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml,
  doc/libxml2-api.xml, gentest.py: changed the usage of the
  <cond> element in module descriptions
* elfgcchack.h, testapi.c: regenerated with proper conditionals
* HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c,
  testSAX.c: cleaned up conditionals
* include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h,
  hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h,
  valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]:
  synchronized the conditionals with the corresponding module code
* doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c:
  added additional conditions required for compilation
* doc/*.html, doc/html/*.html: rebuilt the docs
2005-01-02 09:53:13 +00:00
William M. Brack
1d8c9b291e fixed to skip (if necessary) the BOM for encoding 'utf-16'. Completes the
* parserInternals.c: fixed to skip (if necessary) the BOM for
  encoding 'utf-16'.  Completes the fix for bug #152286.
* tree.c, parser.c: minor warning cleanup, no change to logic
2004-12-25 10:14:57 +00:00
Daniel Veillard
d5cc0f7f51 augmented types supported a number of new bug fixes and documentation
* gentest.py testapi.c: augmented types supported
* HTMLtree.c tree.c xmlreader.c xmlwriter.c: a number of new
  bug fixes and documentation updates.
Daniel
2004-11-06 19:24:28 +00:00
Daniel Veillard
27f2010023 more coverage more fixes Daniel
* gentest.py testapi.c: more coverage
* nanoftp.c tree.c: more fixes
Daniel
2004-11-05 11:50:11 +00:00