[xml] Unexpected Nodeset Limit for XPath

2021-12-01 Thread Nick
hit limit ^ XPath evaluation failure Can the XPath code not count all of these elements toward the node limit? Thanks, Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

[xml] Supporting additional encodings in a push parser?

2006-11-16 Thread Nick Kew
eCharEncoding, htmlCreatePushParserCtxt, etc. Is there a workaround that'll enable me to register new charsets *and* use them in a push parser, other than just preprocessing ahead of the parser? -- Nick Kew Application Development with Apache - t

[xml] Parsing tag-soup HTML

2007-06-17 Thread Nick Kew
I've been using libxml2 for some years to parse both XML and HTML in the context of Apache filter modules. All these modules use the parseChunk API, which is the only reasonable option in the context of the Apache filter architecture. My most widely-used libxml2-based module is mod_proxy_html, wh

Re: [xml] Parsing tag-soup HTML

2007-06-17 Thread Nick Kew
ser. I'll take your reply as a yes in principle, and dive into the code to think it through a little more. If it looks promising, I'll come back to you with more concrete proposals. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/ __

Re: [xml] Parsing tag-soup HTML

2007-06-18 Thread Nick Kew
s like he's using "tag soup" to mean something that cleans it up, in the tradition of Tidy or AccessValet. I'm contemplating the exact opposite: something that leaves it intact! -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.o

Re: [xml] Parsing tag-soup HTML

