1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-11 12:58:16 +03:00

2886 Commits

Author SHA1 Message Date
Kasimier T. Buchcik
984a9aeddf Removed a memcpy if xmlXPathNodeSetMerge(); it seems we really need to
* xpath.c: Removed a memcpy if xmlXPathNodeSetMerge(); it
  seems we really need to walk the whole list, since those
  nastly namespace nodes need to be added with
  xmlXPathNodeSetDupNs(); thus a pure memcpy is not possible.
  A flag on the node-set indicating if namespace nodes are in
  the set would help here; this is the 3rd flag which would
  be usefull with node-sets. The current flags I have in mind:
  1) Is a node-set already sorted?
     This would allow for rebust and optimizable sorting
     behaviour.
  2) Of what type are the nodes in the set (or of mixed type)?
     This would allow for faster merging of node-sets.
  3) Are namespace nodes in the set?
     This would allow to skipp all the namespace node specific
     special handling. Faster node-set merging if the first
     set is empty; just memcpy the set.
2006-05-24 09:02:35 +00:00
Kasimier T. Buchcik
5691f436d9 Optimization of count(): eliminated sorting (see bug #165547).
* xpath.c: Optimization of count(): eliminated sorting
  (see bug #165547). Optimization of XPATH_OP_FILTER if the
  predicate is a [1] (disable with XP_OPTIMIZED_FILTER_FIRST if
  it produces trouble). Tiny opt in xmlXPathNodeSetMerge().
2006-05-22 15:19:55 +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
Kasimier T. Buchcik
64f7e1a85f Substituted all remaining calls to xmlXPathCmpNodes() for
* xpath.c: Substituted all remaining calls to xmlXPathCmpNodes()
  for xmlXPathCmpNodesExt(). Tiny further enhancement of
  xmlXPathCmpNodesExt(). Added additional checks in various code
  parts to avoid calling sorting or merging functions if the
  node-set(s) don't need them; i.e., if they are empty or contain
  just one node.
2006-05-19 19:59:54 +00:00
Kasimier T. Buchcik
2bdabbd711 Optimized the comparison for non-element nodes in xmlXPathCmpNodesExt();
* xpath.c: Optimized the comparison for non-element nodes
  in xmlXPathCmpNodesExt(); the comparison is used for sorting
  of node-sets. This enhancement is related to bug #165547.
  There are other places where the old comparison function
  xmlXPathCmpNodes() is still called, but I currently don't
  know exactly what those calls are for; thus if they can be
  substituted (if it makes sense) for the new function.
2006-05-19 11:26:15 +00:00
Kasimier T. Buchcik
6ed2eb47fc Applied patch from Rob Richards, fixing a potential memory leak in
* xpath.c: Applied patch from Rob Richards, fixing a potential
  memory leak in xmlXPathTryStreamCompile(), when a list of
  namespaces was assigned to the XPath compilation context;
  here a new namespace list was created and passed to
  xmlPatterncompile(); but this list was not freed afterwards.
  Additionally we avoid now in xmlXPathTryStreamCompile() to
  compile the expression, if it has a colon - indicating
  prefixed name tests - and no namespace list was given. The
  streaming XPath mechanism needs a namespace list at
  compilation time (unlike normal XPath, where we can bind
  namespace names to prefixes at execution time).
* pattern.c: Enhanced to use a string dict for local-names,
  ns-prefixes and and namespace-names.
  Fixed xmlStreamPushInternal() not to use string-pointer
  comparison if a dict is available; this won't work, since
  one does not know it the given strings originate from the
  same dict - and they normally don't do, since e.g.
  namespaces are hold on xmlNs->href. I think this would be
  worth an investigation: if we can add a @doc field to xmlNs
  and put the @href in to a additionan namespace dict hold
  in xmlDoc. Daniel will surely not like this idea :-) But
  evaluation of tons of elements/attributes in namespaces
  with xmlStrEqual() isn't the way we should go forever.
2006-05-16 15:13:37 +00:00
Kasimier T. Buchcik
9b02e295c1 Fixed bug #341337, reported by David Grohmann. The code expected a node
* xmlschemas.c: Fixed bug #341337, reported by David Grohmann.
  The code expected a node (xmlNodePtr) on the info for a
  non-existent default attribute, which clearly cannot be
  expected, since the attribute does not exist. I can only
  guess that this sneaked trying to eliminate the query
  for the owner-element, which is unavoidable actually.
  Note that creation of default attributes won't have an
  effect if validating via SAX/XMLReader; i.e., the processor
  won't fire additional start-attribute events (I'm not even
  sure if Libxml2 has such a SAX-event; I think it hands them
  all over in the start-element event).
2006-05-11 16:25:44 +00:00
Kasimier T. Buchcik
92b394fcf3 Fixed bug #341150, reported by Michael Romer. In
* xmlschemas.c: Fixed bug #341150, reported by Michael Romer.
  In xmlSchemaBuildContentModelForSubstGroup(),
  xmlAutomataNewOnceTrans2() was incorrectly used instead of
  xmlAutomataNewTransition2() to mimic a xs:choice for
  substitution-groups.
