aboutsummaryrefslogtreecommitdiffstats
path: root/xmllint.c
Commit message (Collapse)AuthorAgeFilesLines
* RESTRICT AUTOMERGE: Update libxml2 to 2.9.8HEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004-rc4replicant-6.0-0004-rc3replicant-6.0-0004-rc2replicant-6.0-0004cm-14.1cm-13.0akirilov2018-09-061-109/+91
| | | | | | | | | | | | | | Merge to pi-dev and restore Android.mk Bug: 79662501 Bug: 36809766 Bug: 36810305 Bug: 62151041 Test: manually verify functionality for regression Change-Id: Ife351c91c932eb92992656f8ea5c08724a220306 (cherry picked from commit 4e91cfdbb1a8624e5cd5a850d6e17da11d1e34a8)
* Merge remote-tracking branch 'goog/upstream-master' into mymergeXin Li2016-08-151-10/+18
| | | | | | BUG: 29834751 Change-Id: I88fc1d4f86bcbd0ac0fe9acdbe764f3d738c5f32 (cherry picked from commit e3d78e1fe0669e9c7083a4de19f1e06171849b28)
* Fix a small error in xmllint --format descriptionFabien Degomme2015-10-231-1/+1
| | | | Obviously it operates on the output not the input
* xmllint was not parsing the --c14n11 flagSérgio Batista2014-06-091-1/+1
| | | | Cut and paste error, using the wrong variable
* Portability patch for fopen on OS/400Patrick Monnerat2013-12-121-0/+6
|
* Fix incorrect spelling entites->entitiesJan Pokorný2013-11-301-1/+1
| | | | | | Partially, a follow-up of 81d7a8245cf9a31a49499a5a195c2b89e6f91180. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Fix HTML push parser to accept HTML_PARSE_NODEFDTDArnold Hendriks2013-11-291-0/+1
| | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=719515 fixes htmlParseTryOrFinish to interpret HTML_PARSE_NODEFDTD, and updates xmllint to actually pass --nodefdtd to the push version of the HTML parser
* xmllint --pretty crashed without following numeric argumentTim Galeckas2013-08-291-5/+7
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=674789 We need to check for NULL argument before calling atoi()
* Fix handling of mmap errorsDaniel Veillard2013-07-121-2/+11
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=702320 as raised by Gaurav <ya1gaurav@gmail.com>
* Catch malloc error and exit accordinglyDaniel Veillard2013-07-111-0/+4
| | | | As pointed privately by Bill Parker <wp02855@gmail.com>
* xmllint --memory should fail on empty filesDaniel Veillard2013-05-081-1/+4
| | | | | Exposed by https://bugzilla.gnome.org/show_bug.cgi?id=699896 when doing analysis but a priori unrelated.
* Add documentation for xmllint --xpathDaniel Veillard2013-03-271-1/+1
| | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=694822 this wasn't documented in the man page, and there was a typo in xmllint help output.
* xmllint should not load DTD by default when using the readerDaniel Veillard2012-12-211-1/+2
|
* Add a --pushsmall option to xmllintDaniel Veillard2012-10-251-4/+9
| | | | To test the push parser with small chunks or 10 bytes
* Keep non-significant blanks node in HTML parserDaniel Veillard2012-09-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=681822 Regardless if the option HTML_PARSE_NOBLANKS is set or not, blank nodes are removed from a HTML document, for example: <html> <head> <title>This is a test.</title> </head> <body> <p>This is a test.</p> </body> </html> is read as: <html><head><title>This is a test.</title></head><body> <p>This is a test.</p> </body></html> This changes the default behaviour but the old behaviour is available as expected when using the parser flag HTML_PARSE_NOBLANKS Based on original patch from Igor Ignatyuk <igor_ignatiouk@hotmail.com> * HTMLparser.c: change various places in the parser where ignorable_space SAX callback was called without checking for the parser flag preference * xmllint.c: make sure we use the new flag even for HTML parsing * result/HTML/*: this modifies the output of a number of tests
* Fix file and line report for XSD SAX and reader streaming validationDaniel Veillard2012-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Things now work correctly at the xmllint level: thinkpad:~/XML -> xmllint --sax --noout --schema test_schema.xsd test_xml.xml test_xml.xml:72721: Schemas validity error : Element 'level1': Missing child element(s). Expected is ( level2 ). test_xml.xml fails to validate thinkpad:~/XML -> xmllint --stream --schema test_schema.xsd test_xml.xml test_xml.xml:72721: Schemas validity error : Element 'level1': Missing child element(s). Expected is ( level2 ). test_xml.xml fails to validate thinkpad:~/XML -> * error.c: fix a corner case of not reporting lines when we should * include/libxml/xmlschemas.h doc/symbols.xml: had to add new entry points to set the filename on a validation context and a locator callback used to fetch the line and file from the context * xmlschemas.c: add the new entry points xmlSchemaValidateSetFilename() and xmlSchemaValidateSetLocator(), plus make sure the error reporting routine gets the information if available. Add a locator for SAX. * xmlreader.c: add and plug a locator for readers.
* Add support for big line numbers in error reportingDaniel Veillard2012-08-131-1/+1
| | | | | | | | | | | | | | Fix the lack of line number as reported by Johan Corveleyn <jcorvel@gmail.com> * parser.c include/libxml/parser.h: add an XML_PARSE_BIG_LINES parser option not switch on by default, it's an opt-in * SAX2.c: if XML_PARSE_BIG_LINES is set store the long line numbers in the psvi field of text nodes * tree.c: expand xmlGetLineNo to extract those informations, also make sure we can't fail on recursive behaviour * error.c: in __xmlRaiseError, if a node is provided, call xmlGetLineNo() if we can't get a valid line number. * xmllint.c: switch on XML_PARSE_BIG_LINES in xmllint
* Various "make distcheck" and portability fixupsDaniel Richard G2012-08-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.am: * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make variable, it allows overriding the value at the command line, and (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS assignment when @MODULE_PLATFORM_LIBS@ is empty * Changed how the THREADS_W32 mechanism switches the build between testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL allows this to work cleanly and plays well with dependencies * testapi.c should be specified as BUILT_SOURCES * Create symlinks to the test/ and result/ subdirs so that the runtests target is usable in out-of-source-tree builds * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f" instead of just "rm" is good form * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to pass configure.in: * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been superceded by LT_INIT * Don't rebuild docs by default, as this requires GNU Make (as implemented) * Check for uint32_t as some platforms don't provide it * Check for some more functions, and undefine HAVE_MMAP if we don't also HAVE_MUNMAP (one system I tested on actually needed this) * Changed THREADS_W32 from a filename insert into an Automake conditional * The "Copyright" file will not be in the current directory if builddir != srcdir doc/Makefile.am: * EXTRA_DIST cannot use wildcards when they refer to generated files; this breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU Make $(wildcard) directives to build up a list of files, and EXTRA_DIST, as a literal expansion of EXTRA_DIST_wc. I also added a new rule, "check-extra-dist", to simplify checking that the two variables are equivalent. (Note that this works only when builddir == srcdir) (I can implement this differently if desired; this is just one way of doing it) * Don't define an "all" target; this steps on Automake's toes * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for dependencies (as Make doesn't process the wildcards otherwise) and qualifying appropriate files with $(srcdir) (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH, which we can count on as this is GNU-Make-only code anyway) doc/devhelp/Makefile.am: * Qualified appropriate files with $(srcdir) * Added an "uninstall-local" rule so that "make distcheck" passes doc/examples/Makefile.am: * Rather than use a wildcard that doesn't work, use a substitution that most Make programs can handle doc/examples/index.py: * Do the same here include/libxml/nanoftp.h: * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET: user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\ Include$ grep -R INVALID_SOCKET . ./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0) ./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0) include/libxml/xmlversion.h.in: * Support ancient GCCs (I was actually able to build the library with 2.5 but for this bit) python/Makefile.am: * Expanded CLEANFILES to allow "make distcheck" to pass python/tests/Makefile.am: * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow "make distcheck" to pass testRelax.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some systems have the header but not the function) testSchemas.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H testapi.c: * Don't use putenv() if it's not available threads.c: * This fixes the following build error on Solaris 8: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \ -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \ -xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o "threads.c", line 442: controlling expressions must have scalar type "threads.c", line 512: controlling expressions must have scalar type cc: acomp failed for threads.c *** Error code 1 trio.c: * Define isascii() if the system doesn't provide it trio.h: * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion win32/configure.js: * Added support for the LZMA compression option win32/Makefile.{bcb,mingw,msvc}: * Added appropriate bits to support WITH_LZMA=1 * Install the header files under $(INCPREFIX)\libxml2\libxml instead of $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools xml2-config.in: * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for `xml2-config --libs` to provide a complete set of dependencies xmllint.c: * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
* Fix xmllint --xpath node initializationDaniel Veillard2012-05-251-1/+1
| | | | | By default it's more sensible to initialize it to the document itself than the root element
* Fix a compilation problem with --minimumBrandon Slack2012-05-111-1/+1
| | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=636750 Moved a #endif /* LIBXML_OUTPUT_ENABLED */ a few lines down to avoid reference an undefined variable
* xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY)Patrick R. Gansterer2012-05-101-1/+2
| | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=638649 code was broken !
* Fix a crash with xmllint --path on empty resultsDaniel Veillard2012-03-271-1/+1
| | | | | If the returned node set is empty, it is possible for the nodetab to be null
* add lzma compression supportAnders F Bjorklund2012-01-271-0/+1
|
* Add options to ignore the internal encodingDaniel Veillard2011-05-261-0/+6
| | | | | | | | | | | | | | | | For both XML and HTML, the document can provide an encoding either in XMLDecl in XML, or as a meta element in HTML head. This adds options to ignore those encodings if the encoding is known in advace for example if the content had been converted before being passed to the parser. * parser.c include/libxml/parser.h: add XML_PARSE_IGNORE_ENC option for XML parsing * include/libxml/HTMLparser.h HTMLparser.c: adds the HTML_PARSE_IGNORE_ENC for HTML parsing * HTMLtree.c: fix the handling of saving when an unknown encoding is defined in meta document header * xmllint.c: add a --noenc option to activate the new parser options
* various: handle return values of write callsStefan Kost2011-05-211-4/+12
|
* Add xmlSaveOption XML_SAVE_WSNONSIGAdam Spragg2010-11-031-0/+22
| | | | | | | | non destructive indentation option using spaces within markup constructs and hence not modifying content * include/libxml/xmlsave.h: new option * xmlsave.c: some refactoring and new code for the new option * xmllint.c: adds --pretty option where option 2 uses the new formatting
* Fix xmllint to use format=1 for default formattingAdam Spragg2010-11-011-8/+8
| | | | | * xmllint.c: again the goal is ultimately to use other values for a different semantic.
* Add an HTML parser option to avoid a default doctypeDaniel Veillard2010-07-261-0/+8
| | | | | | | - include/libxml/HTMLparser.h: defines the new HTML parser option HTML_PARSE_NODEFDTD - HTMLparser.c: if option is set don't add a default DTD - xmllint.c: add the corresponding --nodefdtd option in xmllint
* Fix a missing #ifdefDaniel Veillard2010-03-101-0/+3
| | | | | https://bugzilla.gnome.org/show_bug.cgi?id=611806 Problem raised by Mark Overmeer
* Adding a --xpath option to xmllintDaniel Veillard2009-10-071-9/+130
| | | | | | * xmllint.c: runs in --noout mode and dumps the result of the XPath argument query. Still need to be expanded in some ways to allow namespace binding.
* 594874 Forgot an fclose in xmllintDaniel Veillard2009-09-111-0/+2
| | | | | * xmllint.c: as pointed out by Pavol Rusnak, an fclose was missing in some case.
* Fix a bunch of scan 'dead increments' and cleanupDaniel Veillard2009-09-051-1/+1
| | | | | | | | * HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c: fix unused variables, or unneeded increments as well as a couple of space issues * runtest.c: check for NULL before calling unlink()
* 587867 xmllint --html --xmlout serializing as HTMLDaniel Veillard2009-08-231-0/+2
| | | | * xmllint.c: one option was needed after the switch to the new save API
* xmllint use xmlGetNodePath when not compiled inDaniel Veillard2009-08-101-108/+117
| | | | | * xmllint.c: clean up usages of xmlGetNodePath() to make sure it was compiled in. Also clear some space issues, solves #545581
* Fix leak on SAX1, xmllint --sax1 option and debugDaniel Veillard2009-07-291-3/+4
| | | | | | | | * SAX2.c: don't leak in xmlCheckDefaultedAttributes for standalone checking * xmllint.c: fix xmllint --sax1 to actually use XML_PARSE_SAX1 * debugXML.c: don't raise an error if markup wasn't allocated from dictionary if document was parsed with option disabling it
* Aleksey Sanin support for c14n 1.1Aleksey Sanin2009-07-091-3/+22
| | | | | | | | | * c14n.c include/libxml/c14n.h: adds support for C14N 1.1, new flags at the API level * runtest.c Makefile.am testC14N.c xmllint.c: add support in CLI tools and test binaries * result/c14n/1-1-without-comments/* test/c14n/1-1-without-comments/*: add a new batch of tests
* Matthias Kaehlcke reported a build problem when not compiling HTML supportDaniel Veillard2008-11-061-0/+2
| | | | | | | | * xmllint.c: Matthias Kaehlcke reported a build problem when not compiling HTML support in. daniel svn path=/trunk/; revision=3802
* strengthen some of the internal parser limits, add an XML_PARSE_HUGEDaniel Veillard2008-08-261-0/+4
| | | | | | | | | | * 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
* patch based on Wieant Nielander contribution to add the option of notDaniel Veillard2008-08-261-0/+7
| | | | | | | | | * 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
* add a C program to run the W3C test suite, work in progress add a newDaniel Veillard2008-07-291-0/+6
| | | | | | | | | | | * runxmlconf.c Makefile.am: add a C program to run the W3C test suite, work in progress * xmllint.c: add a new option --oldxml10 to use the old parser * parser.c: fix the XML_PARSE_OLD10 processing of the new option and a bug in version parsing Daniel svn path=/trunk/; revision=3757
* apply fix from Stefan Kost to avoid a crash in xmllint, fixes 504284Daniel Veillard2008-01-111-1/+1
| | | | | | | | * xmllint.c: apply fix from Stefan Kost to avoid a crash in xmllint, fixes 504284 Daniel svn path=/trunk/; revision=3673
* "xmllint unusable on win32" so applied a libxml2 patch from ChristianDaniel Veillard2007-04-171-2/+7
| | | | | | | | * xmllint.c catalog.c: "xmllint unusable on win32" so applied a libxml2 patch from Christian Ehrlicher Daniel svn path=/trunk/; revision=3599
* fix comment for xmlDocSetRootElement c.f. #351981 order XPath elementsDaniel Veillard2006-10-201-1/+3
| | | | | | * tree.c: fix comment for xmlDocSetRootElement c.f. #351981 * xmllint.c: order XPath elements when using --shell Daniel
* started to switch xmllint to use xmlSaveDoc to test #342556 fixed #342556Daniel Veillard2006-10-161-34/+61
| | | | | | | | * xmllint.c: started to switch xmllint to use xmlSaveDoc to test #342556 * xmlsave.c: fixed #342556 easy and a whole set of problems with encodings, BOM and xmlSaveDoc() Daniel
* added --html --memory to test htmlReadMemory to test #321632 added variousDaniel Veillard2006-10-131-0/+21
| | | | | | | | | | | * 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
* applied patch from Andrew W. Nosenko to expose if zlib support wasDaniel Veillard2006-07-131-0/+1
| | | | | | | | * 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
* applied patch from Gary Coady to really make sure xmllint --nonet wouldDaniel Veillard2006-04-251-0/+1
| | | | | | * xmllint.c: applied patch from Gary Coady to really make sure xmllint --nonet would not reach the network, should fix #337483. Daniel
* fix an error report when using --path and --valid closes bug #331290Daniel Veillard2006-02-191-0/+9
| | | | | | * xmllint.c: fix an error report when using --path and --valid closes bug #331290 Daniel
* damn XML_FEATURE_UNICODE clashes with Expat headers rename to XML_WITH_ toDaniel Veillard2005-09-121-30/+30
| | | | | | | | * include/libxml/parser.h parser.c xmllint.c: damn XML_FEATURE_UNICODE clashes with Expat headers rename to XML_WITH_ to fix bug #316053. * doc/Makefile.am: build devhelp before the examples. * doc/*: regenerated the API Daniel
* patch from Stéphane Bidoul to compile without schematron DanielDaniel Veillard2005-09-081-1/+1
| | | | | * xmllint.c: patch from Stéphane Bidoul to compile without schematron Daniel