#!/usr/bin/perl use warnings; use strict; use Test::More tests => 1; use XML::LibXML; use XML::LibXSLT; my $source = XML::LibXML->load_xml(string => <<'__END_XML__'); <?xml version="1.0" encoding="UTF-8"?> <r xmlns="http://1.net/ns0"/> __END_XML__ my $style_doc = XML::LibXML->load_xml(string => <<'__END_XML__'); <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://1.net/ns1" > <xsl:template match="*"> <xsl:element name="{name()}"> </xsl:element> </xsl:template> </xsl:stylesheet> __END_XML__ my $style = XML::LibXSLT->new->parse_stylesheet($style_doc); is($style->transform($source)->toString, <<'__END_XML__', 'Namespace c +hanged'); <?xml version="1.0"?> <r xmlns="http://1.net/ns1"/> __END_XML__
In other words, the transformation should only change the namespace of the element. On the affected machines, though, the namespace is changed to the empty one.
The affected 64 bit machine has the following configuration:
| libxml2 | 20900 |
| libxslt | 10127 |
| XML::LibXML | 2.0014 |
| XML::LibXSLT | 1.80 |
| perl | strawberry 5.14.3 for MSWin32-x86-multithread |
It seems as a bug in XML::LibXSLT or its underlying C libraries, but their tests are not failing. Can anyone help me understand the cause of the bug?
Update: Noticed the second failing machine.
In reply to XML::LibXSLT ignoring namespace on some Win32 machines by choroba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |