Re: [xml] Resuming maintenance

2022-01-11 Thread Daniel Veillard via xml
On Mon, Jan 10, 2022 at 03:20:09PM +0100, Nick Wellnhofer via xml wrote:
> Hello,
> 
> Thanks to a donation from Google, I'm able to resume maintenance of libxml2
> (and libxslt) for the remainder of 2022.

  Yay !  :-)

> My immediate plans are:
> 
> - Make a bug fix release fixing many regressions.
> - Establish a new release schedule, possibly with multiple branches being
>   maintained.
> - Move releases from the old FTP server to GNOME's Gitlab infrastructure.
> - Move documentation to GNOME infrastructure.
> - Set up an official way to sponsor libxml2 maintainers.

 So you want to reintegrate libxml2 within the GNOME framework ? TBH
now that I have very limited bandwidth that's probably the right thing
to do.
 Happy to help you any steps you may need to take over,

   thanks,

Daniel

> In the future I'll focus less on security improvements and more on typical
> maintenance duties like bug fixes and modernizing the code base in a few
> ways.
> 
> Thanks (again) to Google for making this possible.
> 
> Nick
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Stepping down

2021-07-27 Thread Daniel Veillard via xml
On Thu, Jul 22, 2021 at 01:23:27PM +0200, Nick Wellnhofer via xml wrote:
> I never really asked for it but in the last years I became de-facto
> maintainer of both libxml2 and libxslt. Luckily, I was able to fund my
> involvement through Chrome VRP bug bounties and OSS-Fuzz integration
> rewards. Big thanks to Google for these outstanding programs.
> 
> Unfortunately, returns from security research are diminishing quickly and I
> see no way to obtain a minimal level of funding anymore. So I'm stepping
> down as contributor and maintainer.
> 
> Thanks to everyone who reported bugs and contributed patches!
> 
> Nick

  Hi Nick,

 that's quite infortunate, you did a really good job of taking care of
users bugs and requests those years. The libraries are not trivial
there is quite some complexity, and you managed to master that code,
not a small achievement !
 I'm really not able at that point to insure the same level of followup
for those projects myself, that's obvious for anybody monitoring those
lists lately.

   I will join the others thanking you for everything you provided,
I hope you have a good plan forward, obviously you have a lot of
technical skills while being able to act in a leading way !

Best wishes,

 sincerely,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libxml2 2.9.12

2021-05-13 Thread Daniel Veillard via xml
  Oh well, a little bit of shame is better than a long lasting pain,
so 2.9.12 is out and it now includes everything to build outside of
a git checkout tree !

  Sorry about that, and thanks for reporting it !

Daniel

On Thu, May 13, 2021 at 08:14:04PM +0200, Daniel Veillard via xml wrote:
> On Thu, May 13, 2021 at 05:52:16PM +0200, Jan Tojnar wrote:
> > Hi, trying to build the package from the tarball on NixOS, it appears that
> > fuzz/fuzz.h is missing from the archive:
> > 
> > testFuzzer.c:13:10: fatal error: fuzz.h: No such file or directory
> >   13 | #include "fuzz.h"
> >  |  ^~~~
> > compilation terminated.
> > 
> > It appears to be available in the git repo, so perhaps it just needs to be
> > added to EXTRA_DIST or something?
> 
>   Arghhh, indeed :-(
> 
> Daniel
> 
> > On Thu, May 13 2021 at 15:54:55 +0200, Daniel Veillard via xml
> >  wrote:
> > >   P, I am way way behind, but now that CVE-2021-3541 is out I just
> > > pushed
> > > that long awaited release. libxml2 2.9.11 is tagged in git and a signed
> > > tarball is available at the usual place:
> > > 
> > > ftp://xmlsoft.org/libxml2/
> > > 
> > > 
> > >   This release incoporate the various security and quadatic patches that
> > > Nick has found and fixed, and CVE-2021-3541. There is also a very large
> > > list
> > > of bug fixes and improvement most of them from Nick too:
> > > 
> > > Security:
> > > - Patch for security issue CVE-2021-3541 (Daniel Veillard)
> > > Documentation:
> > > - Clarify xmlNewDocProp documentation (Nick Wellnhofer)
> > > Portability:
> > > - CMake: Only add postfixes if MSVC (Christopher Degawa)
> > > - Fix XPath NaN/Inf for older GCC versions (Nick Wellnhofer)
> > > - Use CMake PROJECT_VERSION (Markus Rickert)
> > > - Fix warnings in libxml.m4 with autoconf 2.70+. (Simon Josefsson)
> > > - Add CI for CMake on MSVC (Markus Rickert)
> > > - Update minimum required CMake version (Markus Rickert)
> > > - Add variables for configured options to CMake config files (Markus
> > > Rickert)
> > > - Check if variables exist when defining targets (Markus Rickert)
> > > - Check if target exists when reading target properties (Markus Rickert)
> > > - Add xmlcatalog target and definition to config files (Markus Rickert)
> > > - Remove include directories for link-only dependencies (Markus Rickert)
> > > - Fix ICU build in CMake (Markus Rickert)
> > > - Configure pkgconfig, xml2-config, and xml2Conf.sh file (Markus
> > > Rickert)
> > > - Update CMake config files (Markus Rickert)
> > > - Add xmlcatalog and xmllint to CMake export (Markus Rickert)
> > > - Simplify xmlexports.h (Nick Wellnhofer)
> > > - Require dependencies based on enabled CMake options (Markus Rickert)
> > > - Use NAMELINK_COMPONENT in CMake install (Markus Rickert)
> > > - Add CMake files to EXTRA_DIST (Markus Rickert)
> > > - Add missing compile definition for static builds to CMake (Markus
> > > Rickert)
> > > - Add CI for CMake on Linux and MinGW (Markus Rickert)
> > > - Fix variable name in win32/configure.js (Nick Wellnhofer)
> > > - Fix version parsing in win32/configure.js (Nick Wellnhofer)
> > > - Fix autotools warnings (Nick Wellnhofer)
> > > - Update config.h.cmake.in (Markus Rickert)
> > > - win32: allow passing *FLAGS on command line (Michael Stahl)
> > > - Configure file xmlwin32version.h.in on MSVC (Markus Rickert)
> > > - List headers individually (Markus Rickert)
> > > - Add CMake build files (Markus Rickert)
> > > - Parenthesize Py_Check() in ifs (Miro Hrončok)
> > > - Minor fixes to configure.js (Nick Wellnhofer)
> > > Bug Fixes:
> > > - Fix null deref in legacy SAX1 parser (Nick Wellnhofer)
> > > - Fix handling of unexpected EOF in xmlParseContent (Nick Wellnhofer)
> > > - Fix line numbers in error messages for mismatched tags (Nick
> > > Wellnhofer)
> > > - Fix htmlTagLookup (Nick Wellnhofer)
> > > - Propagate error in xmlParseElementChildrenContentDeclPriv (Nick
> > > Wellnhofer)
> > > - Fix user-after-free with `xmllint --xinclude --dropdtd` (Nick
> > > Wellnhofer)
> > > - Fix dangling pointer with `xmllint --dropdtd` (Nick Wellnhofer)
> > > - Validate UTF8 in xmlEncodeEntities (Joel Hockey)
> > > - Fix use-after-free with `xmllint --html --push` (Nick Wellnhofer)
> > > - Allow FP division by zero in xmlXPathInit (Nick Wellnhofer)
&g

Re: [xml] Release of libxml2 2.9.11

2021-05-13 Thread Daniel Veillard via xml
On Thu, May 13, 2021 at 05:52:16PM +0200, Jan Tojnar wrote:
> Hi, trying to build the package from the tarball on NixOS, it appears that
> fuzz/fuzz.h is missing from the archive:
> 
> testFuzzer.c:13:10: fatal error: fuzz.h: No such file or directory
>   13 | #include "fuzz.h"
>  |  ^~~~
> compilation terminated.
> 
> It appears to be available in the git repo, so perhaps it just needs to be
> added to EXTRA_DIST or something?

  Arghhh, indeed :-(

Daniel

> On Thu, May 13 2021 at 15:54:55 +0200, Daniel Veillard via xml
>  wrote:
> >   P, I am way way behind, but now that CVE-2021-3541 is out I just
> > pushed
> > that long awaited release. libxml2 2.9.11 is tagged in git and a signed
> > tarball is available at the usual place:
> > 
> > ftp://xmlsoft.org/libxml2/
> > 
> > 
> >   This release incoporate the various security and quadatic patches that
> > Nick has found and fixed, and CVE-2021-3541. There is also a very large
> > list
> > of bug fixes and improvement most of them from Nick too:
> > 
> > Security:
> > - Patch for security issue CVE-2021-3541 (Daniel Veillard)
> > Documentation:
> > - Clarify xmlNewDocProp documentation (Nick Wellnhofer)
> > Portability:
> > - CMake: Only add postfixes if MSVC (Christopher Degawa)
> > - Fix XPath NaN/Inf for older GCC versions (Nick Wellnhofer)
> > - Use CMake PROJECT_VERSION (Markus Rickert)
> > - Fix warnings in libxml.m4 with autoconf 2.70+. (Simon Josefsson)
> > - Add CI for CMake on MSVC (Markus Rickert)
> > - Update minimum required CMake version (Markus Rickert)
> > - Add variables for configured options to CMake config files (Markus
> > Rickert)
> > - Check if variables exist when defining targets (Markus Rickert)
> > - Check if target exists when reading target properties (Markus Rickert)
> > - Add xmlcatalog target and definition to config files (Markus Rickert)
> > - Remove include directories for link-only dependencies (Markus Rickert)
> > - Fix ICU build in CMake (Markus Rickert)
> > - Configure pkgconfig, xml2-config, and xml2Conf.sh file (Markus
> > Rickert)
> > - Update CMake config files (Markus Rickert)
> > - Add xmlcatalog and xmllint to CMake export (Markus Rickert)
> > - Simplify xmlexports.h (Nick Wellnhofer)
> > - Require dependencies based on enabled CMake options (Markus Rickert)
> > - Use NAMELINK_COMPONENT in CMake install (Markus Rickert)
> > - Add CMake files to EXTRA_DIST (Markus Rickert)
> > - Add missing compile definition for static builds to CMake (Markus
> > Rickert)
> > - Add CI for CMake on Linux and MinGW (Markus Rickert)
> > - Fix variable name in win32/configure.js (Nick Wellnhofer)
> > - Fix version parsing in win32/configure.js (Nick Wellnhofer)
> > - Fix autotools warnings (Nick Wellnhofer)
> > - Update config.h.cmake.in (Markus Rickert)
> > - win32: allow passing *FLAGS on command line (Michael Stahl)
> > - Configure file xmlwin32version.h.in on MSVC (Markus Rickert)
> > - List headers individually (Markus Rickert)
> > - Add CMake build files (Markus Rickert)
> > - Parenthesize Py_Check() in ifs (Miro Hrončok)
> > - Minor fixes to configure.js (Nick Wellnhofer)
> > Bug Fixes:
> > - Fix null deref in legacy SAX1 parser (Nick Wellnhofer)
> > - Fix handling of unexpected EOF in xmlParseContent (Nick Wellnhofer)
> > - Fix line numbers in error messages for mismatched tags (Nick
> > Wellnhofer)
> > - Fix htmlTagLookup (Nick Wellnhofer)
> > - Propagate error in xmlParseElementChildrenContentDeclPriv (Nick
> > Wellnhofer)
> > - Fix user-after-free with `xmllint --xinclude --dropdtd` (Nick
> > Wellnhofer)
> > - Fix dangling pointer with `xmllint --dropdtd` (Nick Wellnhofer)
> > - Validate UTF8 in xmlEncodeEntities (Joel Hockey)
> > - Fix use-after-free with `xmllint --html --push` (Nick Wellnhofer)
> > - Allow FP division by zero in xmlXPathInit (Nick Wellnhofer)
> > - Fix xmlGetNodePath with invalid node types (Nick Wellnhofer)
> > - Fix exponential behavior with recursive entities (Nick Wellnhofer)
> > - Fix quadratic behavior when looking up xml:* attributes (Nick
> > Wellnhofer)
> > - Fix slow parsing of HTML with encoding errors (Nick Wellnhofer)
> > - Fix null deref introduced with previous commit (Nick Wellnhofer)
> > - Check for invalid redeclarations of predefined entities (Nick
> > Wellnhofer)
> > - Add the copy of type from original xmlDoc in xmlCopyDoc() (SVGAnimate)
> > - parser.c: shrink the input buffer when appropriate (Mike Dalessio)
> > - Fix infinite loop in HTML parser intro

[xml] Release of libxml2 2.9.11

2021-05-13 Thread Daniel Veillard via xml
  P, I am way way behind, but now that CVE-2021-3541 is out I just pushed
that long awaited release. libxml2 2.9.11 is tagged in git and a signed
tarball is available at the usual place:

ftp://xmlsoft.org/libxml2/


  This release incoporate the various security and quadatic patches that
Nick has found and fixed, and CVE-2021-3541. There is also a very large list
of bug fixes and improvement most of them from Nick too:

Security:
- Patch for security issue CVE-2021-3541 (Daniel Veillard)
Documentation:
- Clarify xmlNewDocProp documentation (Nick Wellnhofer)
Portability:
- CMake: Only add postfixes if MSVC (Christopher Degawa)
- Fix XPath NaN/Inf for older GCC versions (Nick Wellnhofer)
- Use CMake PROJECT_VERSION (Markus Rickert)
- Fix warnings in libxml.m4 with autoconf 2.70+. (Simon Josefsson)
- Add CI for CMake on MSVC (Markus Rickert)
- Update minimum required CMake version (Markus Rickert)
- Add variables for configured options to CMake config files (Markus Rickert)
- Check if variables exist when defining targets (Markus Rickert)
- Check if target exists when reading target properties (Markus Rickert)
- Add xmlcatalog target and definition to config files (Markus Rickert)
- Remove include directories for link-only dependencies (Markus Rickert)
- Fix ICU build in CMake (Markus Rickert)
- Configure pkgconfig, xml2-config, and xml2Conf.sh file (Markus Rickert)
- Update CMake config files (Markus Rickert)
- Add xmlcatalog and xmllint to CMake export (Markus Rickert)
- Simplify xmlexports.h (Nick Wellnhofer)
- Require dependencies based on enabled CMake options (Markus Rickert)
- Use NAMELINK_COMPONENT in CMake install (Markus Rickert)
- Add CMake files to EXTRA_DIST (Markus Rickert)
- Add missing compile definition for static builds to CMake (Markus Rickert)
- Add CI for CMake on Linux and MinGW (Markus Rickert)
- Fix variable name in win32/configure.js (Nick Wellnhofer)
- Fix version parsing in win32/configure.js (Nick Wellnhofer)
- Fix autotools warnings (Nick Wellnhofer)
- Update config.h.cmake.in (Markus Rickert)
- win32: allow passing *FLAGS on command line (Michael Stahl)
- Configure file xmlwin32version.h.in on MSVC (Markus Rickert)
- List headers individually (Markus Rickert)
- Add CMake build files (Markus Rickert)
- Parenthesize Py_Check() in ifs (Miro Hrončok)
- Minor fixes to configure.js (Nick Wellnhofer)
Bug Fixes:
- Fix null deref in legacy SAX1 parser (Nick Wellnhofer)
- Fix handling of unexpected EOF in xmlParseContent (Nick Wellnhofer)
- Fix line numbers in error messages for mismatched tags (Nick Wellnhofer)
- Fix htmlTagLookup (Nick Wellnhofer)
- Propagate error in xmlParseElementChildrenContentDeclPriv (Nick Wellnhofer)
- Fix user-after-free with `xmllint --xinclude --dropdtd` (Nick Wellnhofer)
- Fix dangling pointer with `xmllint --dropdtd` (Nick Wellnhofer)
- Validate UTF8 in xmlEncodeEntities (Joel Hockey)
- Fix use-after-free with `xmllint --html --push` (Nick Wellnhofer)
- Allow FP division by zero in xmlXPathInit (Nick Wellnhofer)
- Fix xmlGetNodePath with invalid node types (Nick Wellnhofer)
- Fix exponential behavior with recursive entities (Nick Wellnhofer)
- Fix quadratic behavior when looking up xml:* attributes (Nick Wellnhofer)
- Fix slow parsing of HTML with encoding errors (Nick Wellnhofer)
- Fix null deref introduced with previous commit (Nick Wellnhofer)
- Check for invalid redeclarations of predefined entities (Nick Wellnhofer)
- Add the copy of type from original xmlDoc in xmlCopyDoc() (SVGAnimate)
- parser.c: shrink the input buffer when appropriate (Mike Dalessio)
- Fix infinite loop in HTML parser introduced with recent commits (Nick 
Wellnhofer)
- Fix quadratic runtime when parsing CDATA sections (Nick Wellnhofer)
- Fix timeout when handling recursive entities (Nick Wellnhofer)
- Fix memory leak in xmlParseElementMixedContentDecl (Nick Wellnhofer)
- Fix null deref in xmlStringGetNodeList (Nick Wellnhofer)
- use new htmlParseLookupCommentEnd to find comment ends (Mike Dalessio)
- htmlParseComment: treat `--!>` as if it closed the comment (Mike Dalessio)
- Fix integer overflow in xmlSchemaGetParticleTotalRangeMin (Nick Wellnhofer)
- encoding: fix memleak in xmlRegisterCharEncodingHandler() (Xiaoming Ni)
- xmlschemastypes.c: xmlSchemaGetFacetValueAsULong add, check "facet->val" 
(Xiaoming Ni)
- Fix null pointer deref in xmlXPtrRangeInsideFunction (Nick Wellnhofer)
- Fix quadratic runtime in HTML push parser with null bytes (Nick Wellnhofer)
- Avoid quadratic checking of identity-constraints (Michael Matz)
- Fix building with ICU 68. (Frederik Seiffert)
- Convert python/libxml.c to PY_SSIZE_T_CLEAN (Victor Stinner)
- Fix xmlURIEscape memory leaks. (Elliott Hughes)
- Avoid call stack overflow with XML reader and recursive XIncludes (Nick 
Wellnhofer)
- Fix caret in regexp character group (Nick Wellnhofer)
- parser.c: xmlParseCharData peek behavior fixed wrt newlines (Mike Dalessio)
- Fix memory leaks in XPointer string-range function 

Re: [xml] Could we have a new release?

2021-04-15 Thread Daniel Veillard via xml
On Wed, Apr 14, 2021 at 11:35:58AM +0200, Stefan Behnel wrote:
> Hi,
> 
> libxml2 2.9.10 has been around for almost 18 months now. There have been
> lots of fixes during that time, so, may I kindly ask what's hindering a new
> release?

  Maybe that I'm just too busy with "work", plus teh fact that there is
something I would need to get in before a release.

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] getting the output of string() in the xmllint shell

2019-12-21 Thread Daniel Veillard via xml
On Fri, Dec 20, 2019 at 12:46:23PM +0100, Gökçe Aydos wrote:
> I use xmllint in my command-line scripts. The default mode of xmllint
> does not support namespaces, so when I must deal with XML files with
> namespaces I use the --shell mode of xmllint.

  That sounds ... wrong

> I noticed that the xpath command in the shell behaves differently than
> the *xmllint --xpath* on the command line. For example if I want to
> extract only the string portion of an attribute I use:
> 
>   xmllint --xpath "string(//node)"

  hum ... //node doesn't address attributes

> When I want to do the same in the shell, I must use the *xpath* command,
> because the *cat* command only supports node addresses.
> 
>   xpath "string(//node)"
> 
> Unfortunately the xpath command gives an output like:
> 
>   Object is a string : http://purl.obolibrary.org/obo/DOID_8545...
> 
> Is it possible to get a clean output with xmllint without using other tools?

  your request is very confusing but you should be able to get the string
value of the attributes directly by using an XPath looking for that attribute

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Memory leak problem

2019-12-21 Thread Daniel Veillard via xml
ave to free()?
> Better, is there a function that I can pass the node and it free()'s
> everything for me?
> 
>  
> 
> Any help - even sample code - would be much appreciated!  Free horse back
> ride in AZ for a winner?
> 
>  
> 
> E
> 
>  
> 
>  
> 
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Eric S Eberhard
> 
> VICS (Vertical Integrated Computer Systems)
> 
> Voice: 928 567 3529
> 
> Cell: 928 301 7537  (not reliable except for text or if not home)
> 
> 2933 W Middle Verde Rd
> 
> Camp Verde, AZ  86322
> 
>  
> 
> Oh - help me out and please join this group.  I need to get large numbers of
> members to take to the politicians.
> https://www.facebook.com/groups/286143052248115/
> 
> This might work to just join?
> 
>  style="border-collapse:collapse;"> style="line-height:28px;"> width="280" cellspacing="0" cellpadding="0"
> style="border-collapse:separate;background-color:#ff;border:1px solid
> #dddfe2;border-radius:3px;font-family:Helvetica, Arial,
> sans-serif;margin:0px auto;"> style=""> src="https://scontent.fhhr1-1.fna.fbcdn.net/v/t1.0-0/c0.0.584.305a/p320x320/
> 50521766_10218655229077782_1167298564032823296_n.jpg?_nc_cat=101_nc_ht=
> scontent.fhhr1-1.fnaoh=d725734d9126b706d402e635740dcd29oe=5D00A5A4
> " width="280" height="146" alt="" /> style="font-size:14px;font-weight:bold;padding:8px 8px 0px
> 8px;text-align:center;">Save The Middle Verde style="color:#90949c;font-size:12px;font-weight:normal;text-align:center;">P
> ublic group . 228 members style="border-collapse:collapse;width:100%;"> style="background-color:#4267b2;border-radius:3px;text-align:center;"> style="color:#3b5998;text-decoration:none;cursor:pointer;width:100%;"
> href="https://www.facebook.com/plugins/group/join/popup/?group_id=2861430522
> 48115source=email_campaign_plugin" target="_blank"
> rel="noopener"> align="center" style="border-collapse:collapse;"> style="border-bottom:3px solid #4267b2;border-top:3px solid
> #4267b2;color:#FFF;font-family:Helvetica, Arial,
> sans-serif;font-size:12px;font-weight:bold;">Join
> Group style="border-top:1px solid #dddfe2;font-size:12px;padding:8px 12px;">This
> group is to help preserve the Middle Verde River, the Middle Verde Character
> area as defined in the Town of Camp Verdes General Plan, the 260
> co... style="line-height:28px;">
> 
>  
> 

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for libxml2-2.9.10

2019-11-03 Thread Daniel Veillard via xml
On Thu, Oct 31, 2019 at 10:06:51PM +0100, Stefan Behnel wrote:
> Hi,
> 
> sorry to be late to the party. Let me note that the release tests fine with
> lxml, just with two test failures due to changed (and apparently more
> accurate) error texts/IDs. I'll adapt the tests in lxml.
> 
> Thank you for the release, Daniel!
> 
> Stefan

  Okay, good to know :-)

   thanks Stefan !

Daniel