2007-06-18 Thread Nick Kew
;t product code like that (or if they do, they can see what's wrong for themselves). > Seems what you want is textual transformation only, and in that case > a parser doesn't sound like the best tool to implement this. But > maybe I misunderstand. Yes, you could be right. Th

Re: [xml] Parsing tag-soup HTML

2007-06-18 Thread Nick Kew
On Mon, 18 Jun 2007 15:08:53 +0200 Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > Nick Kew wrote: > > On Mon, 18 Jun 2007 08:14:01 -0400 > > Try running the following through "xmllint --html": > > > > > > > > foo > > Hell

Re: [xml] how to clean up properly after SAX parsing

2007-07-10 Thread Nick Kew
g, and REALLY NEED a push parser API. That leaves a choice of ... SAX. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org htt

Re: [xml] how to clean up properly after SAX parsing

2007-07-12 Thread Nick Kew
On Tue, 10 Jul 2007 07:42:42 -0400 Daniel Veillard <[EMAIL PROTECTED]> wrote: > 3/ do NOT use SAX unless you REALLY need it, use the reader or > the tree API. Some of us REALLY NEED streaming, and REALLY NEED a push parser API. That leaves a choice of ... SAX. -- Nick Kew

[xml] [PATCH] xmlIndentTreeOutput and xmlKeepBlanksDefault()

2009-01-24 Thread Nick Wellnhofer
call xmlKeepBlanksDefault(1) (which in most cases should be a no-op) xmlIndentTreeOutput is set to 0 (default is 1). The libxml perl bindings do this for example, so suddenly indenting is disabled. So I think the attached patch is the right solution. Nick -- aevum gmbh rumfordstr. 4 80469

[xml] IO callbacks are not thread-safe

2009-03-26 Thread Nick Wellnhofer
be added to the global variables in globals.c? Nick -- aevum gmbh rumfordstr. 4 80469 münchen germany tel: +49 89 3838 0653 http://aevum.de/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml

Re: [xml] IO callbacks are not thread-safe

2009-04-06 Thread Nick Wellnhofer
ibxml side then. Only a caveat on this page would be nice: http://xmlsoft.org/threads.html Nick -- aevum gmbh rumfordstr. 4 80469 münchen germany tel: +49 89 3838 0653 http://aevum.de/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml

[xml] manipulating tree causes Seg fault

2009-08-11 Thread Nick Lang
y what's happening here is when I'm adding in this new tree via a regex route, and then unlinking nodes and relinking nodes, the pointers for these nodes are getting screwed up. Now I know that there might be a problem with my code as well, and if anyone wants to see it please let

[xml] [PATCH][RESEND] xmlIndentTreeOutput and xmlKeepBlanksDefault()

2009-08-12 Thread Nick Wellnhofer
call xmlKeepBlanksDefault(1) (which in most cases should be a no-op) xmlIndentTreeOutput is set to 0 (default is 1). The libxml perl bindings do this for example, so suddenly indenting is disabled. So I think the attached patch is the right solution. Nick -- aevum gmbh rumfordstr. 4 80469 münchen germany

Re: [xml] manipulating tree causes Seg fault

2009-08-12 Thread Nick Lang
child, of the parent of "to_be_replaced". (lets call this parent, foster_parent) Next I remove (unlink) the node "to_be_replaced" Next I collect all the children of the node temp. I unlink temp, and then add all the children of temp back to foster_parent. After that is all said an

Re: [xml] manipulating tree causes Seg fault

2009-08-12 Thread Nick Lang
wrt to the import/adpot No I wasn't aware. I thought just "addSibling/addChild" was taking care of any importing/adopting n Michael Ludwig wrote: Nick Lang schrieb: I have an XML document. my regex search = "(.a)(b)(c.)" to be replaced with: [...] everything i

Re: [xml] manipulating tree causes Seg fault

2009-08-12 Thread Nick Lang
isting tree (called tree2), with more name spaces (including the one from tree1). If the node, with the name space declaration from tree1 is removed, the the namespaced elements from tree1, now in tree2 should not be effected right? Thanks Nick Michael Ludwig wrote: Nick Lang schrieb: Find a sp

[xml] [Fwd: Re: manipulating tree causes Seg fault]

2009-08-13 Thread Nick Lang
Original Message Subject:Re: [xml] manipulating tree causes Seg fault Date: Thu, 13 Aug 2009 08:55:42 -0500 From: Nick Lang To: Michael Ludwig References: <4a81e9c7.8090...@propylon.com> <4a827980.2070...@as-guides.com> <4a82d492.4080.

Re: [xml] [xslt] HTML vs. XHTML: different output when including a file with \r\n [WAS: xmllint vs. xsltproc: different output when including a file with \r\n]

2010-02-03 Thread Nick Wellnhofer
xmlEscapeEntities in xmlsave.c but that uses hex char refs. Those two functions don't make an exception for XHTML content. Personally, I think libxml shouldn't escape "\r" at all. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml

[xml] [PATCH] Prevent overflow on duration comparison 32-bit.

2011-10-16 Thread Nick Pope
See https://bugzilla.gnome.org/show_bug.cgi?id=653724 --- xmlschemastypes.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 1a5454c..80725b4 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -3553,7 +3553,8 @@ xmlSche

[xml] [Patch] Optimizing '//' in XPath expressions

2012-08-23 Thread Nick Wellnhofer
2m56.213s user2m56.123s sys 0m0.080s After: $ time xsltproc/xsltproc --noout service-names-port-numbers.xsl service-names-port-numbers.xml real0m3.836s user0m3.764s sys 0m0.060s I also ran the libxml2 and libxslt test suites with the patch and couldn't detect any bre

Re: [xml] Why does XML::LibXSLT (= the Perl 5 / CPAN wrappers for libxslt) Fails a Basic Test on some BSD and other systems?

2014-02-14 Thread Nick Wellnhofer
commit/?id=7cb08dacadf7e1cf88ee2f45815251b61bffcde6 Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Why does XML::LibXSLT (= the Perl 5 / CPAN wrappers for libxslt) Fails a Basic Test on some BSD and other systems?

2014-02-17 Thread Nick Wellnhofer
tribute. Text nodes and element nodes are not allowed before xsl:attribute. Normally, these whitespace nodes will be stripped. But since there’s a parent element with xml:space=“preserve”, the whitespace will be kept in this case. I just checked with Saxon and it also reports an error. Nick __

[xml] How to add a DTD to a document

2014-03-09 Thread Nick Wellnhofer
only frees the DTDs pointed to by doc->intSubset and doc->extSubset. So do I have to deal with these struct members manually or is there a better way? Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gno

Re: [xml] How to add a DTD to a document

2014-03-09 Thread Nick Wellnhofer
> On 3/9/2014 17:33, Nick Wellnhofer wrote: >> I can’t find out how to add a DTD (internal subset) to a document without >> poking into libxml2’s internal data structures. The obvious approach is to >> add a xmlDtdPtr using >> xmlAddPrevSibling on the document root. B

Re: [xml] bug with variables and predicates

2014-03-21 Thread Nick Wellnhofer
are there as I would expect. The attached patch fixes the issue for me. Nick >From 191f64312ff85ce9df0d2bac14ec1d89759c05d1 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Fri, 21 Mar 2014 19:38:08 +0100 Subject: [PATCH] Restore context size and position after XPATH_OP_ARG --- xpat

Re: [xml] bug with variables and predicates

2014-03-25 Thread Nick Wellnhofer
On 24/03/2014 12:41, Vojtech Fried wrote: For me too, thank you. OK, I committed a slightly modified version of the patch: https://git.gnome.org/browse/libxml2/commit/?id=07def30fa7d5c5aa73e9d522a2e17bfa7a272df8 Nick ___ xml mailing list, project

Re: [xml] Memory leaks

2014-08-25 Thread Nick Wellnhofer
node. Alternatively, you could copy the node to another (dummy) document. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

[xml] libxslt test suite broken by recent libxml2 commit

2014-09-28 Thread Nick Wellnhofer
option. Second, I can’t see why the id attribute would be already defined. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] libxslt test suite broken by recent libxml2 commit

2014-09-28 Thread Nick Wellnhofer
is to simply add the warning messages to the expected test output. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] libxslt test suite broken by recent libxml2 commit

2014-10-03 Thread Nick Wellnhofer
I successfully updated the libxslt test suite to the current docbook-xsl version 1.78.1 from 1.40 and this indeed fixes the problem. But the resulting commit is quite large: 551 files changed, 207340 insertions(+), 59510 deletions(-) The libxslt tarball would grow by abo

Re: [xml] libxslt test suite broken by recent libxml2 commit

2014-10-04 Thread Nick Wellnhofer
dn’t want to make all these changes on top of the ancient docbook-xsl version. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] ID already defined in 2.9.2

2014-12-18 Thread Nick Wellnhofer
nly works if you really want to remove the node. It seems that libxml2 doesn't provide a useful mechanism to move ID attributes from one document to another. I think that `xmlSetTreeDoc` should be changed to account for added and removed IDs. Nick _

Re: [xml] ID already defined in 2.9.2

2014-12-18 Thread Nick Wellnhofer
e immediately removed from the document and you don't have to care about references. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] ID already defined in 2.9.2

2014-12-18 Thread Nick Wellnhofer
to create a new document for every node removed this way. The latter might be required to avoid id clashes in the "adopter" document. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Issue building libxml2 with mingw 64bit gcc

