commit perl-XML-XPath for openSUSE:Factory
Hello community,
here is the log from the commit of package perl-XML-XPath for openSUSE:Factory checked in at 2016-01-23 01:14:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XML-XPath (Old)
and /work/SRC/openSUSE:Factory/.perl-XML-XPath.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-XML-XPath"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-XML-XPath/perl-XML-XPath.changes 2016-01-17 09:23:02.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-XML-XPath.new/perl-XML-XPath.changes 2016-01-23 01:15:33.000000000 +0100
@@ -1,0 +2,21 @@
+Wed Jan 20 10:57:03 UTC 2016 - coolo@suse.com
+
+- updated to 1.24
+ see /usr/share/doc/packages/perl-XML-XPath/Changes
+
+ 1.24 2016-01-19 MANWAR
+ - Fixed issue RT# 111278 (XML::XPath::PerlSAX doesn't compile).
+
+-------------------------------------------------------------------
+Tue Jan 19 10:40:24 UTC 2016 - coolo@suse.com
+
+- updated to 1.23
+ see /usr/share/doc/packages/perl-XML-XPath/Changes
+
+ 1.23 2016-01-18 MANWAR
+ - Fixed issues RT# 6363 (using < in a query returns results as if <= had been used).
+
+ 1.22 2016-01-13 MANWAR
+ - Fixed issues RT# 30818 and RT# 80277.
+
+-------------------------------------------------------------------
Old:
----
XML-XPath-1.21.tar.gz
New:
----
XML-XPath-1.24.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-XML-XPath.spec ++++++
--- /var/tmp/diff_new_pack.ewsS2A/_old 2016-01-23 01:15:34.000000000 +0100
+++ /var/tmp/diff_new_pack.ewsS2A/_new 2016-01-23 01:15:34.000000000 +0100
@@ -17,10 +17,10 @@
Name: perl-XML-XPath
-Version: 1.21
+Version: 1.24
Release: 0
%define cpan_name XML-XPath
-Summary: Set of Modules for Parsing and Evaluating Xpath Statements
+Summary: Parse and evaluate XPath statements
License: Artistic-2.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/XML-XPath/
++++++ XML-XPath-1.21.tar.gz -> XML-XPath-1.24.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/Changes new/XML-XPath-1.24/Changes
--- old/XML-XPath-1.21/Changes 2016-01-12 11:37:46.000000000 +0100
+++ new/XML-XPath-1.24/Changes 2016-01-19 12:29:56.000000000 +0100
@@ -1,5 +1,14 @@
Revision history for XML::XPath
+1.24 2016-01-19 MANWAR
+ - Fixed issue RT# 111278 (XML::XPath::PerlSAX doesn't compile).
+
+1.23 2016-01-18 MANWAR
+ - Fixed issue RT# 6363 (using < in a query returns results as if <= had been used).
+
+1.22 2016-01-13 MANWAR
+ - Fixed issues RT# 30818 and RT# 80277.
+
1.21 2016-01-12 MANWAR
- Fixed issues RT# 14957 and RT# 30819.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/MANIFEST new/XML-XPath-1.24/MANIFEST
--- old/XML-XPath-1.21/MANIFEST 2016-01-12 11:38:11.000000000 +0100
+++ new/XML-XPath-1.24/MANIFEST 2016-01-19 12:30:34.000000000 +0100
@@ -27,6 +27,7 @@
lib/XML/XPath/Root.pm
lib/XML/XPath/PerlSAX.pm
lib/XML/XPath/Builder.pm
+t/00load.t
t/01basic.t
t/02descendant.t
t/03star.t
@@ -69,6 +70,9 @@
t/39contains.t
t/40substring_before.t
t/41substring_after.t
+t/42create_node.t
+t/43op_div.t
+t/44test_compare.t
t/rdf.t
t/remove.t
t/insert.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/META.json new/XML-XPath-1.24/META.json
--- old/XML-XPath-1.21/META.json 2016-01-12 11:38:11.000000000 +0100
+++ new/XML-XPath-1.24/META.json 2016-01-19 12:30:34.000000000 +0100
@@ -45,6 +45,6 @@
"web" : "https://github.com/manwar/XML-XPath"
}
},
- "version" : "1.21",
+ "version" : "1.24",
"x_serialization_backend" : "JSON::PP version 2.27203"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/META.yml new/XML-XPath-1.24/META.yml
--- old/XML-XPath-1.21/META.yml 2016-01-12 11:38:11.000000000 +0100
+++ new/XML-XPath-1.24/META.yml 2016-01-19 12:30:34.000000000 +0100
@@ -22,5 +22,5 @@
perl: '5.006'
resources:
repository: https://github.com/manwar/XML-XPath.git
-version: '1.21'
+version: '1.24'
x_serialization_backend: 'CPAN::Meta::YAML version 0.012'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Boolean.pm new/XML-XPath-1.24/lib/XML/XPath/Boolean.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Boolean.pm 2016-01-12 10:47:37.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Boolean.pm 2016-01-19 12:19:30.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Boolean;
-$VERSION = '1.21';
+$VERSION = '1.24';
use XML::XPath::Number;
use XML::XPath::Literal;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Builder.pm new/XML-XPath-1.24/lib/XML/XPath/Builder.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Builder.pm 2016-01-12 10:47:45.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Builder.pm 2016-01-19 12:19:40.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Builder;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Expr.pm new/XML-XPath-1.24/lib/XML/XPath/Expr.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Expr.pm 2016-01-12 10:47:54.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Expr.pm 2016-01-19 12:19:48.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Expr;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
@@ -331,7 +331,7 @@
sub op_le {
my ($node, $lhs, $rhs) = @_;
- op_gt($node, $rhs, $lhs);
+ op_ge($node, $rhs, $lhs);
}
sub op_ge {
@@ -360,31 +360,22 @@
!$rh_results->isa('XML::XPath::NodeSet'))) {
# (that says: one is a nodeset, and one is not a nodeset)
- my ($nodeset, $other);
- my ($true, $false);
if ($lh_results->isa('XML::XPath::NodeSet')) {
- $nodeset = $lh_results;
- $other = $rh_results;
- # we do this because unlike ==, these ops are direction dependant
- ($false, $true) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True);
+ foreach my $node ($lh_results->get_nodelist) {
+ if ($node->to_number->value >= $rh_results->to_number->value) {
+ return XML::XPath::Boolean->True;
+ }
+ }
}
else {
- $nodeset = $rh_results;
- $other = $lh_results;
- # ditto above comment
- ($true, $false) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True);
- }
-
- # True if and only if there is a node in the
- # nodeset such that the result of performing
- # the comparison on <type>(string_value($node))
- # is true.
- foreach my $node ($nodeset->get_nodelist) {
- if ($node->to_number->value >= $other->to_number->value) {
- return $true;
+ foreach my $node ($rh_results->get_nodelist) {
+ if ( $lh_results->to_number->value >= $node->to_number->value) {
+ return XML::XPath::Boolean->True;
+ }
}
}
- return $false;
+
+ return XML::XPath::Boolean->False;
}
else { # Neither is a nodeset
if ($lh_results->isa('XML::XPath::Boolean') ||
@@ -430,31 +421,22 @@
!$rh_results->isa('XML::XPath::NodeSet'))) {
# (that says: one is a nodeset, and one is not a nodeset)
- my ($nodeset, $other);
- my ($true, $false);
if ($lh_results->isa('XML::XPath::NodeSet')) {
- $nodeset = $lh_results;
- $other = $rh_results;
- # we do this because unlike ==, these ops are direction dependant
- ($false, $true) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True);
+ foreach my $node ($lh_results->get_nodelist) {
+ if ($node->to_number->value > $rh_results->to_number->value) {
+ return XML::XPath::Boolean->True;
+ }
+ }
}
else {
- $nodeset = $rh_results;
- $other = $lh_results;
- # ditto above comment
- ($true, $false) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True);
- }
-
- # True if and only if there is a node in the
- # nodeset such that the result of performing
- # the comparison on <type>(string_value($node))
- # is true.
- foreach my $node ($nodeset->get_nodelist) {
- if ($node->to_number->value > $other->to_number->value) {
- return $true;
+ foreach my $node ($rh_results->get_nodelist) {
+ if ( $lh_results->to_number->value > $node->to_number->value) {
+ return XML::XPath::Boolean->True;
+ }
}
}
- return $false;
+
+ return XML::XPath::Boolean->False;
}
else { # Neither is a nodeset
if ($lh_results->isa('XML::XPath::Boolean') ||
@@ -509,6 +491,18 @@
my $lh_results = $lhs->evaluate($node);
my $rh_results = $rhs->evaluate($node);
+ # handle zero devided cases.
+ if ($rh_results->to_number->value == 0) {
+ my $lv = $lh_results->to_number->value;
+ if ($lv == 0) {
+ return XML::XPath::Literal->new('NaN');
+ } elsif ($lv > 0) {
+ return XML::XPath::Literal->new('Infinity');
+ } elsif ($lv < 0) {
+ return XML::XPath::Literal->new('-Infinity');
+ }
+ }
+
my $result = eval {
$lh_results->to_number->value
/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Function.pm new/XML-XPath-1.24/lib/XML/XPath/Function.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Function.pm 2016-01-12 10:48:01.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Function.pm 2016-01-19 12:19:57.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Function;
-$VERSION = '1.21';
+$VERSION = '1.24';
use XML::XPath::Number;
use XML::XPath::Literal;
@@ -265,7 +265,7 @@
if (@params == 3) {
$len = $params[2]->value;
- if (($len eq 'NaN') || (($offset eq 'Infinity') && ($len eq 'Infinity'))) {
+ if (($len eq 'NaN') || (($offset =~ /Infinity/) && ($len eq 'Infinity'))) {
return XML::XPath::Literal->new('');
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Literal.pm new/XML-XPath-1.24/lib/XML/XPath/Literal.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Literal.pm 2016-01-12 10:48:12.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Literal.pm 2016-01-19 12:20:07.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Literal;
-$VERSION = '1.21';
+$VERSION = '1.24';
use XML::XPath::Boolean;
use XML::XPath::Number;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/LocationPath.pm new/XML-XPath-1.24/lib/XML/XPath/LocationPath.pm
--- old/XML-XPath-1.21/lib/XML/XPath/LocationPath.pm 2016-01-12 10:48:20.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/LocationPath.pm 2016-01-19 12:20:16.000000000 +0100
@@ -1,24 +1,24 @@
package XML::XPath::LocationPath;
-$VERSION = '1.21';
+$VERSION = '1.24';
use XML::XPath::Root;
use strict; use warnings;
sub new {
- my $class = shift;
- my $self = [];
- bless $self, $class;
+ my $class = shift;
+ my $self = [];
+ bless $self, $class;
}
sub as_string {
- my $self = shift;
- my $string;
- for (my $i = 0; $i < @$self; $i++) {
- $string .= $self->[$i]->as_string if defined $self->[$i]->as_string;
- $string .= "/" if $self->[$i+1];
- }
- return $string;
+ my $self = shift;
+ my $string;
+ for (my $i = 0; $i < @$self; $i++) {
+ $string .= $self->[$i]->as_string if defined $self->[$i]->as_string;
+ $string .= "/" if $self->[$i+1];
+ }
+ return $string;
}
sub as_xml {
@@ -34,29 +34,29 @@
}
sub set_root {
- my $self = shift;
- unshift @$self, XML::XPath::Root->new();
+ my $self = shift;
+ unshift @$self, XML::XPath::Root->new();
}
sub evaluate {
- my $self = shift;
- # context _MUST_ be a single node
- my $context = shift;
- die "No context" unless $context;
-
- # I _think_ this is how it should work :)
-
- my $nodeset = XML::XPath::NodeSet->new();
- $nodeset->push($context);
-
- foreach my $step (@$self) {
- # For each step
- # evaluate the step with the nodeset
- my $pos = 1;
- $nodeset = $step->evaluate($nodeset);
- }
+ my $self = shift;
+ # context _MUST_ be a single node
+ my $context = shift;
+ die "No context" unless $context;
+
+ # I _think_ this is how it should work :)
+
+ my $nodeset = XML::XPath::NodeSet->new();
+ $nodeset->push($context);
+
+ foreach my $step (@$self) {
+ # For each step
+ # evaluate the step with the nodeset
+ my $pos = 1;
+ $nodeset = $step->evaluate($nodeset);
+ }
- return $nodeset;
+ return $nodeset->remove_duplicates;
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Node/Attribute.pm new/XML-XPath-1.24/lib/XML/XPath/Node/Attribute.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Node/Attribute.pm 2016-01-12 11:29:54.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Node/Attribute.pm 2016-01-19 12:22:03.000000000 +0100
@@ -4,7 +4,7 @@
use vars qw/@ISA $VERSION/;
@ISA = ('XML::XPath::Node');
-$VERSION = '1.21';
+$VERSION = '1.24';
package XML::XPath::Node::AttributeImpl;
@@ -12,7 +12,7 @@
@ISA = ('XML::XPath::NodeImpl', 'XML::XPath::Node::Attribute');
use XML::XPath::Node ':node_keys';
-$VERSION = '1.21';
+$VERSION = '1.24';
sub new {
my $class = shift;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Node/Comment.pm new/XML-XPath-1.24/lib/XML/XPath/Node/Comment.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Node/Comment.pm 2016-01-12 11:30:02.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Node/Comment.pm 2016-01-19 12:23:28.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Node::Comment;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use vars qw/@ISA/;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Node/Element.pm new/XML-XPath-1.24/lib/XML/XPath/Node/Element.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Node/Element.pm 2016-01-12 11:30:10.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Node/Element.pm 2016-01-19 12:23:35.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Node::Element;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use vars qw/@ISA/;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Node/Namespace.pm new/XML-XPath-1.24/lib/XML/XPath/Node/Namespace.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Node/Namespace.pm 2016-01-12 11:30:19.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Node/Namespace.pm 2016-01-19 12:23:42.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Node::Namespace;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use vars qw/@ISA/;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Node/PI.pm new/XML-XPath-1.24/lib/XML/XPath/Node/PI.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Node/PI.pm 2016-01-12 11:30:27.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Node/PI.pm 2016-01-19 12:23:47.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Node::PI;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use vars qw/@ISA/;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Node/Text.pm new/XML-XPath-1.24/lib/XML/XPath/Node/Text.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Node/Text.pm 2016-01-12 11:30:37.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Node/Text.pm 2016-01-19 12:23:58.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Node::Text;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use vars qw/@ISA/;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Node.pm new/XML-XPath-1.24/lib/XML/XPath/Node.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Node.pm 2016-01-12 10:48:30.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Node.pm 2016-01-19 12:20:26.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Node;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use vars qw(@ISA @EXPORT $AUTOLOAD %EXPORT_TAGS @EXPORT_OK);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/NodeSet.pm new/XML-XPath-1.24/lib/XML/XPath/NodeSet.pm
--- old/XML-XPath-1.21/lib/XML/XPath/NodeSet.pm 2016-01-12 10:48:37.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/NodeSet.pm 2016-01-19 12:20:33.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::NodeSet;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Number.pm new/XML-XPath-1.24/lib/XML/XPath/Number.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Number.pm 2016-01-12 10:48:45.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Number.pm 2016-01-19 12:20:40.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Number;
-$VERSION = '1.21';
+$VERSION = '1.24';
use XML::XPath::Boolean;
use XML::XPath::Literal;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Parser.pm new/XML-XPath-1.24/lib/XML/XPath/Parser.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Parser.pm 2016-01-12 10:48:53.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Parser.pm 2016-01-19 12:20:49.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Parser;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use vars qw/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/PerlSAX.pm new/XML-XPath-1.24/lib/XML/XPath/PerlSAX.pm
--- old/XML-XPath-1.21/lib/XML/XPath/PerlSAX.pm 2016-01-12 10:49:01.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/PerlSAX.pm 2016-01-19 12:27:45.000000000 +0100
@@ -1,7 +1,8 @@
package XML::XPath::PerlSAX;
-$VERSION = '1.21';
+$VERSION = '1.24';
+use XML::XPath::Node qw(:node_keys);
use XML::XPath::XMLParser;
use strict; use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Root.pm new/XML-XPath-1.24/lib/XML/XPath/Root.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Root.pm 2016-01-12 10:49:10.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Root.pm 2016-01-19 12:21:22.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Root;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use XML::XPath::XMLParser;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Step.pm new/XML-XPath-1.24/lib/XML/XPath/Step.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Step.pm 2016-01-12 10:50:06.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Step.pm 2016-01-19 12:21:31.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Step;
-$VERSION = '1.21';
+$VERSION = '1.24';
use XML::XPath::Parser;
use XML::XPath::Node;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/Variable.pm new/XML-XPath-1.24/lib/XML/XPath/Variable.pm
--- old/XML-XPath-1.21/lib/XML/XPath/Variable.pm 2016-01-12 10:50:14.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/Variable.pm 2016-01-19 12:21:40.000000000 +0100
@@ -1,6 +1,6 @@
package XML::XPath::Variable;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath/XMLParser.pm new/XML-XPath-1.24/lib/XML/XPath/XMLParser.pm
--- old/XML-XPath-1.21/lib/XML/XPath/XMLParser.pm 2016-01-12 10:50:24.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath/XMLParser.pm 2016-01-19 12:21:50.000000000 +0100
@@ -1,11 +1,10 @@
package XML::XPath::XMLParser;
-$VERSION = '1.21';
+$VERSION = '1.24';
use strict; use warnings;
use XML::Parser;
-#use XML::XPath;
use XML::XPath::Node;
use XML::XPath::Node::Element;
use XML::XPath::Node::Text;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/lib/XML/XPath.pm new/XML-XPath-1.24/lib/XML/XPath.pm
--- old/XML-XPath-1.21/lib/XML/XPath.pm 2016-01-12 10:47:29.000000000 +0100
+++ new/XML-XPath-1.24/lib/XML/XPath.pm 2016-01-19 12:19:14.000000000 +0100
@@ -2,18 +2,18 @@
=head1 NAME
-XML::XPath - a set of modules for parsing and evaluating XPath statements
+XML::XPath - Parse and evaluate XPath statements.
=head1 VERSION
-Version 1.21
+Version 1.24
=cut
use strict; use warnings;
use vars qw($VERSION $AUTOLOAD $revision);
-$VERSION = '1.21';
+$VERSION = '1.24';
$XML::XPath::Namespaces = 1;
$XML::XPath::Debug = 0;
@@ -392,11 +392,19 @@
my $newnode = undef;
my($axis,$name) = ($path =~ /^(.*?)::(.*)$/);
if ($axis =~ /^child$/i) {
- $newnode = XML::XPath::Node::Element->new($name);
+ if ($name =~ /(\S+):(\S+)/) {
+ $newnode = XML::XPath::Node::Element->new($name, $1);
+ } else {
+ $newnode = XML::XPath::Node::Element->new($name);
+ }
return undef if (!defined $newnode);
$prev_node->appendChild($newnode);
} elsif ($axis =~ /^attribute$/i) {
- $newnode = XML::XPath::Node::Attribute->new($name, "");
+ if ($name =~ /(\S+):(\S+)/) {
+ $newnode = XML::XPath::Node::Attribute->new($name, "", $1);
+ } else {
+ $newnode = XML::XPath::Node::Attribute->new($name, "");
+ }
return undef if (!defined $newnode);
$prev_node->appendAttribute($newnode);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/t/00load.t new/XML-XPath-1.24/t/00load.t
--- old/XML-XPath-1.21/t/00load.t 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-XPath-1.24/t/00load.t 2016-01-19 11:45:31.000000000 +0100
@@ -0,0 +1,34 @@
+#!perl
+
+use 5.006;
+use strict;
+use warnings FATAL => 'all';
+use Test::More tests => 23;
+
+BEGIN {
+ use_ok('XML::XPath') || print "Bail out!\n";
+ use_ok('XML::XPath::Boolean') || print "Bail out!\n";
+ use_ok('XML::XPath::Builder') || print "Bail out!\n";
+ use_ok('XML::XPath::Expr') || print "Bail out!\n";
+ use_ok('XML::XPath::Function') || print "Bail out!\n";
+ use_ok('XML::XPath::Literal') || print "Bail out!\n";
+ use_ok('XML::XPath::LocationPath') || print "Bail out!\n";
+ use_ok('XML::XPath::Node') || print "Bail out!\n";
+ use_ok('XML::XPath::Node::Attribute') || print "Bail out!\n";
+ use_ok('XML::XPath::Node::Comment') || print "Bail out!\n";
+ use_ok('XML::XPath::Node::Element') || print "Bail out!\n";
+ use_ok('XML::XPath::Node::Namespace') || print "Bail out!\n";
+ use_ok('XML::XPath::Node::PI') || print "Bail out!\n";
+ use_ok('XML::XPath::Node::Text') || print "Bail out!\n";
+ use_ok('XML::XPath::Node') || print "Bail out!\n";
+ use_ok('XML::XPath::NodeSet') || print "Bail out!\n";
+ use_ok('XML::XPath::Number') || print "Bail out!\n";
+ use_ok('XML::XPath::Parser') || print "Bail out!\n";
+ use_ok('XML::XPath::PerlSAX') || print "Bail out!\n";
+ use_ok('XML::XPath::Root') || print "Bail out!\n";
+ use_ok('XML::XPath::Step') || print "Bail out!\n";
+ use_ok('XML::XPath::Variable') || print "Bail out!\n";
+ use_ok('XML::XPath::XMLParser') || print "Bail out!\n";
+}
+
+diag( "Testing XML::XPath $XML::XPath::VERSION, Perl $], $^X" );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.21/t/42create_node.t new/XML-XPath-1.24/t/42create_node.t
--- old/XML-XPath-1.21/t/42create_node.t 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-XPath-1.24/t/42create_node.t 2016-01-12 20:31:39.000000000 +0100
@@ -0,0 +1,29 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+use XML::XPath;
+
+my $xp1 = new XML::XPath(xml => '<?xml version="1.0" encoding="UTF-8" ?>
+
participants (1)
-
root@hilbert.suse.de