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

Hi all,

sorry for the late response and thanks for the investigation.

On Fri, 14 Feb 2014 17:25:40 +0100
Nick Wellnhofer <wellnhofer aevum de> wrote:

On 14/02/2014 15:23, Yura wrote:

I tried investigate this bug and as far I can see problem in a different
behavior of the function xmlNodeGetSpacePreserve from libxml2.

Good catch. The change you mentioned above made libxslt actually do the wrong 
thing and strip the text node. The relevant code is here:

xmlNodeGetSpacePreserve is called with a text node and consequently returns
-1 after the change. The relevant commit to libxml2 is "Adding various checks
on node type though the API":

This commit first appears in libxml2 version 2.9.0. I just committed a fix to 
libxslt to adjust for this change:

OK, but I don't understand whether I have done something wrong in my XSLT
stylesheet or alternatively whether it is a bug or an impedance-mismatch
between libxml2 and libxslt. I'll try running the offending code in Perl with
the latest git versions of libxml2 and libxslt, but I'd like to be sure. One of
my problems is that I didn't quite understand the technical details and
explanation that were discussed here (as I read the Zvon XSLT tutorial in the
past, but have not read a more comprehensive book or a SPEC, and furthermore,
have forgotten a lot of details).

Can you enlighten me, please?

Hope you had a good weekend.


        Shlomi Fish 

Shlomi Fish
Beginners Site for the Vim text editor -

Only perl and Chuck Norris can parse Perl.

Please reply to list if it's a mailing list post - .

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]