2015-03-02 Thread Nick Wellnhofer
On 02/03/2015 18:51, James Franco wrote: -lwsock32 -lwsock32 -lkernel32 int.mingw/nanohttp.o:nanohttp.c:(.text+0x7a1): undefined reference to `__imp_getaddrinfo' I think you need -lws2_32 instead of -lwsock32 on 64-bit Windows. Nick ___ xml ma

Re: [xml] libxslt does not check extension function existence at creating stylesheet time

2015-05-17 Thread Nick Wellnhofer
error message. Also note that I moved this discussion to the libxslt mailing list (x...@gnome.org). Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] [PATCH] XPath results order

2015-07-11 Thread Nick Wellnhofer
/browse/libxml2/commit/?id=3eaedba1b64180668fdab7ad2eba549586017bf3 Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] [PATCH] XPath results order

2015-09-14 Thread Nick Wellnhofer
On 14/09/2015 03:35, Daniel Veillard wrote: On Sat, Jul 11, 2015 at 02:33:17PM +0200, Nick Wellnhofer wrote: Thanks for the report. I fixed it in a slightly different way: https://git.gnome.org/browse/libxml2/commit/?id=3eaedba1b64180668fdab7ad2eba549586017bf3 I think that influences one

Re: [xml] [libxslt] GPL-licensed file being distributed with MIT-licensed libxslt

2015-09-16 Thread Nick Wellnhofer
orial/libxslt_tutorial.c which libxslt_pipes.c claims to be based on. Both files are based on the MIT-licensed xsltproc.c but there's nothing wrong with that. Any thoughts on what, if anything, should be done about it? It's only part of the documentation, so I don't

Re: [xml] Continuous integration for libxml2?

2015-10-21 Thread Nick Wellnhofer
d, if/when Travis add support for it... The Windows build could be tested with Appveyor. They offer free CI services for open-source projects. Setup is similar to Travis. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome

Re: [xml] Possible 64-bit issues in xml 2.9.2

2015-11-11 Thread Nick Wellnhofer
* to be able to differentiate from line numbers. * * Returns the number of elements found in the document or -1 in case *of error. */ This comment indicates that other parts of libxml2 use the content field to store line numbers. Nick ___ xml

Re: [xml] win32\VC10\config.h and VS 2015

2016-03-11 Thread Nick Wellnhofer
://bugzilla.gnome.org/show_bug.cgi?id=756691 http://stackoverflow.com/a/8712996/1956010 Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] xmlOutputBufferCreateFile VS2015 I/O error : Bad file descriptor

2016-04-16 Thread Nick Wellnhofer
ply remove "cruntime=/MT" and "static=yes". additionally I removed iconv (iconv=no), do you confirm that reading UTF-8 and UTF-16 will still work? Yes, the UTF encodings work without iconv. Nick ___ xml mailing list, project page htt

Re: [xml] strange coredump in 2.7.8

2016-04-20 Thread Nick Wellnhofer
(0x1). libxml2 passes the value of xmlGenericErrorContext as stream. This variable must have somehow been corrupted or deliberately set to a wrong value via xmlSetGenericErrorFunc. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@

Re: [xml] Moving to time based releases

2016-04-29 Thread Nick Wellnhofer
of them then an RC2 around the 10th May and a push on the 20 +1 I cleaned up the libxslt tree a little and committed a few fixes that I consider safe enough for the upcoming release. I have quite a few other fixes in my queue that I'll delay until after the

Re: [xml] Moving to time based releases

2016-11-06 Thread Nick Wellnhofer
g the stability of the code I think it's reasonable. For simplicity I will release both on the same day. Almost six months have passed since the last release. What's the plan for the next release? Nick ___ xml mailing list, project page htt

Re: [xml] libxml2 installs to /include/libxm2/libxml on MinGW - bug?

2016-11-14 Thread Nick Wellnhofer
These bug reports didn't go unnoticed. Please allow the maintainers some time before responding. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Feature request: Compiler/version tags for MSVC libraries (patch included)

2017-02-10 Thread Nick Wellnhofer
configure.js nmake XML_BASENAME=libxml2-vc140-2.9.4 XML_DEF=libxml2.def Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] node "reuse" from one doc in another

2017-03-03 Thread Nick Wellnhofer
lUnlinkNode first (or copy the node with xmlDocCopyNode if you want to keep it in the source document). Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

[xml] Runtime parser limit for maximum size of text nodes

2017-06-11 Thread Nick Wellnhofer
ere's the commit: https://github.com/nwellnhof/libxml2/commit/7343130 I keep it up for review for a while, then push to Git master unless I hear objections. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome

Re: [xml] Runtime parser limit for maximum size of text nodes

2017-06-22 Thread Nick Wellnhofer
e's of course another solution: Simply disable the max text length limit. (Actually set it to around 2 GB to avoid integer overflows.) I don't see much value in limiting the size of text nodes. It makes more sense to limit the total size of an XML document which users can do easily.

Re: [xml] Runtime parser limit for maximum size of text nodes

2017-06-26 Thread Nick Wellnhofer
uot;s. The former should consume just a bit more than 1 GB of memory for the text node, the latter will create 250 million element nodes, consuming around 30 GB of memory on x86-64. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] [patch] Wrong cast to "xmlHashDeallocator" for "xmlSchemaBucketFree"

2017-07-12 Thread Nick Wellnhofer
tions with different signatures are cast to `xmlHashDeallocator` directly. I think this should be solved in a more systematic way. Can you open a bug on bugzilla.gnome.org? Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome

Re: [xml] [libxml2][patch] Makefile modifications for Visual Studio 2017 community and 32bit compilation

2017-08-28 Thread Nick Wellnhofer
Please revert the commit. The environment variables for MSVC command line builds should be set with Microsoft tools. For Visual Studio 2017: https://stackoverflow.com/questions/43372235/vcvarsall-bat-for-visual-studio-2017 Nick On 28/08/2017 15:00, Daniel Veillard wrote: Hi Boris

Re: [xml] rsvg-convert issue with libxml 2.9.5

2017-09-19 Thread Nick Wellnhofer
ea what is wrong? Can you post a complete file that exposes the issue? Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] rsvg-convert issue with libxml 2.9.5

2017-09-19 Thread Nick Wellnhofer
ld be fixed with: https://git.gnome.org/browse/libxml2/commit/?id=b90d8989d3dc486519686f01490379c963bd1145 But I think it's a bug in librsvg: https://bugzilla.gnome.org/show_bug.cgi?id=787895 Nick ___ xml mailing list, project page http://xmlso

Re: [xml] Strange results of xpath element search using string-value

2017-10-03 Thread Nick Wellnhofer
/xpath.c#n6412 The bug can only be triggered if there are multiple descendant text nodes and the first one only contains a single character. The handling of comment and PI nodes in the switch statement also looks fishy. I'll commit a fix after the 2.9.6 release.

Re: [xml] Strange results of xpath element search using string-value

2017-10-07 Thread Nick Wellnhofer
On 30/09/2017 19:37, Алексей Алексей wrote: $ echo 'fed' | \ xmllint --xpath '//bbb[. = "fed"]' - XPath set is empty Fixed with https://git.gnome.org/browse/libxml2/commit/?id=5af594d8bc55121ae454cba4d05793d1db7ff612

Re: [xml] [PATCH v2 (fix msg)] xmlcatalog: restore ability to query system catalog easily

2017-10-21 Thread Nick Wellnhofer
On 16/10/2017 22:37, Jan Pokorný wrote: I've noticed that easy way of locating a DocBook XSLT in a configure script of another project doesn't work anymore. Applied here: https://git.gnome.org/browse/libxml2/commit/?id=6b780f65d83cb952142fd1b211eeb99c7957d

Re: [xml] Reporting GCC 7.2.0 compiler-warnings on libxml2-2.9.5

2017-10-21 Thread Nick Wellnhofer
ext release. See https://bugzilla.gnome.org/show_bug.cgi?id=788312 https://bugzilla.gnome.org/show_bug.cgi?id=789029 Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] [PATCH (follow-up)] xmlcatalog: refresh man page wrt. quering system catalog easily

2017-10-24 Thread Nick Wellnhofer
e.org/browse/libxml2/commit/?id=09f51ecbc5b8ea418bacca4ad43a4d2d1e3ccdfb Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Patch to fix ICU flush and pivot buffer

2017-10-25 Thread Nick Wellnhofer
libxml github repo, or I can also create a libxml bug.  It looks like libxml preference is to take patches on the mailing list. I prefer patches created with `git format-patch` that include author information and a commit message, either via the mailing

Re: [xml] Patch to fix ICU flush and pivot buffer

2017-10-25 Thread Nick Wellnhofer
On 25/10/2017 17:40, Markus Scherer wrote: On Wed, Oct 25, 2017 at 4:02 AM, Nick Wellnhofer The patch changes public function xmlCharEncInFunc but this function isn't used internally anymore (since commit a78d8036 from 2012). It might still be used in client code that wants t

Re: [xml] Patch to fix ICU flush and pivot buffer

2017-11-04 Thread Nick Wellnhofer
t/?id=72182550926d31ad17357bd3ed69e49d7e69df02 Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Add version string to DLL

2017-11-08 Thread Nick Wellnhofer
;first-name last-name ". Otherwise I'll simply use "ccpaging ". (I prefer patches formatted with git-format, but if you're primarily working with MS tools, I understand that this may not be an option.) Thanks, Nick

Re: [xml] [PATCH] Two trivial fixes for Control Flow Integrity support

2017-11-08 Thread Nick Wellnhofer
write a wrapper around xmlStrdup. If possible, please format patches with git-format-patch. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Patch to guard #define WIN32_LEAN_AND_MEAN

2017-11-09 Thread Nick Wellnhofer
rce.com/chromium/src/+/master/third_party/libxml/BUILD.gn#27 the clang warnings should now be fixed in libxml2. The only exceptions are -Wno-unused-function in the Trio code and -Wpedantic which Chromium doesn't seem to use. For the MSVC build, we currently use &qu

Re: [xml] [PATCH] Two trivial fixes for Control Flow Integrity support

2017-11-09 Thread Nick Wellnhofer
5c I used the following configure command on Ubuntu 17.04: CC=clang \ CFLAGS="-fsanitize=cfi -flto -fvisibility=hidden -fno-sanitize-trap=all -g" \ RANLIB=llvm-ranlib \ ./configure --disable-shared Nick ___ xml mailing lis

Re: [xml] Patch to guard #define WIN32_LEAN_AND_MEAN

2017-11-09 Thread Nick Wellnhofer
idiom came from. I'd be happy to remove all the `!defined(__CYGWIN__)` checks. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Patch to guard #define WIN32_LEAN_AND_MEAN

2017-11-09 Thread Nick Wellnhofer
at there is a bit of redundancy right now because the macro is defined every time we include windows.h but this could be worked around. Chromium is an exception since they integrate a static build of the library, but `configs -= [ ... ]` seems like a sim

Re: [xml] FYI: compiler warning with latest package (xpath.c)

2017-11-12 Thread Nick Wellnhofer
On 12/11/2017 16:54, Michael Felt wrote: Seems to be great to go! Just a small (syntax) warning in xpath.c. This is a known issue, caused by Bug 300235: https://bugzilla.gnome.org/show_bug.cgi?id=300235 Nick ___ xml mailing list, project page

Re: [xml] AIX - make check results for libxml2-2.9.7

2017-11-12 Thread Nick Wellnhofer
ats generated an error You should get a more detailed output for these tests with: make HTMLPushtests XPathtests Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

[xml] Simplify XPath NaN, inf and -0 handling

2017-11-14 Thread Nick Wellnhofer
Here's are patch that I'd like to discuss before committing. Nick -- https://github.com/nwellnhof/libxml2/commit/8813f397f8925f85ffbe9e9fb62bfaa3c1accf11 Simplify XPath NaN, inf and -0 handling Use C99 macros NAN, INFINITY, isnan, isinf. If they're not avail

[xml] Update information about contributing

2017-11-14 Thread Nick Wellnhofer
Here's a patch that I'd like to discuss before committing. Nick -- https://github.com/nwellnhof/libxml2/commit/cbedb8de41ba260d8cf5a4b9858f43175d01715e Update information about contributing The contents of the HACKING file were hopelessly outdated. Remove the file

Re: [xml] Patch suggestion for "fixing" 10 MB limit when using xmlNewTextWriterDoc

2017-12-04 Thread Nick Wellnhofer
can simply call xmlNewTextWriterPushParser with a custom parser context instead? Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Simplify XPath NaN, inf and -0 handling

2017-12-09 Thread Nick Wellnhofer
Trio still seems to be supported. The latest release is 1.16 from 2014: https://sourceforge.net/projects/ctrio/files/trio/ Upgrading our copy of the Trio code should fix some compiler warnings, but personally I'd prefer not having to deal with third party code

Re: [xml] [PATCH] Check hex or decimal entity for overflow

2018-01-08 Thread Nick Wellnhofer
error code, we could simply use XML_ERR_INVALID_CHAR or not report an error at all since invalid numeric character references are already detected and reported earlier. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https:/

Re: [xml] Heap use after free in parser.c

2018-01-08 Thread Nick Wellnhofer
f a call to xmlCharEncInput() fails and has grown the buffer, the ctxt object could still point to the old deleted buffer. Maybe it's better to call xmlHaltParser if xmlCharEncInput fails. That's what the other code path in xmlParseChunk does. Nick ___

Re: [xml] Fwd: Patch to fix ICU flush and pivot buffer

2018-01-08 Thread Nick Wellnhofer
On 08/01/2018 02:06, Joel Hockey wrote: Nick, I have another patch for some additional call sites where flush is being incorrectly set on the non-final read. Applied here: https://git.gnome.org/browse/libxml2/commit/?id=6e6ae5daa6cd9640c9a83c1070896273e9b30d14 Looks right, but I applied the

Re: [xml] [PATCH] Check hex or decimal entity for overflow

2018-01-22 Thread Nick Wellnhofer
ssue at an earlier point in the parsing process and makes sure not to return invalid entity content in recovery mode at all. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Heap use after free in parser.c

2018-01-22 Thread Nick Wellnhofer
On 08/01/2018 22:43, Jay Civelli wrote: On Mon, Jan 8, 2018 at 11:27 AM, Nick Wellnhofer <mailto:wellnho...@aevum.de>> wrote: On 02/01/2018 20:08, Jay Civelli via xml wrote: We ran into a heap use after free in Chromium http://crbug.com/793715 <http://crbug.com/

Re: [xml] Time for some releases

2018-01-22 Thread Nick Wellnhofer
nd 29-30 Jan would make sense, unless there is something pending, There's nothing pending from my side. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] libxml2 2.9.8 build error on AIX, HP-UX and old Visual Studio like 10.0

2018-03-15 Thread Nick Wellnhofer
On 15/03/2018 15:50, Fabrice Manfroi wrote: ..\xpath.c(506) : error C2099: initializer is not a constant Does the attached patch work for you? Nick diff --git a/xpath.c b/xpath.c index f4406967..773e848b 100644 --- a/xpath.c +++ b/xpath.c @@ -485,9 +485,9 @@ int wrap_cmp( xmlNodePtr x

Re: [xml] libxml2 2.9.8 build error on AIX, HP-UX and old Visual Studio like 10.0

2018-03-15 Thread Nick Wellnhofer
patch). BTW, thanks for testing on some more exotic platforms. I'm curious whether you also run the test suite (`make check` or `nmake tests` with MSVC). If yes, are there any errors? Nick diff --git a/xpath.c b/xpath.c index f4406967..89fab588 100644 --- a/xpath.c +++ b/xpath.c @@ -4

Re: [xml] Is there a solution to have newline delimited output for xmllint ?

2018-03-20 Thread Nick Wellnhofer
ng that the output isn't terminated with a newline at all. In this case, I'm not too concerned about backward compatibility and I'd simply change the `--xpath` output to always print a newline after each node, text or not. But maybe othe

Re: [xml] xmlSaveToFd: unexpected behavior while redirecting the 'stdout' stream to a file

2018-04-03 Thread Nick Wellnhofer
ptor using unbuffered IO. You're mixing buffered and unbuffered IO. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] xmlSaveToFd: unexpected behavior while redirecting the 'stdout' stream to a file

2018-04-04 Thread Nick Wellnhofer
eToFd' function. Is there a similar solution with the 'options' parameter please? You can use xmlSaveToFilename with "-" as filename. There's also xmlSaveToIO taking custom IO callbacks. Nick ___ xml mailing list, proje

Re: [xml] performance of parsing docbook with xincludes

2018-05-14 Thread Nick Wellnhofer
. Is there a know issues with using xincludes here? It might be quadratic behavior in the XInclude engine or something else entirely. How large is glib-docs.xml after processing XIncludes? Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome

Re: [xml] performance of parsing docbook with xincludes

2018-05-15 Thread Nick Wellnhofer
twork multiple times which could explain the slowdown. Can you try to change the line to xmlCtxtUseOptions(pctxt, ctxt->parseFlags); and see if it helps? Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org

Re: [xml] performance of parsing docbook with xincludes

2018-05-15 Thread Nick Wellnhofer
On May 15, 2018, at 21:56 , Stefan Sauer wrote: > > On 05/15/2018 08:40 PM, Stefan Sauer wrote: >> On 05/15/2018 12:42 PM, Nick Wellnhofer wrote: >>> Can you try to change the line to >>> >>> xmlCtxtUseOptions(pctxt, ctxt->parseFlags); >>>

Re: [xml] performance of parsing docbook with xincludes

2018-05-17 Thread Nick Wellnhofer
What do you mean by "inject things like a version"? Why exactly do your included documents have to reference an external DTD? Another idea is to stop loading external DTDs for XIncludes without an XPointer expression. This would still change the behavior for some users but it'

Re: [xml] performance of parsing docbook with xincludes

2018-06-07 Thread Nick Wellnhofer
for example), so you it looks like you can't just simply set doc->extSubset to the cached DTD. You'd probably have to replay the calls to xmlAddElementDecl etc, maybe even in the original order which might be lost. That's why I wouldn't want to go down this route. Nick _

Re: [xml] performance of parsing docbook with xincludes

2018-06-08 Thread Nick Wellnhofer
, piece of data, etc that is created and destroyed constantly would just sit there (and slowly grow until it levels out). libxml2 already allows you to use your own memory allocators. It's easy to make `free` a no-op. Nick ___ xml mailing list, pr

Re: [xml] [PATCH] really declare dllexport/dllimport for Cygwin

2018-08-31 Thread Nick Wellnhofer
Thanks, patch applied here: https://gitlab.gnome.org/GNOME/libxml2/commit/c65c9e8ee07e2dab0647392c2bd1795a5bc99829 On 25/05/2018 17:46, Michael Haubenwallner wrote: Cygwin does not define _WIN32, but still requires dllexport/dllimport tags for when applications use the --disable-auto-import li

Re: [xml] [PATCH] always dllexport the singlethreaded variables

2018-08-31 Thread Nick Wellnhofer
eventually need the dllexport tag. I don't understand the issue. Do you mean an application linked with a DLL configured without thread support and compiled with single-thread headers, and THEN swapping the DLL with a multi-thread version? I'm not sure whether this should be support

Re: [xml] [PATCH] always dllexport the singlethreaded variables

2018-09-04 Thread Nick Wellnhofer
BLED should always be defined. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml

Re: [xml] possibility to use xpath searching on xml balanced chunks

2018-09-05 Thread Nick Wellnhofer
On 05/09/2018 10:53, Pavel Stehule via xml wrote: Is any possibility to read balanced chunk in format where XPatch searching is possible? By design, XPath only works on full documents. All you can do is to insert the balanced chunk under a dummy document node. Nick

Re: [xml] [PATCH] variables need 'extern' in static lib on Cygwin

2018-09-22 Thread Nick Wellnhofer
ing static libxml embedded in gettext. Thanks. Patch applied here: https://gitlab.gnome.org/GNOME/libxml2/commit/73b2417c5148af1f89708031b4bf96f40d1195e0 And for libxslt: https://gitlab.gnome.org/GNOME/libxslt/commit/dfa1bdceaef73a404d1c6efe58c3618493b3

Re: [xml] Is there a solution to have newline delimited output for xmllint ?

2018-09-23 Thread Nick Wellnhofer
On 20/03/2018 16:45, Nick Wellnhofer wrote: I agree that printing text nodes without a separator is rather useless and I always found it annoying that the output isn't terminated with a newline at all. In this case, I'm not too concerned about backward compatibility and I'd si

  1   2   >