> 
> Daniel Veillard schrieb am 28.10.19 um 21:26:
> > On Tue, Oct 29, 2019 at 07:40:34AM +1300, David Warring wrote:
> >> The tests for newish Raku (Perl 6) bindings are fine with 
> >> libxml2-2.9.10-rc1
> >> https://github.com/p6-xml/LibXML-p6
> > 
> >   Okay seems we have a good one ! Thanks David
> > 
> > BTW is lxml current maintainer around, that may be one good way to validate
> > that one and the libxslt 1.1.34 rc2 too, Stefan or Martijn are you around ?
> > 
> > Daniel
> > 
> >> - David
> >>
> >> On Thu, Oct 24, 2019 at 5:53 AM Daniel Veillard via xml 
> >> wrote:
> >>
> >>>   Took a while but it's time to assemble a new release,
> >>> I tagged it in git and pushed signed tarball and rpms to the
> >>> usual place:
> >>>
> >>>ftp://xmlsoft.org/libxml2/
> >>>
> >>> I will try to make an rc2 during the week-end, and then we can
> >>> roll up the release by mid next week.
> >>>
> >>>  In the meantime please give it some testing,
> >>>
> >>>thanks,
> >>>
> >>> Daniel
> >>>
> >>> --
> >>> Daniel Veillard  | Red Hat Developers Tools
> >>> http://developer.redhat.com/
> >>> veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> >>> http://veillard.com/ | virtualization library  http://libvirt.org/
> >>>
> >>> ___
> >>> xml mailing list, project page  http://xmlsoft.org/
> >>> xml@gnome.org
> >>> https://mail.gnome.org/mailman/listinfo/xml
> >>>
> > 
> 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libxml2-2.9.10

2019-10-30 Thread Daniel Veillard via xml
   It's out ! Tagged in git and with signed tarball and rpms
at the usual place:

  ftp://xmlsoft.org/libxml2/


  This is a relatively large release, Nick fixed a number of bugs and improved
the code in many areas, among other things removing some recursive behaviour
of the code in various places. Includes various portability fixes,
documentation updates and cleanups:

Documentation:
- Fix a few more typos ("fonction") (Nick Wellnhofer)
- Large batch of typo fixes (Jared Yanovich)
- Fix typos: tree: move{ -> s}, reconcil{i -> }ed, h{o -> e}ld by... (Jan 
Pokorný)
- Fix typo: xpath: simpli{ -> fi}ed (Jan Pokorný)
- Doc: do not mislead towards "infeasible" scenario wrt. xmlBufNodeDump (Jan 
Pokorný)
- Fix comments in test code (zhouzhongyuan)
- fix comment in testReader.c (zhouzhongyuan)

Portability:
- Fix some release issues on Fedora 30 (Daniel Veillard)
- Fix exponent digits when running tests under old MSVC (Daniel Richard G)
- Work around buggy ceil() function on AIX (Daniel Richard G)
- Don't call printf with NULL string in runtest.c (Daniel Richard G)
- Switched from unsigned long to ptrdiff_t in parser.c (Stephen Chenney)
- timsort.h: support older GCCs (Jérôme Duval)
- Make configure.ac work with older pkg-config (Nick Wellnhofer)
- Stop defining _REENTRANT on some Win32 platforms (Nick Wellnhofer)
- Fix nanohttp.c on MinGW (Nick Wellnhofer)
- Fix Windows compiler warning in testC14N.c (Nick Wellnhofer)
- Merge testThreadsWin32.c into testThreads.c (Nick Wellnhofer)
- Fix Python bindings under Windows (Nick Wellnhofer)

Bug Fixes:
- Another fix for conditional sections at end of document (Nick Wellnhofer)
- Fix for conditional sections at end of document (Nick Wellnhofer)
- Make sure that Python tests exit with error code (Nick Wellnhofer)
- Audit memory error handling in xpath.c (Nick Wellnhofer)
- Fix error code in xmlTextWriterStartDocument (Nick Wellnhofer)
- Fix integer overflow when counting written bytes (Nick Wellnhofer)
- Fix uninitialized memory access in HTML parser (Nick Wellnhofer)
- Fix memory leak in xmlSchemaValAtomicType (Nick Wellnhofer)
- Disallow conditional sections in internal subset (Nick Wellnhofer)
- Fix use-after-free in xmlTextReaderFreeNodeList (Nick Wellnhofer)
- Fix Regextests (Nick Wellnhofer)
- Fix empty branch in regex (Nick Wellnhofer)
- Fix integer overflow in entity recursion check (Nick Wellnhofer)
- Don't read external entities or XIncludes from stdin (Nick Wellnhofer)
- Fix Schema determinism check of ##other namespaces (Nick Wellnhofer)
- Fix potential null deref in xmlSchemaIDCFillNodeTables (zhouzhongyuan)
- Fix potential memory leak in xmlBufBackToBuffer (Nick Wellnhofer)
- Fix error message when processing XIncludes with fallbacks (Nick Wellnhofer)
- Fix memory leak in xmlRegEpxFromParse (zhouzhongyuan)
- 14:00 is a valid timezone for xs:dateTime (Nick Wellnhofer)
- Fix memory leak in xmlParseBalancedChunkMemoryRecover (Zhipeng Xie)
- Fix potential null deref in xmlRelaxNGParsePatterns (Nick Wellnhofer)
- Misleading error message with xs:{min|max}Inclusive (bettermanzzy)
- Fix memory leak in xmlXIncludeLoadTxt (Wang Kirin)
- Partial fix for comparison of xs:durations (Nick Wellnhofer)
- Fix null deref in xmlreader buffer (zhouzhongyuan)
- Fix unability to RelaxNG-validate grammar with choice-based name class (Jan 
Pokorný)
- Fix unability to validate ambiguously constructed interleave for RelaxNG (Jan 
Pokorný)
- Fix possible null dereference in xmlXPathIdFunction (zhouzhongyuan)
- fix memory leak in xmlAllocOutputBuffer (zhouzhongyuan)
- Fix unsigned int overflow (Jens Eggerstedt)
- dict.h: gcc 2.95 doesn't allow multiple storage classes (Nick Wellnhofer)
- Fix another code path in xmlParseQName (Nick Wellnhofer)
- Make sure that xmlParseQName returns NULL in error case (Nick Wellnhofer)
- Fix build without reader but with pattern (Nick Wellnhofer)
- Fix memory leak in xmlAllocOutputBufferInternal error path (Nick Wellnhofer)
- Fix unsigned integer overflow (Nick Wellnhofer)
- Fix return value of xmlOutputBufferWrite (Nick Wellnhofer)
- Fix parser termination from "Double hyphen within comment" error (David 
Warring)
- Fix call stack overflow in xmlFreePattern (Nick Wellnhofer)
- Fix null deref in previous commit (Nick Wellnhofer)
- Fix memory leaks in xmlXPathParseNameComplex error paths (Nick Wellnhofer)
- Check for integer overflow in xmlXPtrEvalChildSeq (Nick Wellnhofer)
- Fix xmllint dump of XPath namespace nodes (Nick Wellnhofer)
- Fix float casts in xmlXPathSubstringFunction (Nick Wellnhofer)
- Fix null deref in xmlregexp error path (Nick Wellnhofer)
- Fix null pointer dereference in xmlTextReaderReadOuterXml (Nick Wellnhofer)
- Fix memory leaks in xmlParseStartTag2 error paths (Nick Wellnhofer)
- Fix memory leak in xmlSAX2StartElement (Nick Wellnhofer)
- Fix commit "Memory leak in xmlFreeID (xmlreader.c)" (Nick Wellnhofer)
- Fix NULL pointer deref in xmlTextReaderValidateEntity (Nick 

Re: [xml] Entering freeze for libxml2-2.9.10

2019-10-28 Thread Daniel Veillard via xml
On Tue, Oct 29, 2019 at 07:40:34AM +1300, David Warring wrote:
> The tests for newish Raku (Perl 6) bindings are fine with libxml2-2.9.10-rc1
> https://github.com/p6-xml/LibXML-p6

  Okay seems we have a good one ! Thanks David

BTW is lxml current maintainer around, that may be one good way to validate
that one and the libxslt 1.1.34 rc2 too, Stefan or Martijn are you around ?

Daniel

> - David
> 
> On Thu, Oct 24, 2019 at 5:53 AM Daniel Veillard via xml 
> wrote:
> 
> >   Took a while but it's time to assemble a new release,
> > I tagged it in git and pushed signed tarball and rpms to the
> > usual place:
> >
> >ftp://xmlsoft.org/libxml2/
> >
> > I will try to make an rc2 during the week-end, and then we can
> > roll up the release by mid next week.
> >
> >  In the meantime please give it some testing,
> >
> >thanks,
> >
> > Daniel
> >
> > --
> > Daniel Veillard  | Red Hat Developers Tools
> > http://developer.redhat.com/
> > veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> > http://veillard.com/ | virtualization library  http://libvirt.org/
> >
> > _______
> > xml mailing list, project page  http://xmlsoft.org/
> > xml@gnome.org
> > https://mail.gnome.org/mailman/listinfo/xml
> >

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for libxml2-2.9.10

2019-10-28 Thread Daniel Veillard via xml
On Mon, Oct 28, 2019 at 02:07:28PM -0400, Mike Dalessio wrote:
> Hi all,
> 
> Just FYI - the Nokogiri (Ruby gem wrapping libxml2) test pipelines are all
> *green* with 2.9.10-rc1.
> 
> See
> https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri-libxml-2.9.10
> for
> details, but RC1 looks good from here.

  Another good news, thanks Mike !

Daniel

> -m
> 
> 
> On Mon, Oct 28, 2019 at 10:12 AM Daniel Veillard via xml 
> wrote:
> 
> > On Mon, Oct 28, 2019 at 02:35:06PM +0100, Christoph M. Becker wrote:
> > > Hi,
> > >
> > > On 28.10.2019 at 10:06, Daniel Veillard via xml wrote:
> > >
> > > >   In the absence of feedback or changes since RC1, I am not pushing
> > > > an RC2 for libxml2-2.9.10, assume a final release for Wed or Thursday,
> > > >
> > > >   in the meantime, please give it a try !
> > >
> > > I just ran the php-src test suite for all relevant PHP extensions using
> > > libxml2, and I detected no regression compared to 2.9.9 (besides some
> > > minor] error reporting difference regarding a broken XML file[1).
> > >
> > > So RC1 looks good to me.  Thanks!
> > >
> > > [1]
> > > <
> > https://github.com/php/php-src/blob/php-7.3.11/ext/dom/tests/not_well_formed.xml
> > >
> > >
> > > Regards,
> > > Christoph
> >
> >   Cool, thanks for the report Christoph !
> >
> > Daniel
> >
> > --
> > Daniel Veillard  | Red Hat Developers Tools
> > http://developer.redhat.com/
> > veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> > http://veillard.com/ | virtualization library  http://libvirt.org/
> >
> > ___
> > xml mailing list, project page  http://xmlsoft.org/
> > xml@gnome.org
> > https://mail.gnome.org/mailman/listinfo/xml
> >

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for libxml2-2.9.10

2019-10-28 Thread Daniel Veillard via xml
On Wed, Oct 23, 2019 at 06:53:07PM +0200, Daniel Veillard via xml wrote:
>   Took a while but it's time to assemble a new release,
> I tagged it in git and pushed signed tarball and rpms to the
> usual place:
> 
>ftp://xmlsoft.org/libxml2/
> 
> I will try to make an rc2 during the week-end, and then we can
> roll up the release by mid next week.
> 
>  In the meantime please give it some testing,
> 
>thanks,
> 
> Daniel

  In the absence of feedback or changes since RC1, I am not pushing
an RC2 for libxml2-2.9.10, assume a final release for Wed or Thursday,

  in the meantime, please give it a try !

   Thanks

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Entering freeze for libxml2-2.9.10

2019-10-23 Thread Daniel Veillard via xml
  Took a while but it's time to assemble a new release,
I tagged it in git and pushed signed tarball and rpms to the
usual place:

   ftp://xmlsoft.org/libxml2/

I will try to make an rc2 during the week-end, and then we can
roll up the release by mid next week.

 In the meantime please give it some testing,

   thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [PATCH] Doc: do not mislead towards "infeasible" scenario wrt. xmlBufNodeDump

2019-08-23 Thread Daniel Veillard via xml
  ACK :-)


Daniel

On Thu, Jul 11, 2019 at 08:00:39PM +0200, Jan Pokorný via xml wrote:
> At least when merely public API is to be leveraged, one cannot use
> xmlBufCreate function that would otherwise be a clear fit, and relying
> on some invariants wrt. how some other struct fields will get
> initialized along the construction/filling such parent struct and
> (ab)using that instead does not appear clever, either.
> 
> Hence, instruct people what's the Right Thing for the moment, that is,
> make them use xmlNodeDumpOutput instead (together with likewise public
> xmlAllocOutputBuffer).
> 
> Going forward, it's questionable what do with xmlBuf* family of
> functions that are once public, since they, for any practical purpose,
> cannot be used by the library clients (that's how I've run into this).
> 
> Signed-off-by: Jan Pokorný 
> ---
> 
> Hello Daniel, Nick, and others,
> 
> I've run into a source of frustration based on an unset advice
> in the documentation that I hope to remove with this change.
> Or did I overlook something?  Thanks for pulling otherwise!
> 
> (Indeed, there could be substantially bigger cut, like possibly
> retargeting xmlBufCreate as public, etc. but no wonders if there's
> not much will for that once the status quo lasted so long...)
> 
> -- Jan (Poki)
> 
>  doc/libxml2-api.xml  | 2 +-
>  doc/libxml2-refs.xml | 6 +++---
>  xmlsave.c| 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
> index 9cf6c72e..ccba52f2 100644
> --- a/doc/libxml2-api.xml
> +++ b/doc/libxml2-api.xml
> @@ -11778,7 +11778,7 @@ Could we use @subtypes for this?'/>
>  
>  
>defined(LIBXML_OUTPUT_ENABLED)
> -  Dump an XML node, recursive behaviour,children are printed too. 
> Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 
> or xmlKeepBlanksDefault(0) was called Since this is using xmlBuffer 
> structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() 
> instead.
> +  Dump an XML node, recursive behaviour,children are printed too. 
> Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 
> or xmlKeepBlanksDefault(0) was called. Since this is using xmlBuffer 
> structures it is limited to 2GB and somehow deprecated, use 
> xmlNodeDumpOutput() instead.
>
>
>
> diff --git a/doc/libxml2-refs.xml b/doc/libxml2-refs.xml
> index 3fe0876f..3109bac4 100644
> --- a/doc/libxml2-refs.xml
> +++ b/doc/libxml2-refs.xml
> @@ -31120,9 +31120,6 @@
>  
>
>  
> -
> -  
> -
>  
>
>  
> @@ -31493,6 +31490,9 @@
>
>
>  
> +
> +  
> +
>  
>
>  
> diff --git a/xmlsave.c b/xmlsave.c
> index f7173ebb..bf805330 100644
> --- a/xmlsave.c
> +++ b/xmlsave.c
> @@ -2186,9 +2186,9 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr 
> doc,
>   *
>   * Dump an XML node, recursive behaviour,children are printed too.
>   * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput 
> = 1
> - * or xmlKeepBlanksDefault(0) was called
> + * or xmlKeepBlanksDefault(0) was called.
>   * Since this is using xmlBuffer structures it is limited to 2GB and somehow
> - * deprecated, use xmlBufNodeDump() instead.
> + * deprecated, use xmlNodeDumpOutput() instead.
>   *
>   * Returns the number of bytes written to the buffer or -1 in case of error
>   */
> -- 
> 2.22.0
> 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Exponential running time in RELAX NG matching of optional attributes

2019-08-23 Thread Daniel Veillard via xml
On Mon, Jul 22, 2019 at 11:59:42AM +0200, Jan Pokorný via xml wrote:
> On 27/06/19 14:15 +0200, Nikolai Weibull via xml wrote:
> > The following RELAX NG schema requires exponential running time when
> > matching attributes (15 attributes is where my computer begins to
> > show the symptoms, this may vary with your set-up):
> > 
> > a.rng:
> > 
> > 
> > http://relaxng.org/ns/structure/1.0;>
> >   
> > 
> >   a
> >   
> >  > ns="">a
> >  > ns="">b
> >  > ns="">c
> >  > ns="">d
> >  > ns="">e
> >  > ns="">f
> >  > ns="">g
> >  > ns="">h
> >  > ns="">i
> >  > ns="">j
> >  > ns="">k
> >  > ns="">l
> >  > ns="">m
> >  > ns="">n
> >  > ns="">o
> >   
> > 
> >   
> > 
> > 
> > a.xml:
> > 
> > 
> >  > l="12" m="13" n="14" o="15"/>
> > 
> > % time xmllint --noout --relaxng a.rng a.xml
> > real: 3.175, user: 3.147, system: 0.014 (99%)
> > 
> > Changing the group to an interleave, that is,
> > 
> > b.rng:
> > 
> > 
> > http://relaxng.org/ns/structure/1.0;>
> >   
> > 
> >   a
> >   
> >  > ns="">a
> >  > ns="">b
> >  > ns="">c
> >  > ns="">d
> >  > ns="">e
> >  > ns="">f
> >  > ns="">g
> >  > ns="">h
> >  > ns="">i
> >  > ns="">j
> >  > ns="">k
> >  > ns="">l
> >  > ns="">m
> >  > ns="">n
> >  > ns="">o
> >   
> > 
> >   
> > 
> > 
> > gives
> > 
> > % time xmllint --noout --relaxng b.rng a.xml
> > real: 0.008, user: 0.003, system: 0.002 (54%)
> > 
> > Making the attributes required instead of optional also fixes the issue:
> > 
> > c.rng:
> > 
> > 
> > http://relaxng.org/ns/structure/1.0;>
> >   
> > 
> >   a
> >   
> > a
> > b
> > c
> > d
> > e
> > f
> > g
> > h
> > i
> > j
> > k
> > l
> > m
> > n
> > o
> >   
> > 
> >   
> > 
> > 
> > % time xmllint --noout --relaxng c.rng a.xml
> > real: 0.008, user: 0.003, system: 0.002 (55%)
> > 
> > The problem seems to be that xmlRelaxNGValidateDefinition keeps
> > adding states that I feel don’t need checking, but I can’t figure
> > out how to avoid this from happening.

  Hum, I'm way behind  sorry

yes that sounds like there is a graph generation issue, best is to compile
the regexp support with things like DEBUG_REGEXP_GRAPH enabled and trace down
with pencil and paper what kind of graph it generates. That's how most of that 
code
ended up being debugged 

> 
> I can only nod to your analysis, ran into similar observations
> in the past, and they were likewise XML attributes (that parameters to
> fence device instances boil down to) related:

> https://bugzilla.redhat.com/show_bug.cgi?id=1224378#c7
> 
> Callgrind proved to be a useful tool to get better quantitative numbers.

  yup but that's way down

> > Daniel, do you have any input on this?  I’d gladly work on fixing
> > this, but I feel that I need some guidance as to what’s going wrong
> > and perhaps also how to fix it.
> 
> Would be nice to get libxml's RelaxNG validation support closer
> to parity with jing (the only other freely available validator I am
> aware of that can be directly used for a peer comparison), for sure.

  well jing use an orthogonal approach, derivating the document graph directly
while libxml2 uses validation structure derivation instead (when it can't 
compile
down to a regexp). In that case it should be regexp based.
  The two will performs massively differently on different problems.

Daniel

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Extremely small doubt in libxml2

2019-08-01 Thread Daniel Veillard via xml
On Wed, Jul 31, 2019 at 10:00:22PM +0530, Akash Opensource wrote:
> Can you please help on this. ??
> My guess is encoding in UTF-8
> 

  Can't remember, depending on which buffer it is encoding of byte flow may 
not be UTF-8 there. 
  All this is relatively tricky code, written 15-20 years ago, I suggest to
not touch it unless you have an issue with it !

Daniel

> On Sun, Jul 28, 2019, 4:31 PM Akash Opensource  wrote:
> 
> > Hi Veillard and Support Team,
> >
> > Thanks for the wonderful code of libxml2 written by you and the team.
> > It's a boon to software developers and teachers.
> >
> > I have a doubt regarding xmlParserInputBufferGrow() function in libxml2.
> > I checked all the latest version of libxml2, but I don't see a explanation
> > to a line len != 4.
> >
> > Also I searched everywhere that value never goes to 4.
> > Can you please help me in providing any info related to this, why it is 4 ?
> >
> > [image: image.png]
> >
> > Thanks & Regards,
> > _OpenSourceGuy
> >
> >
> > <https://www.avast.com/en-in/recommend?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=default3=5e3c0222-9b61-4be9-9efc-3e3c68356db4>
> >  I’m
> > protected online with Avast Free Antivirus. Get it here — it’s free
> > forever.
> > <https://www.avast.com/en-in/recommend?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=default3=5e3c0222-9b61-4be9-9efc-3e3c68356db4>
> > <#m_-1191387292809308158_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >



-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Installing libxml2 as an Os400 service program doesn't work anymore

2019-03-13 Thread Daniel Veillard via xml
On Wed, Mar 13, 2019 at 06:17:18PM +0100, Roberto Bizzozero via xml wrote:
> Hello, I tried to install the LIBXML2 and service program on a V7R3M0 IBMi
> machine, but it failed to compile it, basically for the 100 char limit of
> the source file but also for other problems concerning the OS400 version.
> 
> I fixed it in a branch I created, I attach the diff files, if you are
> interested.
> 
> Also, here it is the issue I've opened on the Gitlab repository:
> 
> https://gitlab.gnome.org/GNOME/libxml2/issues/48
> 
> Thanks,
> 
> Roberto.

  Hi Patrick,

since you authored the OS/400 configuration, could you have a look at
Roberto's pathes, they seems fine to me but it would be better if someone
using libxml2 on that systems could double check,

  thanks,

Daniel


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for release of libxml2-2.9.9

2019-01-04 Thread Daniel Veillard via xml
  Hi Mike,

On Thu, Dec 13, 2018 at 04:37:53PM -0500, Mike Dalessio wrote:
> Hi Daniel,
> 
> I'm curious if you have an updated release schedule for 2.9.9 final?
> 
> Thanks much for coordinating this release.
> 
> -m

  Sorry it's out now, between work, Xmas with familly haeading to my place
and a short trip, it got delayed,

Daniel

> 
> On Thu, Nov 29, 2018 at 4:58 PM Daniel Veillard via xml 
> wrote:
> 
> >   I pushed RC2 in git and pushed signed tarball and rpms to the usual
> > place:
> >
> >ftp://xmlsoft.org/libxml2
> >
> > we have a couple of issues which were raised against rc1 and not completely
> > solved, depending on how we resolve those and if no new ones pop-up I
> > will either push an rc3 around Monday or proceed to 2.9.9 release.
> >
> >   So please ocntinue to give it some testing,
> >
> >thanks everybody,
> >
> > Daniel
> >
> > --
> > Daniel Veillard  | Red Hat Developers Tools
> > http://developer.redhat.com/
> > veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> > http://veillard.com/ | virtualization library  http://libvirt.org/
> > ___
> > xml mailing list, project page  http://xmlsoft.org/
> > xml@gnome.org
> > https://mail.gnome.org/mailman/listinfo/xml
> >

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libxml2-2.9.9

2019-01-03 Thread Daniel Veillard via xml
  Happy New Year,

 the release is finally out, I just tagged it in git and pushed signed
tarball and rpms to the usual place:

  ftp://xmlsoft.org/libxml2/

this is a mixed release, it includes security fixes, bug fixes as well
as improvement and portability fixes for cygwin:


Security:
- CVE-2018-9251 CVE-2018-14567 Fix infinite loop in LZMA decompression (Nick 
Wellnhofer)
- CVE-2018-14404 Fix nullptr deref with XPath logic ops (Nick Wellnhofer)

Documentation:
- reader: Fix documentation comment (Mohammed Sadiq)

Portability:
- Fix MSVC build with lzma (Nick Wellnhofer)
- Variables need 'extern' in static lib on Cygwin (Michael Haubenwallner)
- Really declare dllexport/dllimport for Cygwin (Michael Haubenwallner)
- Merge branch 'patch-2' into 'master' (Nick Wellnhofer)
- Change dir to $THEDIR after ACLOCAL_PATH check autoreconf creates aclocal.m4 
in $srcdir (Vitaly Buka)
- Improve error message if pkg.m4 couldn't be found (Nick Wellnhofer)
- NaN and Inf fixes for pre-C99 compilers (Nick Wellnhofer)

Bug Fixes:
- Revert "Support xmlTextReaderNextSibling w/o preparsed doc" (Nick Wellnhofer)
- Fix building relative URIs (Thomas Holder)
- Problem with data in interleave in RelaxNG validation (Nikolai Weibull)
- Fix memory leak in xmlSwitchInputEncodingInt error path (Nick Wellnhofer)
- Set doc on element obtained from freeElems (Nick Wellnhofer)
- Fix HTML serialization with UTF-8 encoding (Nick Wellnhofer)
- Use actual doc in xmlTextReaderRead*Xml (Nick Wellnhofer)
- Unlink node before freeing it in xmlSAX2StartElement (Nick Wellnhofer)
- Check return value of nodePush in xmlSAX2StartElement (Nick Wellnhofer)
- Free input buffer in xmlHaltParser (Nick Wellnhofer)
- Reset HTML parser input pointers on encoding failure (Nick Wellnhofer)
- Don't run icu_parse_test if EUC-JP is unsupported (Nick Wellnhofer)
- Fix xmlSchemaValidCtxtPtr reuse memory leak (Greg Hildstrom)
- Fix xmlTextReaderNext with preparsed document (Felix Bünemann)
- Remove stray character from comment (Nick Wellnhofer)
- Remove a misleading line from xmlCharEncOutput (Andrey Bienkowski)
- HTML noscript should not close p (Daniel Veillard)
- Don't change context node in xmlXPathRoot (Nick Wellnhofer)
- Stop using XPATH_OP_RESET (Nick Wellnhofer)
- Revert "Change calls to xmlCharEncInput to set flush false" (Nick Wellnhofer)

Improvements:
- Fix "Problem with data in interleave in RelaxNG validation" (Nikolai Weibull)
- cleanup: remove some unreachable code (Thomas Holder)
- add --relative to testURI (Thomas Holder)
- Remove redefined starts and defines inside include elements (Nikolai Weibull)
- Allow choice within choice in nameClass in RELAX NG (Nikolai Weibull)
- Look inside divs for starts and defines inside include (Nikolai Weibull)
- Add compile and libxml2-config.cmake to .gitignore (Nikolai Weibull)
- Stop using doc-charset outside parser code (Nick Wellnhofer)
- Add newlines to 'xmllint --xpath' output (Nick Wellnhofer)
- Don't include SAX.h from globals.h (Nick Wellnhofer)
- Support xmlTextReaderNextSibling w/o preparsed doc (Felix Bünemann)
- Don't instruct user to run make when autogen.sh failed (林博仁(Buo-ren Lin))
- Run Travis ASan tests with "sudo: required" (Nick Wellnhofer)
- Improve restoring of context size and position (Nick Wellnhofer)
- Simplify and harden nodeset filtering (Nick Wellnhofer)
- Avoid unnecessary backups of the context node (Nick Wellnhofer)
- Fix inconsistency in xmlXPathIsInf (Nick Wellnhofer)

  Thanks everybody for your help for this release and especially Nick who
did most of the work on patches and integration !

   Enjoy the new release,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-29 Thread Daniel Veillard via xml
  I pushed RC2 in git and pushed signed tarball and rpms to the usual
place:

   ftp://xmlsoft.org/libxml2

we have a couple of issues which were raised against rc1 and not completely
solved, depending on how we resolve those and if no new ones pop-up I
will either push an rc3 around Monday or proceed to 2.9.9 release.

  So please ocntinue to give it some testing,

   thanks everybody,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-29 Thread Daniel Veillard via xml
On Fri, Nov 23, 2018 at 11:12:13PM +0100, Nick Wellnhofer wrote:
> On 23/11/2018 22:38, Nick Wellnhofer wrote:
> > On 23/11/2018 20:51, Shlomi Fish wrote:
> > > I am getting a failure in one of the tests of
> > > https://github.com/shlomif/perl-XML-LibXML - it works fine with 2.9.8:
> > 
> > Can you check if it's caused by one of the following commits?
> 
> Nevermind, it's this commit:
> 
> https://gitlab.gnome.org/GNOME/libxml2/commit/bfec41b3de1cbd35e547b57c80ae3a5101f8891c
> 
> It seems that XML::LibXML implements its own workaround for
> xmlTextReaderNextSibling only being supported on preparsed documents:
> 
> https://github.com/shlomif/perl-XML-LibXML/blob/master/LibXML.xs#L8667
> 
> The function now claims to work without preparsed documents, so the
> workaround isn't used. But apparently there's problem with the commit. I'm
> CC'ing the author. If we can't get this fixed, let's revert.

  Nick,

I let you double check this post RC2, we can either delay or just revert,
tell me what you think,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-29 Thread Daniel Veillard via xml
On Mon, Nov 26, 2018 at 11:48:37AM +0100, Nikolai Weibull via xml wrote:
> Hi!
> 
> Stefan Behnel, 2018-11-25 15:37:
> 
> > Nikolai Weibull schrieb am 24.11.18 um 00:12:
> 
> > > Yes, it seems that my patch for data in interleaves was added and
> > > this may be the cause of these issues. The regression tests didn’t
> > > display them, so this is something different. Could we perhaps get a
> > > minimal test that breaks?
> 
> > Here is what I could come up with so far. Since it's heavily stripped
> > down,
> > it probably isn't very reasonable anymore. The original schema is here:
> 
> Thank you!  As far as my tests go, with the patches that I’ve provided, this
> validates without any issues.  I really hope we can get my patches from the
> merge request into master so that this issue can be fixed.

  TBH it's weird it fails to validate for me with 2.9.8, with 2.9.9-rc1 and
with 2.9.9-rc1 with the data interleave patch reverted ...
I'm getting quite confused and starting to wonder if the schema I got
from github is correct (github interface serves me first ahn html page,
then I have to guess to use raw, to dwoload that and pray that it is actually
the data one is supposed to use.

---
thinkpad2:~/XML -> ./xmllint --relaxng iso-schematron.rng fail_to_validate.xml 

http://purl.oclc.org/dsdl/schematron;>
Open Model

 BBB element is not present
 CCC element is not present


fail_to_validate.xml:2: element title: Relax-NG validity error : Expecting 
element ns, got title
fail_to_validate.xml:1: element schema: Relax-NG validity error : Expecting an 
element ns, got nothing
fail_to_validate.xml:2: element title: Relax-NG validity error : Expecting 
element p, got title
fail_to_validate.xml:1: element schema: Relax-NG validity error : Expecting an 
element p, got nothing
fail_to_validate.xml:2: element title: Relax-NG validity error : Expecting 
element let, got title
fail_to_validate.xml:3: element rule: Relax-NG validity error : Invalid 
sequence in interleave
fail_to_validate.xml:3: element rule: Relax-NG validity error : Element schema 
failed to validate content
fail_to_validate.xml fails to validate
thinkpad2:~/XML -> 
---

  the "email patch" from gitlab seems to get me back to some sanity there,
it still makes it a mess to review and apply cleanly.

  The 4 patches looks sensible, seems to not introduce regression in existing
tests, the behaviour seems to be exactly the same with Stefan's tests so
I will assume that's unrelated or I didn't get the tests correctly.
I will push them to RC2 and if Stephan still has troubles with it can you please
send mail to the error case as attachments.

  thanks !

Daniel
   
-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-24 Thread Daniel Veillard via xml
On Sat, Nov 24, 2018 at 12:14:06AM +0100, Nikolai Weibull wrote:
> Hi!
> 
> Daniel Veillard via xml, 2018-11-22 18:32:
> 
> >   I have just tagged the Release Candidate 1 in git and pushed a
> > signed
> > tarball and signed rpms to the usual place:
> 
> Could we please get merge request 10 into
> 
> https://gitlab.gnome.org/GNOME/libxml2/merge_requests/10

 Okay that looks different from the other patch for interleaves I applied
earlier. Could you provide a little bit more description, seems it avoid
creating a choice child of a choice element among other things, correct ?

> this release?  It fixes various issues with the RELAX NG code and it even
> has tests!

 I have never been fond of the github interface and it seems gitlab is kind
of mimicking it, In general I will fetch the raw patch, make sure this applies
to master and make sure all commits are linear (c.f. from a gitk viewpoint).
 Nick there seems to be 7 merge requests, maybe we need to go though those
before I push an RC2,

   thanks for raising this Nikolai, and for your contributions :-)

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Entering freeze for release of libxml2-2.9.9

2018-11-22 Thread Daniel Veillard via xml
  I have just tagged the Release Candidate 1 in git and pushed a signed
tarball and signed rpms to the usual place:

  ftp://xmlsoft.org/libxml2/

(also available as http://xmlsoft.org/download/)

Please give it some testing, if we need to make changes I will likely push
an RC2 mid next week, and if everything goes well I will push 2.9.9 final
end of next week.
It would be good to have people who uses it though PHP, Ruby, Java, to verify
that this doesn't introduce problems in those stacks.

  thanks in advance,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Problem with data in interleave in RELAX NG validation

2018-11-22 Thread Daniel Veillard via xml
; > > Hi!
> > > 
> > > Given the following input RELAX NG grammar:
> > > 
> > > http://relaxng.org/ns/structure/1.0;
> > > datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes;>
> > >  
> > >
> > >  
> > >
> > >
> > >  
> > >
> > >  
> > > 
> > > 
> > > and the following input document a.xml:
> > > 
> > > c
> > > 
> > > xmllint reports:
> > > 
> > > a.xml:1: element a: Relax-NG validity error : Element a has extra
> > > content: text
> > > a.xml fails to validate
> > > 
> > > Changing the interleave to a group solves the issue, so the problem
> > > is
> > > with how interleaves are validated.
> > > 
> > > I looked at xmlRelaxNGValidateInterleave() and I sadly have no idea
> > > what’s going on.  Please point me in the right direction and I’ll
> > > gladly write a patch.
> > > 
> > >  Nikolai
> 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Problem with data in interleave in RELAX NG validation

2018-11-22 Thread Daniel Veillard via xml
On Sat, Oct 13, 2018 at 12:23:09AM +0200, Nikolai Weibull via xml wrote:
> Hi!
> 
> This remains unfixed.  I have absolutely no idea what’s going on in the
> interleave validation code.  Daniel, could you please put together some
> minor documentation on how the interleave validation code works?  It’s very
> complicated.
> 
> Thank you,
> 
>  Nikolai

  Hi Nikolai,

I must admit  I don't think I really touched that code for 10 years, it's a bit
hard :-) ... Some of the points behind the RNG implementation of libxml2
are:

  1/ I didn't used the derivation method suggested by James Clark, the problem
 is that if you want to validate an extremely large document, you end up
 building potentially an extremely large in memory derivation data
  2/ where possible, I switch the generated RNG data structure to a normal
 regexp and then use that to validate the subtree, reuses existing
 code, goes way faster due to regexp compilation, but it's certainly
 confusing when trying to understand how it all work !
  3/ based on the above I build streaming RNG validation when people want
 do do RNG validation without full in-memory tree 

so yes deciphering that code both from compilation and runtime is... hard
sorry about that :-)

There is also a known issue with validating interleaves of interleaves, I have
a mess there, it's something on the back of my mind for a decade but
surprizingly few people seems to hit it (or they just used Jing !)

Daniel

> Nikolai Weibull, 2018-09-09 21:26:
> 
> > Hi!
> > 
> > Given the following input RELAX NG grammar:
> > 
> > http://relaxng.org/ns/structure/1.0;
> > datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes;>
> >  
> >
> >  
> >
> >
> >  
> >
> >  
> > 
> > 
> > and the following input document a.xml:
> > 
> > c
> > 
> > xmllint reports:
> > 
> > a.xml:1: element a: Relax-NG validity error : Element a has extra
> > content: text
> > a.xml fails to validate
> > 
> > Changing the interleave to a group solves the issue, so the problem is
> > with how interleaves are validated.
> > 
> > I looked at xmlRelaxNGValidateInterleave() and I sadly have no idea
> > what’s going on.  Please point me in the right direction and I’ll
> > gladly write a patch.
> > 
> >  Nikolai
> 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Serialization of documents without encoding

2018-11-15 Thread Daniel Veillard via xml
On Thu, Sep 27, 2018 at 02:22:55PM +0200, Nick Wellnhofer wrote:
> On 27/09/2018 10:59, Roumen Petrov wrote:
> > Let consider case as "file" mode.
> 
> > Let consider case as "stream" code.
> 
> I'm not only talking about xmllint but the serialization API (xmlSave*,
> xmlNodeDump*) in general.
> 
> > Now about above test samples . if content is stored in file xmllint
> > works fine with encoding(=codeset=charset).
> > 
> > $ cat test-noencoding.xml
> > Käse
> 
> No, it doesn't work fine:
> 
> $ xmllint test-noencoding.xml
> 
> Kse
> 
> > (2) Next a-umlaut character is encoded in hexadecimal. Minor
> > inconsistency between "stream" and "file" mode.
> 
> As shown above, "file" mode can also produce unwanted numeric character
> references.
> 
> > (3) Problem is that in "scream" mode xmllint application ignores value
> > of encode argument:
> > $ echo 'Käse' | xmllint - --encode UTF-8
> > 
> > Kse
> 
> Right, there is an inconsistency in xmllint. But that's not my point.
> 
> >  From my point of view (1) and (2) are minor non-important issues. Only
> > (3) could be fixed with low priority.
> 
> Unneeded numeric character references in UTF-8 output are not a minor issue.
> If you're working with non-Latin scripts, it makes serialized XML files
> unreadable for humans and blows up the file size.

  Not breaking a decade os programs who may be expecting that behaviour sounds
far more important to me honnestly.

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Serialization of documents without encoding

2018-11-15 Thread Daniel Veillard via xml
On Tue, Sep 25, 2018 at 01:19:51PM +0200, Nick Wellnhofer wrote:
> libxml2 serializes documents without an encoding declaration differently
> than documents with an explicit UTF-8 encoding:
> 
> $ echo 'Käse' |xmllint -
> 
> Kse
> 
> $ echo 'Käse' |xmllint -
> 
> Käse
> 
> Since the encoding should default to UTF-8, can anyone explain why this
> decision was made?

  Because using the codepoint is part of the core XML spec, there is no
way this can be screwed up when people are doing manipulations like
cutting parts of an XML document, pasting it somewhere else where the
context may be differemt. So if you don't explicitely ask for an encoding
libxml2 will deliver the most resilient serialization possible and that
means using codepoint, except where not possible (and then specifics about
attributes serialization, etc ...)
  Please keep it that way, you have no idea what people may have done
and unless this really fixes an issue I would be very reluctant to change
this behaviour.

 thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Serialization of documents without encoding

2018-11-15 Thread Daniel Veillard via xml
 Sorry I ddin't watch my xml folder for a while ... a bit busy


On Sat, Oct 06, 2018 at 07:32:00PM +0300, Roumen Petrov wrote:
> Hi Nick,
> 
> Nick Wellnhofer wrote:
> > On 25/09/2018 14:36, Nick Wellnhofer wrote:
> > > The whole situation is a mess. I'd love to change the code so that
> > > non-ASCII chars are always encoded as UTF-8, but I'm scared to break
> > > things.
> 
> Long time ago I did some test with html -
> http://roumenpetrov.info/tests/charset/ .
> 
> The case is quite similar - encoding could be defined externally in HTTP
> header

  Except it usually doesn't work so tons of workarounds need to be applied.

> Content-Type: text/html; charset=ISO8859-5
> ...
> and in the same time in HTML header (internal)
> ...
> 
> 
> 
>   
> 
> 
> ...
> If I remember well (10-15 ago) Internet Explorer prefer internal while other
> browsers prefer external encoding.

  yup it was a mess. I heard horror stories from various parties
implementing even XML support in browsers.

> 
> I create similar test to check what is situation with xml
> http://roumenpetrov.info/tests/charset/index-xml.html and dis some tests (
> ( browsers - Firefox, Opera, Chromium, Konqueror ).
> 
> The test show that all(1) browsers could read xml in following case :
> - HTTP header without charset, i.e. Content-Type: text/html;
> - XML prolog with encoding, i.e. 
> 
> Without encoding in prolog only file in UTF-8 codeset could be read (no
> surprise).
> 
> Behavior of some browsers depend from file suffix . This is reason to test
> to use  .xml and .none suffixes.
> 
> Mix between charset and encoding fail as expected exept in case
> charset=iso8859-1 where some browsers show properly content.
> 
> 
> Based on tests I think that switch to UTF-8 encoded content by default is
> good to have encoding in prolog. It is less risky.
> 
> 
> > This is the change I have in mind:
> > 
> > https://github.com/nwellnhof/libxml2/commit/53551ec2f6a2ef03bfcfb6d73b6fd18dc70ba15d
> 
> Ok to remove "Special escaping routines" but patch shows that in regression
> tests prolog remains as "".
> I'm not sure that such code modification is save.
> 

  That kind of things can backfire *very* easilly.
What is the problem we are trying to solve.
Some people are likely to expect the behaviour of going back to codepoint
when no encoding is specified outside of the ascii range.

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libxml2 2.9.8

2018-03-05 Thread Daniel Veillard
  It's awfully late but it's out, I tagged it in git and pushed signed
tarball and rpms to the usual place:

   ftp://xmlsoft.org/xml/

 at least it got a one month testing on my machines, no issues so far,
I hope this will be a good release for everybody, mostly bug fixes and
improvements with a pinch of portability fixes:


Portability:
- python: remove single use of _PyVerify_fd (Patrick Welche)
- Build more test executables on Windows/MSVC (Nick Wellnhofer)
- Stop including ansidecl.h (Nick Wellnhofer)
- Fix libz and liblzma detection (Nick Wellnhofer)
- Revert "Compile testapi with -Wno-unused-function" (Nick Wellnhofer)

Bug Fixes:
- Fix xmlParserEntityCheck (Nick Wellnhofer)
- Halt parser in case of encoding error (Nick Wellnhofer)
- Clear entity content in case of errors (Nick Wellnhofer)
- Change calls to xmlCharEncInput to set flush false when not final call. 
Having flush incorrectly set to true causes errors for ICU. (Joel Hockey)
- Fix buffer over-read in xmlParseNCNameComplex (Nick Wellnhofer)
- Fix ICU library filenames on Windows/MSVC (Nick Wellnhofer)
- Fix xmlXPathIsNaN broken by recent commit (Nick Wellnhofer)
- Fix -Wenum-compare warnings (Nick Wellnhofer)
- Fix callback signature in testapi.c (Nick Wellnhofer)
- Fix unused parameter warning without ICU (Nick Wellnhofer)
- Fix IO callback signatures (Nick Wellnhofer)
- Fix misc callback signatures (Nick Wellnhofer)
- Fix list callback signatures (Nick Wellnhofer)
- Fix hash callback signatures (Nick Wellnhofer)
- Refactor name and type signature for xmlNop (Vlad Tsyrklevich)
- Fixed ICU to set flush correctly and provide pivot buffer. (Joel Hockey)
- Skip EBCDIC tests if EBCDIC isn't supported (Nick Wellnhofer)

Improvements:
- Disable pointer-overflow UBSan checks under Travis (Nick Wellnhofer)
- Improve handling of context input_id (Daniel Veillard)
- Add resource file to Windows DLL (ccpaging)
- Run Travis tests with -Werror (Nick Wellnhofer)
- Build with "-Wall -Wextra" (Nick Wellnhofer)
- Fix -Wtautological-pointer-compare warnings (Nick Wellnhofer)
- Remove unused AC_CHECKs (Nick Wellnhofer)
- Update information about contributing (Nick Wellnhofer)
- Fix -Wmisleading-indentation warnings (Nick Wellnhofer)
- Don't touch CFLAGS in configure.ac (Nick Wellnhofer)
- Ignore function pointer cast warnings (Nick Wellnhofer)
- Simplify XPath NaN, inf and -0 handling (Nick Wellnhofer)
- Introduce xmlPosixStrdup and update xmlMemStrdup (Nick Wellnhofer)
- Add test for ICU flush and pivot buffer (Nick Wellnhofer)
- Compile testapi with -Wno-unused-function (Nick Wellnhofer)

  Thanks everybody for your help to build that release, obviously Nick
did most of the work, so special thanks to him !

   Enjoy,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Can xmlNodeGetContent() return NULL?

2018-03-05 Thread Daniel Veillard
On Thu, Feb 22, 2018 at 09:50:37AM +0200, Dave Ohlsson wrote:
> Hi,
> 
> See this link:
> https://stackoverflow.com/questions/48901026/can-xmlnodegetcontent-return-null
> 
> Any help from this mailing list?

  yes it can return NULL, for example with an PI node with no content.

Daniel

> -- dave

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2018-01-23 Thread Daniel Veillard
On Tue, Jan 23, 2018 at 09:51:38PM -0800, Jay Civelli wrote:
> On Tue, Jan 23, 2018 at 8:21 PM, Daniel Veillard <veill...@redhat.com>
> wrote:
> 
> > On Mon, Jan 22, 2018 at 04:37:17PM +0100, Nick Wellnhofer wrote:
> > > On 09/01/2018 00:55, Joel Hockey wrote:
> > > > Updated patch with XML_ERR_INVALID_CHAR.
> > >
> > > Should be fixed with
> > >
> > >
> > > https://git.gnome.org/browse/libxml2/commit/?id=60dded12cbf1
> > 705927803c5ed615a7a0132aebbd
> > >
> > > As noted previously, this only affects "recovery" mode. The commit
> > addresses
> >
> >   And I repeatedly asked people to *not* use recover mode of the XML parser
> > which is not conformant to the XML spec, unless this is upon an explicit
> > recovery operation, not a default process. I *really* hope that chrome or
> > chromium is *not* using the recovery mode by default for XML parsing
> > in the browser. I guarantee nothing about the recovery mode in the long
> > term
> > and I already wrote that I would remove it from the parser if people were
> > abusing this option.
> >
> 
> Chromium was using recover mode when parsing XML for some operations
> (extension related for example), but not when rendering XML.
> It was changed in https://chromium-review.googlesource.com/c/chromium/
> src/+/879106 so the recover mode is not used anywhere in Chromium now.

  Now, that's very good news :-)

thanks for the update !

Daniel

> Jay
> 
>   XML is fairly tidy, we can't let the general usage diverge from the spec.
> >
> > Daniel
> >
> > > the issue 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
> >
> > --
> > Daniel Veillard  | Red Hat Developers Tools
> > http://developer.redhat.com/
> > veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> > http://veillard.com/ | virtualization library  http://libvirt.org/
> > ___
> > xml mailing list, project page  http://xmlsoft.org/
> > xml@gnome.org
> > https://mail.gnome.org/mailman/listinfo/xml
> >

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2018-01-23 Thread Daniel Veillard
On Mon, Jan 22, 2018 at 04:37:17PM +0100, Nick Wellnhofer wrote:
> On 09/01/2018 00:55, Joel Hockey wrote:
> > Updated patch with XML_ERR_INVALID_CHAR.
> 
> Should be fixed with
> 
> 
> https://git.gnome.org/browse/libxml2/commit/?id=60dded12cbf1705927803c5ed615a7a0132aebbd
> 
> As noted previously, this only affects "recovery" mode. The commit addresses

  And I repeatedly asked people to *not* use recover mode of the XML parser
which is not conformant to the XML spec, unless this is upon an explicit
recovery operation, not a default process. I *really* hope that chrome or
chromium is *not* using the recovery mode by default for XML parsing
in the browser. I guarantee nothing about the recovery mode in the long term
and I already wrote that I would remove it from the parser if people were
abusing this option.
  XML is fairly tidy, we can't let the general usage diverge from the spec.
 
Daniel

> the issue 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

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Entering freeze for libxml2-2.9.8

2018-01-23 Thread Daniel Veillard
On Tue, Jan 23, 2018 at 11:07:20PM +0100, Reino Wijnsma wrote:
> On 23-1-2018 7:26, Daniel Veillard <veill...@redhat.com> wrote:
> > it would be good if other interested people could also start testing those, 
> > especially on
> > different operating systems and compilers.
> Windows XP, Cygwin, MingGW-w64, GCC 7.2.0.
> See 'libxml2-2.9.8-rc1_compilation.log' attached.
> Just 1 warning. Very nice.

  Cool, thanks Reino !

Daniel

> -- Reino

> Starting 32-bit builds.
> Configuring libxml2-2.9.8-rc1 as ./configure --host=i686-w64-mingw32 
> --prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32
>  --disable-shared --enable-static --with-ftp=no --with-http=no 
> --with-python=no
> checking whether to enable maintainer-specific portions of Makefiles... yes
> checking build system type... i686-pc-cygwin
> checking host system type... i686-w64-mingw32
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for i686-w64-mingw32-strip... i686-w64-mingw32-strip
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether make supports nested variables... yes
> checking whether make supports nested variables... (cached) yes
> checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.exe
> checking for suffix of executables... .exe
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether i686-w64-mingw32-gcc accepts -g... yes
> checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
> checking whether i686-w64-mingw32-gcc understands -c and -o together... yes
> checking for style of include used by make... GNU
> checking dependency style of i686-w64-mingw32-gcc... gcc3
> checking whether ln -s works... yes
> checking how to run the C preprocessor... i686-w64-mingw32-gcc -E
> checking for mv... /usr/bin/mv
> checking for tar... /usr/bin/tar
> checking for perl... /usr/bin/perl
> checking for wget... /usr/bin/wget
> checking for xmllint... /usr/bin/xmllint
> checking for xsltproc... /usr/bin/xsltproc
> checking for i686-w64-mingw32-pkg-config... no
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking how to print strings... printf
> checking for a sed that does not truncate output... /usr/bin/sed
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for fgrep... /usr/bin/grep -F
> checking for ld used by i686-w64-mingw32-gcc... 
> /cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32/bin/ld.exe
> checking if the linker 
> (/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32/bin/ld.exe)
>  is GNU ld... yes
> checking for BSD- or MS-compatible name lister (nm)... 
> /cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-nm
>  -B
> checking the name lister 
> (/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-nm
>  -B) interface... BSD nm
> checking the maximum length of command line arguments... 8192
> checking how to convert i686-pc-cygwin file names to i686-w64-mingw32 
> format... func_convert_file_cygwin_to_w32
> checking how to convert i686-pc-cygwin file names to toolchain format... 
> func_convert_file_noop
> checking for 
> /cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32/bin/ld.exe
>  option to reload object files... -r
> checking for i686-w64-mingw32-objdump... i686-w64-mingw32-objdump
> checking how to recognize dependent libraries... file_magic ^x86 archive 
> import|^x86 DLL
> checking for i686-w64-mingw32-dlltool... i686-w64-mingw32-dlltool
> checking how to associate runtime and link libraries... 
> func_cygming_dll_for_implib
> checking for i686-w64-mingw32-ar... i686-w64-mingw32-ar
> checking for archiver @FILE support... @
> checking for i686-w64-mingw32-strip... (cached) i686-w64-mingw32-strip
> checking for i686-w64-mingw32-ranlib... i686-w64-mingw32-ranlib
> checking co

[xml] Entering freeze for libxml2-2.9.8

2018-01-22 Thread Daniel Veillard
  Hi all,

 so we are starting the freeze for the next release of libxml2. I have
tagged the release candidate 1 in Git and pushed a signed tarball and
rpms to the usual place:

   ftp://xmlsoft.org/libxml2/

 I updated my machine with the release candidate, it would be good if
other interested people could also start testing those, especially on
different operating systems and compilers.

  I think next step will be to make a second release candidate at the
end of the week, then if everything looks fine we can push the final release
in a week or so,

   please give it a try,

thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [xslt] Time for some releases

2018-01-22 Thread Daniel Veillard
On Mon, Jan 22, 2018 at 04:57:20PM +0100, Nick Wellnhofer wrote:
> On 21/01/2018 07:22, Daniel Veillard wrote:
> >   I think it's time for a new set of releases,
> > I failed to push in the last 2 months and a number of patches
> > have accumulated since november, so I think entering freeze on Mon or
> > Tuesday, then having rc2 around end of week for a release early
> > around 29-30 Jan would make sense,
> > 
> >unless there is something pending,
> 
> There's nothing pending from my side.

  Okay, will start today then,

thanks !

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Time for some releases

2018-01-20 Thread Daniel Veillard
  Hi Nick and all,

 I think it's time for a new set of releases,
I failed to push in the last 2 months and a number of patches
have accumulated since november, so I think entering freeze on Mon or
Tuesday, then having rc2 around end of week for a release early
around 29-30 Jan would make sense,

  unless there is something pending,

thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
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-08 Thread Daniel Veillard
On Tue, Nov 14, 2017 at 04:23:29PM +0100, Nick Wellnhofer wrote:
> Here's are patch that I'd like to discuss before committing.

   Hi Nick,

  what do you really gain by this ?
Things which were known portable cross many platforms now become unclear again.
Trio might be deprecated, I would ask Daniel Stenberg first, so in copy,

  thanks,

Daniel

> 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 available:
> 
> - Assume that (0.0 / 0.0) generates a NaN and !(x == x) tests for NaN.
> - Use C89's HUGE_VAL for INFINITY.
> 
> Remove manual handling of NaN, infinity and negative zero in functions
> xmlXPathValueFlipSign and xmlXPathDivValues.
> 
> Remove xmlXPathGetSign. All the tests for negative zero can be replaced
> with a test for negative or positive zero.
> 
> Simplify xmlXPathRoundFunction.
> 
> Remove Trio dependency.
> 
> This should work on IEEE 754 compliant implementations even if the C99
> macros aren't available, but will likely break some ancient platforms.
> If problems arise, my plan is to port the relevant trionan.c solution
> to xpath.c. Note that non-compliant implementations are impossible
> to fully support, anyway, since XPath requires IEEE 754.
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libxml2 2.9.7

2017-11-02 Thread Daniel Veillard
  It's out ! I tagged it in git and pushed signed tarball and rpms to the
usual place:

   ftp://xmlsoft.org/libxml2

  This is in a large majority a set of portability patches, mostly around
Windows platforms, compiler cleanups, with on XPath bug fix:


Documentation:
- xmlcatalog: refresh man page wrt. quering system catalog easily (Jan Pokorný)

Portability:
- Fix deprecated Travis compiler flag (Nick Wellnhofer)
- Add declaration for DllMain (J. Peter Mugaas)
- Fix preprocessor conditional in threads.h (J. Peter Mugaas)
- Fix pointer comparison warnings on 64-bit Windows (J. Peter Mugaas)
- Fix macro redefinition warning (J. Peter Mugaas)
- Default to native threads on MinGW-w64 (Nick Wellnhofer)
- Simplify Windows IO functions (Nick Wellnhofer)
- Fix runtest on Windows (Nick Wellnhofer)
- socklen_t is always int on Windows (Nick Wellnhofer)
- Don't redefine socket error codes on Windows (Nick Wellnhofer)
- Fix pointer/int cast warnings on 64-bit Windows (Nick Wellnhofer)
- Fix Windows compiler warnings in xmlCanonicPath (Nick Wellnhofer)

Bug Fixes:
- xmlcatalog: restore ability to query system catalog easily (Jan Pokorný)
- Fix comparison of nodesets to strings (Nick Wellnhofer)

Improvements:
- Add Makefile rules to rebuild HTML man pages (Nick Wellnhofer)
- Fix mixed decls and code in timsort.h (Nick Wellnhofer)
- Rework handling of return values in thread tests (Nick Wellnhofer)
- Fix unused variable warnings in testrecurse (Nick Wellnhofer)
- Fix -Wimplicit-fallthrough warnings (J. Peter Mugaas)
- Upgrade timsort.h to latest revision (Nick Wellnhofer)
- Increase warning level to /W3 under MSVC (Nick Wellnhofer)
- Fix a couple of warnings in dict.c and threads.c (Nick Wellnhofer)
- Update .gitignore for Windows (Nick Wellnhofer)
- Fix unused variable warnings in nanohttp.c (Nick Wellnhofer)
- Fix the Windows header mess (Nick Wellnhofer)
- Don't include winsock2.h in xmllint.c (Nick Wellnhofer)
- Remove generated file python/setup.py from version control (Nick Wellnhofer)
- Use __linux__ macro in generated code (Nick Wellnhofer)

   Thanks Nick, Jan and Peter for most of the meat of this release :-) !

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Candidate release 2 for libxslt 1.1.32

2017-11-01 Thread Daniel Veillard
  I have pushed a Candidate Release 2 for libxslt, there is just a couple
of patches for windows, it's tagged in git and the signed tarball and
rpms are at the usual place:

ftp://xmlsoft.org/libxslt

for libxml2 there is no change in git since RC1, so no need for an RC2

  please give them some testing, I think I will push the releases tomorrow
or Friday,

  thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] entering freeze for releases

2017-10-30 Thread Daniel Veillard
  As planned I have just tagged in git and pushed candidate one releases
tarballs and rpms to the usual place:

   ftp://xmlsoft.org/libxml2
   ftp://xmlsoft.org/libxslt 

 they share the same directory in practice.
Everything looks fine to me, I will update my machine with them to try to
spot issues, but the most useful is testing on various scenarios, OSes and
architectures.

  I will likely push rc2 if there is a change in git on Tuesday evening
or Wed morning, and targetting the releases for Thursday, in the meantime
please give them some testing,

  thanks in advance,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libxml2 2.9.6

2017-10-06 Thread Daniel Veillard
  It's out, 2 days late, sorry, but it's now tagged in git and signed tarball
and rpms are now available at the usual place:

  ftp://xmlsoft.org/libxml2/

This is a bugfix only release from Nick with just one portability commit:


Portability:
- Change preprocessor OS tests to __linux__ (Nick Wellnhofer)

Bug Fixes:
- Fix XPath stack frame logic (Nick Wellnhofer)
- Report undefined XPath variable error message (Nick Wellnhofer)
- Fix regression with librsvg (Nick Wellnhofer)
- Handle more invalid entity values in recovery mode (Nick Wellnhofer)
- Fix structured validation errors (Nick Wellnhofer)
- Fix memory leak in LZMA decompressor (Nick Wellnhofer)
- Set memory limit for LZMA decompression (Nick Wellnhofer)
- Handle illegal entity values in recovery mode (Nick Wellnhofer)
- Fix debug dump of streaming XPath expressions (Nick Wellnhofer)
- Fix memory leak in nanoftp (Nick Wellnhofer)
- Fix memory leaks in SAX1 parser (Nick Wellnhofer)

  thanks Nick for your work :-), sorry again for the delay, next push in a
month :-) , in the meantime enjoy the release !

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2017-10-02 Thread Daniel Veillard
On Sat, Sep 30, 2017 at 08:37:35PM +0300, Алексей Алексей wrote:
>Hi,
> 
>Can't understand the results of the following xpath queries:
> 
>from lxml import etree
>from io import StringIO
>s = 'fed'
>tree = etree.parse(StringIO(s))
>print(tree.xpath('//bbb[.="fed"]')) #Returns nothing
>print(tree.xpath('//bbb[contains(.,"fed")]')) #Returns bar
>print(tree.xpath('//bbb[normalize-space(.)="fed"]')) #Returns bar
>print(tree.xpath('//bbb[string-length(.)=3]')) #Returns bar
> 
>The first query doesn't find bar element by its string-value while the
>other three surprisingly do. Suppose that it is a bug.

  One thing to note: the first one compares a *nodeset* using equality
against a string. The other 3 compare strings with strings for equality.
The definitions are there:

  https://www.w3.org/TR/xpath/#booleans

 "If one object to be compared is a node-set and the other is a string,
  then the comparison will be true if and only if there is a node in
  the node-set such that the result of performing the comparison on the
  string-value of the node and the other string is true."


I also assume when you say "Returns bar" you really mean "Returns bbb"

thinkpad2:~/XML -> cat tst.xml
fed
thinkpad2:~/XML -> xmllint --shell tst.xml
/ > xpath //bbb[.="fed"]
Object is a Node Set :
Set contains 0 nodes:
/ > xpath //bbb[contains(.,"fed")]
Object is a Node Set :
Set contains 1 nodes:
1  ELEMENT bbb
/ > xpath //bbb="fed"
Object is a Boolean : false
/ > xpath string(//bbb)
Object is a string : fed
/ > xpath //bbb
Object is a Node Set :
Set contains 1 nodes:
1  ELEMENT bbb
/ >

   hum ... XPath computes the string value correctly. there is something
going on there.

Daniel

>I have already asked about the issue in the lxml mailing list and they
>suggested to ask here because the XPath implementation is in libxml2,
>not in lxml.
> 
>The versions used:
>lxml.etree:(4, 0, 0, 0)
>libxml used:   (2, 9, 5)
>libxml compiled:   (2, 9, 5)
>libxslt used:  (1, 1, 30)
>libxslt compiled:  (1, 1, 30)
> 
>Reproduction of the bug using xmllint instead of lxml:
>$ echo 'fed' | \
>xmllint --xpath '//bbb[. = "fed"]' -
>XPath set is empty
> 
>Thanks in advance for any help!
> 
>Aleksei

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Candidate release 1 of libxml2-2.9.6

2017-10-02 Thread Daniel Veillard
On Thu, Sep 28, 2017 at 09:25:07PM +0200, Daniel Veillard wrote:
>   It's available, I tagged it in git and pushed signed tarball and rpms
> to the usual place:
> 
>ftp://xmlsoft.org/libxml2/
> 
>  I updated my system with it to give it a bit more testing, but I encourage
> others to try it out, especially on different platforms.
> 
>  I think I will push rc2 over the week-end and unless there is a serious
> issue 2.9.6 should go out next Tuesday.
> 
>   Please give it a try,
> 
> thanks,

  Since there had been no update on the git tree since RC1, I'm skipping doing
and RC2 for libxml2-2.9.6, and may just push the release tomorrow unless
I hear of something bad in the meantime,

  thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Candidate release 1 of libxml2-2.9.6

2017-09-28 Thread Daniel Veillard
  It's available, I tagged it in git and pushed signed tarball and rpms
to the usual place:

   ftp://xmlsoft.org/libxml2/

 I updated my system with it to give it a bit more testing, but I encourage
others to try it out, especially on different platforms.

 I think I will push rc2 over the week-end and unless there is a serious
issue 2.9.6 should go out next Tuesday.

  Please give it a try,

thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Releases

2017-09-28 Thread Daniel Veillard
  I am tempted to start the freeze for the monthly release later today
with a release candidate 2 this week-end and we can have the releases
around Oct 3rd.

  Nick I hope that's okay for you,

   thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Are CVE git tags still used?

2017-09-05 Thread Daniel Veillard
On Tue, Sep 05, 2017 at 08:25:16AM +, 林自均 wrote:
> Hi Daniel,
> 
> I saw 2.9.5 was released. Can you kindly tag those CVE in git? Thanks!
> 
> Best,
> John Lin

  The problem is that I don't have a list doing the mapping,
only few informations in commit logs,

Daniel

> 林自均 <johnl...@gmail.com> 於 2017年7月28日 週五 下午9:54寫道:
> 
> > Hi Daniel,
> >
> > Thanks for the reply! Looking forward to your tags.
> >
> > Best,
> > John Lin
> >
> > Daniel Veillard <veill...@redhat.com> 於 2017年7月27日 週四 下午2:11寫道:
> >
> >> On Mon, Jul 10, 2017 at 02:08:15AM +, 林自均 wrote:
> >> > Hi folks,
> >> >
> >> > I am considering to apply some CVE patches from the upstream. For
> >> example,
> >> > there is a patch "c1d1f712" for CVE-2016-4658 described on the Red Hat
> >> > bugzilla page:
> >> https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-4658
> >> >
> >> > However, I don't see the CVE git tag for the commit ("c1d1f712") in the
> >> > upstream git tree. I used to see those tags before the release 2.9.4 and
> >> > they are really helpful.
> >> >
> >> > Should I expect to see those tags again in the future? Thanks!
> >> >
> >> > Best,
> >> > John Lin
> >>
> >>   yes I need to walk though the list and retag them in git,
> >>
> >> Daniel
> >>
> >> --
> >> Daniel Veillard  | Red Hat Developers Tools
> >> http://developer.redhat.com/
> >> veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> >> http://veillard.com/ | virtualization library  http://libvirt.org/
> >>
> >

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Release of libxml2-2.9.5

2017-09-04 Thread Daniel Veillard
On Mon, Sep 04, 2017 at 04:07:42PM +0200, Stefan Behnel wrote:
> Daniel Veillard schrieb am 04.09.2017 um 15:56:
> >   It's out ! I tagged the release in git and pushed the signed tarball
> > and rpms to the usual place:
> > 
> > ftp://xmlsoft.org/libxml2/
> > 
> > This is mostly a a security and bug fixes, most of the credit goes to Nick
> > who wrote or reviewed most of the patches. There is a significant set of
> > changes, but users are invited to upgrade if only to get the security fixes 
> > !
> > There is also portability fixes for those ever special OSes :-)
> > [...]
> >  Thanks everybody and especially Nick who contributed to this release
> > with bug reports, patches, docs, etc ...
> > 
> >Enjoy the release!
> 
> Thank you Daniel and Nick, and congrats to this release!
> 
> I hope that the new release process will make it easier for you to get
> things out. If there's always a next release, then it's never too late to
> get bugs fixed.

  That's the point really, the crazy thing is that I have done that for
libvirt for years, so I know it's better, the problem of feeling "there is
too much to be pushed before I can make a release" goes away.
  If 6 month from now we realize that the cycle is too fast - that can be
a problem too - then we can slow down, but let's do monthly for now,

  thanks for the encouragements,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libxml2-2.9.5

2017-09-04 Thread Daniel Veillard
  It's out ! I tagged the release in git and pushed the signed tarball
and rpms to the usual place:

ftp://xmlsoft.org/libxml2/

This is mostly a a security and bug fixes, most of the credit goes to Nick
who wrote or reviewed most of the patches. There is a significant set of
changes, but users are invited to upgrade if only to get the security fixes !
There is also portability fixes for those ever special OSes :-)


Security:
- Detect infinite recursion in parameter entities (Nick Wellnhofer)
- Fix handling of parameter-entity references (Nick Wellnhofer)
- Disallow namespace nodes in XPointer ranges (Nick Wellnhofer)
- Fix XPointer paths beginning with range-to (Nick Wellnhofer)
Documentation:
- Documentation fixes (Nick Wellnhofer)
- Spelling and grammar fixes (Nick Wellnhofer)
Portability:
- Adding README.zOS to list of extra files for the release (Daniel Veillard)
- Description of work needed to compile on zOS (Stéphane Michaut)
- Porting libxml2 on zOS encoding of code (Stéphane Michaut)
- small changes for OS/400 (Patrick Monnerat)
- relaxng.c, xmlschemas.c: Fix build on pre-C99 compilers (Chun-wei Fan)
Bug Fixes:
- Problem resolving relative URIs (Daniel Veillard)
- Fix unwanted warnings when switching encodings (Nick Wellnhofer)
- Fix signature of xmlSchemaAugmentImportedIDC (Daniel Veillard)
- Heap-buffer-overflow read of size 1 in xmlFAParsePosCharGroup (David Kilzer)
- Fix NULL pointer deref in xmlFAParseCharClassEsc (Nick Wellnhofer)
- Fix infinite loops with push parser in recovery mode (Nick Wellnhofer)
- Send xmllint usage error to stderr (Nick Wellnhofer)
- Fix NULL deref in xmlParseExternalEntityPrivate (Nick Wellnhofer)
- Make sure not to call IS_BLANK_CH when parsing the DTD (Nick Wellnhofer)
- Fix xmlHaltParser (Nick Wellnhofer)
- Fix pathological performance when outputting charrefs (Nick Wellnhofer)
- Fix invalid-source-encoding warnings in testWriter.c (Nick Wellnhofer)
- Fix duplicate SAX callbacks for entity content (David Kilzer)
- Treat URIs with scheme as absolute in C14N (Nick Wellnhofer)
- Fix copy-paste errors in error messages (Nick Wellnhofer)
- Fix sanity check in htmlParseNameComplex (Nick Wellnhofer)
- Fix potential infinite loop in xmlStringLenDecodeEntities (Nick Wellnhofer)
- Reset parser input pointers on encoding failure (Nick Wellnhofer)
- Fix memory leak in xmlParseEntityDecl error path (Nick Wellnhofer)
- Fix xmlBuildRelativeURI for URIs starting with './' (Nick Wellnhofer)
- Fix type confusion in xmlValidateOneNamespace (Nick Wellnhofer)
- Fix memory leak in xmlStringLenGetNodeList (Nick Wellnhofer)
- Fix NULL pointer deref in xmlDumpElementContent (Daniel Veillard)
- Fix memory leak in xmlBufAttrSerializeTxtContent (Nick Wellnhofer)
- Stop parser on unsupported encodings (Nick Wellnhofer)
- Check for integer overflow in memory debug code (Nick Wellnhofer)
- Fix buffer size checks in xmlSnprintfElementContent (Nick Wellnhofer)
- Avoid reparsing in xmlParseStartTag2 (Nick Wellnhofer)
- Fix undefined behavior in xmlRegExecPushStringInternal (Nick Wellnhofer)
- Check XPath exponents for overflow (Nick Wellnhofer)
- Check for overflow in xmlXPathIsPositionalPredicate (Nick Wellnhofer)
- Fix spurious error message (Nick Wellnhofer)
- Fix memory leak in xmlCanonicPath (Nick Wellnhofer)
- Fix memory leak in xmlXPathCompareNodeSetValue (Nick Wellnhofer)
- Fix memory leak in pattern error path (Nick Wellnhofer)
- Fix memory leak in parser error path (Nick Wellnhofer)
- Fix memory leaks in XPointer error paths (Nick Wellnhofer)
- Fix memory leak in xmlXPathNodeSetMergeAndClear (Nick Wellnhofer)
- Fix memory leak in XPath filter optimizations (Nick Wellnhofer)
- Fix memory leaks in XPath error paths (Nick Wellnhofer)
- Do not leak the new CData node if adding fails (David Tardon)
- Prevent unwanted external entity reference (Neel Mehta)
- Increase buffer space for port in HTTP redirect support (Daniel Veillard)
- Fix more NULL pointer derefs in xpointer.c (Nick Wellnhofer)
- Avoid function/data pointer conversion in xpath.c (Nick Wellnhofer)
- Fix format string warnings (Nick Wellnhofer)
- Disallow namespace nodes in XPointer points (Nick Wellnhofer)
- Fix comparison with root node in xmlXPathCmpNodes (Nick Wellnhofer)
- Fix attribute decoding during XML schema validation (Alex Henrie)
- Fix NULL pointer deref in XPointer range-to (Nick Wellnhofer)

Improvements:
- Updating the spec file to reflect Fedora 24 (Daniel Veillard)
- Add const in five places to move 1 KiB to .rdata (Bruce Dawson)
- Fix missing part of comment for function xmlXPathEvalExpression() (Daniel 
Veillard)
- Get rid of "blanks wrapper" for parameter entities (Nick Wellnhofer)
- Simplify handling of parameter entity references (Nick Wellnhofer)
- Deduplicate code in encoding.c (Nick Wellnhofer)
- Make HTML parser functions take const pointers (Nick Wellnhofer)
- Build test programs only when needed (Nick Wellnhofer)
- Fix doc/examples/index.py (Nick Wellnhofer)
- Fix compiler warnings in

[xml] Availability of release candidate 2 of libxml2 2.9.5

