IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:
https://www.w3.org/TR/xptr-xpointer/
The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.
If you configure --with-legacy, old symbols are retained for ABI
compatibility.
Introduce xmlXPathSetErrorHandler allowing to set a structured error
handler for an XPath context.
Remove arguments from memory error handlers.
Use xmlRaiseMemoryError.
Remove TODO, STRANGE and CHECK_CTXT macros.
Remove remaining uses of xmlGenericError.
There's too much code which assumes that if ctxt->value is non-null,
a value can be successfully popped off the stack. This assumption can
break with stack frames when malloc fails.
Instead of trying to fix all call sites, remove the stack frame logic.
It only offered very little protection against misbehaving extension
functions. We already check the stack size after a function call which
should be enough.
Found by OSS-Fuzz.
Add a new configuration flag that controls whether the outdated support
for XPointer locations (ranges and points) is enabled.
--with-xptr-locs # Autotools
LIBXML2_WITH_XPTR_LOCS # CMake
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:
https://www.w3.org/TR/xptr-xpointer/
The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.
The flag defaults to "off" and support for this extensions has to be
requested explicitly. The relevant API functions are deprecated.
These functions shouldn't be part of the public API. Most init
functions are only thread-safe when called from xmlInitParser. Global
variables should only be cleaned up by calling xmlCleanupParser.
Useful to avoid call stack overflows when fuzzing. Note that parsing a
parenthesized expression currently consumes more than 10 stack frames,
so this limit should be set rather low.
Optionally limit the maximum numbers of XPath operations when evaluating
an expression. Useful to avoid timeouts when fuzzing. The following
operations count towards the limit:
- XPath operations
- Location step iterations
- Union operations
Enabled by setting opLimit to a non-zero value. Note that it's the user's
responsibility to reset opCount. This allows to enforce the operation
limit across multiple reuses of an XPath context.
This patch adds xmlXPathSetContextNode and xmlXPathNodeEval,
which make it easier to evaluation XPath expressions with a
context node other than the document root without poking about
inside the internals of the context.
This patch is compile-tested only, and is my first libxml2
contribution, so please go easy.
Signed-off-by: Alex Bligh <alex@alex.org.uk>
* 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
* 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.
* 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.
* 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.
* pattern.c include/libxml/pattern.h: changed xmlPatterncompile
signature to pass an int and not an enum since it can generate
ABI compat troubles.
* include/libxml/schematron.h schematron.c: adding the new
schematron code, work in progress lots to be left and needing
testing
* include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in
Makefile.am configure.in: integration of schematron into the
build
* xpath.c include/libxml/xpath.h: adding flags to control compilation
options right now just XML_XPATH_CHECKNS.
Daniel
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
* xmllint.c xpath.c include/libxml/xpath.h
include/libxml/xpathInternals.h python/libxml.c
python/libxml_wrap.h: trying to remove some warning when compiling
on Fedora Core 3 and 64bits
Daniel
* elfgcchack.h doc/elfgcchack.xsl libxml.h: hack based on Arjan van de
Ven suggestion to reduce ELF footprint and generated code. Based on
aliasing of libraries function to generate direct call instead of
indirect ones
* doc/libxml2-api.xml doc/Makefile.am doc/apibuild.py: added automatic
generation of elfgcchack.h based on the API description, extended
the API description to show the conditionals configuration flags
required for symbols.
* nanohttp.c parser.c xmlsave.c include/libxml/*.h: lot of cleanup
* doc/*: regenerated the docs.
Daniel
* doc/examples/*: added io1.c an example ox xmlIO usage and io1.res
test result, fixed a awful lot of memory leaks showing up in
testWriter.c, changed the examples and the Makefiles to test
memory leaks.
* xmlwriter.c: fixed a memory leak
* Makefile.am: run the doc/examples regression tests as part of
make tests
* xpath.c include/libxml/xpath.h: added xmlXPathCtxtCompile() to
compile an XPath expression within a context, currently the goal
is to be able to reuse the XSLT stylesheet dictionnary, but this
opens the door to others possible optimizations.
* dict.c include/libxml/dict.h: added xmlDictCreateSub() which allows
to build a new dictionnary based on another read-only dictionnary.
This is needed for XSLT to keep the stylesheet dictionnary read-only
while being able to reuse the strings for the transformation
dictionnary.
* xinclude.c: fixed a dictionnar reference counting problem occuring
when document parsing failed.
* testSAX.c: adding option --repeat for timing 100times the parsing
* doc/* : rebuilt all the docs
Daniel
* include/libxml/*.h include/libxml/*.h.in: modified the file
header to add more informations, painful...
* genChRanges.py genUnicode.py: updated to generate said changes
in headers
* doc/apibuild.py: extract headers, add them to libxml2-api.xml
* *.html *.xsl *.xml: updated the stylesheets to flag geprecated
APIs modules. Updated the stylesheets, some cleanups, regenerated
* doc/html/*.html: regenerated added back book1 and libxml-lib.html
Daniel
* error.c include/libxml/xmlerror.h include/libxml/xpath.h
include/libxml/xpathInternals.h xpath.c: cleaning up XPath
error reporting that time.
* threads.c: applied the two patches for TLS threads
on Windows from Jesse Pelton
* parser.c: tiny safety patch for xmlStrPrintf() make sure the
return is always zero terminated. Should also help detecting
passing wrong buffer size easilly.
* result/VC/* result/valid/rss.xml.err result/valid/xlink.xml.err:
updated the results to follow the errors string generated by
last commit.
Daniel
* xpath.c include/libxml/xpath.h: first part of the fix to
performance bug #108905, adds xmlXPathOrderDocElems() providing
document order for nodes.
* python/libxml.c: Python may require TRIO as Albert Chin pointed out
Daniel
* xpath.c: fixing #61290 "namespace nodes have no parent"
long standing divergence from the XPath REC. NodeSets
simply hold a copy of namespace nodes and those node ->next
points to the parent (which may not be the node carrying the
definition).
* include/libxml/xpath.h: flagged but didn't added a possible
speedup
* DOCBparser.c HTMLparser.c: removed some warnings from push
parser due to new state being added.
* tree.c: new fix from Boris Erdmann
* configure.in c14n.c include/libxml/c14n.h testC14N.c: added
the XML Canonalization support from Aleksey Sanin
Daniel
* doc/libxml2-api.xml doc/parsedecl.py: Build a new version
hopefully near complete and fully documented of the API in XML
* HTMLtree.c SAX.c debugXML.c error.c globals.c parser.c tree.c
xmlIO.c xmlmemory.c include/libxml/catalog.h include/libxml/hash.h
include/libxml/list.h include/libxml/parser.h include/libxml/tree.h
include/libxml/parserInternals.h include/libxml/valid.hi
include/libxml/xmlIO.h include/libxml/xmlerror.hi
include/libxml/xmlmemory.h include/libxml/xmlversion.h.ini
include/libxml/xpath.h include/libxml/xpathInternals.h:
Cleaned up the doc comments a lot in the process, the interface
coverage is now 100%
Daniel
* xpath.c: hum, restrict the integer usage gcc bug workaround
to only gcc compilers so that other architecture don't get
penalized by this limitation.
* include/libxml/xpath.h: small typo fix from Heiko W. Rupp
Daniel
* Makefile.am catalog.c xmlcatalog.c include/libxml/catalog.h:
more work on the XML catalog support.
* parser.c include/libxml/parser.h: small cleanup seems using
list as a public parameter name can give portability troubles
* trionan.c trionan.h xpath.c include/libxml/trionan.h
include/libxml/xpath.h include/libxml/Makefile.am: removed
trionan from the libxml API, added xmlXPathIsInf and xmlXPathIsNaN
wrappers
Daniel
* xpath.c include/libxml/xpath.h: fixed a serious memory problen
when walking the namespace axis showing up in
libxst/tests/general/bug-12
* xmlmemory.c: added the possibility to trace a given block
defined by its address
Daniel
Cleanup, cleanup ..
* configure.in Makefile.am: removed libxml softlink for good
* include/libxml/*.h *.c doc/Makefile.am: cleanup to get
100% coverage by gtk-doc
Daniel
* include/libxml/xpath{,Internals}.h xpath.c: added a more
convenient extension API for value and context managing
Now handles external objects through xmlXPathPopExternal,
xmlXPathWrapExternal and xmlXPathReturnExternal.
Added functions for sets operations (intersection, etc.)
lot of optimization work, results in significant improvements
when handling really complex XPath queries. Add a small optimizer
for unions, improve [n] and [last()], avoid some costly ops.
Daniel
* AUTHORS: added William and Bjorn
* include/libxml/*.h *.c README doc/*.html etc.: changed old email to
daniel@veillard.com hopefully I won't have to do this again
* doc/Makefile.am doc/html/*.html: cleanup makefile, checked that
docs can be rebuilt cleanly now
* include/libxml/xml*version.h*: removed include/libxml/xmlversion.h
from CVs it's generated, added include/libxml/xmlwin32version.h
also generated but which should change far less frequently.
* catalog.c nanoftp.c: made sure to include libxml.h not
libxml/xmlversion.h directly
* include/libxml/*.h: include xmlwin32version.h instead of xmlversion.h
when compiling on WIN32 and MSC
Daniel
not completely correct yet (need cascade).
- xpath.[ch]: added the few things needed to find a function name
and URI from the XPath context when it is called.
Daniel