* test/schemas/subst-group-1_1.xsd
  test/schemas/subst-group-1_0.xml
  result/schemas/subst-group-1_0_1
  result/schemas/subst-group-1_0_1.err: Added regression test
  supplied by Michael Romer for bug #341150.
2006-05-09 19:59:54 +00:00
William M. Brack
7418fad283 fixed typo in last commit 2006-05-06 03:25:06 +00:00
William M. Brack
700f987fff Fixed compilation error (bug 340765) reported by dmacks with patch
* relaxng.c: Fixed compilation error (bug 340765) reported by
  dmacks with patch supplied by Graham Bennett.
2006-05-06 03:16:22 +00:00
Kasimier T. Buchcik
146a982e73 We'll raise an internal error and stop validation now when an entity is
* xmlschemas.c: We'll raise an internal error and stop
  validation now when an entity is found in the instance
  document, since we don't support automatic entity
  substitution by the schema processor (yet?) -
  see bug #340316, reported by Nick Wellnhofer.
2006-05-04 17:19:07 +00:00
Daniel Veillard
d7d07488a9 applied another Python detection patch from Joseph Sacco cleanup the
* configure.in: applied another Python detection patch from Joseph Sacco
* libxml.spec.in: cleanup the changelog section, asciifies the spec file
  too
Daniel
2006-05-03 13:15:44 +00:00
Daniel Veillard
0b3099545c fix a mix of code and declarations showing up on Windows patch from
* xmlIO.c: fix a mix of code and declarations showing up on Windows
  patch from Kjartan Maraas, fixing #340404
Daniel
2006-05-02 20:34:38 +00:00
Daniel Veillard
df750627d6 fixing bug #340398 xmlCharEncOutFunc writing to input buffer Daniel
* encoding.c: fixing bug #340398 xmlCharEncOutFunc writing to
  input buffer
Daniel
2006-05-02 12:24:06 +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
f741601cc7 applied patch from Roland Schwingel to allow UTF-8 file paths on Windows
* xmlIO.c: applied patch from Roland Schwingel to allow UTF-8
  file paths on Windows
Daniel
2006-04-27 08:15:20 +00:00
Daniel Veillard
02c1f23297 patch from Jason Viers for line breaks after EndPI Daniel
* xmlwriter.c: patch from Jason Viers for line breaks after EndPI
Daniel
2006-04-27 08:10:25 +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
968d6439e6 applied patch from Gary Coady to really make sure xmllint --nonet would
* xmllint.c: applied patch from Gary Coady to really make sure
  xmllint --nonet would not reach the network, should fix #337483.
Daniel
2006-04-25 16:17:53 +00:00
Daniel Veillard
8492ba1c0b applied patch from Joseph Sacco changing slightly the python detection
* configure.in: applied patch from Joseph Sacco changing slightly
  the python detection scheme should fix bug #338526
Daniel
2006-04-25 12:52:12 +00:00
Daniel Veillard
3b1478b7e8 fix the error message for invalid code point in content c.f. bug #339311
* parser.c: fix the error message for invalid code point in content
  c.f. bug #339311
Daniel
2006-04-24 08:50:10 +00:00
Kasimier T. Buchcik
b63d2fab2d Fixed incorrect validation of restricted enumerations. Added related
* xmlschemas.c test/schemas/restriction-enum-1*
  result/schemas/restriction-enum-1*: Fixed incorrect
  validation of restricted enumerations. Added related
  regression tests.
2006-04-19 11:20:49 +00:00
Daniel Veillard
cdf59aa58f fixing a deallocation problem in xmlSchemaAddSchemaDoc() in case of
* xmlschemas.c: fixing a deallocation problem in xmlSchemaAddSchemaDoc()
  in case of errors, should fix bug #338303
Daniel
2006-04-13 07:50:11 +00:00
Daniel Veillard
3f845a99b9 fixing a deallocation problem in xmlRelaxNGParse() in case of errors,
* relaxng.c: fixing a deallocation problem in xmlRelaxNGParse()
  in case of errors, should fix bug #338306
Daniel
2006-04-13 07:33:44 +00:00
Daniel Veillard
bf95fd2390 applied man page improvements from Daniel Leidert Daniel
* doc/xmlcatalog.1 doc/xmlcatalog_man.xml doc/xmllint.1 doc/xmllint.xml:
  applied man page improvements from Daniel Leidert
Daniel
2006-04-06 08:22:51 +00:00
Daniel Veillard
b294717b25 removed unused code or variables, from Stefan Kost fixing #336163 and
* xmlschemas.c: removed unused code or variables, from Stefan Kost
  fixing #336163 and #336164
Daniel
2006-03-27 09:45:01 +00:00
Daniel Veillard
fef73a55c2 applied patch from Stefan Kost fixing #336160 Daniel
* xmlschemas.c: applied patch from Stefan Kost fixing #336160
Daniel
2006-03-27 09:38:57 +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
Daniel Veillard
8ea29c48f0 fixed bug #335603 and resync'ed genChRanges.py to the expected output.
* chvalid.c genChRanges.py include/libxml/chvalid.h: fixed bug
  #335603 and resync'ed genChRanges.py to the expected output.