2017-08-31 Thread Daniel Veillard
  The only changes compared to rc1 are a couple of reverts from Nick
about patches introducing breakages. I'm not sure the python 3.5 is really
a blocker, TBH I'm not even sure this is tied to a given libxml2 release
this looks more like a change in python3 checks around native code calls.

  The rc2 is tagged in git, I pushed signed tarball and rpms to the usual place

  ftp://xmlsoft.org/libxml2/

Again I encourage people to look for issues or regressions, I may push
final version this w.e. though considering the amount of changes it's fine
to delay in case of issues. And ongoing I really plan to stick to monthly
release with around 5 days of freeze and test.

  Thanks for checking, 

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Availability of release candidate 1 of libxml2 2.9.5

2017-08-29 Thread Daniel Veillard
  I have just tagged the release in git and pushed signed tarball and
rpms to the usual place:

  ftp://xmlsoft.org/libxml2/

 So the plan is to have a release candidate 2 on Thursday and if things
look good push 2.9.5 out during the week end. Then have 2.9.6 with current
git head around Oct 1st.

  Please give it a try, it's unlikely that 1.5 years of patches won't raise
any issue, I'm running it on my own machine but I can't do very specific
platform testing for example.

   Thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Minor improvement possible

2017-08-28 Thread Daniel Veillard
  Hi Bruce,

 indeed a minor improvement, but that sounds absolutely right, those
data tables are never updated,

  Applied and pushed:

https://git.gnome.org/browse/libxml2/commit/?id=8f57103793e1e1b1be478f1feb607d19d725d048

  thanks a lot,

Daniel


On Thu, Jan 05, 2017 at 03:00:20PM -0800, Bruce Dawson via xml wrote:
> The constant array xmlUnicodeBlocks is not marked as 'const' so it ends up
> in the read/write data segment instead of the read-only data segment, which
> can lead to it becoming per-process private data instead of image-backed
> shared data.
> 
> A patch file (made in the context of Chrome, but it should be applicable to
> libxml2) is attached.
> 
> -- 
> Bruce Dawson