Daniel
2006-03-26 22:52:40 +00:00
Daniel Veillard
54eb0243c4 applied patch from Youri Golovanov fixing bug #316338 and adding a couple
* xmlregexp.c: applied patch from Youri Golovanov fixing bug
  #316338 and adding a couple of optimizations in the regexp
  compilation engine.
* test/regexp/bug316338 result/regexp/bug316338: added regression
  tests based on the examples provided in the bug report.
Daniel
2006-03-21 23:17:57 +00:00
Daniel Veillard
aac7c68e87 fix a few warning raised by gcc-4.1 and latests changes Daniel
* c14n.c encoding.c xmlschemas.c xpath.c xpointer.c: fix a few
  warning raised by gcc-4.1 and latests changes
Daniel
2006-03-10 13:40:16 +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
Daniel Veillard
14b5643947 more cleanups based on coverity reports. Daniel
* relaxng.c xmlschemas.c xmlschemastypes.c: more cleanups based
  on coverity reports.
Daniel
2006-03-09 18:41:40 +00:00
Daniel Veillard
2728f845c5 more cleanups based on coverity reports. Daniel
* SAX2.c catalog.c encoding.c entities.c example/gjobread.c
  python/libxml.c: more cleanups based on coverity reports.
Daniel
2006-03-09 16:49:24 +00:00
Daniel Veillard
30e7607b7a a bunch of small cleanups based on coverity reports. Daniel
* HTMLparser.c parser.c parserInternals.c pattern.c uri.c: a bunch
  of small cleanups based on coverity reports.
Daniel
2006-03-09 14:13:55 +00:00
Daniel Veillard
e68e276653 added schematron as pointed out by Eric Zurcher Daniel
* win32/Makefile.bcb: added schematron as pointed out by Eric Zurcher
Daniel
2006-03-09 08:43:32 +00:00
Daniel Veillard
4f27a8a462 fix Red Hat bug #184170 Daniel
* xml2-config.in: fix Red Hat bug #184170
Daniel
2006-03-07 09:00:20 +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
Rob Richards
04bffc028d fix HTML attribute ID checking for input element. Maintain current
* valid.c: fix HTML attribute ID checking for input element.
  Maintain current attribute "name" behavior for now.
2006-03-03 16:44:37 +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
Daniel Veillard
d3ff7ef6d3 workaround HP-UX compiler bug by Rick Jones Daniel
* xpath.c: workaround HP-UX compiler bug by Rick Jones
Daniel
2006-02-27 19:43:17 +00:00
Daniel Veillard
745648bca8 remove a tab, as pointed out on IRC Daniel
* python/libxml2.py: remove a tab, as pointed out on IRC
Daniel
2006-02-27 09:59:30 +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
Daniel Veillard
27bec1461b Martin Cole pointed out a bug in xmlCatalogAdd() if /etc/xml/catalog
* catalog.c: Martin Cole pointed out a bug in xmlCatalogAdd()
  if /etc/xml/catalog doesn't exist.
Daniel
2006-02-24 20:22:27 +00:00
Daniel Veillard
d463c99fd8 updated the Ruby bindings links, and regenerated the docs. Daniel
* doc//*: updated the Ruby bindings links, and regenerated the
  docs.
Daniel
2006-02-23 22:07:59 +00:00
Daniel Veillard
890b5492c6 improve catalog debugging message patch from Rick Jones Daniel
* catalog.c: improve catalog debugging message patch from Rick Jones
Daniel
2006-02-23 08:14:00 +00:00
Daniel Veillard
634ec27a80 Nic Ferrier found debug statement left in the XPath conversion code Daniel
* python/types.c: Nic Ferrier found debug statement left in the
  XPath conversion code
Daniel
2006-02-22 15:11:32 +00:00
Daniel Veillard
961bfc149c small man page improvements from Daniel Leidert Daniel
* doc/xmllint.1 doc/xmllint.xml: small man page improvements from
  Daniel Leidert
Daniel
2006-02-21 19:24:04 +00:00
Kasimier T. Buchcik
4c0aa16e43 Fixed a side-effect of the previous XSI bugfix: The constructor needs a
* xmlschemas.c: Fixed a side-effect of the previous XSI bugfix:
  The constructor needs a bucket to be assigned during component
  fixup.
2006-02-20 14:47:08 +00:00
Kasimier T. Buchcik
1869be5690 Fixed xs:boolean to reject the empty string (reported by Bas Driessen on
* xmlschemas.c xmlschemastypes.c: Fixed xs:boolean to reject
  the empty string (reported by Bas Driessen on the mailing-list).
  Fixed schema XSI-acquisition and construction: the schemata
  (xmlSchema) didn't get the targetNamespace in some cases, thus
  the component resolution mechanism failed to work. The XSI
  stuff needs to be tested more intensively; think about how
  to test this for regression.
2006-02-20 13:37:55 +00:00