> commit eafa8bbee03e8ebba366be1fb8d5b1596a989a0a
> Author: Bruce Dawson <brucedaw...@chromium.org>
> Date:   Thu Jan 5 11:25:58 2017 -0800
> 
> Add const in five places to move 1 KiB to .rdata
> 
> xmlUnicodeBlocks is logically const but was not marked as such. This
> fixes that, thus moving it to the read-only data segment.
> 
> BUG=677351
> 
> diff --git a/third_party/libxml/src/genUnicode.py 
> b/third_party/libxml/src/genUnicode.py
> index 56e4e9b..4487eeb 100755
> --- a/third_party/libxml/src/genUnicode.py
> +++ b/third_party/libxml/src/genUnicode.py
> @@ -267,14 +267,14 @@ typedef struct {
>  } xmlUnicodeRange;
>  
>  typedef struct {
> -xmlUnicodeRange *table;
> +const xmlUnicodeRange *table;
>  int  numentries;
>  } xmlUnicodeNameTable;
>  
>  
>  static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char 
> *tname);
>  
> -static xmlUnicodeRange xmlUnicodeBlocks[] = {
> +static const xmlUnicodeRange xmlUnicodeBlocks[] = {
>  """ % (webpage, date, sources));
>  
>  flag = 0
> diff --git a/third_party/libxml/src/xmlunicode.c 
> b/third_party/libxml/src/xmlunicode.c
> index ce6e9a4..6d0a96a 100644
> --- a/third_party/libxml/src/xmlunicode.c
> +++ b/third_party/libxml/src/xmlunicode.c
> @@ -29,14 +29,14 @@ typedef struct {
>  } xmlUnicodeRange;
>  
>  typedef struct {
> -xmlUnicodeRange *table;
> +const xmlUnicodeRange *table;
>  int  numentries;
>  } xmlUnicodeNameTable;
>  
>  
>  static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char 
> *tname);
>  
> -static xmlUnicodeRange xmlUnicodeBlocks[] = {
> +static const xmlUnicodeRange xmlUnicodeBlocks[] = {
>{"AegeanNumbers", xmlUCSIsAegeanNumbers},
>{"AlphabeticPresentationForms", xmlUCSIsAlphabeticPresentationForms},
>{"Arabic", xmlUCSIsArabic},
> @@ -945,7 +945,7 @@ static xmlUnicodeNameTable xmlUnicodeCatTbl = 
> {xmlUnicodeCats, 36};
>  static xmlIntFunc
>  *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname) {
>  int low, high, mid, cmp;
> -xmlUnicodeRange *sptr;
> +    const xmlUnicodeRange *sptr;
>  
>  if ((tptr == NULL) || (tname == NULL)) return(NULL);
>  

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Problem resolving relative URIs during catalog resolution, potential regression as of libxml2 2.9.2 (patch included)

2017-08-28 Thread Daniel Veillard
  Hi Matthias,

 it took a while but I looked at this today, indeed that's a serious regression
however your patch needed a bit of work to avoid potential segfaults. Also
I found that condition in a couple of place in the code. Resulting fix is
commited to git head:

https://git.gnome.org/browse/libxml2/commit/?id=3daee3f159a1f962278e6f92572b7749b2b2babb

  thanks for the report !

Daniel

On Thu, Nov 24, 2016 at 02:20:36PM +, Matthias Pigulla wrote:
> Hello libxml2 developers,
> 
> TL/DR:
> 
> ./testURI --base file:///some/where file
> 
> Without patch: file:/some/file
> With patch: file:///some/file
> 
> Full report:
> 
> I am using PHP to read a simple XML file and see a regression between
> libxml 2.9.1 and 2.9.2, with the problem still present in 2.9.4.
> 
> File:
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
> http://www.w3.org/1999/xhtml;>
> 
> test  
> 
> 
> 
> 
> I am running this on Debian and have installed the w3c-dtd-xhtml pacakge,
> relying on system tooling to generate the catalog definitions in /etc/xml.
> If it helps, I can post a tarball with all relevant files from /etc/xml
> and /usr/share/xml/xhtml somewhere.
> 
> The resulting catalog will contain file:///etc/... references to other
> files, eventually pointing to file:///usr/share/xml/somewhere... and
> finally contain relative references like 'uri="xhtml1-strict.dtd"'.
> 
> 
> Due to a glitch in xmlBuildURI, interpreting this relative URI with a base
> of "file:///usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml" ends up as
> "file:/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd" with only a
> single slash following the "file:".
> 
> Further down the road, this is interpreted as a file path and passed to
> system calls, as can be seen in this strace output:
> 
> stat("file:/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd³,
> 0x7fff7f56fda0) = -1 ENOENT (No such file or directory)
> stat("file:/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd³,
> 0x7fff7f56fd50) = -1 ENOENT (No such file or directory)
> 
> Immediately after, PHP fails with a PHP Notice: DOMDocument::loadXML():
> failed to load external entity
> "file:/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd" in Entity,
> line ...
> 
> The patch solves the problem for me.
> 
> 
> Relevant changes:
> https://git.gnome.org/browse/libxml2/commit/?id=8eb55d782a2b9afacc793869489
> 1cc6fad7b42a5
> https://git.gnome.org/browse/libxml2/commit/?id=beb7281055dbf0ed4d041022a67
> c6c5cfd126f25
> Also see https://mail.gnome.org/archives/xml/2014-December/msg0.html.
> 
> 
> Please let me know if a test case for this is needed (would need
> instructions how/where to write this).
> 
> Best regards
> Matthias
> 

> diff --git a/uri.c b/uri.c
> index 2bd5720..6e09018 100644
> --- a/uri.c
> +++ b/uri.c
> @@ -2024,7 +2024,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
>  }
>  if (bas->authority != NULL)
> res->authority = xmlMemStrdup(bas->authority);
> -else if (bas->server != NULL) {
> +else if ((bas->server != NULL) || (bas->port == -1)) {
> res->server = xmlMemStrdup(bas->server);
> if (bas->user != NULL)
> res->user = xmlMemStrdup(bas->user);

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2017-08-28 Thread Daniel Veillard
 Argh, ok,

Daniel

On Mon, Aug 28, 2017 at 03:19:10PM +0200, Nick Wellnhofer wrote:
> 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,
> > 
> >Okay, that looks reasonable, though I definitely never used Visual Studio
> > someone who does should proably double check, but I pushed it assuming it
> > was good
> > 
> > https://git.gnome.org/browse/libxml2/commit/?id=605899cf22d185f537eb5efb97a55be30467eb17
> > 
> >thanks,
> > 
> > Daniel
> > 
> > On Tue, Aug 22, 2017 at 02:39:21PM +0300, Boris shtrasman wrote:
> > > Hi,
> > > 
> > > Here are patches for Makefile.msvc to allow build with Visual Studio 2017
> > > (community ) in 32 bit mode (win32).
> > > 
> > > I have choose to target 32 bit to be as close as possible to Igor 
> > > Zlatkovic
> > > work (he also provides 32 bit versions.
> > > 
> > > I choose sdk 8.1 because it's the same sdk Igor targeted.
> > 
> > >  From 90fac6a5302fbc19da7f39f4a5bc3390203956f0 Mon Sep 17 00:00:00 2001
> > > From: Boris Shtrasman <borissh1...@gmail.com>
> > > Date: Wed, 16 Aug 2017 12:22:44 +0300
> > > Subject: [PATCH] Allow build on Visual Studio 2017 community edition for 
> > > WIN32
> > >   on a 64 bit machine.
> > > 
> > > This patch hold the necessary changes to build libxml2 with Visual
> > > Studio 2017 for WIN32 on a 64 bit machine.
> > > 
> > > Today 64 bit windows installation are very common, and Visual Studio
> > > 2017 community is the most recent version i have access to.
> > > 
> > > I have chosen 32 bit and SDK 8.1 to be as close as possible to Igor 
> > > Zlatkovic work.
> > > ---
> > >   win32/Makefile.msvc | 20 
> > >   win32/Readme.txt| 14 ++
> > >   2 files changed, 30 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
> > > index d16c1a2d..2e4d6f83 100644
> > > --- a/win32/Makefile.msvc
> > > +++ b/win32/Makefile.msvc
> > > @@ -26,6 +26,18 @@ XML_IMP = $(XML_BASENAME).lib
> > >   XML_DEF = $(XML_BASENAME).def
> > >   XML_A = $(XML_BASENAME)_a.lib
> > >   XML_A_DLL = $(XML_BASENAME)_a_dll.lib
> > > +VS14_INCLUDE = "C:\Program Files (x86)\Microsoft Visual 
> > > Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include"
> > > +VS14_INCLUDE_AUX = "C:\Program Files (x86)\Microsoft Visual 
> > > Studio\2017\Community\VC\Auxiliary\VS\include"
> > > +VS14_INCLUDE_UCRT = "C:\Program Files (x86)\Windows 
> > > Kits\10\Include\10.0.15063.0\ucrt"
> > > +VS14_INCLUDE_UM = "C:\Program Files (x86)\Windows 
> > > Kits\10\Include\10.0.15063.0\um"
> > > +VS14_INCLUDE_SHARED = "C:\Program Files (x86)\Windows 
> > > Kits\10\Include\10.0.15063.0\shared"
> > > +VS14_INCLUDE_WINRT = "C:\Program Files (x86)\Windows 
> > > Kits\10\Include\10.0.15063.0\winrt\Include\um"
> > > +WindowsSDK_IncludePath = "C:\Program Files (x86)\Windows 
> > > Kits\10\Include\10.0.15063.0\um"
> > > +
> > > +VC14_LINK_LIBRARY_PATH_X86 = "C:\Program Files (x86)\Microsoft Visual 
> > > Studio\2017\Community\VC\Tools\MSVC\14.10.25017\lib\x86"
> > > +VC14_LINK_LIBRARY_PATH_X86_AUX = "C:\Program Files (x86)\Microsoft 
> > > Visual Studio\2017\Community\VC\Auxiliary\VS\lib\x86"
> > > +VC14_LINK_LIBRARY_PATH_X86_UCRT = "C:\Program Files (x86)\Windows 
> > > Kits\10\lib\10.0.10240.0\ucrt\x86"
> > > +VC14_LINK_LIBRARY_PATH_X86_WINSDK = "C:\Program Files (x86)\Windows 
> > > Kits\8.1\lib\winv6.3\um\x86"
> > >   # Place where we let the compiler put its output.
> > >   BINDIR = bin.msvc
> > > @@ -36,14 +48,14 @@ UTILS_INTDIR = int.utils.msvc
> > >   # The preprocessor and its options.
> > >   CPP = cl.exe /EP
> > > -CPPFLAGS = /nologo /I$(XML_SRCDIR)\include /D "NOLIBTOOL"
> > > +CPPFLAGS = /nologo /I$(XML_SRCDIR)\include /D "NOLIBTOOL"
> > >   !if "$(WITH_THREADS)" != "no"
> > >   CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
> > >   !endif
> > >   # The c

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

2017-08-28 Thread Daniel Veillard
6_AUX) 
> /LIBPATH:$(VC14_LINK_LIBRARY_PATH_X86_UCRT) 
> /LIBPATH:$(VC14_LINK_LIBRARY_PATH_X86_WINSDK)
>  LIBS =
>  !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
>  LIBS = $(LIBS) wsock32.lib ws2_32.lib
> diff --git a/win32/Readme.txt b/win32/Readme.txt
> index 6b3edddb..8f45238b 100644
> --- a/win32/Readme.txt
> +++ b/win32/Readme.txt
> @@ -148,6 +148,20 @@ it will link to its own C-runtime named msvcr70.dll or 
> msvcr71.dll. This
>  file is not available on any machine which doesn't have Visual Studio 
>  .NET installed.
>  
> +2.1.1 UCRT and 32bit
> +
> +
> +If you use the compiler which comes with Visual Studio 2015 and above, note 
> that
> +it will link to its own C-runtime named msvcr140.dll or msvcr140.dll. That 
> +files are redistributed via the ucrt packages (windows XP need the ucrt 
> files manually copied).
> +
> +In order to build 32 bit on Visual Studio 2017 on a 64 bit machine,
> + you would need to call the 32 bit compiler:
> +
> +step1 update your path to call the 32bit versions (assuming Visual studio 
> installed to C:\Program Files (x86)\Microsoft Visual 
> Studio\2017\Community\VC\Tools\MSVC\14.10.25017):
> +set PATH="C:\Program Files (x86)\Microsoft Visual 
> Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86";%PATH%
> +step 2 call name
> +nmake /f Makefile.msvc
>  
>  2.2 GNU C/C++, Mingw edition
>  
> -- 
> 2.13.3
> 

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] MIT License question

2017-08-28 Thread Daniel Veillard
   Hi,

  It seems to me most companies (smartphones, car entertainment systems,...)
just pick the libxml2 and libxslt licances for display as coming from the
distributions. But I am not a lawyer, and this is not a legal advice, check
your lawyers for a real answer, and considering your business I'm sure
you have tons of those :-(

Daniel

On Mon, Aug 07, 2017 at 01:02:19PM -0700, Brad Wait wrote:
> Hi,
> 
> Our product uses libxml2 and these components:
> 
>- sort
>- trio
>- xslt
> 
> 
> Is it sufficient to include the main libxml2 MIT License (with its various
> copyright owners etc).to cover each of these components?  Or, are there
> separate licenses for each? If the latter, where can I find these?
> 
> Thanks
> Brad

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [Patch] - Makefile modification for zOS porting

2017-08-28 Thread Daniel Veillard
  Okay,

the simplest was to add a README specific to the platform

https://git.gnome.org/browse/libxml2/commit/?id=1056e82e649d99cbe46648d99ddc00e6154de826

with your description and the patch,

  thanks,

Daniel

On Tue, Aug 01, 2017 at 06:48:53AM +, Stéphane Michaut wrote:
> Here is the diff -u of Makefile.in with the changes I had to make in order to 
> make it works on zOs. See Makefile-modif.txt for explanation.
> 
> I also need an extra option in configure for C compile, but I don't know how 
> to modify Makefile.in or configure files to take it into account, so I change 
> Makefile directly!
> 
> The original generated Makefile had
> 
> CFLAGS = -g
> 
> I need a 'compile-dll' option that generate this line
> 
> CFLAGS = -g -W c,exportall -W c,dll
> 
> Regards,
> 
> Stéphane


> - since testapi.c file is huge (over 52000 lines), it's compilation fails: I 
> skipped the problem by removing all references to testapi in the Makefile.in, 
>   but it would be neater if one can build without test files (I didn't find 
> an option in configure...)
> 
> - since the name of files (or qualifier) in PDS are limited to 8 I had to 
> rename xmlschemas.c and xmlschemastypes.c in (resp.) xmlsche.c xmlschet.c 
>   (and I had to modify all occurences of these files accordingly in the rest 
> of the Makefile !!!). 
> 
> - in order to copy objects to PDS, I had the cp command at line 860 of 
> Makefile.in
> 
> libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES)
> $(AM_V_CCLD)$(libxml2_la_LINK) -rpath $(libdir) $(libxml2_la_OBJECTS) 
> $(libxml2_la_LIBADD) $(LIBS)
> # Copy objects to PDS
> @list='$(libxml2_OBJECTS)' ; for p in $$list; do \
>   cp -ACMv $$p "//''"; \
> done
> 
>   with  stands for the name of my PDS and
>   
> libxml2_OBJECTS = SAX.o entities.o encoding.o error.o \
>   parserInternals.o parser.o tree.o hash.o list.o xmlIO.o \
>   xmlmemory.o uri.o valid.o xlink.o HTMLparser.o \
>   HTMLtree.o debugXML.o xpath.o xpointer.o xinclude.o \
>   nanohttp.o nanoftp.o triostr.o trio.o catalog.o globals.o \
>   threads.o c14n.o xmlstring.o buf.o xmlregexp.o \
>   xmlsche.o xmlschet.o xmlunicode.o \
>   xmlreader.o relaxng.o dict.o SAX2.o \
>   xmlwriter.o legacy.o chvalid.o pattern.o xmlsave.o \
>   xmlmodule.o schematron.o xzlib.o 
> 
> In order to handle the support of zOS without breaking the existing Makefile 
> maybe a new option/flag zOs would copy xmlschemas.c and xmlschemastypes.c 
> files and use specifics 
> targets rather than existing ones with the longer names... A variable to 
> handle the PDS name has to be provided also...

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [Patch] - Porting Libxml2-2.9.4 on zOS

2017-08-28 Thread Daniel Veillard
  Hi Stéphane,

 I had to work around issues in the patch, but I think I pushed all the
modifications still needed (some of the non ANSI changes were already
corrected in git head)

https://git.gnome.org/browse/libxml2/commit/?id=454e397eb7dd0fe219fa681eeadfaf2a64a3aeec

 for the description of changes made to Makefiles, I'm saving that as a
separated patch

  thanks !

Daniel

On Thu, Jul 27, 2017 at 12:31:00PM +, Stéphane Michaut wrote:
> After discussions with Daniel I (re)post my patch for zOs porting with some 
> updates...
> (see first post on that topic 
> https://mail.gnome.org/archives/xml/2016-July/msg5.html)
> 
> Thanks,
> 
> Stephane
> 

> --- entities.c2016-05-23 12:01:08.0 +0200
> +++ entities-fix.c2016-07-21 11:05:12.00000 +0200
> @@ -6,6 +6,8 @@
>   * daniel veillard com
>   */
>  
> +/* To avoid EBCDIC trouble when parsing on zOS */
> +#if defined(__MVS__)
> +#pragma convert("ISO8859-1")
> +#endif
>  #define IN_LIBXML
>  #include "libxml.h"
>  
> --- parser.c  2016-07-18 16:13:29.0 +0200
> +++ parser-fix.c  2016-07-21 11:04:33.0 +0200
> @@ -30,6 +30,8 @@
>   * daniel veillard com
>   */
>  
> +/* To avoid EBCDIC trouble when parsing on zOS */
> +#if defined(__MVS__)
> +#pragma convert("ISO8859-1")
> +#endif
>  #define IN_LIBXML
>  #include "libxml.h"
>  
> --- relaxng.c 2016-05-23 12:01:08.0 +0200
> +++ relaxng-fix.c 2016-07-21 11:06:28.0 +0200
> @@ -2088,6 +2088,7 @@
>   const xmlChar * arg2)
>  {
>  char msg[1000];
> +xmlChar *result;
>  
>  if (arg1 == NULL)
>  arg1 = BAD_CAST "";
> @@ -2215,7 +2216,7 @@
>  snprintf(msg, 1000, "Unknown error code %d\n", err);
>  }
>  msg[1000 - 1] = 0;
> -xmlChar *result = xmlCharStrdup(msg);
> +result = xmlCharStrdup(msg);
>  return (xmlEscapeFormatString());
>  }
>  
> --- tree.c2016-07-21 11:05:19.0 +0200
> +++ tree-fix.c2016-07-21 11:02:10.0 +0200
> @@ -10,8 +10,6 @@
>   *
>   */
>  
> +/* To avoid EBCDIC trouble when parsing on zOS */
> +#pragma convert("ISO8859-1")
> +#endif
>  #define IN_LIBXML
>  #include "libxml.h"
>  
> --- xmlIO.c   2016-07-15 13:42:07.0 +0200
> +++ xmlIO-fix.c   2017-03-07 07:33:52.0 +0100
> @@ -926,8 +926,11 @@
>  #endif
>  }
>  
> -if (!xmlCheckFilename(path))
> +/* Do not check DDNAME on zOS ! */
> +if(!__MVS__) {
> +  if (!xmlCheckFilename(path))
>  return(NULL);
> +}
>  
>  #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
>  fd = xmlWrapOpen(path, 0);
> @@ -1004,6 +1007,8 @@
>  
>  #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
>  fd = xmlWrapOpen(path, 1);
> +#elif(__MVS__) 
> +fd = fopen(path, "w");
>  #else
>  fd = fopen(path, "wb");
>  #endif /* WIN32 */
> --- xmlmodule.c   2016-05-06 18:28:04.0 +0200
> +++ xmlmodule-fix.c   2016-07-21 11:08:24.0 +0200
> @@ -8,6 +8,9 @@
>   * http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html
>   */
>  
> +/* In order RTLD_GLOBAL and RTLD_NOW to be defined on zOS */
> +#define _UNIX03_SOURCE
> +
>  #define IN_LIBXML
>  #include "libxml.h"
>  
> --- xmlschemas.c  2016-05-23 12:01:08.0 +0200
> +++ xmlschemas-fix.c  2016-07-21 11:05:49.0 +0200
> @@ -44,6 +44,9 @@
>   * but is done here due to performance. Move it to an other layer
>   * is schema construction via an API is implemented.
>   */
> +
> +/* To avoid EBCDIC trouble when parsing on zOS */
> +#if defined(__MVS__)
> +#pragma convert("ISO8859-1")
> +#endif
>  #define IN_LIBXML
>  #include "libxml.h"
>  
> @@ -3168,8 +3171,8 @@
>   "valid.");
>   }
>   if (expected) {
> - msg = xmlStrcat(msg, BAD_CAST " Expected is '");
>   xmlChar *expectedEscaped = xmlCharStrdup(expected);
> + msg = xmlStrcat(msg, BAD_CAST " Expected is '");
>   msg = xmlStrcat(msg, xmlEscapeFormatString());
>   FREE_AND_NULL(expectedEscaped);
>   msg = xmlStrcat(msg, BAD_CAST "'.\n");
> --- xmlschemastypes.c 2016-05-06 18:28:04.0 +0200
> +++ xmlschemastypes-fix.c 2016-07-21 11:05:00.0 +0200
> @@ -7,6 +7,8 @@
>   * Daniel Veillard 
>   */
>  
> +/* To avoid EBCDIC trouble when parsing on zOS */
> +#if defined(__MVS__)
> +#pragma convert("ISO8859-1"

[xml] Next release and plans

2017-08-28 Thread Daniel Veillard
Hi everybody,

  I was hoping to get a release done in July but failed, what happens is
that the look at the backlog, it is overhelming and the task look too daunting
and I fail to focuse on it.

  So I plan to have a different approach, the exact same one I have been
applying successfully to the libvirt project for years: release what is
there at the beginning of the month, every month. If I can do it for libvirt
I can do it for libxml2 and libxslt.

  The plan hence is to push some of the patches I know are pending, enter
freeze tomorrow morning, make an release candidate 1 release (aka RC1),
do an RC2 on 31, i.e. Thursday, and release over the week-end. This is
exactly the same schedule as libvirt.

  If there is something missing from that release, no big deal, there will
be another one at the end of September, just make sure it gets my attention
or Nick's one and if it gets commited then it will be pushed in a release
within a month.

   Let's try to see if that works, I know that's something I can commit to
and the current way doesn't work 

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Are CVE git tags still used?

2017-07-27 Thread Daniel Veillard
On Mon, Jul 10, 2017 at 02:08:15AM +, 林自均 wrote:
> Hi folks,
> 
> I am considering to apply some CVE patches from the upstream. For example,
> there is a patch "c1d1f712" for CVE-2016-4658 described on the Red Hat
> bugzilla page: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-4658
> 
> However, I don't see the CVE git tag for the commit ("c1d1f712") in the
> upstream git tree. I used to see those tags before the release 2.9.4 and
> they are really helpful.
> 
> Should I expect to see those tags again in the future? Thanks!
> 
> Best,
> John Lin

  yes I need to walk though the list and retag them in git,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Fix: Wrong signature for function "xmlSchemaAugmentImportedIDC" (libxml2-2.9.4)

2017-07-27 Thread Daniel Veillard
On Sun, Jul 09, 2017 at 04:27:09AM -0400, doodad-js Admin wrote:
> File: xmlschemas.c
> Version: 2.9.4
> 
> 
> 22034c22034
> < xmlSchemaAugmentImportedIDC(xmlSchemaImportPtr imported,
> xmlSchemaValidCtxtPtr vctxt) {
> ---
> > xmlSchemaAugmentImportedIDC(xmlSchemaImportPtr imported,
> xmlSchemaValidCtxtPtr vctxt, xmlChar *name) {
> 

  Hum, right though it's unused, so need to flagged as such, commited:

https://git.gnome.org/browse/libxml2/commit/?id=27f310d453b7e2e71847e5910a0961753aacdbd1

  thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Preparing for release(s) in coming weeks

2017-07-27 Thread Daniel Veillard
Hi all,

  I should be able to shave a bit of time, good point is that Nick
did a lot of work and we shouldn't be in a too bad shape. I'm trying
to look at some of the older requests before cutting a first release
candidate, so if there is patches that you know are pending etc...
please reply so I have a look.
  For libxslt I think Nick kept everything in working order so there
shuldn't be any serious backlog,

  thanks,

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [PATCH] Fix -Wformat warning

2017-07-26 Thread Daniel Veillard
On Tue, Aug 09, 2016 at 06:05:32PM -0700, Xin Li wrote:
> Hi, all,
> 
> Could you please consider integrating this one line patch?
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=768199
> 
> Thanks in advance!
> 
> Cheers,

  I think Nick took care of that,

   thanks,

Daniel


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [patch] small changes for OS/400

2017-07-26 Thread Daniel Veillard
  Hi Patrick,

that looks clean, I just updated 2016 to 2017  , and then pushed
to git,

  sorry for the delay,

thanks,

Daniel

On Wed, Jul 27, 2016 at 04:10:14PM +0200, Patrick Monnerat wrote:
> 
> OS/400 version V5R3 is not supported by IBM anymore.
> In addition, the iSeries system I have here for development has been changed
> and the new system is not able to compile for an OS version lower than V6R1.
> 
> Thus I made some updates to the libxml2 os400 scripts accordingly:
> 
> - Oldest supported OS version is now V6R1.
> - Adjust ILE/RPG wrappers comments.
> - Update copyright year range.
> - Do not log compiler informational messages.
> 
> Thanks for applying the attached patch.
> 
> Cheers,
> Patrick

> os400: oldest supported OS version is now V6R1.
> Adjust ILE/RPG wrappers comments.
> Update copyright year range.
> Do not log compiler informational messages.
> diff --git a/os400/initscript.sh b/os400/initscript.sh
> index cc52e45..42ce54d 100644
> --- a/os400/initscript.sh
> +++ b/os400/initscript.sh
> @@ -50,7 +50,7 @@ setenv TGTCCSID '500'   # Target CCSID of 
> objects.
>  setenv DEBUG'*ALL'  # Debug level.
>  setenv OPTIMIZE '10'# Optimisation level.
>  setenv OUTPUT   '*NONE' # Compilation output option.
> -setenv TGTRLS   'V5R3M0'# Target OS release.
> +setenv TGTRLS   'V6R1M0'# Target OS release.
>  setenv IFSDIR   '/libxml2'  # Installation IFS directory.
>  
>  
> @@ -217,7 +217,7 @@ make_module()
>  cat "${2}" >> __tmpsrcf.c
>  CMD="CRTCMOD MODULE(${TARGETLIB}/${1}) SRCSTMF('__tmpsrcf.c')"
>  #   CMD="${CMD} OPTION(*INCDIRFIRST *SHOWINC *SHOWSYS)"
> -CMD="${CMD} OPTION(*INCDIRFIRST)"
> +CMD="${CMD} OPTION(*INCDIRFIRST) FLAG(10)"
>  CMD="${CMD} SYSIFCOPT(*IFS64IO) LANGLVL(*EXTENDED) 
> LOCALETYPE(*LOCALE)"
>  CMD="${CMD} INCDIR("
>  if [  -z "${SYSICONV}" ]
> diff --git a/os400/libxmlrpg/xmlstring.rpgle b/os400/libxmlrpg/xmlstring.rpgle
> index 8980fc0..59a7625 100644
> --- a/os400/libxmlrpg/xmlstring.rpgle
> +++ b/os400/libxmlrpg/xmlstring.rpgle
> @@ -115,7 +115,7 @@
>   d like(xmlCint)
>   d  buf*   value options(*string)
>xmlChar *
>   d  lenvalue like(xmlCint)
> - d  msg*   value options(*string)
>const xmlChar *
> + d  msg*   value options(*string)
>const char *
>   d  arg1   *   value options(*string: *nopass)
>   d  arg2   *   value options(*string: *nopass)
>   d  arg3   *   value options(*string: *nopass)
> @@ -129,7 +129,7 @@
>   d like(xmlCint)
>   d  buf*   value options(*string)
>xmlChar *
>   d  lenvalue like(xmlCint)
> - d  msg*   value options(*string)
>const xmlChar *
> + d  msg*   value options(*string)
>const char *
>   d  ap likeds(xmlVaList)
>  
>   d xmlGetUTF8Char  pr  extproc('xmlGetUTF8Char')
> diff --git a/os400/make-src.sh b/os400/make-src.sh
> index 6094de8..c7d9971 100644
> --- a/os400/make-src.sh
> +++ b/os400/make-src.sh
> @@ -17,7 +17,7 @@ cd "${TOPDIR}"
>  echo '#pragma comment(user, "libxml2 version '"${LIBXML_VERSION}"'")' > 
> os400.c
>  echo '#pragma comment(user, __DATE__)' >> os400.c
>  echo '#pragma comment(user, __TIME__)' >> os400.c
> -echo '#pragma comment(copyright, "Copyright (C) 1998-2015 Daniel Veillard. 
> OS/400 version by P. Monnerat.")' >> os400.c
> +echo '#pragma comment(copyright, "Copyright (C) 1998-2016 Daniel Veillard. 
> OS/400 version by P. Monnerat.")' >> os400.c
>  make_module OS400   os400.c
>  LINK=   # No need to rebuild service program yet.
>  MODULES=

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2017-07-22 Thread Daniel Veillard
On Mon, Jun 26, 2017 at 02:41:46PM +0200, Nick Wellnhofer wrote:
> On 22/06/2017 22:29, Daniel Veillard wrote:
> >No limit on text node and one can be DoS'ed, there is many kind
> > of recursive attacks on XML, and libxml2 uses a combination of "entities
> > density" and text node size to try to catch those, it's complex.
> >By offloading the choice of the maximum text size to the application
> > developper you then put them in charge of doing the checking, i.e. too
> > big a size and the app can be DoS'ed in practice, it just depends on the
> > computer speed and memory anount. They need to be aware of that.
> 
> Right, this is something I overlooked. xmlParserEntityCheck should not use
> the user-provided max text length. Otherwise, xmlSetMaxTextLength(ctxt,
> SIZE_MAX) would disable one of the checks which wasn't my intention. We
> should keep the hardcoded limit there.
> 
> > The change of the size of the parsing context can bite some apps, that
> > happen in the past when I did this, maybe they have all been corrected,
> > but I would doubt it's gonna be 100% without side effects.
> 
> OK, I could revert this part of the change.
> 
> But thinking more about it, I come to the conclusion that libxml2 shouldn't
> impose a limit on the maximum size of text nodes at all. If there's a
> reliable mechanism to catch abusive entity expansions, the size of a text
> node is bounded by the size of the input document. In fact, processing a
> document containing a single 1 GB text node uses much less resources than a
> document with 1 GB of ""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.

  I still think that one need to protect users with a default max
text node side. The problem is that libxml2 is very often used on untrusted
data, and if they can push a 30 GB document (not that hard on current networks)
then you're DoS'ed as well.
  Same for max depth of a document (1 GB of ""), etc ...

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2017-06-22 Thread Daniel Veillard
On Thu, Jun 22, 2017 at 08:40:23AM -0600, Stacy W. Smith wrote:
> > On 21/06/2017 23:41, Daniel Veillard wrote:
> >>   I see only one person asking for this. Like any change to the
> >> structure (even adding at the end) this has
> >> potential risks. IMHO not worth the risk. If the person has such a
> >> specific need he can simply recompile
> >> libxml2 with a different value of the constant for that piece of code.
> 
> If your looking for feedback, I would also like to see this change committed. 
> I have a project which uses libxml2 indirectly via the Python lxml library. 
> In this environment, it is not practical/feasible to have users recompile 
> libxml2.

  No limit on text node and one can be DoS'ed, there is many kind
of recursive attacks on XML, and libxml2 uses a combination of "entities
density" and text node size to try to catch those, it's complex.
  By offloading the choice of the maximum text size to the application
developper you then put them in charge of doing the checking, i.e. too
big a size and the app can be DoS'ed in practice, it just depends on the
computer speed and memory anount. They need to be aware of that.
  Your change would not change the default behaviour, that's a good point.
The change of the size of the parsing context can bite some apps, that
happen in the past when I did this, maybe they have all been corrected,
but I would doubt it's gonna be 100% without side effects.
  Except for Inkscape which usually doesn't load its images from random
web resources, I think use of XML_PARSE_HUGE to avoid the node text size
limit is a serious mistake (at least for web apps and stacks), but
I would not be too optimist about the actual testing of the apps after they
pick a new one for DoS, too many vectors, too complex...

  Purely at the code review patch looks fine, I would add a comment that
changing the text node max size has an influence on DoS detection by
libxml2 and doing so while parsing untrusted source should get some security
attention.
  Since the default is preserved, I'm not too worried, it's mostly the
structure size change which may break on users.

  ACK

Daniel

-- 
Daniel Veillard  | Red Hat Developers Tools http://developer.redhat.com/
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Availability of libxml2-2.9.4

2016-05-23 Thread Daniel Veillard
On Mon, May 23, 2016 at 11:59:55AM +0100, Pete Cordell wrote:
> On 23/05/2016 09:15, Daniel Veillard wrote:
> > (sorry Pete, didn't managed to fix the regexp issue
> > yet :-\ )
> 
> 
> One outa two ain't bad (to quote Meatloaf - kinda!) :-)  Thanks for trying.
> 
> Perhaps more importantly, did you get the patch with the test and results in
> there, or do I need to send it again?

  I got your patch fine but without the main fix, I didn't try to apply it,

   thanks !

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Availability of libxml2-2.9.4

2016-05-23 Thread Daniel Veillard
  So it took me one more week than expected to get there, but the
release is done, it's gatted in git, and signed tarball and rpms are
available at the usual place:

  ftp://xmlsoft.org/libxml2/

This is a big release, and includes a number of security patches (which
is why that took longer than expected), there is also a significant number
of 'normal' bug fixes (sorry Pete, didn't managed to fix the regexp issue
yet :-\ ) and a fair number of portability fixes including massive patch set
from Patrick for OS400.

Security:
- More format string warnings with possible format string vulnerability (David 
Kilzer)
- Avoid building recursive entities (Daniel Veillard)
- Heap-based buffer overread in htmlCurrentChar (Pranjal Jumde)
- Heap-based buffer-underreads due to xmlParseName (David Kilzer)
- Heap use-after-free in xmlSAX2AttributeNs (Pranjal Jumde)
- Heap use-after-free in htmlParsePubidLiteral and htmlParseSystemiteral 
(Pranjal Jumde)
- Fix some format string warnings with possible format string vulnerability 
(David Kilzer)
- Detect change of encoding when parsing HTML names (Hugh Davenport)
- Fix inappropriate fetch of entities content (Daniel Veillard)
- Bug 759398: Heap use-after-free in xmlDictComputeFastKey 
<https://bugzilla.gnome.org/show_bug.cgi?id=759398> (Pranjal Jumde)
- Bug 758605: Heap-based buffer overread in xmlDictAddString 
<https://bugzilla.gnome.org/show_bug.cgi?id=758605> (Pranjal Jumde)
- Bug 758588: Heap-based buffer overread in xmlParserPrintFileContextInternal 
<https://bugzilla.gnome.org/show_bug.cgi?id=758588> (David Kilzer)
- Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup 
<https://bugzilla.gnome.org/show_bug.cgi?id=757711> (Pranjal Jumde)
- Add missing increments of recursion depth counter to XML parser. (Peter 
Simons)

Documentation:
- Fix typo: s{ ec -> cr }cipt (Jan Pokorný)
- Fix typos: dictio{ nn -> n }ar{y,ies} (Jan Pokorný)
- Fix typos: PATH_{ SEAPARATOR -> SEPARATOR } (Jan Pokorný)
- Correct a typo. (Shlomi Fish)

Portability:
- Correct the usage of LDFLAGS (Mattias Hansson)
- Revert the use of SAVE_LDFLAGS in configure.ac (Mattias Hansson)
- libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles (Mike 
Frysinger)
- Fix apibuild for a recently added construct (Daniel Veillard)
- Use pkg-config to locate zlib when possible (Stewart Brodie)
- Use pkg-config to locate ICU when possible (Stewart Brodie)
- Portability to non C99 compliant compilers (Patrick Monnerat)
- dict.h: Move xmlDictPtr definition before includes to allow direct inclusion. 
(Patrick Monnerat)
- os400: tell about xmllint and xmlcatalog in README400. (Patrick Monnerat)
- os400: properly process SGML add in XMLCATALOG command. (Patrick Monnerat)
- os400: implement CL command XMLCATALOG. (Patrick Monnerat)
- os400: compile and install program xmlcatalog (qshell-only). (Patrick 
Monnerat)
- os400: expand tabs in sources, strip trailing blanks. (Patrick Monnerat)
- os400: implement CL command XMLLINT. (Patrick Monnerat)
- os400: compile and install program xmllint (qshell-only). (Patrick Monnerat)
- os400: initscript make_module(): Use options instead of positional 
parameters. (Patrick Monnerat)
- os400: c14n.rpgle: allow *omit for nullable reference parameters. (Patrick 
Monnerat)
- os400: use like() for double type. (Patrick Monnerat)
- os400: use like() for int type. (Patrick Monnerat)
- os400: use like() for unsigned int type. (Patrick Monnerat)
- os400: use like() for enum types. (Patrick Monnerat)
- Add xz to xml2-config --libs output (Baruch Siach)
- Bug 760190: configure.ac should be able to build --with-icu without 
icu-config tool <https://bugzilla.gnome.org/show_bug.cgi?id=760190> (David 
Kilzer)
- win32\VC10\config.h and VS 2015 (Bruce Dawson)
- Add configure maintainer mode (orzen)

Bug Fixes:
- Avoid an out of bound access when serializing malformed strings (Daniel 
Veillard)
- Unsigned addition may overflow in xmlMallocAtomicLoc() (David Kilzer)
- Integer signed/unsigned type mismatch in xmlParserInputGrow() (David Kilzer)
- Bug 763071: heap-buffer-overflow in xmlStrncat 
<https://bugzilla.gnome.org/show_bug.cgi?id=763071> (Pranjal Jumde)
- Integer overflow parsing port number in URI (Michael Paddon)
- Fix an error with regexp on nullable counted char transition (Daniel Veillard)
- Fix memory leak with XPath namespace nodes (Nick Wellnhofer)
- Fix namespace axis traversal (Nick Wellnhofer)
- Fix null pointer deref in docs with no root element (Hugh Davenport)
- Fix XSD validation of URIs with ampersands (Alex Henrie)
- xmlschemastypes.c: accept endOfDayFrag Times set to "24:00:00" mean "end of 
day" and should not cause an error. (Patrick Monnerat)
- xmlcatalog: flush stdout before interactive shell input. (Patrick Monnerat)
- xmllint: flush stdout before interactive shell input. (Patrick Monnerat)
- Don't recurse into OP_VALUEs in xmlXPathOptimizeExpression (Nick Wellnhofer)
- Fix nam

Re: [xml] Availability of libxml2-2.9.4 release candidate 2 - regexp

2016-05-09 Thread Daniel Veillard
On Mon, May 09, 2016 at 11:35:28AM +0100, Pete Cordell wrote:
> On 09/05/2016 10:26, Daniel Veillard wrote:
> >   Hi Pete,
> > 
> > On Mon, May 09, 2016 at 10:02:28AM +0100, Pete Cordell wrote:
> > > Thanks Daniel.  I've managed to verify that the ab?c{0,1} pattern now 
> > > works.
> > > But the following pattern still appears to fail:
> > > 
> > > =>((2{1,2}|24)\.){2}2
> > > #fails
> > > 24.24.2
> > 
> >   Right, I gave it 30mn, looked at the graph buildup, epsilon transition
> > and state reduction, and then the advance through the state machine
> > (it's a non-determinist one with rollbacks) and somehow the rollback to pick
> > 24 instead of 2{1,2} works in the first 24. occurence but not the second
> > one, didn't finished and decided to let this for after the rc2 release
> 
> Rather you than me :-)  Thanks for trying.  I mainly wanted to make sure
> that you hadn't missed it as it was buried at the end of a message after
> quite a lot of noise!

  :-)

> > > Also, I see you haven't had a chance to put the test vectors in the
> > > test/regexp dir.  If you let me know what form you'd like them in I could
> > > submit something as a patch / copy of files / whatever.
> > 
> >   a git diff with the new tests and results would be great if you can
> > provide it :-)
> 
> Is this OK?  I used git format-patch.  I'm new to submitting diffs!  If you
> want another format let me know.

Yup, just add it as an attachment instead, it's easier to process and avoid
mail agents and tools to mess with the content. Also would need to results ;-)

Daniel

> -
> 
> Date: Mon, 9 May 2016 11:08:26 +0100
> Subject: [PATCH] Additional regexp test vectors
> 
> ---
>  test/regexp/multiple-rollback-paths |  3 +++
>  test/regexp/optional-as-zero-one| 15 +++
>  2 files changed, 18 insertions(+)
>  create mode 100644 test/regexp/multiple-rollback-paths
>  create mode 100644 test/regexp/optional-as-zero-one
> 
> diff --git a/test/regexp/multiple-rollback-paths
> b/test/regexp/multiple-rollback-paths
> new file mode 100644
> index 000..98bc5c3
> --- /dev/null
> +++ b/test/regexp/multiple-rollback-paths
> @@ -0,0 +1,3 @@
> +=>((2{1,2}|24)\.){2}2
> +#fails
> +24.24.2
> diff --git a/test/regexp/optional-as-zero-one
> b/test/regexp/optional-as-zero-one
> new file mode 100644
> index 000..0c696f1
> --- /dev/null
> +++ b/test/regexp/optional-as-zero-one
> @@ -0,0 +1,15 @@
> +=>ab?c{0,1}
> +a
> +ab
> +abc
> +ac
> +=>ab?c?
> +a
> +ab
> +abc
> +ac
> +=>ab{0,1}c{0,1}
> +a
> +ab
> +abc
> +ac
> -- 
> 2.5.3.windows.1
> 
> ---
> 
> Thanks again,
> 
> Pete.

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Availability of libxml2-2.9.4 release candidate 2

2016-05-08 Thread Daniel Veillard
   As planned I tagged in git a release candidate 2, and pushed to the
server the signed tarball and rpms for rc2:
 
ftp://xmlsoft.org/xml/
 
   I will run this on my machine until the release and try to see if there
is any nastyness popping up. I suggest others to do so too for their workload !

  I still have pending patches, but most likely next week end I will push the
final 2.9.4, if things don't look nice I may push an rc3 instead.

   Please give it some testing and report,

 thanks !

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Availability of libxml2-2.9.4 release candidate 1

2016-05-08 Thread Daniel Veillard
On Wed, May 04, 2016 at 01:05:23PM +0100, Stewart Brodie wrote:
> Daniel Veillard <veill...@redhat.com> wrote:
> 
> >   So as said a few weeks ago, I'm starting the process for a new release,
> > I tagged in git a release candidate 1, and pushed to the server the
> > signed tarball and rpms for rc1:
> > 
> >ftp://xmlsoft.org/xml/
> > 
> >   I will run this on my machine for the newxt few weeks, and see if there
> > is any nastyness popping up. I suggest others to do so too for their
> > workload ! I still have a number of patches pending and not commited, so
> > there will be more release candidates, at least one more next week-end,
> > and at best we can have a final release in 2 weeks, but if we need more
> > cycles, so be it !
> > 
> >   So give it some testing, thanks !
> 
> 
> This fails to cross-compile for me, due to use of icu-config and also the
> configure script finding the build machine's libz.so rather than the
> cross-compiled version when testing whether zlib is available.
> 
> 
> I raised bug 765979 for this, and attached patches there directly that
> resolve the issue for me.
> 
> 
> These are actually be long-standing issues rather than new problems since
> the 2.9.3 release. I've been patching the icu-config usage out of the
> configure script in 2.9.1 for ages, but the zlib problem was new in 2.9.2 (I
> think - we just jumped from 2.9.1 to 2.9.3 last week, which caused some of
> our builds to all keel over)
> 

  Okay, since the patches fallback to the previous code if pkg-config step
fails I think this is the best way to handle this, so pushed and applied

https://git.gnome.org/browse/libxml2/commit/?id=3d75c2e82806955542a41ff62a5be25e04287d89

https://git.gnome.org/browse/libxml2/commit/?id=45f0abd4278776e1c12df38672b8d20a3cc471a8

 Thanks !

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Moving to time based releases

2016-05-04 Thread Daniel Veillard
On Tue, May 03, 2016 at 01:06:22PM -0700, Eric S. Eberhard wrote:
> My own opinion is that there should be ONE release a year -- and if
> emergency problems come up patch releases are made with the caveat they are
> not fully tested.  It will save you time.
> 
> E

  Thanks, but let's try 6 months and see :)

Daniel

> On 5/3/2016 9:54 AM, Daniel Veillard wrote:
> > On Fri, Apr 29, 2016 at 06:29:31PM +0200, Nick Wellnhofer wrote:
> > > On 15/04/2016 14:32, Daniel Veillard wrote:
> > > > It's both too easy to let things slip and very painful to 
> > > > procrastinate,
> > > > so to limit both and try to make the audience happier, I have decided to
> > > > switch libxml2 and libxslt to time based releases. At the tune of 2 
> > > > releases
> > > > per year, considering the stability of the code I think it's reasonable.
> > > > For simplicity I will release both on the same day.
> > > > 
> > > > So what does that mean ?
> > > > 
> > > > - that libxml2-2.9.4 should be out on May 20
> > > > - that libxslt-1.1.29 should be out on May 20
> > > > - that there should be a release candidate 1 around May 1st for both 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 release.
> >Thanks Nick,
> > 
> > I will do RC2 next week-end, if you have portability or bug fixes
> > I think it's still fine pushing this week,
> > 
> > Daniel
> > 
> 
> -- 
> Eric S. Eberhard
> VICS
> 2933 W Middle Verde Road
> Camp Verde, AZ  86322
> 
> 928-567-3727  work  928-301-7537  cell
> 
> http://www.vicsmba.com/index.html (our work)
> http://www.vicsmba.com/ourpics/index.html (fun pictures)
> 

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Additional regexp test files

2016-05-03 Thread Daniel Veillard
On Tue, Apr 19, 2016 at 05:24:00PM +0100, Pete Cordell wrote:
> I've tried to reduce the patterns that I reported earlier to a minimal form.
> For the timestamp pattern I've ended up with:
> 
> =>ab?c{0,1}
> #fails
> a
> #ok
> ab
> abc
> ac

  Ok that's something I need to look at and fix, bugs in the regexp code
aren't the most trivial ones, but gives opportunity to make state graphs
I will try to get this fixed for coming release :-)

 thanks,

Daniel

> Interesting the following patterns all pass, even though conceptually they
> are the same pattern.  So I guess there is a difference between handling c?
> and c{0,1}.  That might give a clue as to how to fix the problem.
> 
> =>ab?c?
> a
> ab
> abc
> ac
> =>ab{0,1}c{0,1}
> a
> ab
> abc
> ac
> =>ab{0,1}c?
> a
> ab
> abc
> ac
> =>ab?c{1,2}
> ac
> abc
> abcc
> acc
> 
> For the IP address pattern, the simplest I could get it is to:
> 
> =>((2{1,2}|24)\.){2}2
> #fails
> 24.24.2
> 
> If it would help to have these in the form of a Git patch or some other
> format let me know.
> 
> Thanks,
> 
> Pete.
> -- 
> -
> Pete Cordell
> Codalogic Ltd
> Read & write XML in C++: http://www.xml2cpp.com
> -
> 
> On 15/04/2016 17:48, Pete Cordell wrote:
> > Hi there,
> > 
> > Please can I submit the following regexp test files that should pass,
> > but when I test them they fail.  (I'm afraid I'm not smart enough to
> > suggest how to fix the code!)
> > 
> > I've attached them and included a git patch so hopefully one of the
> > formats is convenient for you.  If not, let me know what would work
> > better.  I've included them inline below so you can do a quick scan.
> > 
> > test/regexp/fussyipaddress
> > --
> > =>((1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])
> > 
> > 192.168.254.0
> > 
> > test/regexp/timestamp
> > -
> > =>\d{8}T\d{6}\.?\d{0,6}
> > # This gives incorrect result
> > 20160412T112319
> > # These give correct result
> > 20160412T112319.
> > 20160412T112319.43
> > 20160412T112319.432312
> > 
> > Thanks,
> > 
> > Pete.
> > 
> > 
> > ___
> > xml mailing list, project page  http://xmlsoft.org/
> > xml@gnome.org
> > https://mail.gnome.org/mailman/listinfo/xml
> > 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Moving to time based releases

2016-05-03 Thread Daniel Veillard
On Fri, Apr 29, 2016 at 06:29:31PM +0200, Nick Wellnhofer wrote:
> On 15/04/2016 14:32, Daniel Veillard wrote:
> >It's both too easy to let things slip and very painful to procrastinate,
> > so to limit both and try to make the audience happier, I have decided to
> > switch libxml2 and libxslt to time based releases. At the tune of 2 releases
> > per year, considering the stability of the code I think it's reasonable.
> > For simplicity I will release both on the same day.
> > 
> >So what does that mean ?
> > 
> > - that libxml2-2.9.4 should be out on May 20
> > - that libxslt-1.1.29 should be out on May 20
> > - that there should be a release candidate 1 around May 1st for both 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 release.

  Thanks Nick,

I will do RC2 next week-end, if you have portability or bug fixes
I think it's still fine pushing this week,

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Availability of libxml2-2.9.4 release candidate 1

2016-05-01 Thread Daniel Veillard
  So as said a few weeks ago, I'm starting the process for a new release,
I tagged in git a release candidate 1, and pushed to the server the
signed tarball and rpms for rc1:

   ftp://xmlsoft.org/xml/

  I will run this on my machine for the newxt few weeks, and see if there
is any nastyness popping up. I suggest others to do so too for their workload !
I still have a number of patches pending and not commited, so there will be
more release candidates, at least one more next week-end, and at best we can
have a final release in 2 weeks, but if we need more cycles, so be it !

  So give it some testing, thanks !

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [PATCH v2] Add xz to xml2-config --libs output

2016-04-28 Thread Daniel Veillard
  Right, makes sense, pushed,

thanks !

Daniel

On Tue, Apr 19, 2016 at 09:22:18AM +0300, Baruch Siach wrote:
> XML_LIBS should include LZMA_LIBS. This ensures that 'xml2-config --libs'
> shows -llzma when xz is enabled. Otherwise static link fails because of
> missing xz symbols.
> ---
> v2: rebase on current master
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index fd05c56141d5..352da48d5399 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1526,7 +1526,7 @@ else
>  LDFLAGS="${_ldflags}"])]))
>  fi
>  fi
> -XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $LIBS"
> +XML_LIBS="-lxml2 $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS 
> $M_LIBS $LIBS"
>  XML_LIBTOOLLIBS="libxml2.la"
>  AC_SUBST(WITH_ICU)
>  
> -- 
> 2.8.0.rc3
> 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [PATCH] Do normalize string-based datatype value in RelaxNG facet checking

2016-04-15 Thread Daniel Veillard
  
> +
> +[a-z]+
> +
> +
> +  
> +
> diff --git a/test/relaxng/pattern3_1.xml b/test/relaxng/pattern3_1.xml
> new file mode 100644
> index 000..f559cd3
> --- /dev/null
> +++ b/test/relaxng/pattern3_1.xml
> @@ -0,0 +1 @@
> + ooo 
> diff --git a/xmlschemastypes.c b/xmlschemastypes.c
> index ff64f50..3c9514c 100644
> --- a/xmlschemastypes.c
> +++ b/xmlschemastypes.c
> @@ -5315,7 +5315,15 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
>   */
>   if (value == NULL)
>   return(-1);
> - ret = xmlRegexpExec(facet->regexp, value);
> + /*
> + * If string-derived type, regexp must be tested on the value space 
> of
> + * the datatype.
> + * See https://www.w3.org/TR/xmlschema-2/#rf-pattern
> + */
> + const int stringType = val && ((val->type >= XML_SCHEMAS_STRING && 
> val->type <= XML_SCHEMAS_NORMSTRING)
> + || (val->type >= XML_SCHEMAS_TOKEN 
> && val->type <= XML_SCHEMAS_NCNAME));
> + ret = xmlRegexpExec(facet->regexp,
> + (stringType && val->value.str) ? val->value.str 
> : value);
>   if (ret == 1)
>   return(0);
>   if (ret == 0)
> -- 
> 2.7.0
> 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Moving to time based releases

2016-04-15 Thread Daniel Veillard
Hi everbody,

  It's both too easy to let things slip and very painful to procrastinate,
so to limit both and try to make the audience happier, I have decided to
switch libxml2 and libxslt to time based releases. At the tune of 2 releases
per year, considering the stability of the code I think it's reasonable.
For simplicity I will release both on the same day.

  So what does that mean ?

- that libxml2-2.9.4 should be out on May 20
- that libxslt-1.1.29 should be out on May 20
- that there should be a release candidate 1 around May 1st for both of
  them then an RC2 around the 10th May and a push on the 20
- that if you have a patch posted to either list or bugzilla which wasn't
  commented on or applied, it's fine and recommended to pester me with
  a private email (might be good to rebase in case that's a really old one)
- if we are getting close to May 1st and your patch isn't in, raise the
  point here, me and Nick Wellnhofer on the XSLT side will make sure they
  go in.
- if after May 1st there hasn't been an RC1 people should complain here
  in case I forgot my promise (and same for RC2 and final)
- and around Nov 1st watch for another cycle

 I really hope this works, that's what I did for my other project (libvirt
but with a 1 month cadence) and this really improves everybody's life!

 So send those requests (Patrick Monnerat and Alex Henrie, no need to send
 again now) for patch needing processing,

  thanks,

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Which version of XPath xmllint support?

2016-04-15 Thread Daniel Veillard
On Thu, Apr 14, 2016 at 02:34:14PM -0500, Peng Yu wrote:
> Hi, I don't find in the man page which version of XPath xmllint
> support. Could anybody let me know? Thanks.

 it's XPath 1.0

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Several commits

2016-04-12 Thread Daniel Veillard
On Tue, Apr 12, 2016 at 12:28:39PM -0600, Alex Henrie wrote:
> 2016-04-11 12:18 GMT-06:00 Patrick Monnerat <patrick.monne...@dh.com>:
> > Hi Daniel,
> >   I've sent you (to this list) several patches about 1 year ago, but they 
> > have not been applied to the git repo.
> 
> I'm having the same problem. I sent a patch for bug 709171 in January
> and it has not been committed or commented on. There have been
> multiple commits from other authors during this time period, so I
> don't know why mine has fallen through the cracks.

  I know, I'm keeping a log of thing I need to do, will try to get
to them, bear with me ! I didn't forgot your schema patch :-)

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [PATCH] Correct a small typo

2016-04-10 Thread Daniel Veillard
On Sun, Apr 03, 2016 at 05:25:57AM +0300, Shlomi Fish wrote:
> The attached patch corrects a small typo - "duplcates" is a misspelling.
> 
> Regards,
> 
>   Shlomi Fish

  Sure, pushed,

   thanks,

Daniel

> -- 
> -
> Shlomi Fish   http://www.shlomifish.org/
> 
> Chuck Norris is *not* going to miss Anna Kendrick when she’s gone.
> — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/
> 
> Please reply to list if it's a mailing list post - http://shlom.in/reply .

> >From c9a0d63767d55da0f6a5fb8a6c7a05f137944e64 Mon Sep 17 00:00:00 2001
> From: Shlomi Fish <shlo...@shlomifish.org>
> Date: Sun, 3 Apr 2016 05:14:44 +0300
> Subject: [PATCH] Correct a typo.
> 
> ---
>  xpath.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xpath.c b/xpath.c
> index 935fcff..512bbf4 100644
> --- a/xpath.c
> +++ b/xpath.c
> @@ -3706,7 +3706,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
>  
>  /* @@ with_ns to check whether namespace nodes should be looked at @@ */
>  /*
> - * prevent duplcates
> + * prevent duplicates
>   */
>  for (i = 0;i < cur->nodeNr;i++)
>  if (cur->nodeTab[i] == val) return(0);
> -- 
> 2.7.4
> 

> _______
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] default values from schema

2016-04-10 Thread Daniel Veillard
On Sat, Mar 26, 2016 at 09:48:59PM +0100, Fabian Wein wrote:
> Hello to the list,
> 
> I know I have a FAQ but I cannot manage it by myself :(
> 
> I have a xsd schema and need to validate *and* parse a xml file making use
> of the default values from the schema. 
> 
> In the end I need it in C++ but I guess it helps to have it first in Python?!
> 
> My minimalistic example is based on 
> http://www.w3schools.com/xml/schema_howto.asp
> extended by attributes, one with default -> see attachment.
> 
> Validating works nicely :) Any error in the xml is detected or ret=0 if the 
> file is ok.
> 
> doc = libxml2.parseFile(„node.xml“)
> s = libxml2.schemaNewParserCtxt(„node.xsd“)
> sp = s.schemaParse()
> ct = sp.schemaNewValidCtxt()  
> ret = ct.schemaValidateDoc(doc)
> 
> But I have no idea on how to get the populated data from this (only from doc).
> 
> Then I tried to extend the reader example:
> 
> def streamFile(filename):
> reader = libxml2.newTextReaderFilename(filename)
> s = libxml2.schemaNewParserCtxt(‚node.xsd‘)
> sp = s.schemaParse()
> ct = sp.schemaNewValidCtxt()
> ct.schemaSetValidOptions(libxml2.XML_SCHEMA_VAL_VC_I_CREATE)
> ct.SchemaValidateCtxt(reader, libxml2.XML_SCHEMA_VAL_VC_I_CREATE)
> 
> reader.SetSchema(ct)
> reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS, 1)
> ret = reader.Read()
> while ret == 1:
> processNode(reader)
> ret = reader.Read()
> 
> However, with the reader api the root element is not recognized and the 
> default attribute is not set:
> 
> Element ‚{http://www.w3schools.com}note‘: No matching global declaration 
> available for the validation root.
> 
> As the schema is validated properly in the first code I believe the schema is 
> ok.
> 
> So my questions are:
> * Which api shall I use to make use of the default values?

  I don't think the toolkit has the support in XML schemas to populate default
values back in the tree.

> * Shall I try in C instead of Python?
> * Is there a link which helps me? I spent two days googling without success :(

  and that explain why,

> Thanks a lot!

   sorry,

Daniel
> Fabian
> 
> 
> 


> 
> 
> 


> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] How to use c14n features?

2016-03-16 Thread Daniel Veillard
On Tue, Mar 15, 2016 at 05:06:13AM +, Tae-In Kim wrote:
> Hi,
> 
> I'm in first use of libxml2 and want to use c14n features in "c14n.h". I
> tried to find some references to use them but couldn't make it.
> Can you please tell me where to get it or help me to use it?

  Look at the code for xmllint.c in the source and around line 2573
for one way to save. If xmllint --c14n does what you want you can just
copy the code

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] [PATCH] python 3 bindings call "decode" on "str" object

2016-03-11 Thread Daniel Veillard
On Mon, Jan 18, 2016 at 01:01:40PM +0100, Michael Stahl wrote:
> with python3-libxml2-2.9.3-2.fc23.x86_64 RPM i get this exception:
> 
> > Traceback (most recent call last):
> >   File "/usr/lib64/python3.4/threading.py", line 920, in _bootstrap_inner
> > self.run()
> >   File "/data/lo/master/bin/get-bugzilla-attachments-by-mimetype", line 
> > 515, in run
> > get_through_rss_query(uri, mimetype, prefix, extension)
> >   File "/data/lo/master/bin/get-bugzilla-attachments-by-mimetype", line 
> > 264, in get_through_rss_query
> > process(query, True, get_file_bz_ids(files, prefix))
> >   File "/data/lo/master/bin/get-bugzilla-attachments-by-mimetype", line 
> > 226, in process
> > d = feedparser.parse(url)
> >   File "/usr/lib/python3.4/site-packages/feedparser.py", line 3957, in parse
> > saxparser.parse(source)
> >   File "/usr/lib64/python3.4/site-packages/drv_libxml2.py", line 189, in 
> > parse
> > eltName = (_d(reader.NamespaceUri()),\
> >   File "/usr/lib64/python3.4/site-packages/drv_libxml2.py", line 70, in _d
> > return _decoder(s)[0]
> >   File "/usr/lib64/python3.4/encodings/utf_8.py", line 16, in decode
> > return codecs.utf_8_decode(input, errors, True)
> > TypeError: 'str' does not support the buffer interface
> 
> looks like python/types.c actually creates Unicode str that don't
> benefit from decoding:

  Ah yes the SAX example driver is not something I checked after adding python3
support, pushed:

  
https://git.gnome.org/browse/libxml2/commit/?id=65112cb36aa56bb27697c38ff52c1489cc21cba5


  thanks !

Daniel

> > #define PY_IMPORT_STRING PyUnicode_FromString

> >From d44c6c1bbaced5f41b00e54a256e11bc098f2639 Mon Sep 17 00:00:00 2001
> From: Michael Stahl <mst...@redhat.com>
> Date: Mon, 18 Jan 2016 12:46:41 +0100
> Subject: [PATCH] python 3: libxml2.c wrappers create Unicode str already
> 
> ... so stop decoding these, which only results in
> "TypeError: 'str' does not support the buffer interface".
> ---
>  python/drv_libxml2.py | 18 ++
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/python/drv_libxml2.py b/python/drv_libxml2.py
> index c2ec3e2..71b1c67 100644
> --- a/python/drv_libxml2.py
> +++ b/python/drv_libxml2.py
> @@ -44,8 +44,18 @@ if sys.version_info[0] < 3:
>  __author__  = codecs.unicode_escape_decode(__author__)[0]
>  
>  StringTypes = (str, unicode)
> +# libxml2 returns strings as UTF8
> +_decoder = codecs.lookup("utf8")[1]
> +def _d(s):
> +if s is None:
> +return s
> +else:
> +return _decoder(s)[0]
>  else:
>  StringTypes = str
> +# s is Unicode `str` already
> +def _d(s):
> +return s
>  
>  from xml.sax._exceptions import *
>  from xml.sax import xmlreader, saxutils
> @@ -61,14 +71,6 @@ from xml.sax.handler import \
>   property_dom_node, \
>   property_xml_string
>  
> -# libxml2 returns strings as UTF8
> -_decoder = codecs.lookup("utf8")[1]
> -def _d(s):
> -if s is None:
> -return s
> -else:
> -return _decoder(s)[0]
> -
>  try:
>  import libxml2
>  except ImportError:
> -- 
> 2.5.0
> 

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] VC10\config.h and include\win32config.h

2016-03-11 Thread Daniel Veillard
On Mon, Mar 07, 2016 at 02:15:28PM -0800, Peter Kasting wrote:
> I echo Bruce's request for a single upstream Windows config file.  It looks
> like include/win32config.h is older; win32/VC10/config.h seems to have only
> its initial addition in its log.  It looks like that addition happened here:
> 
> https://git.gnome.org/browse/libxml2/commit/?id=066c69777207436e3517d1b930a97f0e0a8aa060
> 
> This seems to have been a convenience for
> https://bugzilla.gnome.org/show_bug.cgi?id=666491 (see
> https://bugzilla.gnome.org/show_bug.cgi?id=666491#c3 , "This is a different
> and more convenient approach to libxml2 usage, than the nmake approach"),
> but it's not clear to me that libxml wants to do this sort of thing.  In
> https://bugzilla.gnome.org/show_bug.cgi?id=666491#c5 , Daniel notes "Adding
> a VC10 subdir under win32 is a bit heavy, I hope there won't be a new one
> for each new version of the Microsoft tools."  Those fears seem to me to be
> somewhat confirmed; because Microsoft has changed things about the project
> format, I believe the .vcxproj files in this directory wouldn't serve
> directly for all later versions of MSVC.  So this is really a "Visual
> Studio 2010 only" directory.

  

> To me, this whole directory should be nuked, and include/win32config.h
> updated (see my notes below).  People using this directory should either
> carry their own project/build files (as Chromium does) or use the existing
> nmake method. libxml2 shouldn't be responsible for carrying this sort of
> thing, especially when it's for one version of one compiler on one platform.

  I never use Windows, so really can't comment on the *right* approach there

> Another possibility is for this directory to remain, and further
> directories be added for other MSVC versions (which seems unappealing).

  instead of having code rot in one directory we would have multiple
version rotting in multiple directories, unappealing indeed !

> In any case, I think win32config.h should be updated; see below for my
> responses to Bruce's comments about the differences between the configs.

  Sure, if people who are using the Windows platform could comment
I will follow what people suggest, 

so feedback welcome !

Daniel

> On Mon, Mar 7, 2016 at 1:47 PM, Bruce Dawson <brucedaw...@google.com> wrote:
> 
> > #define HAVE_STDINT_H
> >
> 
> I believe this line is correct for MSVC 2010+.  If libxml doesn't support
> anything earlier, then that line should be in win32config.h as-is.
> Otherwise, it should probably be in but with an appropriate _MSC_VER check.
> 
> #define SEND_ARG2_CAST
> > #define GETHOSTBYNAME_ARG_CAST
> >
> 
> I think these must be defined if nano{http,ftp}.* are built.  If these are
> ever built on Windows, win32config.h should include these lines.
> 
> PK

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2016-03-11 Thread Daniel Veillard
On Tue, Mar 08, 2016 at 12:30:45PM +0100, Michael Stahl wrote:
> On 08.03.2016 12:27, Michael Stahl wrote:
> > On 07.03.2016 22:46, Bruce Dawson wrote:
> >>
> >> It would be great to get that same patch in libxml2, and other
> >> developers will need it if they use VC10\config.h.
> > 
> > it looks like release 2.9.3 already includes this fix, i've had to
> > remove a similar patch when upgrading LibreOffice's bundled copy :)
> 
> oops - i should have read your other mail first :)
> 
> the include/win32config.h has the fix, but the win32/VC10/config.h
> (which i didn't even know existed) does not.

  Okay, for now I pushed the change (I have no way to test this TBH)

https://git.gnome.org/browse/libxml2/commit/?id=dfbacd4f417cb0f4b9bef3ff205bf95cb73c5717

   thanks !

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] possible race condition

2015-12-18 Thread Daniel Veillard
On Fri, Dec 18, 2015 at 03:59:23PM +0800, Daniel Veillard wrote:
> On Wed, Dec 16, 2015 at 11:27:11PM +0400, Hovnatan Karapetyan wrote:
> > Hi,
> > 
> > To my question on possible non thread-safe code in libxml2 on stackoverflow
> > (
> > http://stackoverflow.com/questions/34007044/libxml2-multithreading-errors-in-helgrind)
> > I got a reply that there is indeed a race condition at
> > https://git.gnome.org/browse/libxml2/tree/catalog.c#n1634. Could anyone
> > please confirm this?
> 
>   The catalogs are indeed build progressively, doing it upfront on any XML
> processing would add a huge burden to any parsing. Building it progressively
> looks indeed racy, but I tried very hard to avoid any issue with it there
> is even a test designed explicitely for this look for testThreads.c in the
> source code, it does test multithreaded building of the catalog to make sure
> there is no leak or building issues in practice.
>   Now if someone has a reproducer with an issue related to that code
> I'm interested but just saying "an automated tool told me there is a race here
> but I don't know why, how and if there is side effects" means possibly
> wasting a lot of time fo a non-issue.
> 
>   Testthreads should be part of running make check though somehow it
> seems to have fallen through the cracks, I'm re-adding it,

  BTW for feedback on bugoverflow, yes there is a race but we don't
care, it's about catching recursions, and say that the threshold is
100, we may miss it when reaching depth of 100 but since it's recusive
we will hit 101 and the problem will be caught anyway, just one iteration
later so no it's not worth putting a gard there,

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] possible race condition

2015-12-17 Thread Daniel Veillard
On Wed, Dec 16, 2015 at 11:27:11PM +0400, Hovnatan Karapetyan wrote:
> Hi,
> 
> To my question on possible non thread-safe code in libxml2 on stackoverflow
> (
> http://stackoverflow.com/questions/34007044/libxml2-multithreading-errors-in-helgrind)
> I got a reply that there is indeed a race condition at
> https://git.gnome.org/browse/libxml2/tree/catalog.c#n1634. Could anyone
> please confirm this?

  The catalogs are indeed build progressively, doing it upfront on any XML
processing would add a huge burden to any parsing. Building it progressively
looks indeed racy, but I tried very hard to avoid any issue with it there
is even a test designed explicitely for this look for testThreads.c in the
source code, it does test multithreaded building of the catalog to make sure
there is no leak or building issues in practice.
  Now if someone has a reproducer with an issue related to that code
I'm interested but just saying "an automated tool told me there is a race here
but I don't know why, how and if there is side effects" means possibly
wasting a lot of time fo a non-issue.

  Testthreads should be part of running make check though somehow it
seems to have fallen through the cracks, I'm re-adding it,

thanks,

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Parsing big xml data received by chunks from libcurl

2015-12-02 Thread Daniel Veillard
On Tue, Dec 01, 2015 at 05:11:52PM +, David Boucher wrote:
> Hi the list,
> 
> I use libcurl to get a big chunk of xml data.
> 
> In the CURLOPT_WRITEFUNCTION call back, I have a piece of memory with xml
> data.
> 
> The first time this callback is executed, we call xmlReaderNewMemory().
> Then we call xmlTextReaderRead() while the result is 1.
> 
> The XML being splitted, the loop finishes to fail because it needs
> following datas...
> 
> Thanks to xmlTextReaderByteConsumed, we are able to get data already read
> and then the piece of data not read.
> 
> The next time the callback is called, we are able to build a new buffer
> containing :
> * datas not already read from the previous call
> * new data from the new call.
> 
> My problem is here. I'm looking for a function that could change the buffer
> to read to continue to parse xml data. I have tried xmlReaderNewMemory(),
> but it fails...
> 
> Maybe a such function does not exist, and maybe this idea to read different
> buffers of a same xml is a bad idea.
> 
> Is there a better way ? What are your advices ?

  Err you want to use the push parser when you don't have all data available
at parser creation time.

  Get the xmllint.c program look at the code in parseAndPrintFile
which handle the push testing case, it does something  like

res = fread(chars, 1, 4, f);
if (res > 0) {
ctxt = xmlCreatePushParserCtxt(NULL, NULL,
chars, res, filename);
xmlCtxtUseOptions(ctxt, options);
while ((res = fread(chars, 1, size, f)) > 0) {
xmlParseChunk(ctxt, chars, res, 0);
}
xmlParseChunk(ctxt, chars, 0, 1);
doc = ctxt->myDoc;
ret = ctxt->wellFormed;
xmlFreeParserCtxt(ctxt);
if (!ret) {
xmlFreeDoc(doc);
doc = NULL;

  You create the parser context with first 4 bytes of your stream,
define which options you want to use, and then xmlParseChunk( ... 0)
for each part until you reach the end where you do xmlParseChunk( ... 1)

Daniel

> Thanks a lot.
> Regards.
> David.

> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Release of libvirt-2.9.3

2015-11-20 Thread Daniel Veillard
  This is a security release, I didn't tried to push a number of other
patches considering urgency.

  That release is dedicated to the memory of Bill Brack who was my
co-maintainer for many years on libxml2 and libxslt, we became friends,
he has a huge influence still on way I do things. Unfortunately he passed
away last February. I'm sure he would have commented that celebrating
his legacy with a release with so many CVE would be a tribute to his
programming skills, because he always approached life with a sense of
humor. RIP Bill, the code still lives but OpenSource is more about
people than code !

  So yes that release is packed with Security and ugly bugs fixes,
more than overall improvements, I have put signed tarballs and rpms
to the usual place at 

   ftp://xmlsoft.org/libxml2/

 Update is strongly suggested !

Security:
- CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport)
- CVE-2015-7500 Fix memory access error due to incorrect entities boundaries 
(Daniel Veillard)
- CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard)
- CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard)
- CVE-2015-5312 Another entity expansion issue (David Drysdale)
- CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David 
Drysdale)
- CVE-2015-7498 Avoid processing entities after encoding conversion failures 
(Daniel Veillard)
- CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard)
- CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel 
Veillard)
- CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel 
Veillard)
- CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard)
- CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard)
- CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard)

Documentation:
- Correct spelling of "calling" (Alex Henrie)
- Fix a small error in xmllint --format description (Fabien Degomme)
- Avoid XSS on the search of xmlsoft.org (Daniel Veillard)

Portability:
- threads: use forward declarations only for glibc (Michael Heimpold)
- Update Win32 configure.js to search for configure.ac (Daniel Veillard)
- os400: lot of docs fixes and mprovements (Patrick Monnerat)

Bug Fixes:
- Bug on creating new stream from entity (Daniel Veillard)
- Fix some loop issues embedding NEXT (Daniel Veillard)
- Do not print error context when there is none (Daniel Veillard)
- Avoid extra processing of MarkupDecl when EOF (Hugh Davenport)
- Fix parsing short unclosed comment uninitialized access (Daniel Veillard)
- Add missing Null check in xmlParseExternalEntityPrivate (Gaurav Gupta)
- Fix a bug in CData error handling in the push parser (Daniel Veillard)
- Fix a bug on name parsing at the end of current input buffer (Daniel Veillard)
- Fix the spurious ID already defined error (Daniel Veillard)
- Fix previous change to node sort order (Nick Wellnhofer)
- Fix a self assignment issue raised by clang (Scott Graham)
- Fail parsing early on if encoding conversion failed (Daniel Veillard)
- Do not process encoding values if the declaration if broken (Daniel Veillard)
- Silence clang's -Wunknown-attribute (Michael Catanzaro)
- xmlMemUsed is not thread-safe (Martin von Gagern)
- Fix support for except in nameclasses (Daniel Veillard)
- Fix order of root nodes (Nick Wellnhofer)
- Allow attributes on descendant-or-self axis (Nick Wellnhofer)
- Fix the fix to Windows locking (Steve Nairn)
- Fix timsort invariant loop re: Envisage article (Christopher Swenson)
- Don't add IDs in xmlSetTreeDoc (Nick Wellnhofer)
- Account for ID attributes in xmlSetTreeDoc (Nick Wellnhofer)
- Remove various unused value assignments (Philip Withnall)
- Fix missing entities after CVE-2014-3660 fix (Daniel Veillard)
- Revert "Missing initialization for the catalog module" (Daniel Veillard)

Improvements:
- Reuse xmlHaltParser() where it makes sense (Daniel Veillard)
- Add xmlHaltParser() to stop the parser (Daniel Veillard)
- xmlStopParser reset errNo (Daniel Veillard)
- Reenable xz support by default (Daniel Veillard)
- Recover unescaped less-than character in HTML recovery parsing (Daniel 
Veillard)
- Allow HTML serializer to output HTML5 DOCTYPE (Shaun McCance)
- Regression test for bug #695699 (Nick Wellnhofer)
- Add a couple of XPath tests (Nick Wellnhofer)
- Add Python 3 rpm subpackage (Tomas Radej)
- libxml2-config.cmake.in: update include directories (Samuel Martin)
- Adding example from bugs 738805 to regression tests (Daniel Veillard)

  Thanks everybody for contributions to this release,
I know there is a lot of other non-security oriented patches floating
around, now that is mostly off my back, I will start looking at
those. Reminders on the list may be helpful !

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtuali

Re: [xml] Release of libvirt-2.9.3

2015-11-20 Thread Daniel Veillard
On Fri, Nov 20, 2015 at 02:17:38PM +0200, Shlomi Fish wrote:
> Hi Daniel and all,

  Heya,

> On Fri, 20 Nov 2015 18:17:56 +0800
> Daniel Veillard <veill...@redhat.com> wrote:
> 
> >   This is a security release, I didn't tried to push a number of other
> > patches considering urgency.
> > 
> >   That release is dedicated to the memory of Bill Brack who was my
> > co-maintainer for many years on libxml2 and libxslt, we became friends,
> > he has a huge influence still on way I do things. Unfortunately he passed
> > away last February. I'm sure he would have commented that celebrating
> > his legacy with a release with so many CVE would be a tribute to his
> > programming skills, because he always approached life with a sense of
> > humor. RIP Bill, the code still lives but OpenSource is more about
> > people than code !
> 
> RIP Bill! Sorry to hear about his death. And I enjoyed reading this paragraph
> dedicated to his memory.
> 
> 
> 
> That put aside:
> 
> 1. The Subject line says "libvirt" instead of "libxml2".

  I'm doing upstream releases for libvirt every month, Pavlov in action,
sorry about that, yes it's definitely a libxml2-2.9.3 release

> 2. I have packaged and submitted libxml2-2.9.3 for Mageia Linux Cauldron. So 
> it
> should appear in its repositories soon. Seems like all of our downstream
> patches were no longer necessary.

  Ack, thanks to all downstream packagers to push that down to users !

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


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

2015-11-10 Thread Daniel Veillard
On Tue, Nov 10, 2015 at 05:34:45PM -0800, Bruce Dawson wrote:
> Sure. I'll do that.

  okay, thanks

> On old architectures it would be easy enough to use a typedef to 'create'
> intptr_t, so any compatibility problems that such a patch introduces will
> be easily fixed.

  the problem is to know when that type is not defined, will require some
configure.ac magic I'm afraid

Daniel

> On Tue, Nov 10, 2015 at 5:32 PM, Daniel Veillard <veill...@redhat.com>
> wrote:
> 
> > On Tue, Nov 10, 2015 at 01:04:51PM -0800, Bruce Dawson wrote:
> > > Resending now that I've joined the mailing list...
> > >
> > > While building 64-bit Chromium with VC++ 2015 Update 1 I noticed a
> > > significant number of pointer truncation warnings in libxml, especially
> > in
> > > xpath.c. A typical warning is:
> > >
> > > warning C4311: 'type cast': pointer truncation from 'xmlChar *' to 'long'
> > >
> > > which triggers on the last two lines of this block:
> > >
> > > case XML_ELEMENT_NODE:
> > > if (node2->type == XML_ELEMENT_NODE) {
> > > if ((0 > (long) node1->content) && /* TODO: Would a != 0 suffice here? */
> > > (0 > (long) node2->content) &&
> > >
> > > The intent is not entirely clear but if these are supposed to be NULL
> > > checks then they could easily give the wrong result. In the VC++ world
> > > 'long' is always a 32-bit type, so converting a pointer to a long both
> > > throws away the top 32 bits and also makes it a signed type. That means
> > > that pointers to the first 2 GB of address space will behave as expected,
> > > and pointers beyond that will have a 50% chance of behaving incorrectly!
> > >
> > > Another example is these two conversions. The code is apparently trying
> > to
> > > sort by content address, but on 64-bit Windows builds it will just be
> > > sorting by the bottom 32 bits of the content address.
> > > l1 = -((long) node1->content);
> > > l2 = -((long) node2->content);
> > > if (l1 < l2)
> > >return(1);
> > > if (l1 > l2)
> > >return(-1);
> > > }
> > >
> > > This is not a problem with gcc or clang because their 64-bit builds have
> > > 64-bit long, but the C/C++ standard do not mandate and that is not the
> > case
> > > with VC++.
> > >
> > > I think that the correct type would be ptrdiff_t, or size_t, or intptr_t,
> > > or uintptr_t. I've attached the full set of warnings in case that is of
> > any
> > > assistance. Even though some of these warnings do not indicate actual
> > bugs
> > > it would still be best to use the correct type in order to avoid
> > confusion
> > > and warnings.
> > >
> >
> >   Sounds like intptr_t would be the proper type to use for those, I just
> > wonder what kind of old arches will break if they don't have it.
> >
> > Can you come up with a patch which just change the casts and possibly the
> > target
> > types ?
> >
> > Daniel
> >
> > --
> > Daniel Veillard  | Open Source and Standards, Red Hat
> > veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> > http://veillard.com/ | virtualization library  http://libvirt.org/
> >
> 
> 
> 
> -- 
> Bruce Dawson

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Continuous integration for libxml2?

2015-10-21 Thread Daniel Veillard
On Wed, Oct 21, 2015 at 08:11:47AM +0100, David Drysdale wrote:
> On Fri, Oct 16, 2015 at 2:41 PM, Daniel Veillard <veill...@redhat.com> wrote:
> > On Fri, Oct 16, 2015 at 02:06:30PM +0100, David Drysdale wrote:
> >> Hi folks,
> >
> >   Hi David,
> >
> >> Does libxml2 have a continuous integration system running over it 
> >> somewhere?
> >
> >  Not that I know of :)
> > TBH the rate of changes is fairly slow, i.e. the code is mature (some
> > will call it overripe even !) and while there is bugs, compared to the
> > size of the system it's relatively small.
> >
> >> I've recently been exploring continuous integration systems and I used
> >> libxml2 as a guinea pig for getting various tools working in
> >> combination.  Specifically, I've got a GitHub clone [1] of the repo
> >> that links in with Travis [2]; once I added a few small local fixes
> >> [3], I got the tests running on {gcc,clang} x {linux,osx} plus ASAN,
> >> UBSAN and coverage [4] runs.
> >
> >   The biggest issue I have is non-linux, I never use Windows or Macs
> > and I have zero clue that a change there could break the build or else.
> > There are mingw builds of libxml2 done within Red Hat but that's not
> > real Windows tests.
> 
> The Travis builds do at least add OSX testing, which was fairly
> straightforward to set up (I disabled the EBCDIC test file because
> the iconv() on OSX doesn't include EBCDIC support).

  Okay

> I imagine a Windows build would a lot more effort to get automated,
> if/when Travis add support for it...

  as suggested you could tru to build with mingw, but for the actual
regression testing, that's another story indeed

> >> Looking at recent bugs, it seems like a couple of other people (Hugh
> >> Davenport [5], Hanno Boeck [6]) have also been looking at
> >> sanitizer-related things.
> >
> >   Yes, I also get Coverity Scan reports about it.
> >
> >> So I wondered if the master libxml2 repo already has a continuous
> >> build pointed at it (the Gnome continuous build system [7], maybe?),
> >
> >   No not that know of
> >
> >> and, if so, whether it might be a good idea to turn on various
> >> analysis tools to help catch future problems.
> >>
> >> Thoughts?
> >
> >   Sure, the rate of changes is fairly slow though:
> > https://git.gnome.org/browse/libxml2/
> >
> > But getting a report if something breaks on commit there would be 
> > appreciated
> > as long as there is some logic to avoid pestering the list repeatedly with
> > the same issue. That was a very painful experience on the very early 
> > versions
> > of Coverity for example,
> 
> I believe the default Travis behaviour is to send email
>  - to the commit author and committer
>  - when a commit arrives for which the build is broken
>  - and when a commit fixes a previously-broken build.
> (http://docs.travis-ci.com/user/notifications/)
> 
> As the whole process is commit-triggered, there shouldn't be too many
> notifications (given that the rate of changes is low) -- but it does continue
> to pester on each commit until a build break gets fixed.
> 
> How about I set up (for the time being) a cron job to do the following:
>  - fetch from the master repo
>  - merge into my testing branch
>  - push to GitHub...
>  - triggering a Travis build.
> 
> I *think* that should result in any email notifications from Travis going
> to me, because I'll be the committer for the merge commit -- but please
> let me know if the process inadvertently spams anyone!

  may be I should get the SPAM. I wonder if there is a fedmsg backend for travis
as getting those message over IRC might be a nice solution rather than mail

  http://www.fedmsg.com/en/latest/

> If that goes well and is helpful, we can then talk later about whether/how
> to migrate to the master repo.
> 
> Sound OK?


   yes,

thanks !

Daniel

> Thanks,
> David
> 
> > Daniel
> >
> >>
> >> Thanks,
> >> David
> >>
> >> [1] https://github.com/daviddrysdale/libxml2
> >> [2] https://travis-ci.org/daviddrysdale/libxml2
> >> [3] https://github.com/daviddrysdale/libxml2/commits/test
> >> [4] https://coveralls.io/github/daviddrysdale/libxml2
> >> [5] https://bugzilla.gnome.org/show_bug.cgi?id=756372
> >> [6] https://bugzilla.gnome.org/show_bug.cgi?id=752191
> >> [7] http://build.gnome.org/
> >> ___
> >> xml mailing list, project page  http://xmlsoft.org/
> >> xml@gnome.org

Re: [xml] xmlReadFile Fails Where xmlParseFile Succeeds

2015-10-16 Thread Daniel Veillard
On Mon, Jul 27, 2015 at 02:38:23PM -0400, Paul Braman wrote:
> The following bit of code fails
> 
> xmlInitParser();
> xmlDocPtr maindoc = xmlReadFile("maindoc.xml", NULL, 0);
> xmlDocPtr subdoc = xmlReadFile("subdoc.xml", NULL, 0);
> xmlNodePtr content = xmlDocGetRootElement(subdoc);
> xmlUnlinkNode(content);
> xmlAddChild(xmlDocGetRootElement(maindoc), content);
> xmlFreeDoc(subdoc);
> xmlFreeDoc(maindoc);
> xmlCleanupParser();
> 
> 
> with a crash upon calling xmlFreeDoc(maindoc) (problem freeing memory)
> where this code succeeds just fine and dandy
> 
> xmlInitParser();
> xmlDocPtr maindoc = xmlParseFile("maindoc.xml");
> xmlDocPtr subdoc = xmlParseFile("subdoc.xml");
> xmlNodePtr content = xmlDocGetRootElement(subdoc);
> xmlUnlinkNode(content);
> xmlAddChild(xmlDocGetRootElement(maindoc), content);
> xmlFreeDoc(subdoc);
> xmlFreeDoc(maindoc);
> xmlCleanupParser();
> 
> 
> I understand I should use xmlReadFile instead of xmlParseFile. However, I
> can't figure on what's different between the two that could be causing the
> crash in the first block of code?
> 
> Note, I've tried with multiple versions, even 2.9.2.
> 
> Alternatively, how *should* I be structuring the code to do what I'm doing
> here? (I know a call to
> 
> xmlAddChild(xmlDocGetRootElement(maindoc),
> xmlCopyNode(xmlDocGetRootElement(subdoc), 1));
> 
> 
> in place of the get/unlink/add sequence works but I'd like to understand
> why the code above fails.)

  the problem is dictionaries. the Read* function boost the processing speed
by using a dictionary for all the strings in markup etc. The dictionary is
allocated to the document. when moving content you have pointers from that
part of the subdoc to subdoc dictionary which get pruned to maindoc using
a different dictionary. When trying to free the reference to the local document
dictionary is lost, libxml2 then tries to free the strings from subdoc
dictionary and that fails.
  2 ways around that:

  Option 1: disable dictionaries when parsing if you do that kind of copy
 paste between documents (XML_PARSE_NODICT option see parser.h)

  Option 2: do the tweaking so that all the files get parsed  with the same
 dictionary shared by all documents, more complex, libxslt does that for
 example, I don't have a simple document explaining it unfortunately.

Daniel

> _______
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml


-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Compiling libxml2 against musl

2015-10-16 Thread Daniel Veillard
On Tue, Dec 09, 2014 at 09:35:16PM +0100, Michael Heimpold wrote:
> Hi,

  Hi Michael, (a bit late :-\)

> I'm maintaining the libxml2 package on OpenWrt. Some weeks ago, there was a 
> bug filed
> against the package, regarding a failure to compile libxml2 against musl c 
> library.
> See https://github.com/openwrt/packages/issues/454
> 
> There is also a reference to your bug tracker:
> https://bugzilla.gnome.org/show_bug.cgi?id=704908

  right, closing it

> And a link to a potential fix for this:
> http://git.alpinelinux.org/cgit/aports/tree/main/libxml2/libxml2-pthread.patch
> 
> Would be nice, if you could give some feedback, e.g. whether the proposed 
> patch
> could be considered.

  if there was a __MUSL__ macro defined we could have used that
but the http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
means that we deactivate for all non Glibc libs on Linux because of their
stance.

  In any case the current git head seems to carry that patch,

   thanks,

Daniel
> Thanks,
> Michael
> 
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] v2.9.2 regression when using absolute paths without file: scheme in catalog?

2015-10-16 Thread Daniel Veillard
On Fri, Mar 27, 2015 at 09:58:59AM +0100, Matthias Pigulla wrote:
> Sorry for submitting a semi-finished message :(
> 
> 
> What I wanted to say was - can anyone tell me whether this is a regression
> in 2.9.2 or should I look for help in other places (which)?
> 
> Thanks a lot
> Matthias 

  Hi Matthias,

someone else reported catalog issues (but on Windows when switching to 2.9.2).
I guess one would have to bissect to find the guilty commit, that would help
understanding if it's really intended or a broken side effect,

 thanks

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] HTMLtree.c escapes braces

2015-10-16 Thread Daniel Veillard
On Thu, Sep 24, 2015 at 10:12:25PM +, Bruce Sinclair wrote:
> Hi Daniel,
> 
> We have had the issue that libxml2 encodes curly braces as character 
> references in HTML output because of the following code in HTMLtree.c:
> 
>escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+");
>if (escaped != NULL) {
> xmlBufferWriteQuotedString(buf->buffer, escaped);
> xmlFree(escaped);
> } else {
> xmlBufferWriteQuotedString(buf->buffer, value);
> }
> 
> We don't think the curly braces, "{" and "}", should be changed to character 
> references.  Doing so causes a problem with the use of braces in a Server 
> Response File (SRF) generated with libxml2.  We change the first line of the 
> above code to:
> 
>escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+{}");
> 
> to eliminate this issue.  Could this be accepted as a fix to libxml2?
> 

  Hi Bruce,

  I don't understand, that code is in attribute content escaping, and
for me "{" and "}" are not escaped:

thinkpad2:~/XML -> cat ./tst.html





thinkpad2:~/XML -> ./xmllint --html ./tst.html
http://www.w3.org/TR/REC-html40/loose.dtd;>





thinkpad2:~/XML -> 

Please provide a reproducer with xmllint so I understand what is going on,

  thanks,

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] How do I go about adding missing entities to libxml2?

2015-10-16 Thread Daniel Veillard
On Tue, Aug 04, 2015 at 05:59:11PM +1000, Sam Saffron wrote:
> We have a bunch of missing entities (that flows through to other libs
> like nokogiri ruby gem)
> 
> for example 
> https://meta.discourse.org/t/certain-unicode-entities-are-being-escaped/19898
> 
> What do I need to do to get them into libxml2 ?

  you get them in a DTD referenced and loaded by your document. It's not
an XML predefined entity so your document has to define what it means

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] indentation (again!)

2015-10-16 Thread Daniel Veillard
  Hi Bruce,

On Sat, Jul 25, 2015 at 08:12:39AM -0400, Bruce Miller wrote:
> Hi all;
>   I find unindented XML to be virtually impossible
> to debug, but...
  
  :-)

> Frankly, I'm impressed at how good the built-in heuristic
> for formatting works (apparently the rule is: once it sees
> mixed content, it turns off indentation below that level).
> Of course, it isn't "correct" and is occasionally giving me
> really messy problems.
> 
> In principle, and perhaps naively, it seems the Correct rule
> is rather simple, provided you have access to the DTD/Schema/whatever.

 The only correct rule is if there is a character on input it goes
on output, the indentation is a trick but not what the standard suggests

> Namely, if an element allows mixed content, do not add whitespace.
> (and you CAN apply indentation on descendants that do NOT allow mixed
> content).
> 
> Is there some switch or method that I'm overlooking to
> achieve this effect?

  no, indeed this would make sense ... assuming you have a schemas, etc...
but when you serialize a document while the DTD *might* be available
you can't really find out he RNG or XSD associated (or trust them, download
them, etc) it open a can of worm TBH.

> Is this likely to be relatively easy
> to implement? (I've managed to avoid learning libxml2's C API,
> as I use it via Perl's XML::LibXML.)
> 
> I'd hate to have to give up indentation or write
> my own serializer

  have you looked at xmllint --pretty 2

it does pretty printing but without adding (or removing) any significant
character, it uses only the non-significant spaces  from within markup
which are discarded at parsing time.

  I know it's not what you asked for but might still be useful :-)

Daniel

> Thanks;
> bruce
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


  1   2   3   4   5   6   7   8   9   10   >